Skip to content

Commit

Permalink
Release 0.32.1 (#1331)
Browse files Browse the repository at this point in the history
* rpc: use compat mode in latest_block_results() (#1326)

Just like with the block_results method, the response needs to be
parsed varyingly with the RPC dialect.

* Fix lints in clippy 0.1.71 (#1330)

* tendermint: fix doc links problems in hash
  • Loading branch information
mzabaluev authored Jul 17, 2023
1 parent 91ff1e4 commit dc9861d
Show file tree
Hide file tree
Showing 28 changed files with 96 additions and 72 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- `[tendermint-rpc]` Use compatibility mode in implementations
of the `Client::latest_block_results` method
([\#1326](https://github.com/informalsystems/tendermint-rs/pull/1326))
2 changes: 2 additions & 0 deletions .changelog/v0.32.1/summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fixed a bug with processing the `latest_block_result` endpoint result
in the RPC client set to the 0.34 compatibility mode.
27 changes: 19 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# CHANGELOG

## v0.32.1

Fixed a bug with processing the `latest_block_result` endpoint result
in the RPC client set to the 0.34 compatibility mode.

### BUG FIXES

- `[tendermint-rpc]` Use compatibility mode in implementations
of the `Client::latest_block_results` method
([\#1326](https://github.com/informalsystems/tendermint-rs/pull/1326))

## v0.32.0

*May 3rd, 2023*
Expand Down Expand Up @@ -606,18 +617,18 @@ not yet support `no_std`.
- Upgraded Prost to the official v0.9 release to finally resolve the security
issue introduced by v0.7
([#925](https://github.com/informalsystems/tendermint-rs/issues/925))
- `[tendermint]` The `tendermint::node::info::ListenAddress::to_net_address`
method was replaced with a simple `as_str` method toward facilitating
`no_std` compatibility ([#983](https://github.com/informalsystems/tendermint-
rs/issues/983))
- `[tendermint]` The `tendermint::node::info::OtherInfo::rpc_address`
field type has been changed from `tendermint::net::Address`
to `String` toward facilitating `no_std` compatibility
([#983](https://github.com/informalsystems/tendermint-rs/issues/983))
- `[tendermint, tendermint-config]` The `tendermint::config`
module has now been broken out into its own crate (`tendermint-
config`) to help towards facilitating `no_std` compatibility
([#983](https://github.com/informalsystems/tendermint-rs/issues/983))
- `[tendermint]` The `tendermint::node::info::OtherInfo::rpc_address`
field type has been changed from `tendermint::net::Address`
to `String` toward facilitating `no_std` compatibility
([#983](https://github.com/informalsystems/tendermint-rs/issues/983))
- `[tendermint]` The `tendermint::node::info::ListenAddress::to_net_address`
method was replaced with a simple `as_str` method toward facilitating
`no_std` compatibility ([#983](https://github.com/informalsystems/tendermint-
rs/issues/983))

### FEATURES

Expand Down
4 changes: 2 additions & 2 deletions abci/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tendermint-abci"
version = "0.32.0"
version = "0.32.1"
authors = ["Informal Systems <hello@informal.systems>"]
edition = "2021"
license = "Apache-2.0"
Expand Down Expand Up @@ -33,7 +33,7 @@ binary = [
[dependencies]
bytes = { version = "1.0", default-features = false }
prost = { version = "0.11", default-features = false }
tendermint-proto = { version = "0.32.0", default-features = false, path = "../proto" }
tendermint-proto = { version = "0.32.1", default-features = false, path = "../proto" }
tracing = { version = "0.1", default-features = false }
flex-error = { version = "0.4.4", default-features = false }
structopt = { version = "0.3", optional = true, default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion abci/tests/echo_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ mod echo_app_integration {
#[test]
fn echo() {
let server = ServerBuilder::default()
.bind("127.0.0.1:0", EchoApp::default())
.bind("127.0.0.1:0", EchoApp)
.unwrap();
let server_addr = server.local_addr();
let _ = std::thread::spawn(move || server.listen());
Expand Down
4 changes: 2 additions & 2 deletions config/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tendermint-config"
version = "0.32.0" # Also update depending crates (rpc, light-node, ..) when bumping this.
version = "0.32.1" # Also update depending crates (rpc, light-node, ..) when bumping this.
license = "Apache-2.0"
homepage = "https://www.tendermint.com/"
repository = "https://github.com/informalsystems/tendermint-rs/tree/main/tendermint"
Expand All @@ -24,7 +24,7 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
tendermint = { version = "0.32.0", default-features = false, features = ["rust-crypto"], path = "../tendermint" }
tendermint = { version = "0.32.1", default-features = false, features = ["rust-crypto"], path = "../tendermint" }
flex-error = { version = "0.4.4", default-features = false }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
Expand Down
10 changes: 5 additions & 5 deletions light-client-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tendermint-light-client-cli"
version = "0.32.0"
version = "0.32.1"
edition = "2021"
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -23,10 +23,10 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
tendermint = { version = "0.32.0", path = "../tendermint" }
tendermint-rpc = { version = "0.32.0", path = "../rpc", features = ["http-client"] }
tendermint-light-client = { version = "0.32.0", path = "../light-client" }
tendermint-light-client-detector = { version = "0.32.0", path = "../light-client-detector" }
tendermint = { version = "0.32.1", path = "../tendermint" }
tendermint-rpc = { version = "0.32.1", path = "../rpc", features = ["http-client"] }
tendermint-light-client = { version = "0.32.1", path = "../light-client" }
tendermint-light-client-detector = { version = "0.32.1", path = "../light-client-detector" }

clap = { version = "4.1.8", features = ["derive"] }
color-eyre = "0.6.2"
Expand Down
10 changes: 5 additions & 5 deletions light-client-detector/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tendermint-light-client-detector"
version = "0.32.0"
version = "0.32.1"
edition = "2021"
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -23,10 +23,10 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
tendermint = { version = "0.32.0", path = "../tendermint" }
tendermint-rpc = { version = "0.32.0", path = "../rpc", features = ["http-client"] }
tendermint-proto = { version = "0.32.0", path = "../proto" }
tendermint-light-client = { version = "0.32.0", path = "../light-client" }
tendermint = { version = "0.32.1", path = "../tendermint" }
tendermint-rpc = { version = "0.32.1", path = "../rpc", features = ["http-client"] }
tendermint-proto = { version = "0.32.1", path = "../proto" }
tendermint-light-client = { version = "0.32.1", path = "../light-client" }

contracts = { version = "0.6.2", default-features = false }
crossbeam-channel = { version = "0.4.2", default-features = false }
Expand Down
6 changes: 3 additions & 3 deletions light-client-js/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tendermint-light-client-js"
version = "0.32.0"
version = "0.32.1"
authors = ["Informal Systems <hello@informal.systems>"]
edition = "2021"
license = "Apache-2.0"
Expand All @@ -22,8 +22,8 @@ default = ["console_error_panic_hook"]
[dependencies]
serde = { version = "1.0", default-features = false, features = [ "derive" ] }
serde_json = { version = "1.0", default-features = false }
tendermint = { version = "0.32.0", default-features = false, path = "../tendermint" }
tendermint-light-client-verifier = { version = "0.32.0", features = ["rust-crypto"], default-features = false, path = "../light-client-verifier" }
tendermint = { version = "0.32.1", default-features = false, path = "../tendermint" }
tendermint-light-client-verifier = { version = "0.32.1", features = ["rust-crypto"], default-features = false, path = "../light-client-verifier" }
wasm-bindgen = { version = "0.2.63", default-features = false, features = [ "serde-serialize" ] }
serde-wasm-bindgen = { version = "0.4.5", default-features = false }

Expand Down
4 changes: 2 additions & 2 deletions light-client-verifier/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tendermint-light-client-verifier"
version = "0.32.0"
version = "0.32.1"
edition = "2021"
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -27,7 +27,7 @@ default = ["rust-crypto", "flex-error/std", "flex-error/eyre_tracer"]
rust-crypto = ["tendermint/rust-crypto"]

[dependencies]
tendermint = { version = "0.32.0", path = "../tendermint", default-features = false }
tendermint = { version = "0.32.1", path = "../tendermint", default-features = false }

derive_more = { version = "0.99.5", default-features = false, features = ["display"] }
serde = { version = "1.0.106", default-features = false }
Expand Down
24 changes: 12 additions & 12 deletions light-client-verifier/src/predicates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ mod tests {
let header_one = Header::new(&val).generate().unwrap();
let header_two = Header::new(&val).generate().unwrap();

let vp = ProdPredicates::default();
let vp = ProdPredicates;

// 1. ensure valid header verifies
let result_ok = vp.is_monotonic_bft_time(header_two.time, header_one.time);
Expand All @@ -286,7 +286,7 @@ mod tests {
let header_one = Header::new(&val).generate().unwrap();
let header_two = Header::new(&val).height(2).generate().unwrap();

let vp = ProdPredicates::default();
let vp = ProdPredicates;

// 1. ensure valid header verifies
let result_ok = vp.is_monotonic_height(header_two.height, header_one.height);
Expand All @@ -310,7 +310,7 @@ mod tests {
let header_one = Header::new(&val).chain_id("chaina-1").generate().unwrap();
let header_two = Header::new(&val).chain_id("chainb-1").generate().unwrap();

let vp = ProdPredicates::default();
let vp = ProdPredicates;

// 1. ensure valid header verifies
let result_ok = vp.is_matching_chain_id(&header_one.chain_id, &header_one.chain_id);
Expand All @@ -333,7 +333,7 @@ mod tests {
let val = Validator::new("val-1");
let header = Header::new(&[val]).generate().unwrap();

let vp = ProdPredicates::default();
let vp = ProdPredicates;

// 1. ensure valid header verifies
let mut trusting_period = Duration::new(1000, 0);
Expand Down Expand Up @@ -362,7 +362,7 @@ mod tests {
let val = Validator::new("val-1");
let header = Header::new(&[val]).generate().unwrap();

let vp = ProdPredicates::default();
let vp = ProdPredicates;
let one_second = Duration::new(1, 0);

let now = OffsetDateTime::now_utc().try_into().unwrap();
Expand Down Expand Up @@ -393,7 +393,7 @@ mod tests {

let bad_validator_set = ValidatorSet::new(vec!["bad-val"]).generate().unwrap();

let vp = ProdPredicates::default();
let vp = ProdPredicates;

// Test positive case
// 1. For predicate: validator_sets_match
Expand Down Expand Up @@ -458,7 +458,7 @@ mod tests {
.unwrap()
.signed_header;

let vp = ProdPredicates::default();
let vp = ProdPredicates;

// 1. ensure valid signed header verifies
let result_ok =
Expand Down Expand Up @@ -493,8 +493,8 @@ mod tests {
let mut signed_header = light_block.signed_header;
let val_set = light_block.validators;

let vp = ProdPredicates::default();
let commit_validator = ProdCommitValidator::default();
let vp = ProdPredicates;
let commit_validator = ProdCommitValidator;

// Test scenarios -->
// 1. valid commit - must result "Ok"
Expand Down Expand Up @@ -580,7 +580,7 @@ mod tests {

let light_block2: LightBlock = test_lb1.next().generate().unwrap().into();

let vp = ProdPredicates::default();
let vp = ProdPredicates;

// Test scenarios -->
// 1. next_validator_set hash matches
Expand Down Expand Up @@ -627,7 +627,7 @@ mod tests {
let val_set = light_block.validators;
let signed_header = light_block.signed_header;

let vp = ProdPredicates::default();
let vp = ProdPredicates;
let mut trust_threshold = TrustThreshold::new(1, 3).expect("Cannot make trust threshold");
let voting_power_calculator = ProdVotingPowerCalculator::default();

Expand Down Expand Up @@ -681,7 +681,7 @@ mod tests {
let mut light_block: LightBlock =
TestgenLightBlock::new_default(2).generate().unwrap().into();

let vp = ProdPredicates::default();
let vp = ProdPredicates;
let voting_power_calculator = ProdVotingPowerCalculator::default();

// Test scenarios -->
Expand Down
8 changes: 4 additions & 4 deletions light-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tendermint-light-client"
version = "0.32.0"
version = "0.32.1"
edition = "2021"
license = "Apache-2.0"
readme = "README.md"
Expand Down Expand Up @@ -35,9 +35,9 @@ unstable = ["rust-crypto"]
mbt = ["rust-crypto"]

[dependencies]
tendermint = { version = "0.32.0", path = "../tendermint", default-features = false }
tendermint-rpc = { version = "0.32.0", path = "../rpc", default-features = false }
tendermint-light-client-verifier = { version = "0.32.0", path = "../light-client-verifier", default-features = false }
tendermint = { version = "0.32.1", path = "../tendermint", default-features = false }
tendermint-rpc = { version = "0.32.1", path = "../rpc", default-features = false }
tendermint-light-client-verifier = { version = "0.32.1", path = "../light-client-verifier", default-features = false }

contracts = { version = "0.6.2", default-features = false }
crossbeam-channel = { version = "0.4.2", default-features = false }
Expand Down
8 changes: 4 additions & 4 deletions p2p/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tendermint-p2p"
version = "0.32.0"
version = "0.32.1"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/informalsystems/tendermint-rs"
Expand Down Expand Up @@ -44,9 +44,9 @@ aead = { version = "0.4.1", default-features = false }
flex-error = { version = "0.4.4", default-features = false }

# path dependencies
tendermint = { path = "../tendermint", version = "0.32.0", default-features = false }
tendermint-proto = { path = "../proto", version = "0.32.0", default-features = false }
tendermint-std-ext = { path = "../std-ext", version = "0.32.0", default-features = false }
tendermint = { path = "../tendermint", version = "0.32.1", default-features = false }
tendermint-proto = { path = "../proto", version = "0.32.1", default-features = false }
tendermint-std-ext = { path = "../std-ext", version = "0.32.1", default-features = false }

# optional dependencies
prost-derive = { version = "0.11", optional = true }
2 changes: 1 addition & 1 deletion pbt-gen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tendermint-pbt-gen"
version = "0.32.0"
version = "0.32.1"
authors = ["Informal Systems <hello@informal.systems>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion proto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tendermint-proto"
version = "0.32.0"
version = "0.32.1"
authors = ["Informal Systems <hello@informal.systems>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
8 changes: 4 additions & 4 deletions rpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tendermint-rpc"
version = "0.32.0"
version = "0.32.1"
edition = "2021"
license = "Apache-2.0"
homepage = "https://www.tendermint.com/"
Expand Down Expand Up @@ -60,9 +60,9 @@ websocket-client = [
]

[dependencies]
tendermint = { version = "0.32.0", default-features = false, path = "../tendermint" }
tendermint-config = { version = "0.32.0", path = "../config", default-features = false }
tendermint-proto = { version = "0.32.0", path = "../proto", default-features = false }
tendermint = { version = "0.32.1", default-features = false, path = "../tendermint" }
tendermint-config = { version = "0.32.1", path = "../config", default-features = false }
tendermint-proto = { version = "0.32.1", path = "../proto", default-features = false }

async-trait = { version = "0.1", default-features = false }
bytes = { version = "1.0", default-features = false }
Expand Down
4 changes: 4 additions & 0 deletions rpc/src/client/transport/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ impl Client for HttpClient {
perform_with_compat!(self, endpoint::block_results::Request::new(height.into()))
}

async fn latest_block_results(&self) -> Result<endpoint::block_results::Response, Error> {
perform_with_compat!(self, endpoint::block_results::Request::default())
}

async fn header<H>(&self, height: H) -> Result<endpoint::header::Response, Error>
where
H: Into<Height> + Send,
Expand Down
4 changes: 4 additions & 0 deletions rpc/src/client/transport/websocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ impl Client for WebSocketClient {
perform_with_compat!(self, endpoint::block_results::Request::new(height.into()))
}

async fn latest_block_results(&self) -> Result<endpoint::block_results::Response, Error> {
perform_with_compat!(self, endpoint::block_results::Request::default())
}

async fn header<H>(&self, height: H) -> Result<endpoint::header::Response, Error>
where
H: Into<Height> + Send,
Expand Down
2 changes: 1 addition & 1 deletion std-ext/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tendermint-std-ext"
version = "0.32.0"
version = "0.32.1"
edition = "2021"
license = "Apache-2.0"
homepage = "https://www.tendermint.com/"
Expand Down
Loading

0 comments on commit dc9861d

Please sign in to comment.