Documentation ¶
Index ¶
- Constants
- Variables
- func FlowTokenAddress(chain flow.Chain) flow.Address
- func FungibleTokenAddress(chain flow.Chain) flow.Address
- func GetExecutionEffortWeights(env environment.Environment, service runtime.Address) (computationWeights meter.ExecutionEffortWeights, err error)
- func GetExecutionMemoryLimit(env environment.Environment, service runtime.Address) (memoryLimit uint64, err error)
- func GetExecutionMemoryWeights(env environment.Environment, service runtime.Address) (memoryWeights meter.ExecutionMemoryWeights, err error)
- func NewInterpreterRuntime(config runtime.Config) runtime.Runtime
- func NewScriptEnv(reqContext context.Context, fvmContext Context, ...) environment.Environment
- func NewTransactionEnvironment(ctx Context, txnState *state.TransactionState, ...) environment.Environment
- type Blocks
- type BootstrapAccountKeys
- type BootstrapProcedure
- func (proc *BootstrapProcedure) ComputationLimit(_ Context) uint64
- func (proc *BootstrapProcedure) ExecutionTime() programs.LogicalTime
- func (proc *BootstrapProcedure) InitialSnapshotTime() programs.LogicalTime
- func (proc *BootstrapProcedure) MemoryLimit(_ Context) uint64
- func (b *BootstrapProcedure) Run(ctx Context, txnState *state.TransactionState, ...) error
- func (proc *BootstrapProcedure) ShouldDisableMemoryAndInteractionLimits(_ Context) bool
- func (BootstrapProcedure) Type() ProcedureType
- type BootstrapProcedureFeeParameters
- type BootstrapProcedureOption
- func WithAccountCreationFee(fee cadence.UFix64) BootstrapProcedureOption
- func WithBootstrapAccountKeys(keys BootstrapAccountKeys) BootstrapProcedureOption
- func WithEpochConfig(epochConfig epochs.EpochConfig) BootstrapProcedureOption
- func WithExecutionEffortWeights(weights meter.ExecutionEffortWeights) BootstrapProcedureOption
- func WithExecutionMemoryLimit(limit uint64) BootstrapProcedureOption
- func WithExecutionMemoryWeights(weights meter.ExecutionMemoryWeights) BootstrapProcedureOption
- func WithIdentities(identities flow.IdentityList) BootstrapProcedureOption
- func WithInitialTokenSupply(supply cadence.UFix64) BootstrapProcedureOption
- func WithMinimumStorageReservation(reservation cadence.UFix64) BootstrapProcedureOption
- func WithRestrictedAccountCreationEnabled(enabled cadence.Bool) BootstrapProcedureOption
- func WithRestrictedContractDeployment(restricted *bool) BootstrapProcedureOption
- func WithRootBlock(rootBlock *flow.Header) BootstrapProcedureOption
- func WithStorageMBPerFLOW(ratio cadence.UFix64) BootstrapProcedureOption
- func WithTransactionFee(fees BootstrapProcedureFeeParameters) BootstrapProcedureOption
- type Context
- type Option
- func WithAccountStorageLimit(enabled bool) Option
- func WithBlockHeader(header *flow.Header) Option
- func WithBlockPrograms(programs *programs.BlockPrograms) Option
- func WithBlocks(blocks environment.Blocks) Option
- func WithCadenceLogging(enabled bool) Option
- func WithChain(chain flow.Chain) Option
- func WithComputationLimit(limit uint64) Option
- func WithContractDeploymentRestricted(enabled bool) Option
- func WithContractRemovalRestricted(enabled bool) Option
- func WithEventCollectionSizeLimit(limit uint64) Option
- func WithExtensiveTracing() Option
- func WithGasLimit(limit uint64) Option
- func WithLogger(logger zerolog.Logger) Option
- func WithMaxStateInteractionSize(limit uint64) Option
- func WithMaxStateKeySize(limit uint64) Option
- func WithMaxStateValueSize(limit uint64) Option
- func WithMemoryAndInteractionLimitsDisabled() Option
- func WithMemoryLimit(limit uint64) Option
- func WithMetricsReporter(mr environment.MetricsReporter) Option
- func WithRestrictedDeployment(restricted bool) Option
- func WithReusableCadenceRuntimePool(pool reusableRuntime.ReusableCadenceRuntimePool) Option
- func WithServiceAccount(enabled bool) Option
- func WithServiceEventCollectionEnabled() Option
- func WithTracer(tr module.Tracer) Option
- func WithTransactionFeesEnabled(enabled bool) Option
- func WithTransactionProcessors(processors ...TransactionProcessor) Option
- type Procedure
- type ProcedureType
- type ScriptInvoker
- type ScriptProcedure
- func (proc *ScriptProcedure) ComputationLimit(ctx Context) uint64
- func (proc *ScriptProcedure) ExecutionTime() programs.LogicalTime
- func (proc *ScriptProcedure) InitialSnapshotTime() programs.LogicalTime
- func (proc *ScriptProcedure) MemoryLimit(ctx Context) uint64
- func (proc *ScriptProcedure) Run(ctx Context, txnState *state.TransactionState, ...) error
- func (proc *ScriptProcedure) ShouldDisableMemoryAndInteractionLimits(ctx Context) bool
- func (ScriptProcedure) Type() ProcedureType
- func (proc *ScriptProcedure) WithArguments(args ...[]byte) *ScriptProcedure
- func (proc *ScriptProcedure) WithRequestContext(reqContext context.Context) *ScriptProcedure
- type ScriptProcessor
- type TransactionInvoker
- type TransactionProcedure
- func (proc *TransactionProcedure) ComputationLimit(ctx Context) uint64
- func (proc *TransactionProcedure) ExecutionTime() programs.LogicalTime
- func (proc *TransactionProcedure) InitialSnapshotTime() programs.LogicalTime
- func (proc *TransactionProcedure) IsSampled() bool
- func (proc *TransactionProcedure) MemoryLimit(ctx Context) uint64
- func (proc *TransactionProcedure) Run(ctx Context, txnState *state.TransactionState, ...) error
- func (proc *TransactionProcedure) SetTraceSpan(traceSpan otelTrace.Span)
- func (proc *TransactionProcedure) ShouldDisableMemoryAndInteractionLimits(ctx Context) bool
- func (proc *TransactionProcedure) StartSpanFromProcTraceSpan(tracer module.Tracer, spanName trace.SpanName) otelTrace.Span
- func (TransactionProcedure) Type() ProcedureType
- type TransactionProcessor
- type TransactionSequenceNumberChecker
- type TransactionStorageLimiter
- type TransactionVerifier
- type VirtualMachine
Constants ¶
const ( DefaultComputationLimit = 100_000 // 100K DefaultMemoryLimit = math.MaxUint64 // )
const ( BootstrapProcedureType = ProcedureType("bootstrap") TransactionProcedureType = ProcedureType("transaction") ScriptProcedureType = ProcedureType("script") )
const AccountKeyWeightThreshold = 1000
Variables ¶
var DefaultAccountCreationFee = func() cadence.UFix64 { value, err := cadence.NewUFix64("0.00100000") if err != nil { panic(fmt.Errorf("invalid default account creation fee: %w", err)) } return value }()
var DefaultMinimumStorageReservation = func() cadence.UFix64 { value, err := cadence.NewUFix64("0.00100000") if err != nil { panic(fmt.Errorf("invalid default minimum storage reservation: %w", err)) } return value }()
var DefaultStorageMBPerFLOW = func() cadence.UFix64 { value, err := cadence.NewUFix64("100.00000000") if err != nil { panic(fmt.Errorf("invalid default minimum storage reservation: %w", err)) } return value }()
var DefaultTransactionFees = func() BootstrapProcedureFeeParameters { surgeFactor, err := cadence.NewUFix64("1.0") if err != nil { panic(fmt.Errorf("invalid default fee surge factor: %w", err)) } inclusionEffortCost, err := cadence.NewUFix64("0.00001") if err != nil { panic(fmt.Errorf("invalid default fee effort cost: %w", err)) } executionEffortCost, err := cadence.NewUFix64("0.0") if err != nil { panic(fmt.Errorf("invalid default fee effort cost: %w", err)) } return BootstrapProcedureFeeParameters{ SurgeFactor: surgeFactor, InclusionEffortCost: inclusionEffortCost, ExecutionEffortCost: executionEffortCost, } }()
DefaultTransactionFees are the default transaction fee parameters if transaction fees are on. surge factor is 1.0, inclusion effort cost is 0.0001 (because the static inclusion effort is 1.0) and execution effort cost is 0.0 because dynamic execution fees are off If they are off (which is the default behaviour) that means the transaction fees are 0.0.
Functions ¶
func GetExecutionEffortWeights ¶ added in v0.27.0
func GetExecutionEffortWeights( env environment.Environment, service runtime.Address, ) ( computationWeights meter.ExecutionEffortWeights, err error, )
GetExecutionEffortWeights reads stored execution effort weights from the service account
func GetExecutionMemoryLimit ¶ added in v0.27.0
func GetExecutionMemoryLimit( env environment.Environment, service runtime.Address, ) ( memoryLimit uint64, err error, )
GetExecutionMemoryLimit reads the stored execution memory limit from the service account
func GetExecutionMemoryWeights ¶ added in v0.27.0
func GetExecutionMemoryWeights( env environment.Environment, service runtime.Address, ) ( memoryWeights meter.ExecutionMemoryWeights, err error, )
GetExecutionMemoryWeights reads stored execution memory weights from the service account
func NewInterpreterRuntime ¶ added in v0.15.1
func NewScriptEnv ¶ added in v0.28.0
func NewScriptEnv( reqContext context.Context, fvmContext Context, txnState *state.TransactionState, programs environment.TransactionPrograms, ) environment.Environment
func NewTransactionEnvironment ¶ added in v0.20.0
func NewTransactionEnvironment( ctx Context, txnState *state.TransactionState, programs environment.TransactionPrograms, tx *flow.TransactionBody, txIndex uint32, traceSpan otelTrace.Span, ) environment.Environment
Types ¶
type Blocks ¶
type Blocks = environment.Blocks
TODO(patrick): rm once flow-emulator is updated
func NewBlockFinder ¶ added in v0.13.0
TODO(patrick): rm once flow-emulator is updated
type BootstrapAccountKeys ¶ added in v0.27.0
type BootstrapAccountKeys struct { ServiceAccountPublicKeys []flow.AccountPublicKey FungibleTokenAccountPublicKeys []flow.AccountPublicKey FlowTokenAccountPublicKeys []flow.AccountPublicKey FlowFeesAccountPublicKeys []flow.AccountPublicKey NodeAccountPublicKeys []flow.AccountPublicKey }
type BootstrapProcedure ¶
type BootstrapProcedure struct {
// contains filtered or unexported fields
}
A BootstrapProcedure is an invokable that can be used to bootstrap the ledger state with the default accounts and contracts required by the Flow virtual machine.
func Bootstrap ¶
func Bootstrap( serviceAccountPublicKey flow.AccountPublicKey, opts ...BootstrapProcedureOption, ) *BootstrapProcedure
Bootstrap returns a new BootstrapProcedure instance configured with the provided genesis parameters.
func (*BootstrapProcedure) ComputationLimit ¶ added in v0.25.2
func (proc *BootstrapProcedure) ComputationLimit(_ Context) uint64
func (*BootstrapProcedure) ExecutionTime ¶ added in v0.28.0
func (proc *BootstrapProcedure) ExecutionTime() programs.LogicalTime
func (*BootstrapProcedure) InitialSnapshotTime ¶ added in v0.28.0
func (proc *BootstrapProcedure) InitialSnapshotTime() programs.LogicalTime
func (*BootstrapProcedure) MemoryLimit ¶ added in v0.25.2
func (proc *BootstrapProcedure) MemoryLimit(_ Context) uint64
func (*BootstrapProcedure) Run ¶
func (b *BootstrapProcedure) Run( ctx Context, txnState *state.TransactionState, programs *programs.TransactionPrograms, ) error
func (*BootstrapProcedure) ShouldDisableMemoryAndInteractionLimits ¶ added in v0.28.0
func (proc *BootstrapProcedure) ShouldDisableMemoryAndInteractionLimits(_ Context) bool
func (BootstrapProcedure) Type ¶ added in v0.28.0
func (BootstrapProcedure) Type() ProcedureType
type BootstrapProcedureFeeParameters ¶ added in v0.25.2
type BootstrapProcedureOption ¶ added in v0.14.0
type BootstrapProcedureOption func(*BootstrapProcedure) *BootstrapProcedure
func WithAccountCreationFee ¶ added in v0.14.0
func WithAccountCreationFee(fee cadence.UFix64) BootstrapProcedureOption
func WithBootstrapAccountKeys ¶ added in v0.27.0
func WithBootstrapAccountKeys(keys BootstrapAccountKeys) BootstrapProcedureOption
WithBootstrapAccountKeys sets the public keys of the accounts that will be created during bootstrapping by default all accounts are created with the ServiceAccountPublicKey specified when calling `Bootstrap`.
func WithEpochConfig ¶ added in v0.20.0
func WithEpochConfig(epochConfig epochs.EpochConfig) BootstrapProcedureOption
func WithExecutionEffortWeights ¶ added in v0.25.5
func WithExecutionEffortWeights(weights meter.ExecutionEffortWeights) BootstrapProcedureOption
func WithExecutionMemoryLimit ¶ added in v0.26.2
func WithExecutionMemoryLimit(limit uint64) BootstrapProcedureOption
func WithExecutionMemoryWeights ¶ added in v0.26.0
func WithExecutionMemoryWeights(weights meter.ExecutionMemoryWeights) BootstrapProcedureOption
func WithIdentities ¶ added in v0.20.0
func WithIdentities(identities flow.IdentityList) BootstrapProcedureOption
func WithInitialTokenSupply ¶ added in v0.14.0
func WithInitialTokenSupply(supply cadence.UFix64) BootstrapProcedureOption
func WithMinimumStorageReservation ¶ added in v0.14.0
func WithMinimumStorageReservation(reservation cadence.UFix64) BootstrapProcedureOption
func WithRestrictedAccountCreationEnabled ¶ added in v0.17.6
func WithRestrictedAccountCreationEnabled(enabled cadence.Bool) BootstrapProcedureOption
func WithRestrictedContractDeployment ¶ added in v0.26.0
func WithRestrictedContractDeployment(restricted *bool) BootstrapProcedureOption
func WithRootBlock ¶ added in v0.20.0
func WithRootBlock(rootBlock *flow.Header) BootstrapProcedureOption
func WithStorageMBPerFLOW ¶ added in v0.16.1
func WithStorageMBPerFLOW(ratio cadence.UFix64) BootstrapProcedureOption
func WithTransactionFee ¶ added in v0.14.0
func WithTransactionFee(fees BootstrapProcedureFeeParameters) BootstrapProcedureOption
type Context ¶
type Context struct { // DisableMemoryAndInteractionLimits will override memory and interaction // limits and set them to MaxUint64, effectively disabling these limits. DisableMemoryAndInteractionLimits bool ComputationLimit uint64 MemoryLimit uint64 MaxStateKeySize uint64 MaxStateValueSize uint64 MaxStateInteractionSize uint64 TransactionProcessors []TransactionProcessor ScriptProcessors []ScriptProcessor BlockPrograms *programs.BlockPrograms environment.EnvironmentParams }
A Context defines a set of execution parameters used by the virtual machine.
func NewContext ¶
NewContext initializes a new execution context with the provided options.
func NewContextFromParent ¶
NewContextFromParent spawns a child execution context with the provided options.
type Option ¶
An Option sets a configuration parameter for a virtual machine context.
func WithAccountStorageLimit ¶ added in v0.14.0
WithAccountStorageLimit enables or disables checking if account storage used is over its storage capacity
func WithBlockHeader ¶
WithBlockHeader sets the block header for a virtual machine context.
The VM uses the header to provide current block information to the Cadence runtime, as well as to seed the pseudorandom number generator.
func WithBlockPrograms ¶ added in v0.28.0
func WithBlockPrograms(programs *programs.BlockPrograms) Option
WithBlockPrograms sets the programs cache storage to be used by the transaction/script.
func WithBlocks ¶
func WithBlocks(blocks environment.Blocks) Option
WithBlocks sets the block storage provider for a virtual machine context.
The VM uses the block storage provider to provide historical block information to the Cadence runtime.
func WithCadenceLogging ¶ added in v0.13.1
WithCadenceLogging enables or disables Cadence logging for a virtual machine context.
func WithComputationLimit ¶ added in v0.25.2
WithComputationLimit sets the computation limit for a virtual machine context.
func WithContractDeploymentRestricted ¶ added in v0.27.0
WithRestrictedContractDeployment enables or disables restricted contract deployment for a virtual machine context. Warning! this would be overridden with the flag stored on chain. this is just a fallback value
func WithContractRemovalRestricted ¶ added in v0.27.0
WithRestrictContractRemoval enables or disables restricted contract removal for a virtual machine context. Warning! this would be overridden with the flag stored on chain. this is just a fallback value
func WithEventCollectionSizeLimit ¶ added in v0.13.1
WithEventCollectionSizeLimit sets the event collection byte size limit for a virtual machine context.
func WithExtensiveTracing ¶ added in v0.16.0
func WithExtensiveTracing() Option
WithExtensiveTracing sets the extensive tracing
func WithGasLimit ¶
WithGasLimit sets the computation limit for a virtual machine context. @depricated, please use WithComputationLimit instead.
func WithLogger ¶ added in v0.28.0
WithLogger sets the context logger
func WithMaxStateInteractionSize ¶ added in v0.14.0
WithMaxStateInteractionSize sets the byte size limit for total interaction with ledger. this prevents attacks such as reading all large registers
func WithMaxStateKeySize ¶ added in v0.14.0
WithMaxStateKeySize sets the byte size limit for ledger keys
func WithMaxStateValueSize ¶ added in v0.14.0
WithMaxStateValueSize sets the byte size limit for ledger values
func WithMemoryAndInteractionLimitsDisabled ¶ added in v0.28.0
func WithMemoryAndInteractionLimitsDisabled() Option
WithMemoryAndInteractionLimitsDisabled will override memory and interaction limits and set them to MaxUint64, effectively disabling these limits.
func WithMemoryLimit ¶ added in v0.25.2
WithMemoryLimit sets the memory limit for a virtual machine context.
func WithMetricsReporter ¶ added in v0.17.6
func WithMetricsReporter(mr environment.MetricsReporter) Option
WithMetricsReporter sets the metrics collector for a virtual machine context.
A metrics collector is used to gather metrics reported by the Cadence runtime.
func WithRestrictedDeployment ¶
@Depricated please use WithContractDeploymentRestricted instead of this this has been kept to reduce breaking change on the emulator, but would be removed at some point.
func WithReusableCadenceRuntimePool ¶ added in v0.28.0
func WithReusableCadenceRuntimePool( pool reusableRuntime.ReusableCadenceRuntimePool, ) Option
WithReusableCadenceRuntimePool set the (shared) RedusableCadenceRuntimePool use for creating the cadence runtime.
func WithServiceAccount ¶
WithServiceAccount enables or disables calls to the Flow service account.
func WithServiceEventCollectionEnabled ¶ added in v0.17.1
func WithServiceEventCollectionEnabled() Option
WithServiceEventCollectionEnabled enables service event collection
func WithTracer ¶ added in v0.14.5
WithTracer sets the tracer for a virtual machine context.
func WithTransactionFeesEnabled ¶ added in v0.17.1
WithTransactionFeesEnabled enables or disables deduction of transaction fees
func WithTransactionProcessors ¶
func WithTransactionProcessors(processors ...TransactionProcessor) Option
WithTransactionProcessors sets the transaction processors for a virtual machine context.
type Procedure ¶
type Procedure interface { Run( ctx Context, txnState *state.TransactionState, programs *programs.TransactionPrograms, ) error ComputationLimit(ctx Context) uint64 MemoryLimit(ctx Context) uint64 ShouldDisableMemoryAndInteractionLimits(ctx Context) bool Type() ProcedureType // The initial snapshot time is used as part of OCC validation to ensure // there are no read-write conflict amongst transactions. Note that once // we start supporting parallel preprocessing/execution, a transaction may // operation on mutliple snapshots. // // For scripts, since they can only be executed after the block has been // executed, the initial snapshot time is EndOfBlockExecutionTime. InitialSnapshotTime() programs.LogicalTime // For transactions, the execution time is TxIndex. For scripts, the // execution time is EndOfBlockExecutionTime. ExecutionTime() programs.LogicalTime }
An Procedure is an operation (or set of operations) that reads or writes ledger state.
type ProcedureType ¶ added in v0.28.0
type ProcedureType string
type ScriptInvoker ¶ added in v0.23.2
type ScriptInvoker struct{}
func NewScriptInvoker ¶ added in v0.23.2
func NewScriptInvoker() ScriptInvoker
func (ScriptInvoker) Process ¶ added in v0.23.2
func (i ScriptInvoker) Process( ctx Context, proc *ScriptProcedure, txnState *state.TransactionState, programs *programs.TransactionPrograms, ) error
type ScriptProcedure ¶
type ScriptProcedure struct { ID flow.Identifier Script []byte Arguments [][]byte RequestContext context.Context Value cadence.Value Logs []string Events []flow.Event GasUsed uint64 MemoryEstimate uint64 Err errors.CodedError }
func NewScriptWithContextAndArgs ¶ added in v0.26.0
func NewScriptWithContextAndArgs( code []byte, reqContext context.Context, args ...[]byte, ) *ScriptProcedure
func Script ¶
func Script(code []byte) *ScriptProcedure
func (*ScriptProcedure) ComputationLimit ¶ added in v0.25.2
func (proc *ScriptProcedure) ComputationLimit(ctx Context) uint64
func (*ScriptProcedure) ExecutionTime ¶ added in v0.28.0
func (proc *ScriptProcedure) ExecutionTime() programs.LogicalTime
func (*ScriptProcedure) InitialSnapshotTime ¶ added in v0.28.0
func (proc *ScriptProcedure) InitialSnapshotTime() programs.LogicalTime
func (*ScriptProcedure) MemoryLimit ¶ added in v0.25.2
func (proc *ScriptProcedure) MemoryLimit(ctx Context) uint64
func (*ScriptProcedure) Run ¶
func (proc *ScriptProcedure) Run( ctx Context, txnState *state.TransactionState, programs *programs.TransactionPrograms, ) error
func (*ScriptProcedure) ShouldDisableMemoryAndInteractionLimits ¶ added in v0.28.0
func (proc *ScriptProcedure) ShouldDisableMemoryAndInteractionLimits( ctx Context, ) bool
func (ScriptProcedure) Type ¶ added in v0.28.0
func (ScriptProcedure) Type() ProcedureType
func (*ScriptProcedure) WithArguments ¶
func (proc *ScriptProcedure) WithArguments(args ...[]byte) *ScriptProcedure
func (*ScriptProcedure) WithRequestContext ¶ added in v0.26.0
func (proc *ScriptProcedure) WithRequestContext( reqContext context.Context, ) *ScriptProcedure
type ScriptProcessor ¶
type ScriptProcessor interface { Process( Context, *ScriptProcedure, *state.TransactionState, *programs.TransactionPrograms, ) error }
type TransactionInvoker ¶ added in v0.23.2
type TransactionInvoker struct { }
func NewTransactionInvoker ¶ added in v0.23.2
func NewTransactionInvoker() TransactionInvoker
func (TransactionInvoker) Process ¶ added in v0.23.2
func (i TransactionInvoker) Process( ctx Context, proc *TransactionProcedure, txnState *state.TransactionState, programs *programsCache.TransactionPrograms, ) (processErr error)
type TransactionProcedure ¶
type TransactionProcedure struct { ID flow.Identifier Transaction *flow.TransactionBody InitialSnapshotTxIndex uint32 TxIndex uint32 Logs []string Events []flow.Event ServiceEvents []flow.Event ComputationUsed uint64 MemoryEstimate uint64 Err errors.CodedError TraceSpan otelTrace.Span }
func Transaction ¶
func Transaction(tx *flow.TransactionBody, txIndex uint32) *TransactionProcedure
TODO(patrick): pass in initial snapshot time when we start supporting speculative pre-processing / execution.
func (*TransactionProcedure) ComputationLimit ¶ added in v0.25.2
func (proc *TransactionProcedure) ComputationLimit(ctx Context) uint64
func (*TransactionProcedure) ExecutionTime ¶ added in v0.28.0
func (proc *TransactionProcedure) ExecutionTime() programs.LogicalTime
func (*TransactionProcedure) InitialSnapshotTime ¶ added in v0.28.0
func (proc *TransactionProcedure) InitialSnapshotTime() programs.LogicalTime
func (*TransactionProcedure) IsSampled ¶ added in v0.28.2
func (proc *TransactionProcedure) IsSampled() bool
func (*TransactionProcedure) MemoryLimit ¶ added in v0.25.2
func (proc *TransactionProcedure) MemoryLimit(ctx Context) uint64
func (*TransactionProcedure) Run ¶
func (proc *TransactionProcedure) Run( ctx Context, txnState *state.TransactionState, programs *programs.TransactionPrograms, ) error
func (*TransactionProcedure) SetTraceSpan ¶ added in v0.14.5
func (proc *TransactionProcedure) SetTraceSpan(traceSpan otelTrace.Span)
func (*TransactionProcedure) ShouldDisableMemoryAndInteractionLimits ¶ added in v0.28.0
func (proc *TransactionProcedure) ShouldDisableMemoryAndInteractionLimits( ctx Context, ) bool
func (*TransactionProcedure) StartSpanFromProcTraceSpan ¶ added in v0.28.2
func (TransactionProcedure) Type ¶ added in v0.28.0
func (TransactionProcedure) Type() ProcedureType
type TransactionProcessor ¶
type TransactionProcessor interface { Process( Context, *TransactionProcedure, *state.TransactionState, *programs.TransactionPrograms, ) error }
type TransactionSequenceNumberChecker ¶
type TransactionSequenceNumberChecker struct{}
func NewTransactionSequenceNumberChecker ¶
func NewTransactionSequenceNumberChecker() *TransactionSequenceNumberChecker
func (*TransactionSequenceNumberChecker) Process ¶
func (c *TransactionSequenceNumberChecker) Process( ctx Context, proc *TransactionProcedure, txnState *state.TransactionState, _ *programs.TransactionPrograms, ) error
type TransactionStorageLimiter ¶ added in v0.14.0
type TransactionStorageLimiter struct{}
func NewTransactionStorageLimiter ¶ added in v0.14.0
func NewTransactionStorageLimiter() TransactionStorageLimiter
func (TransactionStorageLimiter) CheckLimits ¶ added in v0.20.0
func (d TransactionStorageLimiter) CheckLimits( env environment.Environment, addresses []flow.Address, ) error
type TransactionVerifier ¶ added in v0.27.0
type TransactionVerifier struct {
KeyWeightThreshold int
}
TransactionVerifier verifies the content of the transaction by checking accounts (authorizers, payer, proposer) are not frozen checking there is no double signature all signatures are valid all accounts provides enoguh weights
if KeyWeightThreshold is set to a negative number, signature verification is skipped
func NewTransactionVerifier ¶ added in v0.27.0
func NewTransactionVerifier(keyWeightThreshold int) *TransactionVerifier
func (*TransactionVerifier) Process ¶ added in v0.27.0
func (v *TransactionVerifier) Process( ctx Context, proc *TransactionProcedure, txnState *state.TransactionState, _ *programs.TransactionPrograms, ) error
type VirtualMachine ¶
type VirtualMachine struct { }
A VirtualMachine augments the Cadence runtime with Flow host functionality.
func NewVirtualMachine ¶ added in v0.15.1
func NewVirtualMachine() *VirtualMachine
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package systemcontracts stores canonical address locations for all system smart contracts and service events.
|
Package systemcontracts stores canonical address locations for all system smart contracts and service events. |