Skip to content

Commit

Permalink
doc: README (#16)
Browse files Browse the repository at this point in the history
* doc: README

* build(github): deploy docs to github pages

* build(github-pages): only deploy from master branch

* chore: trying to get github-pages working

* build(github-pages): copy README.md as pages index

* build(github-pages): separate workflow for github pages

* chore: code cleanup

* build(github-pages): add permissions

* chore(github-pages): set tenderdash_abci as default page

* chore: add docs url in cargo.toml

* build(github-pages): exclude tenderdash-proto-compiler

* chore: move github pages GHA code to separate pr

* Squashed commit of the following:

commit 17ed6e7
Author: lklimek <[email protected]>
Date:   Fri Mar 15 17:56:00 2024 +0100

    fix: release.sh platform deps update broken (#57)

commit af64c65
Author: lklimek <[email protected]>
Date:   Fri Mar 15 17:29:40 2024 +0100

    fix(proto-compiler): existence of unzipped tenderdash sources not verified correctly (#56)

    * fix(proto-compiler): better detection of missing protobuf files

    * build: release 0.14.0-dev.9

commit 86ba24b
Author: lklimek <[email protected]>
Date:   Wed Mar 13 15:46:59 2024 +0100

    build: release v0.14.0-dev.8 for tenderdash 0.14.0-dev.4 (#55)

commit 672f8ba
Author: lklimek <[email protected]>
Date:   Tue Mar 12 06:34:13 2024 +0100

    feat(proto)!: grpc server and client support (#50)

    * feat(proto): grpc server and client support

    * chore: make ServerRuntime public

    * test(proto): test grpc server with tenderdash in docker

    * chore(proto): fix imports

    * chore: build issues

    * chore: abci grpc-server feature

    * chore: imports and features

    * chore: grpc test

    * chore: re-export tonic

    * chore: fix missing serde serialization

    * chore(proto): fix feature flags

    * chore(proto): fix warn

    * fix: wrong json serialization of ConsensusParams

    * fix: wrong json serialization of ConsensusParams

    * chore: fix build

    * chore: simplify features

    * chore: self review, simplify features

    * chore: comments

    * test(abci): grpc test uses latest tenderdash tag

    * chore: bump version to 0.14.0-dev.7 for tenderdash v0.14.0-dev.3, abci 0.26.0

    * chore: fix missing serde serialization

    * fix: wrong json serialization of ConsensusParams

    * build(deps): update chrono and replace deprecated fn calls

    ---------

    Co-authored-by: Ivan Shumkov <[email protected]>

commit c5ece7b
Author: lklimek <[email protected]>
Date:   Fri Mar 8 10:03:42 2024 +0100

    build(deps): bump chrono and replace deprecated calls (#54)

    * build(deps): update chrono and replace deprecated fn calls

commit 784a0c5
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Mar 4 16:34:57 2024 +0100

    build(deps): update bollard requirement from 0.15.0 to 0.16.0 (#53)

    Updates the requirements on [bollard](https://github.com/fussybeaver/bollard) to permit the latest version.
    - [Release notes](https://github.com/fussybeaver/bollard/releases)
    - [Commits](fussybeaver/bollard@v0.15.0...v0.16.0)

    ---
    updated-dependencies:
    - dependency-name: bollard
      dependency-type: direct:production
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 1b8829e
Author: lklimek <[email protected]>
Date:   Mon Mar 4 16:33:58 2024 +0100

    fix(proto)!: wrong json serialization of consensus params (#51)

    * fix: wrong json serialization of ConsensusParams

    * chore: fix build

commit 309f589
Author: lklimek <[email protected]>
Date:   Thu Feb 29 11:30:04 2024 +0100

    fix: tenderdash-proto rebuilt with every run due to changed *.proto (#52)

    * fix: tenderdash-proto rebuilt with every run due to changed *.proto files

    * refactor: self review

    * chore: fix GHA build errors

    * chore: clippy

    * chore: build errs fix

commit 8b5afe6
Author: lklimek <[email protected]>
Date:   Tue Feb 20 09:49:49 2024 +0100

    fix(abci): tenderdash version check requires exact version match (#49)

    fix(abci): version match fixed

commit a2151d4
Author: Lukasz Klimek <[email protected]>
Date:   Fri Feb 2 12:35:26 2024 +0100

    build: release script to update versions

commit 701ba0f
Author: lklimek <[email protected]>
Date:   Thu Feb 1 15:31:46 2024 +0100

    feat!: support ThresholdRecoverRaw in tenderdash v0.14 (#43)

    * chore: clippy

    * fix: use TENDERDASH_COMMITISH env var if set

    * feat: support ThresholdRecoverRaw vote extensions

    * chore: bump version to 0.14.0-dev.1

    * chore: bump version to 0.14.0-dev.6

    * chore: set default Tenderdash version to v0.14.0-dev.2

    * feat: threshold raw vote extensions sign_hash

    * fix: take TENDERDASH_VERSION  from td version.go

    * chore: fmt

    * refactor(abci)!: renames in signature processing

    * chore(abci): add comments to remove tracing:: in signatures once stable

commit 2810894
Author: lklimek <[email protected]>
Date:   Wed Jan 31 15:52:44 2024 +0100

    build(deps): use protoc 25.2 (#47)

    * build(deps): use protoc 25.2

    * chore: fix typo

commit 556f3a9
Author: Quantum Explorer <[email protected]>
Date:   Sat Jan 6 20:41:43 2024 +0700

    fix: bump version

commit b6ed3ba
Author: Quantum Explorer <[email protected]>
Date:   Sat Jan 6 20:13:32 2024 +0700

    fix: bump version

commit e4de597
Author: Quantum Explorer <[email protected]>
Date:   Sat Jan 6 18:54:50 2024 +0700

    fix: bump version

commit 6ebfaa3
Author: lklimek <[email protected]>
Date:   Wed Dec 20 07:28:05 2023 +0100

    build: retry download of tenderdash zip on unzip failures (#46)

    fix: retry download of tenderdash zip on unzip failures

commit b4df654
Author: lklimek <[email protected]>
Date:   Mon Dec 18 18:38:54 2023 +0100

    chore: release for tenderdash 0.14.0-dev.1 (#45)

commit 865fd05
Author: lklimek <[email protected]>
Date:   Thu Dec 14 14:04:57 2023 +0100

    feat: use TENDERDASH_COMMITISH env var to set tenderdash rev to use (#44)

    * fix: use TENDERDASH_COMMITISH env var if set

    * chore: fix nightly build issues

commit f413119
Author: lklimek <[email protected]>
Date:   Mon Oct 9 13:08:57 2023 +0200

    build: release 0.13.1 for tenderdash 0.13.2+ (#42)

    build: release 0.13.1 for tenderdash 0.13.2

commit 32cff5c
Author: lklimek <[email protected]>
Date:   Mon Oct 9 12:53:22 2023 +0200

    fix(tenderdash-abci): ensure crate features build without default features (#39)

    * fix(tenderdash-abci): correct handling of features

    * chore: change resolver in cargo.toml to 2

    * fix: missing prost-derive feature in proto

commit 2a98bf2
Author: lklimek <[email protected]>
Date:   Thu Oct 5 21:30:53 2023 +0200

    fix(tenderdash-abci): deadlock on multiple msgs received (#41)

commit 3280669
Author: lklimek <[email protected]>
Date:   Thu Oct 5 21:25:50 2023 +0200

    ci: remove sccache from github actions (#40)

commit 6934428
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Oct 3 16:29:53 2023 +0200

    build(deps): update prost requirement from 0.11 to 0.12 (#34)

    Updates the requirements on [prost](https://github.com/tokio-rs/prost) to permit the latest version.
    - [Release notes](https://github.com/tokio-rs/prost/releases)
    - [Commits](tokio-rs/prost@prost-build-0.11.1...v0.12.0)

    ---
    updated-dependencies:
    - dependency-name: prost
      dependency-type: direct:production
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 94f9714
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Oct 3 16:29:41 2023 +0200

    build(deps): update prost-build requirement from 0.11 to 0.12 (#33)

    Updates the requirements on [prost-build](https://github.com/tokio-rs/prost) to permit the latest version.
    - [Release notes](https://github.com/tokio-rs/prost/releases)
    - [Commits](tokio-rs/prost@prost-build-0.11.1...v0.12.0)

    ---
    updated-dependencies:
    - dependency-name: prost-build
      dependency-type: direct:production
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit f4235c1
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Oct 3 16:22:02 2023 +0200

    build(deps): update bollard requirement from 0.14.0 to 0.15.0 (#37)

    Updates the requirements on [bollard](https://github.com/fussybeaver/bollard) to permit the latest version.
    - [Release notes](https://github.com/fussybeaver/bollard/releases)
    - [Commits](fussybeaver/bollard@v0.14.0...v0.15.0)

    ---
    updated-dependencies:
    - dependency-name: bollard
      dependency-type: direct:production
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 45fc447
Author: lklimek <[email protected]>
Date:   Wed Sep 13 14:05:30 2023 +0200

    chore: release rs-tenderdash-abci v0.13.0 for tenderdash v0.13.0 (#36)

    chore: release Tenderdash v0.13.0

commit f2b15b8
Author: lklimek <[email protected]>
Date:   Fri Sep 8 16:32:23 2023 +0200

    feat(abci): support tracing::span inside rs-tenderdash-abci (#35)

    * feat(proto): DeriveFrom for ABCI Request Value

    * feat(abci): add tracing spans

    * feat: add request id to tracing span

    * chore: log exception responses on error! level and simplify span

    * chore: minor improvements  and docs

    * chore: traced exception format same as response

    * chore: minor fix

    * chore: cargo fmt

    * fix: doctest

commit 00454db
Author: lklimek <[email protected]>
Date:   Thu Jul 20 17:11:05 2023 +0200

    feat(proto): Timestamp::from_milis() (#24)

    * build: upgrade to tenderdash v0.13.0-dev.1

    * chore: formatting improvement to restart GHA

    * feat(proto): Timestamp::from_milis()

    * chore(proto): panic when timestamp millis out of range + tests

    * chore: unify cargo.toml dependency code style

commit b397f63
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Thu Jul 20 13:28:10 2023 +0200

    build(deps): update num-derive requirement from 0.3 to 0.4 (#26)

    Updates the requirements on [num-derive](https://github.com/rust-num/num-derive) to permit the latest version.
    - [Changelog](https://github.com/rust-num/num-derive/blob/master/RELEASES.md)
    - [Commits](rust-num/num-derive@num-derive-0.3.0...num-derive-0.4.0)

    ---
    updated-dependencies:
    - dependency-name: num-derive
      dependency-type: direct:production
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit a0efded
Author: lklimek <[email protected]>
Date:   Thu Jul 20 13:27:21 2023 +0200

    build: remove sccache from docker build process (#32)

    build: remove sccache from docker

commit 8ed0188
Author: Dmitrii Golubev <[email protected]>
Date:   Thu Jul 20 09:21:40 2023 +0200

    chore: upgrade tenderdash version to 0.13.0-dev.2 (#31)

commit 0bb35a3
Author: Dmitrii Golubev <[email protected]>
Date:   Thu Jul 13 17:54:16 2023 +0200

    revert: "refactor: make self for offer_snapshot mutable (#27)" (#30)

    Revert "refactor: make self for offer_snapshot mutable (#27)"

    This reverts commit f9f4685.

commit f9f4685
Author: Dmitrii Golubev <[email protected]>
Date:   Thu Jul 13 17:10:03 2023 +0200

    refactor: make self for offer_snapshot mutable (#27)

    * refactor: make self for offer_snapshot mutable

commit c161fd6
Author: Lukasz Klimek <[email protected]>
Date:   Wed Jun 28 16:34:08 2023 +0200

    chore: release for tenderdash 0.12.0

commit 29b5056
Author: lklimek <[email protected]>
Date:   Mon Jun 26 09:51:40 2023 +0200

    feat: graceful shutdown (#23)

    * feat: graceful shutdown

    * feat: async net io

    * chore: graceful shutdown

    * chore: graceful shutdown

    * chore: unix graceful shutdown

    * chore: simplify code

    * chore: child token

    * chore: use child token to NOT kill calling server

    * fix: missing tokio feature

    * chore:  clippy

    * chore: apply peer review feedback

commit e7b27c3
Author: lklimek <[email protected]>
Date:   Tue Jun 6 11:33:15 2023 +0200

    feat: impl SignDigest for CanonicalVote for easier light client verification (#22)

    feat: impl SignDigest for CanonicalVote

commit a177503
Author: lklimek <[email protected]>
Date:   Thu Apr 27 18:16:26 2023 +0200

    chore!: move signature functions to abci and more strict type controls (#21)

    * fix(proto): signature: state id must have 32 bytes

    * fix(proto): added block id constraint

    * chore: move signature processing from proto to abci as proto is no_std

    * chore(abci): log sign bytes on trace lvl

    * chore: signatures

    * chore(abci): more strict type checks

    * chore: signs: restore reverse()

    * chore(abci): minor code improvements

commit 623e225
Author: Quantum Explorer <[email protected]>
Date:   Wed Apr 19 09:33:46 2023 +0700

    updated gitignore

commit e66a7d6
Author: lklimek <[email protected]>
Date:   Mon Apr 17 20:20:32 2023 +0200

    feat(proto): add sign_digest() to commit and vote extension (#20)

    * refactor(proto)!: replace flex_error with thiserror

    * feat(proto): add sign_bytes() to commit and vote

    * Revert "refactor(proto)!: replace flex_error with thiserror"

    This reverts commit 45014e9.

    * chore(proto): adjust errors

    * feat(proto): impl SignBytes for VoteExtension

    * refactor(proto): delete SignContext

    * feat(proto): add SignDigest trait for commit

    * chore(proto): sign_digest borrows quorum hash

    * test(proto): test sign_digest()

    * fix(proto):  writing &Vec instead of &[\_]

    * chore(proto): self-review

    * chore(proto): make SignBytes public for tests

commit d61717a
Author: lklimek <[email protected]>
Date:   Fri Apr 7 08:10:53 2023 +0200

    test: build rs-tenderdash-abci in Docker (#14)

    * build: sample Dockerfile image

    * chore: fix dockerfile

    * chore: try to fix caching

    * chore: dockerfile improvements

    * build: disable arm64 build

    * build: simplify Dockerfile

    * build(docker): silence apt-get

    * build(github): docer image only for arm

    * chore(Dockerfile): trying to get arm to build

    * build(docker): trying to fix arm build

    * build(docker): fixed image for arm

    * build(docker): refer to correct branch

    * build(github): on PR, build only amd64 image

    * chore: typo

    * chore: typo

    * chore: typo

    * chore: typo

    * build(proto-compiler): use vendored-openssl

    * build(docker): add Alpine docker image to be built

    * build(docker): typo

    * build(github): build only amd64 on non-master branch

    * build(github): enable sccache

    * build(github): enable Github cache for sccache in Docker images

    * build(docker): minor caching fix

    * build(docker): avoid sccache port conflicts on parallel build in github

    * build(github): allow manual run of docker job

    * build(docker): add missing dependency for arm64

    * chore: remove unused dependencies

    * chore: display some stats

    * chore(proto-compiler): use vendored openssl

    * chore: fix comments

    * build(github): don't cache /target to use less space

    * build(github): don't precompile protobuf definitions

    * chore(proto-compiler): replace openssl with openssl-sys

    * Revert "build(github): don't precompile protobuf definitions"

    This reverts commit 8a49d5d.

    * chore(proto-compiler): optimize dependencies

    * refactor(proto-compiler): use ureq instead of reqwest to improve performance

commit 313c683
Author: lklimek <[email protected]>
Date:   Mon Apr 3 12:40:25 2023 +0200

    revert(abci): remove RefUniwndSafe trait from RequestDispatcher (#19)

commit 96878db
Author: lklimek <[email protected]>
Date:   Fri Mar 31 19:13:31 2023 +0200

    refactor(proto-compiler): download protobuf definitions via https instead of git (#18)

    * feat: use submodules instead of git2 crate to get protobuf definitions

    * test(proto): ensure that tenderdash version we use is correct

    * build(github): enable checkout submodules

    * build(github): enable checkout submodules

    * Revert " build(github): enable checkout submodules"

    This reverts commit 2ba1db3.

    * build(github): enable checkout submodules

    * chote(proto-compiler): use git checkout on tenderdash submodule

    * chore(proto-compiler): fix git handling

    * chore(proto-compiler): git fetch update shallow

    * chore(proto-compiler): fetch tags

    * chore(proto-compiler): update submodule as needed

    * chore(proto-compiler): download tenderdash sources zip instead of cloning git repo

    * chore(proto-compiler): create cache (/target) dir if not exist

    * build(github): don't checkout submodules anymore

* doc: Using custom protocol buffers definitions
  • Loading branch information
lklimek authored Mar 25, 2024
1 parent 2606e70 commit 579fb94
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 2 deletions.
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

0 comments on commit 579fb94

Please sign in to comment.