diff --git a/.changelog/unreleased/breaking-changes/1389-blockidflag-to-primitive.md b/.changelog/v0.36.0/breaking-changes/1389-blockidflag-to-primitive.md similarity index 100% rename from .changelog/unreleased/breaking-changes/1389-blockidflag-to-primitive.md rename to .changelog/v0.36.0/breaking-changes/1389-blockidflag-to-primitive.md diff --git a/.changelog/unreleased/breaking-changes/1405-change-event-attribute-value.md b/.changelog/v0.36.0/breaking-changes/1405-change-event-attribute-value.md similarity index 100% rename from .changelog/unreleased/breaking-changes/1405-change-event-attribute-value.md rename to .changelog/v0.36.0/breaking-changes/1405-change-event-attribute-value.md diff --git a/.changelog/unreleased/breaking-changes/1410-avoid-chucking-signature-multiple-times.md b/.changelog/v0.36.0/breaking-changes/1410-avoid-chucking-signature-multiple-times.md similarity index 100% rename from .changelog/unreleased/breaking-changes/1410-avoid-chucking-signature-multiple-times.md rename to .changelog/v0.36.0/breaking-changes/1410-avoid-chucking-signature-multiple-times.md diff --git a/.changelog/unreleased/features/1389-missing-serde-derives.md b/.changelog/v0.36.0/features/1389-missing-serde-derives.md similarity index 100% rename from .changelog/unreleased/features/1389-missing-serde-derives.md rename to .changelog/v0.36.0/features/1389-missing-serde-derives.md diff --git a/.changelog/unreleased/features/1401-ed25519-consensus-from-impls.md b/.changelog/v0.36.0/features/1401-ed25519-consensus-from-impls.md similarity index 100% rename from .changelog/unreleased/features/1401-ed25519-consensus-from-impls.md rename to .changelog/v0.36.0/features/1401-ed25519-consensus-from-impls.md diff --git a/.changelog/unreleased/improvements/1403-decode-empty-commit-in-block.md b/.changelog/v0.36.0/improvements/1403-decode-empty-commit-in-block.md similarity index 100% rename from .changelog/unreleased/improvements/1403-decode-empty-commit-in-block.md rename to .changelog/v0.36.0/improvements/1403-decode-empty-commit-in-block.md diff --git a/.changelog/unreleased/improvements/1406-optimise-voting_power_in.md b/.changelog/v0.36.0/improvements/1406-optimise-voting_power_in.md similarity index 100% rename from .changelog/unreleased/improvements/1406-optimise-voting_power_in.md rename to .changelog/v0.36.0/improvements/1406-optimise-voting_power_in.md diff --git a/.changelog/unreleased/improvements/1411-validator-index-i32-max-limit.md b/.changelog/v0.36.0/improvements/1411-validator-index-i32-max-limit.md similarity index 100% rename from .changelog/unreleased/improvements/1411-validator-index-i32-max-limit.md rename to .changelog/v0.36.0/improvements/1411-validator-index-i32-max-limit.md diff --git a/.changelog/unreleased/improvements/1413-reuse-sign-bytes.md b/.changelog/v0.36.0/improvements/1413-reuse-sign-bytes.md similarity index 100% rename from .changelog/unreleased/improvements/1413-reuse-sign-bytes.md rename to .changelog/v0.36.0/improvements/1413-reuse-sign-bytes.md diff --git a/.changelog/v0.36.0/summary.md b/.changelog/v0.36.0/summary.md new file mode 100644 index 000000000..27ded779b --- /dev/null +++ b/.changelog/v0.36.0/summary.md @@ -0,0 +1,3 @@ +This release brings substantial performance improvements to the voting power computation within the light client, improves the handling of misformed blocks (eg. with empty `last_commit` on non-first block) when decoding them from Protobuf or RPC responses, and adds missing `serde` derives on some Protobuf definitions. + +This release also technically contains a breaking change in `tendermint-proto`, but this should not impact normal use of the library, as the `ToPrimitive` impl that was removed on `BlockIdFlag` trait did not provide any additional functionality. diff --git a/CHANGELOG.md b/CHANGELOG.md index cd99f71ed..8fa2bb8ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,63 @@ # CHANGELOG +## v0.36.0 + +This release brings substantial performance improvements to the voting power computation within the light client, improves the handling of misformed blocks (eg. with empty `last_commit` on non-first block) when decoding them from Protobuf or RPC responses, and adds missing `serde` derives on some Protobuf definitions. + +This release also technically contains a breaking change in `tendermint-proto`, but this should not impact normal use of the library, as the `ToPrimitive` impl that was removed on `BlockIdFlag` trait did not provide any additional functionality. + +### BREAKING CHANGES + +- `[tendermint-proto]` Remove redundant impl of `num_traits::ToPrimitive` for `BlockIDFlag` + ([\#1389](https://github.com/informalsystems/tendermint-rs/pull/1389)) +- `[tendermint]` Change `EventAttribute`'s `key` and `value` fields from `String` to `Vec` for Tendermint v0.34, as enforced by the Protobuf schema for Tendermint v0.34. + `tendermint::abci::EventAttribute` is now an enum, to account for version 0.34 and 0.37+, therefore the `key`, `value` and `index` fields now have to be retrieved through the `key_str()`/`key_bytes`, `value_str()`/`value_bytes()` and `index()` methods. + ([\#1400](https://github.com/informalsystems/tendermint-rs/issues/1400)). +- `[light-client-verifier]` Rework VerificationPredicates and VotingPowerCalculator + by introducing methods which check validators and signers overlap at once. + The motivation of this is to avoid checking the same signature multiple + times. + + Consider a validator is in old and new set. Previously their signature would + be verified twice. Once by call to `has_sufficient_validators_overlap` + method and second time by call to `has_sufficient_signers_overlap` method. + + With the new interface, `has_sufficient_validators_and_signers_overlap` is + called and it can be implemented to remember which signatures have been + verified. + + As a side effect of those changes, signatures are now verified in the order + of validator’s power which may further reduce number of signatures which + need to be verified. + + ([\#1410](https://github.com/informalsystems/tendermint-rs/pull/1410)) + +### FEATURES + +- `[tendermint-proto]` Add missing `serde` derives on Protobuf definitions + ([\#1389](https://github.com/informalsystems/tendermint-rs/pull/1389)) +- `[tendermint]` Add the following impls for `ed25519-consensus`: + * `From` for `tendermint::SigningKey` + * `From` for `tendermint::PublicKey` + * `From` for `tendermint::VerificationKey` + ([\#1401](https://github.com/informalsystems/tendermint-rs/pull/1401)) + +### IMPROVEMENTS + +- `[tendermint]` Allow misformed blocks (eg. with empty `last_commit` + on non-first block) when decoding them from Protobuf or RPC responses + ([\#1403](https://github.com/informalsystems/tendermint-rs/issues/1403)) +- `[tendermint]` Check `index ≤ i32::MAX` invariant when converting `usize` + into `ValidatorIndex`. + ([\#1411](https://github.com/informalsystems/tendermint-rs/issues/1411)) +- `[light-client-verifier]` Optimise validators lookup in + `ProvidedVotingPowerCalculator::voting_power_in` method. + ([\#1407](https://github.com/informalsystems/tendermint-rs/pull/1407)) +- `[tendermint-light-client-verifier]` Reuse buffer used to store + sign_bytes to reduce number of allocations and deallocations. + ([\#1413](https://github.com/informalsystems/tendermint-rs/pull/1413)) + ## v0.35.0 This release brings breaking changes related to `flex-error`, diff --git a/abci/Cargo.toml b/abci/Cargo.toml index 3bbb4d2b9..551f265eb 100644 --- a/abci/Cargo.toml +++ b/abci/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tendermint-abci" -version = "0.35.0" +version = "0.36.0" authors = ["Informal Systems "] edition = "2021" license = "Apache-2.0" @@ -33,7 +33,7 @@ binary = [ [dependencies] bytes = { version = "1.0", default-features = false } prost = { version = "0.12", default-features = false } -tendermint-proto = { version = "0.35.0", default-features = false, path = "../proto" } +tendermint-proto = { version = "0.36.0", 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 } diff --git a/config/Cargo.toml b/config/Cargo.toml index ab9eef4c0..0f8e61029 100644 --- a/config/Cargo.toml +++ b/config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tendermint-config" -version = "0.35.0" # Also update depending crates (rpc, light-node, ..) when bumping this. +version = "0.36.0" # 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" @@ -24,7 +24,7 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] [dependencies] -tendermint = { version = "0.35.0", default-features = false, features = ["rust-crypto"], path = "../tendermint" } +tendermint = { version = "0.36.0", 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" diff --git a/light-client-cli/Cargo.toml b/light-client-cli/Cargo.toml index eeee016a0..b030a13f2 100644 --- a/light-client-cli/Cargo.toml +++ b/light-client-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tendermint-light-client-cli" -version = "0.35.0" +version = "0.36.0" edition = "2021" license = "Apache-2.0" readme = "README.md" @@ -23,10 +23,10 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] [dependencies] -tendermint = { version = "0.35.0", path = "../tendermint" } -tendermint-rpc = { version = "0.35.0", path = "../rpc", features = ["http-client"] } -tendermint-light-client = { version = "0.35.0", path = "../light-client" } -tendermint-light-client-detector = { version = "0.35.0", path = "../light-client-detector" } +tendermint = { version = "0.36.0", path = "../tendermint" } +tendermint-rpc = { version = "0.36.0", path = "../rpc", features = ["http-client"] } +tendermint-light-client = { version = "0.36.0", path = "../light-client" } +tendermint-light-client-detector = { version = "0.36.0", path = "../light-client-detector" } clap = { version = "4.1.8", features = ["derive"] } color-eyre = "0.6.2" diff --git a/light-client-detector/Cargo.toml b/light-client-detector/Cargo.toml index 7f9aac494..a49852032 100644 --- a/light-client-detector/Cargo.toml +++ b/light-client-detector/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tendermint-light-client-detector" -version = "0.35.0" +version = "0.36.0" edition = "2021" license = "Apache-2.0" readme = "README.md" @@ -23,10 +23,10 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] [dependencies] -tendermint = { version = "0.35.0", path = "../tendermint" } -tendermint-rpc = { version = "0.35.0", path = "../rpc", features = ["http-client"] } -tendermint-proto = { version = "0.35.0", path = "../proto" } -tendermint-light-client = { version = "0.35.0", path = "../light-client" } +tendermint = { version = "0.36.0", path = "../tendermint" } +tendermint-rpc = { version = "0.36.0", path = "../rpc", features = ["http-client"] } +tendermint-proto = { version = "0.36.0", path = "../proto" } +tendermint-light-client = { version = "0.36.0", path = "../light-client" } crossbeam-channel = { version = "0.5.11", default-features = false } derive_more = { version = "0.99.5", default-features = false, features = ["display"] } diff --git a/light-client-js/Cargo.toml b/light-client-js/Cargo.toml index 0a0a90e21..873fc7760 100644 --- a/light-client-js/Cargo.toml +++ b/light-client-js/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tendermint-light-client-js" -version = "0.35.0" +version = "0.36.0" authors = ["Informal Systems "] edition = "2021" license = "Apache-2.0" @@ -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.35.0", default-features = false, path = "../tendermint" } -tendermint-light-client-verifier = { version = "0.35.0", features = ["rust-crypto"], default-features = false, path = "../light-client-verifier" } +tendermint = { version = "0.36.0", default-features = false, path = "../tendermint" } +tendermint-light-client-verifier = { version = "0.36.0", 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 } diff --git a/light-client-verifier/Cargo.toml b/light-client-verifier/Cargo.toml index 25b003e66..4bf08fb0c 100644 --- a/light-client-verifier/Cargo.toml +++ b/light-client-verifier/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tendermint-light-client-verifier" -version = "0.35.0" +version = "0.36.0" edition = "2021" license = "Apache-2.0" readme = "README.md" @@ -27,7 +27,7 @@ default = ["rust-crypto", "flex-error/std"] rust-crypto = ["tendermint/rust-crypto"] [dependencies] -tendermint = { version = "0.35.0", path = "../tendermint", default-features = false } +tendermint = { version = "0.36.0", path = "../tendermint", default-features = false } derive_more = { version = "0.99.5", default-features = false, features = ["display"] } serde = { version = "1.0.106", default-features = false } diff --git a/light-client/Cargo.toml b/light-client/Cargo.toml index 42779067c..ce282595c 100644 --- a/light-client/Cargo.toml +++ b/light-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tendermint-light-client" -version = "0.35.0" +version = "0.36.0" edition = "2021" license = "Apache-2.0" readme = "README.md" @@ -35,9 +35,9 @@ unstable = ["rust-crypto"] mbt = ["rust-crypto"] [dependencies] -tendermint = { version = "0.35.0", path = "../tendermint", default-features = false } -tendermint-rpc = { version = "0.35.0", path = "../rpc", default-features = false } -tendermint-light-client-verifier = { version = "0.35.0", path = "../light-client-verifier", default-features = false } +tendermint = { version = "0.36.0", path = "../tendermint", default-features = false } +tendermint-rpc = { version = "0.36.0", path = "../rpc", default-features = false } +tendermint-light-client-verifier = { version = "0.36.0", path = "../light-client-verifier", default-features = false } contracts = { version = "0.6.2", default-features = false } crossbeam-channel = { version = "0.5.11", default-features = false, features = ["std"] } diff --git a/p2p/Cargo.toml b/p2p/Cargo.toml index bb3c0216c..8ece08be3 100644 --- a/p2p/Cargo.toml +++ b/p2p/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tendermint-p2p" -version = "0.35.0" +version = "0.36.0" edition = "2021" license = "Apache-2.0" repository = "https://github.com/informalsystems/tendermint-rs" @@ -44,9 +44,9 @@ aead = { version = "0.5", default-features = false } flex-error = { version = "0.4.4", default-features = false } # path dependencies -tendermint = { path = "../tendermint", version = "0.35.0", default-features = false } -tendermint-proto = { path = "../proto", version = "0.35.0", default-features = false } -tendermint-std-ext = { path = "../std-ext", version = "0.35.0", default-features = false } +tendermint = { path = "../tendermint", version = "0.36.0", default-features = false } +tendermint-proto = { path = "../proto", version = "0.36.0", default-features = false } +tendermint-std-ext = { path = "../std-ext", version = "0.36.0", default-features = false } # optional dependencies prost-derive = { version = "0.12", optional = true } diff --git a/pbt-gen/Cargo.toml b/pbt-gen/Cargo.toml index 78b5868ac..b21ed7547 100644 --- a/pbt-gen/Cargo.toml +++ b/pbt-gen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tendermint-pbt-gen" -version = "0.35.0" +version = "0.36.0" authors = ["Informal Systems "] edition = "2021" license = "Apache-2.0" diff --git a/proto/Cargo.toml b/proto/Cargo.toml index 38be76385..b5e0685a3 100644 --- a/proto/Cargo.toml +++ b/proto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tendermint-proto" -version = "0.35.0" +version = "0.36.0" authors = ["Informal Systems "] edition = "2021" license = "Apache-2.0" diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 9b4fdc1f0..cb40c8452 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tendermint-rpc" -version = "0.35.0" +version = "0.36.0" edition = "2021" license = "Apache-2.0" homepage = "https://www.tendermint.com/" @@ -55,9 +55,9 @@ websocket-client = [ ] [dependencies] -tendermint = { version = "0.35.0", default-features = false, path = "../tendermint" } -tendermint-config = { version = "0.35.0", path = "../config", default-features = false } -tendermint-proto = { version = "0.35.0", path = "../proto", default-features = false } +tendermint = { version = "0.36.0", default-features = false, path = "../tendermint" } +tendermint-config = { version = "0.36.0", path = "../config", default-features = false } +tendermint-proto = { version = "0.36.0", path = "../proto", default-features = false } async-trait = { version = "0.1", default-features = false } bytes = { version = "1.0", default-features = false } diff --git a/std-ext/Cargo.toml b/std-ext/Cargo.toml index 4c4a4f9ff..f3b1b6cf3 100644 --- a/std-ext/Cargo.toml +++ b/std-ext/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tendermint-std-ext" -version = "0.35.0" +version = "0.36.0" edition = "2021" license = "Apache-2.0" homepage = "https://www.tendermint.com/" diff --git a/tendermint/Cargo.toml b/tendermint/Cargo.toml index 4d60c0b30..d79dca3b9 100644 --- a/tendermint/Cargo.toml +++ b/tendermint/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tendermint" -version = "0.35.0" # Also update depending crates (rpc, light-node, etc..) when bumping this . +version = "0.36.0" # Also update depending crates (rpc, light-node, etc..) when bumping this . license = "Apache-2.0" homepage = "https://www.tendermint.com/" repository = "https://github.com/informalsystems/tendermint-rs/tree/main/tendermint" @@ -44,7 +44,7 @@ serde_repr = { version = "0.1", default-features = false } signature = { version = "2", default-features = false, features = ["alloc"] } subtle = { version = "2", default-features = false } subtle-encoding = { version = "0.5", default-features = false, features = ["bech32-preview"] } -tendermint-proto = { version = "0.35.0", default-features = false, path = "../proto" } +tendermint-proto = { version = "0.36.0", default-features = false, path = "../proto" } time = { version = "0.3", default-features = false, features = ["macros", "parsing"] } zeroize = { version = "1.1", default-features = false, features = ["zeroize_derive", "alloc"] } flex-error = { version = "0.4.4", default-features = false } diff --git a/test/Cargo.toml b/test/Cargo.toml index f5518081c..58ce9c5fa 100644 --- a/test/Cargo.toml +++ b/test/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tendermint-test" description = "Tendermint workspace tests and common utilities for testing." -version = "0.35.0" +version = "0.36.0" edition = "2021" license = "Apache-2.0" categories = ["development", "test", "tools"] diff --git a/testgen/Cargo.toml b/testgen/Cargo.toml index 6429c54cf..b25da98e1 100644 --- a/testgen/Cargo.toml +++ b/testgen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tendermint-testgen" -version = "0.35.0" +version = "0.36.0" authors = ["Informal Systems "] edition = "2021" readme = "README.md" @@ -16,7 +16,7 @@ description = """ """ [dependencies] -tendermint = { version = "0.35.0", path = "../tendermint", features = ["clock"] } +tendermint = { version = "0.36.0", path = "../tendermint", features = ["clock"] } serde = { version = "1", default-features = false, features = ["derive"] } serde_json = { version = "1", default-features = false, features = ["std"] } ed25519-consensus = { version = "2", default-features = false } diff --git a/tools/abci-test/Cargo.toml b/tools/abci-test/Cargo.toml index 6d03b16ce..b8255d1ea 100644 --- a/tools/abci-test/Cargo.toml +++ b/tools/abci-test/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "abci-test" -version = "0.35.0" +version = "0.36.0" authors = ["Informal Systems "] edition = "2021" description = """ @@ -14,9 +14,9 @@ description = """ flex-error = { version = "0.4.4", default-features = false, features = ["std"] } futures = "0.3" structopt = "0.3" -tendermint = { version = "0.35.0", path = "../../tendermint" } -tendermint-config = { version = "0.35.0", path = "../../config" } -tendermint-rpc = { version = "0.35.0", path = "../../rpc", features = [ "websocket-client" ] } +tendermint = { version = "0.36.0", path = "../../tendermint" } +tendermint-config = { version = "0.36.0", path = "../../config" } +tendermint-rpc = { version = "0.36.0", path = "../../rpc", features = [ "websocket-client" ] } tracing = "0.1" tracing-subscriber = "0.2" tokio = { version = "1.20", features = ["full"] } diff --git a/tools/kvstore-test/Cargo.toml b/tools/kvstore-test/Cargo.toml index c59d59951..b38d0e8e8 100644 --- a/tools/kvstore-test/Cargo.toml +++ b/tools/kvstore-test/Cargo.toml @@ -11,9 +11,9 @@ edition = "2021" [dev-dependencies] futures = "0.3" sha2 = "0.10" -tendermint = { version = "0.35.0", path = "../../tendermint" } -tendermint-light-client = { version = "0.35.0", path = "../../light-client", features = ["unstable"] } -tendermint-rpc = { version = "0.35.0", path = "../../rpc", features = [ "http-client", "websocket-client" ] } +tendermint = { version = "0.36.0", path = "../../tendermint" } +tendermint-light-client = { version = "0.36.0", path = "../../light-client", features = ["unstable"] } +tendermint-rpc = { version = "0.36.0", path = "../../rpc", features = [ "http-client", "websocket-client" ] } tokio = { version = "1.0", features = [ "rt-multi-thread", "macros" ] } tracing = "0.1" tracing-subscriber = "0.3" diff --git a/tools/rpc-probe/Cargo.toml b/tools/rpc-probe/Cargo.toml index d27eaaa46..fa80e9737 100644 --- a/tools/rpc-probe/Cargo.toml +++ b/tools/rpc-probe/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tendermint-rpc-probe" -version = "0.35.0" +version = "0.36.0" authors = ["Informal Systems "] edition = "2021" license = "Apache-2.0"