All the setups demonstrated in this document were done using ubuntu-22-04-3-lts. It's assumed that Rust is installed and running.
Requirements
Manual setup
- Relay Chain
- Parachain
- Clone the repo to get the Cumulus sdk
- Compile the polkadot parachain node
- Copy the polkadot-parachain binary
- Generate the plain text chain specification
- Modify the plain text chain specification
- Generate-a-raw-chain-specification-file-from-the-modified--plain-text-chain-specification
- Export the webassembly runtime
- Generate a parachain genesis state
- Start the collator node alice
- Register the parachain with the local relay chain
- Sudo transaction
- Testing the parachain
- Relay Chain(Private network of trusted validators)
- Parachain (Private network of trusted collatores)
- Clone the repo to get the Cumulus sdk
- Compile the polkadot parachain node
- Copy the polkadot-parachain binary
- Generate two session keys using the sr25519-scheme for aura
- Generate the plain text chain specification
- Modify the plain text chain specification
- Generate a raw chain specification file from the modified plain text chain specification
- Start the collator node
- Add aura key to the keystore
- Verify the file holding the key created in the keystore
- Restart collator node
- Export the webassembly runtime
- Generate-a-parachain-genesis-state
- Register the parachain with the local relay chain
- Sudo transaction
- Testing the parachain
Zombienet setup
Login as root
su root
And follow the instructions in here
Test the setup
polkadot --version
The Polkadot Parachain Host Implementers' Guide
Install Zombienet executable
chmod +x zombienet-linux-x64
sudo cp zombienet-linux-x64 /usr/local/bin
Test the setup
zombienet-linux-x64 version
We should have at least two validators (relay chain nodes) running for every collator (parachain block authoring nodes) on our network.
mkdir test-network
cd test-network
mkdir binaries
polkadot build-spec --chain rococo-local --disable-default-bootnode --raw > ./tmp/raw-relay-chainspec.json
polkadot --chain ./tmp/raw-relay-chainspec.json --alice --validator --tmp --port 30333
polkadot --chain ./tmp/raw-relay-chainspec.json --bob --validator --tmp --port 30334
Connect to the relay chain
Clone the repo to get the Cumulus SDK
git clone --branch polkadot-v1.3.0 https://github.com/paritytech/polkadot-sdk.git
cd polkadot-sdk/cumulus/polkadot-parachain
cargo build --release --bin polkadot-parachain
cd ../../../
cp -r ./polkadot-sdk/target/release/ ./binaries/polkadot-parachain
./binaries/polkadot-parachain/polkadot-parachain build-spec --disable-default-bootnode > ./tmp/plain-parachain-chainspec.json
./binaries/polkadot-parachain/polkadot-parachain build-spec --chain ./tmp/plain-parachain-chainspec.json --disable-default-bootnode --raw > ./tmp/raw-parachain-chainspec.json
./binaries/polkadot-parachain/polkadot-parachain export-genesis-wasm --chain ./tmp/raw-parachain-chainspec.json ./tmp/para-2000-wasm
./binaries/polkadot-parachain/polkadot-parachain export-genesis-state --chain ./tmp/raw-parachain-chainspec.json ./tmp/para-2000-genesis-state
./binaries/polkadot-parachain/polkadot-parachain --alice --collator --force-authoring --chain ./tmp/raw-parachain-chainspec.json --base-path ./tmp/parachain/alice --port 40333 --rpc-port 8844 -- --execution wasm --chain ./tmp/raw-relay-chainspec.json --port 30343 --rpc-port 9977
Register the parachain with the local relay chain
Note: We are bypassing the steps required to acquire a parachain or parathread slot which normally is a parachain auction.
We should have at least two validators (relay chain nodes) running for every collator (parachain block authoring nodes) on our network. Keys are generated in a air-gapped computer that is deliberately separated from the internet for security reasons. This means that the computer does not have any physical or wireless connections to any other network that is connected to the internet.
Session keys for Node I(validator)
Session keys are hot keys that must be kept online by a validator to perform network operations.
polkadot key generate --scheme Sr25519 --password-interactive
Key password:********
Secret phrase: sick cry forget enroll retreat female slab uncover remember neutral time stadium
Network ID: substrate
Secret seed: 0x6f1a8e2665eeec408ad9efd4d5ae5e38737f8b7777d58d063364a61584a42d19
Public key (hex): 0xf6fb2baa764e9c7e1d6c27324f55dc585b89e1e74b8d7a409d84c5bccf818341
Account ID: 0xf6fb2baa764e9c7e1d6c27324f55dc585b89e1e74b8d7a409d84c5bccf818341
Public key (SS58): 5HeYFTPrAufPytrEGQUvSSLHbKSqb9e2NVaBRDTBvZ769kq3
SS58 Address: 5HeYFTPrAufPytrEGQUvSSLHbKSqb9e2NVaBRDTBvZ769kq3
Derive the grandpa key using Ed25519 scheme.
polkadot key inspect --password-interactive --scheme Ed25519 "sick cry forget enroll retreat female slab uncover remember neutral time stadium"
Key password:********
Secret phrase: sick cry forget enroll retreat female slab uncover remember neutral time stadium
Network ID: substrate
Secret seed: 0x6f1a8e2665eeec408ad9efd4d5ae5e38737f8b7777d58d063364a61584a42d19
Public key (hex): 0xd020bc843ece07f62adafd6e73fd59fbb4983eb37308b00302b9b68784141a11
Account ID: 0xd020bc843ece07f62adafd6e73fd59fbb4983eb37308b00302b9b68784141a11
Public key (SS58): 5GmbYPGYH1KxnHw1nXunNQjKJMfeFf2vtmAJJLKq9B856Nfx
SS58 Address: 5GmbYPGYH1KxnHw1nXunNQjKJMfeFf2vtmAJJLKq9B856Nfx
Derive the beefy key using EdDSA scheme.
polkadot key inspect --password-interactive --scheme Ecdsa "sick cry forget enroll retreat female slab uncover remember neutral time stadium"
Key password:********
Secret phrase: sick cry forget enroll retreat female slab uncover remember neutral time stadium
Network ID: substrate
Secret seed: 0x6f1a8e2665eeec408ad9efd4d5ae5e38737f8b7777d58d063364a61584a42d19
Public key (hex): 0x03e6f4ff962acbc87abca901754e5aa4caa78169150cd3caa0a9955b6e4a74a856
Account ID: 0x8dd3e3b15d3cf068ec8b23bcba4883a0ed0db744eabcd9e117b1a85001ff6a48
Public key (SS58): KWDw8nyTtutLkcAyJE6jFsaZFVPUkoZjzXF5U8XaYX4kAKGwD
SS58 Address: 5FGfZ3FhBZCQFNh1BZyNzC1Hv3aPhw2jATnKz9NbkNxLuNc6
Generate the babe key using Sr25519 scheme.
polkadot key generate --scheme Sr25519 --password-interactive
Key password:********
Secret phrase: vanish street orphan print magic atom link census clever sound quote logic
Network ID: substrate
Secret seed: 0xfeb1e206b7394fdff897a2243c8b2ae113e0b6fded4a9d2f42f691851dcc0745
Public key (hex): 0x2c9b041e0d7f686834958607c306b900701c07cf10265eb67d1aaf1cf2e23407
Account ID: 0x2c9b041e0d7f686834958607c306b900701c07cf10265eb67d1aaf1cf2e23407
Public key (SS58): 5D5C1jcLDnzV4KXDsrbKpeM1bzBrCXJywAJk1DHraSdvBmQf
SS58 Address: 5D5C1jcLDnzV4KXDsrbKpeM1bzBrCXJywAJk1DHraSdvBmQf
Node I(validator) keys:
- Id key(Sr25519):
5HeYFTPrAufPytrEGQUvSSLHbKSqb9e2NVaBRDTBvZ769kq3
- grandpa (gran/Ed25519):
5GmbYPGYH1KxnHw1nXunNQjKJMfeFf2vtmAJJLKq9B856Nfx
- beefy (beef/EdDSA):
KWDw8nyTtutLkcAyJE6jFsaZFVPUkoZjzXF5U8XaYX4kAKGwD
- babe (babe/Sr25519):
5D5C1jcLDnzV4KXDsrbKpeM1bzBrCXJywAJk1DHraSdvBmQf
- im_online (imon/Sr25519):
5D5C1jcLDnzV4KXDsrbKpeM1bzBrCXJywAJk1DHraSdvBmQf
- para_validator (para/Sr25519):
5D5C1jcLDnzV4KXDsrbKpeM1bzBrCXJywAJk1DHraSdvBmQf
- para_assignment (asgn/Sr25519):
5D5C1jcLDnzV4KXDsrbKpeM1bzBrCXJywAJk1DHraSdvBmQf
- authority_discovery (audi/Sr25519):
5D5C1jcLDnzV4KXDsrbKpeM1bzBrCXJywAJk1DHraSdvBmQf
"session": {
"keys": [
[
"5HeYFTPrAufPytrEGQUvSSLHbKSqb9e2NVaBRDTBvZ769kq3",
"5HeYFTPrAufPytrEGQUvSSLHbKSqb9e2NVaBRDTBvZ769kq3",
{
"grandpa": "5GmbYPGYH1KxnHw1nXunNQjKJMfeFf2vtmAJJLKq9B856Nfx",
"babe": "5D5C1jcLDnzV4KXDsrbKpeM1bzBrCXJywAJk1DHraSdvBmQf",
"im_online": "5D5C1jcLDnzV4KXDsrbKpeM1bzBrCXJywAJk1DHraSdvBmQf",
"para_validator": "5D5C1jcLDnzV4KXDsrbKpeM1bzBrCXJywAJk1DHraSdvBmQf",
"para_assignment": "5D5C1jcLDnzV4KXDsrbKpeM1bzBrCXJywAJk1DHraSdvBmQf",
"authority_discovery": "5D5C1jcLDnzV4KXDsrbKpeM1bzBrCXJywAJk1DHraSdvBmQf",
"beefy": "KWDw8nyTtutLkcAyJE6jFsaZFVPUkoZjzXF5U8XaYX4kAKGwD"
}
]
},
Session keys for Node II(validator)
Session keys are hot keys that must be kept online by a validator to perform network operations.
polkadot key generate --scheme Sr25519 --password-interactive
Key password:********
Secret phrase: voice now jewel reopen distance notice cry output dwarf broccoli hint gaze
Network ID: substrate
Secret seed: 0xe05300a2a2233a5ae2620737f7c96e61b9d98e8e027cda8f467de3160cfe0320
Public key (hex): 0x6e7b0b13b3f316a794a644b50953b14b6238c7daddda688601a09e27dc662b13
Account ID: 0x6e7b0b13b3f316a794a644b50953b14b6238c7daddda688601a09e27dc662b13
Public key (SS58): 5EZZgACHStMKRERaEV6xdrB459SEunYxkNhWEiCBZB3WZ8WG
SS58 Address: 5EZZgACHStMKRERaEV6xdrB459SEunYxkNhWEiCBZB3WZ8WG
Derive the grandpa key using Ed25519 scheme.
polkadot key inspect --password-interactive --scheme Ed25519 "voice now jewel reopen distance notice cry output dwarf broccoli hint gaze"
Key password:********
Secret phrase: voice now jewel reopen distance notice cry output dwarf broccoli hint gaze
Network ID: substrate
Secret seed: 0xe05300a2a2233a5ae2620737f7c96e61b9d98e8e027cda8f467de3160cfe0320
Public key (hex): 0xf18e8c9d4ef09dc3cdb87ed3a893a711949349e5582e26f2bbfc22f3ea338e0d
Account ID: 0xf18e8c9d4ef09dc3cdb87ed3a893a711949349e5582e26f2bbfc22f3ea338e0d
Public key (SS58): 5HXRk4txhxjAGHPVTyPgpu1zDeWtGruJWyPmih5bDq1rSkZf
SS58 Address: 5HXRk4txhxjAGHPVTyPgpu1zDeWtGruJWyPmih5bDq1rSkZf
Derive the beefy key using EdDSA scheme.
polkadot key inspect --password-interactive --scheme Ecdsa "voice now jewel reopen distance notice cry output dwarf broccoli hint gaze"
Key password:********
Secret phrase: voice now jewel reopen distance notice cry output dwarf broccoli hint gaze
Network ID: substrate
Secret seed: 0xe05300a2a2233a5ae2620737f7c96e61b9d98e8e027cda8f467de3160cfe0320
Public key (hex): 0x027742dd115c12ea392832333fc36bedc943df190b0fe585c310241fc5bd284f53
Account ID: 0x0f8fd6db89bfd4554c6efac2273b3f0621d88790262b881d958e113253fc2b7b
Public key (SS58): KW5d2JWTUEQTPFvLgDQVuj3w1Ww6cqrwCn8vN4pt7hbtm7i3H
SS58 Address: 5CR7Jd1YoKuKkEQ3dZn7X18tNcJFQPi4zVHTchJwGQTtyVmq
Generate the babe key using Sr25519 scheme.
polkadot key generate --scheme Sr25519 --password-interactive
Key password:********
Secret phrase: expire sleep seminar sad eager faculty inflict great arm slice champion similar
Network ID: substrate
Secret seed: 0xc35d77c56c05ff2365af8b8974403e1ac2c16c9da0958245efd63ea9a0f0372b
Public key (hex): 0x0ca09f828a324f1161064a9508057e742f87abd4fc8624a8485a18f90b13982a
Account ID: 0x0ca09f828a324f1161064a9508057e742f87abd4fc8624a8485a18f90b13982a
Public key (SS58): 5CMG9U65GY9gR4qoKHdZbSfAu9NEUo2CXAg9uSeZiv1ENM1K
SS58 Address: 5CMG9U65GY9gR4qoKHdZbSfAu9NEUo2CXAg9uSeZiv1ENM1K
Node II(validator) keys:
- key(Sr25519):
5EZZgACHStMKRERaEV6xdrB459SEunYxkNhWEiCBZB3WZ8WG
- grandpa (gran/Ed25519):
5HXRk4txhxjAGHPVTyPgpu1zDeWtGruJWyPmih5bDq1rSkZf
- beefy (beef/EdDSA):
KW5d2JWTUEQTPFvLgDQVuj3w1Ww6cqrwCn8vN4pt7hbtm7i3H
- babe (babe/Sr25519):
5CMG9U65GY9gR4qoKHdZbSfAu9NEUo2CXAg9uSeZiv1ENM1K
- im_online (imon/Sr25519):
5CMG9U65GY9gR4qoKHdZbSfAu9NEUo2CXAg9uSeZiv1ENM1K
- para_validator (para/Sr25519):
5CMG9U65GY9gR4qoKHdZbSfAu9NEUo2CXAg9uSeZiv1ENM1K
- para_assignment (asgn/Sr25519):
5CMG9U65GY9gR4qoKHdZbSfAu9NEUo2CXAg9uSeZiv1ENM1K
- authority_discovery (audi/Sr25519):
5CMG9U65GY9gR4qoKHdZbSfAu9NEUo2CXAg9uSeZiv1ENM1K
"session": {
"keys": [
[
"5EZZgACHStMKRERaEV6xdrB459SEunYxkNhWEiCBZB3WZ8WG",
"5EZZgACHStMKRERaEV6xdrB459SEunYxkNhWEiCBZB3WZ8WG",
{
"grandpa": "5HXRk4txhxjAGHPVTyPgpu1zDeWtGruJWyPmih5bDq1rSkZf",
"babe": "5CMG9U65GY9gR4qoKHdZbSfAu9NEUo2CXAg9uSeZiv1ENM1K",
"im_online": "5CMG9U65GY9gR4qoKHdZbSfAu9NEUo2CXAg9uSeZiv1ENM1K",
"para_validator": "5CMG9U65GY9gR4qoKHdZbSfAu9NEUo2CXAg9uSeZiv1ENM1K",
"para_assignment": "5CMG9U65GY9gR4qoKHdZbSfAu9NEUo2CXAg9uSeZiv1ENM1K",
"authority_discovery": "5CMG9U65GY9gR4qoKHdZbSfAu9NEUo2CXAg9uSeZiv1ENM1K",
"beefy": "KW5d2JWTUEQTPFvLgDQVuj3w1Ww6cqrwCn8vN4pt7hbtm7i3H"
}
]
},
polkadot build-spec --disable-default-bootnode --chain rococo-local > ./tmp/plain-relay-chain-spec-private-network.json
"session": {
"keys": [
[
"5HeYFTPrAufPytrEGQUvSSLHbKSqb9e2NVaBRDTBvZ769kq3",
"5HeYFTPrAufPytrEGQUvSSLHbKSqb9e2NVaBRDTBvZ769kq3",
{
"grandpa": "5GmbYPGYH1KxnHw1nXunNQjKJMfeFf2vtmAJJLKq9B856Nfx",
"babe": "5D5C1jcLDnzV4KXDsrbKpeM1bzBrCXJywAJk1DHraSdvBmQf",
"im_online": "5D5C1jcLDnzV4KXDsrbKpeM1bzBrCXJywAJk1DHraSdvBmQf",
"para_validator": "5D5C1jcLDnzV4KXDsrbKpeM1bzBrCXJywAJk1DHraSdvBmQf",
"para_assignment": "5D5C1jcLDnzV4KXDsrbKpeM1bzBrCXJywAJk1DHraSdvBmQf",
"authority_discovery": "5D5C1jcLDnzV4KXDsrbKpeM1bzBrCXJywAJk1DHraSdvBmQf",
"beefy": "KWDw8nyTtutLkcAyJE6jFsaZFVPUkoZjzXF5U8XaYX4kAKGwD"
}
],
[
"5EZZgACHStMKRERaEV6xdrB459SEunYxkNhWEiCBZB3WZ8WG",
"5EZZgACHStMKRERaEV6xdrB459SEunYxkNhWEiCBZB3WZ8WG",
{
"grandpa": "5HXRk4txhxjAGHPVTyPgpu1zDeWtGruJWyPmih5bDq1rSkZf",
"babe": "5CMG9U65GY9gR4qoKHdZbSfAu9NEUo2CXAg9uSeZiv1ENM1K",
"im_online": "5CMG9U65GY9gR4qoKHdZbSfAu9NEUo2CXAg9uSeZiv1ENM1K",
"para_validator": "5CMG9U65GY9gR4qoKHdZbSfAu9NEUo2CXAg9uSeZiv1ENM1K",
"para_assignment": "5CMG9U65GY9gR4qoKHdZbSfAu9NEUo2CXAg9uSeZiv1ENM1K",
"authority_discovery": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty",
"beefy": "KW5d2JWTUEQTPFvLgDQVuj3w1Ww6cqrwCn8vN4pt7hbtm7i3H"
}
]
]
},
polkadot build-spec --chain=./tmp/plain-relay-chain-spec-private-network.json --raw --disable-default-bootnode > ./tmp/raw-relay-chain-spec-private-network.json
polkadot --base-path ./tmp/node01 --chain ./tmp/raw-relay-chain-spec-private-network.json --port 30333 --rpc-port 9945 --telemetry-url "wss://telemetry.polkadot.io/submit/ 0" --validator --rpc-methods Unsafe --name MyNode01 --password-interactive
polkadot key insert --base-path ./tmp/node01 --chain ./tmp/raw-relay-chain-spec-private-network.json --scheme Ed25519 --suri "sick cry forget enroll retreat female slab uncover remember neutral time stadium" --password-interactive --key-type gran
polkadot key insert --base-path ./tmp/node01 --chain ./tmp/raw-relay-chain-spec-private-network.json --scheme Ecdsa --suri "sick cry forget enroll retreat female slab uncover remember neutral time stadium" --password-interactive --key-type beef
polkadot key insert --base-path ./tmp/node01 --chain ./tmp/raw-relay-chain-spec-private-network.json --scheme Sr25519 --suri "vanish street orphan print magic atom link census clever sound quote logic" --password-interactive --key-type babe
polkadot key insert --base-path ./tmp/node01 --chain ./tmp/raw-relay-chain-spec-private-network.json --scheme Sr25519 --suri "vanish street orphan print magic atom link census clever sound quote logic" --password-interactive --key-type imon
polkadot key insert --base-path ./tmp/node01 --chain ./tmp/raw-relay-chain-spec-private-network.json --scheme Sr25519 --suri "vanish street orphan print magic atom link census clever sound quote logic" --password-interactive --key-type para
polkadot key insert --base-path ./tmp/node01 --chain ./tmp/raw-relay-chain-spec-private-network.json --scheme Sr25519 --suri "vanish street orphan print magic atom link census clever sound quote logic" --password-interactive --key-type asgn
polkadot key insert --base-path ./tmp/node01 --chain ./tmp/raw-relay-chain-spec-private-network.json --scheme Sr25519 --suri "vanish street orphan print magic atom link census clever sound quote logic" --password-interactive --key-type audi
ls -l ./tmp/node01/chains/rococo_local_testnet/keystore/
polkadot --base-path ./tmp/node01 --chain ./tmp/raw-relay-chain-spec-private-network.json --port 30333 --rpc-port 9945 --telemetry-url "wss://telemetry.polkadot.io/submit/ 0" --validator --rpc-methods Unsafe --name MyNode01 --password-interactive
12D3KooWRVmQxg1iqCb92GPLETct2t1qPNpscQXe8YkLdyfNnZwx
polkadot --base-path ./tmp/node02 --chain ./tmp/raw-relay-chain-spec-private-network.json --port 30334 --rpc-port 9946 --telemetry-url "wss://telemetry.polkadot.io/submit/ 0" --validator --rpc-methods Unsafe --name MyNode02 --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWRVmQxg1iqCb92GPLETct2t1qPNpscQXe8YkLdyfNnZwx --password-interactive
polkadot key insert --base-path ./tmp/node02 --chain ./tmp/raw-relay-chain-spec-private-network.json --scheme Ed25519 --suri "voice now jewel reopen distance notice cry output dwarf broccoli hint gaze" --password-interactive --key-type gran
polkadot key insert --base-path ./tmp/node02 --chain ./tmp/raw-relay-chain-spec-private-network.json --scheme Ecdsa --suri "voice now jewel reopen distance notice cry output dwarf broccoli hint gaze" --password-interactive --key-type beef
polkadot key insert --base-path ./tmp/node02 --chain ./tmp/raw-relay-chain-spec-private-network.json --scheme Sr25519 --suri "expire sleep seminar sad eager faculty inflict great arm slice champion similar" --password-interactive --key-type babe
polkadot key insert --base-path ./tmp/node02 --chain ./tmp/raw-relay-chain-spec-private-network.json --scheme Sr25519 --suri "expire sleep seminar sad eager faculty inflict great arm slice champion similar" --password-interactive --key-type imon
polkadot key insert --base-path ./tmp/node02 --chain ./tmp/raw-relay-chain-spec-private-network.json --scheme Sr25519 --suri "expire sleep seminar sad eager faculty inflict great arm slice champion similar" --password-interactive --key-type para
polkadot key insert --base-path ./tmp/node02 --chain ./tmp/raw-relay-chain-spec-private-network.json --scheme Sr25519 --suri "expire sleep seminar sad eager faculty inflict great arm slice champion similar" --password-interactive --key-type asgn
polkadot key insert --base-path ./tmp/node02 --chain ./tmp/raw-relay-chain-spec-private-network.json --scheme Sr25519 --suri "expire sleep seminar sad eager faculty inflict great arm slice champion similar" --password-interactive --key-type audi
ls -l ./tmp/node02/chains/rococo_local_testnet/keystore/
polkadot --base-path ./tmp/node02 --chain ./tmp/raw-relay-chain-spec-private-network.json --port 30334 --rpc-port 9946 --telemetry-url "wss://telemetry.polkadot.io/submit/ 0" --validator --rpc-methods Unsafe --name MyNode02 --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWRVmQxg1iqCb92GPLETct2t1qPNpscQXe8YkLdyfNnZwx --password-interactive
Connect to the relay chain
Clone the repo to get the Cumulus SDK
git clone --branch polkadot-v1.3.0 https://github.com/paritytech/polkadot-sdk.git
cd polkadot-sdk/cumulus/polkadot-parachain
cargo build --release --bin polkadot-parachain
cd ../../../
cp -r ./polkadot-sdk/target/release/ ./binaries/polkadot-parachain
Generate two session keys using the Sr25519 scheme for aura
./binaries/polkadot-parachain/polkadot-parachain key generate --scheme Sr25519 --password-interactive
Key password:********
Secret phrase: elevator exotic trick couple pave trend rude income spider leader first churn
Network ID: substrate
Secret seed: 0xd3bb290be811bc5d9fb1762236edced9b43edac30e71a739dc3f90a8424d9a56
Public key (hex): 0xaabf7651b017d3ffbe23674ea434f297ea468ffee560cfb55b03cbe505cb8d2f
Account ID: 0xaabf7651b017d3ffbe23674ea434f297ea468ffee560cfb55b03cbe505cb8d2f
Public key (SS58): 5FvasdQkzcgBBWVMTjminfi3Nk4s9ymZEJLxrcB3L9KikpRm
SS58 Address: 5FvasdQkzcgBBWVMTjminfi3Nk4s9ymZEJLxrcB3L9KikpRm
Key password:********
Key password:
Secret phrase: enemy bus social knock parrot maple into actress pause brisk know bracket
Network ID: substrate
Secret seed: 0x8b334e8c01fe1542ccb715ad7f3cb9f2585106a8dd78aa0698564c2c9f42a1e6
Public key (hex): 0x187e85ee44a439442b11d423f1aadbc3d1016f1208317326d1ad67d8bc9fe82c
Account ID: 0x187e85ee44a439442b11d423f1aadbc3d1016f1208317326d1ad67d8bc9fe82c
Public key (SS58): 5CcpbGUiNjeHH9tsCMQQBNwNxfTPGSWMV2i9uY9kx7MjCh9p
SS58 Address: 5CcpbGUiNjeHH9tsCMQQBNwNxfTPGSWMV2i9uY9kx7MjCh9p
./binaries/polkadot-parachain/polkadot-parachain build-spec --disable-default-bootnode > ./tmp/plain-parachain-chain-spec-private-network.json
"aura": {
"authorities":
[
"5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
"5CcpbGUiNjeHH9tsCMQQBNwNxfTPGSWMV2i9uY9kx7MjCh9p"
]
},
./binaries/polkadot-parachain/polkadot-parachain build-spec --chain ./tmp/plain-parachain-chain-spec-private-network.json --disable-default-bootnode --raw > ./tmp/raw-parachain-chain-spec-private-network.json
./binaries/polkadot-parachain/polkadot-parachain --collator --force-authoring --chain ./tmp/raw-parachain-chain-spec-private-network.json --base-path ./tmp/parachain/coll01 --port 40333 --rpc-port 8844 -- --execution wasm --chain ./tmp/raw-relay-chain-spec-private-network.json --port 30343 --rpc-port 9977 --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWRVmQxg1iqCb92GPLETct2t1qPNpscQXe8YkLdyfNnZwx --password-interactive
./binaries/polkadot-parachain/polkadot-parachain key insert --base-path ./tmp/parachain/coll01 --chain ./tmp/raw-parachain-chain-spec-private-network.json --scheme Sr25519 --suri "elevator exotic trick couple pave trend rude income spider leader first churn" --password-interactive --key-type aura
ls -l ./tmp/parachain/coll01/chains/local_testnet/keystore/
./binaries/polkadot-parachain/polkadot-parachain --collator --force-authoring --chain ./tmp/raw-parachain-chain-spec-private-network.json --base-path ./tmp/parachain/coll01 --port 40333 --rpc-port 8844 -- --execution wasm --chain ./tmp/raw-relay-chain-spec-private-network.json --port 30343 --rpc-port 9977 --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWRVmQxg1iqCb92GPLETct2t1qPNpscQXe8YkLdyfNnZwx --password-interactive
./binaries/polkadot-parachain/polkadot-parachain export-genesis-wasm --chain ./tmp/raw-parachain-chain-spec-private-network.json ./tmp/parachain-private-network-wasm
./binaries/polkadot-parachain/polkadot-parachain export-genesis-state --chain ./tmp/raw-parachain-chain-spec-private-network.json ./tmp/parachain-private-network-state
Register the parachain with the local relay chain
Note: We are bypassing the steps required to acquire a parachain or parathread slot which normally is a parachain auction.
A simple network specification with two relay chain validators nodes and one collator.
[relaychain]
default_command = "polkadot"
chain = "rococo-local"
[[relaychain.nodes]]
name = "node01"
validator = true
[[relaychain.nodes]]
name = "node02"
validator = true
[[parachains]]
id = 2000
cumulus_based = true
[parachains.collator]
name = "collator01"
command = "./binaries/polkadot-parachain/polkadot-parachain"
args = ["--force-authoring","-lparachain=debug"]
zombienet-linux-x64 spawn network-specification.toml -p native
A network specification with tree relay chain validators nodes and two parahachains with four collators. This type of setup is used for building with the hrmp-channels
[settings]
node_spawn_timeout = 240
[relaychain]
default_command = "polkadot"
default_args = [ "-lparachain=debug,xcm=trace" ]
chain = "rococo-local"
[[relaychain.nodes]]
name = "node01"
validator = true
rpc_port = 9932
ws_port = 9942
balance = 2000000000000
[[relaychain.nodes]]
name = "node02"
validator = true
rpc_port = 9933
ws_port = 9943
balance = 2000000000000
[[relaychain.nodes]]
name = "node03"
validator = true
rpc_port = 9934
ws_port = 9944
balance = 2000000000000
[[parachains]]
id = 1013
cumulus_based = true
[[parachains.collators]]
name = "collator01-1013"
validator = true
command = "./binaries/polkadot-parachain/polkadot-parachain"
rpc_port = 8933
ws_port = 8943
args = [
"-lparachain=debug,runtime::bridge-hub=trace,runtime::bridge=trace,runtime::bridge-dispatch=trace,bridge=trace,runtime::bridge-messages=trace,xcm=trace",
"--force-authoring"
]
# run bob as parachain collator
[[parachains.collators]]
name = "collator02-1013"
validator = true
command = "./binaries/polkadot-parachain/polkadot-parachain"
rpc_port = 8934
ws_port = 8944
args = [
"-lparachain=trace,runtime::bridge-hub=trace,runtime::bridge=trace,runtime::bridge-dispatch=trace,bridge=trace,runtime::bridge-messages=trace,xcm=trace",
"--force-authoring"
]
[[parachains]]
id = 1000
cumulus_based = true
[[parachains.collators]]
name = "collator01-1000"
rpc_port = 9911
ws_port = 9910
command = "./binaries/polkadot-parachain/polkadot-parachain"
args = [
"-lparachain=debug,xcm=trace,runtime::bridge-transfer=trace"
]
[[parachains.collators]]
name = "collator02-1000"
command = "./binaries/polkadot-parachain/polkadot-parachain"
args = [
"-lparachain=debug,xcm=trace,runtime::bridge-transfer=trace"
]
#[[hrmp_channels]]
#sender = 1000
#recipient = 1013
#max_capacity = 4
#max_message_size = 524288
#
#[[hrmp_channels]]
#sender = 1013
#recipient = 1000
#max_capacity = 4
#max_message_size = 524288
zombienet-linux-x64 spawn network-specification-hrmp.toml -p native
A network specification with two relay chain validators nodes and one parahachain with one collator.This is a parachain node for ink! smart contracts. It contains a default configuration of Substrate's module for smart contracts ‒ the pallet-contracts.
[settings]
timeout = 1000
[relaychain]
default_command = "polkadot"
default_args = [ "-lparachain=debug" ]
chain = "rococo-local"
[[relaychain.nodes]]
name = "node01"
validator = true
rpc_port = 9932
ws_port = 9942
balance = 2000000000000
[[relaychain.nodes]]
name = "node02"
validator = true
rpc_port = 9933
ws_port = 9943
balance = 2000000000000
[[parachains]]
id = 2000
cumulus_based = true
chain = "contracts-rococo"
[[parachains.collators]]
name = "collator01-2000"
validator = true
command = "./binaries/polkadot-parachain/polkadot-parachain"
rpc_port = 8933
ws_port = 8943
args = [
"-lparachain=debug",
"--force-authoring"
]
zombienet-linux-x64 spawn network-specification-ink.toml -p native
References: