Documentation ¶
Index ¶
- Constants
- type Protocol
- func (p *Protocol) ForceRegister(r *protocol.Registry) error
- func (p *Protocol) Handle(ctx context.Context, act action.Action, sm protocol.StateManager) (*action.Receipt, error)
- func (p *Protocol) Name() string
- func (p *Protocol) ReadState(context.Context, protocol.StateReader, []byte, ...[]byte) ([]byte, uint64, error)
- func (p *Protocol) Register(r *protocol.Registry) error
- func (p *Protocol) Validate(_ context.Context, act action.Action, _ protocol.StateReader) error
Constants ¶
View Source
const (
// ExecutionSizeLimit is the maximum size of execution allowed
ExecutionSizeLimit = 32 * 1024
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Protocol ¶
type Protocol struct {
// contains filtered or unexported fields
}
Protocol defines the protocol of handling executions
func FindProtocol ¶ added in v0.11.0
FindProtocol finds the registered protocol from registry
func NewProtocol ¶
func NewProtocol(getBlockHash evm.GetBlockHash, depostGas evm.DepositGas) *Protocol
NewProtocol instantiates the protocol of exeuction
func (*Protocol) ForceRegister ¶ added in v0.11.0
ForceRegister registers the protocol with a unique ID and force replacing the previous protocol if it exists
func (*Protocol) Handle ¶
func (p *Protocol) Handle(ctx context.Context, act action.Action, sm protocol.StateManager) (*action.Receipt, error)
Handle handles an execution
func (*Protocol) ReadState ¶ added in v0.5.0
func (p *Protocol) ReadState(context.Context, protocol.StateReader, []byte, ...[]byte) ([]byte, uint64, error)
ReadState read the state on blockchain via protocol
Click to show internal directories.
Click to hide internal directories.