fvm

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: Apache-2.0, MIT Imports: 35 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StatApplied uint64
)

stat counters

Functions

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 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

	Subcalls []FvmExecutionTrace
}

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) 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 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)
}

Jump to

Keyboard shortcuts

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