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

Stop reporting invalid refund when stake credential is not registered #4600

Merged
merged 8 commits into from
Sep 9, 2024

Conversation

lehins
Copy link
Collaborator

@lehins lehins commented Sep 6, 2024

Description

@teodanciu pointed out to me today that we report an invalid refund IncorrectDepositDELEG predicate failure whenever stake credential is not registered. This is at the very least confusing, so this PR fixes this.

Besides this fix this PR also improves performance:

  • by avoiding redundant UMap lookups and by making validations lazy
  • and improving performance of replay without validation, since it will not trigger those lookups.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • 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)
  • 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)
  • 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

@lehins lehins requested review from aniketd and teodanciu September 6, 2024 17:18
Copy link
Contributor

@aniketd aniketd 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! 👍 😁

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, very neat !

@lehins lehins force-pushed the lehins/cleanup-deleg-rule branch from 17eee8e to 5429379 Compare September 9, 2024 16:54
@lehins lehins enabled auto-merge September 9, 2024 16:54
It has been noticed that currently we report invalid refunds, even the
stake credential is not registered. This makes little sense, so this
commit changes this behavior.
* Which allows is to avoid passing redundant arguments
* Switch to pointfree style and avoid using same name fo rthe umap that
  is being modified
@lehins lehins force-pushed the lehins/cleanup-deleg-rule branch from 5429379 to 50c9329 Compare September 9, 2024 18:15
@lehins lehins merged commit df783ed into master Sep 9, 2024
152 of 154 checks passed
@lehins lehins deleted the lehins/cleanup-deleg-rule branch September 9, 2024 20:22
@lehins lehins mentioned this pull request Sep 23, 2024
9 tasks
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.

3 participants