A Rust crate for creating ABCI applications.
ABCI is the interface between Tendermint (a state-machine replication engine) and your application (the actual state
machine). It consists of a set of methods, where each method has a corresponding
Response message type.
Tendermint calls the ABCI methods on the ABCI application by sending the
Request messages and receiving the
messages in return.
ABCI methods are split across 3 separate ABCI connections:
Additionally, there is a
Flush method that is called on every connection, and an
Echo method that is just for
To know more about ABCI protocol specifications, go to official ABCI documentation.
abci-rs in your
[dependencies] abci-rs = "0.3"
Each ABCI application has to implement three core traits corresponding to all three ABCI connections,
Note: Implementations of these traits are expected to be
Send + Syncand methods take immutable reference of
self. So, internal mutability must be handled using thread safe (
Mutex, etc.) constructs.
After implementing all three above mentioned
traits, you can create a
Server object and use
Server::run() is an
async function and returns a
Future. So, you'll need an executor to run
Future returned from
tokio are two popular options. In
counter example, we use
To know more, go to
examples/ to see a sample ABCI application.
uds: Enables support for running ABCI server over Unix Domain Socket (UDS)
- Supported on Unix only.
- Disabled by default.
- Tendermint v0.32.0
- ABCI v0.16.0
Types used in ABCI
Address of ABCI Server
Trait for managing consensus of blockchain.
Trait for initialization and for queries from the user.
Trait for managing tendermint's mempool.