Documentation ¶
Index ¶
- type Applier
- type ExecutionContext
- type MessageFactory
- type MessageProducer
- func (mp *MessageProducer) ActorCid(c actors.ActorCodeID) cid.Cid
- func (mp *MessageProducer) Build(from, to address.Address, nonce uint64, method MethodID, params []byte, ...) (interface{}, error)
- func (mp *MessageProducer) BuildFull(from, to address.Address, method MethodID, nonce uint64, value types.BigInt, ...) (interface{}, error)
- func (mp *MessageProducer) InitExec(from address.Address, nonce uint64, code actors.ActorCodeID, params []byte, ...) (interface{}, error)
- func (mp *MessageProducer) Messages() []interface{}
- func (mp *MessageProducer) MultiSigAddSigner(to, from address.Address, nonce uint64, signer address.Address, increase bool, ...) (interface{}, error)
- func (mp *MessageProducer) MultiSigApprove(to, from address.Address, nonce uint64, txID uint64, opts ...MsgOpt) (interface{}, error)
- func (mp *MessageProducer) MultiSigCancel(to, from address.Address, nonce uint64, txID uint64, opts ...MsgOpt) (interface{}, error)
- func (mp *MessageProducer) MultiSigChangeRequirement(to, from address.Address, nonce uint64, req uint64, opts ...MsgOpt) (interface{}, error)
- func (mp *MessageProducer) MultiSigPropose(to, from address.Address, nonce uint64, proposeTo address.Address, ...) (interface{}, error)
- func (mp *MessageProducer) MultiSigRemoveSigner(to, from address.Address, nonce uint64, signer address.Address, decrease bool, ...) (interface{}, error)
- func (mp *MessageProducer) MultiSigSwapSigner(to, from address.Address, nonce uint64, swapFrom, swapTo address.Address, ...) (interface{}, error)
- func (mp *MessageProducer) PaychClose(to, from address.Address, nonce uint64, opts ...MsgOpt) (interface{}, error)
- func (mp *MessageProducer) PaychCollect(to, from address.Address, nonce uint64, opts ...MsgOpt) (interface{}, error)
- func (mp *MessageProducer) PaychGetOwner(to, from address.Address, nonce uint64, opts ...MsgOpt) (interface{}, error)
- func (mp *MessageProducer) PaychGetToSend(to, from address.Address, nonce uint64, opts ...MsgOpt) (interface{}, error)
- func (mp *MessageProducer) PaychUpdateChannelState(to, from address.Address, nonce uint64, sv types.SignedVoucher, ...) (interface{}, error)
- func (mp *MessageProducer) SingletonAddress(id actors.SingletonActorID) address.Address
- func (mp *MessageProducer) StorageMarketActivateStorageDeals(from address.Address, nonce uint64, dealIDs []uint64, opts ...MsgOpt) (interface{}, error)
- func (mp *MessageProducer) StorageMarketAddBalance(from address.Address, nonce uint64, opts ...MsgOpt) (interface{}, error)
- func (mp *MessageProducer) StorageMarketComputeDataCommitment(from address.Address, nonce uint64, sectorSize uint64, dealIDs []uint64, ...) (interface{}, error)
- func (mp *MessageProducer) StorageMarketPublishStorageDeals(from address.Address, nonce uint64, deals []strgmrkt.StorageDeal, ...) (interface{}, error)
- func (mp *MessageProducer) StorageMarketWithdrawBalance(from address.Address, nonce uint64, balance types.BigInt, opts ...MsgOpt) (interface{}, error)
- func (mp *MessageProducer) StorageMinerGetOwner(to, from address.Address, nonce uint64, opts ...MsgOpt) (interface{}, error)
- func (mp *MessageProducer) StorageMinerGetPeerID(to, from address.Address, nonce uint64, opts ...MsgOpt) (interface{}, error)
- func (mp *MessageProducer) StorageMinerGetPower(to, from address.Address, nonce uint64, opts ...MsgOpt) (interface{}, error)
- func (mp *MessageProducer) StorageMinerGetSectorSize(to, from address.Address, nonce uint64, opts ...MsgOpt) (interface{}, error)
- func (mp *MessageProducer) StorageMinerGetWorkerAddr(to, from address.Address, nonce uint64, opts ...MsgOpt) (interface{}, error)
- func (mp *MessageProducer) StorageMinerUpdatePeerID(to, from address.Address, nonce uint64, peerID peer.ID, opts ...MsgOpt) (interface{}, error)
- func (mp *MessageProducer) StoragePowerCreateStorageMiner(from address.Address, nonce uint64, owner address.Address, ...) (interface{}, error)
- func (mp *MessageProducer) StoragePowerLookupPower(from address.Address, nonce uint64, miner address.Address, opts ...MsgOpt) (interface{}, error)
- func (mp *MessageProducer) StoragePowerPledgeCollateralForSize(from address.Address, nonce uint64, size types.BigInt, opts ...MsgOpt) (interface{}, error)
- func (mp *MessageProducer) StoragePowerUpdateStorage(from address.Address, nonce uint64, delta types.BigInt, ...) (interface{}, error)
- func (mp *MessageProducer) Transfer(from, to address.Address, nonce uint64, value uint64, opts ...MsgOpt) (interface{}, error)
- type MessageReceipt
- type MethodID
- type MsgOpt
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Applier ¶
type Applier interface {
ApplyMessage(context *ExecutionContext, state state.Wrapper, msg interface{}) (MessageReceipt, error)
}
Applier applies abstract messages to states.
type ExecutionContext ¶
type ExecutionContext struct { Epoch uint64 // The epoch number ("height") during which a message is executed. MinerOwner address.Address // The miner actor which earns gas fees from message execution. }
ExecutionContext provides the context for execution of a message.
func NewExecutionContext ¶
func NewExecutionContext(epoch uint64, miner address.Address) *ExecutionContext
NewExecutionContext builds a new execution context.
type MessageFactory ¶
type MessageFactory interface { MakeMessage(from, to address.Address, method MethodID, nonce uint64, value, gasPrice types.BigInt, gasLimit types.GasUnit, params []byte) (interface{}, error) FromSingletonAddress(address actors.SingletonActorID) address.Address FromActorCodeCid(cod actors.ActorCodeID) cid.Cid }
MessageFactory creates a concrete, but opaque, message object. Integrations should implement this to provide a message value that will be accepted by the validation engine.
type MessageProducer ¶
type MessageProducer struct {
// contains filtered or unexported fields
}
MessageProducer presents a convenient API for scripting the creation of long and complex message sequences. The created messages are retained for subsequent export or evaluation in a VM. Actual message construction is delegated to a `MessageFactory`, and the message are opaque to the producer.
func NewMessageProducer ¶
func NewMessageProducer(factory MessageFactory, defaultGasLimit types.GasUnit, defaultGasPrice types.BigInt) *MessageProducer
NewMessageProducer creates a new message producer, delegating message creation to `factory`.
func (*MessageProducer) ActorCid ¶ added in v0.0.4
func (mp *MessageProducer) ActorCid(c actors.ActorCodeID) cid.Cid
func (*MessageProducer) Build ¶
func (mp *MessageProducer) Build(from, to address.Address, nonce uint64, method MethodID, params []byte, opts ...MsgOpt) (interface{}, error)
Build creates and returns a single message, using default gas parameters unless modified by `opts`.
func (*MessageProducer) BuildFull ¶
func (mp *MessageProducer) BuildFull(from, to address.Address, method MethodID, nonce uint64, value types.BigInt, gasLimit types.GasUnit, gasPrice types.BigInt, params []byte) (interface{}, error)
BuildFull creates and returns a single message.
func (*MessageProducer) InitExec ¶
func (mp *MessageProducer) InitExec(from address.Address, nonce uint64, code actors.ActorCodeID, params []byte, opts ...MsgOpt) (interface{}, error)
InitExec builds a message invoking InitActor.Exec and returns it.
func (*MessageProducer) Messages ¶
func (mp *MessageProducer) Messages() []interface{}
Messages returns a slice containing all messages created by the producer.
func (*MessageProducer) MultiSigAddSigner ¶ added in v0.0.2
func (*MessageProducer) MultiSigApprove ¶ added in v0.0.2
func (*MessageProducer) MultiSigCancel ¶ added in v0.0.2
func (*MessageProducer) MultiSigChangeRequirement ¶ added in v0.0.2
func (*MessageProducer) MultiSigPropose ¶ added in v0.0.2
func (*MessageProducer) MultiSigRemoveSigner ¶ added in v0.0.2
func (*MessageProducer) MultiSigSwapSigner ¶ added in v0.0.2
func (*MessageProducer) PaychClose ¶ added in v0.0.3
func (*MessageProducer) PaychCollect ¶ added in v0.0.3
func (*MessageProducer) PaychGetOwner ¶ added in v0.0.3
func (*MessageProducer) PaychGetToSend ¶ added in v0.0.3
func (*MessageProducer) PaychUpdateChannelState ¶ added in v0.0.3
func (mp *MessageProducer) PaychUpdateChannelState(to, from address.Address, nonce uint64, sv types.SignedVoucher, secret, proof []byte, opts ...MsgOpt) (interface{}, error)
func (*MessageProducer) SingletonAddress ¶ added in v0.0.4
func (mp *MessageProducer) SingletonAddress(id actors.SingletonActorID) address.Address
func (*MessageProducer) StorageMarketActivateStorageDeals ¶ added in v0.0.5
func (*MessageProducer) StorageMarketAddBalance ¶ added in v0.0.5
func (*MessageProducer) StorageMarketComputeDataCommitment ¶ added in v0.0.5
func (*MessageProducer) StorageMarketPublishStorageDeals ¶ added in v0.0.5
func (mp *MessageProducer) StorageMarketPublishStorageDeals(from address.Address, nonce uint64, deals []strgmrkt.StorageDeal, opts ...MsgOpt) (interface{}, error)
func (*MessageProducer) StorageMarketWithdrawBalance ¶ added in v0.0.5
func (*MessageProducer) StorageMinerGetOwner ¶
func (*MessageProducer) StorageMinerGetPeerID ¶
func (*MessageProducer) StorageMinerGetPower ¶
func (*MessageProducer) StorageMinerGetSectorSize ¶
func (*MessageProducer) StorageMinerGetWorkerAddr ¶
func (*MessageProducer) StorageMinerUpdatePeerID ¶
func (*MessageProducer) StoragePowerCreateStorageMiner ¶
func (mp *MessageProducer) StoragePowerCreateStorageMiner(from address.Address, nonce uint64, owner address.Address, worker address.Address, sectorSize uint64, peerID peer.ID, opts ...MsgOpt) (interface{}, error)
StoragePowerCreateStorageMiner builds a message invoking StoragePowerActor.CreateStorageMiner and returns it.
func (*MessageProducer) StoragePowerLookupPower ¶ added in v0.0.4
func (*MessageProducer) StoragePowerPledgeCollateralForSize ¶ added in v0.0.4
func (*MessageProducer) StoragePowerUpdateStorage ¶
type MessageReceipt ¶
MessageReceipt is the return value of message application.
type MethodID ¶
type MethodID int
MethodID identifies a VM actor method. The values here are not intended to match the spec's method IDs, though once implementations converge on those we could make it so. Integrations should map these method ids to the internal method handle representation.
const ( NoMethod MethodID = iota InitConstructor InitExec InitGetActorIDForAddress StoragePowerConstructor StoragePowerCreateStorageMiner StoragePowerUpdatePower StoragePowerTotalStorage StoragePowerPowerLookup StoragePowerIncrementPower StoragePowerSuspendMiner StorageMarketConstructor StorageMarketWithdrawBalance StorageMarketAddBalance StorageMarketPublishStorageDeals StorageMarketActivateStorageDeals StorageMarketComputeDataCommitment StorageMinerUpdatePeerID StorageMinerGetOwner StorageMinerGetWorkerAddr StorageMinerGetPower StorageMinerGetPeerID StorageMinerGetSectorSize MultiSigConstructor MultiSigPropose MultiSigApprove MultiSigCancel MultiSigClearCompleted MultiSigAddSigner MultiSigRemoveSigner MultiSigSwapSigner MultiSigChangeRequirement PaymentChannelConstructor PaymentChannelUpdate PaymentChannelClose PaymentChannelCollect PaymentChannelGetOwner PaymentChannelGetToSend GetSectorSize CronConstructor CronTick // Provides a value above which integrations can assign their own method identifiers without // collision with these "standard" ones. MethodCount )
An enumeration of all actor methods which a message could invoke. Note that some methods are not intended for direct invocation by account actors, but they are still listed here so that the behaviour of attempting to invoke them can be exercised.
type MsgOpt ¶
type MsgOpt func(*msgOpts)
MsgOpt is an option configuring message value or gas parameters.
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator arranges the execution of a sequence of messages, returning the resulting receipts and state.
func NewValidator ¶
NewValidator builds a new validator.
func (*Validator) ApplyMessage ¶
func (v *Validator) ApplyMessage(context *ExecutionContext, state state.Wrapper, message interface{}) (MessageReceipt, error)
ApplyMessages applies a message to a state