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 Address deserialization compatibility #3307

Merged
merged 1 commit into from
Feb 21, 2023
Merged

Conversation

lehins
Copy link
Collaborator

@lehins lehins commented Feb 21, 2023

Description

Starting with Babbage era it is not possible to decode a TxOut with a bad address, such as one that had trailing junk data or a Ptr address with values that are too large or trailed with junk. That being said, prior to Babbage there was a few Ptrs that violated those restrictions and thus need to be supported. This PR fixes this backwards compatibility of retaining buggy behavior for older eras:

  • Implement lenient Ptr decoding
  • Improve BabbageTxOut serialization

Checklist

  • Commit sequence broadly makes sense
  • Commits have useful messages
  • New tests are added if needed and existing tests are updated
  • Any changes are noted in the changelog
  • Code is formatted with fourmolu (which can be run with scripts/fourmolize.sh)
  • Cabal files are formatted (which can be done with scripts/cabal-format.sh)
  • Self-reviewed the diff

@lehins lehins force-pushed the lehins/lenient-ptr branch 3 times, most recently from c60c491 to 6f01a09 Compare February 21, 2023 19:11
* Lenient Ptr decoding
* Improve BabbageTxOut serialization
@lehins lehins force-pushed the lehins/lenient-ptr branch from 6f01a09 to 8bcc614 Compare February 21, 2023 19:38
@lehins lehins requested a review from JaredCorduan February 21, 2023 19:42
Copy link
Contributor

@JaredCorduan JaredCorduan left a comment

Choose a reason for hiding this comment

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

LGTM! so nice that this is all the past now 😌

@lehins lehins enabled auto-merge February 21, 2023 20:05
@lehins lehins merged commit 8f4f351 into master Feb 21, 2023
@iohk-bors iohk-bors bot deleted the lehins/lenient-ptr branch February 21, 2023 21:12
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