computer

package
v0.33.17 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: AGPL-3.0 Imports: 31 Imported by: 4 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	SystemChunkEventCollectionMaxSize = 256_000_000 // ~256MB
)

Variables

This section is empty.

Functions

func GenerateExecutionReceipt added in v0.30.0

func GenerateExecutionReceipt(
	signer module.Local,
	receiptHasher hash.Hasher,
	result *flow.ExecutionResult,
	spockSignatures []crypto.Signature,
) (
	*flow.ExecutionReceipt,
	error,
)

func SystemChunkContext added in v0.21.1

func SystemChunkContext(vmCtx fvm.Context) fvm.Context

Types

type BlockComputer

type BlockComputer interface {
	ExecuteBlock(
		ctx context.Context,
		parentBlockExecutionResultID flow.Identifier,
		block *entity.ExecutableBlock,
		snapshot snapshot.StorageSnapshot,
		derivedBlockData *derived.DerivedBlockData,
	) (
		*execution.ComputationResult,
		error,
	)
}

A BlockComputer executes the transactions in a block.

func NewBlockComputer

func NewBlockComputer(
	vm fvm.VM,
	vmCtx fvm.Context,
	metrics module.ExecutionMetrics,
	tracer module.Tracer,
	logger zerolog.Logger,
	committer ViewCommitter,
	signer module.Local,
	executionDataProvider provider.Provider,
	colResCons []result.ExecutedCollectionConsumer,
	state protocol.State,
	maxConcurrency int,
) (BlockComputer, error)

NewBlockComputer creates a new block executor.

type TransactionRequest added in v0.32.0

type TransactionRequest struct {
	*fvm.TransactionProcedure
	// contains filtered or unexported fields
}

type TransactionWriteBehindLogger added in v0.32.0

type TransactionWriteBehindLogger interface {
	AddTransactionResult(
		txn TransactionRequest,
		snapshot *snapshot.ExecutionSnapshot,
		output fvm.ProcedureOutput,
		timeSpent time.Duration,
		numTxnConflictRetries int,
	)
}

type ViewCommitter added in v0.16.0

type ViewCommitter interface {
	// CommitView commits an execution snapshot and collects proofs
	CommitView(
		*snapshot.ExecutionSnapshot,
		execution.ExtendableStorageSnapshot,
	) (
		flow.StateCommitment,
		[]byte,
		*ledger.TrieUpdate,
		execution.ExtendableStorageSnapshot,
		error,
	)
}

ViewCommitter commits execution snapshot to the ledger and collects the proofs

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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