abci

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 31 Imported by: 0

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

View Source
const Version uint64 = 0x1

Version is the version of the ABCI applications.

Variables

This section is empty.

Functions

func ListSnapshots

func ListSnapshots(cfg *config.Config) ([]*snapshot.Header, error)

ListSnapshots queries the node for available snapshots.

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

ApplySnapshotChunk applies a snapshot to the node.

func (*Accumulator) BeginBlock

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() 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

EndBlock implements github.com/tendermint/tendermint/abci/types.Application.

func (*Accumulator) Info

Info implements github.com/tendermint/tendermint/abci/types.Application.

func (*Accumulator) InitChain

InitChain implements github.com/tendermint/tendermint/abci/types.Application.

Called when a chain is created.

func (*Accumulator) ListSnapshots

func (*Accumulator) LoadSnapshotChunk

LoadSnapshotChunk queries the node for the body of a snapshot.

func (*Accumulator) OfferSnapshot

OfferSnapshot offers a snapshot to the node.

func (*Accumulator) OnFatal

func (app *Accumulator) OnFatal(f func(error))

FOR TESTING ONLY

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

type AccumulatorOptions struct {
	*config.Config
	Tracer   trace.Tracer
	Executor execute.Executor
	EventBus *events.Bus
	Logger   log.Logger
	Database database.Beginner
	Address  crypto.Address // This is the address of this node, and is used to determine if the node is the leader
}

Jump to

Keyboard shortcuts

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