diff --git a/validation/standard/standard-config-params-mainnet.toml b/validation/standard/config/networks/mainnet/standard-config-params-mainnet.toml similarity index 100% rename from validation/standard/standard-config-params-mainnet.toml rename to validation/standard/config/networks/mainnet/standard-config-params-mainnet.toml diff --git a/validation/standard/standard-config-roles-mainnet.toml b/validation/standard/config/networks/mainnet/standard-config-roles-mainnet.toml similarity index 100% rename from validation/standard/standard-config-roles-mainnet.toml rename to validation/standard/config/networks/mainnet/standard-config-roles-mainnet.toml diff --git a/validation/standard/standard-versions-mainnet.toml b/validation/standard/config/networks/mainnet/standard-versions-mainnet.toml similarity index 100% rename from validation/standard/standard-versions-mainnet.toml rename to validation/standard/config/networks/mainnet/standard-versions-mainnet.toml diff --git a/validation/standard/standard-config-params-sepolia.toml b/validation/standard/config/networks/sepolia-dev-0/standard-config-params-sepolia-dev-0.toml similarity index 100% rename from validation/standard/standard-config-params-sepolia.toml rename to validation/standard/config/networks/sepolia-dev-0/standard-config-params-sepolia-dev-0.toml diff --git a/validation/standard/config/networks/sepolia-dev-0/standard-config-roles-sepolia-dev-0.toml b/validation/standard/config/networks/sepolia-dev-0/standard-config-roles-sepolia-dev-0.toml new file mode 100644 index 000000000..b6cbe47b8 --- /dev/null +++ b/validation/standard/config/networks/sepolia-dev-0/standard-config-roles-sepolia-dev-0.toml @@ -0,0 +1,16 @@ +[l1.nonFaultProofs] +OptimismPortalProxy."guardian()" = "0x8c20c40180751d93E939DDDee3517AE0d1EBeAd2" +L2OutputOracleProxy."challenger()" = "0x8c20c40180751d93E939DDDee3517AE0d1EBeAd2" + +[l1.FaultProofs] +OptimismPortalProxy."guardian()" = "0x8c20c40180751d93E939DDDee3517AE0d1EBeAd2" +PermissionedDisputeGame."challenger()" = "0x8c20c40180751d93E939DDDee3517AE0d1EBeAd2" + +[key-handover.l1.universal] +# This is a 2/2 Safe between the Optimism Foundation and the Security Council +ProxyAdmin."owner()" = "0x4377BB0F0103992b31eC12b4d796a8687B8dC8E9" + +[key-handover.l2] +# This is the ALIASED address of the L1 2/2 Safe between the Optimism Foundation and the Security Council. +# To compute the aliased address, add 0x1111000000000000000000000000000000001111 +0x4200000000000000000000000000000000000018."owner()" = "0x2FC3ffc903729a0f03966b917003800B145F67F3" diff --git a/validation/standard/standard-versions-sepolia.toml b/validation/standard/config/networks/sepolia-dev-0/standard-versions-sepolia-dev-0.toml similarity index 100% rename from validation/standard/standard-versions-sepolia.toml rename to validation/standard/config/networks/sepolia-dev-0/standard-versions-sepolia-dev-0.toml diff --git a/validation/standard/config/networks/sepolia/standard-config-params-sepolia.toml b/validation/standard/config/networks/sepolia/standard-config-params-sepolia.toml new file mode 100644 index 000000000..3168c6a18 --- /dev/null +++ b/validation/standard/config/networks/sepolia/standard-config-params-sepolia.toml @@ -0,0 +1,31 @@ +# Standard Chain Config Parameters +[rollup_config] +# alt_da must be nil +seq_window_size = [3600, 3600] +block_time = [1, 2] + +[optimism_portal_2] +proof_maturity_delay_seconds = [604800, 604800] # 7 days +dispute_game_finality_delay_seconds = [302400, 302400] # 2.5 days +respected_game_type = 0 + +[resource_config] +max_resource_limit = 20000000 +elasticity_multiplier = 10 +base_fee_max_change_denominator = 8 +minimum_base_fee = 1000000000 +system_tx_max_gas = 1000000 +maximum_base_fee = "340_282_366_920_938_463_463_374_607_431_768_211_455" + +[gas_price_oracle.pre-ecotone] +decimals = [6, 6] +overhead = [188, 2_100] +scalar = [684_000, 1_000_000] + +[gas_price_oracle.ecotone] +decimals = [6, 6] +blob_base_fee_scalar = [0, 10_000_000] +base_fee_scalar = [0, 10_000_000] + +[system_config] +gas_limit = [1000, 60_000_000] diff --git a/validation/standard/standard-config-roles-sepolia.toml b/validation/standard/config/networks/sepolia/standard-config-roles-sepolia.toml similarity index 100% rename from validation/standard/standard-config-roles-sepolia.toml rename to validation/standard/config/networks/sepolia/standard-config-roles-sepolia.toml diff --git a/validation/standard/config/networks/sepolia/standard-versions-sepolia.toml b/validation/standard/config/networks/sepolia/standard-versions-sepolia.toml new file mode 100644 index 000000000..bc649ca7d --- /dev/null +++ b/validation/standard/config/networks/sepolia/standard-versions-sepolia.toml @@ -0,0 +1,42 @@ +[releases] + +# Contracts which are +# * unproxied singletons: specify a standard "address" +# * proxied : specify a standard "implementation_address" +# * neither : specify neither a standard "address" nor "implementation_address" + +# Holocene https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.8.0-rc.3 +[releases."op-contracts/v1.8.0-rc.3"] +# Updated in this release +system_config = { version = "2.3.0", implementation_address = "0x33b83E4C305c908B2Fc181dDa36e230213058d7d" } # UPDATED IN THIS RELEASE +fault_dispute_game = { version = "1.3.1" } # UPDATED IN THIS RELEASE +permissioned_dispute_game = { version = "1.3.1" } # UPDATED IN THIS RELEASE +mips = { version = "1.2.1", address = "0x69470D6970Cd2A006b84B1d4d70179c892cFCE01" } # UPDATED IN THIS RELEASE +# Unchanged in this release +optimism_portal = { version = "3.10.0", implementation_address = "0x35028bae87d71cbc192d545d38f960ba30b4b233" } +anchor_state_registry = { version = "2.0.0" } +delayed_weth = { version = "1.1.0", implementation_address = "0x07f69b19532476c6cd03056d6bc3f1b110ab7538" } +dispute_game_factory = { version = "1.0.0", implementation_address = "0xa51bea7e4d34206c0bcb04a776292f2f19f0beec" } +preimage_oracle = { version = "1.1.2", address = "0x92240135b46fc1142dA181f550aE8f595B858854" } +l1_cross_domain_messenger = { version = "2.3.0", implementation_address = "0xD3494713A5cfaD3F5359379DfA074E2Ac8C6Fd65" } +l1_erc721_bridge = { version = "2.1.0", implementation_address = "0xae2af01232a6c4a4d3012c5ec5b1b35059caf10d" } +l1_standard_bridge = { version = "2.1.0", implementation_address = "0x64b5a5ed26dcb17370ff4d33a8d503f0fbd06cff" } +# l2_output_oracle -- This contract not used in fault proofs +optimism_mintable_erc20_factory = { version = "1.9.0", implementation_address = "0xe01efbeb1089d1d1db9c6c8b135c934c0734c846" } + +# Fault Proofs https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.6.0 +[releases."op-contracts/v1.6.0"] +optimism_portal = { version = "3.10.0", implementation_address = "0x35028bae87d71cbc192d545d38f960ba30b4b233" } +system_config = { version = "2.2.0", implementation_address = "0xCcdd86d581e40fb5a1C77582247BC493b6c8B169" } +anchor_state_registry = { version = "2.0.0" } +delayed_weth = { version = "1.1.0", implementation_address = "0x07f69b19532476c6cd03056d6bc3f1b110ab7538" } +dispute_game_factory = { version = "1.0.0", implementation_address = "0xa51bea7e4d34206c0bcb04a776292f2f19f0beec" } +fault_dispute_game = { version = "1.3.0" } +permissioned_dispute_game = { version = "1.3.0" } +mips = { version = "1.1.0", address = "0x47B0E34C1054009e696BaBAAd56165e1e994144d" } +preimage_oracle = { version = "1.1.2", address = "0x92240135b46fc1142dA181f550aE8f595B858854" } +l1_cross_domain_messenger = { version = "2.3.0", implementation_address = "0xD3494713A5cfaD3F5359379DfA074E2Ac8C6Fd65" } +l1_erc721_bridge = { version = "2.1.0", implementation_address = "0xae2af01232a6c4a4d3012c5ec5b1b35059caf10d" } +l1_standard_bridge = { version = "2.1.0", implementation_address = "0x64b5a5ed26dcb17370ff4d33a8d503f0fbd06cff" } +# l2_output_oracle -- This contract not used in fault proofs +optimism_mintable_erc20_factory = { version = "1.9.0", implementation_address = "0xe01efbeb1089d1d1db9c6c8b135c934c0734c846" } diff --git a/validation/standard/standard-bytecodes.toml b/validation/standard/config/standard-bytecodes.toml similarity index 100% rename from validation/standard/standard-bytecodes.toml rename to validation/standard/config/standard-bytecodes.toml diff --git a/validation/standard/standard-config-roles-universal.toml b/validation/standard/config/standard-config-roles-universal.toml similarity index 100% rename from validation/standard/standard-config-roles-universal.toml rename to validation/standard/config/standard-config-roles-universal.toml diff --git a/validation/standard/standard-immutables.toml b/validation/standard/config/standard-immutables.toml similarity index 100% rename from validation/standard/standard-immutables.toml rename to validation/standard/config/standard-immutables.toml diff --git a/validation/standard/standard-releases.toml b/validation/standard/config/standard-releases.toml similarity index 100% rename from validation/standard/standard-releases.toml rename to validation/standard/config/standard-releases.toml diff --git a/validation/standard/init.go b/validation/standard/init.go index c7a441037..cdba5fbed 100644 --- a/validation/standard/init.go +++ b/validation/standard/init.go @@ -2,14 +2,15 @@ package standard import ( "embed" + "fmt" "io/fs" "github.com/BurntSushi/toml" "github.com/ethereum-optimism/superchain-registry/superchain" ) -//go:embed *.toml -var standardConfigFile embed.FS +//go:embed config +var standardConfigFS embed.FS func init() { Config = ConfigType{ @@ -20,19 +21,31 @@ func init() { decodeTOMLFileIntoConfig("standard-config-roles-universal.toml", Config.Roles) - networks := []string{"mainnet", "sepolia"} - for _, network := range networks { + networkDirName := "networks" + networks, err := standardConfigFS.ReadDir("config/" + networkDirName) + if err != nil { + panic(fmt.Errorf("failed to read dir: %w", err)) + } + + // iterate over network entries + for _, networkDir := range networks { + if !networkDir.IsDir() { + continue // ignore files, e.g. a readme + } + + network := networkDir.Name() + Config.MultisigRoles[network] = new(MultisigRoles) - decodeTOMLFileIntoConfig("standard-config-roles-"+network+".toml", Config.MultisigRoles[network]) + decodeTOMLFileIntoConfig(networkDirName+"/"+network+"/standard-config-roles-"+network+".toml", Config.MultisigRoles[network]) Config.Params[network] = new(Params) - decodeTOMLFileIntoConfig("standard-config-params-"+network+".toml", Config.Params[network]) + decodeTOMLFileIntoConfig(networkDirName+"/"+network+"/standard-config-params-"+network+".toml", Config.Params[network]) var versions VersionTags = VersionTags{ Releases: make(map[Tag]superchain.ContractVersions, 0), } - decodeTOMLFileIntoConfig("standard-versions-"+network+".toml", &versions) + decodeTOMLFileIntoConfig(networkDirName+"/"+network+"/standard-versions-"+network+".toml", &versions) NetworkVersions[network] = versions } @@ -53,7 +66,7 @@ func init() { func decodeTOMLFileIntoConfig[ T any](filename string, config *T) { - data, err := fs.ReadFile(standardConfigFile, filename) + data, err := fs.ReadFile(standardConfigFS, "config/"+filename) if err != nil { panic(err) }