Skip to content

op-reth: deposit receipts report a non-zero blobGasUsed from Jovian #24222

Closed

Description

@sebastianst

From Jovian, op-reth's eth_getTransactionReceipt reports a non-zero blobGasUsed on deposit receipts. A deposit has no DA footprint, so the field should be zero there. This affects RPC output only: the block's DA footprint in the header's blobGasUsed skips deposits and is correct.

Found by reading the code while comparing the Go and Rust receipt JSON (#24223); not reproduced against a running node.

Where

The RPC receipt builder computes the footprint for every transaction once Jovian is active, with no check for a deposit:

if chain_spec.is_jovian_active_at_timestamp(timestamp) {
// Estimate the transaction's DA footprint from its encoded size and footprint scalar.
// Jovian specs: <https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/jovian/exec-engine.md#da-footprint-block-limit>
let tx_da_footprint = tx_da_footprint(
tx_signed,
l1_block_info.da_footprint_gas_scalar.unwrap_or_default().into(),
);
core_receipt.blob_gas_used = Some(tx_da_footprint);
}

encoded_tx_da_footprint returns zero only for a post-exec transaction. For a deposit it returns estimated size * scalar, which is at least 100 * scalar:

pub fn encoded_tx_da_footprint(encoded_2718: &[u8], da_footprint_gas_scalar: u64) -> u64 {
if encoded_2718.first() == Some(&POST_EXEC_TX_TYPE_ID) {
return 0;
}
estimate_tx_compressed_size(encoded_2718)
.saturating_div(1_000_000)
.saturating_mul(da_footprint_gas_scalar)
}

The block executor skips deposits when it sums the block's footprint, which is why the header is right:

// Update DA footprint if Jovian is active
if self.spec.is_jovian_active_at_timestamp(self.evm.block().timestamp().saturating_to()) &&
!is_deposit &&
!is_post_exec
{
// Add to DA footprint used
self.da_footprint_used = self.da_footprint_used.saturating_add(blob_gas_used);
}

Expected

Proposed fix

Skip deposits in the receipt builder, or have encoded_tx_da_footprint return zero for a deposit as it does for a post-exec transaction, and add a receipt test for a deposit in a Jovian block. Decide in the same change whether a deposit receipt carries daFootprintGasScalar and the L1 fee fields at all: op-reth sets them, op-geth did not, and the spec is silent.

🤖 Co-created with Claude Opus 5.5 and Claude Fable 5.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions