-
Notifications
You must be signed in to change notification settings - Fork 837
vms/platformvm: Add stakers to the current staker set on tx acceptance
#2175
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
Conversation
|
Suggestions:
|
|
Out of curiosity, why is the only way to set the duration from the difference between end time and tx acceptance time? Why not add a new Duration field and deprecate Start/End? |
Definitely not the only way to do that, just the only backward compatible way I could think of. If we had freedom to change, e.s. the AddValidatorTx format we could have dropped Start/End and introduce a Duration. However AddValidatorTxs are included in the genesis so we cannot freely modify them. Adding a second version to the codec to control what is marshalled/unmarshalled is tricky. We are left with this solution |
172c8e0 to
a6ae416
Compare
marun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making these requests formal so they don't get lost:
- Update all e2e tests to not provide Start to txs.Validator
- Update e2e tests that log validator/delegator 'start time' to reflect the switch from chosen start time to time of tx acceptance
- Remove e2e.DefaultValidatorStartTime
Hey @marun, I've finally done most of this, with the exception of the logging the staking start time. To do that I need to query P-chain state and I wonder if this would make test less readable/slower? I lean toward doing it, I like testing being as verbose as humanly possible, but would like your input before proceeding. |
|
Superseded by #2314 |
Why this should be merged
This PR implements https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/41-remove-pending-stakers.md
Post-Durango activation, any new staking transaction will create a new staker in AvalancheGo and begin validating the network once the tx is accepted. As per ACP-41, no transaction formats are modified or added.
How this works
The
StartTimefield in stakers is set to the current chain time.StartTimeis not validated post-Durango activation.Transactions are rejected if they do not satisfy
MinStakeDuration <= EndTime - CurrentTime <= MaxStakeDurationHow this was tested