execution

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: AGPL-3.0 Imports: 5 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockAttestationResult added in v0.31.0

type BlockAttestationResult struct {
	*BlockExecutionResult

	// TODO(ramtin): move this to the outside, everything needed for create this
	// should be available as part of computation result and most likely trieUpdate
	// was the reason this is kept here, long term we don't need this data and should
	// act based on register deltas
	*execution_data.BlockExecutionData
	// contains filtered or unexported fields
}

BlockAttestationResult holds collection attestation results

func NewEmptyBlockAttestationResult added in v0.31.0

func NewEmptyBlockAttestationResult(
	blockExecutionResult *BlockExecutionResult,
) *BlockAttestationResult

func (*BlockAttestationResult) AllChunkDataPacks added in v0.31.0

func (ar *BlockAttestationResult) AllChunkDataPacks() []*flow.ChunkDataPack

func (*BlockAttestationResult) AllChunks added in v0.31.0

func (ar *BlockAttestationResult) AllChunks() []*flow.Chunk

func (*BlockAttestationResult) AllEventCommitments added in v0.31.0

func (ar *BlockAttestationResult) AllEventCommitments() []flow.Identifier

func (*BlockAttestationResult) AppendCollectionAttestationResult added in v0.31.0

func (ar *BlockAttestationResult) AppendCollectionAttestationResult(
	startStateCommit flow.StateCommitment,
	endStateCommit flow.StateCommitment,
	stateProof flow.StorageProof,
	eventCommit flow.Identifier,
	chunkExecutionDatas *execution_data.ChunkExecutionData,
)

func (*BlockAttestationResult) ChunkAt added in v0.31.0

func (ar *BlockAttestationResult) ChunkAt(index int) *flow.Chunk

func (*BlockAttestationResult) ChunkDataPackAt added in v0.31.0

func (ar *BlockAttestationResult) ChunkDataPackAt(index int) *flow.ChunkDataPack

func (*BlockAttestationResult) CollectionAttestationResultAt added in v0.31.0

func (ar *BlockAttestationResult) CollectionAttestationResultAt(colIndex int) *CollectionAttestationResult

CollectionAttestationResultAt returns CollectionAttestationResult at collection index

func (*BlockAttestationResult) Size added in v0.31.0

func (ar *BlockAttestationResult) Size() int

Size returns the size of collection attestation results

type BlockExecutionResult added in v0.31.0

type BlockExecutionResult struct {
	*entity.ExecutableBlock

	ExecutionDataRoot *flow.BlockExecutionDataRoot // full root data structure produced from block
	// contains filtered or unexported fields
}

BlockExecutionResult captures artifacts of execution of block collections

func NewPopulatedBlockExecutionResult added in v0.31.0

func NewPopulatedBlockExecutionResult(eb *entity.ExecutableBlock) *BlockExecutionResult

NewPopulatedBlockExecutionResult constructs a new BlockExecutionResult, pre-populated with `chunkCounts` number of collection results

func (*BlockExecutionResult) AllConvertedServiceEvents added in v0.31.0

func (er *BlockExecutionResult) AllConvertedServiceEvents() flow.ServiceEventList

func (*BlockExecutionResult) AllEvents added in v0.31.0

func (er *BlockExecutionResult) AllEvents() flow.EventsList

func (*BlockExecutionResult) AllExecutionSnapshots added in v0.31.0

func (er *BlockExecutionResult) AllExecutionSnapshots() []*snapshot.ExecutionSnapshot

func (*BlockExecutionResult) AllServiceEvents added in v0.31.0

func (er *BlockExecutionResult) AllServiceEvents() flow.EventsList

func (*BlockExecutionResult) AllTransactionResults added in v0.31.0

func (er *BlockExecutionResult) AllTransactionResults() flow.TransactionResults

func (*BlockExecutionResult) CollectionExecutionResultAt added in v0.31.0

func (er *BlockExecutionResult) CollectionExecutionResultAt(colIndex int) *CollectionExecutionResult

func (*BlockExecutionResult) Size added in v0.31.0

func (er *BlockExecutionResult) Size() int

Size returns the size of collection execution results

func (*BlockExecutionResult) TransactionResultAt added in v0.31.0

func (er *BlockExecutionResult) TransactionResultAt(txIdx int) *flow.TransactionResult

type CollectionAttestationResult added in v0.31.0

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

CollectionAttestationResult holds attestations generated during post-processing phase of collect execution.

func NewCollectionAttestationResult added in v0.31.0

func NewCollectionAttestationResult(
	startStateCommit flow.StateCommitment,
	endStateCommit flow.StateCommitment,
	stateProof flow.StorageProof,
	eventCommit flow.Identifier,
) *CollectionAttestationResult

func (*CollectionAttestationResult) EndStateCommitment added in v0.31.0

func (a *CollectionAttestationResult) EndStateCommitment() flow.StateCommitment

func (*CollectionAttestationResult) EventCommitment added in v0.31.0

func (a *CollectionAttestationResult) EventCommitment() flow.Identifier

func (*CollectionAttestationResult) StartStateCommitment added in v0.31.0

func (a *CollectionAttestationResult) StartStateCommitment() flow.StateCommitment

func (*CollectionAttestationResult) StateProof added in v0.31.0

func (*CollectionAttestationResult) UpdateEndStateCommitment added in v0.31.0

func (a *CollectionAttestationResult) UpdateEndStateCommitment(endState flow.StateCommitment)

TODO(ramtin): depricate in the future, temp method, needed for uploader for now

type CollectionExecutionResult added in v0.31.0

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

CollectionExecutionResult holds aggregated artifacts (events, tx resutls, ...) generated during collection execution

func NewEmptyCollectionExecutionResult added in v0.31.0

func NewEmptyCollectionExecutionResult() *CollectionExecutionResult

NewEmptyCollectionExecutionResult constructs a new CollectionExecutionResult

func (*CollectionExecutionResult) AppendTransactionResults added in v0.31.0

func (c *CollectionExecutionResult) AppendTransactionResults(
	events flow.EventsList,
	serviceEvents flow.EventsList,
	convertedServiceEvents flow.ServiceEventList,
	transactionResult flow.TransactionResult,
)

func (*CollectionExecutionResult) ConvertedServiceEvents added in v0.31.0

func (c *CollectionExecutionResult) ConvertedServiceEvents() flow.ServiceEventList

func (*CollectionExecutionResult) Events added in v0.31.0

func (*CollectionExecutionResult) ExecutionSnapshot added in v0.31.0

func (c *CollectionExecutionResult) ExecutionSnapshot() *snapshot.ExecutionSnapshot

func (*CollectionExecutionResult) ServiceEventList added in v0.31.0

func (c *CollectionExecutionResult) ServiceEventList() flow.EventsList

func (*CollectionExecutionResult) TransactionResults added in v0.31.0

func (c *CollectionExecutionResult) TransactionResults() flow.TransactionResults

func (*CollectionExecutionResult) UpdateExecutionSnapshot added in v0.31.0

func (c *CollectionExecutionResult) UpdateExecutionSnapshot(
	executionSnapshot *snapshot.ExecutionSnapshot,
)

type ComputationResult

type ComputationResult struct {
	*BlockExecutionResult
	*BlockAttestationResult

	*flow.ExecutionReceipt
}

func NewEmptyComputationResult added in v0.28.7

func NewEmptyComputationResult(
	block *entity.ExecutableBlock,
) *ComputationResult

func (*ComputationResult) CurrentEndState added in v0.31.0

func (cr *ComputationResult) CurrentEndState() flow.StateCommitment

CurrentEndState returns the most recent end state if no attestation appended yet, it returns start state of block TODO(ramtin): we probably don't need this long term as part of this method

type ScriptExecutor added in v0.32.0

type ScriptExecutor interface {

	// ExecuteScriptAtBlockID executes a script at the given Block id
	ExecuteScriptAtBlockID(ctx context.Context, script []byte, arguments [][]byte, blockID flow.Identifier) ([]byte, error)

	// GetAccount returns the Account details at the given Block id
	GetAccount(ctx context.Context, address flow.Address, blockID flow.Identifier) (*flow.Account, error)

	// GetRegisterAtBlockID returns the value of a register at the given Block id (if available)
	GetRegisterAtBlockID(ctx context.Context, owner, key []byte, blockID flow.Identifier) ([]byte, error)
}

ScriptExecutor represents the RPC calls that the execution script engine exposes to support the Access Node API calls

Jump to

Keyboard shortcuts

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