fvm

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: Apache-2.0, MIT Imports: 37 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StatApplied uint64
)

stat counters

Functions

func NewDualExecutionFVM added in v1.8.0

func NewDualExecutionFVM(ctx context.Context, opts *vm.VmOption) (vm.Interface, error)

func NewVM

func NewVM(ctx context.Context, opts vm.VmOption) (vm.Interface, error)

Types

type FVM

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

func NewDebugFVM added in v1.8.0

func NewDebugFVM(ctx context.Context, opts *vm.VmOption) (*FVM, error)

func NewFVM

func NewFVM(ctx context.Context, opts *vm.VmOption) (*FVM, error)

func (*FVM) ApplyImplicitMessage

func (fvm *FVM) ApplyImplicitMessage(ctx context.Context, cmsg types.ChainMsg) (*vm.Ret, error)

func (*FVM) ApplyMessage

func (fvm *FVM) ApplyMessage(ctx context.Context, cmsg types.ChainMsg) (*vm.Ret, error)

func (*FVM) Flush

func (fvm *FVM) Flush(ctx context.Context) (cid.Cid, error)

type FvmExecutionTrace

type FvmExecutionTrace struct {
	Msg    *types.Message
	MsgRct *types.MessageReceipt
	Error  string

	GasCharges []FvmGasCharge      `cborgen:"maxlen=1000000000"`
	Subcalls   []FvmExecutionTrace `cborgen:"maxlen=1000000000"`
}

This may eventually become identical to ExecutionTrace, but we can make incremental progress towards that

func (*FvmExecutionTrace) MarshalCBOR

func (t *FvmExecutionTrace) MarshalCBOR(w io.Writer) error

func (*FvmExecutionTrace) ToExecutionTrace

func (t *FvmExecutionTrace) ToExecutionTrace() types.ExecutionTrace

func (*FvmExecutionTrace) UnmarshalCBOR

func (t *FvmExecutionTrace) UnmarshalCBOR(r io.Reader) (err error)

type FvmExtern

type FvmExtern struct {
	Rand
	blockstoreutil.Blockstore
	// contains filtered or unexported fields
}

func (*FvmExtern) VerifyBlockSig

func (x *FvmExtern) VerifyBlockSig(ctx context.Context, blk *types.BlockHeader) (int64, error)

func (*FvmExtern) VerifyConsensusFault

func (x *FvmExtern) VerifyConsensusFault(ctx context.Context, a, b, extra []byte) (*ffi_cgo.ConsensusFault, int64)

VerifyConsensusFault is similar to the one in syscalls.go used by the LegacyVM, except it never errors Errors are logged and "no fault" is returned, which is functionally what go-actors does anyway

type FvmGasCharge added in v1.8.0

type FvmGasCharge struct {
	Name       string
	TotalGas   int64
	ComputeGas int64
	StorageGas int64
}

func (*FvmGasCharge) MarshalCBOR added in v1.8.0

func (t *FvmGasCharge) MarshalCBOR(w io.Writer) error

func (*FvmGasCharge) UnmarshalCBOR added in v1.8.0

func (t *FvmGasCharge) UnmarshalCBOR(r io.Reader) (err error)

type Rand

type Rand interface {
	GetChainRandomness(ctx context.Context, pers acrypto.DomainSeparationTag, round abi.ChainEpoch, entropy []byte) ([]byte, error)
	GetBeaconRandomness(ctx context.Context, pers acrypto.DomainSeparationTag, round abi.ChainEpoch, entropy []byte) ([]byte, error)
}

func NewWrapperRand added in v1.8.0

func NewWrapperRand(r vm.ChainRandomness) Rand

Jump to

Keyboard shortcuts

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