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 @@ -256,7 +256,7 @@ require (
rsc.io/tmplfunc v0.0.3 // indirect
)

replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101503.0-rc.1
replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101503.0-rc.2

//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 @@ -192,8 +192,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.0-rc.1 h1:8qSXpCfLvLIPlkmwO4J+J9chi9NgZlhRckVJEjxS5Lg=
github.com/ethereum-optimism/op-geth v1.101503.0-rc.1/go.mod h1:QUo3fn+45vWqJWzJW+rIzRHUV7NmhhHLPdI87mAn1M8=
github.com/ethereum-optimism/op-geth v1.101503.0-rc.2 h1:CHIF+1pENaamq7jq8LZOTQ1FVJ+U2EzNM9iVAr9Lgi8=
github.com/ethereum-optimism/op-geth v1.101503.0-rc.2/go.mod h1:QUo3fn+45vWqJWzJW+rIzRHUV7NmhhHLPdI87mAn1M8=
github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20250228185245-d4bb112dc979 h1:P37l7EFCz5KxE20+yPa3LWiH2Cg+xx6lQ4mOKYCZFPs=
github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20250228185245-d4bb112dc979/go.mod h1:NZ816PzLU1TLv1RdAvYAb6KWOj4Zm5aInT0YpDVml2Y=
github.com/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHEwTNA=
Expand Down
11 changes: 11 additions & 0 deletions op-chain-ops/genesis/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,12 @@ type UpgradeScheduleDeployConfig struct {
// Set it to 0 to activate at genesis. Nil to disable Interop.
L2GenesisInteropTimeOffset *hexutil.Uint64 `json:"l2GenesisInteropTimeOffset,omitempty"`

// Optional Forks

// L2GenesisPectraBlobScheduleTimeOffset is the number of seconds after genesis block that the PectraBlobSchedule fix activates.
// Set it to 0 to activate at genesis. Nil to disable the PectraBlobSchedule fix.
L2GenesisPectraBlobScheduleTimeOffset *hexutil.Uint64 `json:"l2GenesisPectraBlobScheduleTimeOffset,omitempty"`

// When Cancun activates. Relative to L1 genesis.
L1CancunTimeOffset *hexutil.Uint64 `json:"l1CancunTimeOffset,omitempty"`
// When Prague activates. Relative to L1 genesis.
Expand Down Expand Up @@ -493,6 +499,10 @@ func (d *UpgradeScheduleDeployConfig) HoloceneTime(genesisTime uint64) *uint64 {
return offsetToUpgradeTime(d.L2GenesisHoloceneTimeOffset, genesisTime)
}

func (d *UpgradeScheduleDeployConfig) PectraBlobScheduleTime(genesisTime uint64) *uint64 {
return offsetToUpgradeTime(d.L2GenesisPectraBlobScheduleTimeOffset, genesisTime)
}

func (d *UpgradeScheduleDeployConfig) IsthmusTime(genesisTime uint64) *uint64 {
return offsetToUpgradeTime(d.L2GenesisIsthmusTimeOffset, genesisTime)
}
Expand Down Expand Up @@ -1036,6 +1046,7 @@ func (d *DeployConfig) RollupConfig(l1StartBlock *types.Header, l2GenesisBlockHa
FjordTime: d.FjordTime(l1StartTime),
GraniteTime: d.GraniteTime(l1StartTime),
HoloceneTime: d.HoloceneTime(l1StartTime),
PectraBlobScheduleTime: d.PectraBlobScheduleTime(l1StartTime),
IsthmusTime: d.IsthmusTime(l1StartTime),
InteropTime: d.InteropTime(l1StartTime),
ProtocolVersionsAddress: d.ProtocolVersionsProxy,
Expand Down
19 changes: 11 additions & 8 deletions op-e2e/actions/helpers/l1_miner.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ func (s *L1Miner) ActL1StartBlock(timeDelta uint64) Action {

if s.l1Cfg.Config.IsCancun(header.Number, header.Time) {
header.BlobGasUsed = new(uint64)
header.ExcessBlobGas = new(uint64)
excessBlobGas := eip4844.CalcExcessBlobGas(s.l1Cfg.Config, parent, header.Time)
header.ExcessBlobGas = &excessBlobGas
root := crypto.Keccak256Hash([]byte("fake-beacon-block-root"), header.Number.Bytes())
header.ParentBeaconRoot = &root

Expand Down Expand Up @@ -206,6 +207,7 @@ func (s *L1Miner) ActL1SetFeeRecipient(coinbase common.Address) {

// ActL1EndBlock finishes the new L1 block, and applies it to the chain as unsafe block
func (s *L1Miner) ActL1EndBlock(t Testing) *types.Block {
t.Helper()
if !s.l1Building {
t.InvalidAction("cannot end L1 block when not building block")
return nil
Expand All @@ -220,14 +222,14 @@ func (s *L1Miner) ActL1EndBlock(t Testing) *types.Block {
withdrawals = make([]*types.Withdrawal, 0)
}

block := types.NewBlock(s.l1BuildingHeader, &types.Body{Transactions: s.L1Transactions, Withdrawals: withdrawals}, s.l1Receipts, trie.NewStackTrie(nil), types.DefaultBlockConfig)
isCancun := s.l1Cfg.Config.IsCancun(s.l1BuildingHeader.Number, s.l1BuildingHeader.Time)
if isCancun {
parent := s.l1Chain.GetHeaderByHash(s.l1BuildingHeader.ParentHash)
excessBlobGas := eip4844.CalcExcessBlobGas(s.l1Cfg.Config, parent, s.l1BuildingHeader.Time)
s.l1BuildingHeader.ExcessBlobGas = &excessBlobGas
if s.l1Cfg.Config.IsPrague(s.l1BuildingHeader.Number, s.l1BuildingHeader.Time) {
// Don't process requests for now.
s.l1BuildingHeader.RequestsHash = &types.EmptyRequestsHash
}

block := types.NewBlock(s.l1BuildingHeader, &types.Body{Transactions: s.L1Transactions, Withdrawals: withdrawals}, s.l1Receipts, trie.NewStackTrie(nil), types.DefaultBlockConfig)

isCancun := s.l1Cfg.Config.IsCancun(s.l1BuildingHeader.Number, s.l1BuildingHeader.Time)
// Write state changes to db
root, err := s.l1BuildingState.Commit(s.l1BuildingHeader.Number.Uint64(), s.l1Cfg.Config.IsEIP158(s.l1BuildingHeader.Number), isCancun)
if err != nil {
Expand All @@ -246,12 +248,13 @@ func (s *L1Miner) ActL1EndBlock(t Testing) *types.Block {
}
_, err = s.l1Chain.InsertChain(types.Blocks{block})
if err != nil {
t.Fatalf("failed to insert block into l1 chain")
t.Fatalf("failed to insert block into l1 chain: %v", err)
}
return block
}

func (s *L1Miner) ActEmptyBlock(t Testing) *types.Block {
t.Helper()
s.ActL1StartBlock(12)(t)
return s.ActL1EndBlock(t)
}
Expand Down
10 changes: 10 additions & 0 deletions op-e2e/actions/proofs/helpers/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,3 +231,13 @@ func NewOpProgramCfg(
dfault.DependencySet = fi.DependencySet
return dfault
}

// BatchAndMine batches the current unsafe chain to L1 and mines the L1 block containing the
// batcher transaction.
func (env *L2FaultProofEnv) BatchAndMine(t helpers.Testing) {
t.Helper()
env.Batcher.ActSubmitAll(t)
env.Miner.ActL1StartBlock(12)(t)
env.Miner.ActL1IncludeTxByHash(env.Batcher.LastSubmitted.Hash())(t)
env.Miner.ActL1EndBlock(t)
}
23 changes: 23 additions & 0 deletions op-e2e/actions/proofs/helpers/matrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import (
"testing"

"github.com/ethereum-optimism/optimism/op-e2e/e2eutils"
"github.com/ethereum-optimism/optimism/op-program/client/claim"
"github.com/ethereum/go-ethereum/common"
)

type RunTest[cfg any] func(t *testing.T, testCfg *TestCfg[cfg])
Expand Down Expand Up @@ -75,6 +77,27 @@ func (ts *TestMatrix[cfg]) AddTestCase(
return ts
}

func (ts *TestMatrix[cfg]) AddDefaultTestCases(
testCfg cfg,
forkMatrix ForkMatrix,
runTest RunTest[cfg],
) *TestMatrix[cfg] {
return ts.AddTestCase(
"HonestClaim",
testCfg,
forkMatrix,
runTest,
ExpectNoError(),
).AddTestCase(
"JunkClaim",
testCfg,
forkMatrix,
runTest,
ExpectError(claim.ErrClaimNotValid),
WithL2Claim(common.HexToHash("0xdeadbeef")),
)
}

type Hardfork struct {
Name string
Precedence int
Expand Down
136 changes: 136 additions & 0 deletions op-e2e/actions/proofs/pectra_blob_schedule_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
package proofs_test

import (
"testing"

"github.com/ethereum-optimism/optimism/op-chain-ops/genesis"
actionsHelpers "github.com/ethereum-optimism/optimism/op-e2e/actions/helpers"
"github.com/ethereum-optimism/optimism/op-e2e/actions/proofs/helpers"
legacybindings "github.com/ethereum-optimism/optimism/op-e2e/bindings"
"github.com/ethereum-optimism/optimism/op-service/eth"
"github.com/ethereum-optimism/optimism/op-service/predeploys"
"github.com/stretchr/testify/require"

"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common/hexutil"
)

type pectraBlobScheduleTestCfg struct {
offset *uint64
expectCancunBBF bool
}

func TestPectraBlobSchedule(gt *testing.T) {
matrix := helpers.NewMatrix[any]()
defer matrix.Run(gt)

matrix.AddDefaultTestCases(
// aligned with an L1 timestamp
pectraBlobScheduleTestCfg{ptr(uint64(24)), true},
helpers.NewForkMatrix(helpers.Holocene),
testPectraBlobSchedule,
).AddDefaultTestCases(
// in the middle between two L1 timestamps
pectraBlobScheduleTestCfg{ptr(uint64(18)), true},
helpers.NewForkMatrix(helpers.Holocene),
testPectraBlobSchedule,
).AddDefaultTestCases(
pectraBlobScheduleTestCfg{nil, false},
helpers.NewForkMatrix(helpers.Holocene),
testPectraBlobSchedule,
)
}

func testPectraBlobSchedule(gt *testing.T, testCfg *helpers.TestCfg[any]) {
tcfg := testCfg.Custom.(pectraBlobScheduleTestCfg) // two flavors of this test
t := actionsHelpers.NewDefaultTesting(gt)
testSetup := func(dc *genesis.DeployConfig) {
dc.L1PragueTimeOffset = ptr(hexutil.Uint64(0))
dc.L2GenesisPectraBlobScheduleTimeOffset = (*hexutil.Uint64)(tcfg.offset)
// set genesis excess blob gas so there are >0 blob base fees for some blocks
dc.L1GenesisBlockExcessBlobGas = ptr(hexutil.Uint64(1e8))
}

env := helpers.NewL2FaultProofEnv(t, testCfg, helpers.NewTestParams(), helpers.NewBatcherCfg(), testSetup)

// sanity check
if tcfg.offset != nil {
require.Equal(t, *env.Sd.RollupCfg.PectraBlobScheduleTime, env.Sd.L2Cfg.Timestamp+*tcfg.offset)
}

engine := env.Engine
sequencer := env.Sequencer
miner := env.Miner

l1_0 := miner.L1Chain().CurrentHeader()
t.Logf("Header0: Number: %v, Time: %v, ExcessBlobGas: %v", l1_0.Number, l1_0.Time, *l1_0.ExcessBlobGas)
require.NotZero(t, *l1_0.ExcessBlobGas)
require.Equal(t, env.Sd.L2Cfg.Timestamp, l1_0.Time, "we assume L1 and L2 genesis have the same time")

ethCl := engine.EthClient()
l1Block, err := legacybindings.NewL1Block(predeploys.L1BlockAddr, ethCl)
require.NoError(t, err)

miner.ActEmptyBlock(t)
l1_1 := miner.L1Chain().CurrentHeader()
t.Logf("Header1: Number: %v, Time: %v, ExcessBlobGas: %v", l1_1.Number, l1_1.Time, *l1_1.ExcessBlobGas)
if tcfg.offset != nil {
require.Less(t, l1_1.Time, *env.Sd.RollupCfg.PectraBlobScheduleTime)
}

sequencer.ActL1HeadSignal(t)
sequencer.ActBuildToL1HeadUnsafe(t)

cancunBBF1 := eth.CalcBlobFeeCancun(*l1_1.ExcessBlobGas)
pragueBBF1 := eth.CalcBlobFeeDefault(l1_1)
// Make sure they differ.
require.Less(t, pragueBBF1.Uint64(), cancunBBF1.Uint64())
opts := &bind.CallOpts{}
bbf1, err := l1Block.BlobBaseFee(opts)
require.NoError(t, err)
t.Logf("BlobBaseFee1: %v", bbf1)
// This is the critical assertion of this test. With the PectraBlobSchedule set, the blob
// base fee is still calculated using the Cancun schedule, without it with the same as the
// Prague schedule of L1.
if tcfg.expectCancunBBF {
require.Equal(t, cancunBBF1, bbf1)
} else {
require.Equal(t, pragueBBF1, bbf1)
}

miner.ActEmptyBlock(t)
l1_2 := miner.L1Chain().CurrentHeader()
t.Logf("Header2: Number: %v, Time: %v, ExcessBlobGas: %v", l1_2.Number, l1_2.Time, *l1_2.ExcessBlobGas)
if tcfg.offset != nil {
if *tcfg.offset%12 == 0 {
require.Equal(t, l1_2.Time, *env.Sd.RollupCfg.PectraBlobScheduleTime)
} else {
require.Greater(t, l1_2.Time, *env.Sd.RollupCfg.PectraBlobScheduleTime)
}
}

sequencer.ActL1HeadSignal(t)
sequencer.ActBuildToL1HeadUnsafe(t)

cancunBBF2 := eth.CalcBlobFeeCancun(*l1_2.ExcessBlobGas)
pragueBBF2 := eth.CalcBlobFeeDefault(l1_2)
require.Less(t, pragueBBF2.Uint64(), cancunBBF2.Uint64())
bbf2, err := l1Block.BlobBaseFee(opts)
require.NoError(t, err)
t.Logf("BlobBaseFee2: %v", bbf2)
require.Equal(t, pragueBBF2, bbf2)
l2UnsafeHead := env.Engine.L2Chain().CurrentHeader()

env.BatchAndMine(t)
env.Sequencer.ActL1HeadSignal(t)
env.Sequencer.ActL2PipelineFull(t)

l2SafeHead := env.Engine.L2Chain().CurrentSafeBlock()
require.Equal(t, eth.HeaderBlockID(l2SafeHead), eth.HeaderBlockID(l2UnsafeHead), "derivation leads to the same block")

env.RunFaultProofProgram(t, l2SafeHead.Number.Uint64(), testCfg.CheckResult, testCfg.InputParams...)
}

func ptr[T any](v T) *T {
return &v
}
30 changes: 15 additions & 15 deletions op-e2e/actions/proofs/simple_program_test.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
package proofs
package proofs_test

import (
"testing"

"github.com/ethereum-optimism/optimism/op-batcher/flags"
"github.com/ethereum-optimism/optimism/op-chain-ops/genesis"
actionsHelpers "github.com/ethereum-optimism/optimism/op-e2e/actions/helpers"
"github.com/ethereum-optimism/optimism/op-e2e/actions/proofs/helpers"
"github.com/ethereum-optimism/optimism/op-program/client/claim"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/stretchr/testify/require"
)

func runSimpleProgramTest(gt *testing.T, testCfg *helpers.TestCfg[any]) {
t := actionsHelpers.NewDefaultTesting(gt)
env := helpers.NewL2FaultProofEnv(t, testCfg, helpers.NewTestParams(), helpers.NewBatcherCfg())
testSetup := func(dc *genesis.DeployConfig) {
dc.L1PragueTimeOffset = ptr(hexutil.Uint64(0))
// Set non-trivial excess blob gas so that the L1 miner's blob logic is
// properly tested.
dc.L1GenesisBlockExcessBlobGas = ptr(hexutil.Uint64(1e8))
}
bcfg := helpers.NewBatcherCfg(func(c *actionsHelpers.BatcherCfg) {
c.DataAvailabilityType = flags.BlobsType
})
env := helpers.NewL2FaultProofEnv(t, testCfg, helpers.NewTestParams(), bcfg, testSetup)

// Build an empty block on L2
env.Sequencer.ActL2StartBlock(t)
Expand Down Expand Up @@ -47,19 +57,9 @@ func Test_ProgramAction_SimpleEmptyChain(gt *testing.T) {
matrix := helpers.NewMatrix[any]()
defer matrix.Run(gt)

matrix.AddTestCase(
"HonestClaim",
matrix.AddDefaultTestCases(
nil,
helpers.LatestForkOnly,
runSimpleProgramTest,
helpers.ExpectNoError(),
)
matrix.AddTestCase(
"JunkClaim",
nil,
helpers.LatestForkOnly,
runSimpleProgramTest,
helpers.ExpectError(claim.ErrClaimNotValid),
helpers.WithL2Claim(common.HexToHash("0xdeadbeef")),
)
}
1 change: 1 addition & 0 deletions op-e2e/e2eutils/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,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)),
PectraBlobScheduleTime: deployConf.PectraBlobScheduleTime(uint64(deployConf.L1GenesisBlockTimestamp)),
IsthmusTime: deployConf.IsthmusTime(uint64(deployConf.L1GenesisBlockTimestamp)),
InteropTime: deployConf.InteropTime(uint64(deployConf.L1GenesisBlockTimestamp)),
AltDAConfig: pcfg,
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 @@ -671,6 +671,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)),
PectraBlobScheduleTime: cfg.DeployConfig.PectraBlobScheduleTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)),
IsthmusTime: cfg.DeployConfig.IsthmusTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)),
InteropTime: cfg.DeployConfig.InteropTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)),
ProtocolVersionsAddress: cfg.L1Deployments.ProtocolVersionsProxy,
Expand Down
2 changes: 2 additions & 0 deletions op-node/chaincfg/chains_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ var sepoliaCfg = rollup.Config{
FjordTime: u64Ptr(1716998400),
GraniteTime: u64Ptr(1723478400),
HoloceneTime: u64Ptr(1732633200),
PectraBlobScheduleTime: u64Ptr(1742486400),
ProtocolVersionsAddress: common.HexToAddress("0x79ADD5713B383DAa0a138d3C4780C7A1804a8090"),
ChainOpConfig: defaultOpConfig,
}
Expand Down Expand Up @@ -152,6 +153,7 @@ var sepoliaDev0Cfg = rollup.Config{
FjordTime: u64Ptr(1715961600),
GraniteTime: u64Ptr(1723046400),
HoloceneTime: u64Ptr(1731682800),
PectraBlobScheduleTime: u64Ptr(1742486400),
ProtocolVersionsAddress: common.HexToAddress("0x252CbE9517F731C618961D890D534183822dcC8d"),
ChainOpConfig: defaultOpConfig,
}
Expand Down
13 changes: 13 additions & 0 deletions op-node/rollup/derive/l1_block_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,19 @@ func L1InfoDeposit(rollupCfg *rollup.Config, sysCfg eth.SystemConfig, seqNumber
if isEcotoneButNotFirstBlock(rollupCfg, l2Timestamp) {
isIsthmusActivated := isIsthmusButNotFirstBlock(rollupCfg, l2Timestamp)
l1BlockInfo.BlobBaseFee = block.BlobBaseFee()

// Apply Cancun blob base fee calculation if this chain needs the L1 Pectra
// blob schedule fix (mostly Holesky and Sepolia OP-Stack chains).
if t := rollupCfg.PectraBlobScheduleTime; t != nil && block.Time() < *t {
if ebg := block.ExcessBlobGas(); ebg != nil {
l1BlockInfo.BlobBaseFee = eth.CalcBlobFeeCancun(*ebg)
} else {
// If L1 isn't on Cancun yet. It should already have been set
// to nil above in this case anyways.
l1BlockInfo.BlobBaseFee = nil
}
}

if l1BlockInfo.BlobBaseFee == nil {
// The L2 spec states to use the MIN_BLOB_GASPRICE from EIP-4844 if not yet active on L1.
l1BlockInfo.BlobBaseFee = big.NewInt(1)
Expand Down
Loading