Skip to main content

BYOB - Bring Your Own Blockchain

If you want to have full control over your blockchain deployment, e.g., if you want to reset the state repeatedly or need more funds than a faucet can provide for a single account, you will need to run your own blockchain. For this purpose, we provide a Docker image which runs in standalone mode. This means that the blockchain doesn't act as a parachain but as an independent chain. There is no need to run a Relay Chain and register the KILT chain as a parachain. This greatly simplifies the setup.

You only need to start the Docker image:

docker run --rm -it -p 9944:9944 -p 9933:9933 kiltprotocol/mashnet-node:latest --dev --ws-external --rpc-external

You should see output similar to the following:

2022-05-05 13:25:12 KILT Node
2022-05-05 13:25:12 āœŒļø version 1.6.2
2022-05-05 13:25:12 ā¤ļø by KILT <>, 2019-2022
2022-05-05 13:25:12 šŸ“‹ Chain specification: Development
2022-05-05 13:25:12 šŸ· Node name: subdued-chair-0035
2022-05-05 13:25:12 šŸ‘¤ Role: AUTHORITY
2022-05-05 13:25:12 šŸ’¾ Database: RocksDb at /tmp/substrateufCNUV/chains/development/db/full
2022-05-05 13:25:12 ā›“ Native runtime: mashnet-node-10620 (mashnet-node-0.tx3.au4)
2022-05-05 13:25:13 šŸ”Ø Initializing Genesis block/state (state: 0xb4a2ā€¦94b3, header-hash: 0x09fcā€¦3a2b)
2022-05-05 13:25:13 šŸ‘“ Loading GRANDPA authority set from genesis on what appears to be first startup.
2022-05-05 13:25:14 Using default protocol ID "sup" because none is configured in the chain specs
2022-05-05 13:25:14 šŸ· Local node identity is: 12D3KooWMCqWaxXTQbmG9feCe4cMzjCzUKfm5T6VvGDmh8X5QHe9
2022-05-05 13:25:14 šŸ“¦ Highest known block at #0
2022-05-05 13:25:14 ć€½ļø Prometheus exporter started at
2022-05-05 13:25:14 Listening for new connections on
2022-05-05 13:25:19 šŸ’¤ Idle (0 peers), best: #0 (0x09fcā€¦3a2b), finalized #0 (0x09fcā€¦3a2b), ā¬‡ 0 ā¬† 0
2022-05-05 13:25:20 Accepted a new tcp connection from
2022-05-05 13:25:23 šŸ™Œ Starting consensus session on top of parent 0x...
2022-05-05 13:25:23 šŸŽ Prepared block for proposing at 1 (3 ms) [hash: 0x...; parent_hash: 0x09fcā€¦3a2b; extrinsics (1): [0xae1aā€¦0701]]
2022-05-05 13:25:23 šŸ”– Pre-sealed block for proposal at 1. Hash now 0x..., previously 0x....

Congratulations! You are running your own KILT blockchain. šŸŽ‰

The blockchain exposes a WebSocket endpoint on port 9944 and an RPC endpoint on port 9933. You can test that by calling an RPC endpoint using curl.

curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "system_name", "params":[]}'

This should give you {"jsonrpc":"2.0","result":"KILT Node","id":1} as a response.

In addition, you can also connect to the exposed WebSocket endpoints using your script. Simply replace the WebSocket address with ws:// Please note that we connect to the port 9944 as we are using the WebSocket protocol for our SDK and not bare HTTP.

The --dev parameter provides a pre-funded account which you can use as a faucet, and that has the following mnemonic: receive clutch item involve chaos clutch furnace arrest claw isolate okay together.

You can create the account with the following SDK function:

// Creates an ed25519 key by default which is required to access the funds.
const devFaucet = Crypto.makeKeypairFromUri(faucetSeed)

With the new devFaucet, you can transfer funds to other accounts and test all the KILT features that require tx fee payment.