From 87a4db33152c61a564d5b0e8b727ca96eb0a10b6 Mon Sep 17 00:00:00 2001 From: inphi Date: Fri, 13 Dec 2024 10:27:02 -0500 Subject: [PATCH 1/5] Update dispute game contracts for oplabs-devnet-0 and op-sepolia --- superchain/configs/configs.json | 14 ++++++++------ .../configs/sepolia-dev-0/oplabs-devnet-0.toml | 7 ++++--- superchain/configs/sepolia/op.toml | 7 ++++--- superchain/extra/addresses/addresses.json | 14 ++++++++------ superchain/superchain.go | 16 +++++++++------- validation/fault_game_params_test.go | 8 ++++++++ 6 files changed, 41 insertions(+), 25 deletions(-) diff --git a/superchain/configs/configs.json b/superchain/configs/configs.json index 991b1031c..435e550f1 100644 --- a/superchain/configs/configs.json +++ b/superchain/configs/configs.json @@ -2285,15 +2285,16 @@ "Challenger": "0xfd1D2e729aE8eEe2E146c033bf4400fE75284301", "DelayedWETHProxy": "0xcdFdC692a53B4aE9F81E0aEBd26107Da4a71dB84", "DisputeGameFactoryProxy": "0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1", - "FaultDisputeGame": "0xD9d616E4a03a8e7cC962396C9f8D4e3d306097D3", + "FaultDisputeGame": "0x924D3d3B3b16E74bAb577e50d23b2a38990dD52C", "Guardian": "0x7a50f00e8D05b95F98fE38d8BeE366a7324dCf7E", "L1CrossDomainMessengerProxy": "0x58Cc85b8D04EA49cC6DBd3CbFFd00B4B8D6cb3ef", "L1ERC721BridgeProxy": "0xd83e03D576d23C9AEab8cC44Fa98d058D2176D1f", "L1StandardBridgeProxy": "0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1", - "MIPS": "0x47B0E34C1054009e696BaBAAd56165e1e994144d", + "MIPS": "0xa1e470B6bD25e8EEA9FFCdA6a1518BE5eb8eE7bb", "OptimismMintableERC20FactoryProxy": "0x868D59fF9710159C2B330Cc0fBDF57144dD7A13b", "OptimismPortalProxy": "0x16Fc5058F25648194471939df75CF27A2fdC48BC", - "PermissionedDisputeGame": "0x98E3F752c7224F8322Afa935a4CaEC3832bB25c9", + "PermissionedDelayedWETHProxy": "0x67A2907A05E1F3A5a8fB49cD2dfA8537459Ce078", + "PermissionedDisputeGame": "0x879e899523bA9a4Ab212a2d70cF1af73B906CbE5", "PreimageOracle": "0x92240135b46fc1142dA181f550aE8f595B858854", "Proposer": "0x49277EE36A024120Ee218127354c4a3591dc90A9", "ProxyAdmin": "0x189aBAAaa82DfC015A588A7dbaD6F13b1D3485Bc", @@ -2503,15 +2504,16 @@ "Challenger": "0x8c20c40180751d93E939DDDee3517AE0d1EBeAd2", "DelayedWETHProxy": "0xE99696a028171e31a72828A196C27c2Dd670E1aa", "DisputeGameFactoryProxy": "0x2419423C72998eb1c6c15A235de2f112f8E38efF", - "FaultDisputeGame": "0x54416A2E28E8cbC761fbce0C7f107307991282e5", + "FaultDisputeGame": "0x030aca4aea0CF48BD53dca03b34e35D05B9635C7", "Guardian": "0x8c20c40180751d93E939DDDee3517AE0d1EBeAd2", "L1CrossDomainMessengerProxy": "0x18e72C15FEE4e995454b919EfaA61D8f116F82dd", "L1ERC721BridgeProxy": "0x1bb726658E039E8a9A4ac21A41fE5a0704760461", "L1StandardBridgeProxy": "0x6D8bC564EF04AaF355a10c3eb9b00e349dd077ea", - "MIPS": "0xceDE5949A189aC60F41F1385a86DBce7Bd3B1943", + "MIPS": "0x2B82752b3809A6B7f1662536aF72c519000610e3", "OptimismMintableERC20FactoryProxy": "0xA16b8db3b5Cdbaf75158F34034B0537e528E17e2", "OptimismPortalProxy": "0x76114bd29dFcC7a9892240D317E6c7C2A281Ffc6", - "PermissionedDisputeGame": "0x50573970b291726B881b204eD9F3c1D507e504cD", + "PermissionedDelayedWETHProxy": "0x81B05Ce22EC8E79078d58df7DE44957bD3C93125", + "PermissionedDisputeGame": "0x4001542871a610A551b11DCAaeA52dC5CA6FDB6a", "PreimageOracle": "0xB73342DdD69620e5Ab2Cc604Dad46434C2338025", "Proposer": "0x95014c45078354Ff839f14192228108Eac82E00A", "ProxyAdmin": "0x18d890A46A3556e7F36f28C79F6157BC7a59f867", diff --git a/superchain/configs/sepolia-dev-0/oplabs-devnet-0.toml b/superchain/configs/sepolia-dev-0/oplabs-devnet-0.toml index f2833a5f1..b840cf89d 100644 --- a/superchain/configs/sepolia-dev-0/oplabs-devnet-0.toml +++ b/superchain/configs/sepolia-dev-0/oplabs-devnet-0.toml @@ -53,8 +53,9 @@ data_availability_type = "eth-da" ProxyAdmin = "0x18d890A46A3556e7F36f28C79F6157BC7a59f867" AnchorStateRegistryProxy = "0x03b82AE60989863BCEb0BbD442A70568e5AefB85" DelayedWETHProxy = "0xE99696a028171e31a72828A196C27c2Dd670E1aa" + PermissionedDelayedWETHProxy = "0x81B05Ce22EC8E79078d58df7DE44957bD3C93125" DisputeGameFactoryProxy = "0x2419423C72998eb1c6c15A235de2f112f8E38efF" - FaultDisputeGame = "0x54416A2E28E8cbC761fbce0C7f107307991282e5" - MIPS = "0xceDE5949A189aC60F41F1385a86DBce7Bd3B1943" - PermissionedDisputeGame = "0x50573970b291726B881b204eD9F3c1D507e504cD" + FaultDisputeGame = "0x030aca4aea0CF48BD53dca03b34e35D05B9635C7" + MIPS = "0x2B82752b3809A6B7f1662536aF72c519000610e3" + PermissionedDisputeGame = "0x4001542871a610A551b11DCAaeA52dC5CA6FDB6a" PreimageOracle = "0xB73342DdD69620e5Ab2Cc604Dad46434C2338025" diff --git a/superchain/configs/sepolia/op.toml b/superchain/configs/sepolia/op.toml index 947146d60..d2af287b4 100644 --- a/superchain/configs/sepolia/op.toml +++ b/superchain/configs/sepolia/op.toml @@ -53,8 +53,9 @@ data_availability_type = "eth-da" ProxyAdmin = "0x189aBAAaa82DfC015A588A7dbaD6F13b1D3485Bc" AnchorStateRegistryProxy = "0x218CD9489199F321E1177b56385d333c5B598629" DelayedWETHProxy = "0xcdFdC692a53B4aE9F81E0aEBd26107Da4a71dB84" + PermissionedDelayedWETHProxy = "0x67A2907A05E1F3A5a8fB49cD2dfA8537459Ce078" DisputeGameFactoryProxy = "0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1" - FaultDisputeGame = "0xD9d616E4a03a8e7cC962396C9f8D4e3d306097D3" - MIPS = "0x47B0E34C1054009e696BaBAAd56165e1e994144d" - PermissionedDisputeGame = "0x98E3F752c7224F8322Afa935a4CaEC3832bB25c9" + FaultDisputeGame = "0x924D3d3B3b16E74bAb577e50d23b2a38990dD52C" + MIPS = "0xa1e470B6bD25e8EEA9FFCdA6a1518BE5eb8eE7bb" + PermissionedDisputeGame = "0x879e899523bA9a4Ab212a2d70cF1af73B906CbE5" PreimageOracle = "0x92240135b46fc1142dA181f550aE8f595B858854" diff --git a/superchain/extra/addresses/addresses.json b/superchain/extra/addresses/addresses.json index 11817e93c..b9119df22 100644 --- a/superchain/extra/addresses/addresses.json +++ b/superchain/extra/addresses/addresses.json @@ -54,15 +54,16 @@ "Challenger": "0xfd1D2e729aE8eEe2E146c033bf4400fE75284301", "DelayedWETHProxy": "0xcdFdC692a53B4aE9F81E0aEBd26107Da4a71dB84", "DisputeGameFactoryProxy": "0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1", - "FaultDisputeGame": "0xD9d616E4a03a8e7cC962396C9f8D4e3d306097D3", + "FaultDisputeGame": "0x924D3d3B3b16E74bAb577e50d23b2a38990dD52C", "Guardian": "0x7a50f00e8D05b95F98fE38d8BeE366a7324dCf7E", "L1CrossDomainMessengerProxy": "0x58Cc85b8D04EA49cC6DBd3CbFFd00B4B8D6cb3ef", "L1ERC721BridgeProxy": "0xd83e03D576d23C9AEab8cC44Fa98d058D2176D1f", "L1StandardBridgeProxy": "0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1", - "MIPS": "0x47B0E34C1054009e696BaBAAd56165e1e994144d", + "MIPS": "0xa1e470B6bD25e8EEA9FFCdA6a1518BE5eb8eE7bb", "OptimismMintableERC20FactoryProxy": "0x868D59fF9710159C2B330Cc0fBDF57144dD7A13b", "OptimismPortalProxy": "0x16Fc5058F25648194471939df75CF27A2fdC48BC", - "PermissionedDisputeGame": "0x98E3F752c7224F8322Afa935a4CaEC3832bB25c9", + "PermissionedDelayedWETHProxy": "0x67A2907A05E1F3A5a8fB49cD2dfA8537459Ce078", + "PermissionedDisputeGame": "0x879e899523bA9a4Ab212a2d70cF1af73B906CbE5", "PreimageOracle": "0x92240135b46fc1142dA181f550aE8f595B858854", "Proposer": "0x49277EE36A024120Ee218127354c4a3591dc90A9", "ProxyAdmin": "0x189aBAAaa82DfC015A588A7dbaD6F13b1D3485Bc", @@ -78,15 +79,16 @@ "Challenger": "0x8c20c40180751d93E939DDDee3517AE0d1EBeAd2", "DelayedWETHProxy": "0xE99696a028171e31a72828A196C27c2Dd670E1aa", "DisputeGameFactoryProxy": "0x2419423C72998eb1c6c15A235de2f112f8E38efF", - "FaultDisputeGame": "0x54416A2E28E8cbC761fbce0C7f107307991282e5", + "FaultDisputeGame": "0x030aca4aea0CF48BD53dca03b34e35D05B9635C7", "Guardian": "0x8c20c40180751d93E939DDDee3517AE0d1EBeAd2", "L1CrossDomainMessengerProxy": "0x18e72C15FEE4e995454b919EfaA61D8f116F82dd", "L1ERC721BridgeProxy": "0x1bb726658E039E8a9A4ac21A41fE5a0704760461", "L1StandardBridgeProxy": "0x6D8bC564EF04AaF355a10c3eb9b00e349dd077ea", - "MIPS": "0xceDE5949A189aC60F41F1385a86DBce7Bd3B1943", + "MIPS": "0x2B82752b3809A6B7f1662536aF72c519000610e3", "OptimismMintableERC20FactoryProxy": "0xA16b8db3b5Cdbaf75158F34034B0537e528E17e2", "OptimismPortalProxy": "0x76114bd29dFcC7a9892240D317E6c7C2A281Ffc6", - "PermissionedDisputeGame": "0x50573970b291726B881b204eD9F3c1D507e504cD", + "PermissionedDelayedWETHProxy": "0x81B05Ce22EC8E79078d58df7DE44957bD3C93125", + "PermissionedDisputeGame": "0x4001542871a610A551b11DCAaeA52dC5CA6FDB6a", "PreimageOracle": "0xB73342DdD69620e5Ab2Cc604Dad46434C2338025", "Proposer": "0x95014c45078354Ff839f14192228108Eac82E00A", "ProxyAdmin": "0x18d890A46A3556e7F36f28C79F6157BC7a59f867", diff --git a/superchain/superchain.go b/superchain/superchain.go index 8c85fe873..dd35b0a08 100644 --- a/superchain/superchain.go +++ b/superchain/superchain.go @@ -301,13 +301,14 @@ type AddressList struct { SuperchainConfig Address `json:"SuperchainConfig,omitempty" toml:"SuperchainConfig,omitempty"` // Fault Proof contracts: - AnchorStateRegistryProxy Address `json:"AnchorStateRegistryProxy,omitempty" toml:"AnchorStateRegistryProxy,omitempty"` - DelayedWETHProxy Address `json:"DelayedWETHProxy,omitempty" toml:"DelayedWETHProxy,omitempty"` - DisputeGameFactoryProxy Address `json:"DisputeGameFactoryProxy,omitempty" toml:"DisputeGameFactoryProxy,omitempty"` - FaultDisputeGame Address `json:"FaultDisputeGame,omitempty" toml:"FaultDisputeGame,omitempty"` - MIPS Address `json:"MIPS,omitempty" toml:"MIPS,omitempty"` - PermissionedDisputeGame Address `json:"PermissionedDisputeGame,omitempty" toml:"PermissionedDisputeGame,omitempty"` - PreimageOracle Address `json:"PreimageOracle,omitempty" toml:"PreimageOracle,omitempty"` + AnchorStateRegistryProxy Address `json:"AnchorStateRegistryProxy,omitempty" toml:"AnchorStateRegistryProxy,omitempty"` + DelayedWETHProxy Address `json:"DelayedWETHProxy,omitempty" toml:"DelayedWETHProxy,omitempty"` + PermissionedDelayedWETHProxy Address `json:"PermissionedDelayedWETHProxy,omitempty" toml:"PermissionedDelayedWETHProxy,omitempty"` + DisputeGameFactoryProxy Address `json:"DisputeGameFactoryProxy,omitempty" toml:"DisputeGameFactoryProxy,omitempty"` + FaultDisputeGame Address `json:"FaultDisputeGame,omitempty" toml:"FaultDisputeGame,omitempty"` + MIPS Address `json:"MIPS,omitempty" toml:"MIPS,omitempty"` + PermissionedDisputeGame Address `json:"PermissionedDisputeGame,omitempty" toml:"PermissionedDisputeGame,omitempty"` + PreimageOracle Address `json:"PreimageOracle,omitempty" toml:"PreimageOracle,omitempty"` // AltDA contracts: DAChallengeAddress Address `json:"DAChallengeAddress,omitempty" toml:"DAChallengeAddress,omitempty"` @@ -354,6 +355,7 @@ type MappedContractProperties[T string | VersionedContract] struct { // Fault Proof contracts: AnchorStateRegistry T `toml:"anchor_state_registry,omitempty"` DelayedWETH T `toml:"delayed_weth,omitempty"` + PermissionedDelayedWETH T `toml:"permissioned_delayed_weth,omitempty"` DisputeGameFactory T `toml:"dispute_game_factory,omitempty"` FaultDisputeGame T `toml:"fault_dispute_game,omitempty"` MIPS T `toml:"mips,omitempty"` diff --git a/validation/fault_game_params_test.go b/validation/fault_game_params_test.go index 867b27edc..11b846f2c 100644 --- a/validation/fault_game_params_test.go +++ b/validation/fault_game_params_test.go @@ -31,6 +31,9 @@ func testFaultGameParams(t *testing.T, chain *ChainConfig) { delayedWethAddr, err := Addresses[chain.ChainID].AddressFor("DelayedWETHProxy") require.NoError(t, err) + permissionedDelayedWethAddr, err := Addresses[chain.ChainID].AddressFor("PermissionedDelayedWETHProxy") + require.NoError(t, err) + optimismPortalAddr, err := Addresses[chain.ChainID].AddressFor("OptimismPortalProxy") require.NoError(t, err) @@ -83,6 +86,11 @@ func testFaultGameParams(t *testing.T, chain *ChainConfig) { wethDelay, err := CastCall(delayedWethAddr, "delay()", nil, rpcEndpoint) require.NoError(t, err) require.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000093a80", wethDelay[0], "DelayedWETH: bond withdrawal delay") // 604800 sec = 7 days + + // PermissionedDelayedWETH + pwethDelay, err := CastCall(permissionedDelayedWethAddr, "delay()", nil, rpcEndpoint) + require.NoError(t, err) + require.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000093a80", pwethDelay[0], "PermissionedDelayedWETH: bond withdrawal delay") // 604800 sec = 7 days } func findOpProgramRelease(t *testing.T, hash string, superchain string) bool { From 7a0df43eeca877d1ec519701a7a46798f653dad5 Mon Sep 17 00:00:00 2001 From: inphi Date: Wed, 18 Dec 2024 16:06:49 -0500 Subject: [PATCH 2/5] add MIPS64 address config --- superchain/configs/configs.json | 4 ++-- superchain/configs/sepolia-dev-0/oplabs-devnet-0.toml | 3 ++- superchain/configs/sepolia/op.toml | 3 ++- superchain/extra/addresses/addresses.json | 4 ++-- superchain/superchain.go | 2 ++ 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/superchain/configs/configs.json b/superchain/configs/configs.json index 435e550f1..04932630c 100644 --- a/superchain/configs/configs.json +++ b/superchain/configs/configs.json @@ -2290,7 +2290,7 @@ "L1CrossDomainMessengerProxy": "0x58Cc85b8D04EA49cC6DBd3CbFFd00B4B8D6cb3ef", "L1ERC721BridgeProxy": "0xd83e03D576d23C9AEab8cC44Fa98d058D2176D1f", "L1StandardBridgeProxy": "0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1", - "MIPS": "0xa1e470B6bD25e8EEA9FFCdA6a1518BE5eb8eE7bb", + "MIPS": "0x47B0E34C1054009e696BaBAAd56165e1e994144d", "OptimismMintableERC20FactoryProxy": "0x868D59fF9710159C2B330Cc0fBDF57144dD7A13b", "OptimismPortalProxy": "0x16Fc5058F25648194471939df75CF27A2fdC48BC", "PermissionedDelayedWETHProxy": "0x67A2907A05E1F3A5a8fB49cD2dfA8537459Ce078", @@ -2509,7 +2509,7 @@ "L1CrossDomainMessengerProxy": "0x18e72C15FEE4e995454b919EfaA61D8f116F82dd", "L1ERC721BridgeProxy": "0x1bb726658E039E8a9A4ac21A41fE5a0704760461", "L1StandardBridgeProxy": "0x6D8bC564EF04AaF355a10c3eb9b00e349dd077ea", - "MIPS": "0x2B82752b3809A6B7f1662536aF72c519000610e3", + "MIPS": "0xceDE5949A189aC60F41F1385a86DBce7Bd3B1943", "OptimismMintableERC20FactoryProxy": "0xA16b8db3b5Cdbaf75158F34034B0537e528E17e2", "OptimismPortalProxy": "0x76114bd29dFcC7a9892240D317E6c7C2A281Ffc6", "PermissionedDelayedWETHProxy": "0x81B05Ce22EC8E79078d58df7DE44957bD3C93125", diff --git a/superchain/configs/sepolia-dev-0/oplabs-devnet-0.toml b/superchain/configs/sepolia-dev-0/oplabs-devnet-0.toml index b840cf89d..b6fd8cfe1 100644 --- a/superchain/configs/sepolia-dev-0/oplabs-devnet-0.toml +++ b/superchain/configs/sepolia-dev-0/oplabs-devnet-0.toml @@ -56,6 +56,7 @@ data_availability_type = "eth-da" PermissionedDelayedWETHProxy = "0x81B05Ce22EC8E79078d58df7DE44957bD3C93125" DisputeGameFactoryProxy = "0x2419423C72998eb1c6c15A235de2f112f8E38efF" FaultDisputeGame = "0x030aca4aea0CF48BD53dca03b34e35D05B9635C7" - MIPS = "0x2B82752b3809A6B7f1662536aF72c519000610e3" + MIPS = "0xceDE5949A189aC60F41F1385a86DBce7Bd3B1943" + MIPS64 = "0x2B82752b3809A6B7f1662536aF72c519000610e3" PermissionedDisputeGame = "0x4001542871a610A551b11DCAaeA52dC5CA6FDB6a" PreimageOracle = "0xB73342DdD69620e5Ab2Cc604Dad46434C2338025" diff --git a/superchain/configs/sepolia/op.toml b/superchain/configs/sepolia/op.toml index d2af287b4..a5947e759 100644 --- a/superchain/configs/sepolia/op.toml +++ b/superchain/configs/sepolia/op.toml @@ -56,6 +56,7 @@ data_availability_type = "eth-da" PermissionedDelayedWETHProxy = "0x67A2907A05E1F3A5a8fB49cD2dfA8537459Ce078" DisputeGameFactoryProxy = "0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1" FaultDisputeGame = "0x924D3d3B3b16E74bAb577e50d23b2a38990dD52C" - MIPS = "0xa1e470B6bD25e8EEA9FFCdA6a1518BE5eb8eE7bb" + MIPS = "0x47B0E34C1054009e696BaBAAd56165e1e994144d" + MIPS64 = "0xa1e470B6bD25e8EEA9FFCdA6a1518BE5eb8eE7bb" PermissionedDisputeGame = "0x879e899523bA9a4Ab212a2d70cF1af73B906CbE5" PreimageOracle = "0x92240135b46fc1142dA181f550aE8f595B858854" diff --git a/superchain/extra/addresses/addresses.json b/superchain/extra/addresses/addresses.json index b9119df22..29c1b132b 100644 --- a/superchain/extra/addresses/addresses.json +++ b/superchain/extra/addresses/addresses.json @@ -59,7 +59,7 @@ "L1CrossDomainMessengerProxy": "0x58Cc85b8D04EA49cC6DBd3CbFFd00B4B8D6cb3ef", "L1ERC721BridgeProxy": "0xd83e03D576d23C9AEab8cC44Fa98d058D2176D1f", "L1StandardBridgeProxy": "0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1", - "MIPS": "0xa1e470B6bD25e8EEA9FFCdA6a1518BE5eb8eE7bb", + "MIPS": "0x47B0E34C1054009e696BaBAAd56165e1e994144d", "OptimismMintableERC20FactoryProxy": "0x868D59fF9710159C2B330Cc0fBDF57144dD7A13b", "OptimismPortalProxy": "0x16Fc5058F25648194471939df75CF27A2fdC48BC", "PermissionedDelayedWETHProxy": "0x67A2907A05E1F3A5a8fB49cD2dfA8537459Ce078", @@ -84,7 +84,7 @@ "L1CrossDomainMessengerProxy": "0x18e72C15FEE4e995454b919EfaA61D8f116F82dd", "L1ERC721BridgeProxy": "0x1bb726658E039E8a9A4ac21A41fE5a0704760461", "L1StandardBridgeProxy": "0x6D8bC564EF04AaF355a10c3eb9b00e349dd077ea", - "MIPS": "0x2B82752b3809A6B7f1662536aF72c519000610e3", + "MIPS": "0xceDE5949A189aC60F41F1385a86DBce7Bd3B1943", "OptimismMintableERC20FactoryProxy": "0xA16b8db3b5Cdbaf75158F34034B0537e528E17e2", "OptimismPortalProxy": "0x76114bd29dFcC7a9892240D317E6c7C2A281Ffc6", "PermissionedDelayedWETHProxy": "0x81B05Ce22EC8E79078d58df7DE44957bD3C93125", diff --git a/superchain/superchain.go b/superchain/superchain.go index dd35b0a08..7cfe56a28 100644 --- a/superchain/superchain.go +++ b/superchain/superchain.go @@ -307,6 +307,7 @@ type AddressList struct { DisputeGameFactoryProxy Address `json:"DisputeGameFactoryProxy,omitempty" toml:"DisputeGameFactoryProxy,omitempty"` FaultDisputeGame Address `json:"FaultDisputeGame,omitempty" toml:"FaultDisputeGame,omitempty"` MIPS Address `json:"MIPS,omitempty" toml:"MIPS,omitempty"` + MIPS64 Address `json:"MIPS64,omitempty" toml:"MIPS64,omitempty"` PermissionedDisputeGame Address `json:"PermissionedDisputeGame,omitempty" toml:"PermissionedDisputeGame,omitempty"` PreimageOracle Address `json:"PreimageOracle,omitempty" toml:"PreimageOracle,omitempty"` @@ -359,6 +360,7 @@ type MappedContractProperties[T string | VersionedContract] struct { DisputeGameFactory T `toml:"dispute_game_factory,omitempty"` FaultDisputeGame T `toml:"fault_dispute_game,omitempty"` MIPS T `toml:"mips,omitempty"` + MIPS64 T `toml:"mips64,omitempty"` PermissionedDisputeGame T `toml:"permissioned_dispute_game,omitempty"` PreimageOracle T `toml:"preimage_oracle,omitempty"` CannonFaultDisputeGame T `toml:"cannon_fault_dispute_game,omitempty"` From ef6bf773ee9aad39e111028a097cd2f7d26fcef1 Mon Sep 17 00:00:00 2001 From: inphi Date: Wed, 18 Dec 2024 16:41:40 -0500 Subject: [PATCH 3/5] codegen --- superchain/configs/configs.json | 2 ++ superchain/extra/addresses/addresses.json | 2 ++ 2 files changed, 4 insertions(+) diff --git a/superchain/configs/configs.json b/superchain/configs/configs.json index 04932630c..289a89693 100644 --- a/superchain/configs/configs.json +++ b/superchain/configs/configs.json @@ -2291,6 +2291,7 @@ "L1ERC721BridgeProxy": "0xd83e03D576d23C9AEab8cC44Fa98d058D2176D1f", "L1StandardBridgeProxy": "0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1", "MIPS": "0x47B0E34C1054009e696BaBAAd56165e1e994144d", + "MIPS64": "0xa1e470B6bD25e8EEA9FFCdA6a1518BE5eb8eE7bb", "OptimismMintableERC20FactoryProxy": "0x868D59fF9710159C2B330Cc0fBDF57144dD7A13b", "OptimismPortalProxy": "0x16Fc5058F25648194471939df75CF27A2fdC48BC", "PermissionedDelayedWETHProxy": "0x67A2907A05E1F3A5a8fB49cD2dfA8537459Ce078", @@ -2510,6 +2511,7 @@ "L1ERC721BridgeProxy": "0x1bb726658E039E8a9A4ac21A41fE5a0704760461", "L1StandardBridgeProxy": "0x6D8bC564EF04AaF355a10c3eb9b00e349dd077ea", "MIPS": "0xceDE5949A189aC60F41F1385a86DBce7Bd3B1943", + "MIPS64": "0x2B82752b3809A6B7f1662536aF72c519000610e3", "OptimismMintableERC20FactoryProxy": "0xA16b8db3b5Cdbaf75158F34034B0537e528E17e2", "OptimismPortalProxy": "0x76114bd29dFcC7a9892240D317E6c7C2A281Ffc6", "PermissionedDelayedWETHProxy": "0x81B05Ce22EC8E79078d58df7DE44957bD3C93125", diff --git a/superchain/extra/addresses/addresses.json b/superchain/extra/addresses/addresses.json index 29c1b132b..e0477fb21 100644 --- a/superchain/extra/addresses/addresses.json +++ b/superchain/extra/addresses/addresses.json @@ -60,6 +60,7 @@ "L1ERC721BridgeProxy": "0xd83e03D576d23C9AEab8cC44Fa98d058D2176D1f", "L1StandardBridgeProxy": "0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1", "MIPS": "0x47B0E34C1054009e696BaBAAd56165e1e994144d", + "MIPS64": "0xa1e470B6bD25e8EEA9FFCdA6a1518BE5eb8eE7bb", "OptimismMintableERC20FactoryProxy": "0x868D59fF9710159C2B330Cc0fBDF57144dD7A13b", "OptimismPortalProxy": "0x16Fc5058F25648194471939df75CF27A2fdC48BC", "PermissionedDelayedWETHProxy": "0x67A2907A05E1F3A5a8fB49cD2dfA8537459Ce078", @@ -85,6 +86,7 @@ "L1ERC721BridgeProxy": "0x1bb726658E039E8a9A4ac21A41fE5a0704760461", "L1StandardBridgeProxy": "0x6D8bC564EF04AaF355a10c3eb9b00e349dd077ea", "MIPS": "0xceDE5949A189aC60F41F1385a86DBce7Bd3B1943", + "MIPS64": "0x2B82752b3809A6B7f1662536aF72c519000610e3", "OptimismMintableERC20FactoryProxy": "0xA16b8db3b5Cdbaf75158F34034B0537e528E17e2", "OptimismPortalProxy": "0x76114bd29dFcC7a9892240D317E6c7C2A281Ffc6", "PermissionedDelayedWETHProxy": "0x81B05Ce22EC8E79078d58df7DE44957bD3C93125", From 9e4ad4df6ba73116d812cd6aad4221db6a925a23 Mon Sep 17 00:00:00 2001 From: inphi Date: Wed, 18 Dec 2024 17:25:32 -0500 Subject: [PATCH 4/5] avoid checking absolute prestate on testnet/mips64 --- validation/fault_game_params_test.go | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/validation/fault_game_params_test.go b/validation/fault_game_params_test.go index 11b846f2c..b119d3c5b 100644 --- a/validation/fault_game_params_test.go +++ b/validation/fault_game_params_test.go @@ -69,9 +69,20 @@ func testFaultGameParams(t *testing.T, chain *ChainConfig) { require.NoError(t, err) require.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000002a30", clockExtension[0], "PermissionedDisputeGame: game clock extension") // 10800 sec = 3 hours - absolutePrestate, err := CastCall(permissionedDisputeGameAddr, "absolutePrestate()", nil, rpcEndpoint) - require.NoError(t, err) - require.Truef(t, findOpProgramRelease(t, absolutePrestate[0], chain.Superchain), "onchain op-program prestate hash is not from a standard version: %v", absolutePrestate[0]) + vm, err := CastCall(permissionedDisputeGameAddr, "vm()(address)", nil, rpcEndpoint) + require.NoError(t, err) + isMainnet := chain.Superchain == "mainnet" + mips64Address, err := Addresses[chain.ChainID].AddressFor("MIPS64") + vmAddress := MustHexToAddress(vm[0]) + isMips64 := vmAddress == mips64Address + // TODO: This is a temporary workaround to avoid checking the absolute prestate on testnets + // The prestates registry cannot disambiguate between MIPS and MIPS64 prestates for the same op-program release. + // This limitation is temporary as once the superchain is upgraded to MIPS64, all op-program prestate releases will implicitly be MIPS64 prestates. + if isMainnet || !isMips64 { + absolutePrestate, err := CastCall(permissionedDisputeGameAddr, "absolutePrestate()", nil, rpcEndpoint) + require.NoError(t, err) + require.Truef(t, findOpProgramRelease(t, absolutePrestate[0], chain.Superchain), "onchain op-program prestate hash is not from a standard version: %v", absolutePrestate[0]) + } // PreimageOracle challengePeriod, err := CastCall(preimageOracleAddr, "challengePeriod()", nil, rpcEndpoint) From 168d7fe1d016b61d63e4346908c0c2aa3094db70 Mon Sep 17 00:00:00 2001 From: inphi Date: Wed, 18 Dec 2024 17:42:00 -0500 Subject: [PATCH 5/5] lint --- validation/fault_game_params_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/validation/fault_game_params_test.go b/validation/fault_game_params_test.go index b119d3c5b..43ac6dff4 100644 --- a/validation/fault_game_params_test.go +++ b/validation/fault_game_params_test.go @@ -73,6 +73,7 @@ func testFaultGameParams(t *testing.T, chain *ChainConfig) { require.NoError(t, err) isMainnet := chain.Superchain == "mainnet" mips64Address, err := Addresses[chain.ChainID].AddressFor("MIPS64") + require.NoError(t, err) vmAddress := MustHexToAddress(vm[0]) isMips64 := vmAddress == mips64Address // TODO: This is a temporary workaround to avoid checking the absolute prestate on testnets