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

[Isthmus] Add missing Isthmus activation time updates #13549

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ require (
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20241213092551-33a63fce8214
github.com/ethereum/go-ethereum v1.14.11
github.com/fsnotify/fsnotify v1.8.0
github.com/golang-jwt/jwt/v4 v4.5.1
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb
github.com/google/go-cmp v0.6.0
github.com/google/gofuzz v1.2.1-0.20220503160820-4a35382e8fc8
Expand Down Expand Up @@ -113,7 +114,6 @@ require (
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.1 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gopacket v1.1.19 // indirect
github.com/google/pprof v0.0.0-20241009165004-a3522334989c // indirect
Expand Down Expand Up @@ -252,7 +252,7 @@ require (
rsc.io/tmplfunc v0.0.3 // indirect
)

replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101411.5-rc.1
replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101411.5-rc.1.0.20241219170731-928070c7fc09
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pulls in this fix: ethereum-optimism/op-geth@928070c, which is not part of a release yet


//replace github.com/ethereum/go-ethereum => ../go-ethereum

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ github.com/elastic/gosigar v0.14.3 h1:xwkKwPia+hSfg9GqrCUKYdId102m9qTJIIr7egmK/u
github.com/elastic/gosigar v0.14.3/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs=
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3 h1:RWHKLhCrQThMfch+QJ1Z8veEq5ZO3DfIhZ7xgRP9WTc=
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3/go.mod h1:QziizLAiF0KqyLdNJYD7O5cpDlaFMNZzlxYNcWsJUxs=
github.com/ethereum-optimism/op-geth v1.101411.5-rc.1 h1:8fhtAycm/+xugWev5jInUxgF0Wdc29PxSODZXca6Qi8=
github.com/ethereum-optimism/op-geth v1.101411.5-rc.1/go.mod h1:n6VeI9cKFxmXCauD7Ji9lgTAg+2TYGLZu5AXgVJB4tk=
github.com/ethereum-optimism/op-geth v1.101411.5-rc.1.0.20241219170731-928070c7fc09 h1:+T3q3Gms1XQji3NTMo8XyjFla6Zcyj1DwKlKyqrlQgo=
github.com/ethereum-optimism/op-geth v1.101411.5-rc.1.0.20241219170731-928070c7fc09/go.mod h1:n6VeI9cKFxmXCauD7Ji9lgTAg+2TYGLZu5AXgVJB4tk=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20241213092551-33a63fce8214 h1:94dIMFDCafAQ3FCC1pryuhgfZc1jPoDwK4xSMOPshN8=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20241213092551-33a63fce8214/go.mod h1:9feO8jcL5OZ1tvRjEfNAHz4Aggvd6373l+ZxmZZAyZs=
github.com/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHEwTNA=
Expand Down
20 changes: 13 additions & 7 deletions op-chain-ops/genesis/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -996,13 +996,8 @@ func (d *DeployConfig) RollupConfig(l1StartBlock *types.Header, l2GenesisBlockHa
Hash: l2GenesisBlockHash,
Number: l2GenesisBlockNumber,
},
L2Time: l1StartBlock.Time,
SystemConfig: eth.SystemConfig{
BatcherAddr: d.BatchSenderAddress,
Overhead: eth.Bytes32(common.BigToHash(new(big.Int).SetUint64(d.GasPriceOracleOverhead))),
Scalar: eth.Bytes32(d.FeeScalar()),
GasLimit: uint64(d.L2GenesisBlockGasLimit),
},
L2Time: l1StartBlock.Time,
SystemConfig: d.GenesisSystemConfig(),
},
BlockTime: d.L2BlockTime,
MaxSequencerDrift: d.MaxSequencerDrift,
Expand All @@ -1027,6 +1022,17 @@ func (d *DeployConfig) RollupConfig(l1StartBlock *types.Header, l2GenesisBlockHa
}, nil
}

// GenesisSystemConfig converts a DeployConfig to a eth.SystemConfig. If Ecotone is active at genesis, the
// Overhead value is considered a noop.
func (d *DeployConfig) GenesisSystemConfig() eth.SystemConfig {
return eth.SystemConfig{
BatcherAddr: d.BatchSenderAddress,
Overhead: eth.Bytes32(common.BigToHash(new(big.Int).SetUint64(d.GasPriceOracleOverhead))),
Scalar: d.FeeScalar(),
GasLimit: uint64(d.L2GenesisBlockGasLimit),
}
}

// NewDeployConfig reads a config file given a path on the filesystem.
func NewDeployConfig(path string) (*DeployConfig, error) {
file, err := os.ReadFile(path)
Expand Down
1 change: 1 addition & 0 deletions op-chain-ops/interopgen/recipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ func InteropL2DevConfig(l1ChainID, l2ChainID uint64, addrs devkeys.Addresses) (*
L2GenesisFjordTimeOffset: new(hexutil.Uint64),
L2GenesisGraniteTimeOffset: new(hexutil.Uint64),
L2GenesisHoloceneTimeOffset: new(hexutil.Uint64),
L2GenesisIsthmusTimeOffset: new(hexutil.Uint64),
L2GenesisInteropTimeOffset: new(hexutil.Uint64),
L1CancunTimeOffset: new(hexutil.Uint64),
UseInterop: true,
Expand Down
15 changes: 7 additions & 8 deletions op-e2e/e2eutils/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"path"
"time"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
Expand Down Expand Up @@ -205,6 +204,7 @@ func Setup(t require.TestingT, deployParams *DeployParams, alloc *AllocParams) *
FjordTime: deployConf.FjordTime(uint64(deployConf.L1GenesisBlockTimestamp)),
GraniteTime: deployConf.GraniteTime(uint64(deployConf.L1GenesisBlockTimestamp)),
HoloceneTime: deployConf.HoloceneTime(uint64(deployConf.L1GenesisBlockTimestamp)),
IsthmusTime: deployConf.IsthmusTime(uint64(deployConf.L1GenesisBlockTimestamp)),
InteropTime: deployConf.InteropTime(uint64(deployConf.L1GenesisBlockTimestamp)),
AltDAConfig: pcfg,
}
Expand All @@ -226,16 +226,12 @@ func Setup(t require.TestingT, deployParams *DeployParams, alloc *AllocParams) *
}

func SystemConfigFromDeployConfig(deployConfig *genesis.DeployConfig) eth.SystemConfig {
return eth.SystemConfig{
BatcherAddr: deployConfig.BatchSenderAddress,
Overhead: eth.Bytes32(common.BigToHash(new(big.Int).SetUint64(deployConfig.GasPriceOracleOverhead))),
Scalar: eth.Bytes32(deployConfig.FeeScalar()),
GasLimit: uint64(deployConfig.L2GenesisBlockGasLimit),
}
return deployConfig.GenesisSystemConfig()
}

func ApplyDeployConfigForks(deployConfig *genesis.DeployConfig) {
isHolocene := os.Getenv("OP_E2E_USE_HOLOCENE") == "true"
isIsthmus := os.Getenv("OP_E2E_USE_ISTHMUS") == "true"
isHolocene := isIsthmus || os.Getenv("OP_E2E_USE_HOLOCENE") == "true"
isGranite := isHolocene || os.Getenv("OP_E2E_USE_GRANITE") == "true"
isFjord := isGranite || os.Getenv("OP_E2E_USE_FJORD") == "true"
isEcotone := isFjord || os.Getenv("OP_E2E_USE_ECOTONE") == "true"
Expand All @@ -255,6 +251,9 @@ func ApplyDeployConfigForks(deployConfig *genesis.DeployConfig) {
if isHolocene {
deployConfig.L2GenesisHoloceneTimeOffset = new(hexutil.Uint64)
}
if isIsthmus {
deployConfig.L2GenesisIsthmusTimeOffset = new(hexutil.Uint64)
}
// Canyon and lower is activated by default
deployConfig.L2GenesisCanyonTimeOffset = new(hexutil.Uint64)
deployConfig.L2GenesisRegolithTimeOffset = new(hexutil.Uint64)
Expand Down
1 change: 1 addition & 0 deletions op-e2e/system/e2esys/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,7 @@ func (cfg SystemConfig) Start(t *testing.T, startOpts ...StartOption) (*System,
FjordTime: cfg.DeployConfig.FjordTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)),
GraniteTime: cfg.DeployConfig.GraniteTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)),
HoloceneTime: cfg.DeployConfig.HoloceneTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)),
IsthmusTime: cfg.DeployConfig.IsthmusTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)),
InteropTime: cfg.DeployConfig.InteropTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)),
ProtocolVersionsAddress: cfg.L1Deployments.ProtocolVersionsProxy,
AltDAConfig: rollupAltDAConfig,
Expand Down
1 change: 1 addition & 0 deletions op-node/rollup/superchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ func LoadOPStackRollupConfig(chainID uint64) (*Config, error) {
FjordTime: chConfig.FjordTime,
GraniteTime: chConfig.GraniteTime,
HoloceneTime: chConfig.HoloceneTime,
IsthmusTime: chConfig.IsthmusTime,
BatchInboxAddress: common.Address(chConfig.BatchInboxAddr),
DepositContractAddress: common.Address(addrs.OptimismPortalProxy),
L1SystemConfigAddress: common.Address(addrs.SystemConfigProxy),
Expand Down
35 changes: 18 additions & 17 deletions op-program/client/l2/engineapi/l2_engine_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,23 +486,24 @@ func (ea *L2EngineAPI) newPayload(_ context.Context, payload *eth.ExecutionPaylo
txs[i] = tx
}
block, err := engine.ExecutableDataToBlock(engine.ExecutableData{
ParentHash: payload.ParentHash,
FeeRecipient: payload.FeeRecipient,
StateRoot: common.Hash(payload.StateRoot),
ReceiptsRoot: common.Hash(payload.ReceiptsRoot),
LogsBloom: payload.LogsBloom[:],
Random: common.Hash(payload.PrevRandao),
Number: uint64(payload.BlockNumber),
GasLimit: uint64(payload.GasLimit),
GasUsed: uint64(payload.GasUsed),
Timestamp: uint64(payload.Timestamp),
ExtraData: payload.ExtraData,
BaseFeePerGas: (*uint256.Int)(&payload.BaseFeePerGas).ToBig(),
BlockHash: payload.BlockHash,
Transactions: txs,
Withdrawals: toGethWithdrawals(payload),
ExcessBlobGas: (*uint64)(payload.ExcessBlobGas),
BlobGasUsed: (*uint64)(payload.BlobGasUsed),
ParentHash: payload.ParentHash,
FeeRecipient: payload.FeeRecipient,
StateRoot: common.Hash(payload.StateRoot),
ReceiptsRoot: common.Hash(payload.ReceiptsRoot),
LogsBloom: payload.LogsBloom[:],
Random: common.Hash(payload.PrevRandao),
Number: uint64(payload.BlockNumber),
GasLimit: uint64(payload.GasLimit),
GasUsed: uint64(payload.GasUsed),
Timestamp: uint64(payload.Timestamp),
ExtraData: payload.ExtraData,
BaseFeePerGas: (*uint256.Int)(&payload.BaseFeePerGas).ToBig(),
BlockHash: payload.BlockHash,
Transactions: txs,
Withdrawals: toGethWithdrawals(payload),
ExcessBlobGas: (*uint64)(payload.ExcessBlobGas),
BlobGasUsed: (*uint64)(payload.BlobGasUsed),
WithdrawalsRoot: payload.WithdrawalsRoot,
}, hashes, root, ea.backend.Config())
if err != nil {
log.Debug("Invalid NewPayload params", "params", payload, "error", err)
Expand Down
35 changes: 19 additions & 16 deletions op-service/eth/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ type ExecutionPayload struct {
BlobGasUsed *Uint64Quantity `json:"blobGasUsed,omitempty"`
// Nil if not present (Bedrock, Canyon, Delta)
ExcessBlobGas *Uint64Quantity `json:"excessBlobGas,omitempty"`
// Nil if not present (Bedrock, Canyon, Delta, Ecotone, Fjord, Granite, Holocene)
WithdrawalsRoot *common.Hash `json:"withdrawalsRoot,omitempty"`
}

func (payload *ExecutionPayload) ID() BlockID {
Expand Down Expand Up @@ -307,22 +309,23 @@ func BlockAsPayload(bl *types.Block, shanghaiTime *uint64) (*ExecutionPayload, e
}

payload := &ExecutionPayload{
ParentHash: bl.ParentHash(),
FeeRecipient: bl.Coinbase(),
StateRoot: Bytes32(bl.Root()),
ReceiptsRoot: Bytes32(bl.ReceiptHash()),
LogsBloom: Bytes256(bl.Bloom()),
PrevRandao: Bytes32(bl.MixDigest()),
BlockNumber: Uint64Quantity(bl.NumberU64()),
GasLimit: Uint64Quantity(bl.GasLimit()),
GasUsed: Uint64Quantity(bl.GasUsed()),
Timestamp: Uint64Quantity(bl.Time()),
ExtraData: bl.Extra(),
BaseFeePerGas: Uint256Quantity(*baseFee),
BlockHash: bl.Hash(),
Transactions: opaqueTxs,
ExcessBlobGas: (*Uint64Quantity)(bl.ExcessBlobGas()),
BlobGasUsed: (*Uint64Quantity)(bl.BlobGasUsed()),
ParentHash: bl.ParentHash(),
FeeRecipient: bl.Coinbase(),
StateRoot: Bytes32(bl.Root()),
ReceiptsRoot: Bytes32(bl.ReceiptHash()),
LogsBloom: Bytes256(bl.Bloom()),
PrevRandao: Bytes32(bl.MixDigest()),
BlockNumber: Uint64Quantity(bl.NumberU64()),
GasLimit: Uint64Quantity(bl.GasLimit()),
GasUsed: Uint64Quantity(bl.GasUsed()),
Timestamp: Uint64Quantity(bl.Time()),
ExtraData: bl.Extra(),
BaseFeePerGas: Uint256Quantity(*baseFee),
BlockHash: bl.Hash(),
Transactions: opaqueTxs,
ExcessBlobGas: (*Uint64Quantity)(bl.ExcessBlobGas()),
BlobGasUsed: (*Uint64Quantity)(bl.BlobGasUsed()),
WithdrawalsRoot: bl.WithdrawalsRoot(),
}

if shanghaiTime != nil && uint64(payload.Timestamp) >= *shanghaiTime {
Expand Down
35 changes: 18 additions & 17 deletions op-service/sources/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,23 +293,24 @@ func (block *RPCBlock) ExecutionPayloadEnvelope(trustCache bool) (*eth.Execution
}

payload := &eth.ExecutionPayload{
ParentHash: block.ParentHash,
FeeRecipient: block.Coinbase,
StateRoot: eth.Bytes32(block.Root),
ReceiptsRoot: eth.Bytes32(block.ReceiptHash),
LogsBloom: block.Bloom,
PrevRandao: eth.Bytes32(block.MixDigest), // mix-digest field is used for prevRandao post-merge
BlockNumber: block.Number,
GasLimit: block.GasLimit,
GasUsed: block.GasUsed,
Timestamp: block.Time,
ExtraData: eth.BytesMax32(block.Extra),
BaseFeePerGas: eth.Uint256Quantity(baseFee),
BlockHash: block.Hash,
Transactions: opaqueTxs,
Withdrawals: block.Withdrawals,
BlobGasUsed: block.BlobGasUsed,
ExcessBlobGas: block.ExcessBlobGas,
ParentHash: block.ParentHash,
FeeRecipient: block.Coinbase,
StateRoot: eth.Bytes32(block.Root),
ReceiptsRoot: eth.Bytes32(block.ReceiptHash),
LogsBloom: block.Bloom,
PrevRandao: eth.Bytes32(block.MixDigest), // mix-digest field is used for prevRandao post-merge
BlockNumber: block.Number,
GasLimit: block.GasLimit,
GasUsed: block.GasUsed,
Timestamp: block.Time,
ExtraData: eth.BytesMax32(block.Extra),
BaseFeePerGas: eth.Uint256Quantity(baseFee),
BlockHash: block.Hash,
Transactions: opaqueTxs,
Withdrawals: block.Withdrawals,
BlobGasUsed: block.BlobGasUsed,
ExcessBlobGas: block.ExcessBlobGas,
WithdrawalsRoot: block.WithdrawalsRoot,
}

return &eth.ExecutionPayloadEnvelope{
Expand Down
2 changes: 2 additions & 0 deletions op-wheel/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ func rollupFromGethConfig(cfg *params.ChainConfig) *rollup.Config {
CanyonTime: cfg.CanyonTime,
EcotoneTime: cfg.EcotoneTime,
GraniteTime: cfg.GraniteTime,
HoloceneTime: cfg.HoloceneTime,
IsthmusTime: cfg.IsthmusTime,
InteropTime: cfg.InteropTime,
}
}
Expand Down