Bump prost, tonic to pick up protoc fix (#26854)

* Bump prost and tonic crates

* Regenerate google protobufs

* Build protoc from source
This commit is contained in:
Tyera Eulberg 2022-08-02 15:37:28 -07:00 committed by GitHub
parent f3b760dd91
commit b15be0360b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 1194 additions and 1111 deletions

80
Cargo.lock generated
View File

@ -265,6 +265,15 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
[[package]]
name = "autotools"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8138adefca3e5d2e73bfba83bd6eeaf904b26a7ac1b4a19892cfe16cc7e1701"
dependencies = [
"cc",
]
[[package]]
name = "axum"
version = "0.5.1"
@ -829,15 +838,6 @@ dependencies = [
"syn 1.0.98",
]
[[package]]
name = "cmake"
version = "0.1.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7b858541263efe664aead4a5209a4ae5c5d2811167d4ed4ee0944503f8d2089"
dependencies = [
"cc",
]
[[package]]
name = "combine"
version = "3.8.1"
@ -3439,12 +3439,12 @@ dependencies = [
[[package]]
name = "prost"
version = "0.10.4"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71adf41db68aa0daaefc69bb30bcd68ded9b9abaad5d1fbb6304c4fb390e083e"
checksum = "399c3c31cdec40583bb68f0b18403400d01ec4289c383aa047560439952c4dd7"
dependencies = [
"bytes",
"prost-derive 0.10.0",
"prost-derive 0.11.0",
]
[[package]]
@ -3469,21 +3469,19 @@ dependencies = [
[[package]]
name = "prost-build"
version = "0.10.0"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "328f9f29b82409216decb172d81e936415d21245befa79cd34c3f29d87d1c50b"
checksum = "d49d928704208aba2cb1fb022ce1a319bdedcb03caf51ddf82734fa903407762"
dependencies = [
"bytes",
"cfg-if 1.0.0",
"cmake",
"heck 0.4.0",
"itertools",
"lazy_static",
"log",
"multimap",
"petgraph",
"prost 0.10.4",
"prost-types 0.10.0",
"prost 0.11.0",
"prost-types 0.11.0",
"regex",
"tempfile",
"which",
@ -3504,9 +3502,9 @@ dependencies = [
[[package]]
name = "prost-derive"
version = "0.10.0"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df35198f0777b75e9ff669737c6da5136b59dba33cf5a010a6d1cc4d56defc6f"
checksum = "7345d5f0e08c0536d7ac7229952590239e77abf0a0100a1b1d890add6ea96364"
dependencies = [
"anyhow",
"itertools",
@ -3527,12 +3525,21 @@ dependencies = [
[[package]]
name = "prost-types"
version = "0.10.0"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "926681c118ae6e512a3ccefd4abbe5521a14f4cc1e207356d4d00c0b7f2006fd"
checksum = "d30bc806a29b347314be074ff0608ef8e547286e8ea68b061a2fe55689edc01f"
dependencies = [
"bytes",
"prost 0.10.4",
"prost 0.11.0",
]
[[package]]
name = "protobuf-src"
version = "1.0.5+3.19.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe57f68bf9767f48f8cbcbceb5da21524e2b1330a821c1c2502c447d8043f078"
dependencies = [
"autotools",
]
[[package]]
@ -5450,7 +5457,7 @@ dependencies = [
"matches",
"num_cpus",
"num_enum",
"prost 0.10.4",
"prost 0.11.0",
"rand 0.7.3",
"rand_chacha 0.2.2",
"rayon",
@ -6241,8 +6248,8 @@ dependencies = [
"hyper-proxy",
"log",
"openssl",
"prost 0.10.4",
"prost-types 0.10.0",
"prost 0.11.0",
"prost-types 0.11.0",
"serde",
"serde_derive",
"smpl_jwt",
@ -6252,7 +6259,7 @@ dependencies = [
"solana-transaction-status",
"thiserror",
"tokio",
"tonic 0.7.2",
"tonic 0.8.0",
"zstd",
]
@ -6263,12 +6270,13 @@ dependencies = [
"bincode",
"bs58",
"enum-iterator",
"prost 0.10.4",
"prost 0.11.0",
"protobuf-src",
"serde",
"solana-account-decoder",
"solana-sdk 1.11.5",
"solana-transaction-status",
"tonic-build 0.7.2",
"tonic-build 0.8.0",
]
[[package]]
@ -7288,9 +7296,9 @@ dependencies = [
[[package]]
name = "tonic"
version = "0.7.2"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5be9d60db39854b30b835107500cf0aca0b0d14d6e1c3de124217c23a29c2ddb"
checksum = "498f271adc46acce75d66f639e4d35b31b2394c295c82496727dafa16d465dd2"
dependencies = [
"async-stream",
"async-trait",
@ -7306,8 +7314,8 @@ dependencies = [
"hyper-timeout",
"percent-encoding 2.1.0",
"pin-project",
"prost 0.10.4",
"prost-derive 0.10.0",
"prost 0.11.0",
"prost-derive 0.11.0",
"rustls-pemfile 1.0.0",
"tokio",
"tokio-rustls 0.23.3",
@ -7334,13 +7342,13 @@ dependencies = [
[[package]]
name = "tonic-build"
version = "0.7.2"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9263bf4c9bfaae7317c1c2faf7f18491d2fe476f70c414b73bf5d445b00ffa1"
checksum = "2fbcd2800e34e743b9ae795867d5f77b535d3a3be69fd731e39145719752df8c"
dependencies = [
"prettyplease",
"proc-macro2 1.0.41",
"prost-build 0.10.0",
"prost-build 0.11.0",
"quote 1.0.18",
"syn 1.0.98",
]

View File

@ -26,7 +26,7 @@ log = { version = "0.4.17" }
lru = "0.7.7"
num_cpus = "1.13.1"
num_enum = "0.5.7"
prost = "0.10.4"
prost = "0.11.0"
rand = "0.7.0"
rand_chacha = "0.2.2"
rayon = "1.5.3"

View File

@ -251,6 +251,15 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
[[package]]
name = "autotools"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8138adefca3e5d2e73bfba83bd6eeaf904b26a7ac1b4a19892cfe16cc7e1701"
dependencies = [
"cc",
]
[[package]]
name = "axum"
version = "0.5.3"
@ -716,15 +725,6 @@ dependencies = [
"textwrap 0.15.0",
]
[[package]]
name = "cmake"
version = "0.1.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7b858541263efe664aead4a5209a4ae5c5d2811167d4ed4ee0944503f8d2089"
dependencies = [
"cc",
]
[[package]]
name = "combine"
version = "3.8.1"
@ -3107,12 +3107,12 @@ dependencies = [
[[package]]
name = "prost"
version = "0.10.4"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71adf41db68aa0daaefc69bb30bcd68ded9b9abaad5d1fbb6304c4fb390e083e"
checksum = "399c3c31cdec40583bb68f0b18403400d01ec4289c383aa047560439952c4dd7"
dependencies = [
"bytes",
"prost-derive 0.10.1",
"prost-derive 0.11.0",
]
[[package]]
@ -3137,21 +3137,19 @@ dependencies = [
[[package]]
name = "prost-build"
version = "0.10.1"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "120fbe7988713f39d780a58cf1a7ef0d7ef66c6d87e5aa3438940c05357929f4"
checksum = "d49d928704208aba2cb1fb022ce1a319bdedcb03caf51ddf82734fa903407762"
dependencies = [
"bytes",
"cfg-if 1.0.0",
"cmake",
"heck 0.4.0",
"itertools",
"lazy_static",
"log",
"multimap",
"petgraph",
"prost 0.10.4",
"prost-types 0.10.1",
"prost 0.11.0",
"prost-types 0.11.0",
"regex",
"tempfile",
"which",
@ -3172,9 +3170,9 @@ dependencies = [
[[package]]
name = "prost-derive"
version = "0.10.1"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b670f45da57fb8542ebdbb6105a925fe571b67f9e7ed9f47a06a84e72b4e7cc"
checksum = "7345d5f0e08c0536d7ac7229952590239e77abf0a0100a1b1d890add6ea96364"
dependencies = [
"anyhow",
"itertools",
@ -3195,12 +3193,21 @@ dependencies = [
[[package]]
name = "prost-types"
version = "0.10.1"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d0a014229361011dc8e69c8a1ec6c2e8d0f2af7c91e3ea3f5b2170298461e68"
checksum = "d30bc806a29b347314be074ff0608ef8e547286e8ea68b061a2fe55689edc01f"
dependencies = [
"bytes",
"prost 0.10.4",
"prost 0.11.0",
]
[[package]]
name = "protobuf-src"
version = "1.0.5+3.19.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe57f68bf9767f48f8cbcbceb5da21524e2b1330a821c1c2502c447d8043f078"
dependencies = [
"autotools",
]
[[package]]
@ -4938,7 +4945,7 @@ dependencies = [
"lru",
"num_cpus",
"num_enum",
"prost 0.10.4",
"prost 0.11.0",
"rand 0.7.3",
"rand_chacha 0.2.2",
"rayon",
@ -5528,8 +5535,8 @@ dependencies = [
"hyper-proxy",
"log",
"openssl",
"prost 0.10.4",
"prost-types 0.10.1",
"prost 0.11.0",
"prost-types 0.11.0",
"serde",
"serde_derive",
"smpl_jwt",
@ -5539,7 +5546,7 @@ dependencies = [
"solana-transaction-status",
"thiserror",
"tokio",
"tonic 0.7.2",
"tonic 0.8.0",
"zstd",
]
@ -5549,12 +5556,13 @@ version = "1.11.5"
dependencies = [
"bincode",
"bs58",
"prost 0.10.4",
"prost 0.11.0",
"protobuf-src",
"serde",
"solana-account-decoder",
"solana-sdk 1.11.5",
"solana-transaction-status",
"tonic-build 0.7.2",
"tonic-build 0.8.0",
]
[[package]]
@ -6424,9 +6432,9 @@ dependencies = [
[[package]]
name = "tonic"
version = "0.7.2"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5be9d60db39854b30b835107500cf0aca0b0d14d6e1c3de124217c23a29c2ddb"
checksum = "498f271adc46acce75d66f639e4d35b31b2394c295c82496727dafa16d465dd2"
dependencies = [
"async-stream",
"async-trait",
@ -6442,8 +6450,8 @@ dependencies = [
"hyper-timeout",
"percent-encoding 2.1.0",
"pin-project",
"prost 0.10.4",
"prost-derive 0.10.1",
"prost 0.11.0",
"prost-derive 0.11.0",
"rustls-pemfile 1.0.0",
"tokio",
"tokio-rustls 0.23.2",
@ -6470,13 +6478,13 @@ dependencies = [
[[package]]
name = "tonic-build"
version = "0.7.2"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9263bf4c9bfaae7317c1c2faf7f18491d2fe476f70c414b73bf5d445b00ffa1"
checksum = "2fbcd2800e34e743b9ae795867d5f77b535d3a3be69fd731e39145719752df8c"
dependencies = [
"prettyplease",
"proc-macro2 1.0.41",
"prost-build 0.10.1",
"prost-build 0.11.0",
"quote 1.0.18",
"syn 1.0.98",
]

View File

@ -22,8 +22,8 @@ http = "0.2.8"
hyper = "0.14.20"
hyper-proxy = "0.9.1"
log = "0.4.17"
prost = "0.10.4"
prost-types = "0.10.0"
prost = "0.11.0"
prost-types = "0.11.0"
serde = "1.0.138"
serde_derive = "1.0.103"
smpl_jwt = "0.7.1"
@ -33,7 +33,7 @@ solana-storage-proto = { path = "../storage-proto", version = "=1.11.5" }
solana-transaction-status = { path = "../transaction-status", version = "=1.11.5" }
thiserror = "1.0"
tokio = "~1.14.1"
tonic = { version = "0.7.2", features = ["tls", "transport"] }
tonic = { version = "0.8.0", features = ["tls", "transport"] }
zstd = "0.11.2"
# openssl is a dependency of the goauth and smpl_jwt crates, but explicitly

View File

@ -14,6 +14,15 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
[[package]]
name = "autotools"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8138adefca3e5d2e73bfba83bd6eeaf904b26a7ac1b4a19892cfe16cc7e1701"
dependencies = [
"cc",
]
[[package]]
name = "bitflags"
version = "1.2.1"
@ -38,15 +47,6 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "cmake"
version = "0.1.48"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8ad8cef104ac57b68b89df3208164d228503abbdce70f6880ffa3d970e7443a"
dependencies = [
"cc",
]
[[package]]
name = "either"
version = "1.7.0"
@ -166,9 +166,9 @@ dependencies = [
[[package]]
name = "prost"
version = "0.10.4"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71adf41db68aa0daaefc69bb30bcd68ded9b9abaad5d1fbb6304c4fb390e083e"
checksum = "399c3c31cdec40583bb68f0b18403400d01ec4289c383aa047560439952c4dd7"
dependencies = [
"bytes",
"prost-derive",
@ -176,13 +176,11 @@ dependencies = [
[[package]]
name = "prost-build"
version = "0.10.0"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "328f9f29b82409216decb172d81e936415d21245befa79cd34c3f29d87d1c50b"
checksum = "d49d928704208aba2cb1fb022ce1a319bdedcb03caf51ddf82734fa903407762"
dependencies = [
"bytes",
"cfg-if",
"cmake",
"heck",
"itertools",
"lazy_static",
@ -198,9 +196,9 @@ dependencies = [
[[package]]
name = "prost-derive"
version = "0.10.0"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df35198f0777b75e9ff669737c6da5136b59dba33cf5a010a6d1cc4d56defc6f"
checksum = "7345d5f0e08c0536d7ac7229952590239e77abf0a0100a1b1d890add6ea96364"
dependencies = [
"anyhow",
"itertools",
@ -211,9 +209,9 @@ dependencies = [
[[package]]
name = "prost-types"
version = "0.10.0"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "926681c118ae6e512a3ccefd4abbe5521a14f4cc1e207356d4d00c0b7f2006fd"
checksum = "d30bc806a29b347314be074ff0608ef8e547286e8ea68b061a2fe55689edc01f"
dependencies = [
"bytes",
"prost",
@ -223,9 +221,19 @@ dependencies = [
name = "proto"
version = "1.11.5"
dependencies = [
"protobuf-src",
"tonic-build",
]
[[package]]
name = "protobuf-src"
version = "1.0.5+3.19.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe57f68bf9767f48f8cbcbceb5da21524e2b1330a821c1c2502c447d8043f078"
dependencies = [
"autotools",
]
[[package]]
name = "quote"
version = "1.0.7"
@ -315,9 +323,9 @@ dependencies = [
[[package]]
name = "tonic-build"
version = "0.7.2"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9263bf4c9bfaae7317c1c2faf7f18491d2fe476f70c414b73bf5d445b00ffa1"
checksum = "2fbcd2800e34e743b9ae795867d5f77b535d3a3be69fd731e39145719752df8c"
dependencies = [
"prettyplease",
"proc-macro2",

View File

@ -12,4 +12,5 @@ version = "1.11.5"
[workspace]
[dependencies]
tonic-build = "0.7.0"
protobuf-src = "1.0.5"
tonic-build = "0.8.0"

View File

@ -1,4 +1,9 @@
fn main() -> Result<(), std::io::Error> {
const PROTOC_ENVAR: &str = "PROTOC";
if std::env::var(PROTOC_ENVAR).is_err() {
std::env::set_var(PROTOC_ENVAR, protobuf_src::protoc());
}
let manifest_dir = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"));
let out_dir = manifest_dir.join("../proto");

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@

View File

@ -1,22 +1,22 @@
/// The `Status` type defines a logical error model that is suitable for
/// different programming environments, including REST APIs and RPC APIs. It is
/// used by \[gRPC\](<https://github.com/grpc>). Each `Status` message contains
/// three pieces of data: error code, error message, and error details.
/// The `Status` type defines a logical error model that is suitable for
/// different programming environments, including REST APIs and RPC APIs. It is
/// used by \[gRPC\](<https://github.com/grpc>). Each `Status` message contains
/// three pieces of data: error code, error message, and error details.
///
/// You can find out more about this error model and how to work with it in the
/// [API Design Guide](<https://cloud.google.com/apis/design/errors>).
/// You can find out more about this error model and how to work with it in the
/// [API Design Guide](<https://cloud.google.com/apis/design/errors>).
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Status {
/// The status code, which should be an enum value of \[google.rpc.Code][google.rpc.Code\].
/// The status code, which should be an enum value of \[google.rpc.Code][google.rpc.Code\].
#[prost(int32, tag="1")]
pub code: i32,
/// A developer-facing error message, which should be in English. Any
/// user-facing error message should be localized and sent in the
/// \[google.rpc.Status.details][google.rpc.Status.details\] field, or localized by the client.
/// A developer-facing error message, which should be in English. Any
/// user-facing error message should be localized and sent in the
/// \[google.rpc.Status.details][google.rpc.Status.details\] field, or localized by the client.
#[prost(string, tag="2")]
pub message: ::prost::alloc::string::String,
/// A list of messages that carry the error details. There is a common set of
/// message types for APIs to use.
/// A list of messages that carry the error details. There is a common set of
/// message types for APIs to use.
#[prost(message, repeated, tag="3")]
pub details: ::prost::alloc::vec::Vec<::prost_types::Any>,
}

View File

@ -12,7 +12,7 @@ edition = "2021"
[dependencies]
bincode = "1.3.3"
bs58 = "0.4.0"
prost = "0.10.4"
prost = "0.11.0"
serde = "1.0.138"
solana-account-decoder = { path = "../account-decoder", version = "=1.11.5" }
solana-sdk = { path = "../sdk", version = "=1.11.5" }
@ -29,4 +29,5 @@ name = "solana_storage_proto"
targets = ["x86_64-unknown-linux-gnu"]
[build-dependencies]
tonic-build = "0.7.2"
protobuf-src = "1.0.5"
tonic-build = "0.8.0"

View File

@ -1,4 +1,9 @@
fn main() -> Result<(), std::io::Error> {
const PROTOC_ENVAR: &str = "PROTOC";
if std::env::var(PROTOC_ENVAR).is_err() {
std::env::set_var(PROTOC_ENVAR, protobuf_src::protoc());
}
let proto_base_path = std::path::PathBuf::from("proto");
let proto_files = ["confirmed_block.proto", "transaction_by_addr.proto"];
let mut protos = Vec::new();