Skip to content

Commit 2940d5e

Browse files
authored
Move standard checks to "Fault Proofs only" model (#383)
* remove MCP as supported contract version for standard chains exclude legacy standard candidate chains * remove "contract_versions_tag" and l2OO tests we now require fault proof contracts, the l2OO is deprecated on FP chains * remove unused helper * remove l2oo.submission_interval and l2oo.challenge_period_seconds See ethereum-optimism/specs#253 Move l2_block_time to rollup_config section * replace data availability test with more general rollup config test * track and validate l2_block_time ethereum-optimism/specs#276 * update existing chain configs to store block_time = 2 this is actually not properly configurable, yet since op-node will just ignore / overwrite this value * track and validate sequencing window Closes #374 * add OptimismPortal2 stamdard params and validation check * fix bugs * fix exclusions and devnet params for optimismportal2 params * remove some exclusions * remove cruft * add 5s timeout to RPC calls * lint * remove unecessary isFaultProofs bool
1 parent d2ec7b2 commit 2940d5e

35 files changed

+221
-243
lines changed

add-chain/config/config.go

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ type JSONChainConfig struct {
1616
ChainID uint64 `json:"l2_chain_id"`
1717
BatchInboxAddr superchain.Address `json:"batch_inbox_address"`
1818
Genesis superchain.ChainGenesis `json:"genesis"`
19+
BlockTime uint64 `json:"block_time"`
20+
SequencerWindowSize uint64 `json:"seq_window_size"`
1921
PlasmaConfig *superchain.PlasmaConfig `json:"plasma_config,omitempty"`
2022
superchain.HardForkConfiguration `json:",inline"`
2123
}
@@ -80,16 +82,8 @@ func ConstructChainConfig(
8082
EcotoneTime: jsonConfig.EcotoneTime,
8183
FjordTime: jsonConfig.FjordTime,
8284
},
83-
}
84-
85-
if superchainLevel == superchain.Standard || standardChainCandidate {
86-
var contractsVersionTag string
87-
if isFaultProofs {
88-
contractsVersionTag = "op-contracts/v1.4.0"
89-
} else {
90-
contractsVersionTag = "op-contracts/v1.3.0"
91-
}
92-
chainConfig.ContractsVersionTag = &contractsVersionTag
85+
BlockTime: jsonConfig.BlockTime,
86+
SequencerWindowSize: jsonConfig.SequencerWindowSize,
9387
}
9488

9589
fmt.Printf("Rollup config successfully constructed\n")

add-chain/testdata/superchain/configs/sepolia/expected_baseline.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ genesis:
1919

2020
canyon_time: 0 # Thu 1 Jan 1970 00:00:00 UTC
2121
delta_time: 1703203200 # Fri 22 Dec 2023 00:00:00 UTC
22+
23+
block_time: 2
24+
seq_window_size: 3600

add-chain/testdata/superchain/configs/sepolia/expected_faultproofs.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ explorer: https://awesomescan.org
77
superchain_level: 1
88
standard_chain_candidate: true # This is a temporary field which causes most of the standard validation checks to run on this chain
99
superchain_time: null # Missing hardfork times are NOT yet inherited from superchain.yaml
10-
contracts_version_tag: op-contracts/v1.4.0 # Fault Proofs https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.4.0
11-
1210
batch_inbox_addr: "0xFf00000000000000000000000000000011155421"
1311

1412
genesis:
@@ -22,3 +20,6 @@ genesis:
2220

2321
canyon_time: 0 # Thu 1 Jan 1970 00:00:00 UTC
2422
delta_time: 0 # Thu 1 Jan 1970 00:00:00 UTC
23+
24+
block_time: 2
25+
seq_window_size: 3600

add-chain/testdata/superchain/configs/sepolia/expected_plasma.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ explorer: https://awesomescan.org
77
superchain_level: 1
88
standard_chain_candidate: true # This is a temporary field which causes most of the standard validation checks to run on this chain
99
superchain_time: null # Missing hardfork times are NOT yet inherited from superchain.yaml
10-
contracts_version_tag: op-contracts/v1.3.0 # Multi-Chain Prep (MCP) https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.3.0
11-
1210
batch_inbox_addr: "0xFf00000000000000000000000000000000042069"
1311

1412
genesis:
@@ -23,6 +21,9 @@ genesis:
2321
canyon_time: 0 # Thu 1 Jan 1970 00:00:00 UTC
2422
delta_time: 1703203200 # Fri 22 Dec 2023 00:00:00 UTC
2523

24+
block_time: 2
25+
seq_window_size: 3600
26+
2627
plasma:
2728
da_challenge_contract_address: "0x3333333333333333333300000000000000000000"
2829
da_challenge_window: 5555555

add-chain/testdata/superchain/configs/sepolia/expected_standard-candidate.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ explorer: https://awesomescan.org
77
superchain_level: 1
88
standard_chain_candidate: true # This is a temporary field which causes most of the standard validation checks to run on this chain
99
superchain_time: null # Missing hardfork times are NOT yet inherited from superchain.yaml
10-
contracts_version_tag: op-contracts/v1.3.0 # Multi-Chain Prep (MCP) https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.3.0
11-
1210
batch_inbox_addr: "0xFf00000000000000000000000000000000042069"
1311

1412
genesis:
@@ -22,3 +20,6 @@ genesis:
2220

2321
canyon_time: 0 # Thu 1 Jan 1970 00:00:00 UTC
2422
delta_time: 1703203200 # Fri 22 Dec 2023 00:00:00 UTC
23+
24+
block_time: 2
25+
seq_window_size: 3600

add-chain/testdata/superchain/configs/sepolia/expected_zorasep.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ explorer: https://awesomescan.org
77
superchain_level: 1
88
standard_chain_candidate: true # This is a temporary field which causes most of the standard validation checks to run on this chain
99
superchain_time: null # Missing hardfork times are NOT yet inherited from superchain.yaml
10-
contracts_version_tag: op-contracts/v1.3.0 # Multi-Chain Prep (MCP) https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.3.0
11-
1210
batch_inbox_addr: "0xCd734290E4bd0200dAC631c7D4b9E8a33234e91f"
1311

1412
genesis:
@@ -19,3 +17,6 @@ genesis:
1917
hash: "0x8b17d2d52564a5a90079d9c860e1386272579e87b17ea27a3868513f53facd74"
2018
number: 0
2119
l2_time: 1698080004 # Mon 23 Oct 2023 16:53:24 UTC
20+
21+
block_time: 2
22+
seq_window_size: 3600

superchain/configs/mainnet/base.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ explorer: https://explorer.base.org
77
superchain_level: 1
88
standard_chain_candidate: true # This is a temporary field which causes most of the standard validation checks to run on this chain
99
superchain_time: 0 # Missing hardfork times are inherited from superchain.yaml
10-
contracts_version_tag: op-contracts/v1.3.0 # Multi-Chain Prep (MCP) https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.3.0
10+
1111

1212

1313
system_config_addr: "0x73a79Fab69143498Ed3712e519A88a918e1f4072"
@@ -21,3 +21,6 @@ genesis:
2121
hash: "0xf712aa9241cc24369b143cf6dce85f0902a9731e70d66818a3a5845b296c73dd"
2222
number: 0
2323
l2_time: 1686789347 # Thu 15 Jun 2023 00:35:47 UTC
24+
25+
block_time: 2
26+
seq_window_size: 3600

superchain/configs/mainnet/lyra.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ genesis:
1818
hash: "0x047f535b3da7ad4f96d353b5a439740b7591413daee0e2f27dd3aabb24581af2"
1919
number: 0
2020
l2_time: 1700021615 # Wed 15 Nov 2023 04:13:35 UTC
21+
22+
block_time: 2
23+
seq_window_size: 3600

superchain/configs/mainnet/metal.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ explorer: https://explorer.metall2.com
66

77
superchain_level: 1
88
standard_chain_candidate: true # This is a temporary field which causes most of the standard validation checks to run on this chain
9-
109
superchain_time: 0 # Missing hardfork times are inherited from superchain.yaml
11-
contracts_version_tag: "op-contracts/v1.3.0" # Multi-Chain Prep (MCP) https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.3.0
1210

1311
batch_inbox_addr: "0xc83f7D9F2D4A76E81145849381ABA02602373723"
1412

@@ -20,3 +18,6 @@ genesis:
2018
hash: "0xd31c12ffff2d563897ad9a041c0d26790d635911bdbbfa589347fa955f75281e"
2119
number: 0
2220
l2_time: 1711563515
21+
22+
block_time: 2
23+
seq_window_size: 3600

superchain/configs/mainnet/mode.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ superchain_level: 1
88
standard_chain_candidate: true # This is a temporary field which causes most of the standard validation checks to run on this chain
99

1010
superchain_time: 0 # Missing hardfork times are inherited from superchain.yaml
11-
contracts_version_tag: "op-contracts/v1.3.0" # Multi-Chain Prep (MCP) https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.3.0
1211

1312
system_config_addr: "0x5e6432F18Bc5d497B1Ab2288a025Fbf9D69E2221"
1413
batch_inbox_addr: "0x24E59d9d3Bd73ccC28Dc54062AF7EF7bFF58Bd67"
@@ -21,3 +20,6 @@ genesis:
2120
hash: "0xb0f682e12fc555fd5ce8fce51a59a67d66a5b46be28611a168260a549dac8a9b"
2221
number: 0
2322
l2_time: 1700167583 # Thu 16 Nov 2023 20:46:23 UTC
23+
24+
block_time: 2
25+
seq_window_size: 3600

0 commit comments

Comments
 (0)