Skip to content

superchain-registry: update import (chain cfg genesis struct) #15390

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

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from
Draft
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
10 changes: 5 additions & 5 deletions devnet-sdk/testing/testlib/validators/validators_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestValidators(t *testing.T) {
},
},
config: &params.ChainConfig{
Optimism: &params.OptimismConfig{},
FeeParams: &params.FeeParamsConfig{},
IsthmusTime: Uint64Ptr(0),
},
nodes: []system.Node{
Expand Down Expand Up @@ -97,7 +97,7 @@ func TestValidators(t *testing.T) {
&mockL2Chain{
mockChain: mockChain{
config: &params.ChainConfig{
Optimism: &params.OptimismConfig{},
FeeParams: &params.FeeParamsConfig{},
IsthmusTime: Uint64Ptr(50),
},
nodes: []system.Node{
Expand Down Expand Up @@ -131,7 +131,7 @@ func TestValidators(t *testing.T) {
&mockL2Chain{
mockChain: mockChain{
config: &params.ChainConfig{
Optimism: &params.OptimismConfig{},
FeeParams: &params.FeeParamsConfig{},
IsthmusTime: Uint64Ptr(150),
},
nodes: []system.Node{
Expand Down Expand Up @@ -159,7 +159,7 @@ func TestValidators(t *testing.T) {
&mockL2Chain{
mockChain: mockChain{
config: &params.ChainConfig{
Optimism: &params.OptimismConfig{},
FeeParams: &params.FeeParamsConfig{},
IsthmusTime: Uint64Ptr(150), // Activates after current timestamp
},
nodes: []system.Node{
Expand Down Expand Up @@ -193,7 +193,7 @@ func TestValidators(t *testing.T) {
&mockL2Chain{
mockChain: mockChain{
config: &params.ChainConfig{
Optimism: &params.OptimismConfig{},
FeeParams: &params.FeeParamsConfig{},
IsthmusTime: Uint64Ptr(50),
},
nodes: []system.Node{
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ require (
rsc.io/tmplfunc v0.0.3 // indirect
)

replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101503.4-rc.1
replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v0.0.0-20250414141518-15b48c2a8165

//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 @@ -204,8 +204,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.101503.4-rc.1 h1:ddcoFOmABL7bwz6b0pllSE4Org9iFTwMN6r1G6NRy3w=
github.com/ethereum-optimism/op-geth v1.101503.4-rc.1/go.mod h1:QUo3fn+45vWqJWzJW+rIzRHUV7NmhhHLPdI87mAn1M8=
github.com/ethereum-optimism/op-geth v0.0.0-20250414141518-15b48c2a8165 h1:02rQWFJ3B4KMk55s8ZSw0lKhw0KmrhGa9phJ+6py2xI=
github.com/ethereum-optimism/op-geth v0.0.0-20250414141518-15b48c2a8165/go.mod h1:QUo3fn+45vWqJWzJW+rIzRHUV7NmhhHLPdI87mAn1M8=
github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20250314162817-2c60e5723c64 h1:teDhU4h4ryaE8rSBl+vJJiwKHjxdnnHPkKZ9iNr2R8k=
github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20250314162817-2c60e5723c64/go.mod h1:NZ816PzLU1TLv1RdAvYAb6KWOj4Zm5aInT0YpDVml2Y=
github.com/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHEwTNA=
Expand Down
4 changes: 2 additions & 2 deletions op-batcher/batcher/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -919,15 +919,15 @@ func (l *BatchSubmitter) blobTxCandidate(data txData) (*txmgr.TxCandidate, error
"size", size, "last_size", lastSize, "num_blobs", len(blobs))
l.Metr.RecordBlobUsedBytes(lastSize)
return &txmgr.TxCandidate{
To: &l.RollupConfig.BatchInboxAddress,
To: &l.RollupConfig.Genesis.SystemConfig.BatchInboxAddr,
Blobs: blobs,
}, nil
}

func (l *BatchSubmitter) calldataTxCandidate(data []byte) *txmgr.TxCandidate {
l.Log.Info("Building Calldata transaction candidate", "size", len(data))
return &txmgr.TxCandidate{
To: &l.RollupConfig.BatchInboxAddress,
To: &l.RollupConfig.Genesis.SystemConfig.BatchInboxAddr,
TxData: data,
}
}
Expand Down
2 changes: 1 addition & 1 deletion op-batcher/batcher/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func TestBatchSubmitter_sendTx_FloorDataGas(t *testing.T) {
},
}
candidate := txmgr.TxCandidate{
To: &bs.RollupConfig.BatchInboxAddress,
To: &bs.RollupConfig.Genesis.SystemConfig.BatchInboxAddr,
TxData: txData.CallData(),
}

Expand Down
2 changes: 1 addition & 1 deletion op-chain-ops/cmd/check-ecotone/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ func checkBlobTxDenial(ctx context.Context, env *actionEnv) error {
return fmt.Errorf("failed to retrieve rollup config: %w", err)
}
txData := &types.BlobTx{
To: rollupCfg.BatchInboxAddress,
To: rollupCfg.Genesis.SystemConfig.BatchInboxAddr,
Data: nil,
Gas: params.TxGas, // intrinsic gas only
BlobHashes: blobHashes,
Expand Down
6 changes: 3 additions & 3 deletions op-chain-ops/genesis/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ func (d *DeployConfig) RollupConfig(l1StartBlock *eth.BlockRef, l2GenesisBlockHa
return nil, errors.New("SystemConfigProxy cannot be address(0)")
}

chainOpConfig := &params.OptimismConfig{
chainFeeParams := &params.FeeParamsConfig{
EIP1559Elasticity: d.EIP1559Elasticity,
EIP1559Denominator: d.EIP1559Denominator,
EIP1559DenominatorCanyon: &d.EIP1559DenominatorCanyon,
Expand Down Expand Up @@ -1040,14 +1040,14 @@ func (d *DeployConfig) RollupConfig(l1StartBlock *eth.BlockRef, l2GenesisBlockHa
},
L2Time: l1StartBlock.Time,
SystemConfig: d.GenesisSystemConfig(),
FeeParams: chainFeeParams,
},
BlockTime: d.L2BlockTime,
MaxSequencerDrift: d.MaxSequencerDrift,
SeqWindowSize: d.SequencerWindowSize,
ChannelTimeoutBedrock: d.ChannelTimeoutBedrock,
L1ChainID: new(big.Int).SetUint64(d.L1ChainID),
L2ChainID: new(big.Int).SetUint64(d.L2ChainID),
BatchInboxAddress: d.BatchInboxAddress,
DepositContractAddress: d.OptimismPortalProxy,
L1SystemConfigAddress: d.SystemConfigProxy,
RegolithTime: d.RegolithTime(l1StartTime),
Expand All @@ -1063,7 +1063,6 @@ func (d *DeployConfig) RollupConfig(l1StartBlock *eth.BlockRef, l2GenesisBlockHa
InteropTime: d.InteropTime(l1StartTime),
ProtocolVersionsAddress: d.ProtocolVersionsProxy,
AltDAConfig: altDA,
ChainOpConfig: chainOpConfig,
}, nil
}

Expand All @@ -1072,6 +1071,7 @@ func (d *DeployConfig) RollupConfig(l1StartBlock *eth.BlockRef, l2GenesisBlockHa
func (d *DeployConfig) GenesisSystemConfig() eth.SystemConfig {
return eth.SystemConfig{
BatcherAddr: d.BatchSenderAddress,
BatchInboxAddr: d.BatchInboxAddress,
Overhead: eth.Bytes32(common.BigToHash(new(big.Int).SetUint64(d.GasPriceOracleOverhead))),
Scalar: d.FeeScalar(),
GasLimit: uint64(d.L2GenesisBlockGasLimit),
Expand Down
2 changes: 1 addition & 1 deletion op-chain-ops/genesis/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func NewL2Genesis(config *DeployConfig, l1StartHeader *eth.BlockRef) (*core.Gene
JovianTime: config.JovianTime(l1StartTime),
PragueTime: config.IsthmusTime(l1StartTime),
InteropTime: config.InteropTime(l1StartTime),
Optimism: &params.OptimismConfig{
FeeParams: &params.FeeParamsConfig{
EIP1559Denominator: eip1559Denom,
EIP1559Elasticity: eip1559Elasticity,
EIP1559DenominatorCanyon: &eip1559DenomCanyon,
Expand Down
2 changes: 1 addition & 1 deletion op-chain-ops/script/script.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func NewHost(
HoloceneTime: nil,
JovianTime: nil,
InteropTime: nil,
Optimism: nil,
FeeParams: nil,
}

// Create an in-memory database, to host our temporary script state changes
Expand Down
10 changes: 5 additions & 5 deletions op-conductor/conductor/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ func mockConfig(t *testing.T) Config {
},
L2Time: now,
SystemConfig: eth.SystemConfig{
BatcherAddr: [20]byte{1},
Overhead: [32]byte{1},
Scalar: [32]byte{1},
GasLimit: 30000000,
BatcherAddr: [20]byte{1},
BatchInboxAddr: [20]byte{1, 2},
Overhead: [32]byte{1},
Scalar: [32]byte{1},
GasLimit: 30000000,
},
},
BlockTime: 2,
Expand All @@ -69,7 +70,6 @@ func mockConfig(t *testing.T) Config {
L2ChainID: big.NewInt(2),
RegolithTime: &now,
CanyonTime: &now,
BatchInboxAddress: [20]byte{1, 2},
DepositContractAddress: [20]byte{2, 3},
L1SystemConfigAddress: [20]byte{3, 4},
ProtocolVersionsAddress: [20]byte{4, 5},
Expand Down
8 changes: 4 additions & 4 deletions op-e2e/actions/helpers/l2_batcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ func (s *L2Batcher) ActL2BatchSubmitRaw(t Testing, payload []byte, txOpts ...fun
rawTx := &types.DynamicFeeTx{
ChainID: s.rollupCfg.L1ChainID,
Nonce: nonce,
To: &s.rollupCfg.BatchInboxAddress,
To: &s.rollupCfg.Genesis.SystemConfig.BatchInboxAddr,
GasTipCap: gasTipCap,
GasFeeCap: gasFeeCap,
Data: payload,
Expand All @@ -381,7 +381,7 @@ func (s *L2Batcher) ActL2BatchSubmitRaw(t Testing, payload []byte, txOpts ...fun
blobFeeCap = uint256.NewInt(params.GWei)
}
txData = &types.BlobTx{
To: s.rollupCfg.BatchInboxAddress,
To: s.rollupCfg.Genesis.SystemConfig.BatchInboxAddr,
Data: nil,
Gas: params.TxGas, // intrinsic gas only
BlobHashes: blobHashes,
Expand Down Expand Up @@ -465,7 +465,7 @@ func (s *L2Batcher) ActL2BatchSubmitMultiBlob(t Testing, numBlobs int) {
blobFeeCap = uint256.NewInt(params.GWei)
}
txData := &types.BlobTx{
To: s.rollupCfg.BatchInboxAddress,
To: s.rollupCfg.Genesis.SystemConfig.BatchInboxAddr,
Data: nil,
Gas: params.TxGas, // intrinsic gas only
BlobHashes: blobHashes,
Expand Down Expand Up @@ -561,7 +561,7 @@ func (s *L2Batcher) ActSubmitSetCodeTx(t Testing) {
nonce, err := s.l1.PendingNonceAt(t.Ctx(), s.BatcherAddr)
require.NoError(t, err, "need batcher nonce")

tx, err := PrepareSignedSetCodeTx(chainId, s.l2BatcherCfg.BatcherKey, s.l1Signer, nonce, s.rollupCfg.BatchInboxAddress, s.ReadNextOutputFrame(t))
tx, err := PrepareSignedSetCodeTx(chainId, s.l2BatcherCfg.BatcherKey, s.l1Signer, nonce, s.rollupCfg.Genesis.SystemConfig.BatchInboxAddr, s.ReadNextOutputFrame(t))
require.NoError(t, err, "need to sign tx")

t.Log("submitting EIP 7702 Set Code Batcher Transaction...")
Expand Down
2 changes: 1 addition & 1 deletion op-e2e/e2eutils/addresses.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func CollectAddresses(sd *SetupData, dp *DeployParams) (out []common.Address) {
sd.L2Cfg.Coinbase,
dp.Addresses.SequencerP2P,
predeploys.SequencerFeeVaultAddr,
sd.RollupCfg.BatchInboxAddress,
sd.RollupCfg.Genesis.SystemConfig.BatchInboxAddr,
sd.RollupCfg.Genesis.SystemConfig.BatcherAddr,
sd.RollupCfg.DepositContractAddress,
)
Expand Down
2 changes: 1 addition & 1 deletion op-e2e/e2eutils/batcher/batcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (h *Helper) SendLargeInvalidBatch(ctx context.Context) {
GasTipCap: big.NewInt(1 * params.GWei),
GasFeeCap: big.NewInt(10 * params.GWei),
Gas: 5_000_000,
To: &h.rollupCfg.BatchInboxAddress,
To: &h.rollupCfg.Genesis.SystemConfig.BatchInboxAddr,
Value: big.NewInt(0),
Data: data,
})
Expand Down
11 changes: 5 additions & 6 deletions op-e2e/e2eutils/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,18 @@ func Setup(t require.TestingT, deployParams *DeployParams, alloc *AllocParams) *
},
L2Time: uint64(deployConf.L1GenesisBlockTimestamp),
SystemConfig: SystemConfigFromDeployConfig(deployConf),
FeeParams: &params.FeeParamsConfig{
EIP1559Elasticity: deployConf.EIP1559Elasticity,
EIP1559Denominator: deployConf.EIP1559Denominator,
EIP1559DenominatorCanyon: &deployConf.EIP1559DenominatorCanyon,
},
},
BlockTime: deployConf.L2BlockTime,
MaxSequencerDrift: deployConf.MaxSequencerDrift,
SeqWindowSize: deployConf.SequencerWindowSize,
ChannelTimeoutBedrock: deployConf.ChannelTimeoutBedrock,
L1ChainID: new(big.Int).SetUint64(deployConf.L1ChainID),
L2ChainID: new(big.Int).SetUint64(deployConf.L2ChainID),
BatchInboxAddress: deployConf.BatchInboxAddress,
DepositContractAddress: deployConf.OptimismPortalProxy,
L1SystemConfigAddress: deployConf.SystemConfigProxy,
RegolithTime: deployConf.RegolithTime(uint64(deployConf.L1GenesisBlockTimestamp)),
Expand All @@ -213,11 +217,6 @@ func Setup(t require.TestingT, deployParams *DeployParams, alloc *AllocParams) *
JovianTime: deployConf.JovianTime(uint64(deployConf.L1GenesisBlockTimestamp)),
InteropTime: deployConf.InteropTime(uint64(deployConf.L1GenesisBlockTimestamp)),
AltDAConfig: pcfg,
ChainOpConfig: &params.OptimismConfig{
EIP1559Elasticity: deployConf.EIP1559Elasticity,
EIP1559Denominator: deployConf.EIP1559Denominator,
EIP1559DenominatorCanyon: &deployConf.EIP1559DenominatorCanyon,
},
}

require.NoError(t, rollupCfg.Check())
Expand Down
2 changes: 1 addition & 1 deletion op-e2e/opgeth/fastlz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func FuzzFjordCostFunction(f *testing.F) {
zeroTime := uint64(0)
// create a config where ecotone/fjord upgrades are active
config := &params.ChainConfig{
Optimism: params.OptimismTestConfig.Optimism,
FeeParams: params.OptimismTestConfig.FeeParams,
RegolithTime: &zeroTime,
EcotoneTime: &zeroTime,
FjordTime: &zeroTime,
Expand Down
13 changes: 6 additions & 7 deletions op-e2e/system/e2esys/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,12 @@ func (cfg SystemConfig) Start(t *testing.T, startOpts ...StartOption) (*System,
Hash: l2Genesis.ToBlock().Hash(),
Number: 0,
},
L2Time: uint64(cfg.DeployConfig.L1GenesisBlockTimestamp),
L2Time: uint64(cfg.DeployConfig.L1GenesisBlockTimestamp),
FeeParams: &params.FeeParamsConfig{
EIP1559Elasticity: cfg.DeployConfig.EIP1559Elasticity,
EIP1559Denominator: cfg.DeployConfig.EIP1559Denominator,
EIP1559DenominatorCanyon: &cfg.DeployConfig.EIP1559DenominatorCanyon,
},
SystemConfig: e2eutils.SystemConfigFromDeployConfig(cfg.DeployConfig),
},
BlockTime: cfg.DeployConfig.L2BlockTime,
Expand All @@ -693,7 +698,6 @@ func (cfg SystemConfig) Start(t *testing.T, startOpts ...StartOption) (*System,
ChannelTimeoutBedrock: cfg.DeployConfig.ChannelTimeoutBedrock,
L1ChainID: cfg.L1ChainIDBig(),
L2ChainID: cfg.L2ChainIDBig(),
BatchInboxAddress: cfg.DeployConfig.BatchInboxAddress,
DepositContractAddress: cfg.DeployConfig.OptimismPortalProxy,
L1SystemConfigAddress: cfg.DeployConfig.SystemConfigProxy,
RegolithTime: cfg.DeployConfig.RegolithTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)),
Expand All @@ -709,11 +713,6 @@ func (cfg SystemConfig) Start(t *testing.T, startOpts ...StartOption) (*System,
InteropTime: cfg.DeployConfig.InteropTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)),
ProtocolVersionsAddress: cfg.L1Deployments.ProtocolVersionsProxy,
AltDAConfig: rollupAltDAConfig,
ChainOpConfig: &params.OptimismConfig{
EIP1559Elasticity: cfg.DeployConfig.EIP1559Elasticity,
EIP1559Denominator: cfg.DeployConfig.EIP1559Denominator,
EIP1559DenominatorCanyon: &cfg.DeployConfig.EIP1559DenominatorCanyon,
},
}
}
defaultConfig := makeRollupConfig()
Expand Down
Loading