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");

View File

@ -404,6 +404,24 @@ pub enum FieldBehavior {
/// non-empty value to expect.
NonEmptyDefault = 7,
}
impl FieldBehavior {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
FieldBehavior::Unspecified => "FIELD_BEHAVIOR_UNSPECIFIED",
FieldBehavior::Optional => "OPTIONAL",
FieldBehavior::Required => "REQUIRED",
FieldBehavior::OutputOnly => "OUTPUT_ONLY",
FieldBehavior::InputOnly => "INPUT_ONLY",
FieldBehavior::Immutable => "IMMUTABLE",
FieldBehavior::UnorderedList => "UNORDERED_LIST",
FieldBehavior::NonEmptyDefault => "NON_EMPTY_DEFAULT",
}
}
}
/// A simple descriptor of a resource type.
///
/// ResourceDescriptor annotates a resource message (either by means of a
@ -606,6 +624,19 @@ pub mod resource_descriptor {
/// that from being necessary once there are multiple patterns.)
FutureMultiPattern = 2,
}
impl History {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
History::Unspecified => "HISTORY_UNSPECIFIED",
History::OriginallySinglePattern => "ORIGINALLY_SINGLE_PATTERN",
History::FutureMultiPattern => "FUTURE_MULTI_PATTERN",
}
}
}
/// A flag representing a specific style that a resource claims to conform to.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
@ -622,6 +653,18 @@ pub mod resource_descriptor {
/// additional checks.
DeclarativeFriendly = 1,
}
impl Style {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Style::Unspecified => "STYLE_UNSPECIFIED",
Style::DeclarativeFriendly => "DECLARATIVE_FRIENDLY",
}
}
}
}
/// Defines a proto annotation that describes a string field that refers to
/// an API resource.

View File

@ -1,6 +1,6 @@
/// Specifies the complete (requested) contents of a single row of a table.
/// Rows which exceed 256MiB in size cannot be read in full.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Row {
/// The unique key which identifies this row within its table. This is the same
/// key that's used to identify the row in, for example, a MutateRowRequest.
@ -14,7 +14,7 @@ pub struct Row {
}
/// Specifies (some of) the contents of a single row/column family intersection
/// of a table.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Family {
/// The unique key which identifies this family within its row. This is the
/// same key that's used to identify the family in, for example, a RowFilter
@ -30,7 +30,7 @@ pub struct Family {
}
/// Specifies (some of) the contents of a single row/column intersection of a
/// table.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Column {
/// The unique key which identifies this column within its family. This is the
/// same key that's used to identify the column in, for example, a RowFilter
@ -44,7 +44,7 @@ pub struct Column {
pub cells: ::prost::alloc::vec::Vec<Cell>,
}
/// Specifies (some of) the contents of a single row/column/timestamp of a table.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Cell {
/// The cell's stored timestamp, which also uniquely identifies it within
/// its column.
@ -64,7 +64,7 @@ pub struct Cell {
pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Specifies a contiguous range of rows.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RowRange {
/// The row key at which to start the range.
/// If neither field is set, interpreted as the empty string, inclusive.
@ -79,7 +79,7 @@ pub struct RowRange {
pub mod row_range {
/// The row key at which to start the range.
/// If neither field is set, interpreted as the empty string, inclusive.
#[derive(Clone, PartialEq, Eq, ::prost::Oneof)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum StartKey {
/// Used when giving an inclusive lower bound for the range.
#[prost(bytes, tag="1")]
@ -90,7 +90,7 @@ pub mod row_range {
}
/// The row key at which to end the range.
/// If neither field is set, interpreted as the infinite row key, exclusive.
#[derive(Clone, PartialEq, Eq, ::prost::Oneof)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum EndKey {
/// Used when giving an exclusive upper bound for the range.
#[prost(bytes, tag="3")]
@ -101,7 +101,7 @@ pub mod row_range {
}
}
/// Specifies a non-contiguous set of rows.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RowSet {
/// Single rows included in the set.
#[prost(bytes="vec", repeated, tag="1")]
@ -114,7 +114,7 @@ pub struct RowSet {
/// The range spans from &lt;column_family&gt;:&lt;start_qualifier&gt; to
/// &lt;column_family&gt;:&lt;end_qualifier&gt;, where both bounds can be either
/// inclusive or exclusive.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ColumnRange {
/// The name of the column family within which this range falls.
#[prost(string, tag="1")]
@ -132,7 +132,7 @@ pub struct ColumnRange {
pub mod column_range {
/// The column qualifier at which to start the range (within `column_family`).
/// If neither field is set, interpreted as the empty string, inclusive.
#[derive(Clone, PartialEq, Eq, ::prost::Oneof)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum StartQualifier {
/// Used when giving an inclusive lower bound for the range.
#[prost(bytes, tag="2")]
@ -143,7 +143,7 @@ pub mod column_range {
}
/// The column qualifier at which to end the range (within `column_family`).
/// If neither field is set, interpreted as the infinite string, exclusive.
#[derive(Clone, PartialEq, Eq, ::prost::Oneof)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum EndQualifier {
/// Used when giving an inclusive upper bound for the range.
#[prost(bytes, tag="4")]
@ -154,7 +154,7 @@ pub mod column_range {
}
}
/// Specified a contiguous range of microsecond timestamps.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimestampRange {
/// Inclusive lower bound. If left empty, interpreted as 0.
#[prost(int64, tag="1")]
@ -164,7 +164,7 @@ pub struct TimestampRange {
pub end_timestamp_micros: i64,
}
/// Specifies a contiguous range of raw byte values.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValueRange {
/// The value at which to start the range.
/// If neither field is set, interpreted as the empty string, inclusive.
@ -179,7 +179,7 @@ pub struct ValueRange {
pub mod value_range {
/// The value at which to start the range.
/// If neither field is set, interpreted as the empty string, inclusive.
#[derive(Clone, PartialEq, Eq, ::prost::Oneof)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum StartValue {
/// Used when giving an inclusive lower bound for the range.
#[prost(bytes, tag="1")]
@ -190,7 +190,7 @@ pub mod value_range {
}
/// The value at which to end the range.
/// If neither field is set, interpreted as the infinite string, exclusive.
#[derive(Clone, PartialEq, Eq, ::prost::Oneof)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum EndValue {
/// Used when giving an inclusive upper bound for the range.
#[prost(bytes, tag="3")]
@ -475,7 +475,7 @@ pub mod row_filter {
}
}
/// Specifies a particular change to be made to the contents of a row.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mutation {
/// Which of the possible Mutation types to apply.
#[prost(oneof="mutation::Mutation", tags="1, 2, 3, 4")]
@ -484,7 +484,7 @@ pub struct Mutation {
/// Nested message and enum types in `Mutation`.
pub mod mutation {
/// A Mutation which sets the value of the specified cell.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetCell {
/// The name of the family into which new data should be written.
/// Must match `\[-_.a-zA-Z0-9\]+`
@ -507,7 +507,7 @@ pub mod mutation {
}
/// A Mutation which deletes cells from the specified column, optionally
/// restricting the deletions to a given timestamp range.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteFromColumn {
/// The name of the family from which cells should be deleted.
/// Must match `\[-_.a-zA-Z0-9\]+`
@ -522,7 +522,7 @@ pub mod mutation {
pub time_range: ::core::option::Option<super::TimestampRange>,
}
/// A Mutation which deletes all cells from the specified column family.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteFromFamily {
/// The name of the family from which cells should be deleted.
/// Must match `\[-_.a-zA-Z0-9\]+`
@ -530,11 +530,11 @@ pub mod mutation {
pub family_name: ::prost::alloc::string::String,
}
/// A Mutation which deletes all cells from the containing row.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteFromRow {
}
/// Which of the possible Mutation types to apply.
#[derive(Clone, PartialEq, Eq, ::prost::Oneof)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Mutation {
/// Set a cell's value.
#[prost(message, tag="1")]
@ -552,7 +552,7 @@ pub mod mutation {
}
/// Specifies an atomic read/modify/write operation on the latest value of the
/// specified column.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadModifyWriteRule {
/// The name of the family to which the read/modify/write should be applied.
/// Must match `\[-_.a-zA-Z0-9\]+`
@ -572,7 +572,7 @@ pub struct ReadModifyWriteRule {
pub mod read_modify_write_rule {
/// The rule used to determine the column's new latest value from its current
/// latest value.
#[derive(Clone, PartialEq, Eq, ::prost::Oneof)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Rule {
/// Rule specifying that `append_value` be appended to the existing value.
/// If the targeted cell is unset, it will be treated as containing the
@ -612,7 +612,7 @@ pub struct ReadRowsRequest {
pub rows_limit: i64,
}
/// Response message for Bigtable.ReadRows.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadRowsResponse {
/// A collection of a row's contents as part of the read request.
#[prost(message, repeated, tag="1")]
@ -631,7 +631,7 @@ pub struct ReadRowsResponse {
pub mod read_rows_response {
/// Specifies a piece of a row's contents returned as part of the read
/// response stream.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CellChunk {
/// The row key for this chunk of data. If the row key is empty,
/// this CellChunk is a continuation of the same row as the previous
@ -689,7 +689,7 @@ pub mod read_rows_response {
/// Nested message and enum types in `CellChunk`.
pub mod cell_chunk {
/// Signals to the client concerning previous CellChunks received.
#[derive(Clone, PartialEq, Eq, ::prost::Oneof)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum RowStatus {
/// Indicates that the client should drop all previous chunks for
/// `row_key`, as it will be re-read from the beginning.
@ -703,7 +703,7 @@ pub mod read_rows_response {
}
}
/// Request message for Bigtable.SampleRowKeys.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SampleRowKeysRequest {
/// Required. The unique name of the table from which to sample row keys.
/// Values are of the form
@ -716,7 +716,7 @@ pub struct SampleRowKeysRequest {
pub app_profile_id: ::prost::alloc::string::String,
}
/// Response message for Bigtable.SampleRowKeys.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SampleRowKeysResponse {
/// Sorted streamed sequence of sample row keys in the table. The table might
/// have contents before the first row key in the list and after the last one,
@ -735,7 +735,7 @@ pub struct SampleRowKeysResponse {
pub offset_bytes: i64,
}
/// Request message for Bigtable.MutateRow.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateRowRequest {
/// Required. The unique name of the table to which the mutation should be applied.
/// Values are of the form
@ -756,11 +756,11 @@ pub struct MutateRowRequest {
pub mutations: ::prost::alloc::vec::Vec<Mutation>,
}
/// Response message for Bigtable.MutateRow.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateRowResponse {
}
/// Request message for BigtableService.MutateRows.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateRowsRequest {
/// Required. The unique name of the table to which the mutations should be applied.
#[prost(string, tag="1")]
@ -780,7 +780,7 @@ pub struct MutateRowsRequest {
/// Nested message and enum types in `MutateRowsRequest`.
pub mod mutate_rows_request {
/// A mutation for a given row.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Entry {
/// The key of the row to which the `mutations` should be applied.
#[prost(bytes="vec", tag="1")]
@ -855,7 +855,7 @@ pub struct CheckAndMutateRowRequest {
pub false_mutations: ::prost::alloc::vec::Vec<Mutation>,
}
/// Response message for Bigtable.CheckAndMutateRow.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckAndMutateRowResponse {
/// Whether or not the request's `predicate_filter` yielded any results for
/// the specified row.
@ -863,7 +863,7 @@ pub struct CheckAndMutateRowResponse {
pub predicate_matched: bool,
}
/// Request message for Bigtable.ReadModifyWriteRow.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadModifyWriteRowRequest {
/// Required. The unique name of the table to which the read/modify/write rules should be
/// applied.
@ -885,7 +885,7 @@ pub struct ReadModifyWriteRowRequest {
pub rules: ::prost::alloc::vec::Vec<ReadModifyWriteRule>,
}
/// Response message for Bigtable.ReadModifyWriteRow.
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadModifyWriteRowResponse {
/// A Row containing the new contents of all cells modified by the request.
#[prost(message, optional, tag="1")]
@ -895,6 +895,7 @@ pub struct ReadModifyWriteRowResponse {
pub mod bigtable_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Service for reading from and writing to existing Bigtable tables.
#[derive(Debug, Clone)]
pub struct BigtableClient<T> {
@ -922,6 +923,10 @@ pub mod bigtable_client {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
@ -941,19 +946,19 @@ pub mod bigtable_client {
{
BigtableClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with `gzip`.
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses with `gzip`.
/// Enable decompressing responses.
#[must_use]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Streams back the contents of all requested rows in key order, optionally

View File

@ -1 +0,0 @@

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();