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

Add lenient decoder for Addr #3903

Merged
merged 7 commits into from
Dec 5, 2023
Merged

Add lenient decoder for Addr #3903

merged 7 commits into from
Dec 5, 2023

Conversation

lehins
Copy link
Collaborator

@lehins lehins commented Dec 1, 2023

Description

Fixes #3898

Besides addition of extra functions that do lenient address decoding this PR also deprecates deserialiseAddr, because:

  • semantics of that function has silently changed back in Alonzo, which has a potential to affect some clinets
  • it is used in cardano-api, hydra and db-sync
  • it is redundant, since decodeAddr is a more general version of that function

Other changes in this PR:

  • Improve Addr decoding benchmark
  • Switch to strict StateT: tiny barely noticeable improvement in performance
  • Remove modules that have been deprecated for a long time
  • Deprecate mkRwdAcnt as useless

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
    versioning process.
  • The version bounds in .cabal files for all affected packages are updated. If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
  • All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages. New section is never added with the code changes. (See RELEASING.md)
  • Code is formatted with fourmolu (use scripts/fourmolize.sh)
  • Cabal files are formatted (use scripts/cabal-format.sh)
  • hie.yaml has been updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

Copy link
Contributor

@teodanciu teodanciu left a comment

Choose a reason for hiding this comment

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

Looks good to me

@lehins lehins force-pushed the lehins/make-decodeAddr-lenient branch from e8e2305 to a6f129c Compare December 5, 2023 09:40
Copy link
Contributor

@Soupstraw Soupstraw left a comment

Choose a reason for hiding this comment

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

LGTM

@lehins lehins merged commit cbbf874 into master Dec 5, 2023
9 of 14 checks passed
@iohk-bors iohk-bors bot deleted the lehins/make-decodeAddr-lenient branch December 5, 2023 11:47
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.

cardano-ledger-core's decodeAddr / deserialiseAddr fail to deserialize mainnet pointer address
3 participants