Expand description
Application BlockChain Interface (ABCI) is the interface between Tendermint (a consensus engine for Byzantine-fault-tolerant replication of a state machine) and an application (the state machine to be replicated).
Using ABCI involves writing an application driven by ABCI methods, exposing that application as an ABCI server, and having Tendermint connect to the server as an ABCI client.
This module does not include an ABCI server implementation itself. Instead, it provides a common set of Rust domain types that model the ABCI protocol, which can be used by both ABCI applications and ABCI server implementations.
One ABCI server implementation is provided by the tendermint_abci
crate.
Each ABCI method corresponds to a request/response pair. ABCI requests are
modeled by the Request
enum, and responses are modeled by the
Response
enum. As described in the methods and types page, ABCI
methods are split into four categories. Tendermint opens one ABCI connection
for each category of messages. These categories are modeled by the
MethodKind
enum and by per-category request and response enums:
ConsensusRequest
/ConsensusResponse
forMethodKind::Consensus
methods;MempoolRequest
/MempoolResponse
forMethodKind::Mempool
methods;InfoRequest
/InfoResponse
forMethodKind::Info
methods;SnapshotRequest
/SnapshotResponse
forMethodKind::Snapshot
methods.
The domain types in this module have conversions to and from the Protobuf
types defined in the [tendermint_proto
] crate. These conversions are
required for ABCI server implementations, which use the protobufs to
communicate with Tendermint, but should not be required for ABCI
applications, which should use the domain types in an interface defined by
their choice of ABCI server implementation.
Re-exports§
pub use crate::v0_38::abci::request::Request;
pub use crate::v0_38::abci::request::ConsensusRequest;
pub use crate::v0_38::abci::request::InfoRequest;
pub use crate::v0_38::abci::request::MempoolRequest;
pub use crate::v0_38::abci::request::SnapshotRequest;
pub use crate::v0_38::abci::response::Response;
pub use crate::v0_38::abci::response::ConsensusResponse;
pub use crate::v0_38::abci::response::InfoResponse;
pub use crate::v0_38::abci::response::MempoolResponse;
pub use crate::v0_38::abci::response::SnapshotResponse;
Modules§
- ABCI requests and request data.
- ABCI responses and response data.
- ABCI-specific data types used in requests and responses.
Structs§
- An event that occurred while processing a request.
- A key-value pair describing an
Event
.
Enums§
- ABCI application response codes.
- A category of ABCI method.
Traits§
- Adds convenience methods to tuples for more ergonomic
EventAttribute
construction. - A marker trait for types that can be converted to and from
Event
s.