From d945ad187293a8f7a247b46f564a0cbc94b383cc Mon Sep 17 00:00:00 2001 From: Brian Balser Date: Tue, 25 Jun 2024 10:55:30 -0400 Subject: [PATCH] Update price service to use helium-lib (#832) * Update price to use helium-lib to retrieve on chain price * remove unused dep * remove commented out code * Add async featur to anchor-client * remove commented code --- Cargo.lock | 2163 ++++++++++++++++++++++++---------- Cargo.toml | 10 +- price/Cargo.toml | 4 +- price/src/main.rs | 36 +- price/src/metrics.rs | 16 +- price/src/price_generator.rs | 233 ++-- price/src/settings.rs | 88 +- solana/Cargo.toml | 5 +- solana/src/burn.rs | 2 - solana/src/start_boost.rs | 2 - 10 files changed, 1626 insertions(+), 933 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6f4e55426..5185df0d2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -125,8 +125,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5f619f1d04f53621925ba8a2e633ba5a6081f2ae14758cbb67f38fd823e0a3e" dependencies = [ "anchor-syn 0.29.0", - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-access-control" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47fe28365b33e8334dd70ae2f34a43892363012fe239cf37d2ee91693575b1f8" +dependencies = [ + "anchor-syn 0.30.1", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -138,8 +150,21 @@ checksum = "e7f2a3e1df4685f18d12a943a9f2a7456305401af21a07c9fe076ef9ecd6e400" dependencies = [ "anchor-syn 0.29.0", "bs58 0.5.0", - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-account" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c288d496168268d198d9b53ee9f4f9d260a55ba4df9877ea1d4486ad6109e0f" +dependencies = [ + "anchor-syn 0.30.1", + "bs58 0.5.0", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -150,7 +175,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9423945cb55627f0b30903288e78baf6f62c6c8ab28fb344b6b25f1ffee3dca7" dependencies = [ "anchor-syn 0.29.0", - "quote 1.0.33", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-constant" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49b77b6948d0eeaaa129ce79eea5bbbb9937375a9241d909ca8fb9e006bb6e90" +dependencies = [ + "anchor-syn 0.30.1", + "quote", "syn 1.0.109", ] @@ -161,7 +197,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93ed12720033cc3c3bf3cfa293349c2275cd5ab99936e33dd4bf283aaad3e241" dependencies = [ "anchor-syn 0.29.0", - "quote 1.0.33", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-error" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d20bb569c5a557c86101b944721d865e1fd0a4c67c381d31a44a84f07f84828" +dependencies = [ + "anchor-syn 0.30.1", + "quote", "syn 1.0.109", ] @@ -172,8 +219,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eef4dc0371eba2d8c8b54794b0b0eb786a234a559b77593d6f80825b6d2c77a2" dependencies = [ "anchor-syn 0.29.0", - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-event" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cebd8d0671a3a9dc3160c48598d652c34c77de6be4d44345b8b514323284d57" +dependencies = [ + "anchor-syn 0.30.1", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -184,17 +243,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b18c4f191331e078d4a6a080954d1576241c29c56638783322a18d308ab27e4f" dependencies = [ "anchor-syn 0.29.0", - "quote 1.0.33", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-program" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb2a5eb0860e661ab31aff7bb5e0288357b176380e985bade4ccb395981b42d" +dependencies = [ + "anchor-lang-idl", + "anchor-syn 0.30.1", + "anyhow", + "bs58 0.5.0", + "heck 0.3.3", + "proc-macro2", + "quote", + "serde_json", "syn 1.0.109", ] [[package]] name = "anchor-client" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb48c4a7911038da546dc752655a29fa49f6bd50ebc1edca218bac8da1012acd" +checksum = "b4adc1b211826d72036dc2fcb679a8ef7fe5b9afda376b0b26debe19e28de3ea" dependencies = [ - "anchor-lang", + "anchor-lang 0.30.1", "anyhow", "futures", "regex", @@ -214,7 +290,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5de10d6e9620d3bcea56c56151cad83c5992f50d5960b3a9bebc4a50390ddc3c" dependencies = [ "anchor-syn 0.29.0", - "quote 1.0.33", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-accounts" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04368b5abef4266250ca8d1d12f4dff860242681e4ec22b885dcfe354fd35aa1" +dependencies = [ + "anchor-syn 0.30.1", + "quote", "syn 1.0.109", ] @@ -226,8 +313,21 @@ checksum = "f4e2e5be518ec6053d90a2a7f26843dbee607583c779e6c8395951b9739bdfbe" dependencies = [ "anchor-syn 0.29.0", "borsh-derive-internal 0.10.3", - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-serde" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0bb0e0911ad4a70cab880cdd6287fe1e880a1a9d8e4e6defa8e9044b9796a6c" +dependencies = [ + "anchor-syn 0.30.1", + "borsh-derive-internal 0.10.3", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -237,8 +337,19 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ecc31d19fa54840e74b7a979d44bcea49d70459de846088a1d71e87ba53c419" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-space" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef415ff156dc82e9ecb943189b0cb241b3a6bfc26a180234dc21bd3ef3ce0cb" +dependencies = [ + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -282,8 +393,8 @@ dependencies = [ "anchor-syn 0.24.2", "darling 0.14.2", "heck 0.4.0", - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "serde_json", "syn 1.0.109", ] @@ -294,15 +405,15 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35da4785497388af0553586d55ebdc08054a8b1724720ef2749d313494f2b8ad" dependencies = [ - "anchor-attribute-access-control", - "anchor-attribute-account", - "anchor-attribute-constant", - "anchor-attribute-error", - "anchor-attribute-event", - "anchor-attribute-program", - "anchor-derive-accounts", - "anchor-derive-serde", - "anchor-derive-space", + "anchor-attribute-access-control 0.29.0", + "anchor-attribute-account 0.29.0", + "anchor-attribute-constant 0.29.0", + "anchor-attribute-error 0.29.0", + "anchor-attribute-event 0.29.0", + "anchor-attribute-program 0.29.0", + "anchor-derive-accounts 0.29.0", + "anchor-derive-serde 0.29.0", + "anchor-derive-space 0.29.0", "arrayref", "base64 0.13.1", "bincode", @@ -313,6 +424,70 @@ dependencies = [ "thiserror", ] +[[package]] +name = "anchor-lang" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6620c9486d9d36a4389cab5e37dc34a42ed0bfaa62e6a75a2999ce98f8f2e373" +dependencies = [ + "anchor-attribute-access-control 0.30.1", + "anchor-attribute-account 0.30.1", + "anchor-attribute-constant 0.30.1", + "anchor-attribute-error 0.30.1", + "anchor-attribute-event 0.30.1", + "anchor-attribute-program 0.30.1", + "anchor-derive-accounts 0.30.1", + "anchor-derive-serde 0.30.1", + "anchor-derive-space 0.30.1", + "arrayref", + "base64 0.21.7", + "bincode", + "borsh 0.10.3", + "bytemuck", + "getrandom 0.2.10", + "solana-program", + "thiserror", +] + +[[package]] +name = "anchor-lang-idl" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31cf97b4e6f7d6144a05e435660fcf757dbc3446d38d0e2b851d11ed13625bba" +dependencies = [ + "anchor-lang-idl-spec", + "anyhow", + "heck 0.3.3", + "serde", + "serde_json", + "sha2 0.10.8", +] + +[[package]] +name = "anchor-lang-idl-spec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bdf143115440fe621bdac3a29a1f7472e09f6cd82b2aa569429a0c13f103838" +dependencies = [ + "anyhow", + "serde", +] + +[[package]] +name = "anchor-spl" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04bd077c34449319a1e4e0bc21cea572960c9ae0d0fefda0dd7c52fcc3c647a3" +dependencies = [ + "anchor-lang 0.30.1", + "spl-associated-token-account 3.0.2", + "spl-pod 0.2.2", + "spl-token 4.0.0", + "spl-token-2022 3.0.2", + "spl-token-group-interface 0.2.3", + "spl-token-metadata-interface 0.3.3", +] + [[package]] name = "anchor-syn" version = "0.24.2" @@ -322,9 +497,9 @@ dependencies = [ "anyhow", "bs58 0.3.1", "heck 0.3.3", - "proc-macro2 1.0.79", + "proc-macro2", "proc-macro2-diagnostics", - "quote 1.0.33", + "quote", "serde", "serde_json", "sha2 0.9.9", @@ -341,11 +516,29 @@ dependencies = [ "anyhow", "bs58 0.5.0", "heck 0.3.3", - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2 0.10.8", + "syn 1.0.109", + "thiserror", +] + +[[package]] +name = "anchor-syn" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f99daacb53b55cfd37ce14d6c9905929721137fd4c67bbab44a19802aecb622f" +dependencies = [ + "anyhow", + "bs58 0.5.0", + "heck 0.3.3", + "proc-macro2", + "quote", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "syn 1.0.109", "thiserror", ] @@ -365,6 +558,15 @@ dependencies = [ "libc", ] +[[package]] +name = "angry-purple-tiger" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49c749eb8b90a5c85a879ac35bba5374ba18ff41d609878d7d37dd2ac0122a3c" +dependencies = [ + "md5", +] + [[package]] name = "angry-purple-tiger" version = "1.0.0" @@ -493,7 +695,7 @@ dependencies = [ "derivative", "digest 0.10.7", "itertools", - "num-bigint 0.4.3", + "num-bigint 0.4.4", "num-traits", "paste", "rustc_version 0.4.0", @@ -506,7 +708,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" dependencies = [ - "quote 1.0.33", + "quote", "syn 1.0.109", ] @@ -516,10 +718,10 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "num-bigint 0.4.3", + "num-bigint 0.4.4", "num-traits", - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -545,7 +747,7 @@ dependencies = [ "ark-serialize-derive", "ark-std", "digest 0.10.7", - "num-bigint 0.4.3", + "num-bigint 0.4.4", ] [[package]] @@ -554,8 +756,8 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -569,23 +771,17 @@ dependencies = [ "rand 0.8.5", ] -[[package]] -name = "array-bytes" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ad284aeb45c13f2fb4f084de4a420ebf447423bdf9386c0540ce33cb3ef4b8c" - [[package]] name = "arrayref" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "ascii" @@ -615,8 +811,8 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", "synstructure", ] @@ -627,8 +823,8 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -698,8 +894,8 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -716,13 +912,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.74" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2", + "quote", + "syn 2.0.58", ] [[package]] @@ -973,7 +1169,7 @@ dependencies = [ "once_cell", "percent-encoding", "regex", - "sha2 0.10.6", + "sha2 0.10.8", "time", "tracing", ] @@ -1019,7 +1215,7 @@ dependencies = [ "md-5", "pin-project-lite", "sha1", - "sha2 0.10.6", + "sha2 0.10.8", "tracing", ] @@ -1431,7 +1627,7 @@ dependencies = [ "rand_chacha 0.3.0", "rust_decimal", "serde", - "sha2 0.10.6", + "sha2 0.10.8", "thiserror", ] @@ -1476,6 +1672,9 @@ name = "bitflags" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +dependencies = [ + "serde", +] [[package]] name = "bitmaps" @@ -1486,6 +1685,18 @@ dependencies = [ "typenum", ] +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + [[package]] name = "blake2b_simd" version = "1.0.0" @@ -1510,9 +1721,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.4.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" dependencies = [ "arrayref", "arrayvec", @@ -1581,7 +1792,7 @@ dependencies = [ "rust_decimal_macros", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "solana", "solana-sdk", "sqlx", @@ -1612,7 +1823,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" dependencies = [ "borsh-derive 0.10.3", - "hashbrown 0.13.1", + "hashbrown 0.11.2", +] + +[[package]] +name = "borsh" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" +dependencies = [ + "borsh-derive 1.5.1", + "cfg_aliases", ] [[package]] @@ -1624,7 +1845,7 @@ dependencies = [ "borsh-derive-internal 0.9.3", "borsh-schema-derive-internal 0.9.3", "proc-macro-crate 0.1.5", - "proc-macro2 1.0.79", + "proc-macro2", "syn 1.0.109", ] @@ -1637,18 +1858,32 @@ dependencies = [ "borsh-derive-internal 0.10.3", "borsh-schema-derive-internal 0.10.3", "proc-macro-crate 0.1.5", - "proc-macro2 1.0.79", + "proc-macro2", "syn 1.0.109", ] +[[package]] +name = "borsh-derive" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" +dependencies = [ + "once_cell", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.58", + "syn_derive", +] + [[package]] name = "borsh-derive-internal" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -1658,8 +1893,8 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -1669,8 +1904,8 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -1680,8 +1915,8 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -1727,7 +1962,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" dependencies = [ - "sha2 0.10.6", + "sha2 0.10.8", "tinyvec", ] @@ -1759,11 +1994,33 @@ dependencies = [ "serde", ] +[[package]] +name = "bytecheck" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" +dependencies = [ + "bytecheck_derive", + "ptr_meta", + "simdutf8", +] + +[[package]] +name = "bytecheck_derive" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" dependencies = [ "bytemuck_derive", ] @@ -1774,16 +2031,16 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aca418a974d83d40a0c1f0c5cba6ff4bc28d8df099109ca459a2118d40b6322" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" @@ -1827,6 +2084,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chrono" version = "0.4.31" @@ -1854,10 +2117,10 @@ dependencies = [ [[package]] name = "circuit-breaker" version = "0.1.0" -source = "git+https://github.com/helium/helium-anchor-gen.git#a10352d0341c99b08931ad58309112e51f09c874" +source = "git+https://github.com/helium/helium-anchor-gen.git#fe60ed1d49e9255bd779a99bdd7928f278c07256" dependencies = [ "anchor-gen", - "anchor-lang", + "anchor-lang 0.30.1", ] [[package]] @@ -1920,9 +2183,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck 0.4.0", - "proc-macro2 1.0.79", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2", + "quote", + "syn 2.0.58", ] [[package]] @@ -2201,11 +2464,10 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.8" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ - "cfg-if", "crossbeam-utils", ] @@ -2245,12 +2507,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -2391,8 +2650,8 @@ dependencies = [ "cc", "codespan-reporting", "once_cell", - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "scratch", "syn 1.0.109", ] @@ -2409,8 +2668,8 @@ version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a08a6e2fcc370a089ad3b4aaf54db3b1b4cee38ddabce5896b33eb693275f470" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -2442,8 +2701,8 @@ checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "strsim 0.10.0", "syn 1.0.109", ] @@ -2456,10 +2715,10 @@ checksum = "04e48a959bcd5c761246f5d090ebc2fbf7b9cd527a492b07a67510c108f1e7e3" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "strsim 0.10.0", - "syn 2.0.38", + "syn 2.0.58", ] [[package]] @@ -2469,7 +2728,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" dependencies = [ "darling_core 0.14.2", - "quote 1.0.33", + "quote", "syn 1.0.109", ] @@ -2480,17 +2739,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d1545d67a2149e1d93b7e5c7752dce5a7426eb5d1357ddcfd89336b94444f77" dependencies = [ "darling_core 0.20.5", - "quote 1.0.33", - "syn 2.0.38", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown 0.14.1", + "lock_api", + "once_cell", + "parking_lot_core 0.9.8", ] [[package]] name = "data-credits" version = "0.2.1" -source = "git+https://github.com/helium/helium-anchor-gen.git#a10352d0341c99b08931ad58309112e51f09c874" +source = "git+https://github.com/helium/helium-anchor-gen.git#fe60ed1d49e9255bd779a99bdd7928f278c07256" dependencies = [ "anchor-gen", - "anchor-lang", + "anchor-lang 0.30.1", ] [[package]] @@ -2533,7 +2805,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "thiserror", "tracing", "xorf", @@ -2558,7 +2830,7 @@ dependencies = [ "asn1-rs", "displaydoc", "nom", - "num-bigint 0.4.3", + "num-bigint 0.4.4", "num-traits", "rusticata-macros", ] @@ -2575,8 +2847,8 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -2596,8 +2868,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" dependencies = [ "darling 0.14.2", - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -2670,32 +2942,32 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] [[package]] -name = "dlopen" -version = "0.1.8" +name = "dlopen2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e80ad39f814a9abe68583cd50a2d45c8a67561c3361ab8da240587dda80937" +checksum = "09b4f5f101177ff01b8ec4ecc81eead416a8aa42819a2869311b3420fa114ffa" dependencies = [ - "dlopen_derive", - "lazy_static", + "dlopen2_derive", "libc", + "once_cell", "winapi", ] [[package]] -name = "dlopen_derive" -version = "0.1.4" +name = "dlopen2_derive" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f236d9e1b1fbd81cea0f9cbdc8dcc7e8ebcd80e6659cd7cb2ad5f6c05946c581" +checksum = "a6cbae11b3de8fce2a456e8ea3dada226b35fe791f0dc1d360c0941f0bb681f3" dependencies = [ - "libc", - "quote 0.6.13", - "syn 0.15.44", + "proc-macro2", + "quote", + "syn 2.0.58", ] [[package]] @@ -2765,7 +3037,7 @@ dependencies = [ "derivation-path", "ed25519-dalek", "hmac 0.12.1", - "sha2 0.10.6", + "sha2 0.10.8", ] [[package]] @@ -2832,9 +3104,9 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03cdc46ec28bd728e67540c528013c6a10eb69a02eb31078a1bda695438cbfb8" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2", + "quote", + "syn 2.0.58", ] [[package]] @@ -2865,10 +3137,10 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "fanout" version = "0.1.0" -source = "git+https://github.com/helium/helium-anchor-gen.git#a10352d0341c99b08931ad58309112e51f09c874" +source = "git+https://github.com/helium/helium-anchor-gen.git#fe60ed1d49e9255bd779a99bdd7928f278c07256" dependencies = [ "anchor-gen", - "anchor-lang", + "anchor-lang 0.30.1", ] [[package]] @@ -2941,7 +3213,7 @@ dependencies = [ "rust_decimal_macros", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "sqlx", "strum", "strum_macros", @@ -3019,9 +3291,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -3035,11 +3307,17 @@ dependencies = [ "libc", ] +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + [[package]] name = "futures" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -3052,9 +3330,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -3062,15 +3340,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -3090,9 +3368,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" @@ -3111,26 +3389,26 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2", + "quote", + "syn 2.0.58", ] [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" @@ -3140,9 +3418,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -3317,7 +3595,7 @@ dependencies = [ "futures-sink", "futures-util", "http 1.0.0", - "indexmap 2.0.2", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -3429,10 +3707,10 @@ dependencies = [ [[package]] name = "helium-anchor-gen" version = "0.1.0" -source = "git+https://github.com/helium/helium-anchor-gen.git#a10352d0341c99b08931ad58309112e51f09c874" +source = "git+https://github.com/helium/helium-anchor-gen.git#fe60ed1d49e9255bd779a99bdd7928f278c07256" dependencies = [ "anchor-gen", - "anchor-lang", + "anchor-lang 0.30.1", "circuit-breaker", "data-credits", "fanout", @@ -3458,7 +3736,7 @@ dependencies = [ "bs58 0.5.0", "byteorder", "ed25519-compact", - "getrandom 0.2.10", + "getrandom 0.1.16", "k256", "lazy_static", "multihash", @@ -3466,7 +3744,7 @@ dependencies = [ "rand_core 0.6.4", "rsa", "serde", - "sha2 0.10.6", + "sha2 0.10.8", "signature", "solana-sdk", "sqlx", @@ -3476,10 +3754,48 @@ dependencies = [ [[package]] name = "helium-entity-manager" version = "0.3.1" -source = "git+https://github.com/helium/helium-anchor-gen.git#a10352d0341c99b08931ad58309112e51f09c874" +source = "git+https://github.com/helium/helium-anchor-gen.git#fe60ed1d49e9255bd779a99bdd7928f278c07256" dependencies = [ "anchor-gen", - "anchor-lang", + "anchor-lang 0.30.1", +] + +[[package]] +name = "helium-lib" +version = "0.0.0" +source = "git+https://github.com/helium/helium-wallet-rs.git?branch=master#094c5792eff2108c497679e0010d5cd6a0fa9a79" +dependencies = [ + "anchor-client", + "anchor-spl", + "angry-purple-tiger 0.1.0", + "async-trait", + "base64 0.21.7", + "bincode", + "chrono", + "futures", + "h3o", + "helium-anchor-gen", + "helium-crypto", + "helium-proto", + "hex", + "itertools", + "jsonrpc_client", + "lazy_static", + "mpl-bubblegum", + "pyth-solana-receiver-sdk", + "reqwest", + "rust_decimal", + "serde", + "serde_json", + "sha2 0.10.8", + "solana-program", + "solana-sdk", + "solana-transaction-status", + "spl-account-compression", + "spl-associated-token-account 1.1.3", + "thiserror", + "tracing", + "url", ] [[package]] @@ -3498,11 +3814,11 @@ dependencies = [ [[package]] name = "helium-sub-daos" -version = "0.1.4" -source = "git+https://github.com/helium/helium-anchor-gen.git#a10352d0341c99b08931ad58309112e51f09c874" +version = "0.1.5" +source = "git+https://github.com/helium/helium-anchor-gen.git#fe60ed1d49e9255bd779a99bdd7928f278c07256" dependencies = [ "anchor-gen", - "anchor-lang", + "anchor-lang 0.30.1", ] [[package]] @@ -3553,10 +3869,10 @@ checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" [[package]] name = "hexboosting" version = "0.0.5" -source = "git+https://github.com/helium/helium-anchor-gen.git#a10352d0341c99b08931ad58309112e51f09c874" +source = "git+https://github.com/helium/helium-anchor-gen.git#fe60ed1d49e9255bd779a99bdd7928f278c07256" dependencies = [ "anchor-gen", - "anchor-lang", + "anchor-lang 0.30.1", ] [[package]] @@ -3741,7 +4057,7 @@ dependencies = [ "httpdate", "itoa 1.0.9", "pin-project-lite", - "socket2 0.5.5", + "socket2", "tokio", "tower-service", "tracing", @@ -3792,7 +4108,7 @@ dependencies = [ "http 0.2.11", "hyper 0.14.28", "log", - "rustls 0.21.9", + "rustls 0.21.12", "rustls-native-certs", "tokio", "tokio-rustls 0.24.1", @@ -3836,7 +4152,7 @@ dependencies = [ "http-body 1.0.0", "hyper 1.1.0", "pin-project-lite", - "socket2 0.5.5", + "socket2", "tokio", "tracing", ] @@ -3873,9 +4189,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -3915,9 +4231,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.2" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown 0.14.1", @@ -3963,7 +4279,7 @@ dependencies = [ "rand 0.8.5", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "task-manager", "thiserror", "tokio", @@ -4124,7 +4440,7 @@ dependencies = [ "rust_decimal_macros", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "sqlx", "task-manager", "thiserror", @@ -4177,9 +4493,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -4199,6 +4515,30 @@ dependencies = [ "serde_json", ] +[[package]] +name = "jsonrpc_client" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c1ec33c537dc1d5a8b597313db6d213fee54320f81ea0d19b0c3869b282e1a" +dependencies = [ + "async-trait", + "jsonrpc_client_macro", + "reqwest", + "serde", + "serde_json", + "url", +] + +[[package]] +name = "jsonrpc_client_macro" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97c11e429f0eaa41fe659013680b459d2368d8f0a3e69dccfb7a35800b0dc27b" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "jsonrpsee" version = "0.19.0" @@ -4280,7 +4620,16 @@ dependencies = [ ] [[package]] -name = "keccak" +name = "kaigan" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6dd100976df9dd59d0c3fecf6f9ad3f161a087374d1b2a77ebb4ad8920f11bb" +dependencies = [ + "borsh 0.10.3", +] + +[[package]] +name = "keccak" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3afef3b6eff9ce9d8ff9b3601125eec7f0c8cbac7abd14f355d053fa56c98768" @@ -4331,19 +4680,19 @@ dependencies = [ [[package]] name = "lazy-distributor" version = "0.1.0" -source = "git+https://github.com/helium/helium-anchor-gen.git#a10352d0341c99b08931ad58309112e51f09c874" +source = "git+https://github.com/helium/helium-anchor-gen.git#fe60ed1d49e9255bd779a99bdd7928f278c07256" dependencies = [ "anchor-gen", - "anchor-lang", + "anchor-lang 0.30.1", ] [[package]] name = "lazy-transactions" version = "0.2.0" -source = "git+https://github.com/helium/helium-anchor-gen.git#a10352d0341c99b08931ad58309112e51f09c874" +source = "git+https://github.com/helium/helium-anchor-gen.git#fe60ed1d49e9255bd779a99bdd7928f278c07256" dependencies = [ "anchor-gen", - "anchor-lang", + "anchor-lang 0.30.1", ] [[package]] @@ -4357,9 +4706,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.149" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libflate" @@ -4435,6 +4784,18 @@ dependencies = [ "libsecp256k1-core", ] +[[package]] +name = "light-poseidon" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" +dependencies = [ + "ark-bn254", + "ark-ff", + "num-bigint 0.4.4", + "thiserror", +] + [[package]] name = "link-cplusplus" version = "1.0.7" @@ -4681,7 +5042,7 @@ dependencies = [ name = "mobile-config-cli" version = "0.1.0" dependencies = [ - "angry-purple-tiger", + "angry-purple-tiger 1.0.0", "anyhow", "base64 0.21.7", "clap 4.4.8", @@ -4704,10 +5065,10 @@ dependencies = [ [[package]] name = "mobile-entity-manager" version = "0.1.2" -source = "git+https://github.com/helium/helium-anchor-gen.git#a10352d0341c99b08931ad58309112e51f09c874" +source = "git+https://github.com/helium/helium-anchor-gen.git#fe60ed1d49e9255bd779a99bdd7928f278c07256" dependencies = [ "anchor-gen", - "anchor-lang", + "anchor-lang 0.30.1", ] [[package]] @@ -4734,7 +5095,7 @@ dependencies = [ "poc-metrics", "prost", "serde", - "sha2 0.10.6", + "sha2 0.10.8", "solana", "sqlx", "task-manager", @@ -4791,7 +5152,7 @@ dependencies = [ "rust_decimal_macros", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "solana-sdk", "sqlx", "task-manager", @@ -4806,6 +5167,20 @@ dependencies = [ "uuid", ] +[[package]] +name = "mpl-bubblegum" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9eff5ae5cafd1acdf7e7c93359da1eec91dcaede318470d9f68b78e8b7469f4" +dependencies = [ + "borsh 0.10.3", + "kaigan", + "num-derive 0.3.3", + "num-traits", + "solana-program", + "thiserror", +] + [[package]] name = "multihash" version = "0.18.0" @@ -4818,7 +5193,7 @@ dependencies = [ "core2", "digest 0.10.7", "multihash-derive", - "sha2 0.10.6", + "sha2 0.10.8", "sha3 0.10.6", "unsigned-varint", ] @@ -4831,8 +5206,8 @@ checksum = "1d6d4752e6230d8ef7adf7bd5d8c4b1f6561c1014c5ba9a37445ccefe18aa1db" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro-error", - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", "synstructure", ] @@ -4954,9 +5329,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -4996,11 +5371,22 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + [[package]] name = "num-integer" version = "0.1.45" @@ -5036,9 +5422,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", @@ -5072,6 +5458,15 @@ dependencies = [ "num_enum_derive 0.6.1", ] +[[package]] +name = "num_enum" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +dependencies = [ + "num_enum_derive 0.7.2", +] + [[package]] name = "num_enum_derive" version = "0.5.10" @@ -5079,8 +5474,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0629cbd6b897944899b1f10496d9c4a7ac5878d45fd61bc22e9e79bfbbc29597" dependencies = [ "proc-macro-crate 1.1.3", - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -5091,9 +5486,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" dependencies = [ "proc-macro-crate 1.1.3", - "proc-macro2 1.0.79", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +dependencies = [ + "proc-macro-crate 1.1.3", + "proc-macro2", + "quote", + "syn 2.0.58", ] [[package]] @@ -5153,9 +5560,9 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2", + "quote", + "syn 2.0.58", ] [[package]] @@ -5312,9 +5719,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "percentage" @@ -5350,8 +5757,8 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -5471,8 +5878,8 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ - "proc-macro2 1.0.79", - "syn 2.0.38", + "proc-macro2", + "syn 2.0.58", ] [[package]] @@ -5488,13 +5895,15 @@ dependencies = [ "futures", "futures-util", "helium-anchor-gen", + "helium-lib", "helium-proto", "humantime-serde", "metrics", "metrics-exporter-prometheus", "poc-metrics", "prost", - "pyth-solana-receiver-sdk", + "rust_decimal", + "rust_decimal_macros", "serde", "serde_json", "solana-client", @@ -5511,10 +5920,10 @@ dependencies = [ [[package]] name = "price-oracle" version = "0.2.1" -source = "git+https://github.com/helium/helium-anchor-gen.git#a10352d0341c99b08931ad58309112e51f09c874" +source = "git+https://github.com/helium/helium-anchor-gen.git#fe60ed1d49e9255bd779a99bdd7928f278c07256" dependencies = [ "anchor-gen", - "anchor-lang", + "anchor-lang 0.30.1", ] [[package]] @@ -5536,6 +5945,15 @@ dependencies = [ "toml", ] +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -5543,8 +5961,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", "version_check", ] @@ -5555,20 +5973,11 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "version_check", ] -[[package]] -name = "proc-macro2" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -dependencies = [ - "unicode-xid 0.1.0", -] - [[package]] name = "proc-macro2" version = "1.0.79" @@ -5584,8 +5993,8 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4bf29726d67464d49fa6224a1d07936a8c08bb3fba727c7493f6cf1616fdaada" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", "version_check", "yansi", @@ -5618,7 +6027,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.38", + "syn 2.0.58", "tempfile", ] @@ -5630,9 +6039,9 @@ checksum = "19de2de2a00075bf566bee3bd4db014b11587e84184d3f7a791bc17f1a8e9e48" dependencies = [ "anyhow", "itertools", - "proc-macro2 1.0.79", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2", + "quote", + "syn 2.0.58", ] [[package]] @@ -5644,13 +6053,33 @@ dependencies = [ "prost", ] +[[package]] +name = "ptr_meta" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" +dependencies = [ + "ptr_meta_derive", +] + +[[package]] +name = "ptr_meta_derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "pyth-solana-receiver-sdk" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91e6559643f0b377b6f293269251f6a804ae7332c37f7310371f50c833453cd0" dependencies = [ - "anchor-lang", + "anchor-lang 0.30.1", "hex", "pythnet-sdk", "solana-program", @@ -5662,14 +6091,14 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3bbbc0456f9f27c9ad16b6c3bf1b2a7fea61eebf900f4d024a0468b9a84fe0c1" dependencies = [ - "anchor-lang", + "anchor-lang 0.30.1", "bincode", "borsh 0.10.3", "bytemuck", "byteorder", "fast-math", "hex", - "proc-macro2 1.0.79", + "proc-macro2", "rustc_version 0.4.0", "serde", "sha3 0.10.6", @@ -5687,6 +6116,17 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "qualifier_attr" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + [[package]] name = "quanta" version = "0.12.3" @@ -5704,71 +6144,66 @@ dependencies = [ [[package]] name = "quinn" -version = "0.9.4" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e8b432585672228923edbbf64b8b12c14e1112f62e88737655b4a083dbcd78e" +checksum = "8cc2c5017e4b43d5995dcea317bc46c1e09404c0a9664d2908f7f02dfe943d75" dependencies = [ "bytes", "pin-project-lite", "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.20.9", + "rustls 0.21.12", "thiserror", "tokio", "tracing", - "webpki", ] [[package]] name = "quinn-proto" -version = "0.9.6" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" +checksum = "141bf7dfde2fbc246bfd3fe12f2455aa24b0fbd9af535d8c86c7bd1381ff2b1a" dependencies = [ "bytes", "rand 0.8.5", "ring 0.16.20", "rustc-hash", - "rustls 0.20.9", + "rustls 0.21.12", "rustls-native-certs", "slab", "thiserror", "tinyvec", "tracing", - "webpki", ] [[package]] name = "quinn-udp" -version = "0.3.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "641538578b21f5e5c8ea733b736895576d0fe329bb883b937db6f4d163dbaaf4" +checksum = "055b4e778e8feb9f93c4e439f71dc2156ef13360b432b799e179a8c4cdf0b1d7" dependencies = [ + "bytes", "libc", - "quinn-proto", - "socket2 0.4.9", + "socket2", "tracing", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] name = "quote" -version = "0.6.13" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ - "proc-macro2 0.4.30", + "proc-macro2", ] [[package]] -name = "quote" -version = "1.0.33" +name = "radium" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" -dependencies = [ - "proc-macro2 1.0.79", -] +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" [[package]] name = "rand" @@ -5861,9 +6296,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.7.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -5871,14 +6306,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] @@ -5990,11 +6423,20 @@ dependencies = [ "winapi", ] +[[package]] +name = "rend" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" +dependencies = [ + "bytecheck", +] + [[package]] name = "reqwest" -version = "0.11.22" +version = "0.11.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" +checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" dependencies = [ "async-compression", "base64 0.21.7", @@ -6014,7 +6456,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.9", + "rustls 0.21.12", "rustls-pemfile", "serde", "serde_json", @@ -6074,7 +6516,7 @@ dependencies = [ "rust_decimal_macros", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "sqlx", "thiserror", "tokio", @@ -6095,10 +6537,10 @@ dependencies = [ [[package]] name = "rewards-oracle" version = "0.2.0" -source = "git+https://github.com/helium/helium-anchor-gen.git#a10352d0341c99b08931ad58309112e51f09c874" +source = "git+https://github.com/helium/helium-anchor-gen.git#fe60ed1d49e9255bd779a99bdd7928f278c07256" dependencies = [ "anchor-gen", - "anchor-lang", + "anchor-lang 0.30.1", ] [[package]] @@ -6162,6 +6604,35 @@ dependencies = [ "regex", ] +[[package]] +name = "rkyv" +version = "0.7.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" +dependencies = [ + "bitvec", + "bytecheck", + "bytes", + "hashbrown 0.12.3", + "ptr_meta", + "rend", + "rkyv_derive", + "seahash", + "tinyvec", + "uuid", +] + +[[package]] +name = "rkyv_derive" +version = "0.7.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "rle-decode-fast" version = "1.0.3" @@ -6234,12 +6705,12 @@ checksum = "4165dfae59a39dd41d8dec720d3cbfbc71f69744efb480a3920f5d4e0cc6798d" dependencies = [ "cfg-if", "glob", - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "regex", "relative-path", "rustc_version 0.4.0", - "syn 2.0.38", + "syn 2.0.58", "unicode-ident", ] @@ -6255,22 +6726,27 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.26.1" +version = "1.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee9164faf726e4f3ece4978b25ca877ddc6802fa77f38cdccb32c7f805ecd70c" +checksum = "1790d1c4c0ca81211399e0e0af16333276f375209e71a37b67698a373db5b47a" dependencies = [ "arrayvec", + "borsh 1.5.1", + "bytes", "num-traits", + "rand 0.8.5", + "rkyv", "serde", + "serde_json", ] [[package]] name = "rust_decimal_macros" -version = "1.26.1" +version = "1.34.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4903d8db81d2321699ca8318035d6ff805c548868df435813968795a802171b2" +checksum = "e418701588729bef95e7a655f2b483ad64bb97c46e8e79fde83efd92aaab6d82" dependencies = [ - "quote 1.0.33", + "quote", "rust_decimal", ] @@ -6327,9 +6803,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.9" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring 0.17.3", @@ -6426,9 +6902,9 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2", + "quote", + "syn 2.0.58", ] [[package]] @@ -6441,6 +6917,12 @@ dependencies = [ "untrusted 0.7.1", ] +[[package]] +name = "seahash" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" + [[package]] name = "sec1" version = "0.2.1" @@ -6499,38 +6981,38 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.192" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] [[package]] name = "serde_bytes" -version = "0.11.9" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" +checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.192" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2", + "quote", + "syn 2.0.58", ] [[package]] name = "serde_json" -version = "1.0.109" +version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0652c533506ad7a2e353cce269330d6afd8bdfb6d75e0ace5b35aacbd7b9e9" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" dependencies = [ "itoa 1.0.9", "ryu", @@ -6553,8 +7035,8 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "395627de918015623b32e7669714206363a7fc00382bf477e72c1f7533e8eafc" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -6587,20 +7069,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ "darling 0.20.5", - "proc-macro2 1.0.79", - "quote 1.0.33", - "syn 2.0.38", -] - -[[package]] -name = "sha-1" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", + "proc-macro2", + "quote", + "syn 2.0.58", ] [[package]] @@ -6629,9 +7100,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -6694,6 +7165,12 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "simdutf8" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" + [[package]] name = "simple_asn1" version = "0.5.4" @@ -6701,11 +7178,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eb4ea60fb301dc81dfc113df680571045d375ab7345d171c5dc7d7e13107a80" dependencies = [ "chrono", - "num-bigint 0.4.3", + "num-bigint 0.4.4", "num-traits", "thiserror", ] +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + [[package]] name = "sized-chunks" version = "0.6.5" @@ -6742,19 +7225,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" - -[[package]] -name = "socket2" -version = "0.4.9" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" -dependencies = [ - "libc", - "winapi", -] +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" @@ -6782,22 +7255,21 @@ dependencies = [ "itertools", "metrics", "serde", - "sha2 0.10.6", + "sha2 0.10.8", "solana-client", "solana-program", "solana-sdk", - "spl-token", + "spl-token 3.5.0", "thiserror", "tokio", - "tokio-util", "tracing", ] [[package]] name = "solana-account-decoder" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "850d5d9dc8fa6ea42f4e61c78e296bbbce5a3531ff4cb3c58ef36ee31781049c" +checksum = "4973213a11c2e1b924b36e0c6688682b5aa4623f8d4eeaa1204c32cee524e6d6" dependencies = [ "Inflector", "base64 0.21.7", @@ -6808,46 +7280,25 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "solana-address-lookup-table-program", "solana-config-program", "solana-sdk", - "spl-token", - "spl-token-2022", + "spl-token 4.0.0", + "spl-token-2022 1.0.0", + "spl-token-group-interface 0.1.0", + "spl-token-metadata-interface 0.2.0", "thiserror", "zstd", ] -[[package]] -name = "solana-address-lookup-table-program" -version = "1.16.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7f867cde478a078d4c4ceb113f4f9ac7e29c2efea98f80a2b30cdcd7be83c5" -dependencies = [ - "bincode", - "bytemuck", - "log", - "num-derive", - "num-traits", - "rustc_version 0.4.0", - "serde", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-program", - "solana-program-runtime", - "solana-sdk", - "thiserror", -] - [[package]] name = "solana-clap-utils" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c99636da9a4acad58d0e8142e36395ece48fc41c396e297e702b6a789b190f" +checksum = "909f4553d0b31bb5b97533a6b64cc321a4eace9112d6efbabcf4408ea1b3f1db" dependencies = [ "chrono", "clap 2.34.0", "rpassword", - "solana-perf", "solana-remote-wallet", "solana-sdk", "thiserror", @@ -6858,19 +7309,19 @@ dependencies = [ [[package]] name = "solana-client" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acc7a437165d8fcfac3c63963e394f0ea497b5d2a75159bb3a1ed75dbeb36a7e" +checksum = "c5cc431df6cc1dd964134fa4ec7df765d3af3fae9c2148f96a3c4fb500290633" dependencies = [ "async-trait", "bincode", + "dashmap", "futures", "futures-util", - "indexmap 1.9.3", + "indexmap 2.2.6", "indicatif", "log", "quinn", - "rand 0.7.3", "rayon", "solana-connection-cache", "solana-measure", @@ -6891,9 +7342,9 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f9f2201c7e526581511fa6525e281518be5cabaee82bd5b29fe4b78744148d" +checksum = "e38b040d3a42e8f7d80c4a86bb0d49d7aed663b56b0fe0ae135d2d145fb7ae3a" dependencies = [ "bincode", "chrono", @@ -6905,16 +7356,17 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ee52de352e10e53b252df0815d685a9c6f3e8d3baa0f65e214dfcd247db0e21" +checksum = "ae02622c63943485f0af3d0896626eaf6478e734f0b6bc61c7cc5320963c6e75" dependencies = [ "async-trait", "bincode", + "crossbeam-channel", "futures-util", - "indexmap 1.9.3", + "indexmap 2.2.6", "log", - "rand 0.7.3", + "rand 0.8.5", "rayon", "rcgen", "solana-measure", @@ -6926,32 +7378,24 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "361cc834e5fbbe1a73f1d904fcb8ab052a665e5be6061bd1ba7ab478d7d17c9c" +checksum = "4867f66e9527fa44451c861c1dc6d9b2a7c7a668d7c6a297cdefbe39f4395b33" dependencies = [ - "ahash 0.8.11", - "blake3", "block-buffer 0.10.4", "bs58 0.4.0", "bv", - "byteorder", - "cc", "either", "generic-array", - "getrandom 0.1.16", "im", "lazy_static", "log", "memmap2", - "once_cell", - "rand_core 0.6.4", "rustc_version 0.4.0", "serde", "serde_bytes", "serde_derive", - "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "solana-frozen-abi-macro", "subtle", "thiserror", @@ -6959,21 +7403,21 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "575d875dc050689f9f88c542e292e295e2f081d4e96e0df297981e45cbad8824" +checksum = "168f24d97347b85f05192df58d6be3e3047a4aadc4001bc1b9e711a5ec878eea" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "rustc_version 0.4.0", - "syn 2.0.38", + "syn 2.0.58", ] [[package]] name = "solana-logger" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00faf7aa6a3f47c542bd45d2d7f13af9a382d993e647976a676fe1b0eec4eb2" +checksum = "a0511082fc62f2d086520fff5aa1917c389d8c840930c08ad255ae05952c08a2" dependencies = [ "env_logger", "lazy_static", @@ -6982,9 +7426,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e19c6e1b35df3c212619a7995ae3576fa92ab15ecfc065899f21385cbe45c95" +checksum = "be55a3df105431d25f86f2a7da0cbbde5f54c1f0782ca59367ea4a8037bc6797" dependencies = [ "log", "solana-sdk", @@ -6992,9 +7436,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10e62760a5f87d836169eb3bb446bae174181db07d2c8016be36de49c04fd432" +checksum = "ddec097ed7572804389195128dbd57958b427829153c6cd8ec3343c86fe3cd22" dependencies = [ "crossbeam-channel", "gethostname", @@ -7002,23 +7446,24 @@ dependencies = [ "log", "reqwest", "solana-sdk", + "thiserror", ] [[package]] name = "solana-net-utils" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308c4c36c634d418589cf1df121d143819feff81932de81640de3d64878934eb" +checksum = "258fa7c29fb7605b8d2ed89aa0d43c640d14f4147ad1f5b3fdad19a1ac145ca5" dependencies = [ "bincode", "clap 3.2.25", "crossbeam-channel", "log", "nix", - "rand 0.7.3", + "rand 0.8.5", "serde", "serde_derive", - "socket2 0.4.9", + "socket2", "solana-logger", "solana-sdk", "solana-version", @@ -7028,25 +7473,27 @@ dependencies = [ [[package]] name = "solana-perf" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4d44a4998ba6d9b37e89399d9ce2812e84489dd4665df619fb23366e1c2ec1b" +checksum = "ca422edcf16a6e64003ca118575ea641f7b750f14a0ad28c71dd84f33dcb912a" dependencies = [ "ahash 0.8.11", "bincode", "bv", "caps", "curve25519-dalek", - "dlopen", - "dlopen_derive", + "dlopen2", "fnv", "lazy_static", "libc", "log", "nix", - "rand 0.7.3", + "rand 0.8.5", "rayon", + "rustc_version 0.4.0", "serde", + "solana-frozen-abi", + "solana-frozen-abi-macro", "solana-metrics", "solana-rayon-threadlimit", "solana-sdk", @@ -7055,21 +7502,21 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9863ff5c6e828015bec331c26fb53e48352a264a9be682e7e078d2c3b3e93b46" +checksum = "2bc5a636dc75e5c25651e34f7a36afc9ae60d38166687c5b0375abb580ac81a2" dependencies = [ "ark-bn254", "ark-ec", "ark-ff", "ark-serialize", - "array-bytes", "base64 0.21.7", "bincode", - "bitflags 1.3.2", + "bitflags 2.5.0", "blake3", "borsh 0.10.3", "borsh 0.9.3", + "borsh 1.5.1", "bs58 0.4.0", "bv", "bytemuck", @@ -7083,21 +7530,21 @@ dependencies = [ "lazy_static", "libc", "libsecp256k1", + "light-poseidon", "log", "memoffset 0.9.0", - "num-bigint 0.4.3", - "num-derive", + "num-bigint 0.4.4", + "num-derive 0.4.2", "num-traits", "parking_lot 0.12.1", - "rand 0.7.3", - "rand_chacha 0.2.2", + "rand 0.8.5", "rustc_version 0.4.0", "rustversion", "serde", "serde_bytes", "serde_derive", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "sha3 0.10.6", "solana-frozen-abi", "solana-frozen-abi-macro", @@ -7110,9 +7557,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05813d4d2e141ab4449cf684cc5b05512dfaabb7251561c5bb1ccf1e4221b210" +checksum = "bf373c3da0387f47fee4c5ed2465a9628b9db026a62211a692a9285aa9251544" dependencies = [ "base64 0.21.7", "bincode", @@ -7121,10 +7568,10 @@ dependencies = [ "itertools", "libc", "log", - "num-derive", + "num-derive 0.4.2", "num-traits", "percentage", - "rand 0.7.3", + "rand 0.8.5", "rustc_version 0.4.0", "serde", "solana-frozen-abi", @@ -7138,9 +7585,9 @@ dependencies = [ [[package]] name = "solana-pubsub-client" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd0753cdde1710f50d58bd40a45e58f5368a25dabff6b18ba635c3d6959a558" +checksum = "97b9abc76168d19927561db6a3685b98752bd0961b4ce4f8b7f85ee12238c017" dependencies = [ "crossbeam-channel", "futures-util", @@ -7163,9 +7610,9 @@ dependencies = [ [[package]] name = "solana-quic-client" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d96abde446eaa903d16961cfd3a6e98dc0d680b9edd61c39938c61548d53e" +checksum = "7952c5306a0be5f5276448cd20246b31265bfa884f29a077a24303c6a16aeb34" dependencies = [ "async-mutex", "async-trait", @@ -7175,9 +7622,8 @@ dependencies = [ "log", "quinn", "quinn-proto", - "quinn-udp", "rcgen", - "rustls 0.20.9", + "rustls 0.21.12", "solana-connection-cache", "solana-measure", "solana-metrics", @@ -7191,9 +7637,9 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82ab62fc62458271d746678a3f5625e1654e3cb42a8f318ef4f1ea25991bb085" +checksum = "a4fa0cc66f8e73d769bca2ede3012ba2ef8ab67963e832808665369f2cf81743" dependencies = [ "lazy_static", "num_cpus", @@ -7201,14 +7647,14 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "863f10b8c2a893d1ec85b3ae8020c714512a67302b80c24dde0016eea4034a7c" +checksum = "289803796d4ff7b4699504d3ab9e9d9c5205ea3892b2ebe397b377494dbd75d4" dependencies = [ "console", "dialoguer", "log", - "num-derive", + "num-derive 0.4.2", "num-traits", "parking_lot 0.12.1", "qstring", @@ -7220,9 +7666,9 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df04998cef2d0fe1291599b69acafc7f8cd87305d7f1525c8ae10aef1cc5411c" +checksum = "6cb55a08018776a62ecff52139fbcdab1a7baa4e8f077202be58156e8dde4d5f" dependencies = [ "async-trait", "base64 0.21.7", @@ -7246,9 +7692,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e2912ddbff841fbce1e30b0b9a420993c63b6cc7866e5f0af3740fcd6d85bb8" +checksum = "72a8403038f4d6ab65bc7e7afb3afe8d9824c592232553c5cef55cf3de36025d" dependencies = [ "base64 0.21.7", "bs58 0.4.0", @@ -7262,15 +7708,15 @@ dependencies = [ "solana-sdk", "solana-transaction-status", "solana-version", - "spl-token-2022", + "spl-token-2022 1.0.0", "thiserror", ] [[package]] name = "solana-rpc-client-nonce-utils" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d31100f6cc340dd322f57d00a334fa0a96f628ba86b04fcda1f84307deb14c31" +checksum = "4caca735caf76d51c074c3bacbfe38094bf7f92cfbe7b5b13f3bc4946e64f889" dependencies = [ "clap 2.34.0", "solana-clap-utils", @@ -7281,15 +7727,15 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "621e6973766420162541b26e7974783d32d5471571610da30c5bb0b6263046c9" +checksum = "df43d3a1e1637397ab43cbc216a5a8f977ec8a3cc3f3ae8c3851c83a3255dbcf" dependencies = [ "assert_matches", "base64 0.21.7", "bincode", - "bitflags 1.3.2", - "borsh 0.10.3", + "bitflags 2.5.0", + "borsh 1.5.1", "bs58 0.4.0", "bytemuck", "byteorder", @@ -7306,13 +7752,14 @@ dependencies = [ "libsecp256k1", "log", "memmap2", - "num-derive", + "num-derive 0.4.2", "num-traits", - "num_enum 0.6.1", + "num_enum 0.7.2", "pbkdf2 0.11.0", "qstring", + "qualifier_attr", "rand 0.7.3", - "rand_chacha 0.2.2", + "rand 0.8.5", "rustc_version 0.4.0", "rustversion", "serde", @@ -7320,8 +7767,9 @@ dependencies = [ "serde_derive", "serde_json", "serde_with", - "sha2 0.10.6", + "sha2 0.10.8", "sha3 0.10.6", + "siphasher", "solana-frozen-abi", "solana-frozen-abi-macro", "solana-logger", @@ -7334,29 +7782,35 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd177a74fb3a0a362f1292c027d668eff609ac189f08b78158324587a0a4f8d1" +checksum = "86c76414183a325038ff020b22c07d1e9d2da0703ddc0244acfed37ee2921d96" dependencies = [ "bs58 0.4.0", - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "rustversion", - "syn 2.0.38", + "syn 2.0.58", ] +[[package]] +name = "solana-security-txt" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" + [[package]] name = "solana-streamer" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3942a60afb0282b07ef0f3c32078145ab7545cbed2cac98f1ec4b9f63016df62" +checksum = "fad1bdb955ec6d23a1dbf87e403ff3e610d68616275693125a893d7ed4b2d323" dependencies = [ "async-channel", "bytes", "crossbeam-channel", "futures-util", "histogram", - "indexmap 1.9.3", + "indexmap 2.2.6", "itertools", "libc", "log", @@ -7366,10 +7820,10 @@ dependencies = [ "pkcs8", "quinn", "quinn-proto", - "quinn-udp", - "rand 0.7.3", + "rand 0.8.5", "rcgen", - "rustls 0.20.9", + "rustls 0.21.12", + "smallvec", "solana-metrics", "solana-perf", "solana-sdk", @@ -7380,9 +7834,9 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d712aaf7701a4504521fc09f1743c647edf596e3852a64f6d66b2e5a822388f8" +checksum = "bc301310ba0755c449a8800136f67f8ad14419b366404629894cd10021495360" dependencies = [ "bincode", "log", @@ -7395,17 +7849,16 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48cb32f7443f80cb45e244d514a706b030b5a71ef86b0436c1d39cbfff5491b4" +checksum = "fb887bd5078ff015e103e9ee54a6713380590efa8ff1804b3a653f07188928c6" dependencies = [ "async-trait", "bincode", "futures-util", - "indexmap 1.9.3", + "indexmap 2.2.6", "indicatif", "log", - "rand 0.7.3", "rayon", "solana-connection-cache", "solana-measure", @@ -7420,14 +7873,14 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8aed485ddb4268b4e4ec64012016cd54ba3a4142377a99706fc3ab7768eb2bea" +checksum = "4a0cdfdf63192fb60de094fae8e81159e4e3e9aac9659fe3f9ef0e707023fb32" dependencies = [ "Inflector", "base64 0.21.7", "bincode", - "borsh 0.9.3", + "borsh 0.10.3", "bs58 0.4.0", "lazy_static", "log", @@ -7435,20 +7888,19 @@ dependencies = [ "serde_derive", "serde_json", "solana-account-decoder", - "solana-address-lookup-table-program", "solana-sdk", - "spl-associated-token-account", - "spl-memo", - "spl-token", - "spl-token-2022", + "spl-associated-token-account 2.3.0", + "spl-memo 4.0.0", + "spl-token 4.0.0", + "spl-token-2022 1.0.0", "thiserror", ] [[package]] name = "solana-udp-client" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c92798affef44c1ae2a694006209608044e99106b7945966d53586f5a95d9e2" +checksum = "3ea0d6d8d66e36371577f51c4d1d6192a66f1fa4efe7161a36d94677640dcadb" dependencies = [ "async-trait", "solana-connection-cache", @@ -7461,9 +7913,9 @@ dependencies = [ [[package]] name = "solana-version" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a80a20dfea2afed91761ab3fecc8f96b973a742dc7728f3e343711efe6e8e05f" +checksum = "6f4c2f531c22ce806b211118be8928a791425f97de4592371fb57b246ed33e34" dependencies = [ "log", "rustc_version 0.4.0", @@ -7477,13 +7929,13 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8b719e077cc9e42b8965dd06ff6b5f09fa2a436f2297efdcf471c05d187a6c" +checksum = "6d8a6486017e71a3714a8e1a635e17209135cc20535ba9808ccf106d80ff6e8b" dependencies = [ "bincode", "log", - "num-derive", + "num-derive 0.4.2", "num-traits", "rustc_version 0.4.0", "serde", @@ -7499,9 +7951,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.16.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61aabdec9fe1b311dce5d21fa5bd58fbaa985e8003e0d0aedf3795113aacc1ea" +checksum = "513407f88394e437b4ff5aad892bc5bf51a655ae2401e6e63549734d3695c46f" dependencies = [ "aes-gcm-siv", "base64 0.21.7", @@ -7513,7 +7965,7 @@ dependencies = [ "itertools", "lazy_static", "merlin", - "num-derive", + "num-derive 0.4.2", "num-traits", "rand 0.7.3", "serde", @@ -7528,9 +7980,9 @@ dependencies = [ [[package]] name = "solana_rbpf" -version = "0.6.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17d4ba1e58947346e360fabde0697029d36ba83c42f669199b16a8931313cf29" +checksum = "3d457cc2ba742c120492a64b7fa60e22c575e891f6b55039f4d736568fb112a3" dependencies = [ "byteorder", "combine", @@ -7570,6 +8022,18 @@ dependencies = [ "der", ] +[[package]] +name = "spl-account-compression" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c43bd4455d9fb29b9e4f83c087ccffa2f6f41fecfc0549932ae391d00f3378" +dependencies = [ + "anchor-lang 0.29.0", + "bytemuck", + "spl-concurrent-merkle-tree", + "spl-noop", +] + [[package]] name = "spl-associated-token-account" version = "1.1.3" @@ -7578,38 +8042,288 @@ checksum = "978dba3bcbe88d0c2c58366c254d9ea41c5f73357e72fc0bdee4d6b5fc99c8f4" dependencies = [ "assert_matches", "borsh 0.9.3", - "num-derive", + "num-derive 0.3.3", "num-traits", "solana-program", - "spl-token", - "spl-token-2022", + "spl-token 3.5.0", + "spl-token-2022 0.6.1", "thiserror", ] [[package]] -name = "spl-memo" -version = "3.0.1" +name = "spl-associated-token-account" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd0dc6f70db6bacea7ff25870b016a65ba1d1b6013536f08e4fd79a8f9005325" +checksum = "992d9c64c2564cc8f63a4b508bf3ebcdf2254b0429b13cd1d31adb6162432a5f" dependencies = [ + "assert_matches", + "borsh 0.10.3", + "num-derive 0.4.2", + "num-traits", "solana-program", + "spl-token 4.0.0", + "spl-token-2022 1.0.0", + "thiserror", ] [[package]] -name = "spl-token" -version = "3.5.0" +name = "spl-associated-token-account" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e85e168a785e82564160dcb87b2a8e04cee9bfd1f4d488c729d53d6a4bd300d" +checksum = "a2e688554bac5838217ffd1fab7845c573ff106b6336bf7d290db7c98d5a8efd" dependencies = [ - "arrayref", - "bytemuck", - "num-derive", + "assert_matches", + "borsh 1.5.1", + "num-derive 0.4.2", + "num-traits", + "solana-program", + "spl-token 4.0.0", + "spl-token-2022 3.0.2", + "thiserror", +] + +[[package]] +name = "spl-concurrent-merkle-tree" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "141eaea58588beae81b71d101373a53f096737739873de42d6b1368bc2b8fc30" +dependencies = [ + "bytemuck", + "solana-program", + "thiserror", +] + +[[package]] +name = "spl-discriminator" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daa600f2fe56f32e923261719bae640d873edadbc5237681a39b8e37bfd4d263" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator-derive 0.1.2", +] + +[[package]] +name = "spl-discriminator" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34d1814406e98b08c5cd02c1126f83fd407ad084adce0b05fda5730677822eac" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator-derive 0.2.0", +] + +[[package]] +name = "spl-discriminator-derive" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07fd7858fc4ff8fb0e34090e41d7eb06a823e1057945c26d480bfc21d2338a93" +dependencies = [ + "quote", + "spl-discriminator-syn 0.1.2", + "syn 2.0.58", +] + +[[package]] +name = "spl-discriminator-derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9e8418ea6269dcfb01c712f0444d2c75542c04448b480e87de59d2865edc750" +dependencies = [ + "quote", + "spl-discriminator-syn 0.2.0", + "syn 2.0.58", +] + +[[package]] +name = "spl-discriminator-syn" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18fea7be851bd98d10721782ea958097c03a0c2a07d8d4997041d0ece6319a63" +dependencies = [ + "proc-macro2", + "quote", + "sha2 0.10.8", + "syn 2.0.58", + "thiserror", +] + +[[package]] +name = "spl-discriminator-syn" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c1f05593b7ca9eac7caca309720f2eafb96355e037e6d373b909a80fe7b69b9" +dependencies = [ + "proc-macro2", + "quote", + "sha2 0.10.8", + "syn 2.0.58", + "thiserror", +] + +[[package]] +name = "spl-memo" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0dc6f70db6bacea7ff25870b016a65ba1d1b6013536f08e4fd79a8f9005325" +dependencies = [ + "solana-program", +] + +[[package]] +name = "spl-memo" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f180b03318c3dbab3ef4e1e4d46d5211ae3c780940dd0a28695aba4b59a75a" +dependencies = [ + "solana-program", +] + +[[package]] +name = "spl-noop" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dd67ea3d0070a12ff141f5da46f9695f49384a03bce1203a5608f5739437950" +dependencies = [ + "solana-program", +] + +[[package]] +name = "spl-pod" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85a5db7e4efb1107b0b8e52a13f035437cdcb36ef99c58f6d467f089d9b2915a" +dependencies = [ + "borsh 0.10.3", + "bytemuck", + "solana-program", + "solana-zk-token-sdk", + "spl-program-error 0.3.1", +] + +[[package]] +name = "spl-pod" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046ce669f48cf2eca1ec518916d8725596bfb655beb1c74374cf71dc6cb773c9" +dependencies = [ + "borsh 1.5.1", + "bytemuck", + "solana-program", + "solana-zk-token-sdk", + "spl-program-error 0.4.1", +] + +[[package]] +name = "spl-program-error" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e0657b6490196971d9e729520ba934911ff41fbb2cb9004463dbe23cf8b4b4f" +dependencies = [ + "num-derive 0.4.2", + "num-traits", + "solana-program", + "spl-program-error-derive 0.3.2", + "thiserror", +] + +[[package]] +name = "spl-program-error" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49065093ea91f57b9b2bd81493ff705e2ad4e64507a07dbc02b085778e02770e" +dependencies = [ + "num-derive 0.4.2", + "num-traits", + "solana-program", + "spl-program-error-derive 0.4.1", + "thiserror", +] + +[[package]] +name = "spl-program-error-derive" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1845dfe71fd68f70382232742e758557afe973ae19e6c06807b2c30f5d5cb474" +dependencies = [ + "proc-macro2", + "quote", + "sha2 0.10.8", + "syn 2.0.58", +] + +[[package]] +name = "spl-program-error-derive" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d375dd76c517836353e093c2dbb490938ff72821ab568b545fd30ab3256b3e" +dependencies = [ + "proc-macro2", + "quote", + "sha2 0.10.8", + "syn 2.0.58", +] + +[[package]] +name = "spl-tlv-account-resolution" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f335787add7fa711819f9e7c573f8145a5358a709446fe2d24bf2a88117c90" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator 0.1.1", + "spl-pod 0.1.1", + "spl-program-error 0.3.1", + "spl-type-length-value 0.3.1", +] + +[[package]] +name = "spl-tlv-account-resolution" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cace91ba08984a41556efe49cbf2edca4db2f577b649da7827d3621161784bf8" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator 0.2.2", + "spl-pod 0.2.2", + "spl-program-error 0.4.1", + "spl-type-length-value 0.4.3", +] + +[[package]] +name = "spl-token" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e85e168a785e82564160dcb87b2a8e04cee9bfd1f4d488c729d53d6a4bd300d" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive 0.3.3", "num-traits", "num_enum 0.5.10", "solana-program", "thiserror", ] +[[package]] +name = "spl-token" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08459ba1b8f7c1020b4582c4edf0f5c7511a5e099a7a97570c9698d4f2337060" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive 0.3.3", + "num-traits", + "num_enum 0.6.1", + "solana-program", + "thiserror", +] + [[package]] name = "spl-token-2022" version = "0.6.1" @@ -7618,16 +8332,176 @@ checksum = "0043b590232c400bad5ee9eb983ced003d15163c4c5d56b090ac6d9a57457b47" dependencies = [ "arrayref", "bytemuck", - "num-derive", + "num-derive 0.3.3", "num-traits", "num_enum 0.5.10", "solana-program", "solana-zk-token-sdk", - "spl-memo", - "spl-token", + "spl-memo 3.0.1", + "spl-token 3.5.0", "thiserror", ] +[[package]] +name = "spl-token-2022" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d697fac19fd74ff472dfcc13f0b442dd71403178ce1de7b5d16f83a33561c059" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive 0.4.2", + "num-traits", + "num_enum 0.7.2", + "solana-program", + "solana-security-txt", + "solana-zk-token-sdk", + "spl-memo 4.0.0", + "spl-pod 0.1.1", + "spl-token 4.0.0", + "spl-token-group-interface 0.1.0", + "spl-token-metadata-interface 0.2.0", + "spl-transfer-hook-interface 0.4.1", + "spl-type-length-value 0.3.1", + "thiserror", +] + +[[package]] +name = "spl-token-2022" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5412f99ae7ee6e0afde00defaa354e6228e47e30c0e3adf553e2e01e6abb584" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive 0.4.2", + "num-traits", + "num_enum 0.7.2", + "solana-program", + "solana-security-txt", + "solana-zk-token-sdk", + "spl-memo 4.0.0", + "spl-pod 0.2.2", + "spl-token 4.0.0", + "spl-token-group-interface 0.2.3", + "spl-token-metadata-interface 0.3.3", + "spl-transfer-hook-interface 0.6.3", + "spl-type-length-value 0.4.3", + "thiserror", +] + +[[package]] +name = "spl-token-group-interface" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b889509d49fa74a4a033ca5dae6c2307e9e918122d97e58562f5c4ffa795c75d" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator 0.1.1", + "spl-pod 0.1.1", + "spl-program-error 0.3.1", +] + +[[package]] +name = "spl-token-group-interface" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d419b5cfa3ee8e0f2386fd7e02a33b3ec8a7db4a9c7064a2ea24849dc4a273b6" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator 0.2.2", + "spl-pod 0.2.2", + "spl-program-error 0.4.1", +] + +[[package]] +name = "spl-token-metadata-interface" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c16ce3ba6979645fb7627aa1e435576172dd63088dc7848cb09aa331fa1fe4f" +dependencies = [ + "borsh 0.10.3", + "solana-program", + "spl-discriminator 0.1.1", + "spl-pod 0.1.1", + "spl-program-error 0.3.1", + "spl-type-length-value 0.3.1", +] + +[[package]] +name = "spl-token-metadata-interface" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30179c47e93625680dabb620c6e7931bd12d62af390f447bc7beb4a3a9b5feee" +dependencies = [ + "borsh 1.5.1", + "solana-program", + "spl-discriminator 0.2.2", + "spl-pod 0.2.2", + "spl-program-error 0.4.1", + "spl-type-length-value 0.4.3", +] + +[[package]] +name = "spl-transfer-hook-interface" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aabdb7c471566f6ddcee724beb8618449ea24b399e58d464d6b5bc7db550259" +dependencies = [ + "arrayref", + "bytemuck", + "solana-program", + "spl-discriminator 0.1.1", + "spl-pod 0.1.1", + "spl-program-error 0.3.1", + "spl-tlv-account-resolution 0.5.2", + "spl-type-length-value 0.3.1", +] + +[[package]] +name = "spl-transfer-hook-interface" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66a98359769cd988f7b35c02558daa56d496a7e3bd8626e61f90a7c757eedb9b" +dependencies = [ + "arrayref", + "bytemuck", + "solana-program", + "spl-discriminator 0.2.2", + "spl-pod 0.2.2", + "spl-program-error 0.4.1", + "spl-tlv-account-resolution 0.6.3", + "spl-type-length-value 0.4.3", +] + +[[package]] +name = "spl-type-length-value" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f9ebd75d29c5f48de5f6a9c114e08531030b75b8ac2c557600ac7da0b73b1e8" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator 0.1.1", + "spl-pod 0.1.1", + "spl-program-error 0.3.1", +] + +[[package]] +name = "spl-type-length-value" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "422ce13429dbd41d2cee8a73931c05fda0b0c8ca156a8b0c19445642550bb61a" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator 0.2.2", + "spl-pod 0.2.2", + "spl-program-error 0.4.1", +] + [[package]] name = "sqlformat" version = "0.2.0" @@ -7680,7 +8554,7 @@ dependencies = [ "log", "md-5", "memchr", - "num-bigint 0.4.3", + "num-bigint 0.4.4", "once_cell", "paste", "percent-encoding", @@ -7691,7 +8565,7 @@ dependencies = [ "serde", "serde_json", "sha1", - "sha2 0.10.6", + "sha2 0.10.8", "smallvec", "sqlformat", "sqlx-rt", @@ -7713,9 +8587,9 @@ dependencies = [ "either", "heck 0.4.0", "once_cell", - "proc-macro2 1.0.79", - "quote 1.0.33", - "sha2 0.10.6", + "proc-macro2", + "quote", + "sha2 0.10.8", "sqlx-core", "sqlx-rt", "syn 1.0.109", @@ -7782,8 +8656,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ "heck 0.4.0", - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "rustversion", "syn 1.0.109", ] @@ -7796,35 +8670,36 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "0.15.44" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "unicode-xid 0.1.0", + "proc-macro2", + "quote", + "unicode-ident", ] [[package]] name = "syn" -version = "1.0.109" +version = "2.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "unicode-ident", ] [[package]] -name = "syn" -version = "2.0.38" +name = "syn_derive" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", - "unicode-ident", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.58", ] [[package]] @@ -7839,10 +8714,10 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", - "unicode-xid 0.2.4", + "unicode-xid", ] [[package]] @@ -7866,6 +8741,12 @@ dependencies = [ "libc", ] +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + [[package]] name = "task-manager" version = "0.1.0" @@ -7917,22 +8798,22 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2", + "quote", + "syn 2.0.58", ] [[package]] @@ -8028,7 +8909,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.5", + "socket2", "tokio-macros", "windows-sys 0.48.0", ] @@ -8049,9 +8930,9 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2", + "quote", + "syn 2.0.58", ] [[package]] @@ -8081,7 +8962,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.9", + "rustls 0.21.12", "tokio", ] @@ -8098,18 +8979,17 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.17.2" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" dependencies = [ "futures-util", "log", - "rustls 0.20.9", + "rustls 0.21.12", "tokio", - "tokio-rustls 0.23.4", + "tokio-rustls 0.24.1", "tungstenite", - "webpki", - "webpki-roots 0.22.5", + "webpki-roots 0.25.2", ] [[package]] @@ -8135,6 +9015,23 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" + +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap 2.2.6", + "toml_datetime", + "winnow", +] + [[package]] name = "tonic" version = "0.10.2" @@ -8154,7 +9051,7 @@ dependencies = [ "percent-encoding", "pin-project", "prost", - "rustls 0.21.9", + "rustls 0.21.12", "rustls-native-certs", "rustls-pemfile", "tokio", @@ -8173,10 +9070,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d021fc044c18582b9a2408cd0dd05b1596e3ecdb5c4df822bb0183545683889" dependencies = [ "prettyplease", - "proc-macro2 1.0.79", + "proc-macro2", "prost-build", - "quote 1.0.33", - "syn 2.0.38", + "quote", + "syn 2.0.58", ] [[package]] @@ -8249,9 +9146,9 @@ version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2", + "quote", + "syn 2.0.58", ] [[package]] @@ -8296,10 +9193,10 @@ dependencies = [ [[package]] name = "treasury-management" version = "0.2.0" -source = "git+https://github.com/helium/helium-anchor-gen.git#a10352d0341c99b08931ad58309112e51f09c874" +source = "git+https://github.com/helium/helium-anchor-gen.git#fe60ed1d49e9255bd779a99bdd7928f278c07256" dependencies = [ "anchor-gen", - "anchor-lang", + "anchor-lang 0.30.1", ] [[package]] @@ -8316,24 +9213,23 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "tungstenite" -version = "0.17.3" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" dependencies = [ - "base64 0.13.1", "byteorder", "bytes", + "data-encoding", "http 0.2.11", "httparse", "log", "rand 0.8.5", - "rustls 0.20.9", - "sha-1", + "rustls 0.21.12", + "sha1", "thiserror", "url", "utf-8", - "webpki", - "webpki-roots 0.22.5", + "webpki-roots 0.24.0", ] [[package]] @@ -8343,7 +9239,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", - "rand 0.8.5", + "rand 0.7.3", "static_assertions", ] @@ -8361,9 +9257,9 @@ checksum = "7c52b4cb7830f995903b2fcff3f523d21efc1c11f6c1596dd544b7925a64ff56" [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -8392,12 +9288,6 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" - [[package]] name = "unicode-xid" version = "0.2.4" @@ -8459,13 +9349,14 @@ dependencies = [ [[package]] name = "url" -version = "2.3.1" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] [[package]] @@ -8544,10 +9435,10 @@ dependencies = [ [[package]] name = "voter-stake-registry" version = "0.3.1" -source = "git+https://github.com/helium/helium-anchor-gen.git#a10352d0341c99b08931ad58309112e51f09c874" +source = "git+https://github.com/helium/helium-anchor-gen.git#fe60ed1d49e9255bd779a99bdd7928f278c07256" dependencies = [ "anchor-gen", - "anchor-lang", + "anchor-lang 0.30.1", ] [[package]] @@ -8596,9 +9487,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -8606,16 +9497,16 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2 1.0.79", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2", + "quote", + "syn 2.0.58", "wasm-bindgen-shared", ] @@ -8633,32 +9524,32 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ - "quote 1.0.33", + "quote", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2", + "quote", + "syn 2.0.58", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "web-sys" @@ -8689,6 +9580,15 @@ dependencies = [ "webpki", ] +[[package]] +name = "webpki-roots" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b291546d5d9d1eab74f069c77749f2cb8504a12caa20f0f2de93ddbf6f411888" +dependencies = [ + "rustls-webpki", +] + [[package]] name = "webpki-roots" version = "0.25.2" @@ -8750,21 +9650,6 @@ dependencies = [ "windows_x86_64_msvc 0.36.1", ] -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - [[package]] name = "windows-sys" version = "0.48.0" @@ -8813,12 +9698,6 @@ dependencies = [ "windows_x86_64_msvc 0.52.0", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.48.0" @@ -8837,12 +9716,6 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - [[package]] name = "windows_aarch64_msvc" version = "0.48.0" @@ -8861,12 +9734,6 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - [[package]] name = "windows_i686_gnu" version = "0.48.0" @@ -8885,12 +9752,6 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - [[package]] name = "windows_i686_msvc" version = "0.48.0" @@ -8909,12 +9770,6 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - [[package]] name = "windows_x86_64_gnu" version = "0.48.0" @@ -8927,12 +9782,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.0" @@ -8951,12 +9800,6 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - [[package]] name = "windows_x86_64_msvc" version = "0.48.0" @@ -8969,6 +9812,15 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.50.0" @@ -8979,6 +9831,15 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + [[package]] name = "x509-parser" version = "0.14.0" @@ -9027,13 +9888,13 @@ dependencies = [ "csv", "flate2", "helium-crypto", - "indexmap 2.0.2", + "indexmap 2.2.6", "prost", "prost-build", "rand 0.8.5", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "thiserror", "twox-hash", "xorf", @@ -9069,9 +9930,9 @@ version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2", + "quote", + "syn 2.0.58", ] [[package]] @@ -9089,8 +9950,8 @@ version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", "synstructure", ] diff --git a/Cargo.toml b/Cargo.toml index 3b1fd85d7..870fd79e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ license = "Apache-2.0" edition = "2021" [workspace.dependencies] -anchor-client = "0.29.0" +anchor-client = { version = "0.30.0", features = ["async"] } anyhow = { version = "1", features = ["backtrace"] } bs58 = { version = "0.4", features = ["check"] } thiserror = "1" @@ -66,15 +66,16 @@ sqlx = { version = "0", features = [ ] } helium-anchor-gen = { git = "https://github.com/helium/helium-anchor-gen.git" } helium-crypto = { version = "0.8.4", features = ["sqlx-postgres", "multisig"] } +helium-lib = { git = "https://github.com/helium/helium-wallet-rs.git", branch = "master" } hextree = { git = "https://github.com/jaykickliter/HexTree", branch = "main", features = [ "disktree", ] } helium-proto = { git = "https://github.com/helium/proto", branch = "master", features = [ "services", ] } -solana-client = "1.16" -solana-sdk = "1.16" -solana-program = "1.16" +solana-client = "1.18" +solana-sdk = "1.18" +solana-program = "1.18" spl-token = "3.5.0" reqwest = { version = "0", default-features = false, features = [ "gzip", @@ -102,7 +103,6 @@ triggered = "0" futures = "*" futures-util = "*" prost = "*" -pyth-solana-receiver-sdk = "0" once_cell = "1" lazy_static = "1" config = { version = "0", default-features = false, features = ["toml"] } diff --git a/price/Cargo.toml b/price/Cargo.toml index 1551b8da7..9e5de5bfe 100644 --- a/price/Cargo.toml +++ b/price/Cargo.toml @@ -24,10 +24,12 @@ tokio = { workspace = true } tokio-util = { workspace = true } chrono = { workspace = true } helium-anchor-gen = { workspace = true } +helium-lib = { workspace = true } helium-proto = { workspace = true } file-store = { path = "../file_store" } poc-metrics = { path = "../metrics" } -pyth-solana-receiver-sdk = { workspace = true } +rust_decimal = { workspace = true } +rust_decimal_macros = { workspace = true } triggered = { workspace = true } solana-client = { workspace = true } solana-sdk = { workspace = true } diff --git a/price/src/main.rs b/price/src/main.rs index 886e97b49..bc0747488 100644 --- a/price/src/main.rs +++ b/price/src/main.rs @@ -1,7 +1,6 @@ use anyhow::Result; use clap::Parser; use file_store::{file_sink, file_upload, FileType}; -use helium_proto::BlockchainTokenTypeV1; use price::{cli::check, PriceGenerator, Settings}; use std::{ path::{self, PathBuf}, @@ -92,24 +91,23 @@ impl Server { .create() .await?; - // price generators - let hnt_price_generator = - PriceGenerator::new(settings, BlockchainTokenTypeV1::Hnt, price_sink.clone()).await?; - let mobile_price_generator = - PriceGenerator::new(settings, BlockchainTokenTypeV1::Mobile, price_sink.clone()) - .await?; - let iot_price_generator = - PriceGenerator::new(settings, BlockchainTokenTypeV1::Iot, price_sink.clone()).await?; - - TaskManager::builder() - .add_task(file_upload_server) - .add_task(price_sink_server) - .add_task(hnt_price_generator) - .add_task(mobile_price_generator) - .add_task(iot_price_generator) - .build() - .start() - .await + let mut task_manager = TaskManager::new(); + task_manager.add(file_upload_server); + task_manager.add(price_sink_server); + + for token_setting in settings.tokens.iter() { + task_manager.add( + PriceGenerator::new( + settings, + token_setting.token, + token_setting.default_price, + price_sink.clone(), + ) + .await?, + ); + } + + task_manager.start().await } } diff --git a/price/src/metrics.rs b/price/src/metrics.rs index c39b53996..53008588b 100644 --- a/price/src/metrics.rs +++ b/price/src/metrics.rs @@ -1,20 +1,20 @@ -use helium_proto::BlockchainTokenTypeV1; +use helium_lib::token::Token; const PRICE_GAUGE: &str = concat!(env!("CARGO_PKG_NAME"), "_", "price_gauge"); pub struct Metrics; impl Metrics { - pub fn update(counter: String, token_type: BlockchainTokenTypeV1, price: f64) { - increment_counter(counter, token_type); - set_gauge(token_type, price) + pub fn update(counter: String, token: Token, price: f64) { + increment_counter(counter, token); + set_gauge(token, price) } } -fn increment_counter(counter: String, token_type: BlockchainTokenTypeV1) { - metrics::counter!(counter, "token_type" => token_type.as_str_name()).increment(1); +fn increment_counter(counter: String, token: Token) { + metrics::counter!(counter, "token_type" => token.to_string()).increment(1); } -fn set_gauge(token_type: BlockchainTokenTypeV1, value: f64) { - metrics::gauge!(PRICE_GAUGE, "token_type" => token_type.as_str_name()).set(value); +fn set_gauge(token: Token, value: f64) { + metrics::gauge!(PRICE_GAUGE, "token_type" => token.to_string()).set(value); } diff --git a/price/src/price_generator.rs b/price/src/price_generator.rs index 934e44b89..7fd3fb2e7 100644 --- a/price/src/price_generator.rs +++ b/price/src/price_generator.rs @@ -1,15 +1,14 @@ use crate::{metrics::Metrics, Settings}; -use anyhow::{anyhow, bail, Error, Result}; +use anyhow::{anyhow, Error, Result}; use chrono::{DateTime, TimeZone, Utc}; use file_store::file_sink; use futures::{future::LocalBoxFuture, TryFutureExt}; -use helium_anchor_gen::anchor_lang::AccountDeserialize; +use helium_lib::token::Token; use helium_proto::{BlockchainTokenTypeV1, PriceReportV1}; -use pyth_solana_receiver_sdk::price_update::{FeedId, PriceUpdateV2}; +use rust_decimal::Decimal; use serde::{Deserialize, Serialize}; use solana_client::nonblocking::rpc_client::RpcClient; -use solana_sdk::pubkey::Pubkey as SolPubkey; -use std::{cmp::Ordering, path::PathBuf, str::FromStr, time::Duration}; +use std::{path::PathBuf, str::FromStr, time::Duration}; use task_manager::ManagedTask; use tokio::{fs, time}; @@ -17,31 +16,28 @@ use tokio::{fs, time}; pub struct Price { timestamp: DateTime, price: u64, - token_type: BlockchainTokenTypeV1, + token: Token, } impl Price { - fn new(timestamp: DateTime, price: u64, token_type: BlockchainTokenTypeV1) -> Self { + fn new(timestamp: DateTime, price: u64, token: Token) -> Self { Self { timestamp, price, - token_type, + token, } } } pub struct PriceGenerator { - token_type: BlockchainTokenTypeV1, + token: Token, client: RpcClient, interval_duration: std::time::Duration, last_price_opt: Option, - key: Option, - feed_id: Option, default_price: Option, stale_price_duration: Duration, latest_price_file: PathBuf, - file_sink: Option, - pyth_price_interval: std::time::Duration, + file_sink: file_sink::FileSinkClient, } impl ManagedTask for PriceGenerator { @@ -53,13 +49,20 @@ impl ManagedTask for PriceGenerator { } } -impl From for PriceReportV1 { - fn from(value: Price) -> Self { - Self { +impl TryFrom<&Price> for PriceReportV1 { + type Error = Error; + + fn try_from(value: &Price) -> anyhow::Result { + Ok(Self { timestamp: value.timestamp.timestamp() as u64, price: value.price, - token_type: value.token_type.into(), - } + token_type: match value.token { + Token::Hnt => BlockchainTokenTypeV1::Hnt.into(), + Token::Mobile => BlockchainTokenTypeV1::Mobile.into(), + Token::Iot => BlockchainTokenTypeV1::Iot.into(), + _ => anyhow::bail!("Invalid token type"), + }, + }) } } @@ -75,7 +78,12 @@ impl TryFrom for Price { .single() .ok_or_else(|| anyhow!("invalid timestamp"))?, price: value.price, - token_type: tt, + token: match tt { + BlockchainTokenTypeV1::Hnt => Token::Hnt, + BlockchainTokenTypeV1::Mobile => Token::Mobile, + BlockchainTokenTypeV1::Iot => Token::Iot, + _ => anyhow::bail!("Invalid token type"), + }, }) } } @@ -83,151 +91,89 @@ impl TryFrom for Price { impl PriceGenerator { pub async fn new( settings: &Settings, - token_type: BlockchainTokenTypeV1, + token: Token, + default_price: Option, file_sink: file_sink::FileSinkClient, ) -> Result { let client = RpcClient::new(settings.source.clone()); Ok(Self { last_price_opt: None, - token_type, + token, client, - key: settings.price_key(token_type)?, - feed_id: settings.price_feed_id(token_type)?, - default_price: settings.default_price(token_type)?, + default_price, interval_duration: settings.interval, stale_price_duration: settings.stale_price_duration, latest_price_file: PathBuf::from_str(&settings.cache)? - .join(format!("{token_type:?}.latest")), - file_sink: Some(file_sink), - pyth_price_interval: settings.pyth_price_interval, + .join(format!("{:?}.latest", token)), + file_sink, }) } - pub async fn run(mut self, shutdown: triggered::Listener) -> Result<()> { - match ( - self.key, - self.feed_id, - self.default_price, - self.file_sink.clone(), - ) { - (Some(key), Some(feed_id), _, Some(file_sink)) => { - self.run_with_key(key, feed_id, file_sink, &shutdown).await - } - (None, None, Some(defaut_price), Some(file_sink)) => { - self.run_with_default(defaut_price, file_sink, &shutdown) - .await - } - _ => { - tracing::warn!( - "stopping price generator for {:?}, not configured", - self.token_type - ); - Ok(()) - } - } - } + pub async fn run(mut self, mut shutdown: triggered::Listener) -> Result<()> { + tracing::info!(token = %self.token, "starting price generator"); - async fn run_with_default( - &mut self, - default_price: u64, - file_sink: file_sink::FileSinkClient, - shutdown: &triggered::Listener, - ) -> Result<()> { - tracing::info!( - "starting default price generator for {:?}, using price {default_price}", - self.token_type - ); let mut trigger = time::interval(self.interval_duration); + self.last_price_opt = self.read_price_file().await; loop { tokio::select! { biased; - _ = shutdown.clone() => break, + _ = &mut shutdown => break, _ = trigger.tick() => { - let price = Price::new(Utc::now(), default_price, self.token_type); - let price_report = PriceReportV1::from(price); - tracing::info!("updating {:?} with default price: {}", self.token_type, default_price); - file_sink.write(price_report, []).await?; + match self.default_price { + Some(price) => { + let price = Price::new(Utc::now(), price, self.token); + self.write_price_to_sink(&price).await?; + } + None => { + self.retrieve_and_update_price().await?; + } + } } } } - tracing::info!("stopping default price generator for {:?}", self.token_type); + tracing::info!(token = %self.token, "stopping price generator"); Ok(()) } - async fn run_with_key( - &mut self, - key: SolPubkey, - feed_id: FeedId, - file_sink: file_sink::FileSinkClient, - shutdown: &triggered::Listener, - ) -> Result<()> { - tracing::info!("starting price generator for {:?}", self.token_type); - let mut trigger = time::interval(self.interval_duration); - self.last_price_opt = self.read_price_file().await; + async fn write_price_to_sink(&self, price: &Price) -> Result<()> { + let price_report = PriceReportV1::try_from(price)?; + tracing::info!(token = %self.token, %price.price, "updating price"); + self.file_sink.write(price_report, []).await?; - loop { - tokio::select! { - biased; - _ = shutdown.clone() => break, - _ = trigger.tick() => self.handle(&key, &feed_id, &file_sink).await?, - } - } - - tracing::info!("stopping price generator for {:?}", self.token_type); Ok(()) } - async fn handle( - &mut self, - key: &SolPubkey, - feed_id: &FeedId, - file_sink: &file_sink::FileSinkClient, - ) -> Result<()> { - let price_opt = match self.get_pyth_price(key, feed_id).await { + async fn retrieve_and_update_price(&mut self) -> Result<()> { + let price_opt = match self.get_pyth_price().await { Ok(new_price) => { - tracing::info!( - "updating price for {:?} to {}", - self.token_type, - new_price.price - ); self.last_price_opt = Some(new_price.clone()); self.write_price_file(&new_price).await; Metrics::update( "price_update_counter".to_string(), - self.token_type, + self.token, new_price.price as f64, ); Some(new_price) } Err(err) => { - tracing::error!( - "error in retrieving new price for {:?}: {err:?}", - self.token_type - ); + tracing::error!(token = %self.token,?err,"error in retrieving new price"); match &self.last_price_opt { Some(old_price) if self.is_valid(old_price) => { Metrics::update( "price_stale_counter".to_string(), - self.token_type, + self.token, old_price.price as f64, ); - Some(Price::new( - Utc::now(), - old_price.price, - old_price.token_type, - )) + Some(Price::new(Utc::now(), old_price.price, old_price.token)) } Some(_old_price) => { - tracing::warn!( - "stale price for {:?} is too old, discarding", - self.token_type - ); + tracing::warn!(token = %self.token, "stale price is too old, discarding"); self.last_price_opt = None; None } @@ -237,58 +183,23 @@ impl PriceGenerator { }; if let Some(price) = price_opt { - let price_report = PriceReportV1::from(price); - tracing::debug!("price_report: {:?}", price_report); - file_sink.write(price_report, []).await?; + self.write_price_to_sink(&price).await?; } Ok(()) } - async fn get_pyth_price(&self, price_key: &SolPubkey, feed_id: &FeedId) -> Result { - let account = self.client.get_account(price_key).await?; - let PriceUpdateV2 { price_message, .. } = - PriceUpdateV2::try_deserialize(&mut account.data.as_slice())?; - - if price_message.feed_id != *feed_id { - bail!("Mismatched feed id"); - } - - if price_message - .publish_time - .saturating_add(self.pyth_price_interval.as_secs() as i64) - < Utc::now().timestamp() - { - bail!("Price is too old"); - } - - if price_message.ema_price < 0 { - bail!("Price is less than zero"); - } - - // Remove the confidence interval from the price to get the most optimistic price: - let optimistic_price = price_message.ema_price as u64 + price_message.ema_conf * 2; - - // We want the price to have a resulting exponent of 10^-6 - // I don't think it's possible for pyth to give us anything other than -8, but we make - // this robust just in case: - let exp = price_message.exponent + 6; - let adjusted_optimistic_price = match exp.cmp(&0) { - Ordering::Less => optimistic_price / 10_u64.pow(exp.unsigned_abs()), - Ordering::Greater => optimistic_price * 10_u64.pow(exp as u32), - _ => optimistic_price, - }; - - Ok(Price::new( - DateTime::from_timestamp(price_message.publish_time, 0).ok_or_else(|| { - anyhow!( - "Invalid publish time for price: {}", - price_message.publish_time - ) - })?, - adjusted_optimistic_price, - self.token_type, - )) + async fn get_pyth_price(&self) -> Result { + helium_lib::token::price::get(&self.client, self.token) + .await + .map_err(anyhow::Error::from) + .and_then(|p| { + tracing::debug!(token = %self.token, %p.price, "retrieved price from chain"); + (p.price * Decimal::from(10_u64.pow(self.token.decimals() as u32))) + .try_into() + .map(|price| Price::new(p.timestamp, price, self.token)) + .map_err(anyhow::Error::from) + }) } fn is_valid(&self, price: &Price) -> bool { @@ -303,7 +214,7 @@ impl PriceGenerator { }) .await .map_err(|err| { - tracing::warn!(token = ?self.token_type, "unable to read latest price file due to {err}"); + tracing::warn!(token = %self.token, ?err, "unable to read latest price file"); err }) .ok() @@ -320,7 +231,7 @@ impl PriceGenerator { match result { Ok(_) => (), Err(err) => { - tracing::warn!(token = ?self.token_type, "unable to save latest price file due to {err}"); + tracing::warn!(token = %self.token, ?err, "unable to save latest price file"); } } } diff --git a/price/src/settings.rs b/price/src/settings.rs index f7724a327..169b83d80 100644 --- a/price/src/settings.rs +++ b/price/src/settings.rs @@ -1,41 +1,14 @@ -use anyhow::{anyhow, Result}; +use anyhow::Result; use config::{Config, Environment, File}; -use helium_proto::BlockchainTokenTypeV1; +use helium_lib::token::Token; use humantime_serde::re::humantime; -use pyth_solana_receiver_sdk::price_update::{get_feed_id_from_hex, FeedId}; use serde::Deserialize; -use solana_sdk::pubkey::Pubkey as SolPubkey; -use std::{path::Path, str::FromStr, time::Duration}; +use std::{path::Path, time::Duration}; #[derive(Debug, Deserialize, Clone)] -pub struct ClusterConfig { - pub name: String, - pub hnt_price_key: Option, - pub hnt_price_feed_id: Option, - pub hnt_price: Option, - pub mobile_price_key: Option, - pub mobile_price_feed_id: Option, - pub mobile_price: Option, - pub iot_price_key: Option, - pub iot_price_feed_id: Option, - pub iot_price: Option, -} - -impl Default for ClusterConfig { - fn default() -> Self { - Self { - name: "devnet".to_string(), - hnt_price_key: None, - hnt_price_feed_id: None, - hnt_price: None, - mobile_price_key: None, - mobile_price_feed_id: None, - mobile_price: None, - iot_price_key: None, - iot_price_feed_id: None, - iot_price: None, - } - } +pub struct TokenSetting { + pub token: Token, + pub default_price: Option, } #[derive(Debug, Deserialize, Clone)] @@ -59,19 +32,10 @@ pub struct Settings { /// Tick interval (secs). Default = 60s. #[serde(with = "humantime_serde", default = "default_interval")] pub interval: Duration, - /// Cluster Configuration - #[serde(default)] - pub cluster: ClusterConfig, + pub tokens: Vec, /// How long to use a stale price in minutes #[serde(with = "humantime_serde", default = "default_stale_price_duration")] pub stale_price_duration: Duration, - /// Interval when retrieving a pyth price from on chain - #[serde(with = "humantime_serde", default = "default_pyth_price_interval")] - pub pyth_price_interval: Duration, -} - -fn default_pyth_price_interval() -> Duration { - humantime::parse_duration("2 hours").unwrap() } fn default_source() -> String { @@ -116,42 +80,4 @@ impl Settings { .build() .and_then(|config| config.try_deserialize()) } - - pub fn price_key(&self, token_type: BlockchainTokenTypeV1) -> Result> { - self.key(token_type)? - .as_ref() - .map(|key| SolPubkey::from_str(key).map_err(|_| anyhow!("unable to parse {}", key))) - .transpose() - } - - pub fn price_feed_id(&self, token_type: BlockchainTokenTypeV1) -> Result> { - let feed_id = match token_type { - BlockchainTokenTypeV1::Hnt => Ok(self.cluster.hnt_price_feed_id.as_deref()), - BlockchainTokenTypeV1::Mobile => Ok(self.cluster.mobile_price_feed_id.as_deref()), - BlockchainTokenTypeV1::Iot => Ok(self.cluster.iot_price_feed_id.as_deref()), - _ => Err(anyhow::anyhow!("token type not supported")), - }?; - - feed_id - .map(|f| get_feed_id_from_hex(f).map_err(|_| anyhow::anyhow!("invalid feed id"))) - .transpose() - } - - pub fn default_price(&self, token_type: BlockchainTokenTypeV1) -> Result> { - match token_type { - BlockchainTokenTypeV1::Hnt => Ok(self.cluster.hnt_price), - BlockchainTokenTypeV1::Iot => Ok(self.cluster.iot_price), - BlockchainTokenTypeV1::Mobile => Ok(self.cluster.mobile_price), - _ => Err(anyhow::anyhow!("token type not supported")), - } - } - - fn key(&self, token_type: BlockchainTokenTypeV1) -> Result<&Option> { - match token_type { - BlockchainTokenTypeV1::Hnt => Ok(&self.cluster.hnt_price_key), - BlockchainTokenTypeV1::Mobile => Ok(&self.cluster.mobile_price_key), - BlockchainTokenTypeV1::Iot => Ok(&self.cluster.iot_price_key), - _ => Err(anyhow::anyhow!("token type not supported")), - } - } } diff --git a/solana/Cargo.toml b/solana/Cargo.toml index 6c70f07e0..b63b87618 100644 --- a/solana/Cargo.toml +++ b/solana/Cargo.toml @@ -9,13 +9,13 @@ license.workspace = true [dependencies] anyhow = { workspace = true } async-trait = {workspace = true} -anchor-client = {workspace = true} +anchor-client = { workspace = true } clap = {workspace = true} chrono = {workspace = true} file-store = {path = "../file_store"} futures = {workspace = true} helium-anchor-gen = {workspace = true} -helium-crypto = {workspace = true, features = ["solana"]} +helium-crypto = {workspace = true} itertools = {workspace = true} metrics = {workspace = true} serde = {workspace = true} @@ -26,5 +26,4 @@ solana-sdk = {workspace = true} spl-token = {workspace = true} thiserror = {workspace = true} tokio = {workspace = true} -tokio-util = { workspace = true } tracing = {workspace = true} diff --git a/solana/src/burn.rs b/solana/src/burn.rs index 3103a4cc2..1041ab000 100644 --- a/solana/src/burn.rs +++ b/solana/src/burn.rs @@ -215,13 +215,11 @@ impl SolanaNetwork for SolanaRpc { // This is Sync land: anything async in here will error. let instructions = { - let rt_handle = tokio::runtime::Handle::current(); let request = RequestBuilder::from( data_credits::id(), &self.cluster, std::rc::Rc::new(Keypair::from_bytes(&self.keypair).unwrap()), Some(CommitmentConfig::confirmed()), - &rt_handle, ); let args = instruction::BurnDelegatedDataCreditsV0 { diff --git a/solana/src/start_boost.rs b/solana/src/start_boost.rs index 7a79d3a58..a83acec09 100644 --- a/solana/src/start_boost.rs +++ b/solana/src/start_boost.rs @@ -74,13 +74,11 @@ impl SolanaNetwork for SolanaRpc { batch: &[BoostedHexActivation], ) -> Result { let instructions = { - let rt_handle = tokio::runtime::Handle::current(); let mut request = RequestBuilder::from( hexboosting::id(), &self.cluster, std::rc::Rc::new(Keypair::from_bytes(&self.keypair).unwrap()), Some(CommitmentConfig::confirmed()), - &rt_handle, ); for update in batch { let account = accounts::StartBoostV0 {