From ad6f08a52802ec7a55bb4a91d57937551504885c Mon Sep 17 00:00:00 2001 From: Eugene Dobry Date: Tue, 10 Dec 2024 18:29:29 -0500 Subject: [PATCH] feat(superchain): add GovernedByOptimism field to chain config (#718) * add GovernedByOptimism field to chain config * set governed_by_optimism on op-mainnet and metal * lint & run codegen * update expected configs * add GovernedByOptimismTest * lint * use PAO not PA * swap expected and actual fields * add explicit governed_by_optimism = false * fix test panic * set governed_by_optimism for mode and zora * commit codegen changes * remove comment * extract resolveAddress * check negative case as well * set governed_by_optimism = true on additional chains * commit codegen output * commit lint fixes * add back lint-removed fmt import in different order * validate that PAO role is set * iterate over networks instead of hardcoding * lint * rename getAddress in response to PR comment * set swell & ink sepolia to governed_by_optimism = true * update codegen * exclude sepolia-devnet-0 & base-devnet-0 from GovernedByOptimismTest * improve comment for exclusions * simplify getAddressFromConfig signature * removed redundant nil checks --- chainList.json | 36 ++++++++++ chainList.toml | 36 ++++++++++ .../configs/sepolia/expected_altda.toml | 1 + .../configs/sepolia/expected_baseline.toml | 1 + .../sepolia/expected_baseline_legacy.toml | 1 + .../configs/sepolia/expected_faultproofs.toml | 1 + .../sepolia/expected_standard-candidate.toml | 1 + .../configs/sepolia/expected_zorasep.toml | 1 + superchain/configs/configs.json | 36 ++++++++++ superchain/configs/mainnet/base.toml | 1 + superchain/configs/mainnet/ethernity.toml | 1 + superchain/configs/mainnet/lisk.toml | 1 + superchain/configs/mainnet/lyra.toml | 1 + superchain/configs/mainnet/metal.toml | 1 + superchain/configs/mainnet/mode.toml | 1 + superchain/configs/mainnet/op.toml | 1 + superchain/configs/mainnet/orderly.toml | 1 + superchain/configs/mainnet/shape.toml | 1 + superchain/configs/mainnet/swell.toml | 1 + superchain/configs/mainnet/zora.toml | 1 + .../configs/sepolia-dev-0/base-devnet-0.toml | 1 + .../sepolia-dev-0/oplabs-devnet-0.toml | 1 + superchain/configs/sepolia/base.toml | 1 + superchain/configs/sepolia/ethernity.toml | 1 + superchain/configs/sepolia/ink.toml | 1 + superchain/configs/sepolia/lisk.toml | 1 + superchain/configs/sepolia/metal.toml | 1 + superchain/configs/sepolia/minato.toml | 1 + superchain/configs/sepolia/mode.toml | 1 + superchain/configs/sepolia/op.toml | 1 + superchain/configs/sepolia/shape.toml | 1 + superchain/configs/sepolia/unichain.toml | 1 + superchain/configs/sepolia/zora.toml | 1 + superchain/internal/codegen/main.go | 2 + superchain/superchain.go | 3 +- validation/README.md | 2 +- validation/exclusions_test.go | 5 +- validation/governed-by-optimism_test.go | 41 +++++++++++ validation/security-configs_test.go | 72 +++++++++---------- validation/standard/init_test.go | 18 +++-- validation/superchain-config_test.go | 4 +- validation/validation_test.go | 2 + 42 files changed, 237 insertions(+), 50 deletions(-) create mode 100644 validation/governed-by-optimism_test.go diff --git a/chainList.json b/chainList.json index 2c4b16403..8eeff5e89 100644 --- a/chainList.json +++ b/chainList.json @@ -10,6 +10,7 @@ "https://explorer.optimism.io" ], "superchainLevel": 1, + "governedByOptimism": true, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -27,6 +28,7 @@ "https://explorer.ata.network" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "alt-da", "parent": { "type": "L2", @@ -45,6 +47,7 @@ "https://explorer.base.org" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -62,6 +65,7 @@ "https://cyberscan.co/" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "alt-da", "parent": { "type": "L2", @@ -79,6 +83,7 @@ "https://ernscan.io" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -96,6 +101,7 @@ "https://funki.superscan.network" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "alt-da", "parent": { "type": "L2", @@ -113,6 +119,7 @@ "https://blockscout.lisk.com" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -130,6 +137,7 @@ "https://explorer.lyra.finance" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "alt-da", "parent": { "type": "L2", @@ -147,6 +155,7 @@ "https://explorer.metall2.com" ], "superchainLevel": 0, + "governedByOptimism": true, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -164,6 +173,7 @@ "https://explorer.mode.network" ], "superchainLevel": 0, + "governedByOptimism": true, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -181,6 +191,7 @@ "https://explorer.orderly.network" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "alt-da", "parent": { "type": "L2", @@ -198,6 +209,7 @@ "https://racescan.io/" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -215,6 +227,7 @@ "https://shape-mainnet.explorer.alchemy.com/" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -232,6 +245,7 @@ "https://swanscan.io" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -249,6 +263,7 @@ "https://explorer.swellnetwork.io" ], "superchainLevel": 0, + "governedByOptimism": true, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -266,6 +281,7 @@ "https://explorer.thebinaryholdings.com" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -284,6 +300,7 @@ "https://worldchain-mainnet.explorer.alchemy.com/" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -301,6 +318,7 @@ "https://explorer.zora.energy" ], "superchainLevel": 0, + "governedByOptimism": true, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -318,6 +336,7 @@ "https://sepolia-optimistic.etherscan.io" ], "superchainLevel": 1, + "governedByOptimism": true, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -335,6 +354,7 @@ "https://sepolia-explorer.base.org" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -352,6 +372,7 @@ "https://testnet.cyberscan.co/" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -369,6 +390,7 @@ "https://testnet.ernscan.io" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -386,6 +408,7 @@ "https://sepolia-sandbox.funkichain.com/" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "alt-da", "parent": { "type": "L2", @@ -403,6 +426,7 @@ "https://explorer-sepolia.inkonchain.com" ], "superchainLevel": 0, + "governedByOptimism": true, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -420,6 +444,7 @@ "https://sepolia-blockscout.lisk.com" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -437,6 +462,7 @@ "https://testnet.explorer.metall2.com" ], "superchainLevel": 0, + "governedByOptimism": true, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -454,6 +480,7 @@ "https://soneium-minato.blockscout.com/" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -471,6 +498,7 @@ "https://sepolia.explorer.mode.network" ], "superchainLevel": 0, + "governedByOptimism": true, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -488,6 +516,7 @@ "https://testnet.racescan.io/" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -505,6 +534,7 @@ "https://shape-sepolia.explorer.alchemy.com/" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -522,6 +552,7 @@ "https://explorer.sepolia.thebinaryholdings.com" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -540,6 +571,7 @@ "https://sepolia.uniscan.xyz" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -557,6 +589,7 @@ "https://worldchain-sepolia.explorer.alchemy.com/" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -574,6 +607,7 @@ "https://sepolia.explorer.zora.energy" ], "superchainLevel": 0, + "governedByOptimism": true, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -591,6 +625,7 @@ "" ], "superchainLevel": 0, + "governedByOptimism": false, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", @@ -608,6 +643,7 @@ "" ], "superchainLevel": 0, + "governedByOptimism": true, "dataAvailabilityType": "eth-da", "parent": { "type": "L2", diff --git a/chainList.toml b/chainList.toml index 797c65ca4..b7838b3d8 100644 --- a/chainList.toml +++ b/chainList.toml @@ -5,6 +5,7 @@ rpc = ["https://mainnet.optimism.io"] explorers = ["https://explorer.optimism.io"] superchain_level = 1 + governed_by_optimism = true data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -17,6 +18,7 @@ rpc = ["https://rpc.ata.network"] explorers = ["https://explorer.ata.network"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "alt-da" gas_paying_token = "0xA2120b9e674d3fC3875f415A7DF52e382F141225" [chains.parent] @@ -30,6 +32,7 @@ rpc = ["https://mainnet.base.org"] explorers = ["https://explorer.base.org"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -42,6 +45,7 @@ rpc = ["https://rpc.cyber.co"] explorers = ["https://cyberscan.co/"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "alt-da" [chains.parent] type = "L2" @@ -54,6 +58,7 @@ rpc = ["https://mainnet.ethernitychain.io"] explorers = ["https://ernscan.io"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -66,6 +71,7 @@ rpc = ["https://rpc-mainnet.funkichain.com"] explorers = ["https://funki.superscan.network"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "alt-da" [chains.parent] type = "L2" @@ -78,6 +84,7 @@ rpc = ["https://rpc.api.lisk.com"] explorers = ["https://blockscout.lisk.com"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -90,6 +97,7 @@ rpc = ["https://rpc.lyra.finance"] explorers = ["https://explorer.lyra.finance"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "alt-da" [chains.parent] type = "L2" @@ -102,6 +110,7 @@ rpc = ["https://rpc.metall2.com"] explorers = ["https://explorer.metall2.com"] superchain_level = 0 + governed_by_optimism = true data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -114,6 +123,7 @@ rpc = ["https://mainnet.mode.network"] explorers = ["https://explorer.mode.network"] superchain_level = 0 + governed_by_optimism = true data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -126,6 +136,7 @@ rpc = ["https://rpc.orderly.network"] explorers = ["https://explorer.orderly.network"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "alt-da" [chains.parent] type = "L2" @@ -138,6 +149,7 @@ rpc = ["https://racemainnet.io"] explorers = ["https://racescan.io/"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -150,6 +162,7 @@ rpc = ["https://mainnet.shape.network/"] explorers = ["https://shape-mainnet.explorer.alchemy.com/"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -162,6 +175,7 @@ rpc = ["https://mainnet-rpc.swanchain.org"] explorers = ["https://swanscan.io"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -174,6 +188,7 @@ rpc = ["https://swell-mainnet.alt.technology"] explorers = ["https://explorer.swellnetwork.io"] superchain_level = 0 + governed_by_optimism = true data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -186,6 +201,7 @@ rpc = ["https://rpc.zero.thebinaryholdings.com"] explorers = ["https://explorer.thebinaryholdings.com"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "eth-da" gas_paying_token = "0x04E9D7e336f79Cdab911b06133D3Ca2Cd0721ce3" [chains.parent] @@ -199,6 +215,7 @@ rpc = ["https://worldchain-mainnet.g.alchemy.com/public"] explorers = ["https://worldchain-mainnet.explorer.alchemy.com/"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -211,6 +228,7 @@ rpc = ["https://rpc.zora.energy"] explorers = ["https://explorer.zora.energy"] superchain_level = 0 + governed_by_optimism = true data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -223,6 +241,7 @@ rpc = ["https://sepolia.optimism.io"] explorers = ["https://sepolia-optimistic.etherscan.io"] superchain_level = 1 + governed_by_optimism = true data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -235,6 +254,7 @@ rpc = ["https://sepolia.base.org"] explorers = ["https://sepolia-explorer.base.org"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -247,6 +267,7 @@ rpc = ["https://rpc.testnet.cyber.co"] explorers = ["https://testnet.cyberscan.co/"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -259,6 +280,7 @@ rpc = ["https://testnet.ethernitychain.io"] explorers = ["https://testnet.ernscan.io"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -271,6 +293,7 @@ rpc = ["https://funki-testnet.alt.technology"] explorers = ["https://sepolia-sandbox.funkichain.com/"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "alt-da" [chains.parent] type = "L2" @@ -283,6 +306,7 @@ rpc = ["https://rpc-gel-sepolia.inkonchain.com"] explorers = ["https://explorer-sepolia.inkonchain.com"] superchain_level = 0 + governed_by_optimism = true data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -295,6 +319,7 @@ rpc = ["https://rpc.sepolia-api.lisk.com"] explorers = ["https://sepolia-blockscout.lisk.com"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -307,6 +332,7 @@ rpc = ["https://testnet.rpc.metall2.com"] explorers = ["https://testnet.explorer.metall2.com"] superchain_level = 0 + governed_by_optimism = true data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -319,6 +345,7 @@ rpc = ["https://rpc.minato.soneium.org"] explorers = ["https://soneium-minato.blockscout.com/"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -331,6 +358,7 @@ rpc = ["https://sepolia.mode.network"] explorers = ["https://sepolia.explorer.mode.network"] superchain_level = 0 + governed_by_optimism = true data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -343,6 +371,7 @@ rpc = ["https://racetestnet.io"] explorers = ["https://testnet.racescan.io/"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -355,6 +384,7 @@ rpc = ["https://sepolia.shape.network/"] explorers = ["https://shape-sepolia.explorer.alchemy.com/"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -367,6 +397,7 @@ rpc = ["https://rpc.testnet.thebinaryholdings.com"] explorers = ["https://explorer.sepolia.thebinaryholdings.com"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "eth-da" gas_paying_token = "0x46d878bf7BF62Ec542953CB89Ac0bF58d991181e" [chains.parent] @@ -380,6 +411,7 @@ rpc = ["https://sepolia.unichain.org"] explorers = ["https://sepolia.uniscan.xyz"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -392,6 +424,7 @@ rpc = ["https://worldchain-sepolia.g.alchemy.com/public"] explorers = ["https://worldchain-sepolia.explorer.alchemy.com/"] superchain_level = 0 + governed_by_optimism = false data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -404,6 +437,7 @@ rpc = ["https://sepolia.rpc.zora.energy"] explorers = ["https://sepolia.explorer.zora.energy"] superchain_level = 0 + governed_by_optimism = true data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -416,6 +450,7 @@ rpc = [""] explorers = [""] superchain_level = 0 + governed_by_optimism = false data_availability_type = "eth-da" [chains.parent] type = "L2" @@ -428,6 +463,7 @@ rpc = [""] explorers = [""] superchain_level = 0 + governed_by_optimism = true data_availability_type = "eth-da" [chains.parent] type = "L2" diff --git a/ops/testdata/superchain/configs/sepolia/expected_altda.toml b/ops/testdata/superchain/configs/sepolia/expected_altda.toml index ed480abfc..b197a87cf 100644 --- a/ops/testdata/superchain/configs/sepolia/expected_altda.toml +++ b/ops/testdata/superchain/configs/sepolia/expected_altda.toml @@ -4,6 +4,7 @@ public_rpc = "http://awe.some.rpc" sequencer_rpc = "http://awe.some.seq.rpc" explorer = "https://awesomescan.org" superchain_level = 0 +governed_by_optimism = false standard_chain_candidate = true # This is a temporary field which causes most of the standard validation checks to run on this chain batch_inbox_addr = "0xFf00000000000000000000000000000000042069" canyon_time = 0 # Thu 1 Jan 1970 00:00:00 UTC diff --git a/ops/testdata/superchain/configs/sepolia/expected_baseline.toml b/ops/testdata/superchain/configs/sepolia/expected_baseline.toml index 15db6c364..213e2e5cc 100644 --- a/ops/testdata/superchain/configs/sepolia/expected_baseline.toml +++ b/ops/testdata/superchain/configs/sepolia/expected_baseline.toml @@ -4,6 +4,7 @@ public_rpc = "http://awe.some.rpc" sequencer_rpc = "http://awe.some.seq.rpc" explorer = "https://awesomescan.org" superchain_level = 0 +governed_by_optimism = false batch_inbox_addr = "0xFf00000000000000000000000000000000042069" canyon_time = 0 # Thu 1 Jan 1970 00:00:00 UTC delta_time = 1703203200 # Fri 22 Dec 2023 00:00:00 UTC diff --git a/ops/testdata/superchain/configs/sepolia/expected_baseline_legacy.toml b/ops/testdata/superchain/configs/sepolia/expected_baseline_legacy.toml index f36f29feb..34b15dd03 100644 --- a/ops/testdata/superchain/configs/sepolia/expected_baseline_legacy.toml +++ b/ops/testdata/superchain/configs/sepolia/expected_baseline_legacy.toml @@ -4,6 +4,7 @@ public_rpc = "http://awe.some.rpc" sequencer_rpc = "http://awe.some.seq.rpc" explorer = "https://awesomescan.org" superchain_level = 0 +governed_by_optimism = false batch_inbox_addr = "0xFf00000000000000000000000000000000042069" canyon_time = 0 # Thu 1 Jan 1970 00:00:00 UTC delta_time = 1703203200 # Fri 22 Dec 2023 00:00:00 UTC diff --git a/ops/testdata/superchain/configs/sepolia/expected_faultproofs.toml b/ops/testdata/superchain/configs/sepolia/expected_faultproofs.toml index 1a4090a70..627d69c36 100644 --- a/ops/testdata/superchain/configs/sepolia/expected_faultproofs.toml +++ b/ops/testdata/superchain/configs/sepolia/expected_faultproofs.toml @@ -4,6 +4,7 @@ public_rpc = "http://awe.some.rpc" sequencer_rpc = "http://awe.some.seq.rpc" explorer = "https://awesomescan.org" superchain_level = 0 +governed_by_optimism = false standard_chain_candidate = true # This is a temporary field which causes most of the standard validation checks to run on this chain batch_inbox_addr = "0xFf00000000000000000000000000000011155421" canyon_time = 0 # Thu 1 Jan 1970 00:00:00 UTC diff --git a/ops/testdata/superchain/configs/sepolia/expected_standard-candidate.toml b/ops/testdata/superchain/configs/sepolia/expected_standard-candidate.toml index 8d9af5994..44d563bdb 100644 --- a/ops/testdata/superchain/configs/sepolia/expected_standard-candidate.toml +++ b/ops/testdata/superchain/configs/sepolia/expected_standard-candidate.toml @@ -4,6 +4,7 @@ public_rpc = "http://awe.some.rpc" sequencer_rpc = "http://awe.some.seq.rpc" explorer = "https://awesomescan.org" superchain_level = 0 +governed_by_optimism = false standard_chain_candidate = true # This is a temporary field which causes most of the standard validation checks to run on this chain batch_inbox_addr = "0xFf00000000000000000000000000000000042069" canyon_time = 0 # Thu 1 Jan 1970 00:00:00 UTC diff --git a/ops/testdata/superchain/configs/sepolia/expected_zorasep.toml b/ops/testdata/superchain/configs/sepolia/expected_zorasep.toml index d88bd857c..ce89fda60 100644 --- a/ops/testdata/superchain/configs/sepolia/expected_zorasep.toml +++ b/ops/testdata/superchain/configs/sepolia/expected_zorasep.toml @@ -4,6 +4,7 @@ public_rpc = "http://awe.some.rpc" sequencer_rpc = "http://awe.some.seq.rpc" explorer = "https://awesomescan.org" superchain_level = 0 +governed_by_optimism = false standard_chain_candidate = true # This is a temporary field which causes most of the standard validation checks to run on this chain batch_inbox_addr = "0xCd734290E4bd0200dAC631c7D4b9E8a33234e91f" block_time = 2 diff --git a/superchain/configs/configs.json b/superchain/configs/configs.json index e486022c0..6e2169ef8 100644 --- a/superchain/configs/configs.json +++ b/superchain/configs/configs.json @@ -21,6 +21,7 @@ "SequencerRPC": "https://mainnet-sequencer.optimism.io", "Explorer": "https://explorer.optimism.io", "SuperchainLevel": 1, + "GovernedByOptimism": true, "StandardChainCandidate": false, "SuperchainTime": 0, "batch_inbox_address": "0xFF00000000000000000000000000000000000010", @@ -91,6 +92,7 @@ "SequencerRPC": "https://mainnet.ethernitychain.io", "Explorer": "https://ernscan.io", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": true, "SuperchainTime": 0, "batch_inbox_address": "0xfF00000000000000000000000000000000000183", @@ -161,6 +163,7 @@ "SequencerRPC": "https://sequencer-mainnet.swanchain.org", "Explorer": "https://swanscan.io", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": false, "SuperchainTime": null, "batch_inbox_address": "0xfF00000000000000000000000000000000000254", @@ -223,6 +226,7 @@ "SequencerRPC": "https://rpc.orderly.network", "Explorer": "https://explorer.orderly.network", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": false, "SuperchainTime": 0, "batch_inbox_address": "0x08aA34cC843CeEBcC88A627F18430294aA9780be", @@ -287,6 +291,7 @@ "SequencerRPC": "https://shape-mainnet-sequencer.g.alchemy.com", "Explorer": "https://shape-mainnet.explorer.alchemy.com/", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": true, "SuperchainTime": null, "batch_inbox_address": "0xfF00000000000000000000000000000000000360", @@ -356,6 +361,7 @@ "SequencerRPC": "https://worldchain-mainnet-sequencer.g.alchemy.com", "Explorer": "https://worldchain-mainnet.explorer.alchemy.com/", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": false, "SuperchainTime": null, "batch_inbox_address": "0xff00000000000000000000000000000000000480", @@ -425,6 +431,7 @@ "SequencerRPC": "https://sequencer.bnry.mainnet.zeeve.net", "Explorer": "https://explorer.thebinaryholdings.com", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": false, "SuperchainTime": 1726070401, "batch_inbox_address": "0xFF00000000000000000000000000000000000624", @@ -495,6 +502,7 @@ "SequencerRPC": "https://rpc.lyra.finance", "Explorer": "https://explorer.lyra.finance", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": false, "SuperchainTime": 0, "batch_inbox_address": "0x5f7f7f6DB967F0ef10BdA0678964DBA185d16c50", @@ -559,6 +567,7 @@ "SequencerRPC": "https://rpc.api.lisk.com", "Explorer": "https://blockscout.lisk.com", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": true, "SuperchainTime": 0, "batch_inbox_address": "0xFf00000000000000000000000000000000001135", @@ -625,6 +634,7 @@ "SequencerRPC": "https://rpc.metall2.com", "Explorer": "https://explorer.metall2.com", "SuperchainLevel": 0, + "GovernedByOptimism": true, "StandardChainCandidate": true, "SuperchainTime": 0, "batch_inbox_address": "0xc83f7D9F2D4A76E81145849381ABA02602373723", @@ -689,6 +699,7 @@ "SequencerRPC": "https://swell-mainnet.alt.technology", "Explorer": "https://explorer.swellnetwork.io", "SuperchainLevel": 0, + "GovernedByOptimism": true, "StandardChainCandidate": true, "SuperchainTime": null, "batch_inbox_address": "0x005dE5857e38dFD703a1725c0900E9C6f24cbdE0", @@ -758,6 +769,7 @@ "SequencerRPC": "https://racemainnet.io", "Explorer": "https://racescan.io/", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": false, "SuperchainTime": null, "batch_inbox_address": "0xFF00000000000000000000000000000000006805", @@ -820,6 +832,7 @@ "SequencerRPC": "https://cyber.alt.technology/", "Explorer": "https://cyberscan.co/", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": false, "SuperchainTime": null, "batch_inbox_address": "0xfF00000000000000000000000000000000001d88", @@ -893,6 +906,7 @@ "SequencerRPC": "https://mainnet-sequencer.base.org", "Explorer": "https://explorer.base.org", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": true, "SuperchainTime": 0, "batch_inbox_address": "0xFf00000000000000000000000000000000008453", @@ -964,6 +978,7 @@ "SequencerRPC": "https://rpc-mainnet.funkichain.com", "Explorer": "https://funki.superscan.network", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": false, "SuperchainTime": null, "batch_inbox_address": "0xfF00000000000000000000000000000084BB84Bb", @@ -1039,6 +1054,7 @@ "SequencerRPC": "https://mainnet-sequencer.mode.network", "Explorer": "https://explorer.mode.network", "SuperchainLevel": 0, + "GovernedByOptimism": true, "StandardChainCandidate": true, "SuperchainTime": 0, "batch_inbox_address": "0x24E59d9d3Bd73ccC28Dc54062AF7EF7bFF58Bd67", @@ -1103,6 +1119,7 @@ "SequencerRPC": "https://automata-mainnet.alt.technology/", "Explorer": "https://explorer.ata.network", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": false, "SuperchainTime": null, "batch_inbox_address": "0xff00000000000000000000000000000001111111", @@ -1178,6 +1195,7 @@ "SequencerRPC": "https://rpc.zora.energy", "Explorer": "https://explorer.zora.energy", "SuperchainLevel": 0, + "GovernedByOptimism": true, "StandardChainCandidate": true, "SuperchainTime": 0, "batch_inbox_address": "0x6F54Ca6F6EdE96662024Ffd61BFd18f3f4e34DFf", @@ -1258,6 +1276,7 @@ "SequencerRPC": "https://testnet.ethernitychain.io", "Explorer": "https://testnet.ernscan.io", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": true, "SuperchainTime": 0, "batch_inbox_address": "0xFf00000000000000000000000000000000000233", @@ -1328,6 +1347,7 @@ "SequencerRPC": "https://sequencer.rpc.bnry.testnet.zeeve.net", "Explorer": "https://explorer.sepolia.thebinaryholdings.com", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": false, "SuperchainTime": null, "batch_inbox_address": "0xFf00000000000000000000000000000000042069", @@ -1397,6 +1417,7 @@ "SequencerRPC": "https://sepolia.mode.network", "Explorer": "https://sepolia.explorer.mode.network", "SuperchainLevel": 0, + "GovernedByOptimism": true, "StandardChainCandidate": true, "SuperchainTime": 1703203200, "batch_inbox_address": "0xcDDaE6148dA1E003C230E4527f9baEdc8a204e7E", @@ -1461,6 +1482,7 @@ "SequencerRPC": "https://sepolia-sequencer.unichain.org", "Explorer": "https://sepolia.uniscan.xyz", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": true, "SuperchainTime": 1734559200, "batch_inbox_address": "0xFf00000000000000000000000000000000001301", @@ -1530,6 +1552,7 @@ "SequencerRPC": "https://testnet.rpc.metall2.com", "Explorer": "https://testnet.explorer.metall2.com", "SuperchainLevel": 0, + "GovernedByOptimism": true, "StandardChainCandidate": true, "SuperchainTime": 1708534800, "batch_inbox_address": "0x24567B64a86A4c966655fba6502a93dFb701E316", @@ -1592,6 +1615,7 @@ "SequencerRPC": "https://rpc.minato.soneium.org", "Explorer": "https://soneium-minato.blockscout.com/", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": true, "SuperchainTime": null, "batch_inbox_address": "0x00Ca81E019a5312d404aE7fe8367D30DE4c11365", @@ -1661,6 +1685,7 @@ "SequencerRPC": "https://rpc.sepolia-api.lisk.com", "Explorer": "https://sepolia-blockscout.lisk.com", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": true, "SuperchainTime": null, "batch_inbox_address": "0xff00000000000000000000000000000000004202", @@ -1726,6 +1751,7 @@ "SequencerRPC": "https://worldchain-sepolia-sequencer.g.alchemy.com", "Explorer": "https://worldchain-sepolia.explorer.alchemy.com/", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": false, "SuperchainTime": null, "batch_inbox_address": "0xFf00000000000000000000000000000000484752", @@ -1795,6 +1821,7 @@ "SequencerRPC": "https://racetestnet.io", "Explorer": "https://testnet.racescan.io/", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": false, "SuperchainTime": null, "batch_inbox_address": "0xff00000000000000000000000000000000006806", @@ -1857,6 +1884,7 @@ "SequencerRPC": "https://shape-sepolia-sequencer.g.alchemy.com", "Explorer": "https://shape-sepolia.explorer.alchemy.com/", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": true, "SuperchainTime": null, "batch_inbox_address": "0xFF00000000000000000000000000000000011011", @@ -1926,6 +1954,7 @@ "SequencerRPC": "https://sepolia-sequencer.base.org", "Explorer": "https://sepolia-explorer.base.org", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": true, "SuperchainTime": 0, "batch_inbox_address": "0xfF00000000000000000000000000000000084532", @@ -1996,6 +2025,7 @@ "SequencerRPC": "https://rpc-gel-sepolia.inkonchain.com", "Explorer": "https://explorer-sepolia.inkonchain.com", "SuperchainLevel": 0, + "GovernedByOptimism": true, "StandardChainCandidate": true, "SuperchainTime": 0, "batch_inbox_address": "0x004De1914F4f17aC234f5A5Bc8a4072a231d44BF", @@ -2064,6 +2094,7 @@ "SequencerRPC": "https://funki-testnet.alt.technology", "Explorer": "https://sepolia-sandbox.funkichain.com/", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": false, "SuperchainTime": null, "batch_inbox_address": "0xff000000000000000000000000000000000084bB", @@ -2137,6 +2168,7 @@ "SequencerRPC": "https://sepolia-sequencer.optimism.io", "Explorer": "https://sepolia-optimistic.etherscan.io", "SuperchainLevel": 1, + "GovernedByOptimism": true, "StandardChainCandidate": false, "SuperchainTime": 0, "batch_inbox_address": "0xff00000000000000000000000000000011155420", @@ -2207,6 +2239,7 @@ "SequencerRPC": "https://cyber.alt.technology/", "Explorer": "https://testnet.cyberscan.co/", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": false, "SuperchainTime": null, "batch_inbox_address": "0xFf00000000000000000000000000000000042069", @@ -2272,6 +2305,7 @@ "SequencerRPC": "https://sepolia.rpc.zora.energy", "Explorer": "https://sepolia.explorer.zora.energy", "SuperchainLevel": 0, + "GovernedByOptimism": true, "StandardChainCandidate": true, "SuperchainTime": 0, "batch_inbox_address": "0xCd734290E4bd0200dAC631c7D4b9E8a33234e91f", @@ -2352,6 +2386,7 @@ "SequencerRPC": "", "Explorer": "", "SuperchainLevel": 0, + "GovernedByOptimism": true, "StandardChainCandidate": false, "SuperchainTime": 0, "batch_inbox_address": "0xFf00000000000000000000000000000011155421", @@ -2422,6 +2457,7 @@ "SequencerRPC": "", "Explorer": "", "SuperchainLevel": 0, + "GovernedByOptimism": false, "StandardChainCandidate": false, "SuperchainTime": 1706634000, "batch_inbox_address": "0xfF00000000000000000000000000000011763072", diff --git a/superchain/configs/mainnet/base.toml b/superchain/configs/mainnet/base.toml index 5eed6043e..443ead5e9 100644 --- a/superchain/configs/mainnet/base.toml +++ b/superchain/configs/mainnet/base.toml @@ -4,6 +4,7 @@ public_rpc = "https://mainnet.base.org" sequencer_rpc = "https://mainnet-sequencer.base.org" explorer = "https://explorer.base.org" superchain_level = 0 +governed_by_optimism = false standard_chain_candidate = true # This is a temporary field which causes most of the standard validation checks to run on this chain superchain_time = 0 # Missing hardfork times are inherited from superchain.toml batch_inbox_addr = "0xFf00000000000000000000000000000000008453" diff --git a/superchain/configs/mainnet/ethernity.toml b/superchain/configs/mainnet/ethernity.toml index 8e8d456f5..598b92ac9 100644 --- a/superchain/configs/mainnet/ethernity.toml +++ b/superchain/configs/mainnet/ethernity.toml @@ -4,6 +4,7 @@ public_rpc = "https://mainnet.ethernitychain.io" sequencer_rpc = "https://mainnet.ethernitychain.io" explorer = "https://ernscan.io" superchain_level = 0 +governed_by_optimism = false standard_chain_candidate = true # This is a temporary field which causes most of the standard validation checks to run on this chain batch_inbox_addr = "0xfF00000000000000000000000000000000000183" superchain_time = 0 diff --git a/superchain/configs/mainnet/lisk.toml b/superchain/configs/mainnet/lisk.toml index d4c15d966..bb9a71662 100644 --- a/superchain/configs/mainnet/lisk.toml +++ b/superchain/configs/mainnet/lisk.toml @@ -4,6 +4,7 @@ public_rpc = "https://rpc.api.lisk.com" sequencer_rpc = "https://rpc.api.lisk.com" explorer = "https://blockscout.lisk.com" superchain_level = 0 +governed_by_optimism = false standard_chain_candidate = true # This is a temporary field which causes most of the standard validation checks to run on this chain batch_inbox_addr = "0xFf00000000000000000000000000000000001135" superchain_time = 0 diff --git a/superchain/configs/mainnet/lyra.toml b/superchain/configs/mainnet/lyra.toml index a57efdab6..ed4e5f4e1 100644 --- a/superchain/configs/mainnet/lyra.toml +++ b/superchain/configs/mainnet/lyra.toml @@ -4,6 +4,7 @@ public_rpc = "https://rpc.lyra.finance" sequencer_rpc = "https://rpc.lyra.finance" explorer = "https://explorer.lyra.finance" superchain_level = 0 +governed_by_optimism = false superchain_time = 0 # Missing hardfork times are inherited from superchain.toml batch_inbox_addr = "0x5f7f7f6DB967F0ef10BdA0678964DBA185d16c50" canyon_time = 1704992401 # Thu 11 Jan 2024 17:00:01 UTC diff --git a/superchain/configs/mainnet/metal.toml b/superchain/configs/mainnet/metal.toml index ade5f41b6..02a50e889 100644 --- a/superchain/configs/mainnet/metal.toml +++ b/superchain/configs/mainnet/metal.toml @@ -4,6 +4,7 @@ public_rpc = "https://rpc.metall2.com" sequencer_rpc = "https://rpc.metall2.com" explorer = "https://explorer.metall2.com" superchain_level = 0 +governed_by_optimism = true standard_chain_candidate = true # This is a temporary field which causes most of the standard validation checks to run on this chain superchain_time = 0 # Missing hardfork times are inherited from superchain.toml batch_inbox_addr = "0xc83f7D9F2D4A76E81145849381ABA02602373723" diff --git a/superchain/configs/mainnet/mode.toml b/superchain/configs/mainnet/mode.toml index 9134442b8..cdc5ca023 100644 --- a/superchain/configs/mainnet/mode.toml +++ b/superchain/configs/mainnet/mode.toml @@ -4,6 +4,7 @@ public_rpc = "https://mainnet.mode.network" sequencer_rpc = "https://mainnet-sequencer.mode.network" explorer = "https://explorer.mode.network" superchain_level = 0 +governed_by_optimism = true standard_chain_candidate = true # This is a temporary field which causes most of the standard validation checks to run on this chain superchain_time = 0 # Missing hardfork times are inherited from superchain.toml batch_inbox_addr = "0x24E59d9d3Bd73ccC28Dc54062AF7EF7bFF58Bd67" diff --git a/superchain/configs/mainnet/op.toml b/superchain/configs/mainnet/op.toml index df1638366..23ab88aae 100644 --- a/superchain/configs/mainnet/op.toml +++ b/superchain/configs/mainnet/op.toml @@ -4,6 +4,7 @@ public_rpc = "https://mainnet.optimism.io" sequencer_rpc = "https://mainnet-sequencer.optimism.io" explorer = "https://explorer.optimism.io" superchain_level = 1 +governed_by_optimism = true superchain_time = 0 # Missing hardfork times are inherited from superchain.toml batch_inbox_addr = "0xFF00000000000000000000000000000000000010" canyon_time = 1704992401 # Thu 11 Jan 2024 17:00:01 UTC diff --git a/superchain/configs/mainnet/orderly.toml b/superchain/configs/mainnet/orderly.toml index 31543df88..ed089e6e0 100644 --- a/superchain/configs/mainnet/orderly.toml +++ b/superchain/configs/mainnet/orderly.toml @@ -4,6 +4,7 @@ public_rpc = "https://rpc.orderly.network" sequencer_rpc = "https://rpc.orderly.network" explorer = "https://explorer.orderly.network" superchain_level = 0 +governed_by_optimism = false superchain_time = 0 # Missing hardfork times are inherited from superchain.toml batch_inbox_addr = "0x08aA34cC843CeEBcC88A627F18430294aA9780be" canyon_time = 1704992401 # Thu 11 Jan 2024 17:00:01 UTC diff --git a/superchain/configs/mainnet/shape.toml b/superchain/configs/mainnet/shape.toml index 5dfc27952..5000dbbfd 100644 --- a/superchain/configs/mainnet/shape.toml +++ b/superchain/configs/mainnet/shape.toml @@ -4,6 +4,7 @@ public_rpc = "https://mainnet.shape.network/" sequencer_rpc = "https://shape-mainnet-sequencer.g.alchemy.com" explorer = "https://shape-mainnet.explorer.alchemy.com/" superchain_level = 0 +governed_by_optimism = false standard_chain_candidate = true # This is a temporary field which causes most of the standard validation checks to run on this chain batch_inbox_addr = "0xfF00000000000000000000000000000000000360" canyon_time = 0 # Thu 1 Jan 1970 00:00:00 UTC diff --git a/superchain/configs/mainnet/swell.toml b/superchain/configs/mainnet/swell.toml index ad1fc857d..963da5b61 100644 --- a/superchain/configs/mainnet/swell.toml +++ b/superchain/configs/mainnet/swell.toml @@ -4,6 +4,7 @@ public_rpc = "https://swell-mainnet.alt.technology" sequencer_rpc = "https://swell-mainnet.alt.technology" explorer = "https://explorer.swellnetwork.io" superchain_level = 0 +governed_by_optimism = true standard_chain_candidate = true # This is a temporary field which causes most of the standard validation checks to run on this chain batch_inbox_addr = "0x005dE5857e38dFD703a1725c0900E9C6f24cbdE0" canyon_time = 0 # Thu 1 Jan 1970 00:00:00 UTC diff --git a/superchain/configs/mainnet/zora.toml b/superchain/configs/mainnet/zora.toml index 1bcf47c71..8727dd055 100644 --- a/superchain/configs/mainnet/zora.toml +++ b/superchain/configs/mainnet/zora.toml @@ -4,6 +4,7 @@ public_rpc = "https://rpc.zora.energy" sequencer_rpc = "https://rpc.zora.energy" explorer = "https://explorer.zora.energy" superchain_level = 0 +governed_by_optimism = true standard_chain_candidate = true # This is a temporary field which causes most of the standard validation checks to run on this chain superchain_time = 0 # Missing hardfork times are inherited from superchain.toml batch_inbox_addr = "0x6F54Ca6F6EdE96662024Ffd61BFd18f3f4e34DFf" diff --git a/superchain/configs/sepolia-dev-0/base-devnet-0.toml b/superchain/configs/sepolia-dev-0/base-devnet-0.toml index 8fa3cc67d..34a37f0fc 100644 --- a/superchain/configs/sepolia-dev-0/base-devnet-0.toml +++ b/superchain/configs/sepolia-dev-0/base-devnet-0.toml @@ -4,6 +4,7 @@ public_rpc = "" sequencer_rpc = "" explorer = "" superchain_level = 0 +governed_by_optimism = false superchain_time = 1706634000 # Tue 30 Jan 2024 17:00:00 UTC batch_inbox_addr = "0xfF00000000000000000000000000000011763072" canyon_time = 1698436800 # Fri 27 Oct 2023 20:00:00 UTC diff --git a/superchain/configs/sepolia-dev-0/oplabs-devnet-0.toml b/superchain/configs/sepolia-dev-0/oplabs-devnet-0.toml index aac2c2306..f2833a5f1 100644 --- a/superchain/configs/sepolia-dev-0/oplabs-devnet-0.toml +++ b/superchain/configs/sepolia-dev-0/oplabs-devnet-0.toml @@ -4,6 +4,7 @@ public_rpc = "" sequencer_rpc = "" explorer = "" superchain_level = 0 +governed_by_optimism = true superchain_time = 0 # Missing hardfork times are inherited from superchain.toml batch_inbox_addr = "0xFf00000000000000000000000000000011155421" canyon_time = 0 # Thu 1 Jan 1970 00:00:00 UTC diff --git a/superchain/configs/sepolia/base.toml b/superchain/configs/sepolia/base.toml index 244f5b1a0..b6b2ae05b 100644 --- a/superchain/configs/sepolia/base.toml +++ b/superchain/configs/sepolia/base.toml @@ -4,6 +4,7 @@ public_rpc = "https://sepolia.base.org" sequencer_rpc = "https://sepolia-sequencer.base.org" explorer = "https://sepolia-explorer.base.org" superchain_level = 0 +governed_by_optimism = false standard_chain_candidate = true # This is a temporary field which causes most of the standard validation checks to run on this chain superchain_time = 0 # Missing hardfork times are inherited from superchain.toml batch_inbox_addr = "0xfF00000000000000000000000000000000084532" diff --git a/superchain/configs/sepolia/ethernity.toml b/superchain/configs/sepolia/ethernity.toml index 5f8c2097e..3e4ab5e0c 100644 --- a/superchain/configs/sepolia/ethernity.toml +++ b/superchain/configs/sepolia/ethernity.toml @@ -4,6 +4,7 @@ public_rpc = "https://testnet.ethernitychain.io" sequencer_rpc = "https://testnet.ethernitychain.io" explorer = "https://testnet.ernscan.io" superchain_level = 0 +governed_by_optimism = false standard_chain_candidate = true # This is a temporary field which causes most of the standard validation checks to run on this chain batch_inbox_addr = "0xFf00000000000000000000000000000000000233" superchain_time = 0 diff --git a/superchain/configs/sepolia/ink.toml b/superchain/configs/sepolia/ink.toml index e32beede3..5554c6217 100644 --- a/superchain/configs/sepolia/ink.toml +++ b/superchain/configs/sepolia/ink.toml @@ -4,6 +4,7 @@ public_rpc = "https://rpc-gel-sepolia.inkonchain.com" sequencer_rpc = "https://rpc-gel-sepolia.inkonchain.com" explorer = "https://explorer-sepolia.inkonchain.com" superchain_level = 0 +governed_by_optimism = true standard_chain_candidate = true # This is a temporary field which causes most of the standard validation checks to run on this chain superchain_time = 0 # Missing hardfork times are inherited from superchain.toml batch_inbox_addr = "0x004De1914F4f17aC234f5A5Bc8a4072a231d44BF" diff --git a/superchain/configs/sepolia/lisk.toml b/superchain/configs/sepolia/lisk.toml index e13c3b99a..b4c04b5fb 100644 --- a/superchain/configs/sepolia/lisk.toml +++ b/superchain/configs/sepolia/lisk.toml @@ -4,6 +4,7 @@ public_rpc = "https://rpc.sepolia-api.lisk.com" sequencer_rpc = "https://rpc.sepolia-api.lisk.com" explorer = "https://sepolia-blockscout.lisk.com" superchain_level = 0 +governed_by_optimism = false standard_chain_candidate = true # This is a temporary field which causes most of the standard validation checks to run on this chain batch_inbox_addr = "0xff00000000000000000000000000000000004202" canyon_time = 1705312994 # Mon 15 Jan 2024 10:03:14 UTC diff --git a/superchain/configs/sepolia/metal.toml b/superchain/configs/sepolia/metal.toml index 6a387b466..441dc2459 100644 --- a/superchain/configs/sepolia/metal.toml +++ b/superchain/configs/sepolia/metal.toml @@ -4,6 +4,7 @@ public_rpc = "https://testnet.rpc.metall2.com" sequencer_rpc = "https://testnet.rpc.metall2.com" explorer = "https://testnet.explorer.metall2.com" superchain_level = 0 +governed_by_optimism = true standard_chain_candidate = true # This is a temporary field which causes most of the standard validation checks to run on this chain batch_inbox_addr = "0x24567B64a86A4c966655fba6502a93dFb701E316" canyon_time = 1708129622 # Sat Feb 17 00:27:02 UTC 2024 - 2s after Genesis diff --git a/superchain/configs/sepolia/minato.toml b/superchain/configs/sepolia/minato.toml index 05905754e..625c91279 100644 --- a/superchain/configs/sepolia/minato.toml +++ b/superchain/configs/sepolia/minato.toml @@ -4,6 +4,7 @@ public_rpc = "https://rpc.minato.soneium.org" sequencer_rpc = "https://rpc.minato.soneium.org" explorer = "https://soneium-minato.blockscout.com/" superchain_level = 0 +governed_by_optimism = false standard_chain_candidate = true # This is a temporary field which causes most of the standard validation checks to run on this chain batch_inbox_addr = "0x00Ca81E019a5312d404aE7fe8367D30DE4c11365" canyon_time = 0 # Thu 1 Jan 1970 00:00:00 UTC diff --git a/superchain/configs/sepolia/mode.toml b/superchain/configs/sepolia/mode.toml index f096295e3..2e2e9591e 100644 --- a/superchain/configs/sepolia/mode.toml +++ b/superchain/configs/sepolia/mode.toml @@ -4,6 +4,7 @@ public_rpc = "https://sepolia.mode.network" sequencer_rpc = "https://sepolia.mode.network" explorer = "https://sepolia.explorer.mode.network" superchain_level = 0 +governed_by_optimism = true standard_chain_candidate = true # This is a temporary field which causes most of the standard validation checks to run on this chain superchain_time = 1703203200 # Fri 22 Dec 2023 00:00:00 UTC batch_inbox_addr = "0xcDDaE6148dA1E003C230E4527f9baEdc8a204e7E" diff --git a/superchain/configs/sepolia/op.toml b/superchain/configs/sepolia/op.toml index 8a76abe0a..947146d60 100644 --- a/superchain/configs/sepolia/op.toml +++ b/superchain/configs/sepolia/op.toml @@ -4,6 +4,7 @@ public_rpc = "https://sepolia.optimism.io" sequencer_rpc = "https://sepolia-sequencer.optimism.io" explorer = "https://sepolia-optimistic.etherscan.io" superchain_level = 1 +governed_by_optimism = true superchain_time = 0 # Missing hardfork times are inherited from superchain.toml batch_inbox_addr = "0xff00000000000000000000000000000011155420" canyon_time = 1699981200 # Tue 14 Nov 2023 17:00:00 UTC diff --git a/superchain/configs/sepolia/shape.toml b/superchain/configs/sepolia/shape.toml index df6cbcbd6..7307ba827 100644 --- a/superchain/configs/sepolia/shape.toml +++ b/superchain/configs/sepolia/shape.toml @@ -4,6 +4,7 @@ public_rpc = "https://sepolia.shape.network/" sequencer_rpc = "https://shape-sepolia-sequencer.g.alchemy.com" explorer = "https://shape-sepolia.explorer.alchemy.com/" superchain_level = 0 +governed_by_optimism = false standard_chain_candidate = true # This is a temporary field which causes most of the standard validation checks to run on this chain batch_inbox_addr = "0xFF00000000000000000000000000000000011011" canyon_time = 0 # Thu 1 Jan 1970 00:00:00 UTC diff --git a/superchain/configs/sepolia/unichain.toml b/superchain/configs/sepolia/unichain.toml index aa3d6f440..e70b8faea 100644 --- a/superchain/configs/sepolia/unichain.toml +++ b/superchain/configs/sepolia/unichain.toml @@ -4,6 +4,7 @@ public_rpc = "https://sepolia.unichain.org" sequencer_rpc = "https://sepolia-sequencer.unichain.org" explorer = "https://sepolia.uniscan.xyz" superchain_level = 0 +governed_by_optimism = false standard_chain_candidate = true # This is a temporary field which causes most of the standard validation checks to run on this chain superchain_time = 1734559200 # Wed Dec 18 22:00:00 UTC 2024 batch_inbox_addr = "0xFf00000000000000000000000000000000001301" diff --git a/superchain/configs/sepolia/zora.toml b/superchain/configs/sepolia/zora.toml index e5daae856..10bf319f0 100644 --- a/superchain/configs/sepolia/zora.toml +++ b/superchain/configs/sepolia/zora.toml @@ -4,6 +4,7 @@ public_rpc = "https://sepolia.rpc.zora.energy" sequencer_rpc = "https://sepolia.rpc.zora.energy" explorer = "https://sepolia.explorer.zora.energy" superchain_level = 0 +governed_by_optimism = true standard_chain_candidate = true # This is a temporary field which causes most of the standard validation checks to run on this chain superchain_time = 0 # Missing hardfork times are inherited from superchain.toml batch_inbox_addr = "0xCd734290E4bd0200dAC631c7D4b9E8a33234e91f" diff --git a/superchain/internal/codegen/main.go b/superchain/internal/codegen/main.go index 7b791a937..924a2f6cf 100644 --- a/superchain/internal/codegen/main.go +++ b/superchain/internal/codegen/main.go @@ -22,6 +22,7 @@ type ChainEntry struct { RPC []string `json:"rpc" toml:"rpc"` Explorer []string `json:"explorers" toml:"explorers"` SuperchainLevel uint `json:"superchainLevel" toml:"superchain_level"` + GovernedByOptimism bool `json:"governedByOptimism" toml:"governed_by_optimism"` DataAvailabilityType string `json:"dataAvailabilityType" toml:"data_availability_type"` Parent Parent `json:"parent" toml:"parent"` GasPayingToken *Address `json:"gasPayingToken,omitempty" toml:"gas_paying_token,omitempty"` @@ -56,6 +57,7 @@ func main() { RPC: []string{chain.PublicRPC}, Explorer: []string{chain.Explorer}, SuperchainLevel: uint(chain.SuperchainLevel), + GovernedByOptimism: chain.GovernedByOptimism, DataAvailabilityType: string(chain.DataAvailabilityType), Parent: Parent{"L2", chain.Superchain, []string{}}, GasPayingToken: chain.GasPayingToken, diff --git a/superchain/superchain.go b/superchain/superchain.go index de87559d6..6c8e90f5b 100644 --- a/superchain/superchain.go +++ b/superchain/superchain.go @@ -85,7 +85,8 @@ type ChainConfig struct { SequencerRPC string `toml:"sequencer_rpc"` Explorer string `toml:"explorer"` - SuperchainLevel SuperchainLevel `toml:"superchain_level"` + SuperchainLevel SuperchainLevel `toml:"superchain_level"` + GovernedByOptimism bool `toml:"governed_by_optimism"` // If StandardChainCandidate is true, standard chain validation checks will // run on this chain even if it is a frontier chain. diff --git a/validation/README.md b/validation/README.md index abb6affef..b7b1d663e 100644 --- a/validation/README.md +++ b/validation/README.md @@ -1,4 +1,4 @@ # validation This directory contains the golang validation checks that chains run against. -The [validation_test.go](validation/validation_test.go) file is the entry point of the tests. It runs a different set of tests for each class of chain (Frontier, Standard Candidate and Standard). \ No newline at end of file +The [validation_test.go](validation/validation_test.go) file is the entry point of the tests. It runs a different set of tests for each class of chain (Frontier, Standard Candidate and Standard). diff --git a/validation/exclusions_test.go b/validation/exclusions_test.go index 972118baa..53bdfd720 100644 --- a/validation/exclusions_test.go +++ b/validation/exclusions_test.go @@ -46,7 +46,10 @@ var exclusions = map[string]map[uint64]bool{ 11155421: true, // sepolia-dev-0/oplabs-devnet-0 Not in https://github.com/ethereum-lists/chains 11763072: true, // sepolia-dev-0/base-devnet-0 Not in https://github.com/ethereum-lists/chains }, - + GovernedByOptimismTest: { + 11155421: true, // sepolia-dev-0/oplabs-devnet-0 No standard superchain config for sepolia-dev-0 + 11763072: true, // sepolia-dev-0/base-devnet-0 No standard superchain config for sepolia-dev-0 + }, // Standard Checks OptimismPortal2ParamsTest: { 11763072: true, // sepolia-dev0/base-devnet-0 diff --git a/validation/governed-by-optimism_test.go b/validation/governed-by-optimism_test.go new file mode 100644 index 000000000..29110fba9 --- /dev/null +++ b/validation/governed-by-optimism_test.go @@ -0,0 +1,41 @@ +package validation + +import ( + "fmt" + "testing" + + . "github.com/ethereum-optimism/superchain-registry/superchain" + "github.com/ethereum-optimism/superchain-registry/validation/standard" + + "github.com/stretchr/testify/require" +) + +func testGovernedByOptimism(t *testing.T, chain *ChainConfig) { + chainID := chain.ChainID + superchain := OPChains[chainID].Superchain + + superchainRoleConfig := standard.Config.MultisigRoles[superchain] + + if superchainRoleConfig == nil { + t.Errorf("No role configuration found for superchain '%s'!", superchain) + return + } + + optimismMultisig := superchainRoleConfig.KeyHandover.L1.Universal["ProxyAdmin"]["owner()"] + + makeMsg := func(governed bool) string { + var notString string + if !governed { + notString = "not " + } + return fmt.Sprintf("Chains %susing Optimism governance must %shave their ProxyAdminOwner set to the Optimism multisig", notString, notString) + } + + paoAddress := chain.Addresses.ProxyAdminOwner.String() + + if chain.GovernedByOptimism == true { + require.Equal(t, optimismMultisig, paoAddress, makeMsg(true)) + } else { + require.NotEqual(t, optimismMultisig, paoAddress, makeMsg(false)) + } +} diff --git a/validation/security-configs_test.go b/validation/security-configs_test.go index 4d773534c..0755d4849 100644 --- a/validation/security-configs_test.go +++ b/validation/security-configs_test.go @@ -17,31 +17,45 @@ import ( "github.com/stretchr/testify/require" ) -var checkResolutions = func(t *testing.T, r standard.Resolutions, chainID uint64, client *ethclient.Client) { - for contract, methodToOutput := range r { +func getAddressFromConfig(chainID uint64, contractName string) (Address, error) { + if common.IsHexAddress(contractName) { + return Address(common.HexToAddress(contractName)), nil + } - var contractAddress Address - var err error + contractAddress, err := Addresses[chainID].AddressFor(contractName) - if common.IsHexAddress(contract) { - contractAddress = Address(common.HexToAddress(contract)) - } else { - contractAddress, err = Addresses[chainID].AddressFor(contract) - require.NoError(t, err) - } + return contractAddress, err +} - for method, output := range methodToOutput { +func getAddressFromChain(method string, contractAddress Address, client *ethclient.Client) (Address, error) { + addr := (common.Address(contractAddress)) + callMsg := ethereum.CallMsg{ + To: &addr, + Data: crypto.Keccak256([]byte(method))[:4], + } - var want Address + // Make the call + callContract := func(msg ethereum.CallMsg) ([]byte, error) { + return client.CallContract(context.Background(), msg, nil) + } + result, err := Retry(callContract)(callMsg) + if err != nil { + return Address{}, err + } - if common.IsHexAddress(output) { - want = Address(common.HexToAddress(output)) - } else { - want, err = Addresses[chainID].AddressFor(output) - require.NoError(t, err) - } + return Address(common.BytesToAddress(result)), nil +} + +var checkResolutions = func(t *testing.T, r standard.Resolutions, chainID uint64, client *ethclient.Client) { + for contract, methodToOutput := range r { + contractAddress, err := getAddressFromConfig(chainID, contract) + require.NoError(t, err) + + for method, output := range methodToOutput { + want, err := getAddressFromConfig(chainID, output) + require.NoError(t, err) - got, err := getAddress(method, contractAddress, client) + got, err := getAddressFromChain(method, contractAddress, client) require.NoErrorf(t, err, "problem calling %s.%s (%s)", contract, method, contractAddress) // Use t.Errorf here for a concise output of failures, since failure info is sent to a slack channel @@ -49,7 +63,6 @@ var checkResolutions = func(t *testing.T, r standard.Resolutions, chainID uint64 t.Errorf("%s.%s = %s, expected %s (%s)", contract, method, got, want, output) } } - } } @@ -104,25 +117,6 @@ func testL2SecurityConfig(t *testing.T, chain *ChainConfig) { checkResolutions(t, standard.Config.Roles.L2.Universal, chain.ChainID, client) } -func getAddress(method string, contractAddress Address, client *ethclient.Client) (Address, error) { - addr := (common.Address(contractAddress)) - callMsg := ethereum.CallMsg{ - To: &addr, - Data: crypto.Keccak256([]byte(method))[:4], - } - - // Make the call - callContract := func(msg ethereum.CallMsg) ([]byte, error) { - return client.CallContract(context.Background(), msg, nil) - } - result, err := Retry(callContract)(callMsg) - if err != nil { - return Address{}, err - } - - return Address(common.BytesToAddress(result)), nil -} - func getMappingValue(contractAddress Address, mapSlot uint8, key Address, client *ethclient.Client) ([]byte, error) { preimage := make([]byte, 12, 64) preimage = append(preimage, key[:]...) diff --git a/validation/standard/init_test.go b/validation/standard/init_test.go index 7051a54d5..70fc1379e 100644 --- a/validation/standard/init_test.go +++ b/validation/standard/init_test.go @@ -28,18 +28,24 @@ func TestConfigInitialization(t *testing.T) { require.NotNil(t, Config.MultisigRoles, "Config.MultisigRoles should not be nil") // Check individual network configurations - networks := []string{"mainnet", "sepolia"} - for _, network := range networks { + for network, params := range Config.Params { t.Run(fmt.Sprintf("Params[%s]", network), func(t *testing.T) { // Ensure network Params are populated - require.NotNil(t, Config.Params[network], "Config.Params[%s] should not be nil", network) - require.NoError(t, Config.Params[network].Check(), "Config.Params[%s] has invalid zero value", network) + require.NotNil(t, params, "Config.Params[%s] should not be nil", network) + require.NoError(t, params.Check(), "Config.Params[%s] has invalid zero value", network) }) t.Run(fmt.Sprintf("MultisigRoles[%s]", network), func(t *testing.T) { + roles := Config.MultisigRoles[network] + // Ensure network MultisigRoles are populated - require.NotNil(t, Config.MultisigRoles[network], "Config.MultisigRoles[%s] should not be nil", network) - require.NotZero(t, Config.MultisigRoles[network], "Config.MultisigRoles[%s] should not be zero value", network) + require.NotNil(t, roles, "Config.MultisigRoles[%s] should not be nil", network) + + require.NotZero(t, roles, "Config.MultisigRoles[%s] should not be zero value", network) + + l1Roles := roles.KeyHandover.L1.Universal + require.NotNil(t, l1Roles, "Config.MultisigRoles[%s].KeyHandover.L1.Universal must be present", network) + require.NotEmpty(t, l1Roles["ProxyAdmin"]["owner()"], "Config.MultisigRoles[%s].ProxyAdmin.\"owner()\" must be set", network) }) t.Run(fmt.Sprintf("NetworkVersions[%s]", network), func(t *testing.T) { diff --git a/validation/superchain-config_test.go b/validation/superchain-config_test.go index bc6ab5d5a..2da762da4 100644 --- a/validation/superchain-config_test.go +++ b/validation/superchain-config_test.go @@ -29,7 +29,7 @@ func testSuperchainConfig(t *testing.T, chain *ChainConfig) { // DelayedWETHProxy uses a different method name, so it is broken out here delayedWETHAddress := Addresses[chain.ChainID].DelayedWETHProxy - got, err := getAddress("config()", delayedWETHAddress, client) + got, err := getAddressFromChain("config()", delayedWETHAddress, client) require.NoError(t, err) if *expected != got { t.Errorf("incorrect config() address: got %s, wanted %s (queried %s)", got, expected, delayedWETHAddress) @@ -37,7 +37,7 @@ func testSuperchainConfig(t *testing.T, chain *ChainConfig) { } func checkSuperchainConfig(t *testing.T, client *ethclient.Client, targetContract Address, expected Address) { - got, err := getAddress("superchainConfig()", targetContract, client) + got, err := getAddressFromChain("superchainConfig()", targetContract, client) require.NoError(t, err) if expected != got { diff --git a/validation/validation_test.go b/validation/validation_test.go index f66cb209c..5dcac98d7 100644 --- a/validation/validation_test.go +++ b/validation/validation_test.go @@ -14,6 +14,7 @@ const ( UniquenessTest = "Uniqueness" ChainIDRPCTest = "ChainID_RPC" OptimismConfigTest = "Optimism_Config" + GovernedByOptimismTest = "Governed_By_Optimism" RollupConfigTest = "Rollup_Config" GasTokenTest = "Gas_Token" ResourceConfigTest = "Resource_Config" @@ -80,6 +81,7 @@ func testUniversal(t *testing.T, chain *ChainConfig) { t.Run(UniquenessTest, applyExclusions(chain, testIsGloballyUnique)) t.Run(ChainIDRPCTest, applyExclusions(chain, testChainIDFromRPC)) t.Run(OptimismConfigTest, applyExclusions(chain, testOptimismConfig)) + t.Run(GovernedByOptimismTest, applyExclusions(chain, testGovernedByOptimism)) } // testStandardCandidate applies to Standard and Standard Candidate Chains.