Skip to content
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

prost 0.11 and trait client #13

Draft
wants to merge 9 commits into
base: ledger-main
Choose a base branch
from
2 changes: 1 addition & 1 deletion abci/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ binary = [

[dependencies]
bytes = { version = "1.0", default-features = false }
prost = { version = "0.9", default-features = false }
prost = { version = "0.11", default-features = false }
tendermint-proto = { version = "0.23.6", default-features = false, path = "../proto" }
tracing = { version = "0.1", default-features = false }
flex-error = { version = "0.4.4", default-features = false }
Expand Down
22 changes: 21 additions & 1 deletion config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,27 @@ pub struct ConsensusConfig {
/// Reactor query sleep duration
pub peer_query_maj23_sleep_duration: Timeout,

/// Commit timeout
/// How long we wait for a proposal block before prevoting nil
pub timeout_propose: Timeout,

/// How much timeout_propose increases with each round
pub timeout_propose_delta: Timeout,

/// How long we wait after receiving +2/3 prevotes for “anything” (ie. not a single block or nil)
pub timeout_prevote: Timeout,

/// How much the timeout_prevote increases with each round
pub timeout_prevote_delta: Timeout,

/// How long we wait after receiving +2/3 precommits for “anything” (ie. not a single block or nil)
pub timeout_precommit: Timeout,

/// How much the timeout_precommit increases with each round
pub timeout_precommit_delta: Timeout,

/// How long we wait after committing a block, before starting on the new
/// height (this gives us a chance to receive some more precommits, even
/// though we already have +2/3).
pub timeout_commit: Timeout,
}

Expand Down
4 changes: 2 additions & 2 deletions p2p/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ eyre = { version = "0.6", default-features = false }
flume = { version = "0.10.7", default-features = false }
hkdf = { version = "0.10.0", default-features = false }
merlin = { version = "2", default-features = false }
prost = { version = "0.9", default-features = false }
prost = { version = "0.11", default-features = false }
rand_core = { version = "0.5", default-features = false, features = ["std"] }
sha2 = { version = "0.9", default-features = false }
subtle = { version = "2", default-features = false }
Expand All @@ -49,4 +49,4 @@ tendermint-proto = { path = "../proto", version = "0.23.6", default-features = f
tendermint-std-ext = { path = "../std-ext", version = "0.23.6", default-features = false }

# optional dependencies
prost-derive = { version = "0.9", optional = true }
prost-derive = { version = "0.11", optional = true }
4 changes: 2 additions & 2 deletions proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ description = """
all-features = true

[dependencies]
prost = { version = "0.9", default-features = false }
prost-types = { version = "0.9", default-features = false }
prost = { version = "0.11", default-features = false }
prost-types = { version = "0.11", default-features = false }
bytes = { version = "1.0", default-features = false }
serde = { version = "1.0", default-features = false, features = ["derive"] }
serde_bytes = { version = "0.11", default-features = false, features = ["alloc"] }
Expand Down
15 changes: 13 additions & 2 deletions rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,18 @@ path = "src/client/bin/main.rs"
required-features = [ "cli" ]

[features]
default = ["flex-error/std", "flex-error/eyre_tracer"]
default = [
"flex-error/std",
"flex-error/eyre_tracer",
"tokio/rt-multi-thread"
]
trait-client = [
"async-trait",
"futures",
"tracing",
"tokio/time",
"tokio/macros"
]
cli = [
"http-client",
"structopt",
Expand Down Expand Up @@ -88,7 +99,7 @@ hyper = { version = "0.14", optional = true, default-features = false, features
hyper-proxy = { version = "0.9.1", optional = true, default-features = false, features = ["rustls"] }
hyper-rustls = { version = "0.22.1", optional = true, default-features = false, features = ["rustls-native-certs", "webpki-roots", "tokio-runtime"] }
structopt = { version = "0.3", optional = true, default-features = false }
tokio = { version = "1.0", optional = true, default-features = false, features = ["rt-multi-thread"] }
tokio = { version = "1.0", optional = true, default-features = false, features = ["sync"] }
tracing = { version = "0.1", optional = true, default-features = false }
tracing-subscriber = { version = "0.2", optional = true, default-features = false, features = ["fmt"] }

Expand Down
4 changes: 2 additions & 2 deletions rpc/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ type HyperError = flex_error::DisplayOnly<hyper::Error>;
#[cfg(not(feature = "hyper"))]
type HyperError = flex_error::NoSource;

#[cfg(feature = "tokio")]
#[cfg(feature = "tokio/rt")]
type JoinError = flex_error::DisplayOnly<tokio::task::JoinError>;

#[cfg(not(feature = "tokio"))]
#[cfg(not(feature = "tokio/rt"))]
type JoinError = flex_error::NoSource;

#[cfg(feature = "async-tungstenite")]
Expand Down
4 changes: 2 additions & 2 deletions rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ extern crate std;

mod prelude;

#[cfg(any(feature = "http-client", feature = "websocket-client"))]
#[cfg(any(feature = "trait-client", feature = "http-client", feature = "websocket-client"))]
mod client;
#[cfg(any(feature = "http-client", feature = "websocket-client"))]
#[cfg(any(feature = "trait-client", feature = "http-client", feature = "websocket-client"))]
pub use client::{
Client, MockClient, MockRequestMatcher, MockRequestMethodMatcher, Subscription,
SubscriptionClient,
Expand Down
4 changes: 2 additions & 2 deletions tendermint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ ed25519-dalek = { version = "1", default-features = false, features = ["u64_back
futures = { version = "0.3", default-features = false }
num-traits = { version = "0.2", default-features = false }
once_cell = { version = "1.3", default-features = false }
prost = { version = "0.9", default-features = false }
prost-types = { version = "0.9", default-features = false }
prost = { version = "0.11", default-features = false }
prost-types = { version = "0.11", default-features = false }
serde = { version = "1", default-features = false, features = ["derive"] }
serde_json = { version = "1", default-features = false, features = ["alloc"] }
serde_bytes = { version = "0.11", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion tools/proto-compiler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ publish = false

[dependencies]
walkdir = { version = "2.3" }
prost-build = { version = "0.9" }
prost-build = { version = "0.11" }
git2 = { version = "0.13" }
tempfile = { version = "3.2.0" }
subtle-encoding = { version = "0.5" }