Skip to content

Replace invalid field gas_used in expected_receipts in 7778 test #2855

@danceratopz

Description

@danceratopz

I think this is currently only a no-op. It only effects fill verification; the fixtures remain unchanged.

        expected_receipt={
            "cumulative_gas_used": refund_tx_gas_used,
        },

The gas_used field does not exist in the transition tool:

@slotted_freezable
@dataclass
class Receipt:
"""
Result of a transaction execution. Receipts are included in the receipts
trie.
"""
succeeded: bool
"""
Whether the transaction execution was successful.
"""
cumulative_gas_used: Uint
"""
Total gas used in the block up to and including this transaction.
This is the gas used after refunds, paid by the user.
"""
bloom: Bloom
"""
Bloom filter for logs generated by this transaction. This is a 2048-byte
bit array that allows for efficient filtering of logs.
"""
logs: Tuple[Log, ...]
"""
A tuple of logs generated by this transaction. Each log contains the
address of the contract that emitted it, a tuple of topics, and the data
payload.
"""
def encode_receipt(tx: Transaction, receipt: Receipt) -> Bytes | Receipt:
r"""
Encodes a transaction receipt based on the transaction type.

This requires a follow-up issue to detect in the helper. I will follow-up.

Originally posted by @danceratopz in #2840 (comment)

As I understand, the check is redundant as gas_used does not exist in t8n; it uses cumulative_gas_used (L360 above). This is a sanity check (it is not propagated to the fixtures), but is incorrectly verified in the helpers. We can fix the field here, but add a follow-up to improve the helper.

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