-
Notifications
You must be signed in to change notification settings - Fork 155
Open
Description
Right now whenever the RuntimeCall or Transaction types change in any way whatsoever, the Runtime::CHAIN_HASH value changes, and this invalidates all existing transactions on DA since the chain hash is used in signature checks.
We should design a solution for saving historical CHAIN_HASH values to allow resyncing the chain even when the active chain hash is different. At its core this requires storing the changes, i.e. a mapping from rollup height to new chain hash. Resyncing will then use the chain hash appropriate for each block to verify the signatures of old transactions.
Some considerations:
- Right now the chain hash is generated automatically at build time. This would require manually specifying older hashes, probably in a config somewhere. It would also mean users would have to update the config whenever upgrading.
- We need to consider ZK provers. Probably this will mean having separate binaries for the different upgrade heights, and coordinating them somehow.
- They could be saved on-chain (this might even allow reusing the same ZK binary?) but update permissions would need to be managed. (If the chain hash is available inside transaction execution, could it be permissionless and with penalties if an incorrect update is submitted?) The runtime would then access them probably through a new capability
Metadata
Metadata
Assignees
Labels
No labels