Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: README #16

Merged
merged 15 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Rust bindings and server for Tenderdash ABCI++ protocol

## Introduction

![example workflow](https://github.com/dashpay/rs-tenderdash-abci/actions/workflows/test.yml/badge.svg?branch=master)

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++ 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
*

## Version Compatibility

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.

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-debian).
2. Add tenderdash-abci crate to your project:

```bash
cargo add --git https://github.com/dashpay/rs-tenderdash-abci tenderdash-abci
```

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.

## License

[MIT](LICENSE.md)

[Tenderdash]: https://github.com/dashpay/tenderdash
[tendermint-rs]: https://github.com/informalsystems/tendermint-rs
4 changes: 3 additions & 1 deletion abci/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ edition = "2021"
license = "Apache-2.0"
readme = "README.md"
categories = ["cryptography::cryptocurrencies", "network-programming"]
keywords = ["abci", "blockchain", "bft", "consensus", "tendermint"]
keywords = ["abci", "blockchain", "bft", "consensus", "tendermint", "dash"]
repository = "https://github.com/dashpay/rs-tenderdash-abci/tree/main/abci"
documentation = "https://dashpay.github.io/rs-tenderdash-abci/tenderdash_abci/"

description = """tenderdash-abci provides a simple framework with which to build\
low-level applications on top of Tenderdash."""

Expand Down
9 changes: 8 additions & 1 deletion proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@ name = "tenderdash-proto"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/dashpay/rs-tenderdash-abci/tree/main/proto"
documentation = "https://dashpay.github.io/rs-tenderdash-abci/tenderdash_proto/"
readme = "README.md"
categories = ["cryptography", "cryptography::cryptocurrencies", "database"]
categories = [
"cryptography",
"cryptography::cryptocurrencies",
"database",
"dash",
"tenderdash",
]
keywords = ["blockchain", "tenderdash", "proto"]

description = """
Expand Down
Loading