validation

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: LGPL-3.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

View Source
const (
	MaxPayloadSize           = 3 * 1024
	GodValidUntilNetworkSize = 10
)
View Source
const (
	InBlockTx = 1
	MempoolTx = 2
	InboundTx = 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")
	InvalidEpochTx       = errors.New("invalid epoch tx")
	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")
	NotIdentity          = errors.New("user is not identity")
	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")
	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")
)

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) 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