You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Offer a way to export state of a sidechain into a genesis file.
Problem
If plasmad unsafe-reset-all is run, it is likely a new contract needs to be deployed. It would be very useful if we could simply provide a genesis file which allows the chain to reprocess all txs that occured relative to the rootchain contract
Proposal
Initial thought: Post all txBytes processed in tm blocks into genesis file. Run all txBytes in genesis file at the beginning of the chain. Disable exit checking when doing this, otherwise it will run into sync issues. Fail if any block header != rootchain block header, otherwise process all txBytes
The text was updated successfully, but these errors were encountered:
I agree, if none of our code relies on the correct TM block number than the first question wouldn't matter. We could process blocks 1 to n in the genesis block and as long as the correct info is added into the stores then queries should return correctly. I suppose this wouldn't work because of TM consensus, ie I'm on block 2 and you are on block n + 1, but I think this could work under given conditions.
If we require this feature only to be used during software upgrades then I don't see an issue. So if all the validators/full nodes export into genesis and resync from the contract they would all be at n+1 plasma block and TM block 2. My initial thought is you could do breaking changes without redeploying rootchain contract. Hard code in if statement if plasmaBlock <= n then old_code else new_code
Summary
Offer a way to export state of a sidechain into a genesis file.
Problem
If
plasmad unsafe-reset-all
is run, it is likely a new contract needs to be deployed. It would be very useful if we could simply provide a genesis file which allows the chain to reprocess all txs that occured relative to the rootchain contractProposal
Initial thought: Post all txBytes processed in tm blocks into genesis file. Run all txBytes in genesis file at the beginning of the chain. Disable exit checking when doing this, otherwise it will run into sync issues. Fail if any block header != rootchain block header, otherwise process all txBytes
The text was updated successfully, but these errors were encountered: