avalanchego
avalanchego copied to clipboard
Continuous Staking 2 - Dropping Pending Validators
Why this should be merged
No more pending validators. To add a validator we should specify just its duration, not start/end time anymore. Staking will start as soon as validatorTx is accepted.
How this works
First off, this PR is based off https://github.com/ava-labs/avalanchego/pull/1530
Its content:
- Immediately insert a current staker when AddValidatorTx is verified, instead of a pending one
- Immediately insert a current staker when AddSubnetValidatorTx is verified, instead of a pending one
- Immediately insert a current staker when AddPermssionlessValidatorTx is verified, instead of a pending one
- Immediately insert a current staker when AddDelegatorTx is verified, instead of a pending one
- Immediately insert a current staker when AddPermssionlessDelegatorTx is verified, instead of a pending one
- Introduce continuous staking fork handling in mempool. Post Continuous fork the won't be need to distinguish stakerTxs from other since we won't need to drop the stakerTxs starting too far away in the future
How this was tested
CI + extra UTs for now. Missing fork enabling in testnet and some more e2e tests.
This PR has become stale because it has been open for 30 days with no activity. Adding the lifecycle/frozen
label will cause this PR to ignore lifecycle events.