executor

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBondingPeriod = errors.New("validator in bonding period")

ErrBondingPeriod is returned when a validator is in the bonding period.

View Source
var ErrCommitteeJoinLimitExceeded = errors.New(
	"the maximum stake joining the committee can't be more than 1/3 of the committee's total stake")

ErrCommitteeJoinLimitExceeded indicates that at each height, the maximum stake joining the committee can't be more than 1/3 of the committee's total stake.

View Source
var ErrCommitteeLeaveLimitExceeded = errors.New(
	"the maximum stake leaving the committee can't be more than 1/3 of the committee's total stake")

ErrCommitteeLeaveLimitExceeded indicates that at each height, the maximum stake leaving the committee can't be more than 1/3 of the committee's total stake.

View Source
var ErrExpiredSortition = errors.New("expired sortition")

ErrExpiredSortition indicates that the sortition transaction is duplicated or expired.

View Source
var ErrInsufficientFunds = errors.New("insufficient funds")

ErrInsufficientFunds indicates that the balance is insufficient for the transaction.

View Source
var ErrInvalidSortitionProof = errors.New("invalid sortition proof")

ErrInvalidSortitionProof indicates that the sortition proof is invalid.

View Source
var ErrOldestValidatorNotProposed = errors.New("oldest validator has not proposed any block yet")

ErrOldestValidatorNotProposed indicates that the oldest validator has not proposed any block yet.

View Source
var ErrPublicKeyAlreadySet = errors.New("public key is already set")

ErrPublicKeyAlreadySet indicates that the public key has already been set for the given validator.

View Source
var ErrPublicKeyNotSet = errors.New("public key is not set")

ErrPublicKeyNotSet indicates that the public key is not set for the initial Bond transaction.

View Source
var ErrUnbondingPeriod = errors.New("validator in unbonding period")

ErrUnbondingPeriod is returned when a validator is in the unbonding period.

View Source
var ErrValidatorBonded = errors.New("validator is bonded")

ErrValidatorBonded indicates that the validator is bonded.

View Source
var ErrValidatorInCommittee = errors.New("validator is in the committee")

ErrValidatorInCommittee indicates that the validator is in the committee.

View Source
var ErrValidatorUnbonded = errors.New("validator has unbonded")

ErrValidatorUnbonded indicates that the validator has unbonded.

Functions

This section is empty.

Types

type AccountNotFoundError

type AccountNotFoundError struct {
	Address crypto.Address
}

AccountNotFoundError is raised when the given address has no associated account.

func (AccountNotFoundError) Error

func (e AccountNotFoundError) Error() string

type BatchTransferExecutor

type BatchTransferExecutor struct {
	// contains filtered or unexported fields
}

func (*BatchTransferExecutor) Check

func (e *BatchTransferExecutor) Check(_ bool) error

func (*BatchTransferExecutor) Execute

func (e *BatchTransferExecutor) Execute()

type BondExecutor

type BondExecutor struct {
	// contains filtered or unexported fields
}

func (*BondExecutor) Check

func (e *BondExecutor) Check(strict bool) error

func (*BondExecutor) Execute

func (e *BondExecutor) Execute()

type Executor

type Executor interface {
	Check(strict bool) error
	Execute()
}

func MakeExecutor

func MakeExecutor(trx *tx.Tx, sbx sandbox.Sandbox) (Executor, error)

type InvalidPayloadTypeError

type InvalidPayloadTypeError struct {
	PayloadType payload.Type
}

InvalidPayloadTypeError is returned when the transaction payload type is not valid.

func (InvalidPayloadTypeError) Error

func (e InvalidPayloadTypeError) Error() string

type MaximumStakeError

type MaximumStakeError struct {
	Maximum amount.Amount
}

MaximumStakeError is returned when the validator's stake exceeds the maximum stake limit.

func (MaximumStakeError) Error

func (e MaximumStakeError) Error() string

type SmallStakeError

type SmallStakeError struct {
	Minimum amount.Amount
}

SmallStakeError is returned when the stake amount is less than the minimum stake.

func (SmallStakeError) Error

func (e SmallStakeError) Error() string

type SortitionExecutor

type SortitionExecutor struct {
	// contains filtered or unexported fields
}

func (*SortitionExecutor) Check

func (e *SortitionExecutor) Check(strict bool) error

func (*SortitionExecutor) Execute

func (e *SortitionExecutor) Execute()

type TransferExecutor

type TransferExecutor struct {
	// contains filtered or unexported fields
}

func (*TransferExecutor) Check

func (e *TransferExecutor) Check(_ bool) error

func (*TransferExecutor) Execute

func (e *TransferExecutor) Execute()

type UnbondExecutor

type UnbondExecutor struct {
	// contains filtered or unexported fields
}

func (*UnbondExecutor) Check

func (e *UnbondExecutor) Check(strict bool) error

func (*UnbondExecutor) Execute

func (e *UnbondExecutor) Execute()

type ValidatorNotFoundError

type ValidatorNotFoundError struct {
	Address crypto.Address
}

ValidatorNotFoundError is raised when the given address has no associated validator.

func (ValidatorNotFoundError) Error

func (e ValidatorNotFoundError) Error() string

type WithdrawExecutor

type WithdrawExecutor struct {
	// contains filtered or unexported fields
}

func (*WithdrawExecutor) Check

func (e *WithdrawExecutor) Check(_ bool) error

func (*WithdrawExecutor) Execute

func (e *WithdrawExecutor) Execute()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL