Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make TransactionReceipt::transaction_hash field mandatory #337

Merged
merged 3 commits into from
Mar 18, 2024

Conversation

klkvr
Copy link
Member

@klkvr klkvr commented Mar 18, 2024

Motivation

Option initially came from Reth, but it should be mandatory

Ref https://github.com/ethereum/go-ethereum/blob/ba2dd9385c2a51134e520083dc732787a813b107/core/types/receipt.go#L62-L62

Solution

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@klkvr klkvr force-pushed the klkvr/mandatory-receipt branch from bc973c4 to 2203d3d Compare March 18, 2024 15:54
Copy link
Member

@prestwich prestwich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before we make this change, there were some concessions made to the goofy optimism deposit transaction format. are we absolutely certain that this is not one of those concessions?

@klkvr
Copy link
Member Author

klkvr commented Mar 18, 2024

per https://specs.optimism.io/protocol/deposits.html#deposit-receipt:

Transaction receipts use standard typing as per EIP-2718. The Deposit transaction receipt type is equal to a regular receipt, but extended with an optional depositNonce field.

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, this should not be optional.

a tx must have a hash

@mattsse mattsse merged commit 148fbe0 into alloy-rs:main Mar 18, 2024
16 checks passed
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.

4 participants