Versions in this module Expand all Collapse all v1 v1.11.10 Jul 13, 2024 Changes in this version + const MaxFutureStartTime + const MaxValidatorWeightFactor + const SyncBound + var ErrAddDelegatorTxPostDurango = errors.New("AddDelegatorTx is not permitted post-Durango") + var ErrAddValidatorTxPostDurango = errors.New("AddValidatorTx is not permitted post-Durango") + var ErrAdvanceTimeTxIssuedAfterBanff = errors.New("AdvanceTimeTx issued after Banff") + var ErrAlreadyValidator = errors.New("already a validator") + var ErrChildBlockAfterStakerChangeTime = errors.New("proposed timestamp later than next staker change time") + var ErrChildBlockBeyondSyncBound = errors.New("proposed timestamp is too far in the future relative to local time") + var ErrChildBlockNotAfterParent = errors.New("proposed timestamp not after current chain time") + var ErrDelegateToPermissionedValidator = errors.New("delegation to permissioned validator") + var ErrDuplicateValidator = errors.New("duplicate validator") + var ErrDurangoUpgradeNotActive = errors.New("attempting to use a Durango-upgrade feature prior to activation") + var ErrFlowCheckFailed = errors.New("flow check failed") + var ErrInsufficientDelegationFee = errors.New("staker charges an insufficient delegation fee") + var ErrInvalidID = errors.New("invalid ID") + var ErrInvalidState = errors.New("generated output isn't valid state") + var ErrIsNotTransformSubnetTx = errors.New("is not a transform subnet tx") + var ErrNotValidator = errors.New("isn't a current or pending validator") + var ErrOverDelegated = errors.New("validator would be over delegated") + var ErrPeriodMismatch = errors.New("proposed staking period is not inside dependant staking period") + var ErrProposedAddStakerTxAfterBanff = errors.New("staker transaction proposed after Banff") + var ErrRemovePermissionlessValidator = errors.New("attempting to remove permissionless validator") + var ErrRemoveStakerTooEarly = errors.New("attempting to remove staker before their end time") + var ErrRemoveWrongStaker = errors.New("attempting to remove wrong staker") + var ErrShouldBePermissionlessStaker = errors.New("expected permissionless staker") + var ErrStakeOverflow = errors.New("validator stake exceeds limit") + var ErrStakeTooLong = errors.New("staking period is too long") + var ErrStakeTooShort = errors.New("staking period is too short") + var ErrTimestampNotBeforeStartTime = errors.New("chain timestamp not before start time") + var ErrWeightTooLarge = errors.New("weight of this validator is too large") + var ErrWeightTooSmall = errors.New("weight of this validator is too low") + var ErrWrongStakedAssetID = errors.New("incorrect staked assetID") + var ErrWrongTxType = errors.New("wrong transaction type") + func AdvanceTimeTo(backend *Backend, parentState state.Chain, newChainTime time.Time) (bool, error) + func GetMaxWeight(chainState state.Chain, validator *state.Staker, startTime time.Time, ...) (uint64, error) + func GetRewardsCalculator(backend *Backend, parentState state.Chain, subnetID ids.ID) (reward.Calculator, error) + func GetTransformSubnetTx(chain state.Chain, subnetID ids.ID) (*txs.TransformSubnetTx, error) + func GetValidator(state state.Chain, subnetID ids.ID, nodeID ids.NodeID) (*state.Staker, error) + func VerifyNewChainTime(newChainTime, nextStakerChangeTime, now time.Time) error + type AtomicTxExecutor struct + AtomicRequests map[ids.ID]*atomic.Requests + Inputs set.Set[ids.ID] + OnAccept state.Diff + ParentID ids.ID + StateVersions state.Versions + Tx *txs.Tx + func (*AtomicTxExecutor) AddDelegatorTx(*txs.AddDelegatorTx) error + func (*AtomicTxExecutor) AddPermissionlessDelegatorTx(*txs.AddPermissionlessDelegatorTx) error + func (*AtomicTxExecutor) AddPermissionlessValidatorTx(*txs.AddPermissionlessValidatorTx) error + func (*AtomicTxExecutor) AddSubnetValidatorTx(*txs.AddSubnetValidatorTx) error + func (*AtomicTxExecutor) AddValidatorTx(*txs.AddValidatorTx) error + func (*AtomicTxExecutor) AdvanceTimeTx(*txs.AdvanceTimeTx) error + func (*AtomicTxExecutor) BaseTx(*txs.BaseTx) error + func (*AtomicTxExecutor) CreateChainTx(*txs.CreateChainTx) error + func (*AtomicTxExecutor) CreateSubnetTx(*txs.CreateSubnetTx) error + func (*AtomicTxExecutor) RemoveSubnetValidatorTx(*txs.RemoveSubnetValidatorTx) error + func (*AtomicTxExecutor) RewardValidatorTx(*txs.RewardValidatorTx) error + func (*AtomicTxExecutor) TransferSubnetOwnershipTx(*txs.TransferSubnetOwnershipTx) error + func (*AtomicTxExecutor) TransformSubnetTx(*txs.TransformSubnetTx) error + func (e *AtomicTxExecutor) ExportTx(tx *txs.ExportTx) error + func (e *AtomicTxExecutor) ImportTx(tx *txs.ImportTx) error + type Backend struct + Bootstrapped *utils.Atomic[bool] + Clk *mockable.Clock + Config *config.Config + Ctx *snow.Context + FlowChecker utxo.Verifier + Fx fx.Fx + Rewards reward.Calculator + Uptimes uptime.Calculator + type MempoolTxVerifier struct + ParentID ids.ID + StateVersions state.Versions + Tx *txs.Tx + func (*MempoolTxVerifier) AdvanceTimeTx(*txs.AdvanceTimeTx) error + func (*MempoolTxVerifier) RewardValidatorTx(*txs.RewardValidatorTx) error + func (v *MempoolTxVerifier) AddDelegatorTx(tx *txs.AddDelegatorTx) error + func (v *MempoolTxVerifier) AddPermissionlessDelegatorTx(tx *txs.AddPermissionlessDelegatorTx) error + func (v *MempoolTxVerifier) AddPermissionlessValidatorTx(tx *txs.AddPermissionlessValidatorTx) error + func (v *MempoolTxVerifier) AddSubnetValidatorTx(tx *txs.AddSubnetValidatorTx) error + func (v *MempoolTxVerifier) AddValidatorTx(tx *txs.AddValidatorTx) error + func (v *MempoolTxVerifier) BaseTx(tx *txs.BaseTx) error + func (v *MempoolTxVerifier) CreateChainTx(tx *txs.CreateChainTx) error + func (v *MempoolTxVerifier) CreateSubnetTx(tx *txs.CreateSubnetTx) error + func (v *MempoolTxVerifier) ExportTx(tx *txs.ExportTx) error + func (v *MempoolTxVerifier) ImportTx(tx *txs.ImportTx) error + func (v *MempoolTxVerifier) RemoveSubnetValidatorTx(tx *txs.RemoveSubnetValidatorTx) error + func (v *MempoolTxVerifier) TransferSubnetOwnershipTx(tx *txs.TransferSubnetOwnershipTx) error + func (v *MempoolTxVerifier) TransformSubnetTx(tx *txs.TransformSubnetTx) error + type ProposalTxExecutor struct + OnAbortState state.Diff + OnCommitState state.Diff + Tx *txs.Tx + func (*ProposalTxExecutor) AddPermissionlessDelegatorTx(*txs.AddPermissionlessDelegatorTx) error + func (*ProposalTxExecutor) AddPermissionlessValidatorTx(*txs.AddPermissionlessValidatorTx) error + func (*ProposalTxExecutor) BaseTx(*txs.BaseTx) error + func (*ProposalTxExecutor) CreateChainTx(*txs.CreateChainTx) error + func (*ProposalTxExecutor) CreateSubnetTx(*txs.CreateSubnetTx) error + func (*ProposalTxExecutor) ExportTx(*txs.ExportTx) error + func (*ProposalTxExecutor) ImportTx(*txs.ImportTx) error + func (*ProposalTxExecutor) RemoveSubnetValidatorTx(*txs.RemoveSubnetValidatorTx) error + func (*ProposalTxExecutor) TransferSubnetOwnershipTx(*txs.TransferSubnetOwnershipTx) error + func (*ProposalTxExecutor) TransformSubnetTx(*txs.TransformSubnetTx) error + func (e *ProposalTxExecutor) AddDelegatorTx(tx *txs.AddDelegatorTx) error + func (e *ProposalTxExecutor) AddSubnetValidatorTx(tx *txs.AddSubnetValidatorTx) error + func (e *ProposalTxExecutor) AddValidatorTx(tx *txs.AddValidatorTx) error + func (e *ProposalTxExecutor) AdvanceTimeTx(tx *txs.AdvanceTimeTx) error + func (e *ProposalTxExecutor) RewardValidatorTx(tx *txs.RewardValidatorTx) error + type StandardTxExecutor struct + AtomicRequests map[ids.ID]*atomic.Requests + Inputs set.Set[ids.ID] + OnAccept func() + State state.Diff + Tx *txs.Tx + func (*StandardTxExecutor) AdvanceTimeTx(*txs.AdvanceTimeTx) error + func (*StandardTxExecutor) RewardValidatorTx(*txs.RewardValidatorTx) error + func (e *StandardTxExecutor) AddDelegatorTx(tx *txs.AddDelegatorTx) error + func (e *StandardTxExecutor) AddPermissionlessDelegatorTx(tx *txs.AddPermissionlessDelegatorTx) error + func (e *StandardTxExecutor) AddPermissionlessValidatorTx(tx *txs.AddPermissionlessValidatorTx) error + func (e *StandardTxExecutor) AddSubnetValidatorTx(tx *txs.AddSubnetValidatorTx) error + func (e *StandardTxExecutor) AddValidatorTx(tx *txs.AddValidatorTx) error + func (e *StandardTxExecutor) BaseTx(tx *txs.BaseTx) error + func (e *StandardTxExecutor) CreateChainTx(tx *txs.CreateChainTx) error + func (e *StandardTxExecutor) CreateSubnetTx(tx *txs.CreateSubnetTx) error + func (e *StandardTxExecutor) ExportTx(tx *txs.ExportTx) error + func (e *StandardTxExecutor) ImportTx(tx *txs.ImportTx) error + func (e *StandardTxExecutor) RemoveSubnetValidatorTx(tx *txs.RemoveSubnetValidatorTx) error + func (e *StandardTxExecutor) TransferSubnetOwnershipTx(tx *txs.TransferSubnetOwnershipTx) error + func (e *StandardTxExecutor) TransformSubnetTx(tx *txs.TransformSubnetTx) error