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

package contexts

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

Index

Package Files

bond_context.go call_context.go governance_context.go identify_context.go name_context.go permissions_context.go proposal_context.go send_context.go shared.go unbond_context.go

Constants

const GasLimit = uint64(1000000)

TODO: make configurable

func HasPermission Uses

func HasPermission(accountGetter acmstate.AccountGetter, acc *acm.Account, perm permission.PermFlag, logger *logging.Logger) bool

Get permission on an account or fall back to global value

func MaybeGetPublicKey Uses

func MaybeGetPublicKey(sw acmstate.ReaderWriter, address crypto.Address) (*crypto.PublicKey, error)

func VerifyIdentity Uses

func VerifyIdentity(sw acmstate.ReaderWriter, account *spec.TemplateAccount) (err error)

type BondContext Uses

type BondContext struct {
    State        acmstate.ReaderWriter
    ValidatorSet validator.ReaderWriter
    Logger       *logging.Logger
    // contains filtered or unexported fields
}

func (*BondContext) Execute Uses

func (ctx *BondContext) Execute(txe *exec.TxExecution, p payload.Payload) error

Execute a BondTx to add or remove a new validator

type CallContext Uses

type CallContext struct {
    EVM           *evm.EVM
    State         acmstate.ReaderWriter
    MetadataState acmstate.MetadataReaderWriter
    Blockchain    engine.Blockchain
    RunCall       bool
    Logger        *logging.Logger
    // contains filtered or unexported fields
}

func (*CallContext) CallEvents Uses

func (ctx *CallContext) CallEvents(err error)

func (*CallContext) Check Uses

func (ctx *CallContext) Check(inAcc *acm.Account, value uint64) error

func (*CallContext) Deliver Uses

func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error

func (*CallContext) Execute Uses

func (ctx *CallContext) Execute(txe *exec.TxExecution, p payload.Payload) error

func (*CallContext) Precheck Uses

func (ctx *CallContext) Precheck() (*acm.Account, *acm.Account, error)

func (*CallContext) Sync Uses

func (ctx *CallContext) Sync(cache *acmstate.Cache, metaCache *acmstate.MetadataCache) error

type Context Uses

type Context interface {
    Execute(txe *exec.TxExecution, p payload.Payload) error
}

type GovernanceContext Uses

type GovernanceContext struct {
    State        acmstate.ReaderWriter
    ValidatorSet validator.ReaderWriter
    Logger       *logging.Logger
    // contains filtered or unexported fields
}

func (*GovernanceContext) Execute Uses

func (ctx *GovernanceContext) Execute(txe *exec.TxExecution, p payload.Payload) error

GovTx provides a set of TemplateAccounts and GovernanceContext tries to alter the chain state to match the specification given

func (*GovernanceContext) UpdateAccount Uses

func (ctx *GovernanceContext) UpdateAccount(account *acm.Account, update *spec.TemplateAccount) (ev *exec.GovernAccountEvent, err error)

type IdentifyContext Uses

type IdentifyContext struct {
    NodeWriter  registry.ReaderWriter
    StateReader acmstate.Reader
    Logger      *logging.Logger
    // contains filtered or unexported fields
}

func (*IdentifyContext) Execute Uses

func (ctx *IdentifyContext) Execute(txe *exec.TxExecution, p payload.Payload) error

type NameContext Uses

type NameContext struct {
    Blockchain engine.Blockchain
    State      acmstate.ReaderWriter
    NameReg    names.ReaderWriter
    Logger     *logging.Logger
    // contains filtered or unexported fields
}

func (*NameContext) Execute Uses

func (ctx *NameContext) Execute(txe *exec.TxExecution, p payload.Payload) error

type PermissionsContext Uses

type PermissionsContext struct {
    State  acmstate.ReaderWriter
    Logger *logging.Logger
    // contains filtered or unexported fields
}

func (*PermissionsContext) Execute Uses

func (ctx *PermissionsContext) Execute(txe *exec.TxExecution, p payload.Payload) error

type ProposalContext Uses

type ProposalContext struct {
    ChainID           string
    ProposalThreshold uint64
    State             acmstate.ReaderWriter
    ValidatorSet      validator.Writer
    ProposalReg       proposal.ReaderWriter
    Logger            *logging.Logger

    Contexts map[payload.Type]Context
    // contains filtered or unexported fields
}

func (*ProposalContext) Execute Uses

func (ctx *ProposalContext) Execute(txe *exec.TxExecution, p payload.Payload) error

type SendContext Uses

type SendContext struct {
    State  acmstate.ReaderWriter
    Logger *logging.Logger
    // contains filtered or unexported fields
}

func (*SendContext) Execute Uses

func (ctx *SendContext) Execute(txe *exec.TxExecution, p payload.Payload) error

type UnbondContext Uses

type UnbondContext struct {
    State        acmstate.ReaderWriter
    ValidatorSet validator.ReaderWriter
    Logger       *logging.Logger
    // contains filtered or unexported fields
}

func (*UnbondContext) Execute Uses

func (ctx *UnbondContext) Execute(txe *exec.TxExecution, p payload.Payload) error

Execute an UnbondTx to remove a validator

Package contexts imports 25 packages (graph) and is imported by 4 packages. Updated 2020-06-13. Refresh now. Tools for package owners.