Skip to content
Merged
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ require (
lukechampine.com/blake3 v1.3.0 // indirect
)

replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101603.6-rc.1
replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101604.1-0.20260109132258-733bb5b623f7

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

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ github.com/emicklei/dot v1.6.2 h1:08GN+DD79cy/tzN6uLCT84+2Wk9u+wvqP+Hkx/dIR8A=
github.com/emicklei/dot v1.6.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s=
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.4-0.20251001155152-4eb15ccedf7e h1:iy1vBIzACYUyOVyoADUwvAiq2eOPC0yVsDUdolPwQjk=
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.4-0.20251001155152-4eb15ccedf7e/go.mod h1:DYj7+vYJ4cIB7zera9mv4LcAynCL5u4YVfoeUu6Wa+w=
github.com/ethereum-optimism/op-geth v1.101603.6-rc.1 h1:C4MAM29WbeXeNELMLpX1xU6c6OIwBRNposAcl1NHvVk=
github.com/ethereum-optimism/op-geth v1.101603.6-rc.1/go.mod h1:fCNAwDynfAP6EKsmLqwSDUDgi+GtJIir74Ui3fXXMps=
github.com/ethereum-optimism/op-geth v1.101604.1-0.20260109132258-733bb5b623f7 h1:VQM98S1gNqKAFGlsqwr1TvHtYgNPM+RUkSH4ia1TG0c=
github.com/ethereum-optimism/op-geth v1.101604.1-0.20260109132258-733bb5b623f7/go.mod h1:fCNAwDynfAP6EKsmLqwSDUDgi+GtJIir74Ui3fXXMps=
github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20251121143344-5ac16e0fbb00 h1:TR5Y7B+5m63V0Dno7MHcFqv/XZByQzx/4THV1T1A7+U=
github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20251121143344-5ac16e0fbb00/go.mod h1:NZ816PzLU1TLv1RdAvYAb6KWOj4Zm5aInT0YpDVml2Y=
github.com/ethereum/c-kzg-4844/v2 v2.1.5 h1:aVtoLK5xwJ6c5RiqO8g8ptJ5KU+2Hdquf6G3aXiHh5s=
Expand Down
8 changes: 5 additions & 3 deletions op-node/rollup/attributes/engine_consolidate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ func createMismatchedFeeRecipient() matchArgs {

func createMismatchedEIP1559Params() matchArgs {
args := holoceneArgs()
args.attrs.EIP1559Params[0]++ // so denominator is != 0
// Create valid but mismatched EIP-1559 params (both denominator and elasticity must be non-zero or both zero)
copy((*args.attrs.EIP1559Params)[:], eip1559.EncodeHolocene1559Params(999, 999))
return args
}

Expand Down Expand Up @@ -575,7 +576,7 @@ func TestCheckEIP1559ParamsMatch(t *testing.T) {
desc: "err-both-zero",
attrParams: new(eth.Bytes8),
blockExtraData: make(eth.BytesMax32, 9),
err: "eip1559 parameters do not match, attributes: 250, 6 (translated from 0,0), block: 0, 0",
err: "invalid block extraData: holocene extraData must encode a non-zero denominator",
},
{
desc: "err-invalid-params",
Expand Down Expand Up @@ -609,7 +610,8 @@ func TestCheckEIP1559ParamsMatch(t *testing.T) {
HoloceneTime: &pastTime,
IsthmusTime: &pastTime,
JovianTime: &futureTime,
ChainOpConfig: defaultOpConfig}
ChainOpConfig: defaultOpConfig,
}
err := checkExtraDataParamsMatch(cfg, uint64(2), test.attrParams, nil, test.blockExtraData)
if test.err == "" {
require.NoError(t, err)
Expand Down
10 changes: 8 additions & 2 deletions op-node/rollup/derive/system_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/consensus/misc/eip1559"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/hashicorp/go-multierror"
Expand Down Expand Up @@ -33,8 +34,9 @@ var (
)

var (
ErrUnknownEventVersion = errors.New("unknown SystemConfig event version")
ErrUnknownEventType = errors.New("unknown SystemConfig event type")
ErrUnknownEventVersion = errors.New("unknown SystemConfig event version")
ErrUnknownEventType = errors.New("unknown SystemConfig event type")
ErrInvalidEIP1559Params = errors.New("invalid EIP-1559 parameters")
)

// UpdateSystemConfigWithL1Receipts filters all L1 receipts to find config updates and applies the config updates to the given sysCfg
Expand Down Expand Up @@ -234,6 +236,10 @@ func parseSystemConfigUpdateEIP1559Params(data []byte) (eth.Bytes32, error) {
if !solabi.EmptyReader(reader) {
return eth.Bytes32{}, fmt.Errorf("%w: too many bytes", ErrParsingSystemConfig)
}
// Validate the EIP-1559 params (last 8 bytes of the 32-byte value)
if err := eip1559.ValidateHolocene1559Params(params[24:32]); err != nil {
return eth.Bytes32{}, fmt.Errorf("%w: %w", ErrInvalidEIP1559Params, err)
}
return params, nil
}

Expand Down
68 changes: 68 additions & 0 deletions op-node/rollup/derive/system_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,74 @@ func TestProcessSystemConfigUpdateLogEvent(t *testing.T) {
},
err: false,
},
{
name: "EIP1559Params_ZeroDenominatorNonZeroElasticity",
log: &types.Log{
Topics: []common.Hash{
ConfigUpdateEventABIHash,
ConfigUpdateEventVersion0,
SystemConfigUpdateEIP1559Params,
},
},
hook: func(t *testing.T, log *types.Log) *types.Log {
// denominator = 0, elasticity = 1 (invalid combination)
params := []byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1}
numberData, err := oneUint256.Pack(new(big.Int).SetBytes(params))
require.NoError(t, err)
data, err := bytesArgs.Pack(numberData)
require.NoError(t, err)
log.Data = data
return log
},
config: eth.SystemConfig{},
err: true,
},
{
name: "EIP1559Params_NonZeroDenominatorZeroElasticity",
log: &types.Log{
Topics: []common.Hash{
ConfigUpdateEventABIHash,
ConfigUpdateEventVersion0,
SystemConfigUpdateEIP1559Params,
},
},
hook: func(t *testing.T, log *types.Log) *types.Log {
// denominator = 1, elasticity = 0 (invalid combination)
params := []byte{0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0}
numberData, err := oneUint256.Pack(new(big.Int).SetBytes(params))
require.NoError(t, err)
data, err := bytesArgs.Pack(numberData)
require.NoError(t, err)
log.Data = data
return log
},
config: eth.SystemConfig{},
err: true,
},
{
name: "EIP1559Params_BothZero",
log: &types.Log{
Topics: []common.Hash{
ConfigUpdateEventABIHash,
ConfigUpdateEventVersion0,
SystemConfigUpdateEIP1559Params,
},
},
hook: func(t *testing.T, log *types.Log) *types.Log {
// denominator = 0, elasticity = 0 (valid - uses pre-Holocene constants)
params := []byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
numberData, err := oneUint256.Pack(new(big.Int).SetBytes(params))
require.NoError(t, err)
data, err := bytesArgs.Pack(numberData)
require.NoError(t, err)
log.Data = data
return log
},
config: eth.SystemConfig{
EIP1559Params: eth.Bytes8{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
},
err: false,
},
{
name: "OperatorFeeParams",
log: &types.Log{
Expand Down