Repository navigation
Description
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:
optimism/rust/op-reth/crates/rpc/src/eth/receipt.rs
Lines 355 to 364 in 7e0c801
| 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:
optimism/rust/op-revm/src/transaction.rs
Lines 48 to 56 in 7e0c801
| 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:
optimism/rust/alloy-op-evm/src/block/mod.rs
Lines 1257 to 1264 in 7e0c801
| // 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
- The Jovian spec skips deposits in the block's
daFootprint, and its receipts section sets the receipt'sblobGasUsedto "the DA footprint of the transaction". The spec does not spell out the value for a deposit; zero is the reading under which the receipts of a block sum to the header'sblobGasUsed. - op-geth left
blobGasUsedanddaFootprintGasScalarunset on deposit receipts:
https://github.com/ethereum-optimism/op-geth/blob/79e9d244748a1201fe686ca8a882b5fe7e173348/core/types/receipt_opstack.go#L33-L52
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
Activity