Description
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Right now there is not a great way to do L2 contracts releases because there is network specific configuration in the L2 genesis allocs in the form of storage and bytecode (immutables). This makes it difficult to release an allocs.json
artifact as a release of the L2 genesis, as well as ensuring that no malicious code has been set in the genesis state of a chain. Ideally there should be a single deterministic L2 genesis state per hardfork and all network specific config should be sourced from L1.
This project involves moving all of the network specific configuration in the L2 predeploys to be sourced from L1. We want a system similar to interop's setConfig
as described here that sets the network specific values into storage via deposit transactions when the SystemConfig
is initialized.
Examples of this network specific config:
- L2StandardBridge.otherBridge
- L2CrossDomainMessenger.otherMessenger
- FeeVault config, for each of the 3 fee vaults
- L2 ProxyAdmin owner
Instead of reading these values from storage on L2, they could be exposed via getters on the L1Block
contract and then read from a single source of truth. The L1 setConfig
path would be able to issue deposit transactions that can modify these values. This would decouple the L2 genesis state from network specific config and simplify the process of spinning up a new chain because all chains can use the same allocs.json