From 3c398211ebc9a3b7ec941a1b5cb4bee208f94bcc Mon Sep 17 00:00:00 2001 From: yihuang Date: Tue, 24 Dec 2019 19:45:09 +0800 Subject: [PATCH] Problem: block id field in vote could be empty Solution: - Fix the problem in tendermint-rs - upgrade dependency --- Cargo.lock | 12 ++++++------ client-common/Cargo.toml | 2 +- client-core/Cargo.toml | 2 +- client-network/Cargo.toml | 2 +- test-common/Cargo.toml | 2 +- test-common/src/block_generator.rs | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6a05a4c28..ca0de52e3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -523,7 +523,7 @@ dependencies = [ "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", "sled 0.30.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tendermint 0.10.0 (git+https://github.com/crypto-com/tendermint-rs.git?rev=a32cec297d80d240781c9ca2aaa71cace93e7510)", + "tendermint 0.10.0 (git+https://github.com/crypto-com/tendermint-rs.git?rev=db982c2437fe72c7a03942fc2bddf490f2332364)", "websocket 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)", "zeroize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -558,7 +558,7 @@ dependencies = [ "secstr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", - "tendermint 0.10.0 (git+https://github.com/crypto-com/tendermint-rs.git?rev=a32cec297d80d240781c9ca2aaa71cace93e7510)", + "tendermint 0.10.0 (git+https://github.com/crypto-com/tendermint-rs.git?rev=db982c2437fe72c7a03942fc2bddf490f2332364)", "test-common 0.2.0", "thiserror 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-bip39 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -586,7 +586,7 @@ dependencies = [ "parity-scale-codec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "secp256k1zkp 0.13.0 (git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=0125097a7bf6f939db0ce52e49803c5e0312bf5e)", "secstr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tendermint 0.10.0 (git+https://github.com/crypto-com/tendermint-rs.git?rev=a32cec297d80d240781c9ca2aaa71cace93e7510)", + "tendermint 0.10.0 (git+https://github.com/crypto-com/tendermint-rs.git?rev=db982c2437fe72c7a03942fc2bddf490f2332364)", ] [[package]] @@ -2958,7 +2958,7 @@ dependencies = [ [[package]] name = "tendermint" version = "0.10.0" -source = "git+https://github.com/crypto-com/tendermint-rs.git?rev=a32cec297d80d240781c9ca2aaa71cace93e7510#a32cec297d80d240781c9ca2aaa71cace93e7510" +source = "git+https://github.com/crypto-com/tendermint-rs.git?rev=db982c2437fe72c7a03942fc2bddf490f2332364#db982c2437fe72c7a03942fc2bddf490f2332364" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3031,7 +3031,7 @@ dependencies = [ "signature 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)", "subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "subtle-encoding 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tendermint 0.10.0 (git+https://github.com/crypto-com/tendermint-rs.git?rev=a32cec297d80d240781c9ca2aaa71cace93e7510)", + "tendermint 0.10.0 (git+https://github.com/crypto-com/tendermint-rs.git?rev=db982c2437fe72c7a03942fc2bddf490f2332364)", ] [[package]] @@ -4028,7 +4028,7 @@ dependencies = [ "checksum synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" "checksum tai64 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4014289c3d2b8168880ae86633247e73712fcc579969aff0ca7c5dcd17456b82" "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" -"checksum tendermint 0.10.0 (git+https://github.com/crypto-com/tendermint-rs.git?rev=a32cec297d80d240781c9ca2aaa71cace93e7510)" = "" +"checksum tendermint 0.10.0 (git+https://github.com/crypto-com/tendermint-rs.git?rev=db982c2437fe72c7a03942fc2bddf490f2332364)" = "" "checksum termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "96d6098003bde162e4277c70665bd87c326f5a0c3f3fbfb285787fa482d54e6e" "checksum termion 1.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "818ef3700c2a7b447dca1a1dd28341fe635e6ee103c806c636bb9c929991b2cd" "checksum termios 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "72b620c5ea021d75a735c943269bb07d30c9b77d6ac6b236bc8b5c496ef05625" diff --git a/client-common/Cargo.toml b/client-common/Cargo.toml index 6337af31e..eccd2554a 100644 --- a/client-common/Cargo.toml +++ b/client-common/Cargo.toml @@ -23,7 +23,7 @@ jsonrpc = { version = "0.11", optional = true } serde_json = { version = "1.0", optional = true } parity-scale-codec = { features = ["derive"], version = "1.1" } websocket = { version = "0.24", default-features = false, features = ["sync"], optional = true } -tendermint = { git = "https://github.com/crypto-com/tendermint-rs.git", default-features = false, rev = "a32cec297d80d240781c9ca2aaa71cace93e7510" } +tendermint = { git = "https://github.com/crypto-com/tendermint-rs.git", default-features = false, rev = "db982c2437fe72c7a03942fc2bddf490f2332364" } itertools = "0.8" [features] diff --git a/client-core/Cargo.toml b/client-core/Cargo.toml index a90831082..2164616be 100644 --- a/client-core/Cargo.toml +++ b/client-core/Cargo.toml @@ -37,7 +37,7 @@ tiny-bip39 = { version = "0.6", default-features = false } unicase = "2.6.0" lazy_static = "1.4.0" ring = "0.16.9" -tendermint = { git = "https://github.com/crypto-com/tendermint-rs.git", default-features = false, rev = "a32cec297d80d240781c9ca2aaa71cace93e7510" } +tendermint = { git = "https://github.com/crypto-com/tendermint-rs.git", default-features = false, rev = "db982c2437fe72c7a03942fc2bddf490f2332364" } thiserror = { version = "1.0", default-features = false } non-empty-vec = "0.1" zxcvbn = "2.0" diff --git a/client-network/Cargo.toml b/client-network/Cargo.toml index 6c08deed3..0418369fd 100644 --- a/client-network/Cargo.toml +++ b/client-network/Cargo.toml @@ -17,7 +17,7 @@ chrono = { version = "0.4", features = ["serde"] } parity-scale-codec = { features = ["derive"], version = "1.1" } hex = "0.4.0" secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", rev = "0125097a7bf6f939db0ce52e49803c5e0312bf5e", features = ["recovery"] } -tendermint = { git = "https://github.com/crypto-com/tendermint-rs.git", default-features = false, rev = "a32cec297d80d240781c9ca2aaa71cace93e7510" } +tendermint = { git = "https://github.com/crypto-com/tendermint-rs.git", default-features = false, rev = "db982c2437fe72c7a03942fc2bddf490f2332364" } [dev-dependencies] secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", rev = "0125097a7bf6f939db0ce52e49803c5e0312bf5e", features = ["serde", "zeroize", "rand", "recovery", "endomorphism"] } diff --git a/test-common/Cargo.toml b/test-common/Cargo.toml index 3211d950a..98c5590e4 100644 --- a/test-common/Cargo.toml +++ b/test-common/Cargo.toml @@ -22,7 +22,7 @@ parity-scale-codec = { features = ["derive"], version = "1.1" } base64 = "0.11" hex = "0.4" -tendermint = { git = "https://github.com/crypto-com/tendermint-rs.git", default-features = false, rev = "a32cec297d80d240781c9ca2aaa71cace93e7510" } +tendermint = { git = "https://github.com/crypto-com/tendermint-rs.git", default-features = false, rev = "db982c2437fe72c7a03942fc2bddf490f2332364" } chain-core = { path = "../chain-core" } chain-abci = { path = "../chain-abci" } client-common = { path = "../client-common" } diff --git a/test-common/src/block_generator.rs b/test-common/src/block_generator.rs index 32b6349cc..f61d54b01 100644 --- a/test-common/src/block_generator.rs +++ b/test-common/src/block_generator.rs @@ -156,7 +156,7 @@ impl Node { vote_type: vote::Type::Precommit, height: header.height, round: 0, - block_id, + block_id: Some(block_id), timestamp: now, validator_address: self.validator_address(), validator_index: self.index,