7

It is a common problem that the launch of parachains on a live relay chain is tricky and hard to debug because relaychain validator logs are not easily available.

What can go wrong with parachain launches in general? Why does a parachain block production stall at a later stage?

What checklist to follow before asking for support?

2

1 Answer 1

13

The following checklist should help avoiding the most common reasons why a parachain won't produce blocks. The most common reasons on top, the more advanced trouble further down

  1. Is your parachain unboarded with the correct paraid? If it is still a parathread, you won't be able to produce blocks. check js/apps https://polkadot.js.org/apps/
  2. Is your collator in sync with the latest block on the correct relay chain?
    • check collator log. look for [Relaychain] ✨ Imported #216436 (0x149a…96fe)
      • This would indicate you're still synching: [Relaychain] ⚙️ Syncing 77.3 bps, target=#216367 (28 peers), best: #213071 (0x7d38…04f3), finalized #212992 (0x505d…c7e5), ⬇ 3.6kiB/s ⬆ 3.8kiB/s
  3. Are you running at least 2 authority collators? Are they peering up?
    • check collator logs: Role: AUTHORITY / Is collating: yes / [Parachain] 💤 Idle (3 peers)
  4. Are authority keys injected (rpc author.insertKey)? (If your parachain runtime uses Aura)
    • verify with collator rpc: author.hasKey
  5. Is your collator set up with the correct Paraid?
    • check collator log Parachain id: Id(1003)
    • check if your state has the same paraid. with js/apps, query parachainInfo.parachainId (a mismatch here can also cause trouble with XCM)
  6. Does parachain genesis match what is registered on the relay chain?
    • check collator logs Parachain genesis state: 0x000000000000000000000000000000000000000000000000000000000000000000236b98be9f06700ff1618e1f9cbb43bc006571517d
    • compare to relaychain paras.heads(<paraid>) if you are at block 0, this should be the same as your genesis state above

Then you should at least see [Parachain] Starting collation

Still not producing blocks?

  1. Does the runtime which the relaychain validators use for PoV validation match the runtime your collator uses to produce blocks? (this can be different if your genesis state and submitted wasm do not match)
    • on the relaychain, query paras.currentCodeHash(<paraid>)
    • does that match with a runtime with the same specVersion your collator shows in js/apps?
      • otherwise, the relaychain validator may fail to include the block with panicked at 'Transaction has a bad signature'
    • if you're unsure, you can calculate the hash of any runtime wasm file by using js/apps extrinsic parachainSystem.authorizeUpgrade and compare the hash with the one registered on the relachain

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.