rollmint
rollmint copied to clipboard
[EVM] Add examples on how to start a fresh chain with the pre-existing state using reth
We should add examples/documentation around how to export state from an existing chain and be able to start a fresh chain with the pre-existing state when using reth with Rollkit.
This is useful for users that would need to start a new Rollkit chain using the latest version when some breaking change is released but not re-deploy all contracts/tooling again from scratch.
EDIT: It's useful to constrain the scope of this issue to just the specific chain, so it's a fresh rollkit chain with height 1, and assume no previous state needs to be migrated or put on Celestia. So a new node would just look at this pre-existing state as the genesis state.
This issue arose from an EVM user who had a bunch of solidity contracts already deployed on their chain (especially ones from an external evm account abstraction tooling team called pimilco) and we had a breaking change for them which was running a rollkit node using lumen instead of vanilla reth, so they had to restart a completely fresh chain without any state. They indicated that having the option for them to start the chain with pre-existing state with all their deployed contracts/user balances existed would have been preferred for them so they didn't need to prompt pimilco to deploy their contracts again.
~~@auricom this is completed right?~~
commented on the wrong issue
This is a larger issue that will require specific designs, its unclear if the export of state will also need to be custom to the specific chain
There are more open questions:
- if a chain migrates, should previous state be added to celestia? how will nodes sync from genesis without this?
- do we start the chain height from 1 or +1 from the latest block in the old system?
I think it might be useful to constrain the scope of this issue to just the specific chain, so it's a fresh rollkit chain with height 1, and assuming no previous state needs to be migrated or put on Celestia. Will put this as an edit at the top of this issue and more context on why this issue was created.