superchain-registry
superchain-registry copied to clipboard
ops: add depset checker
Overview
Adds a new DepsetChecker object to perform the following interop validations:
- Offchain: every chain in the depset has the exact same depset in their config toml
- Offchain:
StaticConfigDependencySet.ActivationTimemust be ≥ to that chain’s[hardforks.interop_time] - Onchain: every chain in the depset has the same DisputeGameFactoryProxy and EthLockboxProxy address
- Note: EthLockboxProxy check is currently disabled. Need to be able to update op-fetcher import (via monorepo) before we can make this check as currently designed. Blocked by https://github.com/ethereum-optimism/optimism/issues/15934
DepsetChecker is wrapped by the new ops/cmd/check_depsets program, which is invoked by a new circleci job check-depsets for every pr.
Details
DepsetChecker takes three inputs:
- logger
AddressesJSONmapping of chainId --> addresses: contains addresses for every chain it needs to validate. In production, this will be data from the codegen'edaddresses.jsonfile that is populated byop-fetcherafter it has retrieved all addresses from onchain. This meansDepsetCheckerMUST run aftercodegenin the production ci.[]DiskChainConfigslice, which includes the data from each chains .toml config. In production, all chain configs from all superchains in the child dirs withinsuperchain/configswill be provided.
Related issues
- https://github.com/ethereum-optimism/optimism/issues/15870
- https://github.com/ethereum-optimism/optimism/issues/15872
- https://github.com/ethereum-optimism/optimism/issues/15871
Codecov Report
Attention: Patch coverage is 67.74194% with 60 lines in your changes missing coverage. Please review.
Project coverage is 42.63%. Comparing base (
7bd8187) to head (0cf5c32).
Additional details and impacted files
@@ Coverage Diff @@
## main #1013 +/- ##
==========================================
+ Coverage 41.08% 42.63% +1.54%
==========================================
Files 43 45 +2
Lines 3018 3204 +186
==========================================
+ Hits 1240 1366 +126
- Misses 1655 1706 +51
- Partials 123 132 +9
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.