Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application interface {
// Info returns application information as a string
// NOTE: [ben] likely to move
Info() (info abci_types.ResponseInfo)
// Set application option (e.g. mode=mempool, mode=consensus)
// NOTE: [ben] taken from tendermint, but it is unclear what the use is,
// specifically, when will tendermint call this over abci ?
SetOption(key string, value string) (log string)
// Append transaction applies a transaction to the state regardless of
// whether the transaction is valid or not.
// Currently AppendTx is taken from abci, and returns a result.
// This will be altered, as AppendTransaction needs to more strongly reflect
// the theoretical logic:
// Append(StateN, Transaction) = StateN+1
// here invalid transactions are allowed, but should act as the identity on
// the state:
// Append(StateN, InvalidTransaction) = StateN
// TODO: implementation notes:
// 1. at this point the transaction should already be strongly typed
// 2.
DeliverTx(tx []byte) abci_types.Result
// Check Transaction validates a transaction before being allowed into the
// consensus' engine memory pool. This is the original defintion and
// intention as taken from abci, but should be remapped to the more
// general concept of basic, cheap verification;
// Check Transaction does not alter the state, but does require an immutable
// copy of the state. In particular there is no consensus on ordering yet.
// TODO: implementation notes:
// 1. at this point the transaction should already be strongly typed
// 2.
CheckTx(tx []byte) abci_types.Result
// Commit returns the root hash of the current application state
// NOTE: [ben] Because the concept of the block has been erased here
// the commit root hash is a fully implict stateful function;
// the opposit the principle of explicit stateless functions.
// This will be amended when we introduce the concept of (streaming)
// blocks in the pipe.
Commit() abci_types.Result
// Query for state. This query request is not passed over the p2p network
// and is called from Tendermint rpc directly up to the application.
// NOTE: [ben] burrow will give preference to queries from the local client
// directly over the burrow rpc.
// We will support this for Tendermint compatibility.
Query(query []byte) abci_types.Result
}
Application interface applies transactions to the state.
type BlockchainAware ¶
type BlockchainAware interface {
// Initialise the blockchain
// validators: genesis validators from tendermint core
InitChain(validators []*abci_types.Validator)
// Signals the beginning of a block;
// NOTE: [ben] currently not supported by tendermint
BeginBlock(height uint64)
// Signals the end of a blockchain
// validators: changed validators from app to Tendermint
// NOTE: [ben] currently not supported by tendermint
// not yet well defined what the change set contains.
EndBlock(height uint64) (validators []*abci_types.Validator)
}
Tendermint has a separate interface for reintroduction of blocks
Click to show internal directories.
Click to hide internal directories.