Add Validator
Learn how to add validators to your Avalanche L1 blockchain.
Register a Validator
Validator registration is initiated with a call to initializeValidatorRegistration
. The sender of this transaction is registered as the validator owner. Churn limitations are checked - only a certain (configurable) percentage of the total weight is allowed to be added or removed in a (configurable) period of time. The ValidatorManager
then constructs a RegisterL1ValidatorMessage
Warp message to be sent to the P-Chain. Each validator registration request includes all of the information needed to identify the validator and its stake weight, as well as an expiry
timestamp before which the RegisterL1ValidatorMessage
must be delivered to the P-Chain. If the validator is not registered on the P-Chain before the expiry
, then the validator may be removed from the contract state by calling completeEndValidation
.
The RegisterL1ValidatorMessage
is delivered to the P-Chain as the Warp message payload of a RegisterL1ValidatorTx
. Please see the transaction specification for validity requirements. The P-Chain then signs a L1ValidatorRegistrationMessage
Warp message indicating that the specified validator was successfully registered on the P-Chain.
The L1ValidatorRegistrationMessage
is delivered to the ValidatorManager
via a call to completeValidatorRegistration
. For PoS Validator Managers, staking rewards begin accruing at this time.
(PoS only) Register a Delegator
PoSValidatorManager
supports delegation to an actively staked validator as a way for users to earn staking rewards without having to validate the chain. Delegators pay a configurable percentage fee on any earned staking rewards to the host validator. A delegator may be registered by calling initializeDelegatorRegistration
and providing an amount to stake. The delegator will be registered as long as churn restrictions are not violated. The delegator is reflected on the P-Chain by adjusting the validator's registered weight via a SetL1ValidatorWeightTx
. The weight change acknowledgement is delivered to the PoSValidatorManager
via an L1ValidatorWeightMessage
, which is provided by calling completeDelegatorRegistration
.
The P-Chain is only willing to sign an L1ValidatorWeightMessage
for an active validator. Once a validator exit has been initiated (via a call to initializeEndValidation
), the PoSValidatorManager
must assume that the validator has been deactivated on the P-Chain, and will therefore not sign any further weight updates. Therefore, it is invalid to initiate adding or removing a delegator when the validator is in this state, though it may be valid to complete an already initiated delegator action, depending on the order of delivery to the P-Chain. If the delegator weight change was submitted (and a Warp signature on the acknowledgement retrieved) before the validator was removed, then the delegator action may be completed. Otherwise, the acknowledgement of the validation end must first be delivered before completing the delegator action.
Last updated on