vm

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: May 19, 2020 License: Apache-2.0, MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultActors = builtin.DefaultActors

DefaultActors is a code loader with the built-in actors that come with the system.

Functions

This section is empty.

Types

type ActorCodeLoader

type ActorCodeLoader = dispatch.CodeLoader

ActorCodeLoader allows yo to load an actor's code based on its id an epoch.

type ActorMethodSignature

type ActorMethodSignature = dispatch.MethodSignature

ActorMethodSignature wraps a specific method and allows you to encode/decodes input/output bytes into concrete types.

type BlockMessagesInfo

type BlockMessagesInfo = interpreter.BlockMessagesInfo

BlockMessagesInfo contains messages for one block in a tipset.

type FakeSyscalls

type FakeSyscalls = vmcontext.FakeSyscalls

type Interpreter

type Interpreter = interpreter.VMInterpreter

Interpreter is the VM.

func NewVM

func NewVM(st state.Tree, store *storage.VMStorage, syscalls SyscallsImpl) Interpreter

NewVM creates a new VM interpreter.

type MessageMaker

type MessageMaker struct {
	DefaultGasPrice types.AttoFIL
	DefaultGasUnits gas.Unit
	// contains filtered or unexported fields
}

MessageMaker creates unique, signed messages for use in tests.

func NewMessageMaker

func NewMessageMaker(t *testing.T, keys []crypto.KeyInfo) *MessageMaker

NewMessageMaker creates a new message maker with a set of signing keys.

func (*MessageMaker) Addresses

func (mm *MessageMaker) Addresses() []address.Address

Addresses returns the addresses for which this maker can sign messages.

func (*MessageMaker) NewSignedMessage

func (mm *MessageMaker) NewSignedMessage(from address.Address, nonce uint64) *types.SignedMessage

NewSignedMessage creates a new signed message.

func (*MessageMaker) NewUnsignedMessage

func (mm *MessageMaker) NewUnsignedMessage(from address.Address, nonce uint64) *types.UnsignedMessage

NewUnsignedMessage creates a new message.

func (*MessageMaker) Signer

func (mm *MessageMaker) Signer() *types.MockSigner

Signer returns the signer with which this maker signs messages.

type MessageReceipt

type MessageReceipt = message.Receipt

MessageReceipt is what is returned by executing a message on the vm.

func EmptyReceipts

func EmptyReceipts(n int) []*MessageReceipt

EmptyReceipts returns a slice of n empty receipts.

type ReceiptMaker

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

ReceiptMaker generates unique receipts

func NewReceiptMaker

func NewReceiptMaker() *ReceiptMaker

NewReceiptMaker creates a new receipt maker

func (*ReceiptMaker) NewReceipt

func (rm *ReceiptMaker) NewReceipt() MessageReceipt

NewReceipt creates a new distinct receipt.

type Storage

type Storage = storage.VMStorage

Storage is the raw storage for the VM.

func NewStorage

func NewStorage(bs blockstore.Blockstore) Storage

NewStorage creates a new Storage for the VM.

type SyscallsImpl

type SyscallsImpl = vmcontext.SyscallsImpl

type SyscallsStateView

type SyscallsStateView = vmcontext.SyscallsStateView

type TestStorage

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

TestStorage is a fake storage used for testing.

func NewTestStorage

func NewTestStorage(state interface{}) *TestStorage

NewTestStorage returns a new "TestStorage"

func (*TestStorage) CidOf

func (ts *TestStorage) CidOf(obj interface{}) cid.Cid

CidOf returns the cid of the object.

func (*TestStorage) Get

func (ts *TestStorage) Get(cid cid.Cid, obj specsruntime.CBORUnmarshaler) bool

Get implements runtime.Store.

func (*TestStorage) Put

func (ts *TestStorage) Put(v specsruntime.CBORMarshaler) cid.Cid

Put implements runtime.Store.

Directories

Path Synopsis
Package actor implements tooling to write and manipulate actors in go.
Package actor implements tooling to write and manipulate actors in go.
internal
errors
Package internal has all the things vm and only vm need.
Package internal has all the things vm and only vm need.

Jump to

Keyboard shortcuts

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