avalanchego icon indicating copy to clipboard operation
avalanchego copied to clipboard

Continuous Staking 2 - Dropping Pending Validators

Open abi87 opened this issue 1 year ago • 1 comments

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:

  1. Immediately insert a current staker when AddValidatorTx is verified, instead of a pending one
  2. Immediately insert a current staker when AddSubnetValidatorTx is verified, instead of a pending one
  3. Immediately insert a current staker when AddPermssionlessValidatorTx is verified, instead of a pending one
  4. Immediately insert a current staker when AddDelegatorTx is verified, instead of a pending one
  5. Immediately insert a current staker when AddPermssionlessDelegatorTx is verified, instead of a pending one
  6. 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.

abi87 avatar Apr 20 '23 08:04 abi87

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.

github-actions[bot] avatar Mar 31 '24 00:03 github-actions[bot]