Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Commit

Permalink
release v0.7.2 (#139)
Browse files Browse the repository at this point in the history
* add crates.io badge (#73)

* update to tendermint v0.32 (#77)

* Compatibility Table, Fix link in toml (#81)

- Added table for compatiblity
- fix link in toml - homepage link

closes #58 & #74
Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* Reduce amount of logs under `info` (#80)

closes #78

- Reduce amount of logs to clean up terminal if just running the abci server

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* Add changelog (#82)

* Add changelog

- Added a Changelog

closes #65

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* Fix dynamic trait warning (#84)

Update protobuf to 2.8

* Release/v0.6.1 (#85)

* updated cargo + changelog

* Fix edition + bump dependencies

* fix changelog entry

* Update env_logger requirement from 0.6.2 to 0.7.0 (#88)

Updates the requirements on [env_logger](https://github.com/sebasmagri/env_logger) to permit the latest version.
- [Release notes](https://github.com/sebasmagri/env_logger/releases)
- [Changelog](https://github.com/sebasmagri/env_logger/blob/master/CHANGELOG.md)
- [Commits](rust-cli/env_logger@v0.6.2...v0.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Bumped version of protobuf to 2.8.1 -- fixes #87 (#89)

* Bumped version of protobuf to 2.8.1 -- fixes #87

* updated readme

* Fix CONTRIBUTING.md link in PR template (#92)

* Fix typo in README (#91)

* Reduce the number of tokio dependencies (#94)

* Update futures requirement from 0.1 to 0.3 (#97)

Updates the requirements on [futures](https://github.com/rust-lang-nursery/futures-rs) to permit the latest version.
- [Release notes](https://github.com/rust-lang-nursery/futures-rs/releases)
- [Changelog](https://github.com/rust-lang-nursery/futures-rs/blob/master/CHANGELOG.md)
- [Commits](rust-lang/futures-rs@futures-cpupool-0.1.1...0.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Release for 0.6.3 (#98)

* Release for 0.6.3

- changes to get ready for new release

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* add changelog entries

* Worker panic leave mutex in poisoned status (#100)

Solution: propagate panic to quit the whole server.

* updated docs for 0.6.4 (#101)

* Fix username link (#103)

* fix bug in readme (#108)

* Upgrade protobuf to 2.10.0 (#110)

* bumped version to 0.6.5 + changelog entry

* proto: update proto files & add third_party (#116)

abci updated to 0.33

* doc: updated README and CHANGELOG for 0.7.0 (#117)

* release v0.7 (#118) (#124)

* proto: update proto files & add third_party (#116)

abci updated to 0.33

* doc: updated README and CHANGELOG for 0.7.0 (#117)

Co-authored-by: Marko <marbar3778@yahoo.com>

Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com>

* dep: bump proto dep (#123)

closes #122

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* ci: move part of ci to github actions (#129)

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* updated protobuf definitions to TM 0.33.5 + crates (fixes #130 fixes #128) (#131)

* doc: updated CHANGELOG for 0.7.1

* upgraded dependencies (tokio, bytes, protobuf) (#138)

rewrote the server routine to use async-await, as tokio 0.2 requires it
(encoder/decoder are now in tokio_util crate; used tokio sync Mutex instead of std)
added a panic hook, as otherwise the runtime may hang if internal app panics.
as there's no way for apps to be signalled that connection dropped,
there's an explicit panic now (so the app can restart from the committed state)

Co-authored-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Alex Manuskin <amanusk@protonmail.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Nicolas <abramlujan@gmail.com>
Co-authored-by: Andy Weiss <wvvwwvw@gmail.com>
Co-authored-by: yihuang <yi.codeplayer@gmail.com>
Co-authored-by: Jackson Lewis <inquisitivepenguin@protonmail.com>
Co-authored-by: Rob Kelly <Robert.l.kelly3@gmail.com>
Co-authored-by: Devashish Dixit <devashish@crypto.com>
  • Loading branch information
11 people authored Jul 24, 2020
1 parent 7421970 commit 97a9622
Show file tree
Hide file tree
Showing 10 changed files with 3,387 additions and 2,272 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# CHANGELOG

_July 24, 2020_

## v0.7.2

### IMPROVEMENTS:

- [\#138](https://github.com/tendermint/rust-abci/pull/138): dependencies upgrades (protobuf to 2.16.2, tokio to 0.2, bytes to 0.5)

_June 30, 2020_

## v0.7.1
Expand Down
11 changes: 6 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "abci"
version = "0.7.1"
version = "0.7.2"
authors = ["Adrian Brink <adrian@brink-holdings.com>", "Jackson Lewis <st.japa6@gmail.com>", "Dave Bryson", "Tomas Tauber"]
edition = "2018"
license = "MIT/Apache-2.0"
Expand All @@ -12,14 +12,15 @@ readme = "README.md"
include = ["src/**/*", "Cargo.toml"]

[dependencies]
bytes = "0.4"
protobuf = "= 2.15.1"
bytes = "0.5"
protobuf = "= 2.16.2"
byteorder = "1.3.4"
integer-encoding = "1.1.5"
log = "0.4.8"
env_logger = "0.7.1"
tokio = { version = "0.1", default-features = false, features = ["codec", "io", "tcp", "rt-full"] }
tokio = { version = "0.2", features = ["tcp", "rt-core", "io-driver", "sync"] }
tokio-util = { version = "0.3.1", features = ["codec"] }
futures = "0.3"

[build-dependencies]
protobuf-codegen-pure = "= 2.15.1"
protobuf-codegen-pure = "= 2.16.2"
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Origin
version_branch = v0.33.5
version_branch = v0.33.6
tendermint = https://raw.githubusercontent.com/tendermint/tendermint/$(version_branch)

# Outputs
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ applications for [Tendermint](https://github.com/tendermint/tendermint/).

## Supported Version

- Tendermint 0.33.5
- Tendermint 0.33.6
- ABCI 0.16.2

## Installation
Expand All @@ -33,7 +33,7 @@ To use this library to build your own ABCI apps in Rust you have to include the

```toml
[dependencies]
abci = "0.7.1"
abci = "0.7.2"
```

### Development
Expand Down Expand Up @@ -65,6 +65,7 @@ For a real life example of an ABCI application you can checkout [Cosmos SDK](htt

| Tendermint | Rust-abci |
| ---------- | :-------: |
| 0.33.6 | 0.7.2 |
| 0.33.5 | 0.7.1 |
| 0.33.1 | 0.7.0 |
| 0.32.9 | 0.6.5 |
Expand Down
40 changes: 19 additions & 21 deletions src/codec.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
use std::error::Error;

use bytes::{BufMut, BytesMut};
use bytes::{buf::BufMutExt, BufMut, BytesMut};
use integer_encoding::VarInt;
use protobuf::Message;
use tokio::codec::{Decoder, Encoder};
use protobuf::{Message, ProtobufError};
use tokio_util::codec::{Decoder, Encoder};

use crate::messages::abci::*;

Expand All @@ -18,9 +16,9 @@ impl ABCICodec {

impl Decoder for ABCICodec {
type Item = Request;
type Error = Box<dyn Error>;
type Error = ProtobufError;

fn decode(&mut self, buf: &mut BytesMut) -> Result<Option<Request>, Box<dyn Error>> {
fn decode(&mut self, buf: &mut BytesMut) -> Result<Option<Request>, ProtobufError> {
let length = buf.len();
if length == 0 {
return Ok(None);
Expand All @@ -30,16 +28,15 @@ impl Decoder for ABCICodec {
return Ok(None);
}
let request = protobuf::parse_from_bytes(&buf[varint.1..(varint.0 as usize + varint.1)])?;
buf.split_to(varint.0 as usize + varint.1);
let _ = buf.split_to(varint.0 as usize + varint.1);
Ok(Some(request))
}
}

impl Encoder for ABCICodec {
type Item = Response;
type Error = Box<dyn Error>;
impl Encoder<Response> for ABCICodec {
type Error = ProtobufError;

fn encode(&mut self, msg: Response, buf: &mut BytesMut) -> Result<(), Box<dyn Error>> {
fn encode(&mut self, msg: Response, buf: &mut BytesMut) -> Result<(), ProtobufError> {
let msg_len = msg.compute_size();
let varint = i64::encode_var_vec(i64::from(msg_len));

Expand All @@ -49,7 +46,7 @@ impl Encoder for ABCICodec {
buf.reserve(needed);
}

buf.put(&varint);
buf.put(varint.as_ref());
msg.write_to_writer(&mut buf.writer())?;
trace!("Encode response! {:?}", &buf[..]);
Ok(())
Expand All @@ -59,9 +56,10 @@ impl Encoder for ABCICodec {
#[cfg(test)]
mod tests {
use super::*;
use std::error::Error;

fn setup_echo_request_buf() -> Result<BytesMut, Box<dyn Error>> {
let buf = &mut BytesMut::new();
let mut buf = BytesMut::new();

let mut r = Request::new();
let mut echo = RequestEcho::new();
Expand All @@ -70,16 +68,16 @@ mod tests {

let msg_len = r.compute_size();
let varint = i64::encode_var_vec(msg_len as i64);
buf.put(varint);
r.write_to_writer(&mut buf.writer())?;
buf.put(varint.as_ref());
r.write_to_writer(&mut (&mut buf).writer())?;

trace!("Encode response! {:?}", &buf[..]);

Ok(buf.take())
Ok(buf)
}

fn setup_echo_large_request_buf() -> Result<BytesMut, Box<dyn Error>> {
let buf = &mut BytesMut::new();
let mut buf = BytesMut::new();

let mut r = Request::new();
let mut echo = RequestEcho::new();
Expand All @@ -96,12 +94,12 @@ mod tests {
buf.reserve(needed);
}

buf.put(varint);
r.write_to_writer(&mut buf.writer())?;
buf.put(varint.as_ref());
r.write_to_writer(&mut (&mut buf).writer())?;

trace!("Encode response! {:?}", &buf[..]);

Ok(buf.take())
Ok(buf)
}

#[test]
Expand Down
Loading

0 comments on commit 97a9622

Please sign in to comment.