Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
50 changes: 27 additions & 23 deletions op-chain-ops/cmd/registry-data/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,19 @@ type GenesisAccount struct {
}

type Genesis struct {
Comment thread
geoknee marked this conversation as resolved.
Nonce uint64 `json:"nonce"`
Timestamp uint64 `json:"timestamp"`
ExtraData []byte `json:"extraData"`
GasLimit uint64 `json:"gasLimit"`
Difficulty *hexutil.Big `json:"difficulty"`
Mixhash common.Hash `json:"mixHash"`
Coinbase common.Address `json:"coinbase"`
Number uint64 `json:"number"`
GasUsed uint64 `json:"gasUsed"`
ParentHash common.Hash `json:"parentHash"`
BaseFee *hexutil.Big `json:"baseFeePerGas"`
Nonce uint64 `json:"nonce"`
Timestamp uint64 `json:"timestamp"`
ExtraData []byte `json:"extraData"`
GasLimit uint64 `json:"gasLimit"`
Difficulty *hexutil.Big `json:"difficulty"`
Mixhash common.Hash `json:"mixHash"`
Coinbase common.Address `json:"coinbase"`
Number uint64 `json:"number"`
GasUsed uint64 `json:"gasUsed"`
ParentHash common.Hash `json:"parentHash"`
BaseFee *hexutil.Big `json:"baseFeePerGas"`
ExcessBlobGas *uint64 `json:"excessBlobGas"` // EIP-4844
BlobGasUsed *uint64 `json:"blobGasUsed"` // EIP-4844
Comment thread
sebastianst marked this conversation as resolved.

Alloc jsonutil.LazySortedJsonMap[common.Address, GenesisAccount] `json:"alloc"`
// For genesis definitions without full state (OP-Mainnet, OP-Goerli)
Expand Down Expand Up @@ -209,18 +211,20 @@ func entrypoint(ctx *cli.Context) error {

// convert into allocation data
out := Genesis{
Nonce: genesis.Nonce,
Timestamp: genesis.Timestamp,
ExtraData: genesis.ExtraData,
GasLimit: genesis.GasLimit,
Difficulty: (*hexutil.Big)(genesis.Difficulty),
Mixhash: genesis.Mixhash,
Coinbase: genesis.Coinbase,
Number: genesis.Number,
GasUsed: genesis.GasUsed,
ParentHash: genesis.ParentHash,
BaseFee: (*hexutil.Big)(genesis.BaseFee),
Alloc: make(jsonutil.LazySortedJsonMap[common.Address, GenesisAccount]),
Nonce: genesis.Nonce,
Timestamp: genesis.Timestamp,
ExtraData: genesis.ExtraData,
GasLimit: genesis.GasLimit,
Difficulty: (*hexutil.Big)(genesis.Difficulty),
Mixhash: genesis.Mixhash,
Coinbase: genesis.Coinbase,
Number: genesis.Number,
GasUsed: genesis.GasUsed,
ParentHash: genesis.ParentHash,
BaseFee: (*hexutil.Big)(genesis.BaseFee),
ExcessBlobGas: genesis.ExcessBlobGas, // EIP-4844
BlobGasUsed: genesis.BlobGasUsed, // EIP-4844
Comment thread
sebastianst marked this conversation as resolved.
Alloc: make(jsonutil.LazySortedJsonMap[common.Address, GenesisAccount]),
}

// write genesis, but only reference code by code-hash, and don't encode the L2 predeploys to save space.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ config=$(cat << EOL
"eip1559DenominatorCanyon": 250,
"eip1559Elasticity": 6,

"l2GenesisDeltaTimeOffset": null,
"l2GenesisEcotoneTimeOffset": "0x0",
"l2GenesisDeltaTimeOffset": "0x0",
Comment thread
sebastianst marked this conversation as resolved.
"l2GenesisCanyonTimeOffset": "0x0",

"systemConfigStartBlock": 0,
Expand Down