exec

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoInput = errors.New("no input")

var Timer time.Duration

View Source
var ErrWasmDeterministicExec = errors.New("wasm execution failed deterministically")

Functions

func RunModule

func RunModule(ctx context.Context, executor ModuleExecutor, execOutput execout.ExecutionOutputGetter) (*pbssinternal.ModuleOutput, []byte, []byte, bool, error)

Types

type BaseExecutor

type BaseExecutor struct {
	// contains filtered or unexported fields
}

func NewBaseExecutor

func NewBaseExecutor(ctx context.Context, moduleName string, initialBlock uint64, wasmModule wasm.Module, cacheEnabled bool, wasmArguments []wasm.Argument, blockIndex *index.BlockIndex, entrypoint string, tracer ttrace.Tracer) *BaseExecutor

func (*BaseExecutor) BlockIndex added in v1.6.0

func (e *BaseExecutor) BlockIndex() *index.BlockIndex

func (*BaseExecutor) Close added in v1.1.5

func (e *BaseExecutor) Close(ctx context.Context) error

func (*BaseExecutor) RunsOnBlock added in v1.6.0

func (e *BaseExecutor) RunsOnBlock(blockNum uint64) bool

type ErrorExecutor

type ErrorExecutor struct {
	// contains filtered or unexported fields
}

func (*ErrorExecutor) Error

func (e *ErrorExecutor) Error() string

type ExecutionStages added in v1.6.0

type ExecutionStages []StageLayers

A list of units that we can schedule, that might include some mappers and a store, or the last module could be an exeuction layer with only a map.

func (ExecutionStages) LastStage added in v1.6.0

func (e ExecutionStages) LastStage() StageLayers

type Graph added in v1.6.0

type Graph struct {
	// contains filtered or unexported fields
}

func NewOutputModuleGraph added in v1.6.0

func NewOutputModuleGraph(outputModule string, productionMode bool, modules *pbsubstreams.Modules) (out *Graph, err error)

func TestGraphStagedModules added in v1.6.0

func TestGraphStagedModules(initialBlock1, ib2, ib3, ib4, ib5 uint64) *Graph

func TestNew added in v1.6.0

func TestNew() *Graph

func (*Graph) AncestorsFrom added in v1.6.0

func (g *Graph) AncestorsFrom(moduleName string) []string

func (*Graph) IsOutputModule added in v1.6.0

func (g *Graph) IsOutputModule(name string) bool

func (*Graph) LowestInitBlock added in v1.6.0

func (g *Graph) LowestInitBlock() uint64

func (*Graph) LowestStoresInitBlock added in v1.6.0

func (g *Graph) LowestStoresInitBlock() *uint64

func (*Graph) ModuleHashes added in v1.6.0

func (g *Graph) ModuleHashes() *manifest.ModuleHashes

func (*Graph) ModulesInitBlocks added in v1.6.0

func (g *Graph) ModulesInitBlocks() map[string]uint64

func (*Graph) OutputModule added in v1.6.0

func (g *Graph) OutputModule() *pbsubstreams.Module

func (*Graph) SchedulableModuleNames added in v1.6.0

func (g *Graph) SchedulableModuleNames() []string

func (*Graph) StagedUsedModules added in v1.6.0

func (g *Graph) StagedUsedModules() ExecutionStages

func (*Graph) Stores added in v1.6.0

func (g *Graph) Stores() []*pbsubstreams.Module

func (*Graph) UsedIndexModules added in v1.6.0

func (g *Graph) UsedIndexModules() []*pbsubstreams.Module

func (*Graph) UsedIndexesModulesUpToStage added in v1.6.0

func (g *Graph) UsedIndexesModulesUpToStage(stage int) (out []*pbsubstreams.Module)

func (*Graph) UsedModules added in v1.6.0

func (g *Graph) UsedModules() []*pbsubstreams.Module

func (*Graph) UsedModulesUpToStage added in v1.6.0

func (g *Graph) UsedModulesUpToStage(stage int) (out []*pbsubstreams.Module)

func (*Graph) ValidateRequestStartBlock added in v1.6.0

func (g *Graph) ValidateRequestStartBlock(requestStartBlockNum uint64) error

type IndexModuleExecutor added in v1.6.0

type IndexModuleExecutor struct {
	BaseExecutor
}

func NewIndexModuleExecutor added in v1.6.0

func NewIndexModuleExecutor(baseExecutor *BaseExecutor) *IndexModuleExecutor

func (*IndexModuleExecutor) HasOutputForFiles added in v1.6.0

func (i *IndexModuleExecutor) HasOutputForFiles() bool

func (*IndexModuleExecutor) HasValidOutput added in v1.6.0

func (i *IndexModuleExecutor) HasValidOutput() bool

func (*IndexModuleExecutor) Name added in v1.6.0

func (i *IndexModuleExecutor) Name() string

func (*IndexModuleExecutor) String added in v1.6.0

func (i *IndexModuleExecutor) String() string

type LayerModules added in v1.6.0

type LayerModules []*pbsubstreams.Module

The list of modules in a given layer of either maps or stores. A given layer will always be comprised of only the same kind of modules.

func (LayerModules) IsStoreLayer added in v1.6.0

func (l LayerModules) IsStoreLayer() bool

type MapperModuleExecutor

type MapperModuleExecutor struct {
	BaseExecutor
	// contains filtered or unexported fields
}

func NewMapperModuleExecutor

func NewMapperModuleExecutor(baseExecutor *BaseExecutor, outputType string) *MapperModuleExecutor

func (*MapperModuleExecutor) HasOutputForFiles added in v1.6.0

func (e *MapperModuleExecutor) HasOutputForFiles() bool

func (*MapperModuleExecutor) HasValidOutput added in v0.1.0

func (e *MapperModuleExecutor) HasValidOutput() bool

func (*MapperModuleExecutor) Name

func (e *MapperModuleExecutor) Name() string

Name implements ModuleExecutor

func (*MapperModuleExecutor) String

func (e *MapperModuleExecutor) String() string

type ModuleExecutor

type ModuleExecutor interface {
	// Name returns the name of the module as defined in the manifest.
	Name() string
	String() string
	Close(ctx context.Context) error

	HasValidOutput() bool
	HasOutputForFiles() bool

	BlockIndex() *index.BlockIndex
	RunsOnBlock(blockNum uint64) bool
	// contains filtered or unexported methods
}

type StageLayers added in v1.6.0

type StageLayers []LayerModules

For a given execution stage, the layers of execution, for example: a layer of mappers, followed by a layer of stores.

func (StageLayers) IsLastStage added in v1.6.0

func (l StageLayers) IsLastStage() bool

func (StageLayers) LastLayer added in v1.6.0

func (l StageLayers) LastLayer() LayerModules

type StoreModuleExecutor

type StoreModuleExecutor struct {
	BaseExecutor
	// contains filtered or unexported fields
}

func NewStoreModuleExecutor

func NewStoreModuleExecutor(baseExecutor *BaseExecutor, outputStore store.DeltaAccessor) *StoreModuleExecutor

func (*StoreModuleExecutor) HasOutputForFiles added in v1.6.0

func (e *StoreModuleExecutor) HasOutputForFiles() bool

func (*StoreModuleExecutor) HasValidOutput added in v0.1.0

func (e *StoreModuleExecutor) HasValidOutput() bool

func (*StoreModuleExecutor) Name

func (e *StoreModuleExecutor) Name() string

func (*StoreModuleExecutor) String

func (e *StoreModuleExecutor) String() string

Jump to

Keyboard shortcuts

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