Commit f3bdc13f authored by Mark Tyneway's avatar Mark Tyneway

op-node: add sepolia config

This should be double checked against the JSON file that was generated
by the genesis command:

```
{
  "genesis": {
    "l1": {
      "hash": "0x4b29002c963e450d79b5acec0649654f9b806cc5b2fe3dfafac2e5379bea1653",
      "number": 3969582
    },
    "l2": {
      "hash": "0x96c6b5aa7836051bdef7527cc935a9837edfe16aba735259e54af407bb41dd84",
      "number": 0
    },
    "l2_time": 1690397376,
    "system_config": {
      "batcherAddr": "0x7431310e026b69bfc676c0013e12a1a11411eec9",
      "overhead": "0x00000000000000000000000000000000000000000000000000000000000000bc",
      "scalar": "0x00000000000000000000000000000000000000000000000000000000000a6fe0",
      "gasLimit": 30000000
    }
  },
  "block_time": 2,
  "max_sequencer_drift": 600,
  "seq_window_size": 3600,
  "channel_timeout": 300,
  "l1_chain_id": 11155111,
  "l2_chain_id": 11155420,
  "regolith_time": 0,
  "batch_inbox_address": "0xff00000000000000000000000000000011155420",
  "deposit_contract_address": "0xb31e909cb6f7e873891e146967759f0140f420a8",
  "l1_system_config_address": "0xc6a8e082fd9124e6175791086f448d61d95ca4a2"
}
```

The values should be a combination of values used for goerli as well
as values used on mainnet. The batcher addr is the goerli value, the
scalar, overhead and gas limit are mainnet values.

We need to double check that the genesis L1 block ref was not reorg'd
out before committing to this.

Regolith is activated at genesis, the batch inbox address follows the
"correct" schema, the deposit and system config addresses should be
referenced against the artifacts found in https://github.com/ethereum-optimism/optimism/pull/6428

The chain id for sepolia should be checked and the L2 chain id is
unused.

The max seq drift, seq window size and channel timeout are all
copied from goerli.
parent a3416a2f
...@@ -70,9 +70,40 @@ var Goerli = rollup.Config{ ...@@ -70,9 +70,40 @@ var Goerli = rollup.Config{
RegolithTime: u64Ptr(1679079600), RegolithTime: u64Ptr(1679079600),
} }
var Sepolia = rollup.Config{
Genesis: rollup.Genesis{
L1: eth.BlockID{
Hash: common.HexToHash("0x4b29002c963e450d79b5acec0649654f9b806cc5b2fe3dfafac2e5379bea1653"),
Number: 3969582,
},
L2: eth.BlockID{
Hash: common.HexToHash("0x96c6b5aa7836051bdef7527cc935a9837edfe16aba735259e54af407bb41dd84"),
Number: 0,
},
L2Time: 1690397376,
SystemConfig: eth.SystemConfig{
BatcherAddr: common.HexToAddress("0x7431310e026b69bfc676c0013e12a1a11411eec9"),
Overhead: eth.Bytes32(common.HexToHash("0x00000000000000000000000000000000000000000000000000000000000000bc")),
Scalar: eth.Bytes32(common.HexToHash("0x00000000000000000000000000000000000000000000000000000000000a6fe0")),
GasLimit: 30000000,
},
},
BlockTime: 2,
MaxSequencerDrift: 600,
SeqWindowSize: 3600,
ChannelTimeout: 300,
L1ChainID: big.NewInt(11155111),
L2ChainID: big.NewInt(11155420),
BatchInboxAddress: common.HexToAddress("0xff00000000000000000000000000000011155420"),
DepositContractAddress: common.HexToAddress("0xb31e909cb6f7e873891e146967759f0140f420a8"),
L1SystemConfigAddress: common.HexToAddress("0xc6a8e082fd9124e6175791086f448d61d95ca4a2"),
RegolithTime: u64Ptr(0),
}
var NetworksByName = map[string]rollup.Config{ var NetworksByName = map[string]rollup.Config{
"goerli": Goerli, "goerli": Goerli,
"mainnet": Mainnet, "mainnet": Mainnet,
"sepolia": Sepolia,
} }
var L2ChainIDToNetworkName = func() map[string]string { var L2ChainIDToNetworkName = func() map[string]string {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment