Documentation ¶
Index ¶
- Constants
- func GetDep(deps TxnInputOutput) map[int]map[int]bool
- func HasReadDep(txFrom TxnOutput, txTo TxnInput) bool
- func NewEVMTxContext(msg *core.Message) vm.TxContext
- func UpdateDeps(deps map[int]map[int]bool, t TxDep) map[int]map[int]bool
- func ValidateVersion(txIdx int, lastInputOutput *TxnInputOutput, versionedData *MVHashMap) (valid bool)
- type DAG
- type ErrExecAbortError
- type ExecResult
- type ExecTask
- type ExecVersionView
- type ExecutionStat
- type ExecutionTask
- func (task *ExecutionTask) Dependencies() []int
- func (task *ExecutionTask) Execute(mvh *MVHashMap, incarnation int) (err error)
- func (task *ExecutionTask) Hash() common.Hash
- func (task *ExecutionTask) MVFullWriteList() []WriteDescriptor
- func (task *ExecutionTask) MVReadList() []ReadDescriptor
- func (task *ExecutionTask) MVWriteList() []WriteDescriptor
- func (task *ExecutionTask) Sender() common.Address
- func (task *ExecutionTask) Settle()
- type IntHeap
- type Key
- type MVHashMap
- func (mv *MVHashMap) Delete(k Key, txIdx int)
- func (mv *MVHashMap) FlushMVWriteSet(writes []WriteDescriptor)
- func (mv *MVHashMap) MarkEstimate(k Key, txIdx int)
- func (mv *MVHashMap) Read(k Key, txIdx int) (res MVReadResult)
- func (mv *MVHashMap) ReadStorage(k Key, fallBack func() any) any
- func (mv *MVHashMap) Write(k Key, v Version, data interface{})
- type MVReadResult
- type MvCache
- func (m *MvCache) ClearReadMap()
- func (m *MvCache) ClearWriteMap()
- func (m *MvCache) DepTxIndex() int
- func (m *MvCache) GetMVHashmap() *MVHashMap
- func (m *MvCache) HadInvalidRead() bool
- func (m *MvCache) MVFullWriteList() []WriteDescriptor
- func (m *MvCache) MVReadList() []ReadDescriptor
- func (m *MvCache) MVReadMap() map[Key]ReadDescriptor
- func (m *MvCache) MVWriteList() []WriteDescriptor
- func (m *MvCache) SetIncarnation(inc int)
- func (m *MvCache) SetMVHashmap(mvhm *MVHashMap)
- type ParallelExecFailedError
- type ParallelExecutionResult
- type ParallelExecutor
- type ParallelStateProcessor
- type PropertyCheck
- type ReadDescriptor
- type SafeFIFOQueue
- type SafePriorityQueue
- type SafeQueue
- type Scheduler
- type StatelessExecutor
- type TxDep
- type TxnIndexCells
- type TxnInput
- type TxnInputOutput
- func (io *TxnInputOutput) AllWriteSet(txnIdx int) []WriteDescriptor
- func (io *TxnInputOutput) HasWritten(txnIdx int, k Key) bool
- func (io *TxnInputOutput) ReadSet(txnIdx int) []ReadDescriptor
- func (io *TxnInputOutput) RecordAllWriteAtOnce(outputs [][]WriteDescriptor)
- func (io *TxnInputOutput) RecordReadAtOnce(inputs [][]ReadDescriptor)
- func (io *TxnInputOutput) WriteSet(txnIdx int) []WriteDescriptor
- type TxnOutput
- type Version
- type WriteCell
- type WriteDescriptor
Constants ¶
View Source
const ( MVReadResultDone = 0 MVReadResultDependency = 1 MVReadResultNone = 2 )
View Source
const ( ReadKindMap = 0 ReadKindStorage = 1 )
View Source
const BalancePath = 1
View Source
const CodePath = 3
View Source
const FlagDone = 0
View Source
const FlagEstimate = 1
View Source
const KeyLength = common.AddressLength + common.HashLength + 2
View Source
const NoncePath = 2
View Source
const SuicidePath = 4
Variables ¶
This section is empty.
Functions ¶
func HasReadDep ¶
func NewEVMTxContext ¶
NewEVMTxContext creates a new transaction context for a single transaction.
func ValidateVersion ¶
func ValidateVersion(txIdx int, lastInputOutput *TxnInputOutput, versionedData *MVHashMap) (valid bool)
Types ¶
type DAG ¶
func BuildDAG ¶
func BuildDAG(deps TxnInputOutput) (d DAG)
func (DAG) LongestPath ¶
Find the longest execution path in the DAG
type ErrExecAbortError ¶
func (ErrExecAbortError) Error ¶
func (e ErrExecAbortError) Error() string
type ExecResult ¶
type ExecResult struct {
// contains filtered or unexported fields
}
type ExecTask ¶
type ExecTask interface { Execute(mvh *MVHashMap, incarnation int) error MVReadList() []ReadDescriptor MVWriteList() []WriteDescriptor MVFullWriteList() []WriteDescriptor Hash() common.Hash Sender() common.Address Settle() Dependencies() []int }
type ExecVersionView ¶
type ExecVersionView struct {
// contains filtered or unexported fields
}
func (*ExecVersionView) Execute ¶
func (ev *ExecVersionView) Execute() (er ExecResult)
type ExecutionStat ¶
type ExecutionTask ¶
type ExecutionTask struct {
// contains filtered or unexported fields
}
func (*ExecutionTask) Dependencies ¶
func (task *ExecutionTask) Dependencies() []int
func (*ExecutionTask) Execute ¶
func (task *ExecutionTask) Execute(mvh *MVHashMap, incarnation int) (err error)
func (*ExecutionTask) Hash ¶
func (task *ExecutionTask) Hash() common.Hash
func (*ExecutionTask) MVFullWriteList ¶
func (task *ExecutionTask) MVFullWriteList() []WriteDescriptor
func (*ExecutionTask) MVReadList ¶
func (task *ExecutionTask) MVReadList() []ReadDescriptor
func (*ExecutionTask) MVWriteList ¶
func (task *ExecutionTask) MVWriteList() []WriteDescriptor
func (*ExecutionTask) Sender ¶
func (task *ExecutionTask) Sender() common.Address
func (*ExecutionTask) Settle ¶
func (task *ExecutionTask) Settle()
type Key ¶
func NewAddressKey ¶
func (Key) GetAddress ¶
func (Key) GetStateKey ¶
func (Key) GetSubpath ¶
type MVHashMap ¶
type MVHashMap struct {
// contains filtered or unexported fields
}
func MakeMVHashMap ¶
func MakeMVHashMap() *MVHashMap
func (*MVHashMap) FlushMVWriteSet ¶
func (mv *MVHashMap) FlushMVWriteSet(writes []WriteDescriptor)
func (*MVHashMap) MarkEstimate ¶
type MVReadResult ¶
type MVReadResult struct {
// contains filtered or unexported fields
}
func (*MVReadResult) DepIdx ¶
func (res *MVReadResult) DepIdx() int
func (*MVReadResult) Incarnation ¶
func (res *MVReadResult) Incarnation() int
func (MVReadResult) Status ¶
func (res MVReadResult) Status() int
func (*MVReadResult) Value ¶
func (res *MVReadResult) Value() interface{}
type MvCache ¶
type MvCache struct {
// contains filtered or unexported fields
}
func (*MvCache) ClearReadMap ¶
func (m *MvCache) ClearReadMap()
func (*MvCache) ClearWriteMap ¶
func (m *MvCache) ClearWriteMap()
func (*MvCache) DepTxIndex ¶
func (*MvCache) GetMVHashmap ¶
func (*MvCache) HadInvalidRead ¶
func (*MvCache) MVFullWriteList ¶
func (m *MvCache) MVFullWriteList() []WriteDescriptor
func (*MvCache) MVReadList ¶
func (m *MvCache) MVReadList() []ReadDescriptor
func (*MvCache) MVReadMap ¶
func (m *MvCache) MVReadMap() map[Key]ReadDescriptor
func (*MvCache) MVWriteList ¶
func (m *MvCache) MVWriteList() []WriteDescriptor
func (*MvCache) SetIncarnation ¶
func (*MvCache) SetMVHashmap ¶
type ParallelExecFailedError ¶
type ParallelExecFailedError struct {
Msg string
}
func (ParallelExecFailedError) Error ¶
func (e ParallelExecFailedError) Error() string
type ParallelExecutionResult ¶
type ParallelExecutionResult struct { TxIO *TxnInputOutput Stats *hashmap.Map[int, ExecutionStat] // map[int]ExecutionStat Deps *DAG AllDeps map[int]map[int]bool }
func ExecuteParallel ¶
type ParallelExecutor ¶
type ParallelExecutor struct {
// contains filtered or unexported fields
}
func NewParallelExecutor ¶
func NewParallelExecutor(tasks []ExecTask, profile bool, metadata bool, numProcs int) *ParallelExecutor
func (*ParallelExecutor) Close ¶
func (pe *ParallelExecutor) Close(wait bool)
func (*ParallelExecutor) Step ¶
func (pe *ParallelExecutor) Step(res *ExecResult) (result ParallelExecutionResult, err error)
nolint: gocognit
type ParallelStateProcessor ¶
type ParallelStateProcessor struct {
// contains filtered or unexported fields
}
ParallelBlockExecutor executes a block serially.
func NewParallelStateProcessor ¶
func NewParallelStateProcessor(config *params.ChainConfig, chain *core.HeaderChain, parallelProcesses int) *ParallelStateProcessor
NewParallelBlockExecutor creates a new ParallelBlockExecutor.
type PropertyCheck ¶
type PropertyCheck func(*ParallelExecutor) error
type ReadDescriptor ¶
type SafeFIFOQueue ¶
type SafeFIFOQueue[d any] struct { // contains filtered or unexported fields }
func NewSafeFIFOQueue ¶
func NewSafeFIFOQueue[d any](capacity int) *SafeFIFOQueue[d]
func (*SafeFIFOQueue[d]) Len ¶
func (q *SafeFIFOQueue[d]) Len() int
func (*SafeFIFOQueue[d]) Pop ¶
func (q *SafeFIFOQueue[d]) Pop() d
func (*SafeFIFOQueue[d]) Push ¶
func (q *SafeFIFOQueue[d]) Push(_ int, data d)
type SafePriorityQueue ¶
type SafePriorityQueue[d any] struct { // contains filtered or unexported fields }
A thread safe priority queue
func NewSafePriorityQueue ¶
func NewSafePriorityQueue[d any](capacity int) *SafePriorityQueue[d]
func (*SafePriorityQueue[d]) Len ¶
func (pq *SafePriorityQueue[d]) Len() int
func (*SafePriorityQueue[d]) Pop ¶
func (pq *SafePriorityQueue[d]) Pop() d
func (*SafePriorityQueue[d]) Push ¶
func (pq *SafePriorityQueue[d]) Push(v int, data d)
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func NewScheduler ¶
type StatelessExecutor ¶
type StatelessExecutor struct {
// contains filtered or unexported fields
}
func NewStatelessExecutor ¶
func NewStatelessExecutor(config *params.ChainConfig, block *types.Block, witness *stateless.Witness) *StatelessExecutor
type TxDep ¶
type TxDep struct { Index int ReadList []ReadDescriptor FullWriteList [][]WriteDescriptor }
type TxnIndexCells ¶
type TxnIndexCells struct {
// contains filtered or unexported fields
}
type TxnInput ¶
type TxnInput []ReadDescriptor
type TxnInputOutput ¶
type TxnInputOutput struct {
// contains filtered or unexported fields
}
func MakeTxnInputOutput ¶
func MakeTxnInputOutput(numTx int) *TxnInputOutput
func (*TxnInputOutput) AllWriteSet ¶
func (io *TxnInputOutput) AllWriteSet(txnIdx int) []WriteDescriptor
func (*TxnInputOutput) HasWritten ¶
func (io *TxnInputOutput) HasWritten(txnIdx int, k Key) bool
func (*TxnInputOutput) ReadSet ¶
func (io *TxnInputOutput) ReadSet(txnIdx int) []ReadDescriptor
func (*TxnInputOutput) RecordAllWriteAtOnce ¶
func (io *TxnInputOutput) RecordAllWriteAtOnce(outputs [][]WriteDescriptor)
func (*TxnInputOutput) RecordReadAtOnce ¶
func (io *TxnInputOutput) RecordReadAtOnce(inputs [][]ReadDescriptor)
func (*TxnInputOutput) WriteSet ¶
func (io *TxnInputOutput) WriteSet(txnIdx int) []WriteDescriptor
type TxnOutput ¶
type TxnOutput []WriteDescriptor
type WriteDescriptor ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.