Chain spec primary_chain is defined under node/src/chain_spec.rs

Steps to reproduce:

  1. generate default chain spec for primary_chain
./collator build-spec --chain primary_chain > spec.json
  1. Edit session.keys array with updated sets of keys
  2. Generate genesis-state for updated chain state
./collator export-genesis-state --chain spec.json


Error: thread 'main' panicked at 'Validator in session 1 missing keys!', /home/deployer/.cargo/git/checkouts/substrate-7e08433d4c370a21/fc3fd07/frame/session/src/lib.rs:487:52

1 Answer 1


The easiest way is to modifier the code, then re-generate the chain spec.

If you modify the chain spec json file directly, you might need to update all the related pallets.

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.