Documentation ¶
Index ¶
- Variables
- func Copy(from, to blockstore.Blockstore, root cid.Cid) error
- func DecodeParams(b []byte, out interface{}) error
- func DumpActorState(code cid.Cid, b []byte) (interface{}, error)
- func NewBLSAccountActor() *types.Actor
- func NewInvoker() *invoker
- func NewSecp256k1AccountActor() *types.Actor
- func ResolveToKeyAddr(state types.StateTree, cst cbor.IpldStore, addr address.Address) (address.Address, aerrors.ActorError)
- func Syscalls(verifier ffiwrapper.Verifier) runtime.Syscalls
- func TryCreateAccountActor(rt *Runtime, addr address.Address) (*types.Actor, aerrors.ActorError)
- type ApplyRet
- type Invokee
- type Pricelist
- type Rand
- type Runtime
- func (rs *Runtime) AbortStateMsg(msg string)
- func (rs *Runtime) Abortf(code exitcode.ExitCode, msg string, args ...interface{})
- func (rt *Runtime) ChargeGas(toUse int64)
- func (rt *Runtime) Context() context.Context
- func (rt *Runtime) CreateActor(codeId cid.Cid, address address.Address)
- func (rs *Runtime) CurrEpoch() abi.ChainEpoch
- func (rs *Runtime) CurrentBalance() abi.TokenAmount
- func (rt *Runtime) DeleteActor(addr address.Address)
- func (rs *Runtime) Get(c cid.Cid, o vmr.CBORUnmarshaler) bool
- func (rs *Runtime) GetActorCodeCID(addr address.Address) (ret cid.Cid, ok bool)
- func (rt *Runtime) GetBalance(a address.Address) (types.BigInt, aerrors.ActorError)
- func (rt *Runtime) GetRandomness(personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, ...) abi.Randomness
- func (rs *Runtime) Message() vmr.Message
- func (rt *Runtime) NewActorAddress() address.Address
- func (rt *Runtime) Pricelist() Pricelist
- func (rs *Runtime) Put(x vmr.CBORMarshaler) cid.Cid
- func (rt *Runtime) ResolveAddress(addr address.Address) (ret address.Address, ok bool)
- func (rs *Runtime) Send(to address.Address, method abi.MethodNum, m vmr.CBORMarshaler, ...) (vmr.SendReturn, exitcode.ExitCode)
- func (rs *Runtime) StartSpan(name string) vmr.TraceSpan
- func (rs *Runtime) State() vmr.StateHandle
- func (rs *Runtime) Store() vmr.Store
- func (rs *Runtime) Syscalls() vmr.Syscalls
- func (rt *Runtime) TotalFilCircSupply() abi.TokenAmount
- func (rs *Runtime) ValidateImmediateCallerAcceptAny()
- func (rt *Runtime) ValidateImmediateCallerIs(as ...address.Address)
- func (rt *Runtime) ValidateImmediateCallerType(ts ...cid.Cid)
- type VM
- func (vm *VM) ActorBalance(addr address.Address) (types.BigInt, aerrors.ActorError)
- func (vm *VM) ApplyImplicitMessage(ctx context.Context, msg *types.Message) (*ApplyRet, error)
- func (vm *VM) ApplyMessage(ctx context.Context, cmsg types.ChainMsg) (*ApplyRet, error)
- func (vm *VM) Flush(ctx context.Context) (cid.Cid, error)
- func (vm *VM) Invoke(act *types.Actor, rt *Runtime, method abi.MethodNum, params []byte) ([]byte, aerrors.ActorError)
- func (vm *VM) MutateState(ctx context.Context, addr address.Address, fn interface{}) error
- func (vm *VM) SetBlockHeight(h abi.ChainEpoch)
- func (vm *VM) SetInvoker(i *invoker)
- func (vm *VM) StateTree() types.StateTree
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyObjectCid cid.Cid
Functions ¶
func Copy ¶
func Copy(from, to blockstore.Blockstore, root cid.Cid) error
func DecodeParams ¶
func DumpActorState ¶
func NewBLSAccountActor ¶
func NewInvoker ¶ added in v0.2.8
func NewInvoker() *invoker
func ResolveToKeyAddr ¶
func ResolveToKeyAddr(state types.StateTree, cst cbor.IpldStore, addr address.Address) (address.Address, aerrors.ActorError)
ResolveToKeyAddr returns the public key type of address (`BLS`/`SECP256K1`) of an account actor identified by `addr`.
func TryCreateAccountActor ¶
func TryCreateAccountActor(rt *Runtime, addr address.Address) (*types.Actor, aerrors.ActorError)
Creates account actors from only BLS/SECP256K1 addresses.
Types ¶
type ApplyRet ¶
type ApplyRet struct { types.MessageReceipt ActorErr aerrors.ActorError Penalty types.BigInt InternalExecutions []*types.ExecutionResult Duration time.Duration }
type Pricelist ¶ added in v0.3.0
type Pricelist interface { // OnChainMessage returns the gas used for storing a message of a given size in the chain. OnChainMessage(msgSize int) int64 // OnChainReturnValue returns the gas used for storing the response of a message in the chain. OnChainReturnValue(dataSize int) int64 // OnMethodInvocation returns the gas used when invoking a method. OnMethodInvocation(value abi.TokenAmount, methodNum abi.MethodNum) int64 // OnIpldGet returns the gas used for storing an object OnIpldGet(dataSize int) int64 // OnIpldPut returns the gas used for storing an object OnIpldPut(dataSize int) int64 // OnCreateActor returns the gas used for creating an actor OnCreateActor() int64 // OnDeleteActor returns the gas used for deleting an actor OnDeleteActor() int64 OnVerifySignature(sigType crypto.SigType, planTextSize int) (int64, error) OnHashing(dataSize int) int64 OnComputeUnsealedSectorCid(proofType abi.RegisteredProof, pieces []abi.PieceInfo) int64 OnVerifySeal(info abi.SealVerifyInfo) int64 OnVerifyPost(info abi.WindowPoStVerifyInfo) int64 OnVerifyConsensusFault() int64 }
Pricelist provides prices for operations in the VM.
Note: this interface should be APPEND ONLY since last chain checkpoint
func PricelistByEpoch ¶ added in v0.3.0
func PricelistByEpoch(epoch abi.ChainEpoch) Pricelist
PricelistByEpoch finds the latest prices for the given epoch
type Rand ¶
type Rand interface {
GetRandomness(ctx context.Context, pers crypto.DomainSeparationTag, round abi.ChainEpoch, entropy []byte) ([]byte, error)
}
type Runtime ¶ added in v0.3.0
type Runtime struct {
// contains filtered or unexported fields
}
func (*Runtime) AbortStateMsg ¶ added in v0.3.0
func (*Runtime) CreateActor ¶ added in v0.3.0
func (rt *Runtime) CreateActor(codeId cid.Cid, address address.Address)
func (*Runtime) CurrEpoch ¶ added in v0.3.0
func (rs *Runtime) CurrEpoch() abi.ChainEpoch
func (*Runtime) CurrentBalance ¶ added in v0.3.0
func (rs *Runtime) CurrentBalance() abi.TokenAmount
func (*Runtime) DeleteActor ¶ added in v0.3.0
func (rt *Runtime) DeleteActor(addr address.Address)
func (*Runtime) GetActorCodeCID ¶ added in v0.3.0
func (*Runtime) GetBalance ¶ added in v0.3.0
func (rt *Runtime) GetBalance(a address.Address) (types.BigInt, aerrors.ActorError)
func (*Runtime) GetRandomness ¶ added in v0.3.0
func (rt *Runtime) GetRandomness(personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) abi.Randomness
func (*Runtime) NewActorAddress ¶ added in v0.3.0
func (rt *Runtime) NewActorAddress() address.Address
func (*Runtime) Put ¶ added in v0.3.0
func (rs *Runtime) Put(x vmr.CBORMarshaler) cid.Cid
func (*Runtime) ResolveAddress ¶ added in v0.3.0
func (*Runtime) Send ¶ added in v0.3.0
func (rs *Runtime) Send(to address.Address, method abi.MethodNum, m vmr.CBORMarshaler, value abi.TokenAmount) (vmr.SendReturn, exitcode.ExitCode)
func (*Runtime) State ¶ added in v0.3.0
func (rs *Runtime) State() vmr.StateHandle
func (*Runtime) TotalFilCircSupply ¶ added in v0.3.0
func (rt *Runtime) TotalFilCircSupply() abi.TokenAmount
func (*Runtime) ValidateImmediateCallerAcceptAny ¶ added in v0.3.0
func (rs *Runtime) ValidateImmediateCallerAcceptAny()
func (*Runtime) ValidateImmediateCallerIs ¶ added in v0.3.0
func (rt *Runtime) ValidateImmediateCallerIs(as ...address.Address)
func (*Runtime) ValidateImmediateCallerType ¶ added in v0.3.0
func (rt *Runtime) ValidateImmediateCallerType(ts ...cid.Cid)
type VM ¶
func NewVM ¶
func NewVM(base cid.Cid, height abi.ChainEpoch, r Rand, cbs blockstore.Blockstore, syscalls runtime.Syscalls) (*VM, error)
func (*VM) ActorBalance ¶
func (vm *VM) ActorBalance(addr address.Address) (types.BigInt, aerrors.ActorError)
func (*VM) ApplyImplicitMessage ¶ added in v0.3.0
func (*VM) ApplyMessage ¶
func (*VM) MutateState ¶ added in v0.3.0
vm.MutateState(idAddr, func(cst cbor.IpldStore, st *ActorStateType) error {...})
func (*VM) SetBlockHeight ¶
func (vm *VM) SetBlockHeight(h abi.ChainEpoch)
func (*VM) SetInvoker ¶ added in v0.2.8
func (vm *VM) SetInvoker(i *invoker)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.