Documentation ¶
Overview ¶
Package abci implements the Accumulate ABCI applications.
Transaction Processing ¶
Tendermint processes transactions in the following phases:
- BeginBlock
- [CheckTx]
- [DeliverTx]
- EndBlock
- Commit
Index ¶
- Constants
- type Accumulator
- func (app *Accumulator) ApplySnapshotChunk(req abci.RequestApplySnapshotChunk) abci.ResponseApplySnapshotChunk
- func (app *Accumulator) BeginBlock(req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *Accumulator) CheckTx(req abci.RequestCheckTx) (rct abci.ResponseCheckTx)
- func (app *Accumulator) Commit() (resp abci.ResponseCommit)
- func (app *Accumulator) DeliverTx(req abci.RequestDeliverTx) (rdt abci.ResponseDeliverTx)
- func (app *Accumulator) EndBlock(req abci.RequestEndBlock) (resp abci.ResponseEndBlock)
- func (app *Accumulator) Info(req abci.RequestInfo) abci.ResponseInfo
- func (app *Accumulator) InitChain(req abci.RequestInitChain) abci.ResponseInitChain
- func (app *Accumulator) ListSnapshots(req abci.RequestListSnapshots) abci.ResponseListSnapshots
- func (app *Accumulator) LoadSnapshotChunk(req abci.RequestLoadSnapshotChunk) abci.ResponseLoadSnapshotChunk
- func (app *Accumulator) OfferSnapshot(req abci.RequestOfferSnapshot) abci.ResponseOfferSnapshot
- func (app *Accumulator) OnFatal(f func(error))
- func (app *Accumulator) Query(reqQuery abci.RequestQuery) (resQuery abci.ResponseQuery)
- type AccumulatorOptions
- type BeginBlockRequest
- type BeginBlockResponse
- type Chain
- type EndBlockRequest
- type EndBlockResponse
- type SynthTxnReference
Constants ¶
const Version uint64 = 0x1
Version is the version of the ABCI applications.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Accumulator ¶
type Accumulator struct { abci.BaseApplication AccumulatorOptions // contains filtered or unexported fields }
Accumulator is an ABCI application that accumulates validated transactions in a hash tree.
func NewAccumulator ¶
func NewAccumulator(opts AccumulatorOptions) *Accumulator
NewAccumulator returns a new Accumulator.
func (*Accumulator) ApplySnapshotChunk ¶
func (app *Accumulator) ApplySnapshotChunk( req abci.RequestApplySnapshotChunk) abci.ResponseApplySnapshotChunk
ApplySnapshotChunk implements github.com/tendermint/tendermint/abci/types.Application.
func (*Accumulator) BeginBlock ¶
func (app *Accumulator) BeginBlock(req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlock implements github.com/tendermint/tendermint/abci/types.Application.
func (*Accumulator) CheckTx ¶
func (app *Accumulator) CheckTx(req abci.RequestCheckTx) (rct abci.ResponseCheckTx)
CheckTx implements github.com/tendermint/tendermint/abci/types.Application.
Verifies the transaction is sane.
func (*Accumulator) Commit ¶
func (app *Accumulator) Commit() (resp abci.ResponseCommit)
Commit implements github.com/tendermint/tendermint/abci/types.Application.
Commits the transaction block to the chains.
func (*Accumulator) DeliverTx ¶
func (app *Accumulator) DeliverTx(req abci.RequestDeliverTx) (rdt abci.ResponseDeliverTx)
DeliverTx implements github.com/tendermint/tendermint/abci/types.Application.
Verifies the transaction is valid.
func (*Accumulator) EndBlock ¶
func (app *Accumulator) EndBlock(req abci.RequestEndBlock) (resp abci.ResponseEndBlock)
EndBlock implements github.com/tendermint/tendermint/abci/types.Application.
func (*Accumulator) Info ¶
func (app *Accumulator) Info(req abci.RequestInfo) abci.ResponseInfo
Info implements github.com/tendermint/tendermint/abci/types.Application.
func (*Accumulator) InitChain ¶
func (app *Accumulator) InitChain(req abci.RequestInitChain) abci.ResponseInitChain
InitChain implements github.com/tendermint/tendermint/abci/types.Application.
Called when a chain is created.
func (*Accumulator) ListSnapshots ¶
func (app *Accumulator) ListSnapshots( req abci.RequestListSnapshots) abci.ResponseListSnapshots
ListSnapshots implements github.com/tendermint/tendermint/abci/types.Application.
func (*Accumulator) LoadSnapshotChunk ¶
func (app *Accumulator) LoadSnapshotChunk( req abci.RequestLoadSnapshotChunk) abci.ResponseLoadSnapshotChunk
LoadSnapshotChunk implements github.com/tendermint/tendermint/abci/types.Application.
func (*Accumulator) OfferSnapshot ¶
func (app *Accumulator) OfferSnapshot( req abci.RequestOfferSnapshot) abci.ResponseOfferSnapshot
OfferSnapshot implements github.com/tendermint/tendermint/abci/types.Application.
func (*Accumulator) Query ¶
func (app *Accumulator) Query(reqQuery abci.RequestQuery) (resQuery abci.ResponseQuery)
Query implements github.com/tendermint/tendermint/abci/types.Application.
Exposed as Tendermint RPC /abci_query.
type AccumulatorOptions ¶ added in v0.4.0
type BeginBlockRequest ¶
BeginBlockRequest is the input parameter to Chain.BeginBlock.
type BeginBlockResponse ¶
type BeginBlockResponse struct{}
BeginBlockResponse is the return value of Chain.BeginBlock.
type Chain ¶
type Chain interface { Query(q *apiQuery.Query, height int64, prove bool) (k, v []byte, err *protocol.Error) InitChain(state []byte, time time.Time, blockIndex int64) error BeginBlock(BeginBlockRequest) (BeginBlockResponse, error) CheckTx(*transactions.Envelope) (protocol.TransactionResult, *protocol.Error) DeliverTx(*transactions.Envelope) (protocol.TransactionResult, *protocol.Error) EndBlock(EndBlockRequest) EndBlockResponse Commit() ([]byte, error) }
Chain is the interface for the Accumulate transaction (chain) validator.
type EndBlockRequest ¶
type EndBlockRequest struct{}
EndBlockRequest is the input parameter to Chain.EndBlock
type EndBlockResponse ¶ added in v0.4.0
type SynthTxnReference ¶
type SynthTxnReference struct { Type uint64 `json:"type,omitempty" form:"type" query:"type" validate:"required"` Hash [32]byte `json:"hash,omitempty" form:"hash" query:"hash" validate:"required"` Url string `json:"url,omitempty" form:"url" query:"url" validate:"required,acc-url"` TxRef [32]byte `json:"txRef,omitempty" form:"txRef" query:"txRef" validate:"required"` }
SynthTxnReference is a reference to a produced synthetic transaction.