iotex-core: Index | Files | Directories

package execution

import ""


Package Files



const (
    // ExecutionSizeLimit is the maximum size of execution allowed
    ExecutionSizeLimit = 32 * 1024
    // ProtocolID is the protocol ID
    // TODO: it works only for one instance per protocol definition now
    ProtocolID = "smart_contract"

type Protocol Uses

type Protocol struct {
    // contains filtered or unexported fields

Protocol defines the protocol of handling executions

func NewProtocol Uses

func NewProtocol(cm protocol.ChainManager, hu config.HeightUpgrade) *Protocol

NewProtocol instantiates the protocol of exeuction

func (*Protocol) Handle Uses

func (p *Protocol) Handle(ctx context.Context, act action.Action, sm protocol.StateManager) (*action.Receipt, error)

Handle handles an execution

func (*Protocol) ReadState Uses

func (p *Protocol) ReadState(context.Context, protocol.StateManager, []byte, ...[]byte) ([]byte, error)

ReadState read the state on blockchain via protocol

func (*Protocol) Validate Uses

func (p *Protocol) Validate(_ context.Context, act action.Action) error

Validate validates an execution



Package execution imports 10 packages (graph) and is imported by 1 packages. Updated 2019-08-20. Refresh now. Tools for package owners.