diff --git a/README.md b/README.md index 841f7f1..5052e7c 100644 --- a/README.md +++ b/README.md @@ -8,24 +8,26 @@ This repository contains Rust bindings for Tenderdash. It includes: * data types, requests and responses required on [Tenderdash] * ABCI++ protocol server, supporting **Unix sockets** and **TCP** connections +* [tonic](https://docs.rs/tonic/latest/tonic/)-based ABCI++ protocol client/server, supporting grpc connections ## Structure The repository contains the following crates: -* [tenderdash-abci](./abci/) - main crate, including ABCI++ server implementation, `Application` trait and re-exporting `tenderdash-proto` crate -* [tenderdash-proto](./proto/) - ABCI++ messages and data types definitions, generated based on Tenderdash protobuf specifications +* [tenderdash-abci](./abci/) - main crate, including ABCI++ socket and tcp server implementation, `Application` trait and re-exporting `tenderdash-proto` crate +* [tenderdash-proto](./proto/) - ABCI++ messages and data types definitions, and gRPC client/server implementation, generated based on Tenderdash protobuf specifications * [tenderdash-proto-compiler](./proto-compiler/) - an internal tool that fetches tenderdash repository and converts protobuf files to Rust +* -## Versioning +## Version Compatibility -The major and Minor version of this library matches the major and minor version of [Tenderdash]. For example, for `Tenderdash 1.2.34`, use `rs-tenderdash-abci 1.2.*`. +The major and minor versions of this library are designed to match those of [Tenderdash]. For instance, if you're working with `Tenderdash 1.2.34`, you should use `rs-tenderdash-abci 1.2.*` to ensure compatibility. -You should also check the protocol version in `init_chain()`. +This library also includes built-in support for ABCI protocol version verification. The ABCI protocol version, as defined in Tenderdash's [version.go](https://github.com/dashpay/tenderdash/blob/HEAD/version/version.go) under the `ABCISemVer` constant, must align with the ABCI protocol version of this library. You can find the library's ABCI protocol version in [proto/src/tenderdash.rs](proto/src/tenderdash.rs) under the `ABCI_VERSION` constant. ## Quick start -1. Install dependencies. You can find a current list of dependencies in the [Dockerfile](Dockerfile). +1. Install dependencies. You can find a current list of dependencies in the [Dockerfile](Dockerfile-debian). 2. Add tenderdash-abci crate to your project: ```bash @@ -34,6 +36,17 @@ You should also check the protocol version in `init_chain()`. 3. Implement the [Application](abci/src/application.rs) trait with your custom logic. You can check [kvstore](abci/tests/kvstore.rs) as a minimal example. +## Using custom protocol buffers definitions + +If you want to build `rs-tenderdash-abci` using protocol buffers definitions from a custom Tenderdash version, you can do so by setting the `TENDERDASH_COMMITISH` environment variable to the desired Tenderdash commit ID before initiating the build process. + +For instance, if you want to build the library with support for Tenderdash `v0.14-dev.3`, which corresponds to the commit ID `688ee3e3f2624e6ebb20f5d74e0812109b7b9a27`, you can use the following command: + +```bash +export TENDERDASH_COMMITISH=688ee3e3f2624e6ebb20f5d74e0812109b7b9a27 +cargo build +``` + ## Credits This project is a partial fork of [tendermint-rs] project.