Skip to content

Conversation

teodanciu
Copy link
Contributor

Description

Whenever we register or re-register a pool, starting with version 11, we check that the provided VRF key is not in use by another pool.
When we reap the pools, we also forget their VRF keys, so they become free to be used again.
Resolves #5159

Checklist

  • Commits in meaningful sequence and with useful messages.
  • Tests added or updated when needed.
  • CHANGELOG.md files updated for packages with externally visible changes.
    NOTE: New section is never added with the code changes. (See RELEASING.md).
  • Versions updated in .cabal and CHANGELOG.md files when necessary, according to the
    versioning process.
  • Version bounds in .cabal files updated when necessary.
    NOTE: If bounds change in a cabal file, that package itself must have a version increase. (See RELEASING.md).
  • Code formatted (use scripts/fourmolize.sh).
  • Cabal files formatted (use scripts/cabal-format.sh).
  • CDDL files are up to date (use scripts/gen-cddl.sh)
  • hie.yaml updated (use scripts/gen-hie.sh).
  • Self-reviewed the diff.

@teodanciu teodanciu force-pushed the td/no-duplicate-vrf-keys branch 11 times, most recently from 2d09168 to d6fa6b0 Compare August 13, 2025 20:57
@teodanciu teodanciu marked this pull request as ready for review August 13, 2025 21:07
@teodanciu teodanciu requested a review from a team as a code owner August 13, 2025 21:07
@teodanciu teodanciu force-pushed the td/no-duplicate-vrf-keys branch from d6fa6b0 to 9fedfb0 Compare August 14, 2025 10:58
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.

This is an awesome PR. I love all the additions to the test suite.

However, it is missing one critical part. Once we hard fork into protocol version 11, the contents of psVRFKeyHashes will be empty, which will totally screw up the whole logic in this PR.
We need to also adjust the HARDFORK rule to populate that field with data from all of the psStakePools and psFutureStakePools on the hard fork boundary.

@teodanciu teodanciu force-pushed the td/no-duplicate-vrf-keys branch 2 times, most recently from d51288f to 7d99298 Compare August 18, 2025 12:42
@teodanciu teodanciu force-pushed the td/no-duplicate-vrf-keys branch 5 times, most recently from 1091e1f to d112625 Compare August 20, 2025 23:14
@teodanciu teodanciu requested a review from lehins August 20, 2025 23:27
@teodanciu teodanciu force-pushed the td/no-duplicate-vrf-keys branch 2 times, most recently from b019185 to 71e0b15 Compare August 21, 2025 12:26
@teodanciu teodanciu force-pushed the td/no-duplicate-vrf-keys branch 2 times, most recently from 6ab76ba to 66d6026 Compare August 21, 2025 16:29
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.

This is a beautiful piece of work!
Thank you!

@teodanciu teodanciu force-pushed the td/no-duplicate-vrf-keys branch from 66d6026 to 7e3ce50 Compare August 21, 2025 23:07
@teodanciu teodanciu force-pushed the td/no-duplicate-vrf-keys branch from 7e3ce50 to a5543c1 Compare August 21, 2025 23:08
@teodanciu teodanciu enabled auto-merge August 21, 2025 23:09
@teodanciu teodanciu merged commit 02212d8 into master Aug 22, 2025
119 of 121 checks passed
@teodanciu teodanciu deleted the td/no-duplicate-vrf-keys branch August 22, 2025 00:48
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.

Disallow different pools to use the same VRF key.
3 participants