Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Applier ¶
type Applier interface { ApplyMessage(epoch abi.ChainEpoch, msg *types.Message) (types.ApplyMessageResult, error) ApplySignedMessage(epoch abi.ChainEpoch, msg *types.SignedMessage) (types.ApplyMessageResult, error) ApplyTipSetMessages(epoch abi.ChainEpoch, blocks []types.BlockMessagesInfo, rnd RandomnessSource) (types.ApplyTipSetResult, error) }
Applier applies abstract messages to states.
type Factories ¶
type Factories interface { NewStateAndApplier(syscalls runtime.Syscalls) (VMWrapper, Applier) NewKeyManager() KeyManager NewValidationConfig() ValidationConfig }
Factories wraps up all the implementation-specific integration points.
type KeyManager ¶
type KeyManager interface { // Creates a new secp private key and returns the associated address. NewSECP256k1AccountAddress() address.Address // Creates a new BLS private key and returns the associated address. NewBLSAccountAddress() address.Address // Sign data with addr's key. Sign(addr address.Address, data []byte) (crypto.Signature, error) }
TODO this needs to be implemented by chain validation. Providing these methods over RPC doesn't add a lot of value.
type RandomnessSource ¶
type RandomnessSource interface {
Randomness(ctx context.Context, tag crypto.DomainSeparationTag, epoch abi.ChainEpoch, entropy []byte) (abi.Randomness, error)
}
RandomnessSource provides randomness to actors.
type VMWrapper ¶
type VMWrapper interface { // Instantiate a new VM NewVM() // Returns the CID of the root node of the state tree. Root() cid.Cid // Get the value at key from vm store StoreGet(key cid.Cid, out runtime.CBORUnmarshaler) error // Put `value` into vm store StorePut(value runtime.CBORMarshaler) (cid.Cid, error) // Returns the actor state at `address` (or an error if there is none). Actor(address address.Address) (Actor, error) // Set state on an actor in the state tree. The actors head is the cid of `state`. SetActorState(addr address.Address, balance abi.TokenAmount, state runtime.CBORMarshaler) (Actor, error) // Installs a new actor in the state tree, going through the init actor when appropriate and returning the ID address of the actor. CreateActor(code cid.Cid, addr address.Address, balance abi.TokenAmount, state runtime.CBORMarshaler) (Actor, address.Address, error) }
VMWrapper abstracts the inspection and mutation of an implementation-specific state tree and storage. The interface wraps a single, mutable state.
Click to show internal directories.
Click to hide internal directories.