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 @@ -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

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
21 changes: 15 additions & 6 deletions op-acceptance-tests/tests/jovian/da_footprint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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...",
Expand All @@ -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:
Expand All @@ -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")
})
}
}
11 changes: 9 additions & 2 deletions op-e2e/actions/proofs/jovian_dafootprint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down