types

package
v0.17.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2017 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.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.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.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.Result

	// Query for state.  This query request is not passed over the p2p network
	// and is called from Tenderpmint 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(reqQuery abci.RequestQuery) abci.ResponseQuery

	// Initialise the blockchain
	// When Tendermint initialises the genesis validators from tendermint core
	// are passed in as validators
	InitChain(validators []*abci.Validator)

	// Signals the beginning of communicating a block (all transactions have been
	// closed into the block already
	BeginBlock(hash []byte, header *abci.Header)

	// Signals the end of a blockchain
	// ResponseEndBlock wraps a slice of Validators with the Diff field. A Validator
	// is a public key and a voting power. Returning a Validator within this slice
	// asks Tendermint to set that validator's voting power to the Power provided.
	// Note: although the field is named 'Diff' the intention is that it declares
	// the what the new voting power should be (for validators specified,
	// those omitted are left alone) it is not an relative increment to
	// be added (or subtracted) from voting power.
	EndBlock(height uint64) abci.ResponseEndBlock

	// Is this the passed ConsensusEngine compatible with this manager
	CompatibleConsensus(consensusEngine consensus_types.ConsensusEngine) bool
}

Application interface applies transactions to the state.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL