Skip to content

Commit

Permalink
Update to prost 0.12 and tonic 0.10 (#1349)
Browse files Browse the repository at this point in the history
* Update to prost 0.12 and tonic 0.10

* proto: regenerate from latest versions

Use these version tags to generate protobuf bindings for
the supported CometBFT releases:
- v0.34.29
- v0.37.2
- v0.38.0-rc3
  • Loading branch information
mzabaluev authored Sep 22, 2023
1 parent 4d81b67 commit 89da5f6
Show file tree
Hide file tree
Showing 20 changed files with 176 additions and 79 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `[tendermint-proto]` Update dependencies to prost 0.12 and tonic 0.10
([\#1349](https://github.com/informalsystems/tendermint-rs/pull/1349))
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.11", default-features = false }
prost = { version = "0.12", default-features = false }
tendermint-proto = { version = "0.33.2", default-features = false, path = "../proto" }
tracing = { version = "0.1", default-features = false }
flex-error = { version = "0.4.4", default-features = false }
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.12.3", default-features = false }
merlin = { version = "2", default-features = false }
prost = { version = "0.11", default-features = false }
prost = { version = "0.12", default-features = false }
rand_core = { version = "0.5", default-features = false, features = ["std"] }
sha2 = { version = "0.10", default-features = false }
subtle = { version = "2", default-features = false }
Expand All @@ -49,4 +49,4 @@ tendermint-proto = { path = "../proto", version = "0.33.2", default-features = f
tendermint-std-ext = { path = "../std-ext", version = "0.33.2", default-features = false }

# optional dependencies
prost-derive = { version = "0.11", optional = true }
prost-derive = { version = "0.12", optional = true }
6 changes: 3 additions & 3 deletions proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ grpc-server = ["tonic"]
all-features = true

[dependencies]
prost = { version = "0.11", default-features = false }
prost-types = { version = "0.11", default-features = false }
prost = { version = "0.12", default-features = false }
prost-types = { version = "0.12", default-features = false }
bytes = { version = "1.0", default-features = false, features = ["serde"]}
serde = { version = "1.0", default-features = false, features = ["derive"] }
serde_bytes = { version = "0.11", default-features = false, features = ["alloc"] }
Expand All @@ -32,7 +32,7 @@ num-traits = { version = "0.2", default-features = false }
num-derive = { version = "0.3", default-features = false }
time = { version = "0.3", default-features = false, features = ["macros", "parsing"] }
flex-error = { version = "0.4.4", default-features = false }
tonic = { version = "0.9", optional = true }
tonic = { version = "0.10", optional = true }

[dev-dependencies]
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
59 changes: 44 additions & 15 deletions proto/src/prost/v0_34/tendermint.abci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,9 @@ pub mod abci_application_server {
request: tonic::Request<super::RequestEcho>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).echo(request).await };
let fut = async move {
<T as AbciApplication>::echo(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down Expand Up @@ -957,7 +959,9 @@ pub mod abci_application_server {
request: tonic::Request<super::RequestFlush>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).flush(request).await };
let fut = async move {
<T as AbciApplication>::flush(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down Expand Up @@ -1000,7 +1004,9 @@ pub mod abci_application_server {
request: tonic::Request<super::RequestInfo>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).info(request).await };
let fut = async move {
<T as AbciApplication>::info(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down Expand Up @@ -1044,7 +1050,9 @@ pub mod abci_application_server {
request: tonic::Request<super::RequestSetOption>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).set_option(request).await };
let fut = async move {
<T as AbciApplication>::set_option(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down Expand Up @@ -1088,7 +1096,9 @@ pub mod abci_application_server {
request: tonic::Request<super::RequestDeliverTx>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).deliver_tx(request).await };
let fut = async move {
<T as AbciApplication>::deliver_tx(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down Expand Up @@ -1132,7 +1142,9 @@ pub mod abci_application_server {
request: tonic::Request<super::RequestCheckTx>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).check_tx(request).await };
let fut = async move {
<T as AbciApplication>::check_tx(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down Expand Up @@ -1175,7 +1187,9 @@ pub mod abci_application_server {
request: tonic::Request<super::RequestQuery>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).query(request).await };
let fut = async move {
<T as AbciApplication>::query(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down Expand Up @@ -1219,7 +1233,9 @@ pub mod abci_application_server {
request: tonic::Request<super::RequestCommit>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).commit(request).await };
let fut = async move {
<T as AbciApplication>::commit(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down Expand Up @@ -1263,7 +1279,9 @@ pub mod abci_application_server {
request: tonic::Request<super::RequestInitChain>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).init_chain(request).await };
let fut = async move {
<T as AbciApplication>::init_chain(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down Expand Up @@ -1307,7 +1325,9 @@ pub mod abci_application_server {
request: tonic::Request<super::RequestBeginBlock>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).begin_block(request).await };
let fut = async move {
<T as AbciApplication>::begin_block(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down Expand Up @@ -1351,7 +1371,9 @@ pub mod abci_application_server {
request: tonic::Request<super::RequestEndBlock>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).end_block(request).await };
let fut = async move {
<T as AbciApplication>::end_block(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down Expand Up @@ -1396,7 +1418,8 @@ pub mod abci_application_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).list_snapshots(request).await
<T as AbciApplication>::list_snapshots(&inner, request)
.await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -1442,7 +1465,8 @@ pub mod abci_application_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).offer_snapshot(request).await
<T as AbciApplication>::offer_snapshot(&inner, request)
.await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -1488,7 +1512,8 @@ pub mod abci_application_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).load_snapshot_chunk(request).await
<T as AbciApplication>::load_snapshot_chunk(&inner, request)
.await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -1534,7 +1559,11 @@ pub mod abci_application_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).apply_snapshot_chunk(request).await
<T as AbciApplication>::apply_snapshot_chunk(
&inner,
request,
)
.await
};
Box::pin(fut)
}
Expand Down
6 changes: 4 additions & 2 deletions proto/src/prost/v0_34/tendermint.rpc.grpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ pub mod broadcast_api_server {
request: tonic::Request<super::RequestPing>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).ping(request).await };
let fut = async move {
<T as BroadcastApi>::ping(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down Expand Up @@ -177,7 +179,7 @@ pub mod broadcast_api_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).broadcast_tx(request).await
<T as BroadcastApi>::broadcast_tx(&inner, request).await
};
Box::pin(fut)
}
Expand Down
Loading

0 comments on commit 89da5f6

Please sign in to comment.