Commit 46b97b27 authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

Merge pull request #4577 from ethereum-optimism/fix/hardcode-l2-genesis-coinbase

bedrock: hardcode L2 genesis coinbase
parents 646403c0 58b95897
...@@ -62,7 +62,6 @@ type DeployConfig struct { ...@@ -62,7 +62,6 @@ type DeployConfig struct {
L2GenesisBlockGasLimit hexutil.Uint64 `json:"l2GenesisBlockGasLimit"` L2GenesisBlockGasLimit hexutil.Uint64 `json:"l2GenesisBlockGasLimit"`
L2GenesisBlockDifficulty *hexutil.Big `json:"l2GenesisBlockDifficulty"` L2GenesisBlockDifficulty *hexutil.Big `json:"l2GenesisBlockDifficulty"`
L2GenesisBlockMixHash common.Hash `json:"l2GenesisBlockMixHash"` L2GenesisBlockMixHash common.Hash `json:"l2GenesisBlockMixHash"`
L2GenesisBlockCoinbase common.Address `json:"l2GenesisBlockCoinbase"`
L2GenesisBlockNumber hexutil.Uint64 `json:"l2GenesisBlockNumber"` L2GenesisBlockNumber hexutil.Uint64 `json:"l2GenesisBlockNumber"`
L2GenesisBlockGasUsed hexutil.Uint64 `json:"l2GenesisBlockGasUsed"` L2GenesisBlockGasUsed hexutil.Uint64 `json:"l2GenesisBlockGasUsed"`
L2GenesisBlockParentHash common.Hash `json:"l2GenesisBlockParentHash"` L2GenesisBlockParentHash common.Hash `json:"l2GenesisBlockParentHash"`
......
...@@ -147,7 +147,7 @@ func MigrateDB(ldb ethdb.Database, config *DeployConfig, l1Block *types.Block, m ...@@ -147,7 +147,7 @@ func MigrateDB(ldb ethdb.Database, config *DeployConfig, l1Block *types.Block, m
bedrockHeader := &types.Header{ bedrockHeader := &types.Header{
ParentHash: header.Hash(), ParentHash: header.Hash(),
UncleHash: types.EmptyUncleHash, UncleHash: types.EmptyUncleHash,
Coinbase: config.L2GenesisBlockCoinbase, Coinbase: predeploys.SequencerFeeVaultAddr,
Root: newRoot, Root: newRoot,
TxHash: types.EmptyRootHash, TxHash: types.EmptyRootHash,
ReceiptHash: types.EmptyRootHash, ReceiptHash: types.EmptyRootHash,
......
...@@ -5,6 +5,7 @@ import ( ...@@ -5,6 +5,7 @@ import (
"math/big" "math/big"
"time" "time"
"github.com/ethereum-optimism/optimism/op-bindings/predeploys"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core"
...@@ -85,7 +86,7 @@ func NewL2Genesis(config *DeployConfig, block *types.Block) (*core.Genesis, erro ...@@ -85,7 +86,7 @@ func NewL2Genesis(config *DeployConfig, block *types.Block) (*core.Genesis, erro
GasLimit: uint64(gasLimit), GasLimit: uint64(gasLimit),
Difficulty: difficulty.ToInt(), Difficulty: difficulty.ToInt(),
Mixhash: config.L2GenesisBlockMixHash, Mixhash: config.L2GenesisBlockMixHash,
Coinbase: config.L2GenesisBlockCoinbase, Coinbase: predeploys.SequencerFeeVaultAddr,
Number: uint64(config.L2GenesisBlockNumber), Number: uint64(config.L2GenesisBlockNumber),
GasUsed: uint64(config.L2GenesisBlockGasUsed), GasUsed: uint64(config.L2GenesisBlockGasUsed),
ParentHash: config.L2GenesisBlockParentHash, ParentHash: config.L2GenesisBlockParentHash,
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
"l2GenesisBlockGasLimit": "0xe4e1c0", "l2GenesisBlockGasLimit": "0xe4e1c0",
"l2GenesisBlockDifficulty": "0x1", "l2GenesisBlockDifficulty": "0x1",
"l2GenesisBlockMixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "l2GenesisBlockMixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"l2GenesisBlockCoinbase": "0x42000000000000000000000000000000000000f0",
"l2GenesisBlockNumber": "0x0", "l2GenesisBlockNumber": "0x0",
"l2GenesisBlockGasUsed": "0x0", "l2GenesisBlockGasUsed": "0x0",
"l2GenesisBlockParentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "l2GenesisBlockParentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
......
...@@ -93,7 +93,6 @@ func MakeDeployParams(t require.TestingT, tp *TestParams) *DeployParams { ...@@ -93,7 +93,6 @@ func MakeDeployParams(t require.TestingT, tp *TestParams) *DeployParams {
L2GenesisBlockGasLimit: 15_000_000, L2GenesisBlockGasLimit: 15_000_000,
L2GenesisBlockDifficulty: uint64ToBig(0), L2GenesisBlockDifficulty: uint64ToBig(0),
L2GenesisBlockMixHash: common.Hash{}, L2GenesisBlockMixHash: common.Hash{},
L2GenesisBlockCoinbase: predeploys.SequencerFeeVaultAddr,
L2GenesisBlockNumber: 0, L2GenesisBlockNumber: 0,
L2GenesisBlockGasUsed: 0, L2GenesisBlockGasUsed: 0,
L2GenesisBlockParentHash: common.Hash{}, L2GenesisBlockParentHash: common.Hash{},
...@@ -264,7 +263,6 @@ func ForkedDeployConfig(t require.TestingT, mnemonicCfg *MnemonicConfig, startBl ...@@ -264,7 +263,6 @@ func ForkedDeployConfig(t require.TestingT, mnemonicCfg *MnemonicConfig, startBl
L2OutputOracleStartingTimestamp: int(startBlock.Time()), L2OutputOracleStartingTimestamp: int(startBlock.Time()),
L2OutputOracleProposer: addrs.Proposer, L2OutputOracleProposer: addrs.Proposer,
L2OutputOracleChallenger: addrs.Deployer, L2OutputOracleChallenger: addrs.Deployer,
L2GenesisBlockCoinbase: common.HexToAddress("0x42000000000000000000000000000000000000f0"),
L2GenesisBlockGasLimit: hexutil.Uint64(15_000_000), L2GenesisBlockGasLimit: hexutil.Uint64(15_000_000),
// taken from devnet, need to check this // taken from devnet, need to check this
L2GenesisBlockBaseFeePerGas: uint64ToBig(0x3B9ACA00), L2GenesisBlockBaseFeePerGas: uint64ToBig(0x3B9ACA00),
......
...@@ -85,7 +85,6 @@ func DefaultSystemConfig(t *testing.T) SystemConfig { ...@@ -85,7 +85,6 @@ func DefaultSystemConfig(t *testing.T) SystemConfig {
L2GenesisBlockGasLimit: 8_000_000, L2GenesisBlockGasLimit: 8_000_000,
L2GenesisBlockDifficulty: uint642big(1), L2GenesisBlockDifficulty: uint642big(1),
L2GenesisBlockMixHash: common.Hash{}, L2GenesisBlockMixHash: common.Hash{},
L2GenesisBlockCoinbase: common.Address{0: 0x12},
L2GenesisBlockNumber: 0, L2GenesisBlockNumber: 0,
L2GenesisBlockGasUsed: 0, L2GenesisBlockGasUsed: 0,
L2GenesisBlockParentHash: common.Hash{}, L2GenesisBlockParentHash: common.Hash{},
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
"l2OutputOracleStartingTimestamp": -1, "l2OutputOracleStartingTimestamp": -1,
"l2OutputOracleProposer": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", "l2OutputOracleProposer": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
"l2OutputOracleChallenger": "0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65", "l2OutputOracleChallenger": "0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65",
"l2GenesisBlockCoinbase": "0x42000000000000000000000000000000000000f0",
"l2GenesisBlockGasLimit": "0xE4E1C0", "l2GenesisBlockGasLimit": "0xE4E1C0",
"l1BlockTime": 15, "l1BlockTime": 15,
"cliqueSignerAddress": "0xca062b0fd91172d89bcd4bb084ac4e21972cc467", "cliqueSignerAddress": "0xca062b0fd91172d89bcd4bb084ac4e21972cc467",
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
"governanceTokenOwner": "0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76", "governanceTokenOwner": "0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76",
"l2GenesisBlockGasLimit": "0x17D7840", "l2GenesisBlockGasLimit": "0x17D7840",
"l2GenesisBlockCoinbase": "0x4200000000000000000000000000000000000011",
"l2GenesisBlockBaseFeePerGas": "0x3b9aca00", "l2GenesisBlockBaseFeePerGas": "0x3b9aca00",
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
"finalizationPeriodSeconds": 2, "finalizationPeriodSeconds": 2,
"l2GenesisBlockGasLimit": "0x17D7840", "l2GenesisBlockGasLimit": "0x17D7840",
"l2GenesisBlockCoinbase": "0x4200000000000000000000000000000000000011",
"l2GenesisBlockBaseFeePerGas": "0x3b9aca00", "l2GenesisBlockBaseFeePerGas": "0x3b9aca00",
"l2CrossDomainMessengerOwner": "DUMMY", "l2CrossDomainMessengerOwner": "DUMMY",
......
...@@ -151,7 +151,6 @@ interface OptionalL2DeployConfig { ...@@ -151,7 +151,6 @@ interface OptionalL2DeployConfig {
l2GenesisBlockGasLimit: string l2GenesisBlockGasLimit: string
l2GenesisBlockDifficulty: string l2GenesisBlockDifficulty: string
l2GenesisBlockMixHash: string l2GenesisBlockMixHash: string
l2GenesisBlockCoinbase: string
l2GenesisBlockNumber: string l2GenesisBlockNumber: string
l2GenesisBlockGasUsed: string l2GenesisBlockGasUsed: string
l2GenesisBlockParentHash: string l2GenesisBlockParentHash: string
...@@ -300,10 +299,6 @@ export const deployConfigSpec: { ...@@ -300,10 +299,6 @@ export const deployConfigSpec: {
type: 'string', // bytes32 type: 'string', // bytes32
default: ethers.constants.HashZero, default: ethers.constants.HashZero,
}, },
l2GenesisBlockCoinbase: {
type: 'address',
default: ethers.constants.AddressZero,
},
l2GenesisBlockNumber: { l2GenesisBlockNumber: {
type: 'string', // uint64 type: 'string', // uint64
default: '0x0', default: '0x0',
......
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