Skip to content

op-reth: Fix serialization/deserialization for Deposit Receipts#37

Merged
refcell merged 1 commit intoclabby/op-rethfrom
brianbland/op-fix-receipt-tests
Aug 1, 2023
Merged

op-reth: Fix serialization/deserialization for Deposit Receipts#37
refcell merged 1 commit intoclabby/op-rethfrom
brianbland/op-fix-receipt-tests

Conversation

@BrianBland
Copy link
Collaborator

@BrianBland BrianBland commented Jul 31, 2023

  • Encode/decode optional Receipt.deposit_nonce field for Deposit transaction receipts
    • Increases the length of the RLP list by 1 element when a deposit nonce is present.
  • Ensure that the appropriate RLP length is written for all non-legacy transaction receipts, including Deposits
  • Add custom implementation of arbitrary and arbitrary_with for the Receipt type, ensuring that Receipt.deposit_nonce is only Some whenever the transaction type is TxType::DEPOSIT

Open questions:

  • Is there a simpler way to define this arbitrary/arbitrary_with strategy leveraging the existing main_codec macro?

Fixes the following tests:

reth-eth-wire types::receipts::ReceiptsTests::proptest

@BrianBland BrianBland changed the title Fix serialization/deserialization for Deposit Receipts op-reth: Fix serialization/deserialization for Deposit Receipts Jul 31, 2023
@BrianBland BrianBland force-pushed the brianbland/op-fix-receipt-tests branch from 4fa2f26 to 22431ce Compare July 31, 2023 23:37
@refcell refcell merged commit 4e62e9e into clabby/op-reth Aug 1, 2023
@emhane emhane deleted the brianbland/op-fix-receipt-tests branch September 25, 2025 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants