diff --git a/go.mod b/go.mod index 88a407573ec28..a55711bdd7970 100644 --- a/go.mod +++ b/go.mod @@ -308,7 +308,7 @@ require ( lukechampine.com/blake3 v1.3.0 // indirect ) -replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101603.3-rc.2 +replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101603.3-rc.3 // replace github.com/ethereum/go-ethereum => ../op-geth diff --git a/go.sum b/go.sum index 47f8bcda3e0f2..4e96d52c1a727 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.101603.3-rc.2 h1:v0c3vZHGdxrzTRK98sBhTs9FB/6EBpQWC9A5RPt3kS0= -github.com/ethereum-optimism/op-geth v1.101603.3-rc.2/go.mod h1:Wiy9cngs7ll1slc/dcHHRVuGhozWOpF1y6f31xENR7k= +github.com/ethereum-optimism/op-geth v1.101603.3-rc.3 h1:KGpZouRMsMcl9MWOmYKJi+XR1gTT9/2STANv1G7oaNA= +github.com/ethereum-optimism/op-geth v1.101603.3-rc.3/go.mod h1:Wiy9cngs7ll1slc/dcHHRVuGhozWOpF1y6f31xENR7k= 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= diff --git a/op-acceptance-tests/tests/jovian/da_footprint_test.go b/op-acceptance-tests/tests/jovian/da_footprint_test.go index d10b2514c4347..c5cab44d32e1a 100644 --- a/op-acceptance-tests/tests/jovian/da_footprint_test.go +++ b/op-acceptance-tests/tests/jovian/da_footprint_test.go @@ -141,6 +141,7 @@ func TestDAFootprint(gt *testing.T) { for _, tc := range cases { t.Run(tc.name, func(t devtest.T) { + require := t.Require() if tc.setScalar != nil { rec := env.setDAFootprintGasScalarViaSystemConfig(t, *tc.setScalar) // Wait for change to propagate to L2 @@ -178,7 +179,7 @@ func TestDAFootprint(gt *testing.T) { info := sys.L2EL.WaitForUnsafe(func(info eth.BlockInfo) (bool, error) { blockGasUsed := info.GasUsed() blobGasUsed := info.BlobGasUsed() - t.Require().NotNil(blobGasUsed, "blobGasUsed must not be nil for Jovian chains") + require.NotNil(blobGasUsed, "blobGasUsed must not be nil for Jovian chains") blockDAFootprint = *blobGasUsed if blockDAFootprint <= blockGasUsed { t.Logf("Block %s has DA footprint (%d) <= gasUsed (%d), trying next...", @@ -194,18 +195,26 @@ func TestDAFootprint(gt *testing.T) { }) _, txs, err := ethClient.InfoAndTxsByHash(t.Ctx(), info.Hash()) - t.Require().NoError(err) + require.NoError(err) + _, receipts, err := sys.L2EL.Escape().L2EthExtendedClient().FetchReceipts(t.Ctx(), info.Hash()) + require.NoError(err) var totalDAFootprint uint64 - for _, tx := range txs { + for i, tx := range txs { if tx.IsDepositTx() { continue } - totalDAFootprint += tx.RollupCostData().EstimatedDASize().Uint64() * uint64(tc.expected) + recScalar := receipts[i].DAFootprintGasScalar + require.NotNil(recScalar, "nil receipt DA footprint gas scalar") + require.EqualValues(tc.expected, *recScalar, "DA footprint gas scalar mismatch in receipt") + + txDAFootprint := tx.RollupCostData().EstimatedDASize().Uint64() * uint64(tc.expected) + require.Equal(txDAFootprint, receipts[i].BlobGasUsed, "tx DA footprint mismatch with receipt") + totalDAFootprint += txDAFootprint } t.Logf("Block %s has header/calculated DA footprint %d/%d", eth.ToBlockID(info), blockDAFootprint, totalDAFootprint) - t.Require().Equal(totalDAFootprint, blockDAFootprint, "Calculated DA footprint doesn't match block header DA footprint") + require.Equal(totalDAFootprint, blockDAFootprint, "Calculated DA footprint doesn't match block header DA footprint") // Check base fee calculation of next block // Calculate expected base fee as: @@ -226,7 +235,7 @@ func TestDAFootprint(gt *testing.T) { t.Logf("Expected base fee: %s", baseFee) next := sys.L2EL.WaitForBlockNumber(info.NumberU64() + 1) - t.Require().Equal(baseFee, next.BaseFee(), "Wrong base fee") + require.Equal(baseFee, next.BaseFee(), "Wrong base fee") }) } } diff --git a/op-e2e/actions/proofs/jovian_dafootprint_test.go b/op-e2e/actions/proofs/jovian_dafootprint_test.go index a75fdd3cc710d..b8ba00388a80c 100644 --- a/op-e2e/actions/proofs/jovian_dafootprint_test.go +++ b/op-e2e/actions/proofs/jovian_dafootprint_test.go @@ -139,14 +139,21 @@ func Test_ProgramAction_JovianDAFootprint(gt *testing.T) { header := blk.Header() require.NotNil(t, header.BlobGasUsed, "blobGasUsed must be set on Jovian blocks") blockDAFootprint := *header.BlobGasUsed + receipts := env.Engine.L2Chain().GetReceiptsByHash(header.Hash()) // Compute expected DA footprint from the actual included txs (skip deposits and system txs) var expectedDAFootprint uint64 - for _, tx := range blk.Transactions() { + for i, tx := range blk.Transactions() { if tx.IsDepositTx() { continue } - expectedDAFootprint += tx.RollupCostData().EstimatedDASize().Uint64() * uint64(effectiveScalar) + recScalar := receipts[i].DAFootprintGasScalar + require.NotNil(t, recScalar, "nil receipt DA footprint gas scalar") + require.EqualValues(t, effectiveScalar, *recScalar, "DA footprint gas scalar mismatch in receipt") + + txDAFootprint := tx.RollupCostData().EstimatedDASize().Uint64() * uint64(effectiveScalar) + require.Equal(t, txDAFootprint, receipts[i].BlobGasUsed, "tx DA footprint mismatch with receipt") + expectedDAFootprint += txDAFootprint } require.Equal(t, expectedDAFootprint, blockDAFootprint, "DA footprint mismatch with header") require.Less(t, blockDAFootprint, gasLimit, "DA footprint should be below gas limit")