Summary
Add support for the three new P-Chain transaction types introduced by ACP-236: Auto-Renewed Staking. This ACP replaces the current fixed-duration staking model with cycle-based auto-renewing validators.
New Transaction Types
1. AddAutoRenewedValidatorTx
Creates an auto-renewing validator position.
Parameters:
ValidatorNodeID — Node ID
Signer — BLS key
StakeOuts — Return destination for staked tokens
ValidatorRewardsOwner / DelegatorRewardsOwner — Reward distribution
Owner — Controls config updates
DelegationShares — Delegation fee (×10,000)
Wght — Validator weight
AutoCompoundRewardShares — Percentage of rewards to restake (in millionths)
Period — Cycle duration in seconds (bounded by MinStakeDuration/MaxStakeDuration)
2. SetAutoRenewedValidatorConfigTx
Modifies an existing auto-renewed validator's config. Changes take effect at cycle end.
Parameters:
TxID — Original AddAutoRenewedValidatorTx ID
Auth — Owner authorization proof
AutoCompoundRewardShares — Updated restake percentage
Period — Next cycle duration (set to 0 for graceful exit)
3. RewardAutoRenewedValidatorTx
Handles end-of-cycle reward distribution and validator continuation/exit.
Parameters:
TxID — Original validator creation tx ID
Timestamp — Cycle end time
Key Behavioral Changes
- Cycle-based staking: Uptime measured per-cycle with resets at boundaries
- Auto-compounding: Configurable portion of rewards automatically restaked
- Graceful exit: Set
Period to 0 to stop at cycle end (no immediate unstake)
- Delegator restrictions: Delegations cannot span multiple cycles
- Stake overflow: Excess beyond
MaxValidatorStake withdrawn to rewards owners
CLI Commands to Add
platform validator add-auto-renewed # AddAutoRenewedValidatorTx
platform validator set-auto-config # SetAutoRenewedValidatorConfigTx
platform validator reward-auto # RewardAutoRenewedValidatorTx (if manual trigger needed)
Implementation Notes
- Requires upstream
avalanchego SDK support for these tx types — track SDK readiness
- New tx builders needed in
pkg/pchain/
- New cobra commands in
cmd/validator.go
AutoCompoundRewardShares is expressed in millionths (1,000,000 = 100%)
Period of 0 in SetAutoRenewedValidatorConfigTx means "exit after current cycle"
- Unit tests + e2e tests against local network once avalanchego supports ACP-236
References
Summary
Add support for the three new P-Chain transaction types introduced by ACP-236: Auto-Renewed Staking. This ACP replaces the current fixed-duration staking model with cycle-based auto-renewing validators.
New Transaction Types
1.
AddAutoRenewedValidatorTxCreates an auto-renewing validator position.
Parameters:
ValidatorNodeID— Node IDSigner— BLS keyStakeOuts— Return destination for staked tokensValidatorRewardsOwner/DelegatorRewardsOwner— Reward distributionOwner— Controls config updatesDelegationShares— Delegation fee (×10,000)Wght— Validator weightAutoCompoundRewardShares— Percentage of rewards to restake (in millionths)Period— Cycle duration in seconds (bounded by MinStakeDuration/MaxStakeDuration)2.
SetAutoRenewedValidatorConfigTxModifies an existing auto-renewed validator's config. Changes take effect at cycle end.
Parameters:
TxID— OriginalAddAutoRenewedValidatorTxIDAuth— Owner authorization proofAutoCompoundRewardShares— Updated restake percentagePeriod— Next cycle duration (set to0for graceful exit)3.
RewardAutoRenewedValidatorTxHandles end-of-cycle reward distribution and validator continuation/exit.
Parameters:
TxID— Original validator creation tx IDTimestamp— Cycle end timeKey Behavioral Changes
Periodto0to stop at cycle end (no immediate unstake)MaxValidatorStakewithdrawn to rewards ownersCLI Commands to Add
Implementation Notes
avalanchegoSDK support for these tx types — track SDK readinesspkg/pchain/cmd/validator.goAutoCompoundRewardSharesis expressed in millionths (1,000,000 = 100%)Periodof0inSetAutoRenewedValidatorConfigTxmeans "exit after current cycle"References