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: Support pre-658 status codes #848

Merged
merged 7 commits into from
Jun 7, 2024
Merged

Conversation

prestwich
Copy link
Member

Closes #630

Motivation

Support receipts from 2017 and earlier

Solution

  • Add an enum that covers the pre- and post-Eip658 values
  • impl serde and rlp for that enum
  • change receipt to manual serialize impl to allow for naming root or status
  • add docs warning of incorrect status behavior for old receipts

Open question

  • when serializing, should the unused field be set to null by serializing a None?

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@prestwich prestwich added the bug Something isn't working label Jun 7, 2024
@prestwich prestwich self-assigned this Jun 7, 2024
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.

eips 👍

crates/consensus/src/receipt/receipts.rs Outdated Show resolved Hide resolved
@prestwich prestwich merged commit 506edee into main Jun 7, 2024
24 checks passed
@prestwich prestwich deleted the prestwich/receipt-bool-or-hash branch June 7, 2024 19:12
ben186 pushed a commit to ben186/alloy that referenced this pull request Jul 27, 2024
* feature: Eip658Value

* feat: support pre-658 receipts

* chore: match previous behavior more closely

* fix: incorrect decode impl

* lint: fmt

* fix: root

* test: add one for root/status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Invalid encoding for pre-eip658 tx receipts
2 participants