diff --git a/Cargo.lock b/Cargo.lock index 384e357019a..c49377cce75 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -45,7 +45,7 @@ dependencies = [ "cfg-if 1.0.0", "once_cell", "version_check", - "zerocopy", + "zerocopy 0.7.35", ] [[package]] @@ -210,26 +210,25 @@ dependencies = [ "serde_urlencoded", "static_assertions_next", "tempfile", - "thiserror", + "thiserror 1.0.61", "uuid", ] [[package]] name = "async-graphql-axum" -version = "7.0.11" +version = "7.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9aa80e171205c6d562057fd5a49167c8fbe61f7db2bed6540f6d4f2234d7ff2" +checksum = "6bf2882c816094fef6e39d381b8e9b710e5943e7bdef5198496441d5083164fa" dependencies = [ "async-graphql", - "async-trait", - "axum 0.7.5", + "axum 0.8.1", "bytes", "futures-util", "serde_json", "tokio", "tokio-stream", "tokio-util 0.7.11", - "tower-service 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-service 0.3.3", ] [[package]] @@ -246,7 +245,7 @@ dependencies = [ "quote", "strum", "syn 2.0.87", - "thiserror", + "thiserror 1.0.61", ] [[package]] @@ -337,42 +336,41 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "axum" -version = "0.6.20" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" dependencies = [ "async-trait", - "axum-core 0.3.4", - "bitflags 1.3.2", + "axum-core 0.4.3", "bytes", "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.29", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", "itoa", - "matchit", + "matchit 0.7.3", "memchr", "mime", "percent-encoding", "pin-project-lite", "rustversion", "serde", - "sync_wrapper 0.1.2", + "sync_wrapper 1.0.1", "tower 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tower-layer 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tower-service 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-layer 0.3.3", + "tower-service 0.3.3", ] [[package]] name = "axum" -version = "0.7.5" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" +checksum = "6d6fd624c75e18b3b4c6b9caf42b1afe24437daaee904069137d8bab077be8b8" dependencies = [ - "async-trait", - "axum-core 0.4.3", - "base64 0.21.7", + "axum-core 0.5.0", + "base64 0.22.1", "bytes", + "form_urlencoded", "futures-util", "http 1.1.0", "http-body 1.0.0", @@ -380,7 +378,7 @@ dependencies = [ "hyper 1.6.0", "hyper-util", "itoa", - "matchit", + "matchit 0.8.4", "memchr", "mime", "percent-encoding", @@ -394,36 +392,38 @@ dependencies = [ "sync_wrapper 1.0.1", "tokio", "tokio-tungstenite", - "tower 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tower-layer 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tower-service 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tower 0.5.2", + "tower-layer 0.3.3", + "tower-service 0.3.3", "tracing", ] [[package]] name = "axum-core" -version = "0.3.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" dependencies = [ "async-trait", "bytes", "futures-util", - "http 0.2.12", - "http-body 0.4.6", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", "mime", + "pin-project-lite", "rustversion", - "tower-layer 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tower-service 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sync_wrapper 0.1.2", + "tower-layer 0.3.3", + "tower-service 0.3.3", ] [[package]] name = "axum-core" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" +checksum = "df1362f362fd16024ae199c1970ce98f9661bf5ef94b9808fee734bc3698b733" dependencies = [ - "async-trait", "bytes", "futures-util", "http 1.1.0", @@ -432,9 +432,9 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper 0.1.2", - "tower-layer 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tower-service 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sync_wrapper 1.0.1", + "tower-layer 0.3.3", + "tower-service 0.3.3", "tracing", ] @@ -642,9 +642,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" dependencies = [ "serde", ] @@ -802,11 +802,21 @@ dependencies = [ "libc", ] +[[package]] +name = "core-foundation" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core2" @@ -1450,7 +1460,7 @@ dependencies = [ "serde", "serde_json", "sha3", - "thiserror", + "thiserror 1.0.61", "uint 0.9.5", ] @@ -1527,7 +1537,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" dependencies = [ "byteorder", - "rand", + "rand 0.8.5", "rustc-hex", "static_assertions", ] @@ -1726,7 +1736,19 @@ checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if 1.0.0", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets 0.52.6", ] [[package]] @@ -1829,9 +1851,9 @@ dependencies = [ "petgraph", "priority-queue", "prometheus", - "prost 0.12.6", - "prost-types 0.12.6", - "rand", + "prost", + "prost-types", + "rand 0.8.5", "regex", "reqwest", "semver", @@ -1849,7 +1871,7 @@ dependencies = [ "stable-hash 0.3.4", "stable-hash 0.4.4", "strum_macros", - "thiserror", + "thiserror 1.0.61", "tiny-keccak 1.5.0", "tokio", "tokio-retry", @@ -1872,8 +1894,8 @@ dependencies = [ "graph", "graph-runtime-derive", "graph-runtime-wasm", - "prost 0.12.6", - "prost-types 0.12.6", + "prost", + "prost-types", "serde", "sha2", "tonic-build", @@ -1902,8 +1924,8 @@ dependencies = [ "hex", "itertools 0.13.0", "jsonrpc-core", - "prost 0.12.6", - "prost-types 0.12.6", + "prost", + "prost-types", "semver", "serde", "tiny-keccak 1.5.0", @@ -1920,8 +1942,8 @@ dependencies = [ "graph", "graph-runtime-derive", "graph-runtime-wasm", - "prost 0.12.6", - "prost-types 0.12.6", + "prost", + "prost-types", "serde", "tonic-build", "trigger-filters", @@ -1937,8 +1959,8 @@ dependencies = [ "graph-runtime-wasm", "hex", "lazy_static", - "prost 0.12.6", - "prost-types 0.12.6", + "prost", + "prost-types", "semver", "serde", "tokio", @@ -2033,7 +2055,7 @@ dependencies = [ "graph-chain-ethereum", "graph-runtime-derive", "graph-runtime-wasm", - "rand", + "rand 0.8.5", "semver", "test-store", "wasmtime", @@ -2129,7 +2151,7 @@ dependencies = [ "postgres", "postgres-openssl", "pretty_assertions", - "rand", + "rand 0.8.5", "serde", "serde_json", "stable-hash 0.3.4", @@ -2181,7 +2203,7 @@ dependencies = [ "graph-store-postgres", "graphman-store", "itertools 0.13.0", - "thiserror", + "thiserror 1.0.61", "tokio", ] @@ -2192,7 +2214,7 @@ dependencies = [ "anyhow", "async-graphql", "async-graphql-axum", - "axum 0.7.5", + "axum 0.8.1", "chrono", "diesel", "graph", @@ -2205,7 +2227,7 @@ dependencies = [ "serde_json", "slog", "test-store", - "thiserror", + "thiserror 1.0.61", "tokio", "tower-http", ] @@ -2227,7 +2249,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2ebc8013b4426d5b81a4364c419a95ed0b404af2b82e2457de52d9348f0e474" dependencies = [ "combine", - "thiserror", + "thiserror 1.0.61", ] [[package]] @@ -2292,7 +2314,7 @@ dependencies = [ "pest_derive", "serde", "serde_json", - "thiserror", + "thiserror 1.0.61", ] [[package]] @@ -2500,7 +2522,7 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower-service 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-service 0.3.3", "tracing", "want", ] @@ -2536,24 +2558,25 @@ dependencies = [ "http 1.1.0", "hyper 1.6.0", "hyper-util", - "rustls 0.23.10", - "rustls-native-certs", + "rustls", + "rustls-native-certs 0.7.1", "rustls-pki-types", "tokio", - "tokio-rustls 0.26.0", - "tower-service 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-rustls", + "tower-service 0.3.3", ] [[package]] name = "hyper-timeout" -version = "0.4.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 0.14.29", + "hyper 1.6.0", + "hyper-util", "pin-project-lite", "tokio", - "tokio-io-timeout", + "tower-service 0.3.3", ] [[package]] @@ -2569,14 +2592,14 @@ dependencies = [ "native-tls", "tokio", "tokio-native-tls", - "tower-service 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-service 0.3.3", ] [[package]] name = "hyper-util" -version = "0.1.6" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -2587,8 +2610,7 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tower-service 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-service 0.3.3", "tracing", ] @@ -2623,7 +2645,7 @@ checksum = "d1fcc7f316b2c079dde77564a1360639c1a956a23fa96122732e416cb10717bb" dependencies = [ "cfg-if 1.0.0", "num-traits", - "rand", + "rand 0.8.5", "static_assertions", ] @@ -2873,11 +2895,11 @@ dependencies = [ "jsonrpsee-types", "lazy_static", "parking_lot", - "rand", + "rand 0.8.5", "rustc-hash 1.1.0", "serde", "serde_json", - "thiserror", + "thiserror 1.0.61", "tokio", "tracing", "unicase", @@ -2911,7 +2933,7 @@ dependencies = [ "beef", "serde", "serde_json", - "thiserror", + "thiserror 1.0.61", "tracing", ] @@ -3007,6 +3029,12 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +[[package]] +name = "matchit" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" + [[package]] name = "maybe-owned" version = "0.3.4" @@ -3100,7 +3128,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.48.0", ] @@ -3142,12 +3170,6 @@ dependencies = [ "unsigned-varint 0.7.2", ] -[[package]] -name = "multimap" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" - [[package]] name = "multimap" version = "0.10.0" @@ -3166,7 +3188,7 @@ dependencies = [ "openssl-probe", "openssl-sys", "schannel", - "security-framework", + "security-framework 2.11.0", "security-framework-sys", "tempfile", ] @@ -3271,7 +3293,7 @@ dependencies = [ "parking_lot", "percent-encoding", "quick-xml", - "rand", + "rand 0.8.5", "reqwest", "ring", "rustls-pemfile", @@ -3429,7 +3451,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" dependencies = [ "memchr", - "thiserror", + "thiserror 1.0.61", "ucd-trie", ] @@ -3573,7 +3595,7 @@ dependencies = [ "hmac", "md-5", "memchr", - "rand", + "rand 0.8.5", "sha2", "stringprep", ] @@ -3620,16 +3642,6 @@ dependencies = [ "yansi", ] -[[package]] -name = "prettyplease" -version = "0.1.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" -dependencies = [ - "proc-macro2", - "syn 1.0.109", -] - [[package]] name = "prettyplease" version = "0.2.20" @@ -3707,67 +3719,34 @@ dependencies = [ "parking_lot", "protobuf 2.28.0", "reqwest", - "thiserror", + "thiserror 1.0.61", ] [[package]] name = "prost" -version = "0.11.9" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" +checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" dependencies = [ "bytes", - "prost-derive 0.11.9", -] - -[[package]] -name = "prost" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" -dependencies = [ - "bytes", - "prost-derive 0.12.6", + "prost-derive", ] [[package]] name = "prost-build" -version = "0.11.9" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" +checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" dependencies = [ - "bytes", - "heck 0.4.1", - "itertools 0.10.5", - "lazy_static", - "log", - "multimap 0.8.3", - "petgraph", - "prettyplease 0.1.25", - "prost 0.11.9", - "prost-types 0.11.9", - "regex", - "syn 1.0.109", - "tempfile", - "which", -] - -[[package]] -name = "prost-build" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" -dependencies = [ - "bytes", "heck 0.5.0", - "itertools 0.10.5", + "itertools 0.13.0", "log", - "multimap 0.10.0", + "multimap", "once_cell", "petgraph", - "prettyplease 0.2.20", - "prost 0.12.6", - "prost-types 0.12.6", + "prettyplease", + "prost", + "prost-types", "regex", "syn 2.0.87", "tempfile", @@ -3775,25 +3754,12 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.11.9" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" +checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" dependencies = [ "anyhow", - "itertools 0.10.5", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "prost-derive" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" -dependencies = [ - "anyhow", - "itertools 0.10.5", + "itertools 0.13.0", "proc-macro2", "quote", "syn 2.0.87", @@ -3801,20 +3767,11 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" -dependencies = [ - "prost 0.11.9", -] - -[[package]] -name = "prost-types" -version = "0.12.6" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" +checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" dependencies = [ - "prost 0.12.6", + "prost", ] [[package]] @@ -3831,7 +3788,7 @@ checksum = "a3a7c64d9bf75b1b8d981124c14c179074e8caa7dfe7b6a12e6222ddcd0c8f72" dependencies = [ "once_cell", "protobuf-support", - "thiserror", + "thiserror 1.0.61", ] [[package]] @@ -3846,7 +3803,7 @@ dependencies = [ "protobuf 3.7.1", "protobuf-support", "tempfile", - "thiserror", + "thiserror 1.0.61", "which", ] @@ -3856,7 +3813,7 @@ version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b088fd20b938a875ea00843b6faf48579462630015c3788d397ad6a786663252" dependencies = [ - "thiserror", + "thiserror 1.0.61", ] [[package]] @@ -3889,8 +3846,8 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash 1.1.0", - "rustls 0.23.10", - "thiserror", + "rustls", + "thiserror 1.0.61", "tokio", "tracing", ] @@ -3902,12 +3859,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" dependencies = [ "bytes", - "rand", + "rand 0.8.5", "ring", "rustc-hash 2.0.0", - "rustls 0.23.10", + "rustls", "slab", - "thiserror", + "thiserror 1.0.61", "tinyvec", "tracing", ] @@ -3958,8 +3915,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", + "zerocopy 0.8.21", ] [[package]] @@ -3969,7 +3937,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", ] [[package]] @@ -3978,7 +3956,16 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.1", ] [[package]] @@ -4031,9 +4018,9 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ - "getrandom", + "getrandom 0.2.15", "libredox", - "thiserror", + "thiserror 1.0.61", ] [[package]] @@ -4108,8 +4095,8 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.10", - "rustls-native-certs", + "rustls", + "rustls-native-certs 0.7.1", "rustls-pemfile", "rustls-pki-types", "serde", @@ -4119,9 +4106,9 @@ dependencies = [ "system-configuration", "tokio", "tokio-native-tls", - "tokio-rustls 0.26.0", + "tokio-rustls", "tokio-util 0.7.11", - "tower-service 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-service 0.3.3", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -4138,7 +4125,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if 1.0.0", - "getrandom", + "getrandom 0.2.15", "libc", "spin", "untrusted", @@ -4203,11 +4190,12 @@ dependencies = [ [[package]] name = "rustls" -version = "0.22.4" +version = "0.23.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402" dependencies = [ "log", + "once_cell", "ring", "rustls-pki-types", "rustls-webpki", @@ -4216,30 +4204,28 @@ dependencies = [ ] [[package]] -name = "rustls" -version = "0.23.10" +name = "rustls-native-certs" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402" +checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba" dependencies = [ - "once_cell", - "ring", + "openssl-probe", + "rustls-pemfile", "rustls-pki-types", - "rustls-webpki", - "subtle", - "zeroize", + "schannel", + "security-framework 2.11.0", ] [[package]] name = "rustls-native-certs" -version = "0.7.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba" +checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" dependencies = [ "openssl-probe", - "rustls-pemfile", "rustls-pki-types", "schannel", - "security-framework", + "security-framework 3.2.0", ] [[package]] @@ -4254,9 +4240,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" [[package]] name = "rustls-webpki" @@ -4339,7 +4325,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" dependencies = [ "bitflags 2.6.0", - "core-foundation", + "core-foundation 0.9.4", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" +dependencies = [ + "bitflags 2.6.0", + "core-foundation 0.10.0", "core-foundation-sys", "libc", "security-framework-sys", @@ -4347,9 +4346,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -4692,7 +4691,7 @@ dependencies = [ "futures 0.3.30", "httparse", "log", - "rand", + "rand 0.8.5", "sha-1", ] @@ -4804,9 +4803,9 @@ dependencies = [ [[package]] name = "substreams" -version = "0.5.20" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "392f77309a4e36d7839d0552a38557b53894200aba239f3d0725ec167ebf4297" +checksum = "5bb63116b90d4c174114fb237a8916dd995c939874f7576333990a44d78b642a" dependencies = [ "anyhow", "bigdecimal 0.3.1", @@ -4818,22 +4817,22 @@ dependencies = [ "pad", "pest", "pest_derive", - "prost 0.11.9", - "prost-build 0.11.9", - "prost-types 0.11.9", + "prost", + "prost-build", + "prost-types", "substreams-macro", - "thiserror", + "thiserror 1.0.61", ] [[package]] name = "substreams-entity-change" -version = "1.3.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2c7fca123abff659d15ed30da5b605fa954a29e912c94260c488d0d18f9107d" +checksum = "0587b8d5dd7bffb0415d544c31e742c4cabdb81bbe9a3abfffff125185e4e9e8" dependencies = [ "base64 0.13.1", - "prost 0.11.9", - "prost-types 0.11.9", + "prost", + "prost-types", "substreams", ] @@ -4843,26 +4842,28 @@ version = "0.36.0" [[package]] name = "substreams-macro" -version = "0.5.20" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ccc7137347f05d26c7007dced97b4caef67a13b3d422789d969fe6e4cd8cc4a" +checksum = "f36f36e9da94db29f49daf3ab6b47b529b57c43fc5d58bc35b160aaad1a7233f" dependencies = [ "proc-macro2", "quote", "syn 1.0.109", - "thiserror", + "thiserror 1.0.61", ] [[package]] name = "substreams-near-core" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9922f437e6cb86b62cfd8bdede93937def710616ac2825ffff06b8770bbd06df" +checksum = "01ef8a763c5a5604b16f4898ab75d39494ef785c457aaca1fd7761b299f40fbf" dependencies = [ "bs58 0.4.0", - "prost 0.11.9", - "prost-build 0.11.9", - "prost-types 0.11.9", + "getrandom 0.2.15", + "hex", + "prost", + "prost-build", + "prost-types", ] [[package]] @@ -4870,7 +4871,7 @@ name = "substreams-trigger-filter" version = "0.36.0" dependencies = [ "hex", - "prost 0.11.9", + "prost", "substreams", "substreams-entity-change", "substreams-near-core", @@ -4925,7 +4926,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ "bitflags 1.3.2", - "core-foundation", + "core-foundation 0.9.4", "system-configuration-sys", ] @@ -5013,7 +5014,7 @@ dependencies = [ "hex-literal 0.4.1", "lazy_static", "pretty_assertions", - "prost-types 0.12.6", + "prost-types", ] [[package]] @@ -5022,7 +5023,16 @@ version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.61", +] + +[[package]] +name = "thiserror" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +dependencies = [ + "thiserror-impl 2.0.12", ] [[package]] @@ -5036,6 +5046,17 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "thiserror-impl" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "thread_local" version = "1.1.8" @@ -5129,16 +5150,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-macros" version = "2.3.0" @@ -5191,7 +5202,7 @@ dependencies = [ "pin-project-lite", "postgres-protocol", "postgres-types", - "rand", + "rand 0.8.5", "socket2", "tokio", "tokio-util 0.7.11", @@ -5205,18 +5216,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" dependencies = [ "pin-project", - "rand", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" -dependencies = [ - "rustls 0.22.4", - "rustls-pki-types", + "rand 0.8.5", "tokio", ] @@ -5226,16 +5226,16 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.10", + "rustls", "rustls-pki-types", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" dependencies = [ "futures-core", "pin-project-lite", @@ -5258,9 +5258,9 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.21.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" +checksum = "7a9daff607c6d2bf6c16fd681ccb7eecc83e4e2cdc1ca067ffaadfca5de7f084" dependencies = [ "futures-util", "log", @@ -5353,45 +5353,48 @@ dependencies = [ [[package]] name = "tonic" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" +checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" dependencies = [ "async-stream", "async-trait", - "axum 0.6.20", - "base64 0.21.7", + "axum 0.7.5", + "base64 0.22.1", "bytes", "flate2", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.29", + "h2 0.4.5", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.6.0", "hyper-timeout", + "hyper-util", "percent-encoding", "pin-project", - "prost 0.12.6", - "rustls-native-certs", + "prost", + "rustls-native-certs 0.8.1", "rustls-pemfile", - "rustls-pki-types", + "socket2", "tokio", - "tokio-rustls 0.25.0", + "tokio-rustls", "tokio-stream", "tower 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tower-layer 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tower-service 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-layer 0.3.3", + "tower-service 0.3.3", "tracing", ] [[package]] name = "tonic-build" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4ef6dd70a610078cb4e338a0f79d06bc759ff1b22d2120c2ff02ae264ba9c2" +checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" dependencies = [ - "prettyplease 0.2.20", + "prettyplease", "proc-macro2", - "prost-build 0.12.6", + "prost-build", + "prost-types", "quote", "syn 2.0.87", ] @@ -5407,12 +5410,12 @@ dependencies = [ "indexmap 1.9.3", "pin-project", "pin-project-lite", - "rand", + "rand 0.8.5", "slab", "tokio", "tokio-util 0.7.11", - "tower-layer 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tower-service 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-layer 0.3.3", + "tower-service 0.3.3", "tracing", ] @@ -5430,8 +5433,24 @@ dependencies = [ "sync_wrapper 0.1.2", "tokio", "tokio-util 0.7.11", - "tower-layer 0.3.2 (git+https://github.com/tower-rs/tower.git)", - "tower-service 0.3.2 (git+https://github.com/tower-rs/tower.git)", + "tower-layer 0.3.2", + "tower-service 0.3.2", + "tracing", +] + +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 1.0.1", + "tokio", + "tower-layer 0.3.3", + "tower-service 0.3.3", "tracing", ] @@ -5447,31 +5466,31 @@ dependencies = [ "http-body 1.0.0", "http-body-util", "pin-project-lite", - "tower-layer 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tower-service 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-layer 0.3.3", + "tower-service 0.3.3", ] [[package]] name = "tower-layer" version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +source = "git+https://github.com/tower-rs/tower.git#39adf5c509a1b2141f679654d8317524ca96b58b" [[package]] name = "tower-layer" -version = "0.3.2" -source = "git+https://github.com/tower-rs/tower.git#39adf5c509a1b2141f679654d8317524ca96b58b" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +source = "git+https://github.com/tower-rs/tower.git#39adf5c509a1b2141f679654d8317524ca96b58b" [[package]] name = "tower-service" -version = "0.3.2" -source = "git+https://github.com/tower-rs/tower.git#39adf5c509a1b2141f679654d8317524ca96b58b" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tower-test" @@ -5482,8 +5501,8 @@ dependencies = [ "pin-project-lite", "tokio", "tokio-test", - "tower-layer 0.3.2 (git+https://github.com/tower-rs/tower.git)", - "tower-service 0.3.2 (git+https://github.com/tower-rs/tower.git)", + "tower-layer 0.3.2", + "tower-service 0.3.2", ] [[package]] @@ -5543,20 +5562,18 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tungstenite" -version = "0.21.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" +checksum = "4793cb5e56680ecbb1d843515b23b6de9a75eb04b66643e256a396d43be33c13" dependencies = [ - "byteorder", "bytes", "data-encoding", "http 1.1.0", "httparse", "log", - "rand", + "rand 0.9.0", "sha1", - "thiserror", - "url", + "thiserror 2.0.12", "utf-8", ] @@ -5706,7 +5723,7 @@ version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5de17fd2f7da591098415cff336e12965a28061ddace43b59cb3c430179c9439" dependencies = [ - "getrandom", + "getrandom 0.2.15", "serde", ] @@ -5753,6 +5770,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.13.3+wasi-0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasite" version = "0.1.0" @@ -5990,7 +6016,7 @@ dependencies = [ "log", "object 0.32.2", "target-lexicon", - "thiserror", + "thiserror 1.0.61", "wasmparser 0.116.1", "wasmtime-cranelift-shared", "wasmtime-environ", @@ -6028,7 +6054,7 @@ dependencies = [ "serde", "serde_derive", "target-lexicon", - "thiserror", + "thiserror 1.0.61", "wasmparser 0.116.1", "wasmtime-types", ] @@ -6114,7 +6140,7 @@ dependencies = [ "memfd", "memoffset", "paste", - "rand", + "rand 0.8.5", "rustix", "sptr", "wasm-encoder 0.36.2", @@ -6136,7 +6162,7 @@ dependencies = [ "cranelift-entity", "serde", "serde_derive", - "thiserror", + "thiserror 1.0.61", "wasmparser 0.116.1", ] @@ -6243,7 +6269,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f6d8d1636b2627fe63518d5a9b38a569405d9c9bc665c43c9c341de57227ebb" dependencies = [ "native-tls", - "thiserror", + "thiserror 1.0.61", "tokio", "url", ] @@ -6502,6 +6528,15 @@ dependencies = [ "url", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +dependencies = [ + "bitflags 2.6.0", +] + [[package]] name = "wit-parser" version = "0.13.2" @@ -6546,7 +6581,16 @@ version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ - "zerocopy-derive", + "zerocopy-derive 0.7.35", +] + +[[package]] +name = "zerocopy" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf01143b2dd5d134f11f545cf9f1431b13b749695cb33bcce051e7568f99478" +dependencies = [ + "zerocopy-derive 0.8.21", ] [[package]] @@ -6560,6 +6604,17 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "zerocopy-derive" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712c8386f4f4299382c9abee219bee7084f78fb939d88b6840fcc1320d5f6da2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "zeroize" version = "1.8.1" diff --git a/Cargo.toml b/Cargo.toml index b3cd092114f..0cf70f16736 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,10 +41,10 @@ license = "MIT OR Apache-2.0" [workspace.dependencies] anyhow = "1.0" async-graphql = { version = "7.0.15", features = ["chrono", "uuid"] } -async-graphql-axum = "7.0.11" -axum = "0.7.5" -bs58 = "0.5.1" +async-graphql-axum = "7.0.15" +axum = "0.8.1" chrono = "0.4.38" +bs58 = "0.5.1" clap = { version = "4.5.4", features = ["derive", "env"] } derivative = "2.2.0" diesel = { version = "2.2.4", features = [ @@ -68,8 +68,8 @@ graphman = { path = "./core/graphman" } graphman-store = { path = "./core/graphman_store" } itertools = "0.13.0" lazy_static = "1.5.0" -prost = "0.12.6" -prost-types = "0.12.6" +prost = "0.13" +prost-types = "0.13" regex = "1.5.4" reqwest = "0.12.5" serde = { version = "1.0.126", features = ["rc"] } @@ -87,11 +87,14 @@ syn = { version = "2.0.87", features = ["full"] } test-store = { path = "./store/test-store" } thiserror = "1.0.25" tokio = { version = "1.38.0", features = ["full"] } -tonic = { version = "0.11.0", features = ["tls-roots", "gzip"] } -tonic-build = { version = "0.11.0", features = ["prost"] } +tonic = { version = "0.12.3", features = ["tls-roots", "gzip"] } +tonic-build = { version = "0.12.3", features = ["prost"] } tower-http = { version = "0.5.2", features = ["cors"] } wasmparser = "0.118.1" wasmtime = "15.0.1" +substreams = "=0.6.0" +substreams-entity-change = "2" +substreams-near-core = "=0.10.2" # Incremental compilation on Rust 1.58 causes an ICE on build. As soon as graph node builds again, these can be removed. [profile.test] diff --git a/chain/arweave/build.rs b/chain/arweave/build.rs index ea8153e7bd1..c0abc5fb8c9 100644 --- a/chain/arweave/build.rs +++ b/chain/arweave/build.rs @@ -2,6 +2,6 @@ fn main() { println!("cargo:rerun-if-changed=proto"); tonic_build::configure() .out_dir("src/protobuf") - .compile(&["proto/arweave.proto"], &["proto"]) + .compile_protos(&["proto/arweave.proto"], &["proto"]) .expect("Failed to compile Firehose Arweave proto(s)"); } diff --git a/chain/arweave/src/protobuf/sf.arweave.r#type.v1.rs b/chain/arweave/src/protobuf/sf.arweave.r#type.v1.rs index 39f83444cae..17f44498491 100644 --- a/chain/arweave/src/protobuf/sf.arweave.r#type.v1.rs +++ b/chain/arweave/src/protobuf/sf.arweave.r#type.v1.rs @@ -1,11 +1,9 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BigInt { #[prost(bytes = "vec", tag = "1")] pub bytes: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Block { /// Firehose block version (unrelated to Arweave block version) @@ -75,7 +73,6 @@ pub struct Block { pub poa: ::core::option::Option, } /// A succinct proof of access to a recall byte found in a TX -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ProofOfAccess { /// The recall byte option chosen; global offset of index byte @@ -94,7 +91,6 @@ pub struct ProofOfAccess { #[prost(bytes = "vec", tag = "4")] pub chunk: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Transaction { /// 1 or 2 for v1 or v2 transactions. More allowable in the future @@ -137,7 +133,6 @@ pub struct Transaction { #[prost(message, optional, tag = "12")] pub reward: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Tag { #[prost(bytes = "vec", tag = "1")] diff --git a/chain/ethereum/build.rs b/chain/ethereum/build.rs index 8ccae67aa92..227a50914a6 100644 --- a/chain/ethereum/build.rs +++ b/chain/ethereum/build.rs @@ -3,6 +3,6 @@ fn main() { tonic_build::configure() .out_dir("src/protobuf") - .compile(&["proto/ethereum.proto"], &["proto"]) + .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 3f0cc728f39..4ab8d0a1324 100644 --- a/chain/ethereum/src/protobuf/sf.ethereum.r#type.v2.rs +++ b/chain/ethereum/src/protobuf/sf.ethereum.r#type.v2.rs @@ -1,5 +1,4 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Block { #[prost(int32, tag = "1")] @@ -32,7 +31,6 @@ pub struct Block { /// /// WARN: this is a client-side optimization pattern and should be moved in the /// consuming code. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct HeaderOnlyBlock { #[prost(message, optional, tag = "5")] @@ -41,7 +39,6 @@ pub struct HeaderOnlyBlock { /// BlockWithRefs is a lightweight block, with traces and transactions /// purged from the `block` within, and only. It is used in transports /// to pass block data around. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BlockWithRefs { #[prost(string, tag = "1")] @@ -53,19 +50,16 @@ pub struct BlockWithRefs { #[prost(bool, tag = "4")] pub irreversible: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TransactionRefs { #[prost(bytes = "vec", repeated, tag = "1")] pub hashes: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnclesHeaders { #[prost(message, repeated, tag = "1")] pub uncles: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BlockRef { #[prost(bytes = "vec", tag = "1")] @@ -73,7 +67,6 @@ pub struct BlockRef { #[prost(uint64, tag = "2")] pub number: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BlockHeader { #[prost(bytes = "vec", tag = "1")] @@ -163,13 +156,11 @@ pub struct BlockHeader { #[prost(message, optional, tag = "18")] pub base_fee_per_gas: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BigInt { #[prost(bytes = "vec", tag = "1")] pub bytes: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TransactionTrace { /// consensus @@ -290,9 +281,9 @@ pub mod transaction_trace { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Type::TrxTypeLegacy => "TRX_TYPE_LEGACY", - Type::TrxTypeAccessList => "TRX_TYPE_ACCESS_LIST", - Type::TrxTypeDynamicFee => "TRX_TYPE_DYNAMIC_FEE", + Self::TrxTypeLegacy => "TRX_TYPE_LEGACY", + Self::TrxTypeAccessList => "TRX_TYPE_ACCESS_LIST", + Self::TrxTypeDynamicFee => "TRX_TYPE_DYNAMIC_FEE", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -308,7 +299,6 @@ pub mod transaction_trace { } /// AccessTuple represents a list of storage keys for a given contract's address and is used /// for AccessList construction. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AccessTuple { #[prost(bytes = "vec", tag = "1")] @@ -317,7 +307,6 @@ pub struct AccessTuple { pub storage_keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, } /// TransactionTraceWithBlockRef -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TransactionTraceWithBlockRef { #[prost(message, optional, tag = "1")] @@ -325,7 +314,6 @@ pub struct TransactionTraceWithBlockRef { #[prost(message, optional, tag = "2")] pub block_ref: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TransactionReceipt { /// State root is an intermediate state_root hash, computed in-between transactions to make @@ -350,7 +338,6 @@ pub struct TransactionReceipt { #[prost(message, repeated, tag = "4")] pub logs: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Log { #[prost(bytes = "vec", tag = "1")] @@ -384,7 +371,6 @@ pub struct Log { #[prost(uint64, tag = "7")] pub ordinal: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Call { #[prost(uint32, tag = "1")] @@ -477,7 +463,6 @@ pub struct Call { #[prost(message, repeated, tag = "33")] pub account_creations: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StorageChange { #[prost(bytes = "vec", tag = "1")] @@ -491,7 +476,6 @@ pub struct StorageChange { #[prost(uint64, tag = "5")] pub ordinal: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BalanceChange { #[prost(bytes = "vec", tag = "1")] @@ -550,22 +534,22 @@ pub mod balance_change { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Reason::Unknown => "REASON_UNKNOWN", - Reason::RewardMineUncle => "REASON_REWARD_MINE_UNCLE", - Reason::RewardMineBlock => "REASON_REWARD_MINE_BLOCK", - Reason::DaoRefundContract => "REASON_DAO_REFUND_CONTRACT", - Reason::DaoAdjustBalance => "REASON_DAO_ADJUST_BALANCE", - Reason::Transfer => "REASON_TRANSFER", - Reason::GenesisBalance => "REASON_GENESIS_BALANCE", - Reason::GasBuy => "REASON_GAS_BUY", - Reason::RewardTransactionFee => "REASON_REWARD_TRANSACTION_FEE", - Reason::RewardFeeReset => "REASON_REWARD_FEE_RESET", - Reason::GasRefund => "REASON_GAS_REFUND", - Reason::TouchAccount => "REASON_TOUCH_ACCOUNT", - Reason::SuicideRefund => "REASON_SUICIDE_REFUND", - Reason::SuicideWithdraw => "REASON_SUICIDE_WITHDRAW", - Reason::CallBalanceOverride => "REASON_CALL_BALANCE_OVERRIDE", - Reason::Burn => "REASON_BURN", + Self::Unknown => "REASON_UNKNOWN", + Self::RewardMineUncle => "REASON_REWARD_MINE_UNCLE", + Self::RewardMineBlock => "REASON_REWARD_MINE_BLOCK", + Self::DaoRefundContract => "REASON_DAO_REFUND_CONTRACT", + Self::DaoAdjustBalance => "REASON_DAO_ADJUST_BALANCE", + Self::Transfer => "REASON_TRANSFER", + Self::GenesisBalance => "REASON_GENESIS_BALANCE", + Self::GasBuy => "REASON_GAS_BUY", + Self::RewardTransactionFee => "REASON_REWARD_TRANSACTION_FEE", + Self::RewardFeeReset => "REASON_REWARD_FEE_RESET", + Self::GasRefund => "REASON_GAS_REFUND", + Self::TouchAccount => "REASON_TOUCH_ACCOUNT", + Self::SuicideRefund => "REASON_SUICIDE_REFUND", + Self::SuicideWithdraw => "REASON_SUICIDE_WITHDRAW", + Self::CallBalanceOverride => "REASON_CALL_BALANCE_OVERRIDE", + Self::Burn => "REASON_BURN", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -592,7 +576,6 @@ pub mod balance_change { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct NonceChange { #[prost(bytes = "vec", tag = "1")] @@ -604,7 +587,6 @@ pub struct NonceChange { #[prost(uint64, tag = "4")] pub ordinal: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AccountCreation { #[prost(bytes = "vec", tag = "1")] @@ -612,7 +594,6 @@ pub struct AccountCreation { #[prost(uint64, tag = "2")] pub ordinal: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CodeChange { #[prost(bytes = "vec", tag = "1")] @@ -634,8 +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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct GasChange { #[prost(uint64, tag = "1")] pub old_value: u64, @@ -696,27 +676,27 @@ pub mod gas_change { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Reason::Unknown => "REASON_UNKNOWN", - Reason::Call => "REASON_CALL", - Reason::CallCode => "REASON_CALL_CODE", - Reason::CallDataCopy => "REASON_CALL_DATA_COPY", - Reason::CodeCopy => "REASON_CODE_COPY", - Reason::CodeStorage => "REASON_CODE_STORAGE", - Reason::ContractCreation => "REASON_CONTRACT_CREATION", - Reason::ContractCreation2 => "REASON_CONTRACT_CREATION2", - Reason::DelegateCall => "REASON_DELEGATE_CALL", - Reason::EventLog => "REASON_EVENT_LOG", - Reason::ExtCodeCopy => "REASON_EXT_CODE_COPY", - Reason::FailedExecution => "REASON_FAILED_EXECUTION", - Reason::IntrinsicGas => "REASON_INTRINSIC_GAS", - Reason::PrecompiledContract => "REASON_PRECOMPILED_CONTRACT", - Reason::RefundAfterExecution => "REASON_REFUND_AFTER_EXECUTION", - Reason::Return => "REASON_RETURN", - Reason::ReturnDataCopy => "REASON_RETURN_DATA_COPY", - Reason::Revert => "REASON_REVERT", - Reason::SelfDestruct => "REASON_SELF_DESTRUCT", - Reason::StaticCall => "REASON_STATIC_CALL", - Reason::StateColdAccess => "REASON_STATE_COLD_ACCESS", + Self::Unknown => "REASON_UNKNOWN", + Self::Call => "REASON_CALL", + Self::CallCode => "REASON_CALL_CODE", + Self::CallDataCopy => "REASON_CALL_DATA_COPY", + Self::CodeCopy => "REASON_CODE_COPY", + Self::CodeStorage => "REASON_CODE_STORAGE", + Self::ContractCreation => "REASON_CONTRACT_CREATION", + Self::ContractCreation2 => "REASON_CONTRACT_CREATION2", + Self::DelegateCall => "REASON_DELEGATE_CALL", + Self::EventLog => "REASON_EVENT_LOG", + Self::ExtCodeCopy => "REASON_EXT_CODE_COPY", + Self::FailedExecution => "REASON_FAILED_EXECUTION", + Self::IntrinsicGas => "REASON_INTRINSIC_GAS", + Self::PrecompiledContract => "REASON_PRECOMPILED_CONTRACT", + Self::RefundAfterExecution => "REASON_REFUND_AFTER_EXECUTION", + Self::Return => "REASON_RETURN", + Self::ReturnDataCopy => "REASON_RETURN_DATA_COPY", + Self::Revert => "REASON_REVERT", + Self::SelfDestruct => "REASON_SELF_DESTRUCT", + Self::StaticCall => "REASON_STATIC_CALL", + Self::StateColdAccess => "REASON_STATE_COLD_ACCESS", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -763,10 +743,10 @@ impl TransactionTraceStatus { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - TransactionTraceStatus::Unknown => "UNKNOWN", - TransactionTraceStatus::Succeeded => "SUCCEEDED", - TransactionTraceStatus::Failed => "FAILED", - TransactionTraceStatus::Reverted => "REVERTED", + Self::Unknown => "UNKNOWN", + Self::Succeeded => "SUCCEEDED", + Self::Failed => "FAILED", + Self::Reverted => "REVERTED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -799,12 +779,12 @@ impl CallType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - CallType::Unspecified => "UNSPECIFIED", - CallType::Call => "CALL", - CallType::Callcode => "CALLCODE", - CallType::Delegate => "DELEGATE", - CallType::Static => "STATIC", - CallType::Create => "CREATE", + Self::Unspecified => "UNSPECIFIED", + Self::Call => "CALL", + Self::Callcode => "CALLCODE", + Self::Delegate => "DELEGATE", + Self::Static => "STATIC", + Self::Create => "CREATE", } } /// Creates an enum from field names used in the ProtoBuf definition. diff --git a/chain/near/build.rs b/chain/near/build.rs index 611f861baf2..0bb50d10b27 100644 --- a/chain/near/build.rs +++ b/chain/near/build.rs @@ -3,7 +3,7 @@ fn main() { tonic_build::configure() .out_dir("src/protobuf") .extern_path(".sf.near.codec.v1", "crate::codec::pbcodec") - .compile( + .compile_protos( &["proto/near.proto", "proto/substreams-triggers.proto"], &["proto"], ) diff --git a/chain/near/src/protobuf/receipts.v1.rs b/chain/near/src/protobuf/receipts.v1.rs index 00d3e2fe004..2b844103e9a 100644 --- a/chain/near/src/protobuf/receipts.v1.rs +++ b/chain/near/src/protobuf/receipts.v1.rs @@ -1,5 +1,4 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BlockAndReceipts { #[prost(message, optional, tag = "1")] diff --git a/chain/substreams/build.rs b/chain/substreams/build.rs index 8cccc11fe3a..330a01a8c68 100644 --- a/chain/substreams/build.rs +++ b/chain/substreams/build.rs @@ -3,6 +3,6 @@ fn main() { tonic_build::configure() .protoc_arg("--experimental_allow_proto3_optional") .out_dir("src/protobuf") - .compile(&["proto/codec.proto"], &["proto"]) + .compile_protos(&["proto/codec.proto"], &["proto"]) .expect("Failed to compile Substreams entity proto(s)"); } diff --git a/chain/substreams/src/protobuf/substreams.entity.v1.rs b/chain/substreams/src/protobuf/substreams.entity.v1.rs index 372748908d7..4077f281ad7 100644 --- a/chain/substreams/src/protobuf/substreams.entity.v1.rs +++ b/chain/substreams/src/protobuf/substreams.entity.v1.rs @@ -1,11 +1,9 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EntityChanges { #[prost(message, repeated, tag = "5")] pub entity_changes: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EntityChange { #[prost(string, tag = "1")] @@ -47,10 +45,10 @@ pub mod entity_change { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Operation::Unset => "UNSET", - Operation::Create => "CREATE", - Operation::Update => "UPDATE", - Operation::Delete => "DELETE", + Self::Unset => "UNSET", + Self::Create => "CREATE", + Self::Update => "UPDATE", + Self::Delete => "DELETE", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -65,7 +63,6 @@ pub mod entity_change { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Value { #[prost(oneof = "value::Typed", tags = "1, 2, 3, 4, 5, 6, 7, 10")] @@ -73,7 +70,6 @@ pub struct Value { } /// Nested message and enum types in `Value`. pub mod value { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Typed { #[prost(int32, tag = "1")] @@ -95,13 +91,11 @@ pub mod value { Array(super::Array), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Array { #[prost(message, repeated, tag = "1")] pub value: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Field { #[prost(string, tag = "1")] diff --git a/docs/implementation/add-chain.md b/docs/implementation/add-chain.md index f4af3371f25..718c89bf24a 100644 --- a/docs/implementation/add-chain.md +++ b/docs/implementation/add-chain.md @@ -45,7 +45,7 @@ fn main() { println!("cargo:rerun-if-changed=proto"); tonic_build::configure() .out_dir("src/protobuf") - .compile(&["proto/codec.proto"], &["proto"]) + .compile_protos(&["proto/codec.proto"], &["proto"]) .expect("Failed to compile Firehose CoolChain proto(s)"); } ``` diff --git a/graph/build.rs b/graph/build.rs index 53bbe421ab9..d67e110edf4 100644 --- a/graph/build.rs +++ b/graph/build.rs @@ -2,7 +2,7 @@ fn main() { println!("cargo:rerun-if-changed=proto"); tonic_build::configure() .out_dir("src/firehose") - .compile( + .compile_protos( &[ "proto/firehose.proto", "proto/ethereum/transforms.proto", @@ -15,7 +15,7 @@ fn main() { tonic_build::configure() .protoc_arg("--experimental_allow_proto3_optional") .out_dir("src/substreams") - .compile(&["proto/substreams.proto"], &["proto"]) + .compile_protos(&["proto/substreams.proto"], &["proto"]) .expect("Failed to compile Substreams proto(s)"); tonic_build::configure() @@ -23,6 +23,6 @@ fn main() { .extern_path(".sf.substreams.v1", "crate::substreams") .extern_path(".sf.firehose.v2", "crate::firehose") .out_dir("src/substreams_rpc") - .compile(&["proto/substreams-rpc.proto"], &["proto"]) + .compile_protos(&["proto/substreams-rpc.proto"], &["proto"]) .expect("Failed to compile Substreams RPC proto(s)"); } diff --git a/graph/src/firehose/endpoints.rs b/graph/src/firehose/endpoints.rs index 00b87ea21a4..825f3ddbd20 100644 --- a/graph/src/firehose/endpoints.rs +++ b/graph/src/firehose/endpoints.rs @@ -15,7 +15,7 @@ use crate::{ }; use async_trait::async_trait; use futures03::StreamExt; -use http0::uri::{Scheme, Uri}; +use http::uri::{Scheme, Uri}; use itertools::Itertools; use slog::{error, info, trace, Logger}; use std::{collections::HashMap, fmt::Display, ops::ControlFlow, sync::Arc, time::Duration}; diff --git a/graph/src/firehose/sf.ethereum.transform.v1.rs b/graph/src/firehose/sf.ethereum.transform.v1.rs index 1f313e956e0..8f80ce08ea3 100644 --- a/graph/src/firehose/sf.ethereum.transform.v1.rs +++ b/graph/src/firehose/sf.ethereum.transform.v1.rs @@ -17,7 +17,6 @@ /// the "block index" is always produced after the merged-blocks files /// are produced. Therefore, the "live" blocks are never filtered out. /// -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CombinedFilter { #[prost(message, repeated, tag = "1")] @@ -30,7 +29,6 @@ pub struct CombinedFilter { pub send_all_block_headers: bool, } /// MultiLogFilter concatenates the results of each LogFilter (inclusive OR) -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MultiLogFilter { #[prost(message, repeated, tag = "1")] @@ -41,7 +39,6 @@ pub struct MultiLogFilter { /// * 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. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LogFilter { #[prost(bytes = "vec", repeated, tag = "1")] @@ -51,7 +48,6 @@ pub struct LogFilter { pub event_signatures: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, } /// MultiCallToFilter concatenates the results of each CallToFilter (inclusive OR) -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MultiCallToFilter { #[prost(message, repeated, tag = "1")] @@ -62,7 +58,6 @@ pub struct MultiCallToFilter { /// * 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. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CallToFilter { #[prost(bytes = "vec", repeated, tag = "1")] @@ -72,8 +67,7 @@ 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::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. @@ -91,6 +85,5 @@ pub struct LightBlock {} /// ``` /// /// Everything else will be empty. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct HeaderOnly {} diff --git a/graph/src/firehose/sf.firehose.v2.rs b/graph/src/firehose/sf.firehose.v2.rs index b0980b35531..bca61385c71 100644 --- a/graph/src/firehose/sf.firehose.v2.rs +++ b/graph/src/firehose/sf.firehose.v2.rs @@ -1,5 +1,4 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SingleBlockRequest { #[prost(message, repeated, tag = "6")] @@ -10,14 +9,12 @@ 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 - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct BlockNumber { #[prost(uint64, tag = "1")] pub num: u64, } /// Get the current block with specific hash and number - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BlockHashAndNumber { #[prost(uint64, tag = "1")] @@ -26,13 +23,11 @@ pub mod single_block_request { pub hash: ::prost::alloc::string::String, } /// Get the block that generated a specific cursor - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Cursor { #[prost(string, tag = "1")] pub cursor: ::prost::alloc::string::String, } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Reference { #[prost(message, tag = "3")] @@ -43,13 +38,11 @@ pub mod single_block_request { Cursor(Cursor), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SingleBlockResponse { #[prost(message, optional, tag = "1")] pub block: ::core::option::Option<::prost_types::Any>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Request { /// Controls where the stream of blocks will start. @@ -90,7 +83,6 @@ pub struct Request { #[prost(message, repeated, tag = "10")] pub transforms: ::prost::alloc::vec::Vec<::prost_types::Any>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Response { /// Chain specific block payload, ex: @@ -104,10 +96,8 @@ pub struct Response { #[prost(string, tag = "10")] pub cursor: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct InfoRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InfoResponse { /// Canonical chain name from (ex: matic, mainnet ...). @@ -160,12 +150,12 @@ pub mod info_response { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - BlockIdEncoding::Unset => "BLOCK_ID_ENCODING_UNSET", - BlockIdEncoding::Hex => "BLOCK_ID_ENCODING_HEX", - BlockIdEncoding::BlockIdEncoding0xHex => "BLOCK_ID_ENCODING_0X_HEX", - BlockIdEncoding::Base58 => "BLOCK_ID_ENCODING_BASE58", - BlockIdEncoding::Base64 => "BLOCK_ID_ENCODING_BASE64", - BlockIdEncoding::Base64url => "BLOCK_ID_ENCODING_BASE64URL", + Self::Unset => "BLOCK_ID_ENCODING_UNSET", + Self::Hex => "BLOCK_ID_ENCODING_HEX", + Self::BlockIdEncoding0xHex => "BLOCK_ID_ENCODING_0X_HEX", + Self::Base58 => "BLOCK_ID_ENCODING_BASE58", + Self::Base64 => "BLOCK_ID_ENCODING_BASE64", + Self::Base64url => "BLOCK_ID_ENCODING_BASE64URL", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -201,10 +191,10 @@ impl ForkStep { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ForkStep::StepUnset => "STEP_UNSET", - ForkStep::StepNew => "STEP_NEW", - ForkStep::StepUndo => "STEP_UNDO", - ForkStep::StepFinal => "STEP_FINAL", + Self::StepUnset => "STEP_UNSET", + Self::StepNew => "STEP_NEW", + Self::StepUndo => "STEP_UNDO", + Self::StepFinal => "STEP_FINAL", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -220,7 +210,13 @@ impl ForkStep { } /// Generated client implementations. pub mod stream_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![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)] @@ -242,8 +238,8 @@ pub mod stream_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + 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); @@ -268,7 +264,7 @@ pub mod stream_client { >, , - >>::Error: Into + Send + Sync, + >>::Error: Into + std::marker::Send + std::marker::Sync, { StreamClient::new(InterceptedService::new(inner, interceptor)) } @@ -314,8 +310,7 @@ pub mod stream_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -332,7 +327,13 @@ pub mod stream_client { } /// Generated client implementations. pub mod fetch_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![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)] @@ -354,8 +355,8 @@ pub mod fetch_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + 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); @@ -380,7 +381,7 @@ pub mod fetch_client { >, , - >>::Error: Into + Send + Sync, + >>::Error: Into + std::marker::Send + std::marker::Sync, { FetchClient::new(InterceptedService::new(inner, interceptor)) } @@ -426,8 +427,7 @@ pub mod fetch_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -444,7 +444,13 @@ pub mod fetch_client { } /// Generated client implementations. pub mod endpoint_info_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![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)] @@ -466,8 +472,8 @@ pub mod endpoint_info_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + 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); @@ -492,7 +498,7 @@ pub mod endpoint_info_client { >, , - >>::Error: Into + Send + Sync, + >>::Error: Into + std::marker::Send + std::marker::Sync, { EndpointInfoClient::new(InterceptedService::new(inner, interceptor)) } @@ -535,8 +541,7 @@ pub mod endpoint_info_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -553,16 +558,22 @@ pub mod endpoint_info_client { } /// Generated server implementations. pub mod stream_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with StreamServer. #[async_trait] - pub trait Stream: Send + Sync + 'static { + pub trait Stream: std::marker::Send + std::marker::Sync + 'static { /// Server streaming response type for the Blocks method. type BlocksStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result, > - + Send + + std::marker::Send + 'static; async fn blocks( &self, @@ -570,20 +581,18 @@ pub mod stream_server { ) -> std::result::Result, tonic::Status>; } #[derive(Debug)] - pub struct StreamServer { - inner: _Inner, + pub struct StreamServer { + inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - struct _Inner(Arc); - impl StreamServer { + impl StreamServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), @@ -633,8 +642,8 @@ pub mod stream_server { impl tonic::codegen::Service> for StreamServer where T: Stream, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, + B: Body + std::marker::Send + 'static, + B::Error: Into + std::marker::Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -646,7 +655,6 @@ pub mod stream_server { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); match req.uri().path() { "/sf.firehose.v2.Stream/Blocks" => { #[allow(non_camel_case_types)] @@ -676,7 +684,6 @@ pub mod stream_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = BlocksSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -695,20 +702,25 @@ pub mod stream_server { } _ => { Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") - .body(empty_body()) - .unwrap(), - ) + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) }) } } } } - impl Clone for StreamServer { + impl Clone for StreamServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -720,27 +732,25 @@ pub mod stream_server { } } } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } - impl tonic::server::NamedService for StreamServer { - const NAME: &'static str = "sf.firehose.v2.Stream"; + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "sf.firehose.v2.Stream"; + impl tonic::server::NamedService for StreamServer { + const NAME: &'static str = SERVICE_NAME; } } /// Generated server implementations. pub mod fetch_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with FetchServer. #[async_trait] - pub trait Fetch: Send + Sync + 'static { + pub trait Fetch: std::marker::Send + std::marker::Sync + 'static { async fn block( &self, request: tonic::Request, @@ -750,20 +760,18 @@ pub mod fetch_server { >; } #[derive(Debug)] - pub struct FetchServer { - inner: _Inner, + pub struct FetchServer { + inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - struct _Inner(Arc); - impl FetchServer { + impl FetchServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), @@ -813,8 +821,8 @@ pub mod fetch_server { impl tonic::codegen::Service> for FetchServer where T: Fetch, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, + B: Body + std::marker::Send + 'static, + B::Error: Into + std::marker::Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -826,7 +834,6 @@ pub mod fetch_server { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); match req.uri().path() { "/sf.firehose.v2.Fetch/Block" => { #[allow(non_camel_case_types)] @@ -855,7 +862,6 @@ pub mod fetch_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = BlockSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -874,20 +880,25 @@ pub mod fetch_server { } _ => { Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") - .body(empty_body()) - .unwrap(), - ) + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) }) } } } } - impl Clone for FetchServer { + impl Clone for FetchServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -899,47 +910,43 @@ pub mod fetch_server { } } } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } - impl tonic::server::NamedService for FetchServer { - const NAME: &'static str = "sf.firehose.v2.Fetch"; + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "sf.firehose.v2.Fetch"; + impl tonic::server::NamedService for FetchServer { + const NAME: &'static str = SERVICE_NAME; } } /// Generated server implementations. pub mod endpoint_info_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with EndpointInfoServer. #[async_trait] - pub trait EndpointInfo: Send + Sync + 'static { + pub trait EndpointInfo: std::marker::Send + std::marker::Sync + 'static { async fn info( &self, request: tonic::Request, ) -> std::result::Result, tonic::Status>; } #[derive(Debug)] - pub struct EndpointInfoServer { - inner: _Inner, + pub struct EndpointInfoServer { + inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - struct _Inner(Arc); - impl EndpointInfoServer { + impl EndpointInfoServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), @@ -989,8 +996,8 @@ pub mod endpoint_info_server { impl tonic::codegen::Service> for EndpointInfoServer where T: EndpointInfo, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, + B: Body + std::marker::Send + 'static, + B::Error: Into + std::marker::Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -1002,7 +1009,6 @@ pub mod endpoint_info_server { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); match req.uri().path() { "/sf.firehose.v2.EndpointInfo/Info" => { #[allow(non_camel_case_types)] @@ -1031,7 +1037,6 @@ pub mod endpoint_info_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = InfoSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1050,20 +1055,25 @@ pub mod endpoint_info_server { } _ => { Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") - .body(empty_body()) - .unwrap(), - ) + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) }) } } } } - impl Clone for EndpointInfoServer { + impl Clone for EndpointInfoServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -1075,17 +1085,9 @@ pub mod endpoint_info_server { } } } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } - impl tonic::server::NamedService for EndpointInfoServer { - const NAME: &'static str = "sf.firehose.v2.EndpointInfo"; + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "sf.firehose.v2.EndpointInfo"; + impl tonic::server::NamedService for EndpointInfoServer { + const NAME: &'static str = SERVICE_NAME; } } diff --git a/graph/src/firehose/sf.near.transform.v1.rs b/graph/src/firehose/sf.near.transform.v1.rs index f76839cbd4c..2ec950da40b 100644 --- a/graph/src/firehose/sf.near.transform.v1.rs +++ b/graph/src/firehose/sf.near.transform.v1.rs @@ -1,5 +1,4 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BasicReceiptFilter { #[prost(string, repeated, tag = "1")] @@ -14,7 +13,6 @@ pub struct BasicReceiptFilter { /// * {prefix="",suffix=""} is invalid /// /// Note that the suffix will usually have a TLD, ex: "mydomain.near" or "mydomain.testnet" -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PrefixSuffixPair { #[prost(string, tag = "1")] diff --git a/graph/src/substreams/sf.substreams.v1.rs b/graph/src/substreams/sf.substreams.v1.rs index e27ed7b346d..dd6b8930293 100644 --- a/graph/src/substreams/sf.substreams.v1.rs +++ b/graph/src/substreams/sf.substreams.v1.rs @@ -1,5 +1,4 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Package { /// Needs to be one so this file can be used _directly_ as a @@ -22,7 +21,6 @@ pub struct Package { #[prost(string, tag = "11")] pub sink_module: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PackageMetadata { #[prost(string, tag = "1")] @@ -34,7 +32,6 @@ pub struct PackageMetadata { #[prost(string, tag = "4")] pub doc: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModuleMetadata { /// Corresponds to the index in `Package.metadata.package_meta` @@ -43,7 +40,6 @@ pub struct ModuleMetadata { #[prost(string, tag = "2")] pub doc: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Modules { #[prost(message, repeated, tag = "1")] @@ -52,7 +48,6 @@ pub struct Modules { pub binaries: ::prost::alloc::vec::Vec, } /// Binary represents some code compiled to its binary form. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Binary { #[prost(string, tag = "1")] @@ -60,7 +55,6 @@ pub struct Binary { #[prost(bytes = "vec", tag = "2")] pub content: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Module { #[prost(string, tag = "1")] @@ -82,7 +76,6 @@ pub struct Module { } /// Nested message and enum types in `Module`. pub mod module { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BlockFilter { #[prost(string, tag = "1")] @@ -92,7 +85,6 @@ pub mod module { } /// Nested message and enum types in `BlockFilter`. pub mod block_filter { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Query { #[prost(string, tag = "2")] @@ -101,16 +93,13 @@ pub mod module { QueryFromParams(super::QueryFromParams), } } - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct QueryFromParams {} - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct KindMap { #[prost(string, tag = "1")] pub output_type: ::prost::alloc::string::String, } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct KindStore { /// The `update_policy` determines the functions available to mutate the store @@ -164,14 +153,14 @@ pub mod module { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - UpdatePolicy::Unset => "UPDATE_POLICY_UNSET", - UpdatePolicy::Set => "UPDATE_POLICY_SET", - UpdatePolicy::SetIfNotExists => "UPDATE_POLICY_SET_IF_NOT_EXISTS", - UpdatePolicy::Add => "UPDATE_POLICY_ADD", - UpdatePolicy::Min => "UPDATE_POLICY_MIN", - UpdatePolicy::Max => "UPDATE_POLICY_MAX", - UpdatePolicy::Append => "UPDATE_POLICY_APPEND", - UpdatePolicy::SetSum => "UPDATE_POLICY_SET_SUM", + Self::Unset => "UPDATE_POLICY_UNSET", + Self::Set => "UPDATE_POLICY_SET", + Self::SetIfNotExists => "UPDATE_POLICY_SET_IF_NOT_EXISTS", + Self::Add => "UPDATE_POLICY_ADD", + Self::Min => "UPDATE_POLICY_MIN", + Self::Max => "UPDATE_POLICY_MAX", + Self::Append => "UPDATE_POLICY_APPEND", + Self::SetSum => "UPDATE_POLICY_SET_SUM", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -190,13 +179,11 @@ pub mod module { } } } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct KindBlockIndex { #[prost(string, tag = "1")] pub output_type: ::prost::alloc::string::String, } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Input { #[prost(oneof = "input::Input", tags = "1, 2, 3, 4")] @@ -204,21 +191,18 @@ pub mod module { } /// Nested message and enum types in `Input`. pub mod input { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Source { /// ex: "sf.ethereum.type.v1.Block" #[prost(string, tag = "1")] pub r#type: ::prost::alloc::string::String, } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Map { /// ex: "block_to_pairs" #[prost(string, tag = "1")] pub module_name: ::prost::alloc::string::String, } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Store { #[prost(string, tag = "1")] @@ -252,9 +236,9 @@ pub mod module { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Mode::Unset => "UNSET", - Mode::Get => "GET", - Mode::Deltas => "DELTAS", + Self::Unset => "UNSET", + Self::Get => "GET", + Self::Deltas => "DELTAS", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -268,13 +252,11 @@ pub mod module { } } } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Params { #[prost(string, tag = "1")] pub value: ::prost::alloc::string::String, } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Input { #[prost(message, tag = "1")] @@ -287,13 +269,11 @@ pub mod module { Params(Params), } } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Output { #[prost(string, tag = "1")] pub r#type: ::prost::alloc::string::String, } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Kind { #[prost(message, tag = "2")] @@ -305,7 +285,6 @@ pub mod module { } } /// Clock is a pointer to a block with added timestamp -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Clock { #[prost(string, tag = "1")] @@ -316,7 +295,6 @@ pub struct Clock { pub timestamp: ::core::option::Option<::prost_types::Timestamp>, } /// BlockRef is a pointer to a block to which we don't know the timestamp -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BlockRef { #[prost(string, tag = "1")] diff --git a/graph/src/substreams_rpc/sf.firehose.v2.rs b/graph/src/substreams_rpc/sf.firehose.v2.rs index ac86a47e505..905a7038bf5 100644 --- a/graph/src/substreams_rpc/sf.firehose.v2.rs +++ b/graph/src/substreams_rpc/sf.firehose.v2.rs @@ -1,7 +1,13 @@ // This file is @generated by prost-build. /// Generated client implementations. pub mod stream_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![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)] @@ -23,8 +29,8 @@ pub mod stream_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + 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); @@ -49,7 +55,7 @@ pub mod stream_client { >, , - >>::Error: Into + Send + Sync, + >>::Error: Into + std::marker::Send + std::marker::Sync, { StreamClient::new(InterceptedService::new(inner, interceptor)) } @@ -95,8 +101,7 @@ pub mod stream_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -113,7 +118,13 @@ pub mod stream_client { } /// Generated client implementations. pub mod fetch_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![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)] @@ -135,8 +146,8 @@ pub mod fetch_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + 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); @@ -161,7 +172,7 @@ pub mod fetch_client { >, , - >>::Error: Into + Send + Sync, + >>::Error: Into + std::marker::Send + std::marker::Sync, { FetchClient::new(InterceptedService::new(inner, interceptor)) } @@ -207,8 +218,7 @@ pub mod fetch_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -225,7 +235,13 @@ pub mod fetch_client { } /// Generated client implementations. pub mod endpoint_info_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![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)] @@ -247,8 +263,8 @@ pub mod endpoint_info_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + 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); @@ -273,7 +289,7 @@ pub mod endpoint_info_client { >, , - >>::Error: Into + Send + Sync, + >>::Error: Into + std::marker::Send + std::marker::Sync, { EndpointInfoClient::new(InterceptedService::new(inner, interceptor)) } @@ -319,8 +335,7 @@ pub mod endpoint_info_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -337,16 +352,22 @@ pub mod endpoint_info_client { } /// Generated server implementations. pub mod stream_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with StreamServer. #[async_trait] - pub trait Stream: Send + Sync + 'static { + pub trait Stream: std::marker::Send + std::marker::Sync + 'static { /// Server streaming response type for the Blocks method. type BlocksStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result, > - + Send + + std::marker::Send + 'static; async fn blocks( &self, @@ -354,20 +375,18 @@ pub mod stream_server { ) -> std::result::Result, tonic::Status>; } #[derive(Debug)] - pub struct StreamServer { - inner: _Inner, + pub struct StreamServer { + inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - struct _Inner(Arc); - impl StreamServer { + impl StreamServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), @@ -417,8 +436,8 @@ pub mod stream_server { impl tonic::codegen::Service> for StreamServer where T: Stream, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, + B: Body + std::marker::Send + 'static, + B::Error: Into + std::marker::Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -430,7 +449,6 @@ pub mod stream_server { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); match req.uri().path() { "/sf.firehose.v2.Stream/Blocks" => { #[allow(non_camel_case_types)] @@ -462,7 +480,6 @@ pub mod stream_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = BlocksSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -481,20 +498,25 @@ pub mod stream_server { } _ => { Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") - .body(empty_body()) - .unwrap(), - ) + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) }) } } } } - impl Clone for StreamServer { + impl Clone for StreamServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -506,27 +528,25 @@ pub mod stream_server { } } } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } - impl tonic::server::NamedService for StreamServer { - const NAME: &'static str = "sf.firehose.v2.Stream"; + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "sf.firehose.v2.Stream"; + impl tonic::server::NamedService for StreamServer { + const NAME: &'static str = SERVICE_NAME; } } /// Generated server implementations. pub mod fetch_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with FetchServer. #[async_trait] - pub trait Fetch: Send + Sync + 'static { + pub trait Fetch: std::marker::Send + std::marker::Sync + 'static { async fn block( &self, request: tonic::Request, @@ -536,20 +556,18 @@ pub mod fetch_server { >; } #[derive(Debug)] - pub struct FetchServer { - inner: _Inner, + pub struct FetchServer { + inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - struct _Inner(Arc); - impl FetchServer { + impl FetchServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), @@ -599,8 +617,8 @@ pub mod fetch_server { impl tonic::codegen::Service> for FetchServer where T: Fetch, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, + B: Body + std::marker::Send + 'static, + B::Error: Into + std::marker::Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -612,7 +630,6 @@ pub mod fetch_server { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); match req.uri().path() { "/sf.firehose.v2.Fetch/Block" => { #[allow(non_camel_case_types)] @@ -643,7 +660,6 @@ pub mod fetch_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = BlockSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -662,20 +678,25 @@ pub mod fetch_server { } _ => { Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") - .body(empty_body()) - .unwrap(), - ) + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) }) } } } } - impl Clone for FetchServer { + impl Clone for FetchServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -687,27 +708,25 @@ pub mod fetch_server { } } } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } - impl tonic::server::NamedService for FetchServer { - const NAME: &'static str = "sf.firehose.v2.Fetch"; + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "sf.firehose.v2.Fetch"; + impl tonic::server::NamedService for FetchServer { + const NAME: &'static str = SERVICE_NAME; } } /// Generated server implementations. pub mod endpoint_info_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with EndpointInfoServer. #[async_trait] - pub trait EndpointInfo: Send + Sync + 'static { + pub trait EndpointInfo: std::marker::Send + std::marker::Sync + 'static { async fn info( &self, request: tonic::Request, @@ -717,20 +736,18 @@ pub mod endpoint_info_server { >; } #[derive(Debug)] - pub struct EndpointInfoServer { - inner: _Inner, + pub struct EndpointInfoServer { + inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - struct _Inner(Arc); - impl EndpointInfoServer { + impl EndpointInfoServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), @@ -780,8 +797,8 @@ pub mod endpoint_info_server { impl tonic::codegen::Service> for EndpointInfoServer where T: EndpointInfo, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, + B: Body + std::marker::Send + 'static, + B::Error: Into + std::marker::Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -793,7 +810,6 @@ pub mod endpoint_info_server { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); match req.uri().path() { "/sf.firehose.v2.EndpointInfo/Info" => { #[allow(non_camel_case_types)] @@ -824,7 +840,6 @@ pub mod endpoint_info_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = InfoSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -843,20 +858,25 @@ pub mod endpoint_info_server { } _ => { Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") - .body(empty_body()) - .unwrap(), - ) + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) }) } } } } - impl Clone for EndpointInfoServer { + impl Clone for EndpointInfoServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -868,17 +888,9 @@ pub mod endpoint_info_server { } } } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } - impl tonic::server::NamedService for EndpointInfoServer { - const NAME: &'static str = "sf.firehose.v2.EndpointInfo"; + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "sf.firehose.v2.EndpointInfo"; + impl tonic::server::NamedService for EndpointInfoServer { + const NAME: &'static str = SERVICE_NAME; } } diff --git a/graph/src/substreams_rpc/sf.substreams.rpc.v2.rs b/graph/src/substreams_rpc/sf.substreams.rpc.v2.rs index 38a793e666f..ff69b343d29 100644 --- a/graph/src/substreams_rpc/sf.substreams.rpc.v2.rs +++ b/graph/src/substreams_rpc/sf.substreams.rpc.v2.rs @@ -1,5 +1,4 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Request { #[prost(int64, tag = "1")] @@ -47,7 +46,6 @@ pub struct Request { ::prost::alloc::string::String, >, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Response { #[prost(oneof = "response::Message", tags = "1, 2, 3, 4, 5, 10, 11")] @@ -55,7 +53,6 @@ pub struct Response { } /// Nested message and enum types in `Response`. pub mod response { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Message { /// Always sent first @@ -84,7 +81,6 @@ pub mod response { /// BlockUndoSignal informs you that every bit of data /// with a block number above 'last_valid_block' has been reverted /// on-chain. Delete that data and restart from 'last_valid_cursor' -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BlockUndoSignal { #[prost(message, optional, tag = "1")] @@ -92,7 +88,6 @@ pub struct BlockUndoSignal { #[prost(string, tag = "2")] pub last_valid_cursor: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BlockScopedData { #[prost(message, optional, tag = "1")] @@ -109,7 +104,6 @@ pub struct BlockScopedData { #[prost(message, repeated, tag = "11")] pub debug_store_outputs: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SessionInit { #[prost(string, tag = "1")] @@ -121,13 +115,11 @@ pub struct SessionInit { #[prost(uint64, tag = "4")] pub max_parallel_workers: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InitialSnapshotComplete { #[prost(string, tag = "1")] pub cursor: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InitialSnapshotData { #[prost(string, tag = "1")] @@ -139,7 +131,6 @@ pub struct InitialSnapshotData { #[prost(uint64, tag = "3")] pub total_keys: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MapModuleOutput { #[prost(string, tag = "1")] @@ -154,7 +145,6 @@ pub struct MapModuleOutput { /// It is not possible to retrieve store models in production, with /// parallelization enabled. If you need the deltas directly, write a pass /// through mapper module that will get them down to you. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreModuleOutput { #[prost(string, tag = "1")] @@ -164,7 +154,6 @@ pub struct StoreModuleOutput { #[prost(message, optional, tag = "10")] pub debug_info: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct OutputDebugInfo { #[prost(string, repeated, tag = "1")] @@ -178,7 +167,6 @@ pub struct OutputDebugInfo { pub cached: bool, } /// ModulesProgress is a message that is sent every 500ms -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModulesProgress { /// List of jobs running on tier2 servers @@ -193,15 +181,13 @@ pub struct ModulesProgress { #[prost(message, optional, tag = "5")] pub processed_bytes: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ProcessedBytes { #[prost(uint64, tag = "1")] pub total_bytes_read: u64, #[prost(uint64, tag = "2")] pub total_bytes_written: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Error { #[prost(string, tag = "1")] @@ -216,8 +202,7 @@ pub struct Error { #[prost(bool, tag = "4")] pub logs_truncated: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Job { #[prost(uint32, tag = "1")] pub stage: u32, @@ -230,7 +215,6 @@ pub struct Job { #[prost(uint64, tag = "5")] pub duration_ms: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Stage { #[prost(string, repeated, tag = "1")] @@ -241,7 +225,6 @@ pub struct Stage { /// ModuleStats gathers metrics and statistics from each module, running on tier1 /// or tier2 All the 'count' and 'time_ms' values may include duplicate for each /// stage going over that module -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModuleStats { /// name of the module @@ -291,7 +274,6 @@ pub struct ModuleStats { #[prost(uint64, tag = "15")] pub highest_contiguous_block: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExternalCallMetric { #[prost(string, tag = "1")] @@ -301,7 +283,6 @@ pub struct ExternalCallMetric { #[prost(uint64, tag = "3")] pub time_ms: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreDelta { #[prost(enumeration = "store_delta::Operation", tag = "1")] @@ -342,10 +323,10 @@ pub mod store_delta { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Operation::Unset => "UNSET", - Operation::Create => "CREATE", - Operation::Update => "UPDATE", - Operation::Delete => "DELETE", + Self::Unset => "UNSET", + Self::Create => "CREATE", + Self::Update => "UPDATE", + Self::Delete => "DELETE", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -360,8 +341,7 @@ pub mod store_delta { } } } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct BlockRange { #[prost(uint64, tag = "2")] pub start_block: u64, @@ -370,7 +350,13 @@ pub struct BlockRange { } /// Generated client implementations. pub mod endpoint_info_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![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)] @@ -392,8 +378,8 @@ pub mod endpoint_info_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + 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); @@ -418,7 +404,7 @@ pub mod endpoint_info_client { >, , - >>::Error: Into + Send + Sync, + >>::Error: Into + std::marker::Send + std::marker::Sync, { EndpointInfoClient::new(InterceptedService::new(inner, interceptor)) } @@ -464,8 +450,7 @@ pub mod endpoint_info_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -482,7 +467,13 @@ pub mod endpoint_info_client { } /// Generated client implementations. pub mod stream_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![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)] @@ -504,8 +495,8 @@ pub mod stream_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + 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); @@ -530,7 +521,7 @@ pub mod stream_client { >, , - >>::Error: Into + Send + Sync, + >>::Error: Into + std::marker::Send + std::marker::Sync, { StreamClient::new(InterceptedService::new(inner, interceptor)) } @@ -576,8 +567,7 @@ pub mod stream_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -594,11 +584,17 @@ pub mod stream_client { } /// Generated server implementations. pub mod endpoint_info_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with EndpointInfoServer. #[async_trait] - pub trait EndpointInfo: Send + Sync + 'static { + pub trait EndpointInfo: std::marker::Send + std::marker::Sync + 'static { async fn info( &self, request: tonic::Request, @@ -608,20 +604,18 @@ pub mod endpoint_info_server { >; } #[derive(Debug)] - pub struct EndpointInfoServer { - inner: _Inner, + pub struct EndpointInfoServer { + inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - struct _Inner(Arc); - impl EndpointInfoServer { + impl EndpointInfoServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), @@ -671,8 +665,8 @@ pub mod endpoint_info_server { impl tonic::codegen::Service> for EndpointInfoServer where T: EndpointInfo, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, + B: Body + std::marker::Send + 'static, + B::Error: Into + std::marker::Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -684,7 +678,6 @@ pub mod endpoint_info_server { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); match req.uri().path() { "/sf.substreams.rpc.v2.EndpointInfo/Info" => { #[allow(non_camel_case_types)] @@ -715,7 +708,6 @@ pub mod endpoint_info_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = InfoSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -734,20 +726,25 @@ pub mod endpoint_info_server { } _ => { Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") - .body(empty_body()) - .unwrap(), - ) + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) }) } } } } - impl Clone for EndpointInfoServer { + impl Clone for EndpointInfoServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -759,32 +756,30 @@ pub mod endpoint_info_server { } } } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } - impl tonic::server::NamedService for EndpointInfoServer { - const NAME: &'static str = "sf.substreams.rpc.v2.EndpointInfo"; + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "sf.substreams.rpc.v2.EndpointInfo"; + impl tonic::server::NamedService for EndpointInfoServer { + const NAME: &'static str = SERVICE_NAME; } } /// Generated server implementations. pub mod stream_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with StreamServer. #[async_trait] - pub trait Stream: Send + Sync + 'static { + pub trait Stream: std::marker::Send + std::marker::Sync + 'static { /// Server streaming response type for the Blocks method. type BlocksStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result, > - + Send + + std::marker::Send + 'static; async fn blocks( &self, @@ -792,20 +787,18 @@ pub mod stream_server { ) -> std::result::Result, tonic::Status>; } #[derive(Debug)] - pub struct StreamServer { - inner: _Inner, + pub struct StreamServer { + inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - struct _Inner(Arc); - impl StreamServer { + impl StreamServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), @@ -855,8 +848,8 @@ pub mod stream_server { impl tonic::codegen::Service> for StreamServer where T: Stream, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, + B: Body + std::marker::Send + 'static, + B::Error: Into + std::marker::Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -868,7 +861,6 @@ pub mod stream_server { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); match req.uri().path() { "/sf.substreams.rpc.v2.Stream/Blocks" => { #[allow(non_camel_case_types)] @@ -898,7 +890,6 @@ pub mod stream_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = BlocksSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -917,20 +908,25 @@ pub mod stream_server { } _ => { Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") - .body(empty_body()) - .unwrap(), - ) + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) }) } } } } - impl Clone for StreamServer { + impl Clone for StreamServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -942,17 +938,9 @@ pub mod stream_server { } } } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } - impl tonic::server::NamedService for StreamServer { - const NAME: &'static str = "sf.substreams.rpc.v2.Stream"; + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "sf.substreams.rpc.v2.Stream"; + impl tonic::server::NamedService for StreamServer { + const NAME: &'static str = SERVICE_NAME; } } diff --git a/substreams/substreams-trigger-filter/Cargo.toml b/substreams/substreams-trigger-filter/Cargo.toml index a3c736f2c92..f1880c3412b 100644 --- a/substreams/substreams-trigger-filter/Cargo.toml +++ b/substreams/substreams-trigger-filter/Cargo.toml @@ -10,12 +10,12 @@ crate-type = ["cdylib"] [dependencies] hex = { version = "0.4", default-features = false } -prost = "0.11.9" -substreams = "0.5" -substreams-entity-change = "1.3" -substreams-near-core = "0.10.1" +prost.workspace = true +substreams.workspace = true +substreams-entity-change.workspace = true +substreams-near-core.workspace = true trigger-filters.path = "../trigger-filters" [build-dependencies] -tonic-build = { version = "0.11.0", features = ["prost"] } +tonic-build.workspace = true diff --git a/substreams/substreams-trigger-filter/build.rs b/substreams/substreams-trigger-filter/build.rs index 3bb9182d874..22b972babc5 100644 --- a/substreams/substreams-trigger-filter/build.rs +++ b/substreams/substreams-trigger-filter/build.rs @@ -6,12 +6,7 @@ fn main() { ".sf.near.codec.v1", "::substreams_near_core::pb::sf::near::type::v1", ) - // .extern_path( - // ".sf.ethereum.type.v2", - // "graph_chain_ethereum::codec::pbcodec", - // ) - // .extern_path(".sf.arweave.type.v1", "graph_chain_arweave::codec::pbcodec") .out_dir("src/pb") - .compile(&["proto/receipts.proto"], &["proto"]) + .compile_protos(&["proto/receipts.proto"], &["proto"]) .expect("Failed to compile Substreams entity proto(s)"); } diff --git a/substreams/substreams-trigger-filter/src/pb/receipts.v1.rs b/substreams/substreams-trigger-filter/src/pb/receipts.v1.rs index dc5b47203ef..76b6d1fe456 100644 --- a/substreams/substreams-trigger-filter/src/pb/receipts.v1.rs +++ b/substreams/substreams-trigger-filter/src/pb/receipts.v1.rs @@ -1,5 +1,4 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BlockAndReceipts { #[prost(message, optional, tag = "1")] diff --git a/substreams/substreams-trigger-filter/src/pb/sf.near.type.v1.rs b/substreams/substreams-trigger-filter/src/pb/sf.near.type.v1.rs deleted file mode 100644 index ed60d39b47e..00000000000 --- a/substreams/substreams-trigger-filter/src/pb/sf.near.type.v1.rs +++ /dev/null @@ -1,1181 +0,0 @@ -// @generated -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Block { - #[prost(string, tag="1")] - pub author: ::prost::alloc::string::String, - #[prost(message, optional, tag="2")] - pub header: ::core::option::Option, - #[prost(message, repeated, tag="3")] - pub chunk_headers: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="4")] - pub shards: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="5")] - pub state_changes: ::prost::alloc::vec::Vec, -} -/// HeaderOnlyBlock is a standard \[Block\] structure where all other fields are -/// removed so that hydrating that object from a \[Block\] bytes payload will -/// drastically reduced allocated memory required to hold the full block. -/// -/// This can be used to unpack a \[Block\] when only the \[BlockHeader\] information -/// is required and greatly reduced required memory. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct HeaderOnlyBlock { - #[prost(message, optional, tag="2")] - pub header: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct StateChangeWithCause { - #[prost(message, optional, tag="1")] - pub value: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub cause: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct StateChangeCause { - #[prost(oneof="state_change_cause::Cause", tags="1, 2, 3, 4, 5, 6, 7, 8, 9, 10")] - pub cause: ::core::option::Option, -} -/// Nested message and enum types in `StateChangeCause`. -pub mod state_change_cause { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct NotWritableToDisk { - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct InitialState { - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct TransactionProcessing { - #[prost(message, optional, tag="1")] - pub tx_hash: ::core::option::Option, - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct ActionReceiptProcessingStarted { - #[prost(message, optional, tag="1")] - pub receipt_hash: ::core::option::Option, - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct ActionReceiptGasReward { - #[prost(message, optional, tag="1")] - pub tx_hash: ::core::option::Option, - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct ReceiptProcessing { - #[prost(message, optional, tag="1")] - pub tx_hash: ::core::option::Option, - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct PostponedReceipt { - #[prost(message, optional, tag="1")] - pub tx_hash: ::core::option::Option, - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct UpdatedDelayedReceipts { - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct ValidatorAccountsUpdate { - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct Migration { - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Cause { - #[prost(message, tag="1")] - NotWritableToDisk(NotWritableToDisk), - #[prost(message, tag="2")] - InitialState(InitialState), - #[prost(message, tag="3")] - TransactionProcessing(TransactionProcessing), - #[prost(message, tag="4")] - ActionReceiptProcessingStarted(ActionReceiptProcessingStarted), - #[prost(message, tag="5")] - ActionReceiptGasReward(ActionReceiptGasReward), - #[prost(message, tag="6")] - ReceiptProcessing(ReceiptProcessing), - #[prost(message, tag="7")] - PostponedReceipt(PostponedReceipt), - #[prost(message, tag="8")] - UpdatedDelayedReceipts(UpdatedDelayedReceipts), - #[prost(message, tag="9")] - ValidatorAccountsUpdate(ValidatorAccountsUpdate), - #[prost(message, tag="10")] - Migration(Migration), - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct StateChangeValue { - #[prost(oneof="state_change_value::Value", tags="1, 2, 3, 4, 5, 6, 7, 8")] - pub value: ::core::option::Option, -} -/// Nested message and enum types in `StateChangeValue`. -pub mod state_change_value { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct AccountUpdate { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, - #[prost(message, optional, tag="2")] - pub account: ::core::option::Option, - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct AccountDeletion { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct AccessKeyUpdate { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, - #[prost(message, optional, tag="2")] - pub public_key: ::core::option::Option, - #[prost(message, optional, tag="3")] - pub access_key: ::core::option::Option, - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct AccessKeyDeletion { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, - #[prost(message, optional, tag="2")] - pub public_key: ::core::option::Option, - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct DataUpdate { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, - #[prost(bytes="vec", tag="2")] - pub key: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="3")] - pub value: ::prost::alloc::vec::Vec, - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct DataDeletion { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, - #[prost(bytes="vec", tag="2")] - pub key: ::prost::alloc::vec::Vec, - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct ContractCodeUpdate { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, - #[prost(bytes="vec", tag="2")] - pub code: ::prost::alloc::vec::Vec, - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct ContractCodeDeletion { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Value { - #[prost(message, tag="1")] - AccountUpdate(AccountUpdate), - #[prost(message, tag="2")] - AccountDeletion(AccountDeletion), - #[prost(message, tag="3")] - AccessKeyUpdate(AccessKeyUpdate), - #[prost(message, tag="4")] - AccessKeyDeletion(AccessKeyDeletion), - #[prost(message, tag="5")] - DataUpdate(DataUpdate), - #[prost(message, tag="6")] - DataDeletion(DataDeletion), - #[prost(message, tag="7")] - ContractCodeUpdate(ContractCodeUpdate), - #[prost(message, tag="8")] - ContractDeletion(ContractCodeDeletion), - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Account { - #[prost(message, optional, tag="1")] - pub amount: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub locked: ::core::option::Option, - #[prost(message, optional, tag="3")] - pub code_hash: ::core::option::Option, - #[prost(uint64, tag="4")] - pub storage_usage: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BlockHeader { - #[prost(uint64, tag="1")] - pub height: u64, - #[prost(uint64, tag="2")] - pub prev_height: u64, - #[prost(message, optional, tag="3")] - pub epoch_id: ::core::option::Option, - #[prost(message, optional, tag="4")] - pub next_epoch_id: ::core::option::Option, - #[prost(message, optional, tag="5")] - pub hash: ::core::option::Option, - #[prost(message, optional, tag="6")] - pub prev_hash: ::core::option::Option, - #[prost(message, optional, tag="7")] - pub prev_state_root: ::core::option::Option, - #[prost(message, optional, tag="8")] - pub chunk_receipts_root: ::core::option::Option, - #[prost(message, optional, tag="9")] - pub chunk_headers_root: ::core::option::Option, - #[prost(message, optional, tag="10")] - pub chunk_tx_root: ::core::option::Option, - #[prost(message, optional, tag="11")] - pub outcome_root: ::core::option::Option, - #[prost(uint64, tag="12")] - pub chunks_included: u64, - #[prost(message, optional, tag="13")] - pub challenges_root: ::core::option::Option, - #[prost(uint64, tag="14")] - pub timestamp: u64, - #[prost(uint64, tag="15")] - pub timestamp_nanosec: u64, - #[prost(message, optional, tag="16")] - pub random_value: ::core::option::Option, - #[prost(message, repeated, tag="17")] - pub validator_proposals: ::prost::alloc::vec::Vec, - #[prost(bool, repeated, tag="18")] - pub chunk_mask: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="19")] - pub gas_price: ::core::option::Option, - #[prost(uint64, tag="20")] - pub block_ordinal: u64, - #[prost(message, optional, tag="21")] - pub total_supply: ::core::option::Option, - #[prost(message, repeated, tag="22")] - pub challenges_result: ::prost::alloc::vec::Vec, - #[prost(uint64, tag="23")] - pub last_final_block_height: u64, - #[prost(message, optional, tag="24")] - pub last_final_block: ::core::option::Option, - #[prost(uint64, tag="25")] - pub last_ds_final_block_height: u64, - #[prost(message, optional, tag="26")] - pub last_ds_final_block: ::core::option::Option, - #[prost(message, optional, tag="27")] - pub next_bp_hash: ::core::option::Option, - #[prost(message, optional, tag="28")] - pub block_merkle_root: ::core::option::Option, - #[prost(bytes="vec", tag="29")] - pub epoch_sync_data_hash: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="30")] - pub approvals: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="31")] - pub signature: ::core::option::Option, - #[prost(uint32, tag="32")] - pub latest_protocol_version: u32, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BigInt { - #[prost(bytes="vec", tag="1")] - pub bytes: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CryptoHash { - #[prost(bytes="vec", tag="1")] - pub bytes: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Signature { - #[prost(enumeration="CurveKind", tag="1")] - pub r#type: i32, - #[prost(bytes="vec", tag="2")] - pub bytes: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PublicKey { - #[prost(enumeration="CurveKind", tag="1")] - pub r#type: i32, - #[prost(bytes="vec", tag="2")] - pub bytes: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorStake { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, - #[prost(message, optional, tag="2")] - pub public_key: ::core::option::Option, - #[prost(message, optional, tag="3")] - pub stake: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SlashedValidator { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, - #[prost(bool, tag="2")] - pub is_double_sign: bool, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ChunkHeader { - #[prost(bytes="vec", tag="1")] - pub chunk_hash: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="2")] - pub prev_block_hash: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="3")] - pub outcome_root: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="4")] - pub prev_state_root: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="5")] - pub encoded_merkle_root: ::prost::alloc::vec::Vec, - #[prost(uint64, tag="6")] - pub encoded_length: u64, - #[prost(uint64, tag="7")] - pub height_created: u64, - #[prost(uint64, tag="8")] - pub height_included: u64, - #[prost(uint64, tag="9")] - pub shard_id: u64, - #[prost(uint64, tag="10")] - pub gas_used: u64, - #[prost(uint64, tag="11")] - pub gas_limit: u64, - #[prost(message, optional, tag="12")] - pub validator_reward: ::core::option::Option, - #[prost(message, optional, tag="13")] - pub balance_burnt: ::core::option::Option, - #[prost(bytes="vec", tag="14")] - pub outgoing_receipts_root: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="15")] - pub tx_root: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="16")] - pub validator_proposals: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="17")] - pub signature: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct IndexerShard { - #[prost(uint64, tag="1")] - pub shard_id: u64, - #[prost(message, optional, tag="2")] - pub chunk: ::core::option::Option, - #[prost(message, repeated, tag="3")] - pub receipt_execution_outcomes: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct IndexerExecutionOutcomeWithReceipt { - #[prost(message, optional, tag="1")] - pub execution_outcome: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub receipt: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct IndexerChunk { - #[prost(string, tag="1")] - pub author: ::prost::alloc::string::String, - #[prost(message, optional, tag="2")] - pub header: ::core::option::Option, - #[prost(message, repeated, tag="3")] - pub transactions: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="4")] - pub receipts: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct IndexerTransactionWithOutcome { - #[prost(message, optional, tag="1")] - pub transaction: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub outcome: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SignedTransaction { - #[prost(string, tag="1")] - pub signer_id: ::prost::alloc::string::String, - #[prost(message, optional, tag="2")] - pub public_key: ::core::option::Option, - #[prost(uint64, tag="3")] - pub nonce: u64, - #[prost(string, tag="4")] - pub receiver_id: ::prost::alloc::string::String, - #[prost(message, repeated, tag="5")] - pub actions: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="6")] - pub signature: ::core::option::Option, - #[prost(message, optional, tag="7")] - pub hash: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct IndexerExecutionOutcomeWithOptionalReceipt { - #[prost(message, optional, tag="1")] - pub execution_outcome: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub receipt: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Receipt { - #[prost(string, tag="1")] - pub predecessor_id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub receiver_id: ::prost::alloc::string::String, - #[prost(message, optional, tag="3")] - pub receipt_id: ::core::option::Option, - #[prost(oneof="receipt::Receipt", tags="10, 11")] - pub receipt: ::core::option::Option, -} -/// Nested message and enum types in `Receipt`. -pub mod receipt { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Receipt { - #[prost(message, tag="10")] - Action(super::ReceiptAction), - #[prost(message, tag="11")] - Data(super::ReceiptData), - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ReceiptData { - #[prost(message, optional, tag="1")] - pub data_id: ::core::option::Option, - #[prost(bytes="vec", tag="2")] - pub data: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ReceiptAction { - #[prost(string, tag="1")] - pub signer_id: ::prost::alloc::string::String, - #[prost(message, optional, tag="2")] - pub signer_public_key: ::core::option::Option, - #[prost(message, optional, tag="3")] - pub gas_price: ::core::option::Option, - #[prost(message, repeated, tag="4")] - pub output_data_receivers: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="5")] - pub input_data_ids: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="6")] - pub actions: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DataReceiver { - #[prost(message, optional, tag="1")] - pub data_id: ::core::option::Option, - #[prost(string, tag="2")] - pub receiver_id: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExecutionOutcomeWithId { - #[prost(message, optional, tag="1")] - pub proof: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub block_hash: ::core::option::Option, - #[prost(message, optional, tag="3")] - pub id: ::core::option::Option, - #[prost(message, optional, tag="4")] - pub outcome: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExecutionOutcome { - #[prost(string, repeated, tag="1")] - pub logs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(message, repeated, tag="2")] - pub receipt_ids: ::prost::alloc::vec::Vec, - #[prost(uint64, tag="3")] - pub gas_burnt: u64, - #[prost(message, optional, tag="4")] - pub tokens_burnt: ::core::option::Option, - #[prost(string, tag="5")] - pub executor_id: ::prost::alloc::string::String, - #[prost(enumeration="ExecutionMetadata", tag="6")] - pub metadata: i32, - #[prost(oneof="execution_outcome::Status", tags="20, 21, 22, 23")] - pub status: ::core::option::Option, -} -/// Nested message and enum types in `ExecutionOutcome`. -pub mod execution_outcome { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Status { - #[prost(message, tag="20")] - Unknown(super::UnknownExecutionStatus), - #[prost(message, tag="21")] - Failure(super::FailureExecutionStatus), - #[prost(message, tag="22")] - SuccessValue(super::SuccessValueExecutionStatus), - #[prost(message, tag="23")] - SuccessReceiptId(super::SuccessReceiptIdExecutionStatus), - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SuccessValueExecutionStatus { - #[prost(bytes="vec", tag="1")] - pub value: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SuccessReceiptIdExecutionStatus { - #[prost(message, optional, tag="1")] - pub id: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UnknownExecutionStatus { -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct FailureExecutionStatus { - #[prost(oneof="failure_execution_status::Failure", tags="1, 2")] - pub failure: ::core::option::Option, -} -/// Nested message and enum types in `FailureExecutionStatus`. -pub mod failure_execution_status { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Failure { - #[prost(message, tag="1")] - ActionError(super::ActionError), - #[prost(enumeration="super::InvalidTxError", tag="2")] - InvalidTxError(i32), - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ActionError { - #[prost(uint64, tag="1")] - pub index: u64, - #[prost(oneof="action_error::Kind", tags="21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42")] - pub kind: ::core::option::Option, -} -/// Nested message and enum types in `ActionError`. -pub mod action_error { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Kind { - #[prost(message, tag="21")] - AccountAlreadyExist(super::AccountAlreadyExistsErrorKind), - #[prost(message, tag="22")] - AccountDoesNotExist(super::AccountDoesNotExistErrorKind), - #[prost(message, tag="23")] - CreateAccountOnlyByRegistrar(super::CreateAccountOnlyByRegistrarErrorKind), - #[prost(message, tag="24")] - CreateAccountNotAllowed(super::CreateAccountNotAllowedErrorKind), - #[prost(message, tag="25")] - ActorNoPermission(super::ActorNoPermissionErrorKind), - #[prost(message, tag="26")] - DeleteKeyDoesNotExist(super::DeleteKeyDoesNotExistErrorKind), - #[prost(message, tag="27")] - AddKeyAlreadyExists(super::AddKeyAlreadyExistsErrorKind), - #[prost(message, tag="28")] - DeleteAccountStaking(super::DeleteAccountStakingErrorKind), - #[prost(message, tag="29")] - LackBalanceForState(super::LackBalanceForStateErrorKind), - #[prost(message, tag="30")] - TriesToUnstake(super::TriesToUnstakeErrorKind), - #[prost(message, tag="31")] - TriesToStake(super::TriesToStakeErrorKind), - #[prost(message, tag="32")] - InsufficientStake(super::InsufficientStakeErrorKind), - #[prost(message, tag="33")] - FunctionCall(super::FunctionCallErrorKind), - #[prost(message, tag="34")] - NewReceiptValidation(super::NewReceiptValidationErrorKind), - #[prost(message, tag="35")] - OnlyImplicitAccountCreationAllowed(super::OnlyImplicitAccountCreationAllowedErrorKind), - #[prost(message, tag="36")] - DeleteAccountWithLargeState(super::DeleteAccountWithLargeStateErrorKind), - #[prost(message, tag="37")] - DelegateActionInvalidSignature(super::DelegateActionInvalidSignatureKind), - #[prost(message, tag="38")] - DelegateActionSenderDoesNotMatchTxReceiver(super::DelegateActionSenderDoesNotMatchTxReceiverKind), - #[prost(message, tag="39")] - DelegateActionExpired(super::DelegateActionExpiredKind), - #[prost(message, tag="40")] - DelegateActionAccessKeyError(super::DelegateActionAccessKeyErrorKind), - #[prost(message, tag="41")] - DelegateActionInvalidNonce(super::DelegateActionInvalidNonceKind), - #[prost(message, tag="42")] - DelegateActionNonceTooLarge(super::DelegateActionNonceTooLargeKind), - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AccountAlreadyExistsErrorKind { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AccountDoesNotExistErrorKind { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, -} -/// / A top-level account ID can only be created by registrar. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateAccountOnlyByRegistrarErrorKind { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub registrar_account_id: ::prost::alloc::string::String, - #[prost(string, tag="3")] - pub predecessor_id: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateAccountNotAllowedErrorKind { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub predecessor_id: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ActorNoPermissionErrorKind { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub actor_id: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DeleteKeyDoesNotExistErrorKind { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, - #[prost(message, optional, tag="2")] - pub public_key: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AddKeyAlreadyExistsErrorKind { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, - #[prost(message, optional, tag="2")] - pub public_key: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DeleteAccountStakingErrorKind { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct LackBalanceForStateErrorKind { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, - #[prost(message, optional, tag="2")] - pub balance: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TriesToUnstakeErrorKind { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TriesToStakeErrorKind { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, - #[prost(message, optional, tag="2")] - pub stake: ::core::option::Option, - #[prost(message, optional, tag="3")] - pub locked: ::core::option::Option, - #[prost(message, optional, tag="4")] - pub balance: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct InsufficientStakeErrorKind { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, - #[prost(message, optional, tag="2")] - pub stake: ::core::option::Option, - #[prost(message, optional, tag="3")] - pub minimum_stake: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct FunctionCallErrorKind { - #[prost(enumeration="FunctionCallErrorSer", tag="1")] - pub error: i32, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct NewReceiptValidationErrorKind { - #[prost(enumeration="ReceiptValidationError", tag="1")] - pub error: i32, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct OnlyImplicitAccountCreationAllowedErrorKind { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DeleteAccountWithLargeStateErrorKind { - #[prost(string, tag="1")] - pub account_id: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DelegateActionInvalidSignatureKind { -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DelegateActionSenderDoesNotMatchTxReceiverKind { - #[prost(string, tag="1")] - pub sender_id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub receiver_id: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DelegateActionExpiredKind { -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DelegateActionAccessKeyErrorKind { - /// InvalidAccessKeyError - #[prost(enumeration="InvalidTxError", tag="1")] - pub error: i32, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DelegateActionInvalidNonceKind { - #[prost(uint64, tag="1")] - pub delegate_nonce: u64, - #[prost(uint64, tag="2")] - pub ak_nonce: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DelegateActionNonceTooLargeKind { - #[prost(uint64, tag="1")] - pub delegate_nonce: u64, - #[prost(uint64, tag="2")] - pub upper_bound: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MerklePath { - #[prost(message, repeated, tag="1")] - pub path: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MerklePathItem { - #[prost(message, optional, tag="1")] - pub hash: ::core::option::Option, - #[prost(enumeration="Direction", tag="2")] - pub direction: i32, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Action { - #[prost(oneof="action::Action", tags="1, 2, 3, 4, 5, 6, 7, 8, 9")] - pub action: ::core::option::Option, -} -/// Nested message and enum types in `Action`. -pub mod action { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Action { - #[prost(message, tag="1")] - CreateAccount(super::CreateAccountAction), - #[prost(message, tag="2")] - DeployContract(super::DeployContractAction), - #[prost(message, tag="3")] - FunctionCall(super::FunctionCallAction), - #[prost(message, tag="4")] - Transfer(super::TransferAction), - #[prost(message, tag="5")] - Stake(super::StakeAction), - #[prost(message, tag="6")] - AddKey(super::AddKeyAction), - #[prost(message, tag="7")] - DeleteKey(super::DeleteKeyAction), - #[prost(message, tag="8")] - DeleteAccount(super::DeleteAccountAction), - #[prost(message, tag="9")] - Delegate(super::SignedDelegateAction), - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateAccountAction { -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DeployContractAction { - #[prost(bytes="vec", tag="1")] - pub code: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct FunctionCallAction { - #[prost(string, tag="1")] - pub method_name: ::prost::alloc::string::String, - #[prost(bytes="vec", tag="2")] - pub args: ::prost::alloc::vec::Vec, - #[prost(uint64, tag="3")] - pub gas: u64, - #[prost(message, optional, tag="4")] - pub deposit: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TransferAction { - #[prost(message, optional, tag="1")] - pub deposit: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct StakeAction { - #[prost(message, optional, tag="1")] - pub stake: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub public_key: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AddKeyAction { - #[prost(message, optional, tag="1")] - pub public_key: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub access_key: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DeleteKeyAction { - #[prost(message, optional, tag="1")] - pub public_key: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DeleteAccountAction { - #[prost(string, tag="1")] - pub beneficiary_id: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SignedDelegateAction { - #[prost(message, optional, tag="1")] - pub signature: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub delegate_action: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DelegateAction { - #[prost(string, tag="1")] - pub sender_id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub receiver_id: ::prost::alloc::string::String, - #[prost(message, repeated, tag="3")] - pub actions: ::prost::alloc::vec::Vec, - #[prost(uint64, tag="4")] - pub nonce: u64, - #[prost(uint64, tag="5")] - pub max_block_height: u64, - #[prost(message, optional, tag="6")] - pub public_key: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AccessKey { - #[prost(uint64, tag="1")] - pub nonce: u64, - #[prost(message, optional, tag="2")] - pub permission: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AccessKeyPermission { - #[prost(oneof="access_key_permission::Permission", tags="1, 2")] - pub permission: ::core::option::Option, -} -/// Nested message and enum types in `AccessKeyPermission`. -pub mod access_key_permission { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Permission { - #[prost(message, tag="1")] - FunctionCall(super::FunctionCallPermission), - #[prost(message, tag="2")] - FullAccess(super::FullAccessPermission), - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct FunctionCallPermission { - #[prost(message, optional, tag="1")] - pub allowance: ::core::option::Option, - #[prost(string, tag="2")] - pub receiver_id: ::prost::alloc::string::String, - #[prost(string, repeated, tag="3")] - pub method_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct FullAccessPermission { -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum CurveKind { - Ed25519 = 0, - Secp256k1 = 1, -} -impl CurveKind { - /// 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 { - CurveKind::Ed25519 => "ED25519", - CurveKind::Secp256k1 => "SECP256K1", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "ED25519" => Some(Self::Ed25519), - "SECP256K1" => Some(Self::Secp256k1), - _ => None, - } - } -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum ExecutionMetadata { - V1 = 0, -} -impl ExecutionMetadata { - /// 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 { - ExecutionMetadata::V1 => "ExecutionMetadataV1", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "ExecutionMetadataV1" => Some(Self::V1), - _ => None, - } - } -} -/// todo: add more detail? -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum FunctionCallErrorSer { - CompilationError = 0, - LinkError = 1, - MethodResolveError = 2, - WasmTrap = 3, - WasmUnknownError = 4, - HostError = 5, - EvmError = 6, - ExecutionError = 7, -} -impl FunctionCallErrorSer { - /// 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 { - FunctionCallErrorSer::CompilationError => "CompilationError", - FunctionCallErrorSer::LinkError => "LinkError", - FunctionCallErrorSer::MethodResolveError => "MethodResolveError", - FunctionCallErrorSer::WasmTrap => "WasmTrap", - FunctionCallErrorSer::WasmUnknownError => "WasmUnknownError", - FunctionCallErrorSer::HostError => "HostError", - FunctionCallErrorSer::EvmError => "_EVMError", - FunctionCallErrorSer::ExecutionError => "ExecutionError", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "CompilationError" => Some(Self::CompilationError), - "LinkError" => Some(Self::LinkError), - "MethodResolveError" => Some(Self::MethodResolveError), - "WasmTrap" => Some(Self::WasmTrap), - "WasmUnknownError" => Some(Self::WasmUnknownError), - "HostError" => Some(Self::HostError), - "_EVMError" => Some(Self::EvmError), - "ExecutionError" => Some(Self::ExecutionError), - _ => None, - } - } -} -/// todo: add more detail? -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum ReceiptValidationError { - InvalidPredecessorId = 0, - InvalidReceiverAccountId = 1, - InvalidSignerAccountId = 2, - InvalidDataReceiverId = 3, - ReturnedValueLengthExceeded = 4, - NumberInputDataDependenciesExceeded = 5, - ActionsValidationError = 6, -} -impl ReceiptValidationError { - /// 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 { - ReceiptValidationError::InvalidPredecessorId => "InvalidPredecessorId", - ReceiptValidationError::InvalidReceiverAccountId => "InvalidReceiverAccountId", - ReceiptValidationError::InvalidSignerAccountId => "InvalidSignerAccountId", - ReceiptValidationError::InvalidDataReceiverId => "InvalidDataReceiverId", - ReceiptValidationError::ReturnedValueLengthExceeded => "ReturnedValueLengthExceeded", - ReceiptValidationError::NumberInputDataDependenciesExceeded => "NumberInputDataDependenciesExceeded", - ReceiptValidationError::ActionsValidationError => "ActionsValidationError", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "InvalidPredecessorId" => Some(Self::InvalidPredecessorId), - "InvalidReceiverAccountId" => Some(Self::InvalidReceiverAccountId), - "InvalidSignerAccountId" => Some(Self::InvalidSignerAccountId), - "InvalidDataReceiverId" => Some(Self::InvalidDataReceiverId), - "ReturnedValueLengthExceeded" => Some(Self::ReturnedValueLengthExceeded), - "NumberInputDataDependenciesExceeded" => Some(Self::NumberInputDataDependenciesExceeded), - "ActionsValidationError" => Some(Self::ActionsValidationError), - _ => None, - } - } -} -/// todo: add more detail? -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum InvalidTxError { - InvalidAccessKeyError = 0, - InvalidSignerId = 1, - SignerDoesNotExist = 2, - InvalidNonce = 3, - NonceTooLarge = 4, - InvalidReceiverId = 5, - InvalidSignature = 6, - NotEnoughBalance = 7, - LackBalanceForState = 8, - CostOverflow = 9, - InvalidChain = 10, - Expired = 11, - ActionsValidation = 12, - TransactionSizeExceeded = 13, -} -impl InvalidTxError { - /// 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 { - InvalidTxError::InvalidAccessKeyError => "InvalidAccessKeyError", - InvalidTxError::InvalidSignerId => "InvalidSignerId", - InvalidTxError::SignerDoesNotExist => "SignerDoesNotExist", - InvalidTxError::InvalidNonce => "InvalidNonce", - InvalidTxError::NonceTooLarge => "NonceTooLarge", - InvalidTxError::InvalidReceiverId => "InvalidReceiverId", - InvalidTxError::InvalidSignature => "InvalidSignature", - InvalidTxError::NotEnoughBalance => "NotEnoughBalance", - InvalidTxError::LackBalanceForState => "LackBalanceForState", - InvalidTxError::CostOverflow => "CostOverflow", - InvalidTxError::InvalidChain => "InvalidChain", - InvalidTxError::Expired => "Expired", - InvalidTxError::ActionsValidation => "ActionsValidation", - InvalidTxError::TransactionSizeExceeded => "TransactionSizeExceeded", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "InvalidAccessKeyError" => Some(Self::InvalidAccessKeyError), - "InvalidSignerId" => Some(Self::InvalidSignerId), - "SignerDoesNotExist" => Some(Self::SignerDoesNotExist), - "InvalidNonce" => Some(Self::InvalidNonce), - "NonceTooLarge" => Some(Self::NonceTooLarge), - "InvalidReceiverId" => Some(Self::InvalidReceiverId), - "InvalidSignature" => Some(Self::InvalidSignature), - "NotEnoughBalance" => Some(Self::NotEnoughBalance), - "LackBalanceForState" => Some(Self::LackBalanceForState), - "CostOverflow" => Some(Self::CostOverflow), - "InvalidChain" => Some(Self::InvalidChain), - "Expired" => Some(Self::Expired), - "ActionsValidation" => Some(Self::ActionsValidation), - "TransactionSizeExceeded" => Some(Self::TransactionSizeExceeded), - _ => None, - } - } -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum Direction { - Left = 0, - Right = 1, -} -impl Direction { - /// 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 { - Direction::Left => "left", - Direction::Right => "right", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "left" => Some(Self::Left), - "right" => Some(Self::Right), - _ => None, - } - } -} -// @@protoc_insertion_point(module)