computer

package
v0.29.6 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func SPOCKProve

func SPOCKProve(
	sk crypto.PrivateKey,
	data []byte,
	kmac hash.Hasher,
) (
	crypto.Signature,
	error,
)

This is a temporary wrapper that simulates a call to SPoCK prove, required for the emulator build. The function is never called by the emulator although it is required for a successful build.

TODO(tarak): remove once the crypto module properly implements a non-relic version of SPOCKProve.

func SystemChunkContext

func SystemChunkContext(vmCtx fvm.Context, logger zerolog.Logger) fvm.Context

Types

type BlockComputer

type BlockComputer interface {
	ExecuteBlock(
		context.Context,
		*entity.ExecutableBlock,
		state.View,
		*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,
) (BlockComputer, error)

NewBlockComputer creates a new block executor.

type ViewCommitter

type ViewCommitter interface {
	// CommitView commits a views' register delta and collects proofs
	CommitView(
		state.View,
		flow.StateCommitment,
	) (
		flow.StateCommitment,
		[]byte,
		*ledger.TrieUpdate,
		error,
	)
}

ViewCommitter commits views's deltas 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