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

Prevent non-registered return accounts for proposals' deposits and TreasuryWithdrawals #4639

Conversation

aniketd
Copy link
Contributor

@aniketd aniketd commented Sep 20, 2024

Description

Closes #4605

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

@aniketd aniketd requested a review from a team as a code owner September 20, 2024 12:10
@aniketd aniketd force-pushed the aniketd/check-reward-account-for-proposal-refunds-and-treasury-withdrawals branch from 27f261a to 12085d2 Compare September 20, 2024 14:01
@aniketd aniketd requested review from teodanciu and lehins September 20, 2024 14:03
Copy link
Collaborator

@lehins lehins left a comment

Choose a reason for hiding this comment

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

Guarding against non-registered reward account requires a check on a protocol version. We cannot change validity of a transaction for PV9

@lehins lehins changed the title Prevent bad return accounts for governance proposal deposits and treasury withdrawal governance action Prevent non-registered return accounts for proposals's deposits and TreasuryWithdrawals Sep 23, 2024
@lehins lehins changed the title Prevent non-registered return accounts for proposals's deposits and TreasuryWithdrawals Prevent non-registered return accounts for proposals' deposits and TreasuryWithdrawals Sep 23, 2024
@aniketd aniketd force-pushed the aniketd/check-reward-account-for-proposal-refunds-and-treasury-withdrawals branch from 12085d2 to de6d8d8 Compare September 24, 2024 10:28
@aniketd aniketd requested a review from lehins September 24, 2024 10:28
@aniketd aniketd force-pushed the aniketd/check-reward-account-for-proposal-refunds-and-treasury-withdrawals branch from de6d8d8 to 9bab516 Compare September 24, 2024 11:12
@aniketd aniketd force-pushed the aniketd/check-reward-account-for-proposal-refunds-and-treasury-withdrawals branch 2 times, most recently from 8bb32aa to fde64e3 Compare September 25, 2024 15:51
@aniketd aniketd requested review from teodanciu and lehins September 25, 2024 15:53
Copy link
Collaborator

@lehins lehins 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. Some minor improvements are still needed though.

eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Gov.hs Outdated Show resolved Hide resolved
eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Gov.hs Outdated Show resolved Hide resolved
eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Gov.hs Outdated Show resolved Hide resolved
eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Gov.hs Outdated Show resolved Hide resolved
libs/cardano-ledger-core/CHANGELOG.md Outdated Show resolved Hide resolved
* ProposalReturnAddressDoesNotExist
* TreasuryWithdrawalReturnAddressDoesNotExist
@aniketd aniketd force-pushed the aniketd/check-reward-account-for-proposal-refunds-and-treasury-withdrawals branch from fde64e3 to c8325ca Compare October 1, 2024 15:28
@aniketd aniketd requested a review from lehins October 1, 2024 15:31
Copy link
Collaborator

@lehins lehins left a comment

Choose a reason for hiding this comment

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

Beautiful!

@lehins lehins enabled auto-merge October 1, 2024 16:54
@lehins lehins merged commit a0ccf49 into master Oct 1, 2024
168 of 169 checks passed
@lehins lehins deleted the aniketd/check-reward-account-for-proposal-refunds-and-treasury-withdrawals branch October 1, 2024 17:56
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.

Proactive protection against GovAction deposit losses
3 participants