3

I am trying to test a parachain, following this tutorial. /!\ The parachain is not the one in the tutorial, it is kabocha's parachain.

I have a working relay chain (setup like the tutorial), and two validator nodes (same). I can generate the wasm and genesis state for my parachain without problem. When i start my parachain, i have a No validators assigned to our core. message

After reserving the slot on polkadot.js, no problem, but when i add my collator node as a parathread using sudo (as mentionned in the tutorial), i start having this error:

Could not find the header of the genesis block in the database! block_hash=0xdf34458113a507a37b3d953eba1a59b01ba98614eab86fe933765d39defea3cd

The only mention i have found is here, but it doesnt solve my issue, as --parachain-id is not a valid flag.

Does anyone have an idea how to fix this problem ?

4
  • 2
    Make sure that you have generated your raw chain spec as outlined in the tutorial and that you used this raw chain spec to generate the genesis state.
    – bkchr
    Commented Apr 20, 2022 at 13:30
  • i did, i copied the command line
    – Nathan
    Commented Apr 21, 2022 at 9:34
  • Hey there Erudyx, I am the steward of the Kabocha repo. Looks like you’re not connected to the same network, perhaps you need to remove the bootnode from the parachain chain spec, becuase it might be trying to boot into other collators of Kabocha parachain on Pop-Art Relay Test net, not on your relay? I am assuming your trying to create your own setup? Commented Apr 21, 2022 at 13:46
  • the bootnode is already an empty array I'm just trying to connect my local kabocha parachain collator node to my local polkadot relay chain
    – Nathan
    Commented Apr 22, 2022 at 11:40

1 Answer 1

2
+25

Here it seems to be working as expected:

2022-05-25 15:28:59 Parachain Collator Template    
2022-05-25 15:28:59 ✌️  version 0.1.0-1f2ddea-x86_64-linux-gnu    
2022-05-25 15:28:59 ❤️  by Anonymous, 2020-2022    
2022-05-25 15:28:59 📋 Chain specification: Local Testnet    
2022-05-25 15:28:59 🏷  Node name: Alice    
2022-05-25 15:28:59 👤 Role: AUTHORITY    
2022-05-25 15:28:59 💾 Database: RocksDb at /tmp/parachain-alice/chains/local_testnet/db/full    
2022-05-25 15:28:59 ⛓  Native runtime: kabocha-parachain-2 (kabocha-parachain-0.tx0.au2)    
2022-05-25 15:29:00 Parachain id: Id(300)    
2022-05-25 15:29:00 Parachain Account: 5Ec4AhNv5ArwGxtngtW8qcVgzpCAu8nokvnh6vhtvvFkJtpq    
2022-05-25 15:29:00 Parachain genesis state: 0x0000000000000000000000000000000000000000000000000000000000000000007f652f1ea5d75856b74f719e426ef84289cee857a01cd70aaaf772459af0962d03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400    
2022-05-25 15:29:00 Is collating: yes    
2022-05-25 15:29:03 [Parachain] 🔨 Initializing Genesis block/state (state: 0x7f65…962d, header-hash: 0x3501…b9b1)    
2022-05-25 15:29:09 [Relaychain] 🔨 Initializing Genesis block/state (state: 0x94ce…fddf, header-hash: 0xc95b…4f10)    
2022-05-25 15:29:09 [Relaychain] 👴 Loading GRANDPA authority set from genesis on what appears to be first startup.    
2022-05-25 15:29:11 [Relaychain] 👶 Creating empty BABE epoch changes on what appears to be first startup.    
2022-05-25 15:29:11 [Relaychain] 🏷  Local node identity is: 12D3KooWEaZC6jzGQEsC3spM78jsErShpret8uVM5MdB5vLbXmqQ    
2022-05-25 15:29:11 [Relaychain] 📦 Highest known block at #0    
2022-05-25 15:29:11 [Relaychain] 〽️ Prometheus exporter started at 127.0.0.1:9616    
2022-05-25 15:29:11 [Relaychain] Listening for new connections on 127.0.0.1:9977.    
2022-05-25 15:29:11 [Parachain] 🏷  Local node identity is: 12D3KooWM2cszzpUBRNowNkw5GuVbhB96fGHyqyxxyrzkwS5yTNn    
2022-05-25 15:29:11 [Parachain] 📦 Highest known block at #0    
2022-05-25 15:29:11 [Parachain] Unable to bind RPC server to 127.0.0.1:9933. Trying random port.    
2022-05-25 15:29:11 [Parachain] Listening for new connections on 127.0.0.1:8844.
...
2022-05-25 15:34:24 [Relaychain] Advanced session window for approvals update=Advanced { prev_window_start: 7, prev_window_end: 12, new_window_start: 8, new_window_end: 13 }
2022-05-25 15:34:24 [Parachain] Starting collation. relay_parent=0x17b10f2f525bb2db816fddee08a8a6a50ecb46d4bf758620b2b23c8d52645fb9 at=0x23466a083653ebd2b5ea3bacb660055932a04e4c93b0a65a8c5d1ca6a886cfb8
2022-05-25 15:34:24 [Parachain] 🙌 Starting consensus session on top of parent 0x23466a083653ebd2b5ea3bacb660055932a04e4c93b0a65a8c5d1ca6a886cfb8    
2022-05-25 15:34:24 [Parachain] 🎁 Prepared block for proposing at 3 (0 ms) [hash: 0x652d53db52372cefdef9f643454ff85491e6f5efc851713a9f327ff1215cb8ed; parent_hash: 0x2346…cfb8; extrinsics (2): [0xf879…57a3, 0x6755…fe76]]    
2022-05-25 15:34:24 [Parachain] 🔖 Pre-sealed block for proposal at 3. Hash now 0x5877fba02f4e95f806e08143a34016ca564593d0c67f840e964f67e4519ad10d, previously 0x652d53db52372cefdef9f643454ff85491e6f5efc851713a9f327ff1215cb8ed.    
2022-05-25 15:34:24 [Parachain] ✨ Imported #3 (0x5877…d10d)    
2022-05-25 15:34:24 [Parachain] PoV size { header: 0.1787109375kb, extrinsics: 2.4931640625kb, storage_proof: 2.7177734375kb }
2022-05-25 15:34:24 [Parachain] Produced proof-of-validity candidate. block_hash=0x5877fba02f4e95f806e08143a34016ca564593d0c67f840e964f67e4519ad10d
2022-05-25 15:34:26 [Relaychain] 💤 Idle (2 peers), best: #131 (0x17b1…5fb9), finalized #128 (0x6386…9762), ⬇ 1.5kiB/s ⬆ 2.0kiB/s    
2022-05-25 15:34:26 [Parachain] 💤 Idle (0 peers), best: #2 (0x2346…cfb8), finalized #1 (0x5d48…e64a), ⬇ 0 ⬆ 0    
2022-05-25 15:34:30 [Relaychain] ✨ Imported #132 (0xd1ba…edd9)

What I did so far:

cd /tmp
wget https://github.com/paritytech/polkadot/releases/download/v0.9.20/polkadot
chmod a+x polkadot

wget https://docs.substrate.io/assets/tutorials/cumulus/chain-specs/rococo-custom-2-raw.json

# Starting Validator Alice
./polkadot \
  --alice \
  --validator \
  --base-path /tmp/alice \
  --chain rococo-custom-2-raw.json \
  --port 30333 \
  --ws-port 9944

# Starting Validator Bob
./polkadot \
  --bob \
  --validator \
  --base-path /tmp/bob \
  --chain rococo-custom-2-raw.json \
  --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/<Alice Node ID> \
  --port 30334 \
  --ws-port 9945

git clone https://github.com/kabocha-network/parachain.git
cd parachain
cargo build --release

./target/release/parachain-collator build-spec --disable-default-bootnode > kabocha-local-parachain-plain.json

# Edit kabocha-local-parachain-plain.json:
# "para_id": 2000, -> "para_id": 300,
# "parachainId": 2000 -> "parachainId": 300

./target/release/parachain-collator build-spec --chain kabocha-local-parachain-plain.json --raw --disable-default-bootnode > kabocha-local-parachain-300-raw.json

./target/release/parachain-collator export-genesis-wasm --chain kabocha-local-parachain-300-raw.json > para-300-wasm

./target/release/parachain-collator export-genesis-state --chain kabocha-local-parachain-300-raw.json > para-300-genesis

./target/release/parachain-collator \
  --alice \
  --collator \
  --force-authoring \
  --chain kabocha-local-parachain-300-raw.json \
  --base-path /tmp/parachain-alice \
  --port 40333 \
  --ws-port 8844 \
  -- \
  --execution wasm \
  --chain /tmp/rococo-custom-2-raw.json \
  --port 30343 \
  --ws-port 9977

# Go to the PolkadotJS UI:
# Developer -> sudo -> paraSudoWrapper -> sudoScheduleParaInitialize(id, genesis)
# id must be 300
# upload the para-300-genesis file
# upload the para-300-wasm file

Let us know where it breaks for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.