From 2c83f89097f424826a374249c5b95ad68f19fac7 Mon Sep 17 00:00:00 2001 From: geoknee Date: Wed, 22 Oct 2025 12:02:22 +0100 Subject: [PATCH 1/2] jovian: remove feature toggles scope is now fixed --- .../tests/jovian/min_base_fee.go | 2 +- op-chain-ops/genesis/genesis.go | 4 ++-- op-devstack/dsl/bridge.go | 2 +- .../actions/proofs/jovian_minbasefee_test.go | 4 ++-- op-node/p2p/gossip.go | 2 +- .../attributes/engine_consolidate_test.go | 2 +- op-node/rollup/derive/attributes.go | 4 ++-- .../derive/jovian_upgrade_transactions.go | 22 ++++++++----------- .../jovian_upgrade_transactions_test.go | 2 +- op-node/rollup/derive/payload_util.go | 6 ++--- op-node/rollup/interop/indexing/attributes.go | 2 +- op-node/rollup/toggles.go | 18 +++++---------- op-program/client/l2/test/miner.go | 4 ++-- 13 files changed, 31 insertions(+), 43 deletions(-) diff --git a/op-acceptance-tests/tests/jovian/min_base_fee.go b/op-acceptance-tests/tests/jovian/min_base_fee.go index 346d7783028f0..db53e7a326576 100644 --- a/op-acceptance-tests/tests/jovian/min_base_fee.go +++ b/op-acceptance-tests/tests/jovian/min_base_fee.go @@ -83,7 +83,7 @@ func (mbf *minBaseFeeEnv) verifyMinBaseFee(t devtest.T, minBase *big.Int) { // waitForMinBaseFeeConfigChangeOnL2 waits until the L2 latest payload extra-data encodes the expected min base fee. func (mbf *minBaseFeeEnv) waitForMinBaseFeeConfigChangeOnL2(t devtest.T, expected uint64) { client := mbf.l2EL.Escape().L2EthClient() - expectedExtraData := eth.BytesMax32(eip1559.EncodeMinBaseFeeExtraData(250, 6, expected)) + expectedExtraData := eth.BytesMax32(eip1559.EncodeJovianExtraData(250, 6, expected)) // Check extradata in block header (for all clients) var actualBlockExtraData []byte diff --git a/op-chain-ops/genesis/genesis.go b/op-chain-ops/genesis/genesis.go index a7a437fc172a6..e89d2e26936eb 100644 --- a/op-chain-ops/genesis/genesis.go +++ b/op-chain-ops/genesis/genesis.go @@ -23,7 +23,7 @@ const defaultGasLimit = 30_000_000 var HoloceneExtraData = eip1559.EncodeHoloceneExtraData(250, 6) // MinBaseFeeExtraData represents the default extra data for Jovian-genesis chains. -var MinBaseFeeExtraData = eip1559.EncodeMinBaseFeeExtraData(250, 6, 0) +var MinBaseFeeExtraData = eip1559.EncodeJovianExtraData(250, 6, 0) // NewL2Genesis will create a new L2 genesis func NewL2Genesis(config *DeployConfig, l1StartHeader *eth.BlockRef) (*core.Genesis, error) { @@ -123,7 +123,7 @@ func NewL2Genesis(config *DeployConfig, l1StartHeader *eth.BlockRef) (*core.Gene if optimismChainConfig.IsIsthmus(genesis.Timestamp) { genesis.Alloc[params.HistoryStorageAddress] = types.Account{Nonce: 1, Code: params.HistoryStorageCode, Balance: common.Big0} } - if optimismChainConfig.IsMinBaseFee(genesis.Timestamp) { + if optimismChainConfig.IsJovian(genesis.Timestamp) { genesis.ExtraData = MinBaseFeeExtraData } diff --git a/op-devstack/dsl/bridge.go b/op-devstack/dsl/bridge.go index 26ae4f0b84f9b..0b5ca7362e67f 100644 --- a/op-devstack/dsl/bridge.go +++ b/op-devstack/dsl/bridge.go @@ -605,7 +605,7 @@ func gasCost(rcpt *types.Receipt, rollupCfg *rollup.Config, blockTimestamp *uint } operatorCost := new(big.Int).SetUint64(rcpt.GasUsed) operatorCost.Mul(operatorCost, new(big.Int).SetUint64(*rcpt.OperatorFeeScalar)) - if rollupCfg.IsOperatorFeeFix(*blockTimestamp) { + if rollupCfg.IsJovian(*blockTimestamp) { operatorCost.Mul(operatorCost, big.NewInt(100)) } else { operatorCost.Div(operatorCost, big.NewInt(1_000_000)) diff --git a/op-e2e/actions/proofs/jovian_minbasefee_test.go b/op-e2e/actions/proofs/jovian_minbasefee_test.go index b7e5c7c5a779c..b046f3d581ee2 100644 --- a/op-e2e/actions/proofs/jovian_minbasefee_test.go +++ b/op-e2e/actions/proofs/jovian_minbasefee_test.go @@ -66,7 +66,7 @@ func Test_ProgramAction_JovianMinBaseFee(gt *testing.T) { require.True(t, isJovian, "GPO should report that Jovian is active") activationBlock := env.Engine.L2Chain().GetBlockByHash(env.Sequencer.L2Unsafe().Hash) - require.Equal(t, eip1559.EncodeMinBaseFeeExtraData(250, 6, 0), activationBlock.Extra(), "activation block should have Jovian extraData") + require.Equal(t, eip1559.EncodeJovianExtraData(250, 6, 0), activationBlock.Extra(), "activation block should have Jovian extraData") // Set the minimum base fee setMinBaseFeeViaSystemConfig(t, env, minBaseFee) @@ -87,7 +87,7 @@ func Test_ProgramAction_JovianMinBaseFee(gt *testing.T) { // Block after the SystemConfig change env.Sequencer.ActL2EmptyBlock(t) blockAfterSystemConfigChange := env.Engine.L2Chain().GetBlockByHash(env.Sequencer.L2Unsafe().Hash) - expectedJovianExtraDataWithMinFee := eip1559.EncodeMinBaseFeeExtraData(250, 6, minBaseFee) + expectedJovianExtraDataWithMinFee := eip1559.EncodeJovianExtraData(250, 6, minBaseFee) require.Equal(t, expectedJovianExtraDataWithMinFee, blockAfterSystemConfigChange.Extra(), "block should have updated Jovian extraData with min base fee") // Verify base fee is clamped diff --git a/op-node/p2p/gossip.go b/op-node/p2p/gossip.go index 2a8442a9d238f..060a776c07fdd 100644 --- a/op-node/p2p/gossip.go +++ b/op-node/p2p/gossip.go @@ -387,7 +387,7 @@ func BuildBlocksValidator(log log.Logger, cfg *rollup.Config, runCfg GossipRunti log.Warn("payload is on v3 topic, but has nil blob gas used", "bad_hash", payload.BlockHash.String()) return pubsub.ValidationReject // [REJECT] if the block is on a topic >= V3 and has a non-zero blob gas used field pre-Jovian - } else if !cfg.IsDAFootprintBlockLimit(uint64(payload.Timestamp)) && *payload.BlobGasUsed != 0 { + } else if !cfg.IsJovian(uint64(payload.Timestamp)) && *payload.BlobGasUsed != 0 { log.Warn("payload is on v3 topic, but has non-zero blob gas used", "bad_hash", payload.BlockHash.String(), "blob_gas_used", *payload.BlobGasUsed) return pubsub.ValidationReject diff --git a/op-node/rollup/attributes/engine_consolidate_test.go b/op-node/rollup/attributes/engine_consolidate_test.go index 47086c518e8c0..fe57b01d234b2 100644 --- a/op-node/rollup/attributes/engine_consolidate_test.go +++ b/op-node/rollup/attributes/engine_consolidate_test.go @@ -49,7 +49,7 @@ func jovianArgs() matchArgs { validTxData, _ = validTx.MarshalBinary() minBaseFee = uint64(1e9) - validJovianExtraData = eth.BytesMax32(eip1559.EncodeMinBaseFeeExtraData( + validJovianExtraData = eth.BytesMax32(eip1559.EncodeJovianExtraData( *defaultOpConfig.EIP1559DenominatorCanyon, defaultOpConfig.EIP1559Elasticity, minBaseFee)) validJovianEIP1559Params = new(eth.Bytes8) ) diff --git a/op-node/rollup/derive/attributes.go b/op-node/rollup/derive/attributes.go index 51cfb7829e32d..8559d1c1febaf 100644 --- a/op-node/rollup/derive/attributes.go +++ b/op-node/rollup/derive/attributes.go @@ -146,7 +146,7 @@ func (ba *FetchingAttributesBuilder) PreparePayloadAttributes(ctx context.Contex } if ba.rollupCfg.IsJovianActivationBlock(nextL2Time) { - jovian, err := JovianNetworkUpgradeTransactions(ba.rollupCfg.IsDAFootprintBlockLimit(nextL2Time), ba.rollupCfg.IsOperatorFeeFix(nextL2Time)) + jovian, err := JovianNetworkUpgradeTransactions() if err != nil { return nil, NewCriticalError(fmt.Errorf("failed to build jovian network upgrade txs: %w", err)) } @@ -206,7 +206,7 @@ func (ba *FetchingAttributesBuilder) PreparePayloadAttributes(ctx context.Contex r.EIP1559Params = new(eth.Bytes8) *r.EIP1559Params = sysConfig.EIP1559Params } - if ba.rollupCfg.IsMinBaseFee(nextL2Time) { + if ba.rollupCfg.IsJovian(nextL2Time) { r.MinBaseFee = &sysConfig.MinBaseFee } return r, nil diff --git a/op-node/rollup/derive/jovian_upgrade_transactions.go b/op-node/rollup/derive/jovian_upgrade_transactions.go index c7d544851d4f0..3feb45ca8838a 100644 --- a/op-node/rollup/derive/jovian_upgrade_transactions.go +++ b/op-node/rollup/derive/jovian_upgrade_transactions.go @@ -128,24 +128,20 @@ func OperatorFeeFixUpgradeTransactions() ([]hexutil.Bytes, error) { return upgradeTxns, nil } -func JovianNetworkUpgradeTransactions(IsDAFootprintBlockLimit, IsOperatorFeeFix bool) ([]hexutil.Bytes, error) { +func JovianNetworkUpgradeTransactions() ([]hexutil.Bytes, error) { upgradeTxs := make([]hexutil.Bytes, 0) - if IsDAFootprintBlockLimit { - txs, err := DAFootprintNetworkUpgradeTransactions() - if err != nil { - return nil, err - } - upgradeTxs = append(upgradeTxs, txs...) + txs, err := DAFootprintNetworkUpgradeTransactions() + if err != nil { + return nil, err } + upgradeTxs = append(upgradeTxs, txs...) - if IsOperatorFeeFix { - txs, err := OperatorFeeFixUpgradeTransactions() - if err != nil { - return nil, err - } - upgradeTxs = append(upgradeTxs, txs...) + txs, err = OperatorFeeFixUpgradeTransactions() + if err != nil { + return nil, err } + upgradeTxs = append(upgradeTxs, txs...) return upgradeTxs, nil } diff --git a/op-node/rollup/derive/jovian_upgrade_transactions_test.go b/op-node/rollup/derive/jovian_upgrade_transactions_test.go index eef2b2e001a51..b7970bfd01dcd 100644 --- a/op-node/rollup/derive/jovian_upgrade_transactions_test.go +++ b/op-node/rollup/derive/jovian_upgrade_transactions_test.go @@ -9,7 +9,7 @@ import ( ) func TestJovianNetworkTransactions(t *testing.T) { - upgradeTxns, err := JovianNetworkUpgradeTransactions(true, true) + upgradeTxns, err := JovianNetworkUpgradeTransactions() require.NoError(t, err) require.Len(t, upgradeTxns, 5) diff --git a/op-node/rollup/derive/payload_util.go b/op-node/rollup/derive/payload_util.go index 6e7bf11f1ca51..d7789c172338f 100644 --- a/op-node/rollup/derive/payload_util.go +++ b/op-node/rollup/derive/payload_util.go @@ -104,12 +104,10 @@ func PayloadToSystemConfig(rollupCfg *rollup.Config, payload *eth.ExecutionPaylo }) } - if rollupCfg.IsMinBaseFee(uint64(payload.Timestamp)) { + if rollupCfg.IsJovian(uint64(payload.Timestamp)) { // ValidateOptimismExtraData returning a nil error guarantees that m is not nil r.MinBaseFee = *m - } - if rollupCfg.IsDAFootprintBlockLimit(uint64(payload.Timestamp)) { - r.DAFootprintGasScalar = info.DAFootprintGasScalar + r.SetDAFootprintGasScalar(info.DAFootprintGasScalar) } return r, nil } diff --git a/op-node/rollup/interop/indexing/attributes.go b/op-node/rollup/interop/indexing/attributes.go index 28d5782ef3fb8..b0feb4348963d 100644 --- a/op-node/rollup/interop/indexing/attributes.go +++ b/op-node/rollup/interop/indexing/attributes.go @@ -54,7 +54,7 @@ func AttributesToReplaceInvalidBlock(invalidatedBlock *eth.ExecutionPayloadEnvel // unfortunately, the engine API needs the inner value, not the extra-data. // So we translate it here. extraData := invalidatedBlock.ExecutionPayload.ExtraData - denominator, elasticity, minBaseFee := eip1559.DecodeMinBaseFeeExtraData(extraData) + denominator, elasticity, minBaseFee := eip1559.DecodeJovianExtraData(extraData) eip1559Params := eth.Bytes8(eip1559.EncodeHolocene1559Params(denominator, elasticity)) attrs := ð.PayloadAttributes{ diff --git a/op-node/rollup/toggles.go b/op-node/rollup/toggles.go index d49f1c1836244..04e4a9201c8da 100644 --- a/op-node/rollup/toggles.go +++ b/op-node/rollup/toggles.go @@ -1,16 +1,10 @@ package rollup -// This file contains ephemeral feature toggles which should be removed +// This file contains ephemeral feature toggles for the next +// fork while it is in development. They should be removed // after the fork scope is locked. -func (c *Config) IsMinBaseFee(time uint64) bool { - return c.IsJovian(time) // Replace with return false to disable -} - -func (c *Config) IsDAFootprintBlockLimit(time uint64) bool { - return c.IsJovian(time) // Replace with return false to disable -} - -func (c *Config) IsOperatorFeeFix(time uint64) bool { - return c.IsJovian(time) // Replace with return false to disable -} +// Example: +// func (c *Config) IsMinBaseFee(time uint64) bool { +// return c.IsJovian(time) // Replace with return false to disable +// } diff --git a/op-program/client/l2/test/miner.go b/op-program/client/l2/test/miner.go index 3d35c996bf3f5..7c5247bc7f96e 100644 --- a/op-program/client/l2/test/miner.go +++ b/op-program/client/l2/test/miner.go @@ -122,7 +122,7 @@ func (m *Miner) Fork(t *testing.T, blockNumber uint64, attrs *eth.PayloadAttribu GasLimit: &gasLimit, EIP1559Params: &eip1559Params, } - if m.backend.Config().IsMinBaseFee(head.Time) { + if m.backend.Config().IsJovian(head.Time) { stub := uint64(1e9) attrs.MinBaseFee = &stub } @@ -146,7 +146,7 @@ func (m *Miner) MineAt(t *testing.T, head *types.Header, attrs *eth.PayloadAttri GasLimit: &gasLimit, EIP1559Params: &eip1559Params, } - if m.backend.Config().IsMinBaseFee(head.Time) { + if m.backend.Config().IsJovian(head.Time) { stub := uint64(1e9) attrs.MinBaseFee = &stub } From dabdf9e5ce6ad5e67dfb1a40c866dd9b1dc0cd6e Mon Sep 17 00:00:00 2001 From: geoknee Date: Thu, 20 Nov 2025 15:13:25 +0000 Subject: [PATCH 2/2] Updated op-geth to v1.101604.0-synctest.0.0.20251120150812-e50f80a16afc --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e43b7732082ea..d816396fec6d7 100644 --- a/go.mod +++ b/go.mod @@ -309,7 +309,7 @@ require ( lukechampine.com/blake3 v1.3.0 // indirect ) -replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101604.0-synctest.0 +replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101604.0-synctest.0.0.20251120150812-e50f80a16afc // replace github.com/ethereum/go-ethereum => ../op-geth diff --git a/go.sum b/go.sum index 9e71502956c27..c32b871a62367 100644 --- a/go.sum +++ b/go.sum @@ -238,8 +238,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.101604.0-synctest.0 h1:cWnKry8Cgworpw3X+TDEr57DCYefjN9Tmy2eJ9elMzE= -github.com/ethereum-optimism/op-geth v1.101604.0-synctest.0/go.mod h1:fCNAwDynfAP6EKsmLqwSDUDgi+GtJIir74Ui3fXXMps= +github.com/ethereum-optimism/op-geth v1.101604.0-synctest.0.0.20251120150812-e50f80a16afc h1:LjpnuhWfU8vMXq/X188xuiwG6NMDbMzwGwGArDPKk4c= +github.com/ethereum-optimism/op-geth v1.101604.0-synctest.0.0.20251120150812-e50f80a16afc/go.mod h1:fCNAwDynfAP6EKsmLqwSDUDgi+GtJIir74Ui3fXXMps= github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20251009180028-9b4658b9b7af h1:WWz0gJM/boaUImtJnROecPirAerKCLpAU4m6Tx0ArOg= github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20251009180028-9b4658b9b7af/go.mod h1:NZ816PzLU1TLv1RdAvYAb6KWOj4Zm5aInT0YpDVml2Y= github.com/ethereum/c-kzg-4844/v2 v2.1.5 h1:aVtoLK5xwJ6c5RiqO8g8ptJ5KU+2Hdquf6G3aXiHh5s=