process

package
v1.6.18 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrExecutedTxNotFoundInOrderedTxs = errors.New("executed tx not found in ordered txs")

ErrExecutedTxNotFoundInOrderedTxs signals that a transaction that was executed was not found in the ordered transactions

View Source
var ErrIndexOutOfBounds = errors.New("index out of bounds")

ErrIndexOutOfBounds signals that an index is out of bounds

View Source
var ErrMiniBlocksHeadersMismatch = errors.New("mini blocks headers mismatch")

ErrMiniBlocksHeadersMismatch signals that the number of miniBlock headers is different than the number of miniBlocks

View Source
var ErrNilBodyHandler = errors.New("nil body handler")

ErrNilBodyHandler signal that provided body handler is nil

View Source
var ErrNilEnableEpochsHandler = errors.New("nil enable epochs handler")

ErrNilEnableEpochsHandler signals that a nil enable epochs handler has been provided

View Source
var ErrNilExecutedTxHashes = errors.New("nil executed tx hashes map")

ErrNilExecutedTxHashes signals that a nil executed tx hashes map has been provided

View Source
var ErrNilExecutionOrderGetter = errors.New("nil execution order getter")

ErrNilExecutionOrderGetter signals that a nil execution order getter has been provided

View Source
var ErrNilGasConsumedProvider = errors.New("nil gas consumed provider")

ErrNilGasConsumedProvider signals that a nil gas consumed provider has been provided

View Source
var ErrNilHasher = errors.New("nil hasher provided")

ErrNilHasher signals that a nil hasher has been provided

View Source
var ErrNilHeaderHandler = errors.New("nil header handler")

ErrNilHeaderHandler signal that provided header handler is nil

View Source
var ErrNilMiniBlock = errors.New("nil miniBlock")

ErrNilMiniBlock signals that a nil miniBlock has been provided

View Source
var ErrNilMiniBlockHeaderHandler = errors.New("nil miniBlock header handler")

ErrNilMiniBlockHeaderHandler signals that a nil miniBlock header handler has been provided

View Source
var ErrNilNodesCoordinator = errors.New("validator group selector is nil")

ErrNilNodesCoordinator is raised when a valid validator group selector is expected but nil used

View Source
var ErrNilOrderedTxHashes = errors.New("nil ordered tx list")

ErrNilOrderedTxHashes signals that a nil ordered tx list has been provided

View Source
var ErrNilStorer = errors.New("nil storer")

ErrNilStorer is raised when a nil storer has been provided

View Source
var ErrNilTransactionCoordinator = errors.New("transaction coordinator is nil")

ErrNilTransactionCoordinator signals that transaction coordinator is nil

View Source
var ErrOrderedTxNotFound = errors.New("ordered tx not found in pool")

ErrOrderedTxNotFound signals that an ordered tx hash was not found in the pool

View Source
var ErrWrongTypeAssertion = errors.New("wrong type assertion")

ErrWrongTypeAssertion signals that a wrong type assertion has been done

Functions

func NewOutportDataProvider

func NewOutportDataProvider(arg ArgOutportDataProvider) (*outportDataProvider, error)

NewOutportDataProvider will create a new instance of outportDataProvider

Types

type AlteredAccountsProviderHandler

type AlteredAccountsProviderHandler interface {
	ExtractAlteredAccountsFromPool(txPool *outport.TransactionPool, options shared.AlteredAccountsOptions) (map[string]*alteredAccount.AlteredAccount, error)
	IsInterfaceNil() bool
}

AlteredAccountsProviderHandler defines the functionality needed for provisioning of altered accounts when indexing data

type ArgOutportDataProvider

type ArgOutportDataProvider struct {
	IsImportDBMode           bool
	ShardCoordinator         sharding.Coordinator
	AlteredAccountsProvider  AlteredAccountsProviderHandler
	TransactionsFeeProcessor TransactionsFeeHandler
	TxCoordinator            process.TransactionCoordinator
	NodesCoordinator         nodesCoordinator.NodesCoordinator
	GasConsumedProvider      GasConsumedProvider
	EconomicsData            EconomicsDataHandler
	Marshaller               marshal.Marshalizer
	Hasher                   hashing.Hasher
	ExecutionOrderHandler    common.ExecutionOrderGetter
}

ArgOutportDataProvider holds the arguments needed for creating a new instance of outportDataProvider

type ArgPrepareOutportSaveBlockData

type ArgPrepareOutportSaveBlockData struct {
	HeaderHash             []byte
	Header                 data.HeaderHandler
	HeaderBytes            []byte
	HeaderType             string
	Body                   data.BodyHandler
	PreviousHeader         data.HeaderHandler
	RewardsTxs             map[string]data.TransactionHandler
	NotarizedHeadersHashes []string
	HighestFinalBlockNonce uint64
	HighestFinalBlockHash  []byte
}

ArgPrepareOutportSaveBlockData holds the arguments needed for prepare outport save block data

type EconomicsDataHandler

type EconomicsDataHandler interface {
	ComputeGasUsedAndFeeBasedOnRefundValue(tx data.TransactionWithFeeHandler, refundValue *big.Int) (uint64, *big.Int)
	ComputeTxFeeBasedOnGasUsed(tx data.TransactionWithFeeHandler, gasUsed uint64) *big.Int
	ComputeGasLimit(tx data.TransactionWithFeeHandler) uint64
	IsInterfaceNil() bool
	MaxGasLimitPerBlock(shardID uint32) uint64
}

EconomicsDataHandler defines the functionality needed for economics data

type GasConsumedProvider

type GasConsumedProvider interface {
	TotalGasProvided() uint64
	TotalGasProvidedWithScheduled() uint64
	TotalGasRefunded() uint64
	TotalGasPenalized() uint64
	IsInterfaceNil() bool
}

GasConsumedProvider defines the functionality needed for providing gas consumed information

type TransactionsFeeHandler

type TransactionsFeeHandler interface {
	PutFeeAndGasUsed(pool *outport.TransactionPool) error
	IsInterfaceNil() bool
}

TransactionsFeeHandler defines the functionality needed for computation of the transaction fee and gas used

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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