For standalone nodes we can revert chain using badBlocks on chainspec or by exporting the desired blocks and restarting network by reimporting them. But in case of parachains each block header is incuded in relay block as well so not sure if above methods will work. Wondering if there is a safe way to revert parachain to previous block?

2 Answers 2


No, there is no way to revert a parachain block that was accepted by the relay chain. I mean you can revert the block locally in your database, but that will not revert anything in the relay chain.

  • i dont want to revert anything on relaychain just rollback parachain to previous block . will relaychain flag the new block as invalid? say block 100 is already included in relaychain , can i go back to block 75 and start submitting blocks from there?. Thank you for the help. Commented Dec 9, 2022 at 7:04
  • When you want to have a new block of your parachain be accepted by the relay chain, it needs to be a valid state transition from the last state the relay chain is aware of. If you are using Cumulus to build a parachain this last state in the relay chain is the block header. This block header contains the storage root and the next block needs to be build on top of this storage root. If this isn't the case your parachain validation code will reject the block. TLDR: You can not revert your parachain without forcing a different head of your parachain in the relay chain state.
    – bkchr
    Commented Dec 9, 2022 at 10:51
  • Thank you @bkchr. i think i understand now. Commented Dec 12, 2022 at 9:11

If blocks between current block and your revert target block are all pending, you can do it.

But if not, I think there's no way to achieve that.

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.