From 7085dd44055744aefb1e09e693f1f81810d943f3 Mon Sep 17 00:00:00 2001 From: Devashish Dixit Date: Tue, 11 Aug 2020 10:40:04 +0800 Subject: [PATCH 1/5] ARD-008 Merge `abci-rs` into `tendermint-rs` --- docs/architecture/adr-008-abci-rs-merge.md | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 docs/architecture/adr-008-abci-rs-merge.md diff --git a/docs/architecture/adr-008-abci-rs-merge.md b/docs/architecture/adr-008-abci-rs-merge.md new file mode 100644 index 000000000..309320486 --- /dev/null +++ b/docs/architecture/adr-008-abci-rs-merge.md @@ -0,0 +1,72 @@ +# ADR 008: Merge `abci-rs` into `tendermint-rs` + +## Changelog +* 2020-08-11: First draft + +## Context + +As mentioned [here](https://github.com/informalsystems/tendermint-rs/issues/388#issue-646627068), one high level goal +for this `tendermint-rs` is to merge an already existing crate for build ABCI servers. There are three main crates for +this purpose: + +1. [`rust-abci`](https://github.com/tendermint/rust-abci) +1. [`abci-rs`](https://github.com/devashishdxt/abci-rs) +1. [`abci2`](https://github.com/nomic-io/abci2) + +### History + +There was a [proposal](https://github.com/tendermint/rust-abci/issues/61) for rearchitecturing `rust-abci` where a lot +of different aspects about `rust-abci` were discussed (for example, current `Application` trait does not enforce `Send + +Sync`, also `abci-rs` is not easy to work with when rest of the application is using `async` Rust etc.). A decision was +made to explore other architectures for `rust-abci` which are also compatible with `async` Rust. + +### Current state + +Currently, there are two new crates which were created in order to explore other architectures for `rust-abci`, +`abci-rs` and `abci2`. + +`abci2`'s architecture is very minimal and is akin to a wrapper around raw `TcpStream` with `protobuf` encoding/decoding +of ABCI types. All the burden of handing requests of different types in different ways is left for the developer of +ABCI server. + +Unlike `abci2`, `abci-rs`' architecture is similar to `rust-abci` with some additional features, for example, support +for [`async_trait`](https://docs.rs/async-trait)s, ABCI logic [sanity checks](https://github.com/tendermint/rust-abci/issues/49) +with proper test coverage, support for [unix sockets](https://github.com/tendermint/rust-abci/issues/30). + +## Decision + +Absorb `abci-rs` and adopt types in `tendermint-rs` repository (using `tendermint-proto` crate, etc.). + +## Status + +Proposed + +## Consequences + +### Positive + +- `abci-rs` will be kept up to date with the `tendermint-rs` development and remain compatible with other related + crates. +- `abci-rs` can share dependencies with other related crates (for example, simpler types from `proto`, etc.). +- Less burden on developer/crate user. + +### Negative/Neutral + +- Developer is forced to use `async` Rust. +- Less flexibility for the developer/crate user. + +## References + +Issues in `tendermint-rs`: + +- [High Level Goals for the next Third](https://github.com/informalsystems/tendermint-rs/issues/388) + +Issues in `rust-abci`: + +- [Rearchitecting Rust ABCI](https://github.com/tendermint/rust-abci/issues/61) +- [ABCI logic "sanity checks"](https://github.com/tendermint/rust-abci/issues/49) +- [Add support for unix sockets](https://github.com/tendermint/rust-abci/issues/30) + +Documentation for `abci-rs`: + +- [docs.rs](https://docs.rs/abci-rs/0.10.0/abci/) From 7bdc58d99a97c2107b5dfd7eb72cca7e6432611e Mon Sep 17 00:00:00 2001 From: Devashish Dixit Date: Thu, 13 Aug 2020 08:48:20 +0800 Subject: [PATCH 2/5] Update docs/architecture/adr-008-abci-rs-merge.md Co-authored-by: Alexander Simmerl --- docs/architecture/adr-008-abci-rs-merge.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/architecture/adr-008-abci-rs-merge.md b/docs/architecture/adr-008-abci-rs-merge.md index 309320486..b452188ef 100644 --- a/docs/architecture/adr-008-abci-rs-merge.md +++ b/docs/architecture/adr-008-abci-rs-merge.md @@ -15,7 +15,7 @@ this purpose: ### History -There was a [proposal](https://github.com/tendermint/rust-abci/issues/61) for rearchitecturing `rust-abci` where a lot +There was a [proposal](https://github.com/tendermint/rust-abci/issues/61) for rearchitecting `rust-abci` where a lot of different aspects about `rust-abci` were discussed (for example, current `Application` trait does not enforce `Send + Sync`, also `abci-rs` is not easy to work with when rest of the application is using `async` Rust etc.). A decision was made to explore other architectures for `rust-abci` which are also compatible with `async` Rust. From 868a0c3fb595495fb4403c91d87a4180a3cfb7ec Mon Sep 17 00:00:00 2001 From: Devashish Dixit Date: Thu, 13 Aug 2020 08:48:28 +0800 Subject: [PATCH 3/5] Update docs/architecture/adr-008-abci-rs-merge.md Co-authored-by: Alexander Simmerl --- docs/architecture/adr-008-abci-rs-merge.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/architecture/adr-008-abci-rs-merge.md b/docs/architecture/adr-008-abci-rs-merge.md index b452188ef..322d0d5f1 100644 --- a/docs/architecture/adr-008-abci-rs-merge.md +++ b/docs/architecture/adr-008-abci-rs-merge.md @@ -26,7 +26,7 @@ Currently, there are two new crates which were created in order to explore other `abci-rs` and `abci2`. `abci2`'s architecture is very minimal and is akin to a wrapper around raw `TcpStream` with `protobuf` encoding/decoding -of ABCI types. All the burden of handing requests of different types in different ways is left for the developer of +of ABCI types. All the burden of handing requests of different types in different ways is left to the developer. ABCI server. Unlike `abci2`, `abci-rs`' architecture is similar to `rust-abci` with some additional features, for example, support From 12a65b84ac71b99336cba07290014cc99701b058 Mon Sep 17 00:00:00 2001 From: Devashish Dixit Date: Thu, 13 Aug 2020 08:48:35 +0800 Subject: [PATCH 4/5] Update docs/architecture/adr-008-abci-rs-merge.md Co-authored-by: Alexander Simmerl --- docs/architecture/adr-008-abci-rs-merge.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/architecture/adr-008-abci-rs-merge.md b/docs/architecture/adr-008-abci-rs-merge.md index 322d0d5f1..3e845ebca 100644 --- a/docs/architecture/adr-008-abci-rs-merge.md +++ b/docs/architecture/adr-008-abci-rs-merge.md @@ -27,7 +27,6 @@ Currently, there are two new crates which were created in order to explore other `abci2`'s architecture is very minimal and is akin to a wrapper around raw `TcpStream` with `protobuf` encoding/decoding of ABCI types. All the burden of handing requests of different types in different ways is left to the developer. -ABCI server. Unlike `abci2`, `abci-rs`' architecture is similar to `rust-abci` with some additional features, for example, support for [`async_trait`](https://docs.rs/async-trait)s, ABCI logic [sanity checks](https://github.com/tendermint/rust-abci/issues/49) From 051c08cdd65f997a7797905339c372e054bcc0a8 Mon Sep 17 00:00:00 2001 From: Devashish Dixit Date: Thu, 13 Aug 2020 08:49:05 +0800 Subject: [PATCH 5/5] Update docs/architecture/adr-008-abci-rs-merge.md Co-authored-by: Alexander Simmerl --- docs/architecture/adr-008-abci-rs-merge.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/architecture/adr-008-abci-rs-merge.md b/docs/architecture/adr-008-abci-rs-merge.md index 3e845ebca..5baeca38c 100644 --- a/docs/architecture/adr-008-abci-rs-merge.md +++ b/docs/architecture/adr-008-abci-rs-merge.md @@ -5,9 +5,7 @@ ## Context -As mentioned [here](https://github.com/informalsystems/tendermint-rs/issues/388#issue-646627068), one high level goal -for this `tendermint-rs` is to merge an already existing crate for build ABCI servers. There are three main crates for -this purpose: +As mentioned #388 one of the high level goals for the `tendermint-rs` repo is to merge an already existing crate to build ABCI servers with. There are three existing crates for this purpose: 1. [`rust-abci`](https://github.com/tendermint/rust-abci) 1. [`abci-rs`](https://github.com/devashishdxt/abci-rs)