Documentation
¶
Index ¶
Constants ¶
View Source
const (
MOD_NAME = "excution"
)
View Source
const MaxAvail_Count = 5
Variables ¶
This section is empty.
Functions ¶
func NewExecutionScheduler ¶
func NewExecutionScheduler(nodeID string, log tplog.Logger, config *configuration.Configuration, codecType codec.CodecType, txPool txpooli.TransactionPool) *executionScheduler
Types ¶
type EpochUpdater ¶
type EpochUpdater interface {
UpdateEpoch(ctx context.Context, newBH *tpchaintypes.BlockHead, compState state.CompositionState) error
}
type ExecutionForwarder ¶
type ExecutionForwarder interface {
ForwardTxSync(ctx context.Context, tx *txbasic.Transaction) (*txbasic.TransactionResult, error)
ForwardTxAsync(ctx context.Context, tx *txbasic.Transaction) error
}
func NewExecutionForwarder ¶
type ExecutionScheduler ¶
type ExecutionScheduler interface {
SetEpochUpdater(epochUpdater EpochUpdater)
State() SchedulerState
MaxStateVersion(latestBlock *tpchaintypes.Block) (uint64, error)
CompositionStateAtVersion(stateVersion uint64) state.CompositionState
PackedTxProofForValidity(ctx context.Context, stateVersion uint64, txHashs [][]byte, txResultHashes [][]byte) ([][]byte, [][]byte, error)
CompositionStateOfExePackedTxs(stateVersion uint64) (state.CompositionState, error)
ExecutePackedTx(ctx context.Context, txPacked *PackedTxs, compState state.CompositionState) (*PackedTxsResult, error)
CommitBlock(ctx context.Context, stateVersion uint64, block *tpchaintypes.Block, blockRS *tpchaintypes.BlockResult, compState state.CompositionState, requester string) error
CommitPackedTx(ctx context.Context, stateVersion uint64, refIndex uint32, blockHead *tpchaintypes.BlockHead, deltaHeight int, marshaler codec.Marshaler, network tpnet.Network, ledger ledger.Ledger) error
}
type PackedTxs ¶
type PackedTxs struct {
StateVersion uint64
TxRoot []byte
TxList []*txbasic.Transaction
// contains filtered or unexported fields
}
type PackedTxsResult ¶
type PackedTxsResult struct {
StateVersion uint64
TxRSRoot []byte
TxsResult []txbasic.TransactionResult
// contains filtered or unexported fields
}
type SchedulerState ¶
type SchedulerState uint32
const ( SchedulerState_Unknown SchedulerState = iota SchedulerState_Idle SchedulerState_Executing SchedulerState_Commiting )
func (SchedulerState) String ¶
func (s SchedulerState) String() string
func (SchedulerState) Value ¶
func (s SchedulerState) Value(state string) SchedulerState
Click to show internal directories.
Click to hide internal directories.