burrow: github.com/hyperledger/burrow/execution/engine Index | Files

package engine

import "github.com/hyperledger/burrow/execution/engine"


Package Files

call_frame.go callable.go dispatcher.go state.go

func Connect Uses

func Connect(eds ...ExternalDispatcher)

Connect ExternalDispatchers eds to each other so that the underlying engines can mutually call contracts hosted by other dispatchers

type Blockchain Uses

type Blockchain interface {
    LastBlockHeight() uint64
    LastBlockTime() time.Time
    BlockHash(height uint64) ([]byte, error)

type CallFrame Uses

type CallFrame struct {
    // Cache this State wraps
    // contains filtered or unexported fields

func NewCallFrame Uses

func NewCallFrame(st acmstate.ReaderWriter, cacheOptions ...acmstate.CacheOption) *CallFrame

Create a new CallFrame to hold state updates at a particular level in the call stack

func (*CallFrame) CallStackDepth Uses

func (st *CallFrame) CallStackDepth() uint64

func (*CallFrame) NewFrame Uses

func (st *CallFrame) NewFrame(cacheOptions ...acmstate.CacheOption) (*CallFrame, error)

func (*CallFrame) ReadOnly Uses

func (st *CallFrame) ReadOnly() *CallFrame

Put this CallFrame in permanent read-only mode

func (*CallFrame) Sync Uses

func (st *CallFrame) Sync() error

func (*CallFrame) WithMaxCallStackDepth Uses

func (st *CallFrame) WithMaxCallStackDepth(max uint64) *CallFrame

type CallParams Uses

type CallParams struct {
    CallType exec.CallType
    Origin   crypto.Address
    Caller   crypto.Address
    Callee   crypto.Address
    Input    []byte
    Value    uint64
    Gas      *uint64

type Callable Uses

type Callable interface {
    Call(state State, params CallParams) (output []byte, err error)

Effectively a contract, but can either represent a single function or a contract with multiple functions and a selector

type CallableFunc Uses

type CallableFunc func(st State, params CallParams) (output []byte, err error)

func (CallableFunc) Call Uses

func (c CallableFunc) Call(state State, params CallParams) (output []byte, err error)

type Dispatcher Uses

type Dispatcher interface {
    // If this Dispatcher is capable of dispatching this account (e.g. if it has the correct bytecode) then return a
    // Callable that wraps the function, otherwise return nil
    Dispatch(acc *acm.Account) Callable

type Dispatchers Uses

type Dispatchers []Dispatcher

func NewDispatchers Uses

func NewDispatchers(dispatchers ...Dispatcher) Dispatchers

func (Dispatchers) Dispatch Uses

func (ds Dispatchers) Dispatch(acc *acm.Account) Callable

type ExternalDispatcher Uses

type ExternalDispatcher interface {
    SetExternals(externals Dispatcher)

An ExternalDispatcher is able to Dispatch accounts to external engines as well as Dispatch to itself

type State Uses

type State struct {

Package engine imports 6 packages (graph) and is imported by 18 packages. Updated 2019-11-19. Refresh now. Tools for package owners.