validation

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: LGPL-3.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

View Source
const (
	MaxPayloadSize          = 3 * 1024
	MaxPayloadSizeUpgrade11 = 3 * 1024 * 1024

	GodValidUntilNetworkSize = 10
)
View Source
const (
	InBlockTx = TxType(1)
	MempoolTx = TxType(2)
	InboundTx = TxType(3)
)

Variables

View Source
var (
	NodeAlreadyActivated = errors.New("node is already in validator set")
	InvalidSignature     = errors.New("invalid signature")
	InvalidNonce         = errors.New("invalid nonce")
	InvalidEpoch         = errors.New("invalid epoch")
	InvalidAmount        = errors.New("invalid amount")
	InsufficientFunds    = errors.New("insufficient funds")
	InsufficientInvites  = errors.New("insufficient invites")
	RecipientRequired    = errors.New("recipient is required")
	InvitationIsMissing  = errors.New("invitation is missing")
	EmptyPayload         = errors.New("payload can't be empty")
	InvalidPayload       = errors.New("invalid payload")
	InvalidRecipient     = errors.New("invalid recipient")
	EarlyTx              = errors.New("tx can't be accepted due to wrong period")
	LateTx               = errors.New("tx can't be accepted due to validation ceremony")
	NotCandidate         = errors.New("user is not a candidate")
	InsufficientFlips    = errors.New("insufficient flips")
	IsAlreadyOnline      = errors.New("identity is already online or has pending online status")
	IsAlreadyOffline     = errors.New("identity is already offline or has pending offline status")
	DuplicatedFlip       = errors.New("duplicated flip")
	DuplicatedFlipPair   = errors.New("flip with these words already exists")
	BigFee               = errors.New("current fee is greater than tx max fee")
	InvalidMaxFee        = errors.New("invalid max fee")
	TooHighMaxFee        = errors.New("too high max fee")
	InvalidSender        = errors.New("invalid sender")
	FlipIsMissing        = errors.New("flip is missing")
	DuplicatedTx         = errors.New("duplicated tx")
	NegativeValue        = errors.New("value must be non-negative")
	SenderHasDelegatee   = errors.New("sender has delegatee already")
	SenderHasNoDelegatee = errors.New("sender has no delegatee")
	WrongEpoch           = errors.New("wrong epoch")
	InvalidDeployAmount  = errors.New("insufficient amount to create contract")
	SenderHasPenalty     = errors.New("sender has penalty")
)

Functions

func SetAppConfig added in v0.24.0

func SetAppConfig(cfg *config.Config)

func ValidateFee

func ValidateFee(appState *appstate.AppState, tx *types.Transaction, txType TxType, minFeePerGas *big.Int) error

func ValidateTx

func ValidateTx(appState *appstate.AppState, tx *types.Transaction, minFeePerGas *big.Int, txType TxType) error

Types

type TxType added in v0.19.2

type TxType = int

Jump to

Keyboard shortcuts

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