From c84bba8eae05831cf6a5f03e5f924fd3892733d0 Mon Sep 17 00:00:00 2001 From: syntrust Date: Fri, 7 Mar 2025 19:05:16 +0800 Subject: [PATCH 1/3] fix l2blob tests --- op-e2e/config/init.go | 5 +++-- op-program/client/l2/engineapi/block_processor.go | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/op-e2e/config/init.go b/op-e2e/config/init.go index 73a8777cf1ca1..500629d80d228 100644 --- a/op-e2e/config/init.go +++ b/op-e2e/config/init.go @@ -291,8 +291,9 @@ func initAllocType(root string, allocType AllocType) { "l2GenesisHoloceneTimeOffset": nil, "l2GenesisIsthmusTimeOffset": nil, // SWC changes - "useSoulGasToken": true, - "isSoulBackedByNative": true, + "useSoulGasToken": true, + "isSoulBackedByNative": true, + "l2GenesisBlobTimeOffset": "0x0", } upgradeSchedule := new(genesis.UpgradeScheduleDeployConfig) diff --git a/op-program/client/l2/engineapi/block_processor.go b/op-program/client/l2/engineapi/block_processor.go index 6e00a4f380dde..51cccc0bd67d3 100644 --- a/op-program/client/l2/engineapi/block_processor.go +++ b/op-program/client/l2/engineapi/block_processor.go @@ -110,6 +110,7 @@ func NewBlockProcessorFromHeader(provider BlockDataProvider, h *types.Header) (* excessBlobGas = eip4844.CalcExcessBlobGas(0, 0) } header.ExcessBlobGas = &excessBlobGas + vmenv.Context.BlobBaseFee = eip4844.CalcBlobFee(*header.ExcessBlobGas) } core.ProcessBeaconBlockRoot(*header.ParentBeaconRoot, vmenv) } From 70ed7af5a303f251a46ee78c3e05f19d3a9f1d2f Mon Sep 17 00:00:00 2001 From: syntrust Date: Tue, 18 Mar 2025 11:43:41 +0800 Subject: [PATCH 2/3] revert --- op-program/client/l2/engineapi/block_processor.go | 1 - 1 file changed, 1 deletion(-) diff --git a/op-program/client/l2/engineapi/block_processor.go b/op-program/client/l2/engineapi/block_processor.go index 915495bd38fb5..2e58a18ac2c7b 100644 --- a/op-program/client/l2/engineapi/block_processor.go +++ b/op-program/client/l2/engineapi/block_processor.go @@ -111,7 +111,6 @@ func NewBlockProcessorFromHeader(provider BlockDataProvider, h *types.Header) (* excessBlobGas = eip4844.CalcExcessBlobGas(0, 0) } header.ExcessBlobGas = &excessBlobGas - vmenv.Context.BlobBaseFee = eip4844.CalcBlobFee(*header.ExcessBlobGas) } // core.NewEVMBlockContext need to be called after the blob gas fields are set vmenv = mkEVM() From 9382b56c0370f98d2e85b976b6d80af5c011783f Mon Sep 17 00:00:00 2001 From: syntrust Date: Sat, 22 Mar 2025 11:50:13 +0800 Subject: [PATCH 3/3] fix comments --- op-e2e/actions/upgrades/dencun_fork_test.go | 6 +++--- op-e2e/config/init.go | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/op-e2e/actions/upgrades/dencun_fork_test.go b/op-e2e/actions/upgrades/dencun_fork_test.go index a84e274b591aa..60f59abedcc6e 100644 --- a/op-e2e/actions/upgrades/dencun_fork_test.go +++ b/op-e2e/actions/upgrades/dencun_fork_test.go @@ -204,7 +204,7 @@ func TestDencunBlobTxRPC(gt *testing.T) { cl := engine.EthClient() tx := aliceSimpleBlobTx(t, dp) err := cl.SendTransaction(context.Background(), tx) - require.NoError(t, err, "must accept blob tx via RPC") + require.ErrorContains(t, err, "transaction type not supported") } // TestDencunBlobTxInTxPool tries to insert a blob tx directly into the tx pool, it should not be accepted. @@ -217,7 +217,7 @@ func TestDencunBlobTxInTxPool(gt *testing.T) { engine := newEngine(t, sd, log) tx := aliceSimpleBlobTx(t, dp) errs := engine.Eth.TxPool().Add([]*types.Transaction{tx}, true, true) - require.NoError(t, errs[0], "must accept blob tx In tx pool") + require.ErrorContains(t, errs[0], "transaction type not supported") } // TestDencunBlobTxInclusion tries to send a Blob tx to the L2 engine, it should not be accepted. @@ -235,5 +235,5 @@ func TestDencunBlobTxInclusion(gt *testing.T) { sequencer.ActL2StartBlock(t) err := engine.EngineApi.IncludeTx(tx, dp.Addresses.Alice) - require.NoError(t, err, "must inlcude blob tx") + require.ErrorContains(t, err, "invalid L2 block (tx 1): failed to apply transaction to L2 block (tx 1): transaction type not supported") } diff --git a/op-e2e/config/init.go b/op-e2e/config/init.go index 500629d80d228..73a8777cf1ca1 100644 --- a/op-e2e/config/init.go +++ b/op-e2e/config/init.go @@ -291,9 +291,8 @@ func initAllocType(root string, allocType AllocType) { "l2GenesisHoloceneTimeOffset": nil, "l2GenesisIsthmusTimeOffset": nil, // SWC changes - "useSoulGasToken": true, - "isSoulBackedByNative": true, - "l2GenesisBlobTimeOffset": "0x0", + "useSoulGasToken": true, + "isSoulBackedByNative": true, } upgradeSchedule := new(genesis.UpgradeScheduleDeployConfig)