Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move standard checks to "Fault Proofs only" model #383

Merged
merged 17 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions add-chain/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ type JSONChainConfig struct {
ChainID uint64 `json:"l2_chain_id"`
BatchInboxAddr superchain.Address `json:"batch_inbox_address"`
Genesis superchain.ChainGenesis `json:"genesis"`
BlockTime uint64 `json:"block_time"`
SequencerWindowSize uint64 `json:"seq_window_size"`
PlasmaConfig *superchain.PlasmaConfig `json:"plasma_config,omitempty"`
superchain.HardForkConfiguration `json:",inline"`
}
Expand Down Expand Up @@ -80,16 +82,8 @@ func ConstructChainConfig(
EcotoneTime: jsonConfig.EcotoneTime,
FjordTime: jsonConfig.FjordTime,
},
}

if superchainLevel == superchain.Standard || standardChainCandidate {
var contractsVersionTag string
if isFaultProofs {
contractsVersionTag = "op-contracts/v1.4.0"
} else {
contractsVersionTag = "op-contracts/v1.3.0"
}
chainConfig.ContractsVersionTag = &contractsVersionTag
BlockTime: jsonConfig.BlockTime,
SequencerWindowSize: jsonConfig.SequencerWindowSize,
}

fmt.Printf("Rollup config successfully constructed\n")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ genesis:

canyon_time: 0 # Thu 1 Jan 1970 00:00:00 UTC
delta_time: 1703203200 # Fri 22 Dec 2023 00:00:00 UTC

block_time: 2
seq_window_size: 3600
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ explorer: https://awesomescan.org
superchain_level: 1
standard_chain_candidate: true # This is a temporary field which causes most of the standard validation checks to run on this chain
superchain_time: null # Missing hardfork times are NOT yet inherited from superchain.yaml
contracts_version_tag: op-contracts/v1.4.0 # Fault Proofs https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.4.0

batch_inbox_addr: "0xFf00000000000000000000000000000011155421"

genesis:
Expand All @@ -22,3 +20,6 @@ genesis:

canyon_time: 0 # Thu 1 Jan 1970 00:00:00 UTC
delta_time: 0 # Thu 1 Jan 1970 00:00:00 UTC

block_time: 2
seq_window_size: 3600
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ explorer: https://awesomescan.org
superchain_level: 1
standard_chain_candidate: true # This is a temporary field which causes most of the standard validation checks to run on this chain
superchain_time: null # Missing hardfork times are NOT yet inherited from superchain.yaml
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

batch_inbox_addr: "0xFf00000000000000000000000000000000042069"

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

block_time: 2
seq_window_size: 3600

plasma:
da_challenge_contract_address: "0x3333333333333333333300000000000000000000"
da_challenge_window: 5555555
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ explorer: https://awesomescan.org
superchain_level: 1
standard_chain_candidate: true # This is a temporary field which causes most of the standard validation checks to run on this chain
superchain_time: null # Missing hardfork times are NOT yet inherited from superchain.yaml
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

batch_inbox_addr: "0xFf00000000000000000000000000000000042069"

genesis:
Expand All @@ -22,3 +20,6 @@ genesis:

canyon_time: 0 # Thu 1 Jan 1970 00:00:00 UTC
delta_time: 1703203200 # Fri 22 Dec 2023 00:00:00 UTC

block_time: 2
seq_window_size: 3600
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ explorer: https://awesomescan.org
superchain_level: 1
standard_chain_candidate: true # This is a temporary field which causes most of the standard validation checks to run on this chain
superchain_time: null # Missing hardfork times are NOT yet inherited from superchain.yaml
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

batch_inbox_addr: "0xCd734290E4bd0200dAC631c7D4b9E8a33234e91f"

genesis:
Expand All @@ -19,3 +17,6 @@ genesis:
hash: "0x8b17d2d52564a5a90079d9c860e1386272579e87b17ea27a3868513f53facd74"
number: 0
l2_time: 1698080004 # Mon 23 Oct 2023 16:53:24 UTC

block_time: 2
seq_window_size: 3600
5 changes: 4 additions & 1 deletion superchain/configs/mainnet/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ explorer: https://explorer.base.org
superchain_level: 1
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.yaml
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



system_config_addr: "0x73a79Fab69143498Ed3712e519A88a918e1f4072"
Expand All @@ -21,3 +21,6 @@ genesis:
hash: "0xf712aa9241cc24369b143cf6dce85f0902a9731e70d66818a3a5845b296c73dd"
number: 0
l2_time: 1686789347 # Thu 15 Jun 2023 00:35:47 UTC

block_time: 2
seq_window_size: 3600
3 changes: 3 additions & 0 deletions superchain/configs/mainnet/lyra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ genesis:
hash: "0x047f535b3da7ad4f96d353b5a439740b7591413daee0e2f27dd3aabb24581af2"
number: 0
l2_time: 1700021615 # Wed 15 Nov 2023 04:13:35 UTC

block_time: 2
seq_window_size: 3600
5 changes: 3 additions & 2 deletions superchain/configs/mainnet/metal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ explorer: https://explorer.metall2.com

superchain_level: 1
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.yaml
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

batch_inbox_addr: "0xc83f7D9F2D4A76E81145849381ABA02602373723"

Expand All @@ -20,3 +18,6 @@ genesis:
hash: "0xd31c12ffff2d563897ad9a041c0d26790d635911bdbbfa589347fa955f75281e"
number: 0
l2_time: 1711563515

block_time: 2
seq_window_size: 3600
4 changes: 3 additions & 1 deletion superchain/configs/mainnet/mode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ superchain_level: 1
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.yaml
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

system_config_addr: "0x5e6432F18Bc5d497B1Ab2288a025Fbf9D69E2221"
batch_inbox_addr: "0x24E59d9d3Bd73ccC28Dc54062AF7EF7bFF58Bd67"
Expand All @@ -21,3 +20,6 @@ genesis:
hash: "0xb0f682e12fc555fd5ce8fce51a59a67d66a5b46be28611a168260a549dac8a9b"
number: 0
l2_time: 1700167583 # Thu 16 Nov 2023 20:46:23 UTC

block_time: 2
seq_window_size: 3600
4 changes: 3 additions & 1 deletion superchain/configs/mainnet/op.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ explorer: https://explorer.optimism.io

superchain_level: 2
superchain_time: 0 # Missing hardfork times are inherited from superchain.yaml
contracts_version_tag: "op-contracts/v1.4.0" # Fault Proofs https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.4.0

system_config_addr: "0x229047fed2591dbec1eF1118d64F7aF3dB9EB290"
batch_inbox_addr: "0xFF00000000000000000000000000000000000010"
Expand All @@ -19,3 +18,6 @@ genesis:
hash: "0xdbf6a80fef073de06add9b0d14026d6e5a86c85f6d102c36d3d8e9cf89c2afd3"
number: 105235063
l2_time: 1686068903 # Tue 6 Jun 2023 16:28:23 UTC

block_time: 2
seq_window_size: 3600
3 changes: 3 additions & 0 deletions superchain/configs/mainnet/orderly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ genesis:
hash: "0xe53c94ddd42714239429bd132ba2fa080c7e5cc7dca816ec6e482ec0418e6d7f"
number: 0
l2_time: 1696608227 # Fri 6 Oct 2023 16:03:47 UTC

block_time: 2
seq_window_size: 3600
3 changes: 3 additions & 0 deletions superchain/configs/mainnet/pgn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ genesis:
hash: "0x39c02e153c193000f2d2907de42cc49f48329163f71d7f9c3fd0e15f41b529db"
number: 0
l2_time: 1689106727 # Tue 11 Jul 2023 20:18:47 UTC

block_time: 2
seq_window_size: 3600
4 changes: 3 additions & 1 deletion superchain/configs/mainnet/zora.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ superchain_level: 1
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.yaml
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

system_config_addr: "0xA3cAB0126d5F504B071b81a3e8A2BBBF17930d86"
batch_inbox_addr: "0x6F54Ca6F6EdE96662024Ffd61BFd18f3f4e34DFf"
Expand All @@ -21,3 +20,6 @@ genesis:
hash: "0x47555a45a1af8d4728ca337a1e48375a83919b1ea16591e070a07388b7364e29"
number: 0
l2_time: 1686693839 # Tue 13 Jun 2023 22:03:59 UTC

block_time: 2
seq_window_size: 3600
3 changes: 3 additions & 0 deletions superchain/configs/sepolia-dev-0/base-devnet-0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ genesis:

canyon_time: 1698436800 # Fri 27 Oct 2023 20:00:00 UTC
delta_time: 1706555000 # Mon 29 Jan 2024 19:03:20 UTC

block_time: 2
seq_window_size: 3600
3 changes: 3 additions & 0 deletions superchain/configs/sepolia-dev-0/oplabs-devnet-0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ genesis:
hash: "0x027ae1f4f9a441f9c8a01828f3b6d05803a0f524c07e09263264a38b755f804b"
number: 0
l2_time: 1706484048 # Sun 28 Jan 2024 23:20:48 UTC

block_time: 2
seq_window_size: 3600
3 changes: 3 additions & 0 deletions superchain/configs/sepolia-dev-0/superchain.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ canyon_time: 0
delta_time: 0
ecotone_time: 1706634000 # Tue 30 Jan 2024 17:00:00 UTC
fjord_time: 1715961600 # Fri May 17 16:00:00 UTC 2024

block_time: 2
seq_window_size: 3600
4 changes: 3 additions & 1 deletion superchain/configs/sepolia/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ superchain_level: 1
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.yaml
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

system_config_addr: "0xf272670eb55e895584501d564AfEB048bEd26194"
batch_inbox_addr: "0xfF00000000000000000000000000000000084532"
Expand All @@ -21,3 +20,6 @@ genesis:
hash: "0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4"
number: 0
l2_time: 1695768288 # Tue 26 Sep 2023 22:44:48 UTC

block_time: 2
seq_window_size: 3600
4 changes: 3 additions & 1 deletion superchain/configs/sepolia/mode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ superchain_level: 1
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
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

batch_inbox_addr: "0xcDDaE6148dA1E003C230E4527f9baEdc8a204e7E"

Expand All @@ -22,3 +21,6 @@ genesis:
l2_time: 1687867932

canyon_time: 1703203200 # Fri 22 Dec 2023 00:00:00 UTC

block_time: 2
seq_window_size: 3600
4 changes: 3 additions & 1 deletion superchain/configs/sepolia/op.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ explorer: "https://sepolia-optimistic.etherscan.io"

superchain_level: 2
superchain_time: 0 # Missing hardfork times are inherited from superchain.yaml
contracts_version_tag: "op-contracts/v1.4.0" # Fault Proofs https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.4.0

system_config_addr: "0x034edD2A225f7f429A63E0f1D2084B9E0A93b538"
batch_inbox_addr: "0xff00000000000000000000000000000011155420"
Expand All @@ -19,3 +18,6 @@ genesis:
hash: "0x102de6ffb001480cc9b8b548fd05c34cd4f46ae4aa91759393db90ea0409887d"
number: 0
l2_time: 1691802540 # Sat 12 Aug 2023 01:09:00 UTC

block_time: 2
seq_window_size: 3600
3 changes: 3 additions & 0 deletions superchain/configs/sepolia/pgn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ genesis:
hash: "0x1d2ad9a8139d33161b1915698d2ae94019fd0817f2113198b6cb568110fa16ad"
number: 0
l2_time: 1685727972 # Fri 2 Jun 2023 17:46:12 UTC

block_time: 2
seq_window_size: 3600
4 changes: 3 additions & 1 deletion superchain/configs/sepolia/zora.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ superchain_level: 1
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.yaml
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

system_config_addr: "0xB54c7BFC223058773CF9b739cC5bd4095184Fb08"
batch_inbox_addr: "0xCd734290E4bd0200dAC631c7D4b9E8a33234e91f"
Expand All @@ -21,3 +20,6 @@ genesis:
hash: "0x8b17d2d52564a5a90079d9c860e1386272579e87b17ea27a3868513f53facd74"
number: 0
l2_time: 1698080004 # Mon 23 Oct 2023 16:53:24 UTC

block_time: 2
seq_window_size: 3600
24 changes: 6 additions & 18 deletions superchain/superchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,6 @@ type ChainConfig struct {
// will be inherited from the superchain-wide config.
SuperchainTime *uint64 `yaml:"superchain_time"`

// An op-contracts tag from github.com/ethereum-optimism/optimism
// from which contracts were deployed. Example: "op-contracts/v1.4.0".
// May be nil for frontier chains.
ContractsVersionTag *string `yaml:"contracts_version_tag,omitempty"`

BatchInboxAddr Address `yaml:"batch_inbox_addr"`

Genesis ChainGenesis `yaml:"genesis"`
Expand All @@ -111,6 +106,9 @@ type ChainConfig struct {
// Hardfork Configuration Overrides
HardForkConfiguration `yaml:",inline"`

BlockTime uint64 `yaml:"block_time"`
SequencerWindowSize uint64 `yaml:"seq_window_size"`

// Optional feature
Plasma *PlasmaConfig `yaml:"plasma,omitempty"`
}
Expand Down Expand Up @@ -196,22 +194,12 @@ func (c *ChainConfig) EnhanceYAML(ctx context.Context, node *yaml.Node) error {
}

// Add blank line AFTER these keys
if lastKey == "explorer" || lastKey == "contracts_version_tag" || lastKey == "genesis" {
if lastKey == "explorer" || lastKey == "genesis" {
keyNode.HeadComment = "\n"
}

if keyNode.Value == "contracts_version_tag" {
switch valNode.Value {
case "op-contracts/v1.3.0":
keyNode.LineComment = "Multi-Chain Prep (MCP) https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.3.0"
case "op-contracts/v1.4.0":
keyNode.LineComment = "Fault Proofs https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.4.0"

}
}

// Add blank line BEFORE these keys
if keyNode.Value == "genesis" || keyNode.Value == "plasma" {
if keyNode.Value == "genesis" || keyNode.Value == "plasma" || keyNode.Value == "block_time" {
keyNode.HeadComment = "\n"
}

Expand All @@ -233,7 +221,7 @@ func (c *ChainConfig) EnhanceYAML(ctx context.Context, node *yaml.Node) error {
}

// Add human readable timestamp in comment
if strings.HasSuffix(keyNode.Value, "_time") && valNode.Value != "" && valNode.Value != "null" {
if strings.HasSuffix(keyNode.Value, "_time") && valNode.Value != "" && valNode.Value != "null" && keyNode.Value != "block_time" {
t, err := strconv.ParseInt(valNode.Value, 10, 64)
if err != nil {
return fmt.Errorf("failed to convert yaml string timestamp to int: %w", err)
Expand Down
12 changes: 0 additions & 12 deletions validation/data-availability_test.go

This file was deleted.

33 changes: 31 additions & 2 deletions validation/exclusions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,37 @@ var exclusions = map[string]map[uint64]bool{
11763072: true, // sepolia-dev-0/base-devnet-0 No Public RPC declared
},
"Standard_Contract_Versions": {
11155421: true, // sepolia-dev-0/oplabs-devnet-0
11763072: true, // sepolia-dev-0/base-devnet-0
10: true, // mainnet/op MCP (at time of writing)
geoknee marked this conversation as resolved.
Show resolved Hide resolved
8453: true, // mainnet/base MCP (at time of writing)
957: true, // mainnet/lyra MCP (at time of writing)
1750: true, // mainnet/metal MCP (at time of writing)
34443: true, // mainnet/mode MCP (at time of writing)
291: true, // mainnet/orderly MCP (at time of writing)
424: true, // mainnet/pgn MCP (at time of writing)
7777777: true, // mainnet/zora MCP (at time of writing)
11155420: true, // sepolia/op MCP (at time of writing)
84532: true, // sepolia/base MCP (at time of writing)
sebastianst marked this conversation as resolved.
Show resolved Hide resolved
919: true, // sepolia/mode MCP (at time of writing)
58008: true, // sepolia/pgn MCP (at time of writing)
999999999: true, // sepolia/zora MCP (at time of writing)
11155421: true, // sepolia-dev0/oplabs-devnet-0"
11763072: true, // sepolia-dev0/base-devnet-0"
sebastianst marked this conversation as resolved.
Show resolved Hide resolved
},
"Optimism_Portal_2_Params": {
10: true, // mainnet/op MCP (at time of writing)
geoknee marked this conversation as resolved.
Show resolved Hide resolved
8453: true, // mainnet/base MCP (at time of writing)
957: true, // mainnet/lyra MCP (at time of writing)
1750: true, // mainnet/metal MCP (at time of writing)
34443: true, // mainnet/mode MCP (at time of writing)
291: true, // mainnet/orderly MCP (at time of writing)
424: true, // mainnet/pgn MCP (at time of writing)
7777777: true, // mainnet/zora MCP (at time of writing)
11155420: true, // sepolia/op MCP (at time of writing)
84532: true, // sepolia/base MCP (at time of writing)
sebastianst marked this conversation as resolved.
Show resolved Hide resolved
919: true, // sepolia/mode MCP (at time of writing)
58008: true, // sepolia/pgn MCP (at time of writing)
999999999: true, // sepolia/zora MCP (at time of writing)
11763072: true, // sepolia-dev0/base-devnet-0"
sebastianst marked this conversation as resolved.
Show resolved Hide resolved
},
"Uniqueness_Check": {
11155421: true, // oplabs devnet 0, not in upstream repo
Expand Down
Loading