-
Notifications
You must be signed in to change notification settings - Fork 302
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
stake: index consensus set based on minimum stake requirement #3609
Conversation
6eea34f
to
a2da79a
Compare
a2da79a
to
7cc75c8
Compare
I haven't looked at the changes in detail yet, but I wanted to make one initial comment:
This is a non-goal of the change, the point of introducing the Defined state is that we don't want to make extensive changes to the staking component state machine we already have, we just want to gate access to it. That's why Defined is a new "precursor" state. Similarly, we don't want to create new indexes for validators above the minimum threshold. We want to use the indexes we already have. |
Thanks for giving it a look, let me try to workshop an alternative. Currently, we have:
I don't think we can escape adding another index because even if we gate access to
The entry point for transitions in-out of the precursor
|
We discussed this and will go with the original approach because the alternative approach outlined in the previous comment is more complicated. To understand why, walk through the case where a validator is Another thing, is that we don't actually have a validator index. We have a |
There are some "architectural" TODOs that I plan to tackle as part of #3615. |
This is a work-in-progress, here is a high-level overview of what this PR does:
min_validator_stake
stake parameters specifying the minimum amount of stake required for a validator to beInactive
(default is100penumbra
).Defined
state for validator that is the initial state for all post-genesis validatorsconsensus_set
nonverifiable index that tracks the identity keys of validators that have reached a minimum stake thresholdvalidator_list_*
methods that returns (and collect) every validator definition.1This is the current validator state machine diagram:
Footnotes
The idea here is to keep a state key that stores all validator definitions, but abrogate direct iteration on that store (because it could be really large). ↩