ethereum-optimism / superchain-ops

42 stars 36 forks source link

Generic DGF implementation update validation script #377

Open sebastianst opened 1 day ago

sebastianst commented 1 day ago

The pre- and post checks of DGF implementation updates are identical, just with slightly different parameters. We could save a lot of boilerplate, copy-pasting and repetition of the same review discussions if there was a generic abstract DGFImplementationUpdate contract that could just be instantiated with a few parameters (chain id, new FDG and PDG implementations) and then everything else is read from the superchain-registry or queried on-chain. It would also incrementally increase the quality of the checks and save work for the Security reviewers.

The same could probably be done for encapsulating the generic storage access allowances and code exceptions for nested Safe multi-sig tasks. This is all currently just always copy-pasted.

This recently became apparent again when we were executing the DGF updates for Sepolia OP and Base.

mds1 commented 22 hours ago

As part of superchain-ops improvements that are going to kick off soon, we are planning to support "template" tasks. Opening a PR to execute a template task will use existing solidity code from the template that is parameterized via an input TOML file. This essentially is what you describe here, as no new solidity will be needed for these tasks :)

sebastianst commented 4 hours ago

Sounds good, great to hear this is coming and already on your radar!