process

package
v1.4.12 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

ErrNilEnableEpochsHandler signals that a nil enable epochs handler 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 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 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

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.Pool, options shared.AlteredAccountsOptions) (map[string]*outport.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
	ExecutionOrderHandler    ExecutionOrderHandler
}

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

type ArgPrepareOutportSaveBlockData

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

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 ExecutionOrderHandler

type ExecutionOrderHandler interface {
	PutExecutionOrderInTransactionPool(
		pool *outport.Pool,
		header data.HeaderHandler,
		body data.BodyHandler,
		prevHeader data.HeaderHandler,
	) ([]string, []string, error)
}

ExecutionOrderHandler defines the interface for the execution order handler

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