Documentation ¶
Index ¶
- Constants
- func BuildQueryBinary(args interface{}) (argsBytes []byte, err error)
- func ComputeAppHash(previous []byte, validator []byte, root []byte) []byte
- func Run(a store.Adapter, kv store.KeyValueStore, config *Config)
- type ABCIError
- type Block
- type Config
- type Info
- type LastBlock
- type State
- type TMPop
- func (t *TMPop) BeginBlock(req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (t *TMPop) CheckTx(tx []byte) abci.ResponseCheckTx
- func (t *TMPop) Commit() abci.ResponseCommit
- func (t *TMPop) ConnectTendermint(tmClient TendermintClient)
- func (t *TMPop) DeliverTx(tx []byte) abci.ResponseDeliverTx
- func (t *TMPop) GetCurrentHeader() *abci.Header
- func (t *TMPop) Info(req abci.RequestInfo) abci.ResponseInfo
- func (t *TMPop) Query(reqQuery abci.RequestQuery) (resQuery abci.ResponseQuery)
- func (t *TMPop) SetOption(req abci.RequestSetOption) abci.ResponseSetOption
- type TendermintClient
- type TendermintClientWrapper
- type Tx
- type TxType
Constants ¶
const ( // CodeTypeValidation is the ABCI error code for a validation error. CodeTypeValidation uint32 = 400 // CodeTypeInternalError is the ABCI error code for an internal error. CodeTypeInternalError uint32 = 500 // CodeTypeNotImplemented is the ABCI error code for a feature not yet implemented. CodeTypeNotImplemented uint32 = 501 )
const ( AddEvidence = "AddEvidence" FindSegments = "FindSegments" GetEvidences = "GetEvidences" GetInfo = "GetInfo" GetMapIDs = "GetMapIDs" GetSegment = "GetSegment" PendingEvents = "PendingEvents" )
Query types.
const ( // Name of the Tendermint Application. Name = "TMPop" // Description of this Tendermint Application. Description = "Agent Store in a Blockchain" )
const (
// DefaultMetricsPort is the default port used to expose metrics.
DefaultMetricsPort = 5090
)
Variables ¶
This section is empty.
Functions ¶
func BuildQueryBinary ¶
BuildQueryBinary outputs the marshalled Query.
func ComputeAppHash ¶ added in v0.2.0
ComputeAppHash computes the app hash from its required parts.
Types ¶
type ABCIError ¶ added in v0.2.0
ABCIError is a structured error used inside TMPoP. The error codes are close to standard http status codes.
type Block ¶ added in v0.2.0
type Block struct { // The block's header. Header *tmtypes.Header // A block at height N contains the votes for block N-1. Votes []*evidences.TendermintVote // A block at height N contains the validator set for block N-1. Validators *tmtypes.ValidatorSet // The block's transactions. Txs []*Tx }
Block contains the parts of a Tendermint block that TMPoP is interested in.
type Config ¶
type Config struct { // A version string that will be set in the store's information. Version string // A git commit hash that will be set in the store's information. Commit string // path to the rules definition and validator plugins Validation *validation.Config // Monitoring configuration Monitoring *monitoring.Config }
Config contains configuration options for the App.
type Info ¶
type Info struct { Name string `json:"name"` Description string `json:"description"` Version string `json:"version"` Commit string `json:"commit"` AdapterInfo interface{} `json:"adapterInfo"` }
Info is the info returned by GetInfo.
type LastBlock ¶ added in v0.2.0
LastBlock saves the information of the last block committed for Core/App Handshake on crash/restart.
func ReadLastBlock ¶ added in v0.2.0
ReadLastBlock returns the last block committed by TMPop
type State ¶
type State struct {
// contains filtered or unexported fields
}
State represents the app states, separating the committed state (for queries) from the working state (for CheckTx and DeliverTx).
func (*State) Commit ¶
Commit commits the delivered links, resets delivered and checked state, and returns the hash for the commit and the list of committed links.
func (*State) UpdateValidators ¶ added in v0.3.0
UpdateValidators updates validators if a new version is available.
type TMPop ¶
type TMPop struct { abci.BaseApplication // contains filtered or unexported fields }
TMPop is the type of the application that implements github.com/tendermint/abci/types.Application, the tendermint socket protocol (ABCI).
func New ¶
func New(ctx context.Context, a store.Adapter, kv store.KeyValueStore, config *Config) (*TMPop, error)
New creates a new instance of a TMPop.
func (*TMPop) BeginBlock ¶
func (t *TMPop) BeginBlock(req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlock implements github.com/tendermint/abci/types.Application.BeginBlock.
func (*TMPop) CheckTx ¶
func (t *TMPop) CheckTx(tx []byte) abci.ResponseCheckTx
CheckTx implements github.com/tendermint/abci/types.Application.CheckTx.
func (*TMPop) Commit ¶
func (t *TMPop) Commit() abci.ResponseCommit
Commit implements github.com/tendermint/abci/types.Application.Commit. It actually commits the current state in the Store.
func (*TMPop) ConnectTendermint ¶ added in v0.2.0
func (t *TMPop) ConnectTendermint(tmClient TendermintClient)
ConnectTendermint connects TMPoP to a Tendermint node
func (*TMPop) DeliverTx ¶
func (t *TMPop) DeliverTx(tx []byte) abci.ResponseDeliverTx
DeliverTx implements github.com/tendermint/abci/types.Application.DeliverTx.
func (*TMPop) GetCurrentHeader ¶ added in v0.2.0
GetCurrentHeader returns the current block header
func (*TMPop) Info ¶
func (t *TMPop) Info(req abci.RequestInfo) abci.ResponseInfo
Info implements github.com/tendermint/abci/types.Application.Info.
func (*TMPop) Query ¶
func (t *TMPop) Query(reqQuery abci.RequestQuery) (resQuery abci.ResponseQuery)
Query implements github.com/tendermint/abci/types.Application.Query.
func (*TMPop) SetOption ¶
func (t *TMPop) SetOption(req abci.RequestSetOption) abci.ResponseSetOption
SetOption implements github.com/tendermint/abci/types.Application.SetOption.
type TendermintClient ¶ added in v0.2.0
TendermintClient is a light interface to query Tendermint Core.
type TendermintClientWrapper ¶ added in v0.2.0
type TendermintClientWrapper struct {
// contains filtered or unexported fields
}
TendermintClientWrapper implements TendermintClient.
func NewTendermintClient ¶ added in v0.2.0
func NewTendermintClient(tmClient client.Client) *TendermintClientWrapper
NewTendermintClient creates a new TendermintClient.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package evidences defines Tendermint proofs.
|
Package evidences defines Tendermint proofs. |