-
Notifications
You must be signed in to change notification settings - Fork 231
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
abci: ADR-008 Merge abci-rs
into tendermint-rs
#510
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7085dd4
ARD-008 Merge `abci-rs` into `tendermint-rs`
devashishdxt 7bdc58d
Update docs/architecture/adr-008-abci-rs-merge.md
devashishdxt 868a0c3
Update docs/architecture/adr-008-abci-rs-merge.md
devashishdxt 12a65b8
Update docs/architecture/adr-008-abci-rs-merge.md
devashishdxt 051c08c
Update docs/architecture/adr-008-abci-rs-merge.md
devashishdxt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# ADR 008: Merge `abci-rs` into `tendermint-rs` | ||
|
||
## Changelog | ||
* 2020-08-11: First draft | ||
|
||
## Context | ||
|
||
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) | ||
1. [`abci2`](https://github.com/nomic-io/abci2) | ||
|
||
### History | ||
|
||
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. | ||
|
||
### 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 to the developer. | ||
|
||
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/) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like what is described in (1) here and seems to be a possible convergence point amidst all the discussion to work towards, and something that is done in other rust crates, where the core is implemented synchronously and an async wrapper is provided. The extra maintenance cost for the wrapper seems minimal compared to the user/flexibility benefit, especially if the synchronous core is simple enough.
Would it make sense for abci2 to be used as such a core and adapt abci-rs to be an async wrapper around it, and expose both ?