From 0e8cac3861123c2f2240ce39425e0e4df6e5464b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 19:20:46 +0000 Subject: [PATCH] build(deps): Bump tonic and prost related packages to 0.14 In particular, the packages are prost, prost-types, tonic, tonic-prost, and tonic-prost-build. Unfortunately, this also requires updating arrow to 57.x It doesn't seem possible to update any of these packages individually, they are all tightly dependent on each other, and attempts at individual updates cause compilation errors. --- Cargo.lock | 345 +++++------- Cargo.toml | 13 +- chain/ethereum/Cargo.toml | 2 +- chain/ethereum/build.rs | 2 +- .../src/protobuf/sf.ethereum.r#type.v2.rs | 110 ++-- chain/near/Cargo.toml | 2 +- chain/near/build.rs | 2 +- graph/Cargo.toml | 3 +- graph/build.rs | 2 +- graph/src/amp/schema/generator/entity.rs | 5 +- graph/src/firehose/endpoints.rs | 16 +- .../src/firehose/sf.ethereum.transform.v1.rs | 42 +- graph/src/firehose/sf.firehose.v2.rs | 521 +++++++++--------- graph/src/firehose/sf.near.transform.v1.rs | 3 +- 14 files changed, 511 insertions(+), 557 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 65a4bfdbeb0..ec154a01f1f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -443,9 +443,9 @@ dependencies = [ [[package]] name = "arrow" -version = "55.0.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3095aaf545942ff5abd46654534f15b03a90fba78299d661e045e5d587222f0d" +checksum = "4df8bb5b0bd64c0b9bc61317fcc480bad0f00e56d3bc32c69a4c8dada4786bae" dependencies = [ "arrow-arith", "arrow-array", @@ -464,23 +464,23 @@ dependencies = [ [[package]] name = "arrow-arith" -version = "55.2.0" +version = "57.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30feb679425110209ae35c3fbf82404a39a4c0436bb3ec36164d8bffed2a4ce4" +checksum = "288015089e7931843c80ed4032c5274f02b37bcb720c4a42096d50b390e70372" dependencies = [ "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", "chrono", - "num", + "num-traits", ] [[package]] name = "arrow-array" -version = "55.2.0" +version = "57.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70732f04d285d49054a48b72c54f791bb3424abae92d27aafdf776c98af161c8" +checksum = "65ca404ea6191e06bf30956394173337fa9c35f445bd447fe6c21ab944e1a23c" dependencies = [ "ahash", "arrow-buffer", @@ -488,30 +488,34 @@ dependencies = [ "arrow-schema", "chrono", "half", - "hashbrown 0.15.2", - "num", + "hashbrown 0.16.1", + "num-complex", + "num-integer", + "num-traits", ] [[package]] name = "arrow-buffer" -version = "55.2.0" +version = "57.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "169b1d5d6cb390dd92ce582b06b23815c7953e9dfaaea75556e89d890d19993d" +checksum = "36356383099be0151dacc4245309895f16ba7917d79bdb71a7148659c9206c56" dependencies = [ "bytes", "half", - "num", + "num-bigint 0.4.6", + "num-traits", ] [[package]] name = "arrow-cast" -version = "55.2.0" +version = "57.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4f12eccc3e1c05a766cafb31f6a60a46c2f8efec9b74c6e0648766d30686af8" +checksum = "9c8e372ed52bd4ee88cc1e6c3859aa7ecea204158ac640b10e187936e7e87074" dependencies = [ "arrow-array", "arrow-buffer", "arrow-data", + "arrow-ord", "arrow-schema", "arrow-select", "atoi", @@ -519,15 +523,15 @@ dependencies = [ "chrono", "half", "lexical-core", - "num", + "num-traits", "ryu", ] [[package]] name = "arrow-csv" -version = "55.2.0" +version = "57.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "012c9fef3f4a11573b2c74aec53712ff9fdae4a95f4ce452d1bbf088ee00f06b" +checksum = "8e4100b729fe656f2e4fb32bc5884f14acf9118d4ad532b7b33c1132e4dce896" dependencies = [ "arrow-array", "arrow-cast", @@ -540,21 +544,22 @@ dependencies = [ [[package]] name = "arrow-data" -version = "55.2.0" +version = "57.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de1ce212d803199684b658fc4ba55fb2d7e87b213de5af415308d2fee3619c2" +checksum = "bf87f4ff5fc13290aa47e499a8b669a82c5977c6a1fedce22c7f542c1fd5a597" dependencies = [ "arrow-buffer", "arrow-schema", "half", - "num", + "num-integer", + "num-traits", ] [[package]] name = "arrow-flight" -version = "55.0.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e0fad280f41a918d53ba48288a246ff04202d463b3b380fbc0edecdcb52cfd" +checksum = "f70bb56412a007b0cfc116d15f24dda6adeed9611a213852a004cda20085a3b9" dependencies = [ "arrow-arith", "arrow-array", @@ -575,26 +580,28 @@ dependencies = [ "prost", "prost-types", "tonic", + "tonic-prost", ] [[package]] name = "arrow-ipc" -version = "55.2.0" +version = "57.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9ea5967e8b2af39aff5d9de2197df16e305f47f404781d3230b2dc672da5d92" +checksum = "eb3ca63edd2073fcb42ba112f8ae165df1de935627ead6e203d07c99445f2081" dependencies = [ "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", + "arrow-select", "flatbuffers", ] [[package]] name = "arrow-json" -version = "55.2.0" +version = "57.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5709d974c4ea5be96d900c01576c7c0b99705f4a3eec343648cb1ca863988a9c" +checksum = "a36b2332559d3310ebe3e173f75b29989b4412df4029a26a30cc3f7da0869297" dependencies = [ "arrow-array", "arrow-buffer", @@ -604,19 +611,21 @@ dependencies = [ "chrono", "half", "indexmap 2.11.4", + "itoa", "lexical-core", "memchr", - "num", - "serde", + "num-traits", + "ryu", + "serde_core", "serde_json", "simdutf8", ] [[package]] name = "arrow-ord" -version = "55.2.0" +version = "57.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6506e3a059e3be23023f587f79c82ef0bcf6d293587e3272d20f2d30b969b5a7" +checksum = "13c4e0530272ca755d6814218dffd04425c5b7854b87fa741d5ff848bf50aa39" dependencies = [ "arrow-array", "arrow-buffer", @@ -627,9 +636,9 @@ dependencies = [ [[package]] name = "arrow-row" -version = "55.2.0" +version = "57.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52bf7393166beaf79b4bed9bfdf19e97472af32ce5b6b48169d321518a08cae2" +checksum = "b07f52788744cc71c4628567ad834cadbaeb9f09026ff1d7a4120f69edf7abd3" dependencies = [ "arrow-array", "arrow-buffer", @@ -640,29 +649,29 @@ dependencies = [ [[package]] name = "arrow-schema" -version = "55.2.0" +version = "57.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7686986a3bf2254c9fb130c623cdcb2f8e1f15763e7c71c310f0834da3d292" +checksum = "6bb63203e8e0e54b288d0d8043ca8fa1013820822a27692ef1b78a977d879f2c" [[package]] name = "arrow-select" -version = "55.2.0" +version = "57.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd2b45757d6a2373faa3352d02ff5b54b098f5e21dccebc45a21806bc34501e5" +checksum = "c96d8a1c180b44ecf2e66c9a2f2bbcb8b1b6f14e165ce46ac8bde211a363411b" dependencies = [ "ahash", "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", - "num", + "num-traits", ] [[package]] name = "arrow-string" -version = "55.2.0" +version = "57.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0377d532850babb4d927a06294314b316e23311503ed580ec6ce6a0158f49d40" +checksum = "a8ad6a81add9d3ea30bf8374ee8329992c7fd246ffd8b7e2f48a3cea5aa0cc9a" dependencies = [ "arrow-array", "arrow-buffer", @@ -670,7 +679,7 @@ dependencies = [ "arrow-schema", "arrow-select", "memchr", - "num", + "num-traits", "regex", "regex-syntax", ] @@ -732,7 +741,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8725874ecfbf399e071150b8619c4071d7b2b7a2f117e173dddef53c6bdb6bb1" dependencies = [ "async-graphql", - "axum 0.8.8", + "axum", "bytes", "futures-util", "serde_json", @@ -886,40 +895,13 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" -[[package]] -name = "axum" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" -dependencies = [ - "async-trait", - "axum-core 0.4.3", - "bytes", - "futures-util", - "http 1.4.0", - "http-body 1.0.0", - "http-body-util", - "itoa", - "matchit 0.7.3", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "sync_wrapper 1.0.1", - "tower 0.4.13", - "tower-layer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tower-service 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "axum" version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b52af3cb4058c895d37317bb27508dccc8e5f2d39454016b297bf4a400597b8" dependencies = [ - "axum-core 0.5.5", + "axum-core", "base64 0.22.1", "bytes", "form_urlencoded", @@ -930,7 +912,7 @@ dependencies = [ "hyper 1.8.1", "hyper-util", "itoa", - "matchit 0.8.4", + "matchit", "memchr", "mime", "percent-encoding", @@ -940,7 +922,7 @@ dependencies = [ "serde_path_to_error", "serde_urlencoded", "sha1", - "sync_wrapper 1.0.1", + "sync_wrapper", "tokio", "tokio-tungstenite", "tower 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -949,26 +931,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "axum-core" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http 1.4.0", - "http-body 1.0.0", - "http-body-util", - "mime", - "pin-project-lite", - "rustversion", - "sync_wrapper 0.1.2", - "tower-layer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tower-service 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "axum-core" version = "0.5.5" @@ -982,7 +944,7 @@ dependencies = [ "http-body-util", "mime", "pin-project-lite", - "sync_wrapper 1.0.1", + "sync_wrapper", "tower-layer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "tower-service 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "tracing", @@ -2869,7 +2831,7 @@ dependencies = [ "num-traits", "object_store", "parking_lot", - "petgraph 0.8.3", + "petgraph", "priority-queue", "prometheus", "prost", @@ -2903,7 +2865,8 @@ dependencies = [ "tokio-util 0.7.18", "toml 0.9.11+spec-1.1.0", "tonic", - "tonic-build", + "tonic-prost", + "tonic-prost-build", "url", "wasmparser 0.118.2", "web3", @@ -2942,7 +2905,7 @@ dependencies = [ "tiny-keccak 1.5.0", "tokio", "tokio-stream", - "tonic-build", + "tonic-prost-build", ] [[package]] @@ -2959,7 +2922,7 @@ dependencies = [ "prost-types", "serde", "tokio", - "tonic-build", + "tonic-prost-build", ] [[package]] @@ -3223,7 +3186,7 @@ dependencies = [ "anyhow", "async-graphql", "async-graphql-axum", - "axum 0.8.8", + "axum", "chrono", "diesel", "diesel-async", @@ -4414,12 +4377,6 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - [[package]] name = "matchit" version = "0.8.4" @@ -4549,9 +4506,9 @@ dependencies = [ [[package]] name = "multimap" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" +checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" [[package]] name = "native-tls" @@ -4600,20 +4557,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d" -[[package]] -name = "num" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" -dependencies = [ - "num-bigint 0.4.6", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - [[package]] name = "num-bigint" version = "0.2.6" @@ -4660,17 +4603,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-iter" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - [[package]] name = "num-modular" version = "0.6.1" @@ -4686,17 +4618,6 @@ dependencies = [ "num-modular", ] -[[package]] -name = "num-rational" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint 0.4.6", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -4961,16 +4882,6 @@ dependencies = [ "sha2", ] -[[package]] -name = "petgraph" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" -dependencies = [ - "fixedbitset", - "indexmap 2.11.4", -] - [[package]] name = "petgraph" version = "0.8.3" @@ -5305,9 +5216,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.5" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" +checksum = "d2ea70524a2f82d518bce41317d0fae74151505651af45faf1ffbd6fd33f0568" dependencies = [ "bytes", "prost-derive", @@ -5315,19 +5226,20 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.13.5" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" +checksum = "343d3bd7056eda839b03204e68deff7d1b13aba7af2b2fd16890697274262ee7" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "itertools", "log", "multimap", - "once_cell", - "petgraph 0.7.1", + "petgraph", "prettyplease", "prost", "prost-types", + "pulldown-cmark", + "pulldown-cmark-to-cmark", "regex", "syn 2.0.114", "tempfile", @@ -5335,9 +5247,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.13.5" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" +checksum = "27c6023962132f4b30eb4c172c91ce92d933da334c59c23cddee82358ddafb0b" dependencies = [ "anyhow", "itertools", @@ -5348,9 +5260,9 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.13.5" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" +checksum = "8991c4cbdb8bc5b11f0b074ffe286c30e523de90fee5ba8132f1399f23cb3dd7" dependencies = [ "prost", ] @@ -5400,6 +5312,26 @@ dependencies = [ "cc", ] +[[package]] +name = "pulldown-cmark" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e8bbe1a966bd2f362681a44f6edce3c2310ac21e4d5067a6e7ec396297a6ea0" +dependencies = [ + "bitflags 2.9.0", + "memchr", + "unicase", +] + +[[package]] +name = "pulldown-cmark-to-cmark" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50793def1b900256624a709439404384204a5dc3a6ec580281bfaac35e882e90" +dependencies = [ + "pulldown-cmark", +] + [[package]] name = "pulley-interpreter" version = "35.0.0" @@ -5750,7 +5682,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 1.0.1", + "sync_wrapper", "tokio", "tokio-native-tls", "tokio-rustls", @@ -5882,9 +5814,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.10" +version = "0.23.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402" +checksum = "7160e3e10bf4535308537f3c4e1641468cd0e485175d6163087c0393c7d46643" dependencies = [ "log", "once_cell", @@ -5938,9 +5870,9 @@ checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" [[package]] name = "rustls-webpki" -version = "0.102.5" +version = "0.103.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a6fccd794a42c2c105b513a2f62bc3fd8f3ba57a4593677ceb0bd035164d78" +checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435" dependencies = [ "ring", "rustls-pki-types", @@ -6677,15 +6609,9 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "sync_wrapper" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ "futures-core", ] @@ -7027,12 +6953,11 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.0" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" dependencies = [ "rustls", - "rustls-pki-types", "tokio", ] @@ -7188,13 +7113,12 @@ checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" [[package]] name = "tonic" -version = "0.12.3" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" +checksum = "eb7613188ce9f7df5bfe185db26c5814347d110db17920415cf2fbcad85e7203" dependencies = [ - "async-stream", "async-trait", - "axum 0.7.5", + "axum", "base64 0.22.1", "bytes", "flate2", @@ -7207,14 +7131,13 @@ dependencies = [ "hyper-util", "percent-encoding", "pin-project", - "prost", "rustls-native-certs 0.8.1", - "rustls-pemfile", - "socket2 0.5.7", + "socket2 0.6.0", + "sync_wrapper", "tokio", "tokio-rustls", "tokio-stream", - "tower 0.4.13", + "tower 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "tower-layer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "tower-service 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "tracing", @@ -7222,36 +7145,41 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.12.3" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" +checksum = "4c40aaccc9f9eccf2cd82ebc111adc13030d23e887244bc9cfa5d1d636049de3" dependencies = [ "prettyplease", "proc-macro2", - "prost-build", - "prost-types", "quote", "syn 2.0.114", ] [[package]] -name = "tower" -version = "0.4.13" +name = "tonic-prost" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +checksum = "66bd50ad6ce1252d87ef024b3d64fe4c3cf54a86fb9ef4c631fdd0ded7aeaa67" dependencies = [ - "futures-core", - "futures-util", - "indexmap 1.9.3", - "pin-project", - "pin-project-lite", - "rand 0.8.5", - "slab", - "tokio", - "tokio-util 0.7.18", - "tower-layer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tower-service 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing", + "bytes", + "prost", + "tonic", +] + +[[package]] +name = "tonic-prost-build" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4a16cba4043dc3ff43fcb3f96b4c5c154c64cbd18ca8dce2ab2c6a451d058a2" +dependencies = [ + "prettyplease", + "proc-macro2", + "prost-build", + "prost-types", + "quote", + "syn 2.0.114", + "tempfile", + "tonic-build", ] [[package]] @@ -7262,9 +7190,12 @@ checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", + "indexmap 2.11.4", "pin-project-lite", - "sync_wrapper 1.0.1", + "slab", + "sync_wrapper", "tokio", + "tokio-util 0.7.18", "tower-layer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "tower-service 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "tracing", @@ -7281,7 +7212,7 @@ dependencies = [ "indexmap 2.11.4", "pin-project-lite", "slab", - "sync_wrapper 1.0.1", + "sync_wrapper", "tokio", "tokio-util 0.7.18", "tower-layer 0.3.3 (git+https://github.com/tower-rs/tower.git)", diff --git a/Cargo.toml b/Cargo.toml index b509984d818..6a73ed81a92 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,8 +66,8 @@ graphman = { path = "./core/graphman" } graphman-store = { path = "./core/graphman_store" } itertools = "0.14.0" lazy_static = "1.5.0" -prost = "0.13" -prost-types = "0.13" +prost = "0.14" +prost-types = "0.14" redis = { version = "1.0.2", features = [ "aio", "connection-manager", @@ -91,8 +91,9 @@ tokio = { version = "1.45.1", features = ["full"] } tokio-stream = { version = "0.1.15", features = ["sync"] } tokio-retry = "0.3.0" -tonic = { version = "0.12.3", features = ["tls-roots", "gzip"] } -tonic-build = { version = "0.12.3", features = ["prost"] } +tonic = { version = "0.14", features = ["tls-native-roots", "gzip"] } +tonic-prost = "0.14" +tonic-prost-build = "0.14" tower-http = { version = "0.6.8", features = ["cors"] } wasmparser = "0.118.1" wasmtime = { version = "35.0.0", features = ["async"] } @@ -105,8 +106,8 @@ prometheus = "0.14.0" # Dependencies related to Amp subgraphs ahash = "0.8.11" alloy = { version = "1.0.12", default-features = false, features = ["json-abi", "serde"] } -arrow = { version = "=55.0.0" } -arrow-flight = { version = "=55.0.0", features = ["flight-sql-experimental"] } +arrow = { version = "=57.0.0" } +arrow-flight = { version = "=57.0.0", features = ["flight-sql-experimental"] } futures = "0.3.31" half = "2.7.1" indoc = "2.0.7" diff --git a/chain/ethereum/Cargo.toml b/chain/ethereum/Cargo.toml index 17eafbeaaa0..6ecedf6d6ba 100644 --- a/chain/ethereum/Cargo.toml +++ b/chain/ethereum/Cargo.toml @@ -28,7 +28,7 @@ graph-runtime-derive = { path = "../../runtime/derive" } base64 = "0" [build-dependencies] -tonic-build = { workspace = true } +tonic-prost-build = { workspace = true } [lints] workspace = true diff --git a/chain/ethereum/build.rs b/chain/ethereum/build.rs index 227a50914a6..0ca09e33b7d 100644 --- a/chain/ethereum/build.rs +++ b/chain/ethereum/build.rs @@ -1,7 +1,7 @@ fn main() { println!("cargo:rerun-if-changed=proto"); - tonic_build::configure() + tonic_prost_build::configure() .out_dir("src/protobuf") .compile_protos(&["proto/ethereum.proto"], &["proto"]) .expect("Failed to compile Firehose Ethereum proto(s)"); diff --git a/chain/ethereum/src/protobuf/sf.ethereum.r#type.v2.rs b/chain/ethereum/src/protobuf/sf.ethereum.r#type.v2.rs index 4ab8d0a1324..9455d0de536 100644 --- a/chain/ethereum/src/protobuf/sf.ethereum.r#type.v2.rs +++ b/chain/ethereum/src/protobuf/sf.ethereum.r#type.v2.rs @@ -31,7 +31,7 @@ pub struct Block { /// /// WARN: this is a client-side optimization pattern and should be moved in the /// consuming code. -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct HeaderOnlyBlock { #[prost(message, optional, tag = "5")] pub header: ::core::option::Option, @@ -50,7 +50,7 @@ pub struct BlockWithRefs { #[prost(bool, tag = "4")] pub irreversible: bool, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct TransactionRefs { #[prost(bytes = "vec", repeated, tag = "1")] pub hashes: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, @@ -60,19 +60,18 @@ pub struct UnclesHeaders { #[prost(message, repeated, tag = "1")] pub uncles: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct BlockRef { #[prost(bytes = "vec", tag = "1")] pub hash: ::prost::alloc::vec::Vec, #[prost(uint64, tag = "2")] pub number: u64, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct BlockHeader { #[prost(bytes = "vec", tag = "1")] pub parent_hash: ::prost::alloc::vec::Vec, - /// Uncle hash of the block, some reference it as `sha3Uncles`, but `sha3`` is badly worded, so we prefer `uncle_hash`, also - /// referred as `ommers` in EIP specification. + /// Uncle hash of the block, some reference it as `sha3Uncles`, but ```sha3`` is badly worded, so we prefer ```uncle_hash`, also referred as `ommers\` in EIP specification. /// /// If the Block containing this `BlockHeader` has been produced using the Proof of Stake /// consensus algorithm, this field will actually be constant and set to `0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347`. @@ -115,7 +114,7 @@ pub struct BlockHeader { /// forks are using bigger values to carry special consensus data. /// /// If the Block containing this `BlockHeader` has been produced using the Proof of Stake - /// consensus algorithm, this field is strictly enforced to be <= 32 bytes. + /// consensus algorithm, this field is strictly enforced to be \<= 32 bytes. #[prost(bytes = "vec", tag = "13")] pub extra_data: ::prost::alloc::vec::Vec, /// MixHash is used to prove, when combined with the `nonce` that sufficient amount of computation has been @@ -131,32 +130,31 @@ pub struct BlockHeader { pub nonce: u64, /// Hash is the hash of the block which is actually the computation: /// - /// Keccak256(rlp([ - /// parent_hash, - /// uncle_hash, - /// coinbase, - /// state_root, - /// transactions_root, - /// receipt_root, - /// logs_bloom, - /// difficulty, - /// number, - /// gas_limit, - /// gas_used, - /// timestamp, - /// extra_data, - /// mix_hash, - /// nonce, - /// base_fee_per_gas - /// ])) - /// + /// Keccak256(rlp(\[ + /// parent_hash, + /// uncle_hash, + /// coinbase, + /// state_root, + /// transactions_root, + /// receipt_root, + /// logs_bloom, + /// difficulty, + /// number, + /// gas_limit, + /// gas_used, + /// timestamp, + /// extra_data, + /// mix_hash, + /// nonce, + /// base_fee_per_gas + /// \])) #[prost(bytes = "vec", tag = "16")] pub hash: ::prost::alloc::vec::Vec, /// Base fee per gas according to EIP-1559 (e.g. London Fork) rules, only set if London is present/active on the chain. #[prost(message, optional, tag = "18")] pub base_fee_per_gas: ::core::option::Option, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct BigInt { #[prost(bytes = "vec", tag = "1")] pub bytes: ::prost::alloc::vec::Vec, @@ -299,7 +297,7 @@ pub mod transaction_trace { } /// AccessTuple represents a list of storage keys for a given contract's address and is used /// for AccessList construction. -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct AccessTuple { #[prost(bytes = "vec", tag = "1")] pub address: ::prost::alloc::vec::Vec, @@ -318,14 +316,14 @@ pub struct TransactionTraceWithBlockRef { pub struct TransactionReceipt { /// State root is an intermediate state_root hash, computed in-between transactions to make /// **sure** you could build a proof and point to state in the middle of a block. Geth client - /// uses `PostState + root + PostStateOrStatus`` while Parity used `status_code, root...`` this piles + /// uses ```PostState + root + PostStateOrStatus`` while Parity used ```status_code, root...\`` this piles /// hardforks, see (read the EIPs first): - /// - - /// - - /// - /// - /// Moreover, the notion of `Outcome`` in parity, which segregates the two concepts, which are - /// stored in the same field `status_code`` can be computed based on such a hack of the `state_root` + /// * + /// * + /// * + /// + /// Moreover, the notion of ```Outcome`` in parity, which segregates the two concepts, which are stored in the same field ```status_code\`` can be computed based on such a hack of the `state_root` /// field, following `EIP-658`. /// /// Before Byzantinium hard fork, this field is always empty. @@ -338,7 +336,7 @@ pub struct TransactionReceipt { #[prost(message, repeated, tag = "4")] pub logs: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Log { #[prost(bytes = "vec", tag = "1")] pub address: ::prost::alloc::vec::Vec, @@ -357,8 +355,9 @@ pub struct Log { /// that emitted the log has been reverted by the chain. /// /// Currently, there are two locations where a Log can be obtained: - /// - block.transaction_traces\[\].receipt.logs\[\] - /// - block.transaction_traces\[\].calls\[\].logs\[\] + /// + /// * block.transaction_traces\[\].receipt.logs\[\] + /// * block.transaction_traces\[\].calls\[\].logs\[\] /// /// In the `receipt` case, the logs will be populated only when the call /// that emitted them has not been reverted by the chain and when in this @@ -418,9 +417,10 @@ pub struct Call { #[prost(message, repeated, tag = "28")] pub gas_changes: ::prost::alloc::vec::Vec, /// In Ethereum, a call can be either: - /// - Successful, execution passes without any problem encountered - /// - Failed, execution failed, and remaining gas should be consumed - /// - Reverted, execution failed, but only gas consumed so far is billed, remaining gas is refunded + /// + /// * Successful, execution passes without any problem encountered + /// * Failed, execution failed, and remaining gas should be consumed + /// * Reverted, execution failed, but only gas consumed so far is billed, remaining gas is refunded /// /// When a call is either `failed` or `reverted`, the `status_failed` field /// below is set to `true`. If the status is `reverted`, then both `status_failed` @@ -443,13 +443,13 @@ pub struct Call { /// has a status of `SUCCESS`, the chain might have reverted all the state /// changes it performed. /// - /// ```text - /// Trx 1 - /// Call #1 - /// Call #2 - /// Call #3 - /// |--- Failure here - /// Call #4 + /// ```text,text + /// Trx 1 + /// Call #1 + /// Call #2 + /// Call #3 + /// |--- Failure here + /// Call #4 /// ``` /// /// In the transaction above, while Call #2 and Call #3 would have the @@ -463,7 +463,7 @@ pub struct Call { #[prost(message, repeated, tag = "33")] pub account_creations: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct StorageChange { #[prost(bytes = "vec", tag = "1")] pub address: ::prost::alloc::vec::Vec, @@ -476,7 +476,7 @@ pub struct StorageChange { #[prost(uint64, tag = "5")] pub ordinal: u64, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct BalanceChange { #[prost(bytes = "vec", tag = "1")] pub address: ::prost::alloc::vec::Vec, @@ -493,7 +493,7 @@ pub struct BalanceChange { pub mod balance_change { /// Obtain all balance change reasons under deep mind repository: /// - /// ```shell + /// ```text,shell /// ack -ho 'BalanceChangeReason\(".*"\)' | grep -Eo '".*"' | sort | uniq /// ``` #[derive( @@ -576,7 +576,7 @@ pub mod balance_change { } } } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct NonceChange { #[prost(bytes = "vec", tag = "1")] pub address: ::prost::alloc::vec::Vec, @@ -587,14 +587,14 @@ pub struct NonceChange { #[prost(uint64, tag = "4")] pub ordinal: u64, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct AccountCreation { #[prost(bytes = "vec", tag = "1")] pub account: ::prost::alloc::vec::Vec, #[prost(uint64, tag = "2")] pub ordinal: u64, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CodeChange { #[prost(bytes = "vec", tag = "1")] pub address: ::prost::alloc::vec::Vec, @@ -615,7 +615,7 @@ pub struct CodeChange { /// /// Hence, we only index some of them, those that are costly like all the calls /// one, log events, return data, etc. -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GasChange { #[prost(uint64, tag = "1")] pub old_value: u64, @@ -630,7 +630,7 @@ pub struct GasChange { pub mod gas_change { /// Obtain all gas change reasons under deep mind repository: /// - /// ```shell + /// ```text,shell /// ack -ho 'GasChangeReason\(".*"\)' | grep -Eo '".*"' | sort | uniq /// ``` #[derive( diff --git a/chain/near/Cargo.toml b/chain/near/Cargo.toml index 7df0cc53966..d21f3755d0e 100644 --- a/chain/near/Cargo.toml +++ b/chain/near/Cargo.toml @@ -4,7 +4,7 @@ version.workspace = true edition.workspace = true [build-dependencies] -tonic-build = { workspace = true } +tonic-prost-build = { workspace = true } [dependencies] async-trait = { workspace = true } diff --git a/chain/near/build.rs b/chain/near/build.rs index a95e37d57ac..feafe4718f9 100644 --- a/chain/near/build.rs +++ b/chain/near/build.rs @@ -1,6 +1,6 @@ fn main() { println!("cargo:rerun-if-changed=proto"); - tonic_build::configure() + tonic_prost_build::configure() .out_dir("src/protobuf") .extern_path(".sf.near.codec.v1", "crate::codec::pbcodec") .compile_protos(&["proto/near.proto"], &["proto"]) diff --git a/graph/Cargo.toml b/graph/Cargo.toml index 33cfbd40eb0..326a4897ab3 100644 --- a/graph/Cargo.toml +++ b/graph/Cargo.toml @@ -72,6 +72,7 @@ url = "2.5.8" prometheus = "0.14.0" priority-queue = "2.7.0" tonic = { workspace = true } +tonic-prost = { workspace = true } prost = { workspace = true } prost-types = { workspace = true } @@ -110,7 +111,7 @@ hex-literal = "1.1" wiremock = "0.6.5" [build-dependencies] -tonic-build = { workspace = true } +tonic-prost-build = { workspace = true } [lints] workspace = true diff --git a/graph/build.rs b/graph/build.rs index ed4c31d077e..184e22dc7e1 100644 --- a/graph/build.rs +++ b/graph/build.rs @@ -1,6 +1,6 @@ fn main() { println!("cargo:rerun-if-changed=proto"); - tonic_build::configure() + tonic_prost_build::configure() .out_dir("src/firehose") .compile_protos( &[ diff --git a/graph/src/amp/schema/generator/entity.rs b/graph/src/amp/schema/generator/entity.rs index 88745bce51b..e3204abc623 100644 --- a/graph/src/amp/schema/generator/entity.rs +++ b/graph/src/amp/schema/generator/entity.rs @@ -161,8 +161,9 @@ fn arrow_data_type_to_value_type( Struct(_) => return type_not_supported(), Union(_, _) => return type_not_supported(), Dictionary(_, _) => return type_not_supported(), - Decimal128(_, _) => ValueType::BigDecimal, - Decimal256(_, _) => ValueType::BigDecimal, + Decimal32(_, _) | Decimal64(_, _) | Decimal128(_, _) | Decimal256(_, _) => { + ValueType::BigDecimal + } Map(_, _) => return type_not_supported(), RunEndEncoded(_, _) => return type_not_supported(), }; diff --git a/graph/src/firehose/endpoints.rs b/graph/src/firehose/endpoints.rs index 1c723790bcd..537b5bf9bcd 100644 --- a/graph/src/firehose/endpoints.rs +++ b/graph/src/firehose/endpoints.rs @@ -44,6 +44,16 @@ const LOW_VALUE_THRESHOLD: usize = 10; const LOW_VALUE_USED_PERCENTAGE: usize = 50; const HIGH_VALUE_USED_PERCENTAGE: usize = 80; +pub trait BlockChainBlockMessage: + prost::Message + BlockchainBlock + Default + std::fmt::Debug + 'static +{ +} + +impl BlockChainBlockMessage for T where + T: prost::Message + BlockchainBlock + Default + std::fmt::Debug + 'static +{ +} + #[derive(Debug)] pub struct FirehoseEndpoint { pub provider: ProviderName, @@ -411,7 +421,7 @@ impl FirehoseEndpoint { logger: &Logger, ) -> Result where - M: prost::Message + BlockchainBlock + Default + 'static, + M: BlockChainBlockMessage, { let retry_log_message = format!("get_block_by_ptr for block {}", ptr); let endpoint = self.cheap_clone(); @@ -473,7 +483,7 @@ impl FirehoseEndpoint { logger: &Logger, ) -> Result where - M: prost::Message + BlockchainBlock + Default + 'static, + M: BlockChainBlockMessage, { let retry_log_message = format!("get_block_by_number for block {}", number); let endpoint = self.cheap_clone(); @@ -511,7 +521,7 @@ impl FirehoseEndpoint { logger: &Logger, ) -> Result, anyhow::Error> where - M: prost::Message + BlockchainBlock + Default + 'static, + M: BlockChainBlockMessage, { let logger = logger.clone(); let logger_for_error = logger.clone(); diff --git a/graph/src/firehose/sf.ethereum.transform.v1.rs b/graph/src/firehose/sf.ethereum.transform.v1.rs index 8f80ce08ea3..755a7c2ee05 100644 --- a/graph/src/firehose/sf.ethereum.transform.v1.rs +++ b/graph/src/firehose/sf.ethereum.transform.v1.rs @@ -2,21 +2,21 @@ /// CombinedFilter is a combination of "LogFilters" and "CallToFilters" /// /// It transforms the requested stream in two ways: -/// 1. STRIPPING -/// The block data is stripped from all transactions that don't -/// match any of the filters. /// -/// 2. SKIPPING -/// If an "block index" covers a range containing a -/// block that does NOT match any of the filters, the block will be -/// skipped altogether, UNLESS send_all_block_headers is enabled -/// In that case, the block would still be sent, but without any -/// transactionTrace +/// 1. STRIPPING +/// The block data is stripped from all transactions that don't +/// match any of the filters. +/// +/// 1. SKIPPING +/// If an "block index" covers a range containing a +/// block that does NOT match any of the filters, the block will be +/// skipped altogether, UNLESS send_all_block_headers is enabled +/// In that case, the block would still be sent, but without any +/// transactionTrace /// /// The SKIPPING feature only applies to historical blocks, because /// the "block index" is always produced after the merged-blocks files /// are produced. Therefore, the "live" blocks are never filtered out. -/// #[derive(Clone, PartialEq, ::prost::Message)] pub struct CombinedFilter { #[prost(message, repeated, tag = "1")] @@ -35,11 +35,12 @@ pub struct MultiLogFilter { pub log_filters: ::prost::alloc::vec::Vec, } /// LogFilter will match calls where *BOTH* +/// /// * the contract address that emits the log is one in the provided addresses -- OR addresses list is empty -- /// * the event signature (topic.0) is one of the provided event_signatures -- OR event_signatures is empty -- /// /// a LogFilter with both empty addresses and event_signatures lists is invalid and will fail. -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct LogFilter { #[prost(bytes = "vec", repeated, tag = "1")] pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, @@ -54,11 +55,12 @@ pub struct MultiCallToFilter { pub call_filters: ::prost::alloc::vec::Vec, } /// CallToFilter will match calls where *BOTH* +/// /// * the contract address (TO) is one in the provided addresses -- OR addresses list is empty -- /// * the method signature (in 4-bytes format) is one of the provided signatures -- OR signatures is empty -- /// /// a CallToFilter with both empty addresses and signatures lists is invalid and will fail. -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CallToFilter { #[prost(bytes = "vec", repeated, tag = "1")] pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, @@ -67,23 +69,23 @@ pub struct CallToFilter { } /// Deprecated: LightBlock is deprecated, replaced by HeaderOnly, note however that the new transform /// does not have any transactions traces returned, so it's not a direct replacement. -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct LightBlock {} /// HeaderOnly returns only the block's header and few top-level core information for the block. Useful /// for cases where no transactions information is required at all. /// /// The structure that would will have access to after: /// -/// ```ignore +/// ```text,ignore /// Block { -/// int32 ver = 1; -/// bytes hash = 2; -/// uint64 number = 3; -/// uint64 size = 4; -/// BlockHeader header = 5; +/// int32 ver = 1; +/// bytes hash = 2; +/// uint64 number = 3; +/// uint64 size = 4; +/// BlockHeader header = 5; /// } /// ``` /// /// Everything else will be empty. -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct HeaderOnly {} diff --git a/graph/src/firehose/sf.firehose.v2.rs b/graph/src/firehose/sf.firehose.v2.rs index bca61385c71..d564bcb9d1e 100644 --- a/graph/src/firehose/sf.firehose.v2.rs +++ b/graph/src/firehose/sf.firehose.v2.rs @@ -9,13 +9,13 @@ pub struct SingleBlockRequest { /// Nested message and enum types in `SingleBlockRequest`. pub mod single_block_request { /// Get the current known canonical version of a block at with this number - #[derive(Clone, Copy, PartialEq, ::prost::Message)] + #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct BlockNumber { #[prost(uint64, tag = "1")] pub num: u64, } /// Get the current block with specific hash and number - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct BlockHashAndNumber { #[prost(uint64, tag = "1")] pub num: u64, @@ -23,12 +23,12 @@ pub mod single_block_request { pub hash: ::prost::alloc::string::String, } /// Get the block that generated a specific cursor - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Cursor { #[prost(string, tag = "1")] pub cursor: ::prost::alloc::string::String, } - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)] pub enum Reference { #[prost(message, tag = "3")] BlockNumber(BlockNumber), @@ -38,7 +38,7 @@ pub mod single_block_request { Cursor(Cursor), } } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SingleBlockResponse { #[prost(message, optional, tag = "1")] pub block: ::core::option::Option<::prost_types::Any>, @@ -55,7 +55,7 @@ pub struct Request { /// /// Can be negative, will be resolved relative to the chain head block, assuming /// a chain at head block #100, then using `-50` as the value will start at block - /// #50. If it resolves before first streamable block of chain, we assume start + /// \#50. If it resolves before first streamable block of chain, we assume start /// of chain. /// /// If `start_cursor` is given, this value is ignored and the stream instead starts @@ -83,12 +83,13 @@ pub struct Request { #[prost(message, repeated, tag = "10")] pub transforms: ::prost::alloc::vec::Vec<::prost_types::Any>, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Response { /// Chain specific block payload, ex: - /// - sf.eosio.type.v1.Block - /// - sf.ethereum.type.v1.Block - /// - sf.near.type.v1.Block + /// + /// * sf.eosio.type.v1.Block + /// * sf.ethereum.type.v1.Block + /// * sf.near.type.v1.Block #[prost(message, optional, tag = "1")] pub block: ::core::option::Option<::prost_types::Any>, #[prost(enumeration = "ForkStep", tag = "6")] @@ -96,9 +97,9 @@ pub struct Response { #[prost(string, tag = "10")] pub cursor: ::prost::alloc::string::String, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct InfoRequest {} -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct InfoResponse { /// Canonical chain name from (ex: matic, mainnet ...). #[prost(string, tag = "1")] @@ -236,7 +237,7 @@ pub mod stream_client { } impl StreamClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + std::marker::Send + 'static, ::Error: Into + std::marker::Send, @@ -257,13 +258,13 @@ pub mod stream_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , + http::Request, >>::Error: Into + std::marker::Send + std::marker::Sync, { StreamClient::new(InterceptedService::new(inner, interceptor)) @@ -314,7 +315,7 @@ pub mod stream_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/sf.firehose.v2.Stream/Blocks", ); @@ -325,237 +326,6 @@ pub mod stream_client { } } } -/// Generated client implementations. -pub mod fetch_client { - #![allow( - unused_variables, - dead_code, - missing_docs, - clippy::wildcard_imports, - clippy::let_unit_value, - )] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - #[derive(Debug, Clone)] - pub struct FetchClient { - inner: tonic::client::Grpc, - } - impl FetchClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl FetchClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + std::marker::Send + 'static, - ::Error: Into + std::marker::Send, - { - pub fn new(inner: T) -> Self { - 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( - inner: T, - interceptor: F, - ) -> FetchClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + std::marker::Send + std::marker::Sync, - { - FetchClient::new(InterceptedService::new(inner, interceptor)) - } - /// 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_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - pub async fn block( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/sf.firehose.v2.Fetch/Block", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("sf.firehose.v2.Fetch", "Block")); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated client implementations. -pub mod endpoint_info_client { - #![allow( - unused_variables, - dead_code, - missing_docs, - clippy::wildcard_imports, - clippy::let_unit_value, - )] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - #[derive(Debug, Clone)] - pub struct EndpointInfoClient { - inner: tonic::client::Grpc, - } - impl EndpointInfoClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl EndpointInfoClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + std::marker::Send + 'static, - ::Error: Into + std::marker::Send, - { - pub fn new(inner: T) -> Self { - 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( - inner: T, - interceptor: F, - ) -> EndpointInfoClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + std::marker::Send + std::marker::Sync, - { - EndpointInfoClient::new(InterceptedService::new(inner, interceptor)) - } - /// 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_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - pub async fn info( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/sf.firehose.v2.EndpointInfo/Info", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("sf.firehose.v2.EndpointInfo", "Info")); - self.inner.unary(req, path, codec).await - } - } -} /// Generated server implementations. pub mod stream_server { #![allow( @@ -645,7 +415,7 @@ pub mod stream_server { B: Body + std::marker::Send + 'static, B::Error: Into + std::marker::Send + 'static, { - type Response = http::Response; + type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( @@ -685,7 +455,7 @@ pub mod stream_server { let inner = self.inner.clone(); let fut = async move { let method = BlocksSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -702,7 +472,9 @@ pub mod stream_server { } _ => { Box::pin(async move { - let mut response = http::Response::new(empty_body()); + let mut response = http::Response::new( + tonic::body::Body::default(), + ); let headers = response.headers_mut(); headers .insert( @@ -738,6 +510,123 @@ pub mod stream_server { const NAME: &'static str = SERVICE_NAME; } } +/// Generated client implementations. +pub mod fetch_client { + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + #[derive(Debug, Clone)] + pub struct FetchClient { + inner: tonic::client::Grpc, + } + impl FetchClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl FetchClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, + { + pub fn new(inner: T) -> Self { + 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( + inner: T, + interceptor: F, + ) -> FetchClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, + { + FetchClient::new(InterceptedService::new(inner, interceptor)) + } + /// 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_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + pub async fn block( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic_prost::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/sf.firehose.v2.Fetch/Block", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("sf.firehose.v2.Fetch", "Block")); + self.inner.unary(req, path, codec).await + } + } +} /// Generated server implementations. pub mod fetch_server { #![allow( @@ -824,7 +713,7 @@ pub mod fetch_server { B: Body + std::marker::Send + 'static, B::Error: Into + std::marker::Send + 'static, { - type Response = http::Response; + type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( @@ -863,7 +752,7 @@ pub mod fetch_server { let inner = self.inner.clone(); let fut = async move { let method = BlockSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -880,7 +769,9 @@ pub mod fetch_server { } _ => { Box::pin(async move { - let mut response = http::Response::new(empty_body()); + let mut response = http::Response::new( + tonic::body::Body::default(), + ); let headers = response.headers_mut(); headers .insert( @@ -916,6 +807,120 @@ pub mod fetch_server { const NAME: &'static str = SERVICE_NAME; } } +/// Generated client implementations. +pub mod endpoint_info_client { + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + #[derive(Debug, Clone)] + pub struct EndpointInfoClient { + inner: tonic::client::Grpc, + } + impl EndpointInfoClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl EndpointInfoClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, + { + pub fn new(inner: T) -> Self { + 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( + inner: T, + interceptor: F, + ) -> EndpointInfoClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, + { + EndpointInfoClient::new(InterceptedService::new(inner, interceptor)) + } + /// 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_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + pub async fn info( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic_prost::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/sf.firehose.v2.EndpointInfo/Info", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("sf.firehose.v2.EndpointInfo", "Info")); + self.inner.unary(req, path, codec).await + } + } +} /// Generated server implementations. pub mod endpoint_info_server { #![allow( @@ -999,7 +1004,7 @@ pub mod endpoint_info_server { B: Body + std::marker::Send + 'static, B::Error: Into + std::marker::Send + 'static, { - type Response = http::Response; + type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( @@ -1038,7 +1043,7 @@ pub mod endpoint_info_server { let inner = self.inner.clone(); let fut = async move { let method = InfoSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -1055,7 +1060,9 @@ pub mod endpoint_info_server { } _ => { Box::pin(async move { - let mut response = http::Response::new(empty_body()); + let mut response = http::Response::new( + tonic::body::Body::default(), + ); let headers = response.headers_mut(); headers .insert( diff --git a/graph/src/firehose/sf.near.transform.v1.rs b/graph/src/firehose/sf.near.transform.v1.rs index 2ec950da40b..5069ed54453 100644 --- a/graph/src/firehose/sf.near.transform.v1.rs +++ b/graph/src/firehose/sf.near.transform.v1.rs @@ -7,13 +7,14 @@ pub struct BasicReceiptFilter { pub prefix_and_suffix_pairs: ::prost::alloc::vec::Vec, } /// PrefixSuffixPair applies a logical AND to prefix and suffix when both fields are non-empty. +/// /// * {prefix="hello",suffix="world"} will match "hello.world" but not "hello.friend" /// * {prefix="hello",suffix=""} will match both "hello.world" and "hello.friend" /// * {prefix="",suffix="world"} will match both "hello.world" and "good.day.world" /// * {prefix="",suffix=""} is invalid /// /// Note that the suffix will usually have a TLD, ex: "mydomain.near" or "mydomain.testnet" -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct PrefixSuffixPair { #[prost(string, tag = "1")] pub prefix: ::prost::alloc::string::String,