From 1c9dd9d898465ec0bf4c45c2648e5e26ebf02a48 Mon Sep 17 00:00:00 2001 From: Kirill Fomichev Date: Wed, 20 Nov 2024 23:01:58 +0200 Subject: [PATCH] proto: implement encoding instead of clone to generated (#465) --- CHANGELOG.md | 14 + Cargo.lock | 1309 +++++++++++------ Cargo.toml | 30 +- examples/rust/Cargo.toml | 6 +- examples/rust/src/bin/client.rs | 109 +- examples/typescript/package-lock.json | 2 +- .../package-lock.json | 4 +- yellowstone-grpc-client-nodejs/package.json | 2 +- yellowstone-grpc-client/Cargo.toml | 2 +- yellowstone-grpc-geyser/Cargo.toml | 2 +- yellowstone-grpc-proto/Cargo.toml | 11 +- yellowstone-grpc-proto/benches/encode.rs | 77 + .../src/plugin/filter/filter.rs | 38 +- .../src/plugin/filter/message.rs | 697 ++++++++- yellowstone-grpc-proto/src/plugin/message.rs | 193 ++- 15 files changed, 1972 insertions(+), 524 deletions(-) create mode 100644 yellowstone-grpc-proto/benches/encode.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c9124af..1ebb97b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,19 @@ The minor version will be incremented upon a breaking change and the patch versi ### Fixes +### Features + +### Breaking + +## 2024-11-20 + +- yellowstone-grpc-client-simple-3.0.0 +- yellowstone-grpc-client-3.0.0 +- yellowstone-grpc-geyser-3.0.0 +- yellowstone-grpc-proto-3.0.0 + +### Fixes + - examples: fix commitment in TypeScript example ([#440](https://github.com/rpcpool/yellowstone-grpc/pull/440)) - geyser: fix missed status messages ([#444](https://github.com/rpcpool/yellowstone-grpc/pull/444)) @@ -28,6 +41,7 @@ The minor version will be incremented upon a breaking change and the patch versi - proto: move enum Message from geyser crate ([#459](https://github.com/rpcpool/yellowstone-grpc/pull/459)) - proto: move `Filter` from geyser crate ([#466](https://github.com/rpcpool/yellowstone-grpc/pull/466)) - geyser: serialize from custom message istead of generated ([#467](https://github.com/rpcpool/yellowstone-grpc/pull/467)) +- proto: implement encoding instead of clone to generated ([#465](https://github.com/rpcpool/yellowstone-grpc/pull/465)) ### Breaking diff --git a/Cargo.lock b/Cargo.lock index daf15600..fc1a7f8e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,18 +14,18 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aead" @@ -65,9 +65,9 @@ dependencies = [ [[package]] name = "agave-geyser-plugin-interface" -version = "2.0.10" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca0d15a8a92750675f9d20f156b7b08a012815f8214ab6de487259d1c279e939" +checksum = "5daafcf49211704741397bfc11d4d1888761e3c7b5938260c10b0e5d48e0635d" dependencies = [ "log", "solana-sdk", @@ -126,11 +126,17 @@ dependencies = [ "libc", ] +[[package]] +name = "anes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" + [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -143,43 +149,43 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "ark-bn254" @@ -300,15 +306,15 @@ dependencies = [ [[package]] name = "arrayref" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "ascii" @@ -324,9 +330,9 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "async-compression" -version = "0.4.12" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" +checksum = "0cb8f1d480b0ea3783ab015936d2a55c87e219676f0c0b7dec61494043f21857" dependencies = [ "brotli", "flate2", @@ -338,9 +344,9 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" dependencies = [ "async-stream-impl", "futures-core", @@ -349,24 +355,24 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -388,9 +394,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "autotools" @@ -403,9 +409,9 @@ dependencies = [ [[package]] name = "axum" -version = "0.7.5" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" dependencies = [ "async-trait", "axum-core", @@ -422,17 +428,17 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", - "sync_wrapper 1.0.1", - "tower", + "sync_wrapper 1.0.2", + "tower 0.5.1", "tower-layer", "tower-service", ] [[package]] name = "axum-core" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" dependencies = [ "async-trait", "bytes", @@ -443,7 +449,7 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper 0.1.2", + "sync_wrapper 1.0.2", "tower-layer", "tower-service", ] @@ -464,17 +470,17 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -560,29 +566,29 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "borsh" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" +checksum = "115e54d64eb62cdebad391c19efc9dce4981c690c85a33a12199d99bb9546fee" dependencies = [ - "borsh-derive 0.10.3", + "borsh-derive 0.10.4", "hashbrown 0.13.2", ] [[package]] name = "borsh" -version = "1.5.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" +checksum = "2506947f73ad44e344215ccd6403ac2ae18cd8e046e581a441bf8d199f257f03" dependencies = [ - "borsh-derive 1.5.1", + "borsh-derive 1.5.3", "cfg_aliases", ] [[package]] name = "borsh-derive" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" +checksum = "831213f80d9423998dd696e2c5345aba6be7a0bd8cd19e31c5243e13df1cef89" dependencies = [ "borsh-derive-internal", "borsh-schema-derive-internal", @@ -593,23 +599,22 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" +checksum = "c2593a3b8b938bd68373196c9832f516be11fa487ef4ae745eb282e6a56a7244" dependencies = [ "once_cell", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.72", - "syn_derive", + "syn 2.0.87", ] [[package]] name = "borsh-derive-internal" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" +checksum = "65d6ba50644c98714aa2a70d13d7df3cd75cd2b523a2b452bf010443800976b3" dependencies = [ "proc-macro2", "quote", @@ -618,9 +623,9 @@ dependencies = [ [[package]] name = "borsh-schema-derive-internal" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" +checksum = "276691d96f063427be83e6692b86148e488ebba9f48f77788724ca027ba3b6d4" dependencies = [ "proc-macro2", "quote", @@ -629,9 +634,9 @@ dependencies = [ [[package]] name = "brotli" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" +checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -675,22 +680,22 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.16.3" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "102087e286b4677862ea56cf8fc58bb2cdfa8725c40ffb80fe3a008eb7f2fc83" +checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" +checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -701,30 +706,37 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "cargo-lock" -version = "9.0.0" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e11c675378efb449ed3ce8de78d75d0d80542fc98487c26aba28eb3b82feac72" +checksum = "6469776d007022d505bbcc2be726f5f096174ae76d710ebc609eb3029a45b551" dependencies = [ "semver", "serde", - "toml 0.7.8", + "toml 0.8.19", "url", ] +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + [[package]] name = "cc" -version = "1.1.8" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504bdec147f2cc13c8b57ed9401fd8a147cc66b67ad5cb241394244f2c947549" +checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -754,6 +766,33 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "ciborium" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" + +[[package]] +name = "ciborium-ll" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" +dependencies = [ + "ciborium-io", + "half", +] + [[package]] name = "cipher" version = "0.4.4" @@ -766,9 +805,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.13" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fbb260a053428790f3de475e304ff84cdbc4face759ea7a3e64c1edd938a7fc" +checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" dependencies = [ "clap_builder", "clap_derive", @@ -776,9 +815,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.13" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64b17d7ea74e9f833c7dbf2cbe4fb12ff26783eda4782a8975b72f895c9b4d99" +checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" dependencies = [ "anstream", "anstyle", @@ -788,27 +827,27 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.13" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] name = "clap_lex" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "combine" @@ -858,9 +897,9 @@ dependencies = [ [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "core-foundation" @@ -874,15 +913,15 @@ dependencies = [ [[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 = "cpufeatures" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "0ca741a962e1b0bff6d724a1a0958b686406e853bb14061f218562e1896f95e6" dependencies = [ "libc", ] @@ -896,6 +935,42 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "criterion" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +dependencies = [ + "anes", + "cast", + "ciborium", + "clap", + "criterion-plot", + "is-terminal", + "itertools 0.10.5", + "num-traits", + "once_cell", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "walkdir", +] + +[[package]] +name = "criterion-plot" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +dependencies = [ + "cast", + "itertools 0.10.5", +] + [[package]] name = "crossbeam-channel" version = "0.5.13" @@ -905,6 +980,25 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.20" @@ -981,7 +1075,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -992,7 +1086,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -1023,33 +1117,33 @@ dependencies = [ [[package]] name = "derive_builder" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0350b5cb0331628a5916d6c5c0b72e97393b8b6b03b47a9284f4e7f5a405ffd7" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" dependencies = [ "derive_builder_macro", ] [[package]] name = "derive_builder_core" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48cda787f839151732d396ac69e3473923d54312c070ee21e9effcaa8ca0b1d" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] name = "derive_builder_macro" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -1072,6 +1166,17 @@ dependencies = [ "subtle", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "eager" version = "0.1.0" @@ -1127,9 +1232,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -1151,7 +1256,7 @@ checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -1208,9 +1313,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "feature-probe" @@ -1226,9 +1331,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.31" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "miniz_oxide", @@ -1251,9 +1356,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -1282,9 +1387,9 @@ checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -1305,7 +1410,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -1385,23 +1490,11 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "getset" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e45727250e75cc04ff2846a66397da8ef2b3db8e40e0cef4df67950a07621eb9" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "git-version" @@ -1420,7 +1513,7 @@ checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -1446,7 +1539,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.3.0", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -1455,9 +1548,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.5" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" dependencies = [ "atomic-waker", "bytes", @@ -1465,13 +1558,23 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.3.0", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", "tracing", ] +[[package]] +name = "half" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +dependencies = [ + "cfg-if", + "crunchy", +] + [[package]] name = "hash32" version = "0.2.1" @@ -1498,9 +1601,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" [[package]] name = "heck" @@ -1529,6 +1632,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "hex" version = "0.4.3" @@ -1643,9 +1752,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -1671,9 +1780,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.30" +version = "0.14.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" dependencies = [ "bytes", "futures-channel", @@ -1695,14 +1804,14 @@ dependencies = [ [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.5", + "h2 0.4.7", "http 1.1.0", "http-body 1.0.1", "httparse", @@ -1722,7 +1831,7 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.30", + "hyper 0.14.31", "rustls 0.21.12", "tokio", "tokio-rustls 0.24.1", @@ -1730,11 +1839,11 @@ dependencies = [ [[package]] name = "hyper-timeout" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 1.4.1", + "hyper 1.5.1", "hyper-util", "pin-project-lite", "tokio", @@ -1743,29 +1852,28 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.1", - "hyper 1.4.1", + "hyper 1.5.1", "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1784,6 +1892,124 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -1792,12 +2018,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "icu_normalizer", + "icu_properties", ] [[package]] @@ -1812,12 +2049,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.3.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.1", ] [[package]] @@ -1853,9 +2090,20 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" + +[[package]] +name = "is-terminal" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" +dependencies = [ + "hermit-abi 0.4.0", + "libc", + "windows-sys 0.52.0", +] [[package]] name = "is_terminal_polyfill" @@ -1881,11 +2129,20 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "540654e97a3f4470a492cd30ff187bc95d89557a903a2bbf112e2fae98104ef2" [[package]] name = "jobserver" @@ -1898,9 +2155,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -1922,9 +2179,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" [[package]] name = "libsecp256k1" @@ -1980,6 +2237,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "lock_api" version = "0.4.12" @@ -2052,18 +2315,18 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ "hermit-abi 0.3.9", "libc", @@ -2142,7 +2405,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -2201,10 +2464,10 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -2224,18 +2487,24 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.36.3" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" + +[[package]] +name = "oorandom" +version = "11.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "opaque-debug" @@ -2309,34 +2578,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.3.0", + "indexmap 2.6.0", ] [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -2346,9 +2615,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "plain" @@ -2356,6 +2625,34 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" +[[package]] +name = "plotters" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" +dependencies = [ + "num-traits", + "plotters-backend", + "plotters-svg", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" + +[[package]] +name = "plotters-svg" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" +dependencies = [ + "plotters-backend", +] + [[package]] name = "polyval" version = "0.6.2" @@ -2401,12 +2698,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.20" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -2420,42 +2717,18 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" -dependencies = [ - "toml_edit 0.21.1", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", + "toml_edit", ] [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -2487,12 +2760,12 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13db3d3fde688c61e2446b4d843bc27a7e8af269a69440c0308021dc92333cc" +checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" dependencies = [ "bytes", - "prost-derive 0.13.1", + "prost-derive 0.13.3", ] [[package]] @@ -2519,22 +2792,22 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb182580f71dd070f88d01ce3de9f4da5021db7115d2e1c3605a754153b77c1" +checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15" dependencies = [ "bytes", "heck 0.5.0", - "itertools 0.12.1", + "itertools 0.13.0", "log", "multimap 0.10.0", "once_cell", "petgraph", - "prettyplease 0.2.20", - "prost 0.13.1", - "prost-types 0.13.1", + "prettyplease 0.2.25", + "prost 0.13.3", + "prost-types 0.13.3", "regex", - "syn 2.0.72", + "syn 2.0.87", "tempfile", ] @@ -2553,15 +2826,15 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18bec9b0adc4eba778b33684b7ba3e7137789434769ee3ce3930463ef904cfca" +checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" dependencies = [ "anyhow", - "itertools 0.12.1", + "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -2575,11 +2848,11 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee5168b05f49d4b0ca581206eb14a7b22fafd963efe729ac48eb03266e25cc2" +checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" dependencies = [ - "prost 0.13.1", + "prost 0.13.3", ] [[package]] @@ -2608,9 +2881,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -2686,20 +2959,40 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "regex" -version = "1.10.6" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -2709,9 +3002,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -2720,9 +3013,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" @@ -2739,7 +3032,7 @@ dependencies = [ "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.30", + "hyper 0.14.31", "hyper-rustls", "ipnet", "js-sys", @@ -2790,18 +3083,18 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" dependencies = [ "bitflags 2.6.0", "errno", @@ -2824,15 +3117,15 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.12" +version = "0.23.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +checksum = "7f1a745511c54ba6d4465e8d5dfbd81b45791756de28d4981af70d6dca128f1e" dependencies = [ "log", "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.6", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] @@ -2844,7 +3137,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" dependencies = [ "openssl-probe", - "rustls-pemfile 2.1.3", + "rustls-pemfile 2.2.0", "rustls-pki-types", "schannel", "security-framework", @@ -2861,19 +3154,18 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" [[package]] name = "rustls-webpki" @@ -2887,9 +3179,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.6" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", @@ -2898,9 +3190,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ryu" @@ -2908,13 +3200,22 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2940,7 +3241,7 @@ checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -2968,9 +3269,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" dependencies = [ "core-foundation-sys", "libc", @@ -2987,9 +3288,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.205" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33aedb1a7135da52b7c21791455563facbbcc43d0f0f66165b42c21b3dfb150" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] @@ -3005,20 +3306,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.205" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692d6f5ac90220161d6774db30c662202721e64aed9058d2c394f451261420c1" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] name = "serde_json" -version = "1.0.122" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784b6203951c57ff748476b126ccb5e8e2959a5c19e5c617ab1956be3dbc68da" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "itoa", "memchr", @@ -3028,9 +3329,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -3066,7 +3367,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -3115,6 +3416,12 @@ dependencies = [ "keccak", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signature" version = "1.6.4" @@ -3154,9 +3461,9 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "2.0.10" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5687837ad876dec1d39cf98a72b7089cb5ae2250ab10415356861dfda3a5a374" +checksum = "579e643c71b7529b512faba433b5337184cf086d4a879c083b419eabb602dd94" dependencies = [ "Inflector", "base64 0.22.1", @@ -3179,9 +3486,9 @@ dependencies = [ [[package]] name = "solana-compute-budget" -version = "2.0.10" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a44d6bf7f6f90ade264fea97976d01198e24cea00ca3ab01e3c7d5c1609b9a2" +checksum = "9747d10c30a2beb91b6950b65788dbf74cb39beb53c58814a859f0cccb4ada97" dependencies = [ "rustc_version", "solana-sdk", @@ -3189,9 +3496,9 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "2.0.10" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e407e1e2bd056836e3fef1b27c9f41d52ccb83ddb6847a5e755432d15e6606" +checksum = "44106069aec6950a4769622ab0eb3213d00be8bbcb35355570f914367616257c" dependencies = [ "bincode", "chrono", @@ -3203,9 +3510,9 @@ dependencies = [ [[package]] name = "solana-curve25519" -version = "2.0.10" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33dfcbe23eacee29bd9eec8cdbc370b201e4309eb97672d7503db6f70841d9cd" +checksum = "0f42c6b987786d8cca7fc14749bbcbe514dd1e61d91b316b98ea1342cf670e18" dependencies = [ "bytemuck", "bytemuck_derive", @@ -3216,9 +3523,9 @@ dependencies = [ [[package]] name = "solana-logger" -version = "2.0.10" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df525978f892bcbac59c453585c98e8b4d85bbf18011efab97dcda278d358" +checksum = "e79a42aecca4cb913f52b39141fc7ce766350e46332a9df57d8f9d14661dc2c7" dependencies = [ "env_logger 0.9.3", "lazy_static", @@ -3227,9 +3534,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "2.0.10" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49bdddfff4c9c4bccad9129c850c781686194619ec8dfe025471fadf91131d44" +checksum = "128b0571ee7ffa4cb674f9dd88d15606d3c5a714ea07de3ab0a122735c340061" dependencies = [ "log", "solana-sdk", @@ -3237,9 +3544,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "2.0.10" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9252bd7e35e4cabcb583c4807a0e1f87a8bb7b49c96377a35fb26e7b77e525f" +checksum = "719e8c73cb13ac616a04cf7a2e318a05d67ce198d5500ffea725bbe11d23a2e2" dependencies = [ "crossbeam-channel", "gethostname", @@ -3252,9 +3559,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "2.0.10" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a675afa9b0a9e381ea377a27730b4f39fc05f2539607efc545723733029c89" +checksum = "59e18fa32fb3e915fd76faa6e8c73089d0f29dd15d9dd3970897e6d17dded920" dependencies = [ "ark-bn254", "ark-ec", @@ -3264,8 +3571,8 @@ dependencies = [ "bincode", "bitflags 2.6.0", "blake3", - "borsh 0.10.3", - "borsh 1.5.1", + "borsh 0.10.4", + "borsh 1.5.3", "bs58", "bv", "bytemuck", @@ -3298,9 +3605,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "2.0.10" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5048497166421d55eccd9bccd99dc960a123c7cc6f30a449ae4e86ad1b094253" +checksum = "a35691ece2b5e204e30a3d06bdd5e9c43d71693ee9c5ebb401f8d2b5dabe59d3" dependencies = [ "base64 0.22.1", "bincode", @@ -3327,13 +3634,13 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "2.0.10" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da5fa8db9b1835f96784b1cb6ab79e51d06cecc636657c64185b9ffa502abf7" +checksum = "02782e56b06086b6eefe98a807f084c81813cc441e0f1839981f1a5b01ad7a24" dependencies = [ "bincode", "bitflags 2.6.0", - "borsh 1.5.1", + "borsh 1.5.3", "bs58", "bytemuck", "bytemuck_derive", @@ -3376,15 +3683,15 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "2.0.10" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "193006436577cb4aa8e52fbb432c3f14c2d4d7b3b00f48f3485225ea9ca45a08" +checksum = "88859f5d5486fe029bc8937af5437fc027a2110bf9df34d5f8fbf46c7cf0497b" dependencies = [ "bs58", "proc-macro2", "quote", "rustversion", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -3395,9 +3702,9 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-storage-proto" -version = "2.0.10" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bedde2051ddfa8408a504db80a3007f7b0e9aba537ace9dd06c2187084e0a1a" +checksum = "7c3e76277b05467dab3bb4ea6eacdbb58bb6fa52cd7ff51168f69f669830505e" dependencies = [ "bincode", "bs58", @@ -3412,14 +3719,14 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "2.0.10" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41072f1d203936b13999777b7bdef5d8470cde596a24c2fbcfef637abc4ecc88" +checksum = "036c2189a6a5de419fc4ac887f5bee83bc6facea75cdcfe02773a8b83574f846" dependencies = [ "Inflector", "base64 0.22.1", "bincode", - "borsh 1.5.1", + "borsh 1.5.3", "bs58", "lazy_static", "log", @@ -3439,9 +3746,9 @@ dependencies = [ [[package]] name = "solana-type-overrides" -version = "2.0.10" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b3b90d698caabea32650ca44cf07869e8d2606e9ca1da1f5175dbf07efa5dc" +checksum = "80bb3af963b890ef6610357d454a30b157cc1f94eaf9e5fc2b8851a824a42583" dependencies = [ "lazy_static", "rand 0.8.5", @@ -3449,9 +3756,9 @@ dependencies = [ [[package]] name = "solana-vote" -version = "2.0.10" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b612dab26a213c71509a2ba260d7b1a8fbeb4c4ad22f050afaa0bae240b7c43d" +checksum = "51c6946fb194e001c3aef2ae8cf6385f4f819a09bbdcf2f87e418876697d47f5" dependencies = [ "itertools 0.12.1", "log", @@ -3464,9 +3771,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "2.0.10" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3a1344737f62481c5b8dfebd9be0598297394b57d21ef44704e5b49504cadc4" +checksum = "413a83694f06f0e299064ab294c5537aa00c5d8625d4bba9daf6037696ebfe1f" dependencies = [ "aes-gcm-siv", "base64 0.22.1", @@ -3525,7 +3832,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68034596cf4804880d265f834af1ff2f821ad5293e41fa0f8f59086c181fc38e" dependencies = [ "assert_matches", - "borsh 1.5.1", + "borsh 1.5.3", "num-derive", "num-traits", "solana-program", @@ -3553,7 +3860,7 @@ checksum = "d9e8418ea6269dcfb01c712f0444d2c75542c04448b480e87de59d2865edc750" dependencies = [ "quote", "spl-discriminator-syn", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -3565,7 +3872,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.72", + "syn 2.0.87", "thiserror", ] @@ -3584,7 +3891,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c704c88fc457fa649ba3aabe195c79d885c3f26709efaddc453c8de352c90b87" dependencies = [ - "borsh 1.5.1", + "borsh 1.5.3", "bytemuck", "bytemuck_derive", "solana-program", @@ -3614,7 +3921,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -3689,7 +3996,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6c2318ddff97e006ed9b1291ebec0750a78547f870f62a69c56fe3b46a5d8fc" dependencies = [ - "borsh 1.5.1", + "borsh 1.5.3", "solana-program", "spl-discriminator", "spl-pod", @@ -3726,6 +4033,12 @@ dependencies = [ "spl-program-error", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "strsim" version = "0.11.1" @@ -3751,27 +4064,15 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.72" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] -[[package]] -name = "syn_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.72", -] - [[package]] name = "sync_wrapper" version = "0.1.2" @@ -3780,9 +4081,20 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "sync_wrapper" -version = "1.0.1" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" + +[[package]] +name = "synstructure" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] [[package]] name = "system-configuration" @@ -3807,9 +4119,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.12.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", @@ -3829,22 +4141,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -3880,6 +4192,26 @@ dependencies = [ "time-core", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + [[package]] name = "tinyvec" version = "1.8.0" @@ -3897,9 +4229,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.2" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "bytes", @@ -3919,7 +4251,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -3938,7 +4270,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.12", + "rustls 0.23.17", "rustls-pki-types", "tokio", ] @@ -3956,9 +4288,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", @@ -3978,14 +4310,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.8" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.19.15", + "toml_edit", ] [[package]] @@ -3999,28 +4331,17 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.15" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.3.0", + "indexmap 2.6.0", "serde", "serde_spanned", "toml_datetime", "winnow", ] -[[package]] -name = "toml_edit" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap 2.3.0", - "toml_datetime", - "winnow", -] - [[package]] name = "tonic" version = "0.12.3" @@ -4033,23 +4354,23 @@ dependencies = [ "base64 0.22.1", "bytes", "flate2", - "h2 0.4.5", + "h2 0.4.7", "http 1.1.0", "http-body 1.0.1", "http-body-util", - "hyper 1.4.1", + "hyper 1.5.1", "hyper-timeout", "hyper-util", "percent-encoding", "pin-project", - "prost 0.13.1", + "prost 0.13.3", "rustls-native-certs", - "rustls-pemfile 2.1.3", + "rustls-pemfile 2.2.0", "socket2", "tokio", "tokio-rustls 0.26.0", "tokio-stream", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", @@ -4071,25 +4392,26 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "568392c5a2bd0020723e3f387891176aabafe36fd9fcd074ad309dfa0c8eb964" +checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" dependencies = [ - "prettyplease 0.2.20", + "prettyplease 0.2.25", "proc-macro2", - "prost-build 0.13.1", + "prost-build 0.13.3", + "prost-types 0.13.3", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] name = "tonic-health" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1e10e6a96ee08b6ce443487d4368442d328d0e746f3681f81127f7dc41b4955" +checksum = "1eaf34ddb812120f5c601162d5429933c9b527d901ab0e7f930d3147e33a09b2" dependencies = [ "async-stream", - "prost 0.13.1", + "prost 0.13.3", "tokio", "tokio-stream", "tonic", @@ -4115,17 +4437,31 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -4146,7 +4482,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -4170,26 +4506,11 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - [[package]] name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.23" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-width" @@ -4240,15 +4561,27 @@ dependencies = [ [[package]] name = "url" -version = "2.5.2" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -4257,9 +4590,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "vergen" -version = "9.0.0" +version = "9.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c32e7318e93a9ac53693b6caccfb05ff22e04a44c7cf8a279051f24c09da286f" +checksum = "349ed9e45296a581f455bc18039878f409992999bc1d5da12a6800eb18c8752f" dependencies = [ "anyhow", "derive_builder", @@ -4271,13 +4604,12 @@ dependencies = [ [[package]] name = "vergen-lib" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e06bee42361e43b60f363bad49d63798d0f42fb1768091812270eca00c784720" +checksum = "229eaddb0050920816cf051e619affaf18caa3dd512de8de5839ccbc8e53abb0" dependencies = [ "anyhow", "derive_builder", - "getset", "rustversion", ] @@ -4293,6 +4625,16 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "want" version = "0.3.1" @@ -4316,34 +4658,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -4353,9 +4696,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4363,28 +4706,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -4618,9 +4961,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.5.40" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -4635,9 +4978,21 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "yellowstone-grpc-client" -version = "2.0.0" +version = "3.0.0" dependencies = [ "bytes", "futures", @@ -4650,7 +5005,7 @@ dependencies = [ [[package]] name = "yellowstone-grpc-client-simple" -version = "2.0.0" +version = "3.0.0" dependencies = [ "anyhow", "backoff", @@ -4675,7 +5030,7 @@ dependencies = [ [[package]] name = "yellowstone-grpc-geyser" -version = "2.0.0" +version = "3.0.0" dependencies = [ "agave-geyser-plugin-interface", "anyhow", @@ -4691,7 +5046,7 @@ dependencies = [ "http 1.1.0", "http-body-util", "humantime-serde", - "hyper 1.4.1", + "hyper 1.5.1", "hyper-util", "lazy_static", "log", @@ -4713,7 +5068,7 @@ dependencies = [ [[package]] name = "yellowstone-grpc-proto" -version = "2.0.0" +version = "3.0.0" dependencies = [ "agave-geyser-plugin-interface", "anyhow", @@ -4721,8 +5076,9 @@ dependencies = [ "bincode", "bs58", "bytes", + "criterion", "prost 0.11.9", - "prost 0.13.1", + "prost 0.13.3", "protobuf-src", "serde", "smallvec", @@ -4733,7 +5089,31 @@ dependencies = [ "spl-token-2022", "thiserror", "tonic", - "tonic-build 0.12.1", + "tonic-build 0.12.3", +] + +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", ] [[package]] @@ -4754,7 +5134,28 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", +] + +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", ] [[package]] @@ -4774,7 +5175,29 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 35a55a3d..0e3a42a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,10 @@ [workspace] resolver = "2" members = [ - "examples/rust", # 2.0.0 - "yellowstone-grpc-client", # 2.0.0 - "yellowstone-grpc-geyser", # 2.0.0 - "yellowstone-grpc-proto", # 2.0.0 + "examples/rust", # 3.0.0 + "yellowstone-grpc-client", # 3.0.0 + "yellowstone-grpc-geyser", # 3.0.0 + "yellowstone-grpc-proto", # 3.0.0 ] [workspace.package] @@ -17,16 +17,17 @@ keywords = ["solana"] publish = false [workspace.dependencies] -agave-geyser-plugin-interface = "~2.0.10" +agave-geyser-plugin-interface = "~2.0.15" anyhow = "1.0.62" backoff = "0.4.0" base64 = "0.22.1" bincode = "1.3.3" bs58 = "0.5.1" bytes = "1.3.0" -cargo-lock = "9.0.0" +cargo-lock = "10.0.1" chrono = "0.4.26" clap = "4.3.0" +criterion = "0.5.1" crossbeam-channel = "0.5.8" env_logger = "0.11.3" futures = "0.3.24" @@ -47,25 +48,24 @@ prometheus = "0.13.2" prost = "0.13.1" prost_011 = { package = "prost", version = "0.11.9" } protobuf-src = "1.1.0" -scylla = "0.13.0" serde = "1.0.145" serde_json = "1.0.86" -solana-account-decoder = "~2.0.10" -solana-logger = "~2.0.10" -solana-sdk = "~2.0.10" -solana-storage-proto = "~2.0.10" -solana-transaction-status = "~2.0.10" +solana-account-decoder = "~2.0.15" +solana-logger = "~2.0.15" +solana-sdk = "~2.0.15" +solana-storage-proto = "~2.0.15" +solana-transaction-status = "~2.0.15" smallvec = "1.13.2" spl-token-2022 = "4.0.0" -thiserror = "1.0" +thiserror = "1.0.63" tokio = "1.21.2" tokio-stream = "0.1.11" tonic = "0.12.1" tonic-build = "0.12.1" tonic-health = "0.12.1" vergen = "9.0.0" -yellowstone-grpc-client = { path = "yellowstone-grpc-client", version = "2.0.0" } -yellowstone-grpc-proto = { path = "yellowstone-grpc-proto", version = "2.0.0", default-features = false } +yellowstone-grpc-client = { path = "yellowstone-grpc-client", version = "3.0.0" } +yellowstone-grpc-proto = { path = "yellowstone-grpc-proto", version = "3.0.0", default-features = false } [workspace.lints.clippy] clone_on_ref_ptr = "deny" diff --git a/examples/rust/Cargo.toml b/examples/rust/Cargo.toml index ee0ca7b9..e896cec4 100644 --- a/examples/rust/Cargo.toml +++ b/examples/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yellowstone-grpc-client-simple" -version = "2.0.0" +version = "3.0.0" authors = { workspace = true } edition = { workspace = true } homepage = { workspace = true } @@ -28,10 +28,10 @@ maplit = { workspace = true } serde_json = { workspace = true } solana-sdk = { workspace = true } solana-transaction-status = { workspace = true } -tokio = { workspace = true, features = ["rt-multi-thread"] } +tokio = { workspace = true, features = ["rt-multi-thread", "fs"] } tonic = { workspace = true } yellowstone-grpc-client = { workspace = true } -yellowstone-grpc-proto = { workspace = true, default-features = true } +yellowstone-grpc-proto = { workspace = true, features = ["plugin"] } [lints] workspace = true diff --git a/examples/rust/src/bin/client.rs b/examples/rust/src/bin/client.rs index 0ba205b9..9813e580 100644 --- a/examples/rust/src/bin/client.rs +++ b/examples/rust/src/bin/client.rs @@ -8,12 +8,19 @@ use { serde_json::{json, Value}, solana_sdk::{hash::Hash, pubkey::Pubkey, signature::Signature}, solana_transaction_status::UiTransactionEncoding, - std::{collections::HashMap, env, fs::File, sync::Arc, time::Duration}, - tokio::sync::Mutex, + std::{ + collections::HashMap, + env, + fs::File, + sync::Arc, + time::{Duration, Instant, SystemTime, UNIX_EPOCH}, + }, + tokio::{fs, sync::Mutex}, tonic::transport::channel::ClientTlsConfig, yellowstone_grpc_client::{GeyserGrpcClient, GeyserGrpcClientError, Interceptor}, yellowstone_grpc_proto::{ convert_from, + plugin::filter::message::FilteredUpdate, prelude::{ subscribe_request_filter_accounts_filter::Filter as AccountsFilterOneof, subscribe_request_filter_accounts_filter_lamports::Cmp as AccountsFilterLamports, @@ -258,13 +265,17 @@ struct ActionSubscribe { /// Show total stat instead of messages #[clap(long, default_value_t = false)] stats: bool, + + /// Verify manually implemented encoding against prost + #[clap(long, default_value_t = false)] + verify_encoding: bool, } impl Action { async fn get_subscribe_request( &self, commitment: Option, - ) -> anyhow::Result> { + ) -> anyhow::Result> { Ok(match self { Self::Subscribe(args) => { let mut accounts: AccountFilterMap = HashMap::new(); @@ -439,6 +450,7 @@ impl Action { }, args.resub.unwrap_or(0), args.stats, + args.verify_encoding, )) } _ => None, @@ -485,7 +497,7 @@ async fn main() -> anyhow::Result<()> { .map(|response| info!("response: {response:?}")), Action::HealthWatch => geyser_health_watch(client).await, Action::Subscribe(_) => { - let (request, resub, stats) = args + let (request, resub, stats, verify_encoding) = args .action .get_subscribe_request(commitment) .await @@ -494,7 +506,7 @@ async fn main() -> anyhow::Result<()> { "expect subscribe action" )))?; - geyser_subscribe(client, request, resub, stats).await + geyser_subscribe(client, request, resub, stats, verify_encoding).await } Action::Ping { count } => client .ping(*count) @@ -552,26 +564,29 @@ async fn geyser_subscribe( request: SubscribeRequest, resub: usize, stats: bool, + verify_encoding: bool, ) -> anyhow::Result<()> { let pb_multi = MultiProgress::new(); let mut pb_accounts_c = 0; - let pb_accounts = crate_progress_bar(&pb_multi, "accounts", false)?; + let pb_accounts = crate_progress_bar(&pb_multi, ProgressBarTpl::Msg("accounts"))?; let mut pb_slots_c = 0; - let pb_slots = crate_progress_bar(&pb_multi, "slots", false)?; + let pb_slots = crate_progress_bar(&pb_multi, ProgressBarTpl::Msg("slots"))?; let mut pb_txs_c = 0; - let pb_txs = crate_progress_bar(&pb_multi, "transactions", false)?; + let pb_txs = crate_progress_bar(&pb_multi, ProgressBarTpl::Msg("transactions"))?; let mut pb_txs_st_c = 0; - let pb_txs_st = crate_progress_bar(&pb_multi, "transactions statuses", false)?; + let pb_txs_st = crate_progress_bar(&pb_multi, ProgressBarTpl::Msg("transactions statuses"))?; let mut pb_entries_c = 0; - let pb_entries = crate_progress_bar(&pb_multi, "entries", false)?; + let pb_entries = crate_progress_bar(&pb_multi, ProgressBarTpl::Msg("entries"))?; let mut pb_blocks_mt_c = 0; - let pb_blocks_mt = crate_progress_bar(&pb_multi, "blocks meta", false)?; + let pb_blocks_mt = crate_progress_bar(&pb_multi, ProgressBarTpl::Msg("blocks meta"))?; let mut pb_blocks_c = 0; - let pb_blocks = crate_progress_bar(&pb_multi, "blocks", false)?; + let pb_blocks = crate_progress_bar(&pb_multi, ProgressBarTpl::Msg("blocks"))?; let mut pb_pp_c = 0; - let pb_pp = crate_progress_bar(&pb_multi, "ping/pong", false)?; + let pb_pp = crate_progress_bar(&pb_multi, ProgressBarTpl::Msg("ping/pong"))?; let mut pb_total_c = 0; - let pb_total = crate_progress_bar(&pb_multi, "total", true)?; + let pb_total = crate_progress_bar(&pb_multi, ProgressBarTpl::Total)?; + let mut pb_verify_c = verify_encoding.then_some((0, 0)); + let pb_verify = crate_progress_bar(&pb_multi, ProgressBarTpl::Verify)?; let (mut subscribe_tx, mut stream) = client.subscribe_with_request(Some(request)).await?; @@ -603,6 +618,49 @@ async fn geyser_subscribe( pb_total_c += 1; pb_total.set_message(format_thousands(pb_total_c)); pb_total.inc(encoded_len); + + if let Some((prost_c, ref_c)) = &mut pb_verify_c { + let encoded_len_prost0 = msg.encoded_len(); + let encoded_prost0 = msg.encode_to_vec(); + + let update = FilteredUpdate::from_subscribe_update(msg) + .map_err(|error| anyhow::anyhow!(error)) + .context("failed to convert update message to filtered update")?; + + let ts = Instant::now(); + let msg2 = update.as_subscribe_update(); + let encoded_len_prost = msg2.encoded_len(); + let encoded_prost = msg2.encode_to_vec(); + *prost_c += ts.elapsed().as_nanos(); + + let ts = Instant::now(); + let encoded_len_ref = update.encoded_len(); + let encoded_ref = update.encode_to_vec(); + *ref_c += ts.elapsed().as_nanos(); + + pb_verify.set_message(format!( + "{:.2?}%", + 100f64 * (*ref_c as f64) / (*prost_c as f64) + )); + + if encoded_len_prost0 != encoded_len_prost + || encoded_len_prost != encoded_len_ref + || encoded_prost0 != encoded_prost + || encoded_prost != encoded_ref + { + let dir = "grpc-client-verify"; + let name = SystemTime::now().duration_since(UNIX_EPOCH)?.as_nanos(); + let path = format!("{dir}/{name}"); + error!("found unmached message, save to `{path}`"); + fs::create_dir(dir) + .await + .context("failed to create dir for unmached")?; + fs::write(path, encoded_prost) + .await + .context("failed to save unmached")?; + } + } + continue; } @@ -752,14 +810,29 @@ async fn geyser_subscribe( Ok(()) } +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +enum ProgressBarTpl { + Msg(&'static str), + Total, + Verify, +} + fn crate_progress_bar( pb: &MultiProgress, - kind: &str, - elapsed: bool, + pb_t: ProgressBarTpl, ) -> Result { let pb = pb.add(ProgressBar::no_length()); - let elapsed = if elapsed { " in {elapsed_precise}" } else { "" }; - let tpl = format!("{{spinner}} {kind}: {{msg}} / ~{{bytes}} (~{{bytes_per_sec}}){elapsed}"); + let tpl = match pb_t { + ProgressBarTpl::Msg(kind) => { + format!("{{spinner}} {kind}: {{msg}} / ~{{bytes}} (~{{bytes_per_sec}})") + } + ProgressBarTpl::Total => { + "{spinner} total: {msg} / ~{bytes} (~{bytes_per_sec}) in {elapsed_precise}".to_owned() + } + ProgressBarTpl::Verify => { + "{spinner} verify: {msg} (elapsed time, compare to prost)".to_owned() + } + }; pb.set_style(ProgressStyle::with_template(&tpl)?); Ok(pb) } diff --git a/examples/typescript/package-lock.json b/examples/typescript/package-lock.json index cd59873d..348a1605 100644 --- a/examples/typescript/package-lock.json +++ b/examples/typescript/package-lock.json @@ -19,7 +19,7 @@ }, "../../yellowstone-grpc-client-nodejs": { "name": "@triton-one/yellowstone-grpc", - "version": "0.5.0", + "version": "1.0.0", "license": "Apache-2.0", "dependencies": { "@grpc/grpc-js": "^1.8.0" diff --git a/yellowstone-grpc-client-nodejs/package-lock.json b/yellowstone-grpc-client-nodejs/package-lock.json index e536ddfd..3b3f8a77 100644 --- a/yellowstone-grpc-client-nodejs/package-lock.json +++ b/yellowstone-grpc-client-nodejs/package-lock.json @@ -1,12 +1,12 @@ { "name": "@triton-one/yellowstone-grpc", - "version": "0.5.0", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@triton-one/yellowstone-grpc", - "version": "0.5.0", + "version": "1.0.0", "license": "Apache-2.0", "dependencies": { "@grpc/grpc-js": "^1.8.0" diff --git a/yellowstone-grpc-client-nodejs/package.json b/yellowstone-grpc-client-nodejs/package.json index 67d7748a..29d4aadb 100644 --- a/yellowstone-grpc-client-nodejs/package.json +++ b/yellowstone-grpc-client-nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@triton-one/yellowstone-grpc", - "version": "0.5.0", + "version": "1.0.0", "license": "Apache-2.0", "author": "Triton One", "description": "Yellowstone gRPC Geyser Node.js Client", diff --git a/yellowstone-grpc-client/Cargo.toml b/yellowstone-grpc-client/Cargo.toml index ac86606d..1f7ecae6 100644 --- a/yellowstone-grpc-client/Cargo.toml +++ b/yellowstone-grpc-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yellowstone-grpc-client" -version = "2.0.0" +version = "3.0.0" authors = { workspace = true } edition = { workspace = true } description = "Yellowstone gRPC Geyser Simple Client" diff --git a/yellowstone-grpc-geyser/Cargo.toml b/yellowstone-grpc-geyser/Cargo.toml index a2bb09e0..e8c959a9 100644 --- a/yellowstone-grpc-geyser/Cargo.toml +++ b/yellowstone-grpc-geyser/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yellowstone-grpc-geyser" -version = "2.0.0" +version = "3.0.0" authors = { workspace = true } edition = { workspace = true } description = "Yellowstone gRPC Geyser Plugin" diff --git a/yellowstone-grpc-proto/Cargo.toml b/yellowstone-grpc-proto/Cargo.toml index 7723e99d..cff5e014 100644 --- a/yellowstone-grpc-proto/Cargo.toml +++ b/yellowstone-grpc-proto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yellowstone-grpc-proto" -version = "2.0.0" +version = "3.0.0" authors = { workspace = true } edition = { workspace = true } description = "Yellowstone gRPC Geyser Protobuf Definitions" @@ -10,6 +10,11 @@ license = "Apache-2.0" keywords = { workspace = true } publish = true +[[bench]] +name = "encode" +harness = false +required-features = ["plugin-bench"] + [dependencies] agave-geyser-plugin-interface = { workspace = true, optional = true } base64 = { workspace = true, optional = true } @@ -17,9 +22,11 @@ bincode = { workspace = true, optional = true } bs58 = { workspace = true, optional = true } bytes = { workspace = true, optional = true } prost = { workspace = true } +prost_011 = { workspace = true, optional = true } serde = { workspace = true, optional = true } solana-account-decoder = { workspace = true, optional = true } solana-sdk = { workspace = true, optional = true } +solana-storage-proto = { workspace = true, optional = true } solana-transaction-status = { workspace = true, optional = true } smallvec = { workspace = true, optional = true } spl-token-2022 = { workspace = true, optional = true } @@ -27,6 +34,7 @@ thiserror = { workspace = true, optional = true } tonic = { workspace = true } [dev-dependencies] +criterion = { workspace = true } prost_011 = { workspace = true } solana-storage-proto = { workspace = true } @@ -54,6 +62,7 @@ plugin = [ "dep:spl-token-2022", "dep:thiserror" ] +plugin-bench = ["plugin", "dep:prost_011", "dep:solana-storage-proto"] tonic-compression = ["tonic/gzip", "tonic/zstd"] [lints] diff --git a/yellowstone-grpc-proto/benches/encode.rs b/yellowstone-grpc-proto/benches/encode.rs new file mode 100644 index 00000000..7dd07a26 --- /dev/null +++ b/yellowstone-grpc-proto/benches/encode.rs @@ -0,0 +1,77 @@ +use { + criterion::{criterion_group, criterion_main, BenchmarkId, Criterion}, + prost::Message as _, + std::time::Duration, + yellowstone_grpc_proto::plugin::{ + filter::message::{ + tests::{ + create_accounts, create_message_filters, load_predefined_blocks, + load_predefined_transactions, + }, + FilteredUpdate, FilteredUpdateOneof, + }, + message::MessageTransaction, + }, +}; + +fn bench_account(c: &mut Criterion) { + let filters = create_message_filters(&["my special filter"]); + + macro_rules! bench { + ($updates:expr, $kind:expr) => { + c.bench_with_input(BenchmarkId::new($kind, "ref"), $updates, |b, updates| { + b.iter(|| { + for update in updates.iter() { + update.encode_to_vec().len(); + } + }) + }); + c.bench_with_input(BenchmarkId::new($kind, "prost"), $updates, |b, updates| { + b.iter(|| { + for update in updates.iter() { + update.as_subscribe_update().encode_to_vec().len(); + } + }) + }); + }; + } + + let updates = create_accounts() + .into_iter() + .map(|(msg, data_slice)| FilteredUpdate { + filters: filters.clone(), + message: FilteredUpdateOneof::account(&msg, data_slice), + }) + .collect::>(); + bench!(&updates, "accounts"); + + let updates = load_predefined_transactions() + .into_iter() + .map(|transaction| FilteredUpdate { + filters: filters.clone(), + message: FilteredUpdateOneof::transaction(&MessageTransaction { + transaction, + slot: 42, + }), + }) + .collect::>(); + bench!(&updates, "transactions"); + + let updates = load_predefined_blocks() + .into_iter() + .map(|block| FilteredUpdate { + filters: filters.clone(), + message: FilteredUpdateOneof::block(Box::new(block)), + }) + .collect::>(); + bench!(&updates, "blocks"); +} + +criterion_group!( + name = benches; + config = Criterion::default() + .warm_up_time(Duration::from_secs(3)) // default 3 + .measurement_time(Duration::from_secs(5)); // default 5 + targets = bench_account +); +criterion_main!(benches); diff --git a/yellowstone-grpc-proto/src/plugin/filter/filter.rs b/yellowstone-grpc-proto/src/plugin/filter/filter.rs index bae12393..3591bd9c 100644 --- a/yellowstone-grpc-proto/src/plugin/filter/filter.rs +++ b/yellowstone-grpc-proto/src/plugin/filter/filter.rs @@ -31,6 +31,8 @@ use { }, }, base64::{engine::general_purpose::STANDARD as base64_engine, Engine}, + bytes::buf::BufMut, + prost::encoding::{encode_key, encode_varint, WireType}, solana_sdk::{ pubkey::{ParsePubkeyError, Pubkey}, signature::{ParseSignatureError, Signature}, @@ -975,7 +977,7 @@ impl FilterBlocksMeta { } } -#[derive(Debug, Clone, Default)] +#[derive(Debug, Clone, Default, PartialEq)] pub struct FilterAccountsDataSlice(Arc>>); impl AsRef<[Range]> for FilterAccountsDataSlice { @@ -1020,7 +1022,7 @@ impl FilterAccountsDataSlice { Self(slices) } - pub fn apply(&self, source: &[u8]) -> Vec { + pub fn get_slice(&self, source: &[u8]) -> Vec { if self.0.is_empty() { source.to_vec() } else { @@ -1033,6 +1035,38 @@ impl FilterAccountsDataSlice { data } } + + pub fn get_slice_len(&self, source: &[u8]) -> usize { + if self.0.is_empty() { + source.len() + } else { + let mut len = 0; + for slice in self.0.iter() { + if source.len() >= slice.end { + len += source[slice.start..slice.end].len(); + } + } + len + } + } + + pub fn slice_encode_raw(&self, tag: u32, source: &[u8], buf: &mut impl BufMut) { + let len = self.get_slice_len(source) as u64; + if len > 0 { + encode_key(tag, WireType::LengthDelimited, buf); + encode_varint(len, buf); + + if self.0.is_empty() { + buf.put_slice(source); + } else { + for data_slice in self.0.iter() { + if source.len() >= data_slice.end { + buf.put_slice(&source[data_slice.start..data_slice.end]); + } + } + } + } + } } #[cfg(test)] diff --git a/yellowstone-grpc-proto/src/plugin/filter/message.rs b/yellowstone-grpc-proto/src/plugin/filter/message.rs index 46fad082..8f9710db 100644 --- a/yellowstone-grpc-proto/src/plugin/filter/message.rs +++ b/yellowstone-grpc-proto/src/plugin/filter/message.rs @@ -1,32 +1,65 @@ use { crate::{ geyser::{ - subscribe_update::UpdateOneof, SubscribeUpdate, SubscribeUpdateAccount, - SubscribeUpdateAccountInfo, SubscribeUpdateBlock, SubscribeUpdateEntry, - SubscribeUpdatePing, SubscribeUpdatePong, SubscribeUpdateSlot, - SubscribeUpdateTransaction, SubscribeUpdateTransactionInfo, + subscribe_update::UpdateOneof, CommitmentLevel as CommitmentLevelProto, + SubscribeUpdate, SubscribeUpdateAccount, SubscribeUpdateAccountInfo, + SubscribeUpdateBlock, SubscribeUpdateEntry, SubscribeUpdatePing, SubscribeUpdatePong, + SubscribeUpdateSlot, SubscribeUpdateTransaction, SubscribeUpdateTransactionInfo, SubscribeUpdateTransactionStatus, }, plugin::{ filter::{name::FilterName, FilterAccountsDataSlice}, message::{ - MessageAccount, MessageAccountInfo, MessageBlockMeta, MessageEntry, MessageSlot, - MessageTransaction, MessageTransactionInfo, + MessageAccount, MessageAccountInfo, MessageBlock, MessageBlockMeta, MessageEntry, + MessageSlot, MessageTransaction, MessageTransactionInfo, }, }, + solana::storage::confirmed_block, }, bytes::buf::{Buf, BufMut}, prost::{ - encoding::{DecodeContext, WireType}, + encoding::{ + encode_key, encode_varint, encoded_len_varint, key_len, message, DecodeContext, + WireType, + }, DecodeError, }, smallvec::SmallVec, - std::sync::Arc, + solana_sdk::signature::Signature, + std::{collections::HashSet, sync::Arc}, }; +#[inline] +pub fn prost_field_encoded_len(tag: u32, len: usize) -> usize { + key_len(tag) + encoded_len_varint(len as u64) + len +} + +#[inline] +fn prost_bytes_encode_raw(tag: u32, value: &[u8], buf: &mut impl BufMut) { + encode_key(tag, WireType::LengthDelimited, buf); + encode_varint(value.len() as u64, buf); + buf.put(value); +} + +#[inline] +pub fn prost_bytes_encoded_len(tag: u32, value: &[u8]) -> usize { + prost_field_encoded_len(tag, value.len()) +} + +macro_rules! prost_repeated_encoded_len_map { + ($tag:expr, $values:expr, $get_len:expr) => {{ + key_len($tag) * $values.len() + + $values + .iter() + .map($get_len) + .map(|len| encoded_len_varint(len as u64) + len) + .sum::() + }}; +} + pub type FilteredUpdates = SmallVec<[FilteredUpdate; 2]>; -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq)] pub struct FilteredUpdate { pub filters: FilteredUpdateFilters, pub message: FilteredUpdateOneof, @@ -34,11 +67,17 @@ pub struct FilteredUpdate { impl prost::Message for FilteredUpdate { fn encode_raw(&self, buf: &mut impl BufMut) { - self.as_subscribe_update().encode_raw(buf) + for name in self.filters.iter().map(|filter| filter.as_ref()) { + encode_key(1u32, WireType::LengthDelimited, buf); + encode_varint(name.len() as u64, buf); + buf.put_slice(name.as_bytes()); + } + self.message.encode_raw(buf) } fn encoded_len(&self) -> usize { - self.as_subscribe_update().encoded_len() + prost_repeated_encoded_len_map!(1u32, self.filters, |filter| filter.as_ref().len()) + + self.message.encoded_len() } fn merge_field( @@ -75,7 +114,7 @@ impl FilteredUpdate { owner: message.owner.as_ref().into(), executable: message.executable, rent_epoch: message.rent_epoch, - data: data_slice.apply(&message.data), + data: data_slice.get_slice(&message.data), write_version: message.write_version, txn_signature: message.txn_signature.map(|s| s.as_ref().into()), } @@ -167,7 +206,7 @@ impl FilteredUpdate { }), FilteredUpdateOneof::Ping => UpdateOneof::Ping(SubscribeUpdatePing {}), FilteredUpdateOneof::Pong(msg) => UpdateOneof::Pong(*msg), - FilteredUpdateOneof::BlockMeta(msg) => UpdateOneof::BlockMeta(msg.0.as_ref().0.clone()), + FilteredUpdateOneof::BlockMeta(msg) => UpdateOneof::BlockMeta(msg.0.clone()), FilteredUpdateOneof::Entry(msg) => { UpdateOneof::Entry(Self::as_subscribe_update_entry(&msg.0)) } @@ -182,11 +221,79 @@ impl FilteredUpdate { update_oneof: Some(message), } } + + pub fn from_subscribe_update(update: SubscribeUpdate) -> Result { + let message = match update.update_oneof.ok_or("")? { + UpdateOneof::Account(msg) => { + let account = MessageAccount::from_update_oneof(msg)?; + FilteredUpdateOneof::Account(FilteredUpdateAccount { + account: account.account, + slot: account.slot, + is_startup: account.is_startup, + data_slice: FilterAccountsDataSlice::default(), + }) + } + UpdateOneof::Slot(msg) => { + let slot = MessageSlot::from_update_oneof(&msg)?; + FilteredUpdateOneof::Slot(FilteredUpdateSlot(slot)) + } + UpdateOneof::Transaction(msg) => { + let tx = MessageTransaction::from_update_oneof(msg)?; + FilteredUpdateOneof::Transaction(FilteredUpdateTransaction { + transaction: tx.transaction, + slot: tx.slot, + }) + } + UpdateOneof::TransactionStatus(msg) => { + FilteredUpdateOneof::TransactionStatus(FilteredUpdateTransactionStatus { + transaction: Arc::new(MessageTransactionInfo { + signature: Signature::try_from(msg.signature.as_slice()) + .map_err(|_| "invalid signature length")?, + is_vote: msg.is_vote, + transaction: confirmed_block::Transaction::default(), + meta: confirmed_block::TransactionStatusMeta { + err: msg.err, + ..confirmed_block::TransactionStatusMeta::default() + }, + index: msg.index as usize, + account_keys: HashSet::new(), + }), + slot: msg.slot, + }) + } + UpdateOneof::Block(msg) => { + let block = MessageBlock::from_update_oneof(msg)?; + FilteredUpdateOneof::Block(Box::new(FilteredUpdateBlock { + meta: block.meta, + transactions: block.transactions, + updated_account_count: block.updated_account_count, + accounts: block.accounts, + accounts_data_slice: FilterAccountsDataSlice::default(), + entries: block.entries, + })) + } + UpdateOneof::Ping(_) => FilteredUpdateOneof::Ping, + UpdateOneof::Pong(msg) => FilteredUpdateOneof::Pong(msg), + UpdateOneof::BlockMeta(msg) => { + let block_meta = MessageBlockMeta(msg); + FilteredUpdateOneof::BlockMeta(Arc::new(block_meta)) + } + UpdateOneof::Entry(msg) => { + let entry = MessageEntry::from_update_oneof(&msg)?; + FilteredUpdateOneof::Entry(FilteredUpdateEntry(Arc::new(entry))) + } + }; + + Ok(Self { + filters: update.filters.into_iter().map(FilterName::new).collect(), + message, + }) + } } pub type FilteredUpdateFilters = SmallVec<[FilterName; 4]>; -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq)] pub enum FilteredUpdateOneof { Account(FilteredUpdateAccount), // 2 Slot(FilteredUpdateSlot), // 3 @@ -195,7 +302,7 @@ pub enum FilteredUpdateOneof { Block(Box), // 5 Ping, // 6 Pong(SubscribeUpdatePong), // 9 - BlockMeta(FilteredUpdateBlockMeta), // 7 + BlockMeta(Arc), // 7 Entry(FilteredUpdateEntry), // 8 } @@ -240,7 +347,7 @@ impl FilteredUpdateOneof { } pub const fn block_meta(message: Arc) -> Self { - Self::BlockMeta(FilteredUpdateBlockMeta(message)) + Self::BlockMeta(message) } pub const fn entry(message: Arc) -> Self { @@ -248,7 +355,54 @@ impl FilteredUpdateOneof { } } -#[derive(Debug, Clone)] +impl prost::Message for FilteredUpdateOneof { + fn encode_raw(&self, buf: &mut impl BufMut) { + match self { + Self::Account(msg) => message::encode(2u32, msg, buf), + Self::Slot(msg) => message::encode(3u32, msg, buf), + Self::Transaction(msg) => message::encode(4u32, msg, buf), + Self::TransactionStatus(msg) => message::encode(10u32, msg, buf), + Self::Block(msg) => message::encode(5u32, msg, buf), + Self::Ping => { + encode_key(6u32, WireType::LengthDelimited, buf); + encode_varint(0, buf); + } + Self::Pong(msg) => message::encode(9u32, msg, buf), + Self::BlockMeta(msg) => message::encode(7u32, &msg.0, buf), + Self::Entry(msg) => message::encode(8u32, msg, buf), + } + } + + fn encoded_len(&self) -> usize { + match self { + Self::Account(msg) => message::encoded_len(2u32, msg), + Self::Slot(msg) => message::encoded_len(3u32, msg), + Self::Transaction(msg) => message::encoded_len(4u32, msg), + Self::TransactionStatus(msg) => message::encoded_len(10u32, msg), + Self::Block(msg) => message::encoded_len(5u32, msg), + Self::Ping => key_len(6u32) + encoded_len_varint(0), + Self::Pong(msg) => message::encoded_len(9u32, msg), + Self::BlockMeta(msg) => message::encoded_len(7u32, &msg.0), + Self::Entry(msg) => message::encoded_len(8u32, msg), + } + } + + fn merge_field( + &mut self, + _tag: u32, + _wire_type: WireType, + _buf: &mut impl Buf, + _ctx: DecodeContext, + ) -> Result<(), DecodeError> { + unimplemented!() + } + + fn clear(&mut self) { + unimplemented!() + } +} + +#[derive(Debug, Clone, PartialEq)] pub struct FilteredUpdateAccount { pub account: Arc, pub slot: u64, @@ -256,22 +410,305 @@ pub struct FilteredUpdateAccount { pub data_slice: FilterAccountsDataSlice, } -#[derive(Debug, Clone)] +impl prost::Message for FilteredUpdateAccount { + fn encode_raw(&self, buf: &mut impl BufMut) { + Self::account_encode_raw(1u32, &self.account, &self.data_slice, buf); + if self.slot != 0u64 { + ::prost::encoding::uint64::encode(2u32, &self.slot, buf); + } + if self.is_startup { + ::prost::encoding::bool::encode(3u32, &self.is_startup, buf); + } + } + + fn encoded_len(&self) -> usize { + prost_field_encoded_len( + 1u32, + Self::account_encoded_len(&self.account, &self.data_slice), + ) + if self.slot != 0u64 { + ::prost::encoding::uint64::encoded_len(2u32, &self.slot) + } else { + 0 + } + if self.is_startup { + ::prost::encoding::bool::encoded_len(3u32, &self.is_startup) + } else { + 0 + } + } + + fn merge_field( + &mut self, + _tag: u32, + _wire_type: WireType, + _buf: &mut impl Buf, + _ctx: DecodeContext, + ) -> Result<(), DecodeError> { + unimplemented!() + } + + fn clear(&mut self) { + unimplemented!() + } +} + +impl FilteredUpdateAccount { + fn account_encode_raw( + tag: u32, + account: &MessageAccountInfo, + data_slice: &FilterAccountsDataSlice, + buf: &mut impl BufMut, + ) { + encode_key(tag, WireType::LengthDelimited, buf); + encode_varint(Self::account_encoded_len(account, data_slice) as u64, buf); + + prost_bytes_encode_raw(1u32, account.pubkey.as_ref(), buf); + if account.lamports != 0u64 { + ::prost::encoding::uint64::encode(2u32, &account.lamports, buf); + } + prost_bytes_encode_raw(3u32, account.owner.as_ref(), buf); + if account.executable { + ::prost::encoding::bool::encode(4u32, &account.executable, buf); + } + if account.rent_epoch != 0u64 { + ::prost::encoding::uint64::encode(5u32, &account.rent_epoch, buf); + } + data_slice.slice_encode_raw(6u32, &account.data, buf); + if account.write_version != 0u64 { + ::prost::encoding::uint64::encode(7u32, &account.write_version, buf); + } + if let Some(value) = &account.txn_signature { + prost_bytes_encode_raw(8u32, value.as_ref(), buf); + } + } + + fn account_encoded_len( + account: &MessageAccountInfo, + data_slice: &FilterAccountsDataSlice, + ) -> usize { + let data_len = data_slice.get_slice_len(&account.data); + + prost_bytes_encoded_len(1u32, account.pubkey.as_ref()) + + if account.lamports != 0u64 { + ::prost::encoding::uint64::encoded_len(2u32, &account.lamports) + } else { + 0 + } + + prost_bytes_encoded_len(3u32, account.owner.as_ref()) + + if account.executable { + ::prost::encoding::bool::encoded_len(4u32, &account.executable) + } else { + 0 + } + + if account.rent_epoch != 0u64 { + ::prost::encoding::uint64::encoded_len(5u32, &account.rent_epoch) + } else { + 0 + } + + if data_len != 0 { + prost_field_encoded_len(6u32, data_len) + } else { + 0 + } + + if account.write_version != 0u64 { + ::prost::encoding::uint64::encoded_len(7u32, &account.write_version) + } else { + 0 + } + + account + .txn_signature + .map_or(0, |sig| prost_bytes_encoded_len(8u32, sig.as_ref())) + } +} + +#[derive(Debug, Clone, PartialEq)] pub struct FilteredUpdateSlot(MessageSlot); -#[derive(Debug, Clone)] +impl prost::Message for FilteredUpdateSlot { + fn encode_raw(&self, buf: &mut impl BufMut) { + let status = CommitmentLevelProto::from(self.0.status) as i32; + if self.0.slot != 0u64 { + ::prost::encoding::uint64::encode(1u32, &self.0.slot, buf); + } + if let ::core::option::Option::Some(ref value) = self.0.parent { + ::prost::encoding::uint64::encode(2u32, value, buf); + } + if status != CommitmentLevelProto::default() as i32 { + ::prost::encoding::int32::encode(3u32, &status, buf); + } + } + + fn encoded_len(&self) -> usize { + let status = CommitmentLevelProto::from(self.0.status) as i32; + + (if self.0.slot != 0u64 { + ::prost::encoding::uint64::encoded_len(1u32, &self.0.slot) + } else { + 0 + }) + self.0.parent.as_ref().map_or(0, |value| { + ::prost::encoding::uint64::encoded_len(2u32, value) + }) + if status != CommitmentLevelProto::default() as i32 { + ::prost::encoding::int32::encoded_len(3u32, &status) + } else { + 0 + } + } + + fn merge_field( + &mut self, + _tag: u32, + _wire_type: WireType, + _buf: &mut impl Buf, + _ctx: DecodeContext, + ) -> Result<(), DecodeError> { + unimplemented!() + } + + fn clear(&mut self) { + unimplemented!() + } +} + +#[derive(Debug, Clone, PartialEq)] pub struct FilteredUpdateTransaction { pub transaction: Arc, pub slot: u64, } -#[derive(Debug, Clone)] +impl prost::Message for FilteredUpdateTransaction { + fn encode_raw(&self, buf: &mut impl BufMut) { + Self::tx_encode_raw(1u32, &self.transaction, buf); + if self.slot != 0u64 { + ::prost::encoding::uint64::encode(2u32, &self.slot, buf); + } + } + + fn encoded_len(&self) -> usize { + prost_field_encoded_len(1u32, Self::tx_encoded_len(&self.transaction)) + + if self.slot != 0u64 { + ::prost::encoding::uint64::encoded_len(2u32, &self.slot) + } else { + 0 + } + } + + fn merge_field( + &mut self, + _tag: u32, + _wire_type: WireType, + _buf: &mut impl Buf, + _ctx: DecodeContext, + ) -> Result<(), DecodeError> { + unimplemented!() + } + + fn clear(&mut self) { + unimplemented!() + } +} + +impl FilteredUpdateTransaction { + fn tx_encode_raw(tag: u32, tx: &MessageTransactionInfo, buf: &mut impl BufMut) { + encode_key(tag, WireType::LengthDelimited, buf); + encode_varint(Self::tx_encoded_len(tx) as u64, buf); + + let index = tx.index as u64; + + prost_bytes_encode_raw(1u32, tx.signature.as_ref(), buf); + if tx.is_vote { + ::prost::encoding::bool::encode(2u32, &tx.is_vote, buf); + } + message::encode(3u32, &tx.transaction, buf); + message::encode(4u32, &tx.meta, buf); + if index != 0u64 { + ::prost::encoding::uint64::encode(5u32, &index, buf); + } + } + + fn tx_encoded_len(tx: &MessageTransactionInfo) -> usize { + let index = tx.index as u64; + + prost_bytes_encoded_len(1u32, tx.signature.as_ref()) + + if tx.is_vote { + ::prost::encoding::bool::encoded_len(2u32, &tx.is_vote) + } else { + 0 + } + + message::encoded_len(3u32, &tx.transaction) + + message::encoded_len(4u32, &tx.meta) + + if index != 0u64 { + ::prost::encoding::uint64::encoded_len(5u32, &index) + } else { + 0 + } + } +} + +#[derive(Debug, Clone, PartialEq)] pub struct FilteredUpdateTransactionStatus { pub transaction: Arc, pub slot: u64, } -#[derive(Debug, Clone)] +impl prost::Message for FilteredUpdateTransactionStatus { + fn encode_raw(&self, buf: &mut impl BufMut) { + if self.slot != 0u64 { + ::prost::encoding::uint64::encode(1u32, &self.slot, buf); + } + let tx = &self.transaction; + prost_bytes_encode_raw(2u32, tx.signature.as_ref(), buf); + if tx.is_vote { + ::prost::encoding::bool::encode(3u32, &tx.is_vote, buf); + } + let index = tx.index as u64; + if index != 0u64 { + ::prost::encoding::uint64::encode(4u32, &index, buf); + } + if let Some(msg) = &tx.meta.err { + message::encode(5u32, msg, buf) + } + } + + fn encoded_len(&self) -> usize { + let tx = &self.transaction; + let index = tx.index as u64; + + (if self.slot != 0u64 { + ::prost::encoding::uint64::encoded_len(1u32, &self.slot) + } else { + 0 + }) + prost_bytes_encoded_len(2u32, tx.signature.as_ref()) + + if tx.is_vote { + ::prost::encoding::bool::encoded_len(3u32, &tx.is_vote) + } else { + 0 + } + + if index != 0u64 { + ::prost::encoding::uint64::encoded_len(4u32, &index) + } else { + 0 + } + + tx.meta + .err + .as_ref() + .map_or(0, |msg| message::encoded_len(5u32, msg)) + } + + fn merge_field( + &mut self, + _tag: u32, + _wire_type: WireType, + _buf: &mut impl Buf, + _ctx: DecodeContext, + ) -> Result<(), DecodeError> { + unimplemented!() + } + + fn clear(&mut self) { + unimplemented!() + } +} + +#[derive(Debug, Clone, PartialEq)] pub struct FilteredUpdateBlock { pub meta: Arc, pub transactions: Vec>, @@ -281,14 +718,219 @@ pub struct FilteredUpdateBlock { pub entries: Vec>, } -#[derive(Debug, Clone)] -pub struct FilteredUpdateBlockMeta(Arc); +impl prost::Message for FilteredUpdateBlock { + fn encode_raw(&self, buf: &mut impl BufMut) { + if self.meta.slot != 0u64 { + ::prost::encoding::uint64::encode(1u32, &self.meta.slot, buf); + } + if !self.meta.blockhash.is_empty() { + ::prost::encoding::string::encode(2u32, &self.meta.blockhash, buf); + } + if let Some(msg) = &self.meta.rewards { + message::encode(3u32, msg, buf); + } + if let Some(msg) = &self.meta.block_time { + message::encode(4u32, msg, buf); + } + if let Some(msg) = &self.meta.block_height { + message::encode(5u32, msg, buf); + } + for tx in &self.transactions { + FilteredUpdateTransaction::tx_encode_raw(6u32, tx.as_ref(), buf); + } + if self.meta.parent_slot != 0u64 { + ::prost::encoding::uint64::encode(7u32, &self.meta.parent_slot, buf); + } + if !self.meta.parent_blockhash.is_empty() { + ::prost::encoding::string::encode(8u32, &self.meta.parent_blockhash, buf); + } + if self.meta.executed_transaction_count != 0u64 { + ::prost::encoding::uint64::encode(9u32, &self.meta.executed_transaction_count, buf); + } + if self.updated_account_count != 0u64 { + ::prost::encoding::uint64::encode(10u32, &self.updated_account_count, buf); + } + for account in &self.accounts { + FilteredUpdateAccount::account_encode_raw( + 11u32, + account.as_ref(), + &self.accounts_data_slice, + buf, + ); + } + if self.meta.entries_count != 0u64 { + ::prost::encoding::uint64::encode(12u32, &self.meta.entries_count, buf); + } + for entry in &self.entries { + encode_key(13u32, WireType::LengthDelimited, buf); + encode_varint( + FilteredUpdateEntry::entry_encoded_len(entry.as_ref()) as u64, + buf, + ); + FilteredUpdateEntry::entry_encode_raw(entry, buf); + } + } -#[derive(Debug, Clone)] + fn encoded_len(&self) -> usize { + (if self.meta.slot != 0u64 { + ::prost::encoding::uint64::encoded_len(1u32, &self.meta.slot) + } else { + 0 + }) + if !self.meta.blockhash.is_empty() { + ::prost::encoding::string::encoded_len(2u32, &self.meta.blockhash) + } else { + 0 + } + self + .meta + .rewards + .as_ref() + .map_or(0, |msg| message::encoded_len(3u32, msg)) + + self + .meta + .block_time + .as_ref() + .map_or(0, |msg| message::encoded_len(4u32, msg)) + + self + .meta + .block_height + .as_ref() + .map_or(0, |msg| message::encoded_len(5u32, msg)) + + prost_repeated_encoded_len_map!(6u32, self.transactions, |tx| { + FilteredUpdateTransaction::tx_encoded_len(tx.as_ref()) + }) + + if self.meta.parent_slot != 0u64 { + ::prost::encoding::uint64::encoded_len(7u32, &self.meta.parent_slot) + } else { + 0 + } + + if !self.meta.parent_blockhash.is_empty() { + ::prost::encoding::string::encoded_len(8u32, &self.meta.parent_blockhash) + } else { + 0 + } + + if self.meta.executed_transaction_count != 0u64 { + ::prost::encoding::uint64::encoded_len(9u32, &self.meta.executed_transaction_count) + } else { + 0 + } + + if self.updated_account_count != 0u64 { + ::prost::encoding::uint64::encoded_len(10u32, &self.updated_account_count) + } else { + 0 + } + + prost_repeated_encoded_len_map!(11u32, self.accounts, |account| { + FilteredUpdateAccount::account_encoded_len( + account.as_ref(), + &self.accounts_data_slice, + ) + }) + + if self.meta.entries_count != 0u64 { + ::prost::encoding::uint64::encoded_len(12u32, &self.meta.entries_count) + } else { + 0 + } + + prost_repeated_encoded_len_map!(13u32, self.entries, |entry| { + FilteredUpdateEntry::entry_encoded_len(entry) + }) + } + + fn merge_field( + &mut self, + _tag: u32, + _wire_type: WireType, + _buf: &mut impl Buf, + _ctx: DecodeContext, + ) -> Result<(), DecodeError> { + unimplemented!() + } + + fn clear(&mut self) { + unimplemented!() + } +} + +#[derive(Debug, Clone, PartialEq)] pub struct FilteredUpdateEntry(Arc); -#[cfg(test)] +impl prost::Message for FilteredUpdateEntry { + fn encode_raw(&self, buf: &mut impl BufMut) { + Self::entry_encode_raw(&self.0, buf) + } + + fn encoded_len(&self) -> usize { + Self::entry_encoded_len(&self.0) + } + + fn merge_field( + &mut self, + _tag: u32, + _wire_type: WireType, + _buf: &mut impl Buf, + _ctx: DecodeContext, + ) -> Result<(), DecodeError> { + unimplemented!() + } + + fn clear(&mut self) { + unimplemented!() + } +} + +impl FilteredUpdateEntry { + fn entry_encode_raw(entry: &MessageEntry, buf: &mut impl BufMut) { + let index = entry.index as u64; + + if entry.slot != 0u64 { + ::prost::encoding::uint64::encode(1u32, &entry.slot, buf); + } + if index != 0u64 { + ::prost::encoding::uint64::encode(2u32, &index, buf); + } + if entry.num_hashes != 0u64 { + ::prost::encoding::uint64::encode(3u32, &entry.num_hashes, buf); + } + prost_bytes_encode_raw(4u32, entry.hash.as_ref(), buf); + if entry.executed_transaction_count != 0u64 { + ::prost::encoding::uint64::encode(5u32, &entry.executed_transaction_count, buf); + } + if entry.starting_transaction_index != 0u64 { + ::prost::encoding::uint64::encode(6u32, &entry.starting_transaction_index, buf); + } + } + + fn entry_encoded_len(entry: &MessageEntry) -> usize { + let index = entry.index as u64; + + (if entry.slot != 0u64 { + ::prost::encoding::uint64::encoded_len(1u32, &entry.slot) + } else { + 0 + }) + if index != 0u64 { + ::prost::encoding::uint64::encoded_len(2u32, &index) + } else { + 0 + } + if entry.num_hashes != 0u64 { + ::prost::encoding::uint64::encoded_len(3u32, &entry.num_hashes) + } else { + 0 + } + prost_bytes_encoded_len(4u32, entry.hash.as_ref()) + + if entry.executed_transaction_count != 0u64 { + ::prost::encoding::uint64::encoded_len(5u32, &entry.executed_transaction_count) + } else { + 0 + } + + if entry.starting_transaction_index != 0u64 { + ::prost::encoding::uint64::encoded_len(6u32, &entry.starting_transaction_index) + } else { + 0 + } + } +} + +#[cfg(any(test, feature = "plugin-bench"))] pub mod tests { + #![cfg_attr(feature = "plugin-bench", allow(dead_code))] + #![cfg_attr(feature = "plugin-bench", allow(unused_imports))] use { super::{FilteredUpdate, FilteredUpdateBlock, FilteredUpdateFilters, FilteredUpdateOneof}, crate::{ @@ -548,6 +1190,11 @@ pub mod tests { SubscribeUpdate::decode(msg.encode_to_vec().as_slice()).expect("failed to decode"), update ); + assert_eq!( + FilteredUpdate::from_subscribe_update(update.clone()) + .map(|msg| msg.as_subscribe_update()), + Ok(update) + ); } #[test] diff --git a/yellowstone-grpc-proto/src/plugin/message.rs b/yellowstone-grpc-proto/src/plugin/message.rs index d019453c..ff1a7118 100644 --- a/yellowstone-grpc-proto/src/plugin/message.rs +++ b/yellowstone-grpc-proto/src/plugin/message.rs @@ -1,14 +1,24 @@ use { crate::{ convert_to, - geyser::{CommitmentLevel as CommitmentLevelProto, SubscribeUpdateBlockMeta}, + geyser::{ + subscribe_update::UpdateOneof, CommitmentLevel as CommitmentLevelProto, + SubscribeUpdateAccount, SubscribeUpdateAccountInfo, SubscribeUpdateBlock, + SubscribeUpdateBlockMeta, SubscribeUpdateEntry, SubscribeUpdateSlot, + SubscribeUpdateTransaction, SubscribeUpdateTransactionInfo, + }, solana::storage::confirmed_block, }, agave_geyser_plugin_interface::geyser_plugin_interface::{ ReplicaAccountInfoV3, ReplicaBlockInfoV4, ReplicaEntryInfoV2, ReplicaTransactionInfoV2, SlotStatus, }, - solana_sdk::{clock::Slot, hash::Hash, pubkey::Pubkey, signature::Signature}, + solana_sdk::{ + clock::Slot, + hash::{Hash, HASH_BYTES}, + pubkey::Pubkey, + signature::Signature, + }, std::{ collections::HashSet, ops::{Deref, DerefMut}, @@ -16,6 +26,8 @@ use { }, }; +type FromUpdateOneofResult = Result; + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] pub enum CommitmentLevel { Processed, @@ -53,7 +65,7 @@ impl From for CommitmentLevel { } } -#[derive(Debug, Clone, Copy)] +#[derive(Debug, Clone, Copy, PartialEq)] pub struct MessageSlot { pub slot: Slot, pub parent: Option, @@ -68,9 +80,19 @@ impl MessageSlot { status: status.into(), } } + + pub fn from_update_oneof(msg: &SubscribeUpdateSlot) -> FromUpdateOneofResult { + Ok(Self { + slot: msg.slot, + parent: msg.parent, + status: CommitmentLevelProto::try_from(msg.status) + .map_err(|_| "failed to parse commitment level")? + .into(), + }) + } } -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq)] pub struct MessageAccountInfo { pub pubkey: Pubkey, pub lamports: u64, @@ -95,9 +117,27 @@ impl MessageAccountInfo { txn_signature: info.txn.map(|txn| *txn.signature()), } } + + pub fn from_update_oneof(msg: SubscribeUpdateAccountInfo) -> FromUpdateOneofResult { + Ok(Self { + pubkey: Pubkey::try_from(msg.pubkey.as_slice()).map_err(|_| "invalid pubkey length")?, + lamports: msg.lamports, + owner: Pubkey::try_from(msg.owner.as_slice()).map_err(|_| "invalid owner length")?, + executable: msg.executable, + rent_epoch: msg.rent_epoch, + data: msg.data, + write_version: msg.write_version, + txn_signature: msg + .txn_signature + .map(|sig| { + Signature::try_from(sig.as_slice()).map_err(|_| "invalid signature length") + }) + .transpose()?, + }) + } } -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq)] pub struct MessageAccount { pub account: Arc, pub slot: Slot, @@ -112,9 +152,19 @@ impl MessageAccount { is_startup, } } + + pub fn from_update_oneof(msg: SubscribeUpdateAccount) -> FromUpdateOneofResult { + Ok(Self { + account: Arc::new(MessageAccountInfo::from_update_oneof( + msg.account.ok_or("account message should be defined")?, + )?), + slot: msg.slot, + is_startup: msg.is_startup, + }) + } } -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq)] pub struct MessageTransactionInfo { pub signature: Signature, pub is_vote: bool, @@ -143,9 +193,54 @@ impl MessageTransactionInfo { account_keys, } } + + pub fn from_update_oneof(msg: SubscribeUpdateTransactionInfo) -> FromUpdateOneofResult { + Ok(Self { + signature: Signature::try_from(msg.signature.as_slice()) + .map_err(|_| "invalid signature length")?, + is_vote: msg.is_vote, + transaction: msg + .transaction + .ok_or("transaction message should be defined")?, + meta: msg.meta.ok_or("meta message should be defined")?, + index: msg.index as usize, + account_keys: HashSet::new(), + }) + } + + pub fn fill_account_keys(&mut self) -> FromUpdateOneofResult<()> { + let mut account_keys = HashSet::new(); + + // static + if let Some(pubkeys) = self + .transaction + .message + .as_ref() + .map(|msg| msg.account_keys.as_slice()) + { + for pubkey in pubkeys { + account_keys.insert( + Pubkey::try_from(pubkey.as_slice()).map_err(|_| "invalid pubkey length")?, + ); + } + } + + // dynamic + for pubkey in self.meta.loaded_writable_addresses.iter() { + account_keys + .insert(Pubkey::try_from(pubkey.as_slice()).map_err(|_| "invalid pubkey length")?); + } + for pubkey in self.meta.loaded_readonly_addresses.iter() { + account_keys + .insert(Pubkey::try_from(pubkey.as_slice()).map_err(|_| "invalid pubkey length")?); + } + + self.account_keys = account_keys; + Ok(()) + } } -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq)] pub struct MessageTransaction { pub transaction: Arc, pub slot: u64, @@ -158,9 +253,19 @@ impl MessageTransaction { slot, } } + + pub fn from_update_oneof(msg: SubscribeUpdateTransaction) -> FromUpdateOneofResult { + Ok(Self { + transaction: Arc::new(MessageTransactionInfo::from_update_oneof( + msg.transaction + .ok_or("transaction message should be defined")?, + )?), + slot: msg.slot, + }) + } } -#[derive(Debug, Clone, Copy)] +#[derive(Debug, Clone, Copy, PartialEq)] pub struct MessageEntry { pub slot: u64, pub index: usize, @@ -184,9 +289,23 @@ impl MessageEntry { .expect("failed convert usize to u64"), } } + + pub fn from_update_oneof(msg: &SubscribeUpdateEntry) -> FromUpdateOneofResult { + Ok(Self { + slot: msg.slot, + index: msg.index as usize, + num_hashes: msg.num_hashes, + hash: Hash::new_from_array( + <[u8; HASH_BYTES]>::try_from(msg.hash.as_slice()) + .map_err(|_| "invalid hash length")?, + ), + executed_transaction_count: msg.executed_transaction_count, + starting_transaction_index: msg.starting_transaction_index, + }) + } } -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq)] pub struct MessageBlockMeta(pub SubscribeUpdateBlockMeta); impl Deref for MessageBlockMeta { @@ -222,7 +341,7 @@ impl MessageBlockMeta { } } -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq)] pub struct MessageBlock { pub meta: Arc, pub transactions: Vec>, @@ -246,9 +365,41 @@ impl MessageBlock { entries, } } + + pub fn from_update_oneof(msg: SubscribeUpdateBlock) -> FromUpdateOneofResult { + Ok(Self { + meta: Arc::new(MessageBlockMeta(SubscribeUpdateBlockMeta { + slot: msg.slot, + blockhash: msg.blockhash, + rewards: msg.rewards, + block_time: msg.block_time, + block_height: msg.block_height, + parent_slot: msg.parent_slot, + parent_blockhash: msg.parent_blockhash, + executed_transaction_count: msg.executed_transaction_count, + entries_count: msg.entries_count, + })), + transactions: msg + .transactions + .into_iter() + .map(|tx| MessageTransactionInfo::from_update_oneof(tx).map(Arc::new)) + .collect::, _>>()?, + updated_account_count: msg.updated_account_count, + accounts: msg + .accounts + .into_iter() + .map(|account| MessageAccountInfo::from_update_oneof(account).map(Arc::new)) + .collect::, _>>()?, + entries: msg + .entries + .iter() + .map(|entry| MessageEntry::from_update_oneof(entry).map(Arc::new)) + .collect::, _>>()?, + }) + } } -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq)] pub enum Message { Slot(MessageSlot), Account(MessageAccount), @@ -269,4 +420,24 @@ impl Message { Self::Block(msg) => msg.meta.slot, } } + + pub fn from_update_oneof(oneof: UpdateOneof) -> FromUpdateOneofResult { + Ok(match oneof { + UpdateOneof::Account(msg) => Self::Account(MessageAccount::from_update_oneof(msg)?), + UpdateOneof::Slot(msg) => Self::Slot(MessageSlot::from_update_oneof(&msg)?), + UpdateOneof::Transaction(msg) => { + Self::Transaction(MessageTransaction::from_update_oneof(msg)?) + } + UpdateOneof::TransactionStatus(_) => { + return Err("TransactionStatus message is not supported") + } + UpdateOneof::Block(msg) => Self::Block(Arc::new(MessageBlock::from_update_oneof(msg)?)), + UpdateOneof::Ping(_) => return Err("Ping message is not supported"), + UpdateOneof::Pong(_) => return Err("Pong message is not supported"), + UpdateOneof::BlockMeta(msg) => Self::BlockMeta(Arc::new(MessageBlockMeta(msg))), + UpdateOneof::Entry(msg) => { + Self::Entry(Arc::new(MessageEntry::from_update_oneof(&msg)?)) + } + }) + } }