diff --git a/.github/workflows/pull-request-account-compression.yml b/.github/workflows/pull-request-account-compression.yml index 61b39c2154d..b91a0b65a6a 100644 --- a/.github/workflows/pull-request-account-compression.yml +++ b/.github/workflows/pull-request-account-compression.yml @@ -59,11 +59,11 @@ jobs: - name: Install dependencies run: | ./ci/install-build-deps.sh + ./ci/install-program-deps.sh echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH - - name: Build Anchor Programs - run: | - ./ci/anchor-build.sh account-compression + - name: Build and test programs + run: ./ci/cargo-test-sbf.sh account-compression - name: Upload programs uses: actions/upload-artifact@v2 diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index db186508bfc..1211692fa38 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -77,7 +77,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: clippy - args: -Zunstable-options --workspace --all-targets --features test-sbf -- --deny=warnings --deny=clippy::integer_arithmetic + args: -Zunstable-options --workspace --all-targets --features test-sbf -- --deny=warnings --deny=clippy::arithmetic_side_effects audit: runs-on: ubuntu-latest @@ -109,6 +109,9 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Remove unneeded packages for more space + run: bash ./ci/warning/purge-ubuntu-runner.sh + - name: Set env vars run: | source ci/rust-version.sh diff --git a/Anchor.toml b/Anchor.toml index f0618b78135..9fa0a764bdf 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -1,5 +1,5 @@ -anchor_version = "0.28.0" -solana_version = "1.16.16" +anchor_version = "0.29.0" +solana_version = "1.17.2" [workspace] members = [ diff --git a/Cargo.lock b/Cargo.lock index 93eef674bcb..5da727f4fc3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,6 +12,15 @@ dependencies = [ "regex", ] +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -217,7 +226,7 @@ dependencies = [ "derivative", "digest 0.10.7", "itertools", - "num-bigint 0.4.3", + "num-bigint 0.4.4", "num-traits", "paste", "rustc_version", @@ -230,7 +239,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" dependencies = [ - "quote 1.0.29", + "quote", "syn 1.0.107", ] @@ -240,10 +249,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.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -269,7 +278,7 @@ dependencies = [ "ark-serialize-derive", "ark-std", "digest 0.10.7", - "num-bigint 0.4.3", + "num-bigint 0.4.4", ] [[package]] @@ -278,8 +287,8 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -293,12 +302,6 @@ 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.7" @@ -307,9 +310,9 @@ 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" @@ -339,8 +342,8 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", "synstructure", ] @@ -351,8 +354,8 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -379,9 +382,9 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "async-channel" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", "event-listener", @@ -390,9 +393,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.3.14" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345fd392ab01f746c717b1357165b76f0b67a60192007b234058c9045fdcf695" +checksum = "f658e2baef915ba0f26f1f7c42bfb8e12f532a01f449a090ded75ae7a07e9ba2" dependencies = [ "brotli", "flate2", @@ -427,8 +430,8 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -438,8 +441,8 @@ version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 2.0.28", ] @@ -471,9 +474,9 @@ dependencies = [ [[package]] name = "axum" -version = "0.6.7" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fb79c228270dcf2426e74864cabc94babb5dbab01a4314e702d2f16540e1591" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ "async-trait", "axum-core", @@ -493,7 +496,6 @@ dependencies = [ "serde", "sync_wrapper", "tower", - "tower-http", "tower-layer", "tower-service", ] @@ -529,6 +531,21 @@ dependencies = [ "tokio", ] +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if 1.0.0", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base64" version = "0.12.3" @@ -587,8 +604,8 @@ dependencies = [ "lazycell", "peeking_take_while", "prettyplease 0.2.4", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "regex", "rustc-hash", "shlex", @@ -621,6 +638,9 @@ name = "bitflags" version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +dependencies = [ + "serde", +] [[package]] name = "bitmaps" @@ -633,9 +653,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "729b71f35bd3fa1a4c86b85d32c8b9069ea7fe14f7a53cfabb65f62d4265b888" +checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" dependencies = [ "arrayref", "arrayvec", @@ -720,7 +740,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.63", + "proc-macro2", "syn 1.0.107", ] @@ -733,7 +753,7 @@ dependencies = [ "borsh-derive-internal 0.10.3", "borsh-schema-derive-internal 0.10.3", "proc-macro-crate 0.1.5", - "proc-macro2 1.0.63", + "proc-macro2", "syn 1.0.107", ] @@ -743,8 +763,8 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -754,8 +774,8 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -765,8 +785,8 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -776,8 +796,8 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -824,7 +844,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" dependencies = [ "memchr", - "regex-automata", + "regex-automata 0.3.0", "serde", ] @@ -865,8 +885,8 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aca418a974d83d40a0c1f0c5cba6ff4bc28d8df099109ca459a2118d40b6322" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -878,9 +898,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.2.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "bzip2" @@ -923,8 +943,8 @@ dependencies = [ "heck 0.3.3", "indexmap 1.9.3", "log", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "serde", "serde_json", "syn 1.0.107", @@ -934,11 +954,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -986,9 +1007,9 @@ dependencies = [ [[package]] name = "chrono-humanize" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32dce1ea1988dbdf9f9815ff11425828523bd2a134ec0805d2ac8af26ee6096e" +checksum = "799627e6b4d27827a814e837b9d8a504832086081806d45b1afa34dc982b023b" dependencies = [ "chrono", ] @@ -1053,8 +1074,8 @@ checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" dependencies = [ "heck 0.4.1", "proc-macro-error", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -1140,9 +1161,9 @@ checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" [[package]] name = "constant_time_eq" -version = "0.2.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a53c0a4d288377e7415b53dcfc3c04da5cdc2cc95c8d5ac178b58f0b861ad6" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "convert_case" @@ -1310,8 +1331,8 @@ dependencies = [ "cc", "codespan-reporting", "once_cell", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "scratch", "syn 1.0.107", ] @@ -1328,8 +1349,8 @@ version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "309e4fb93eed90e1e14bea0da16b209f81813ba9fc7830c20ed151dd7bc0a4d7" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -1351,8 +1372,8 @@ checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "strsim 0.10.0", "syn 2.0.28", ] @@ -1364,7 +1385,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", - "quote 1.0.29", + "quote", "syn 2.0.28", ] @@ -1414,7 +1435,7 @@ dependencies = [ "asn1-rs", "displaydoc", "nom", - "num-bigint 0.4.3", + "num-bigint 0.4.4", "num-traits", "rusticata-macros", ] @@ -1431,8 +1452,8 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -1442,8 +1463,8 @@ version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53e0efad4403bfc52dc201159c4b842a246a14b98c64b55dfd0f2d89729dfeb8" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 2.0.28", ] @@ -1454,8 +1475,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "convert_case", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "rustc_version", "syn 1.0.107", ] @@ -1543,32 +1564,32 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] [[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 0.3.9", ] [[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.28", ] [[package]] @@ -1625,16 +1646,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f86b50932a01e7ec5c06160492ab660fb19b6bb2a7878030dd6cd68d21df9d4d" dependencies = [ "enum-ordinalize", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "encode_unicode" @@ -1666,8 +1687,8 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eecf8589574ce9b895052fa12d69af7a233f99e6107f5cb8dd1044f2a17bfdcb" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 2.0.28", ] @@ -1677,10 +1698,10 @@ version = "3.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b166c9e378360dd5a6666a9604bb4f54ae0cac39023ffbac425e917a2a04fef" dependencies = [ - "num-bigint 0.4.3", + "num-bigint 0.4.4", "num-traits", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -1691,8 +1712,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f33313078bb8d4d05a2733a94ac4c2d8a0df9a2b84424ebf4f33bfc224a890e" dependencies = [ "once_cell", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 2.0.28", ] @@ -1738,16 +1759,17 @@ dependencies = [ [[package]] name = "etcd-client" -version = "0.8.2" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3bfae4cb9cd8c3c2a552d45e155cafd079f385a3b9421b9a010878f44531f1e" +checksum = "f4b0ea5ef6dc2388a4b1669fa32097249bc03a15417b97cb75e38afb309e4a89" dependencies = [ "http", - "prost 0.9.0", + "prost", "tokio", "tokio-stream", - "tonic 0.6.2", - "tonic-build 0.6.2", + "tonic", + "tonic-build", + "tower", "tower-service", ] @@ -1813,9 +1835,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "miniz_oxide", @@ -1851,6 +1873,12 @@ dependencies = [ "percent-encoding 2.3.0", ] +[[package]] +name = "fs-err" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541" + [[package]] name = "fs_extra" version = "1.3.0" @@ -1918,8 +1946,8 @@ version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 2.0.28", ] @@ -2010,6 +2038,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "gimli" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" + [[package]] name = "glob" version = "0.3.0" @@ -2116,9 +2150,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" [[package]] name = "headers" @@ -2171,12 +2205,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -2186,9 +2217,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hidapi" -version = "2.3.3" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f841dbb77615e116fb2ca38044b42310370f0d093c774a72361670ff2ae431b" +checksum = "723777263b0dcc5730aec947496bd8c3940ba63c15f5633b288cc615f4f6af79" dependencies = [ "cc", "libc", @@ -2266,12 +2297,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "http-range-header" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" - [[package]] name = "httparse" version = "1.8.0" @@ -2292,9 +2317,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -2307,7 +2332,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -2334,15 +2359,16 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.23.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" dependencies = [ + "futures-util", "http", "hyper", - "rustls 0.20.8", + "rustls", "tokio", - "tokio-rustls 0.23.2", + "tokio-rustls", ] [[package]] @@ -2457,26 +2483,26 @@ checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", - "rayon", "serde", ] [[package]] name = "indexmap" -version = "2.0.0" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.1", + "rayon", "serde", ] [[package]] name = "indicatif" -version = "0.17.5" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff8cc23a7393a397ed1d7f56e6365cba772aba9f9912ab968b03043c395d057" +checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" dependencies = [ "console", "instant", @@ -2511,9 +2537,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.3" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jobserver" @@ -2592,8 +2618,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b939a78fa820cdfcb7ee7484466746a7377760970f6f9c6fe19f9edcc8a38d2" dependencies = [ "proc-macro-crate 0.1.5", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -2679,9 +2705,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.146" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libloading" @@ -2773,6 +2799,17 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "light-poseidon" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "949bdd22e4ed93481d45e9a6badb34b99132bcad0c8a8d4f05c42f7dcc7b90bc" +dependencies = [ + "ark-bn254", + "ark-ff", + "thiserror", +] + [[package]] name = "link-cplusplus" version = "1.0.7" @@ -2800,12 +2837,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if 1.0.0", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lru" @@ -2856,9 +2890,9 @@ checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memmap2" @@ -2937,24 +2971,13 @@ dependencies = [ [[package]] name = "mio" -version = "0.7.14" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", - "miow", - "ntapi", - "winapi 0.3.9", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi 0.3.9", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", ] [[package]] @@ -2973,8 +2996,8 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -3015,16 +3038,15 @@ dependencies = [ [[package]] name = "nix" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ "bitflags 1.3.2", "cfg-if 1.0.0", "libc", "memoffset 0.7.1", "pin-utils", - "static_assertions", ] [[package]] @@ -3037,14 +3059,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "ntapi" -version = "0.3.7" -source = "git+https://github.com/solana-labs/ntapi?rev=97ede981a1777883ff86d142b75024b023f04fad#97ede981a1777883ff86d142b75024b023f04fad" -dependencies = [ - "winapi 0.3.9", -] - [[package]] name = "num" version = "0.2.1" @@ -3072,9 +3086,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", @@ -3097,8 +3111,8 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -3108,8 +3122,8 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 2.0.28", ] @@ -3158,11 +3172,11 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.3", "libc", ] @@ -3191,8 +3205,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" dependencies = [ "proc-macro-crate 1.1.0", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 2.0.28", ] @@ -3203,8 +3217,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56ea360eafe1022f7cc56cd7b869ed57330fb2453d0c7831d99b74c65d2f5597" dependencies = [ "proc-macro-crate 1.1.0", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 2.0.28", ] @@ -3214,6 +3228,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" +[[package]] +name = "object" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +dependencies = [ + "memchr", +] + [[package]] name = "oid-registry" version = "0.6.0" @@ -3225,9 +3248,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.13.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "opaque-debug" @@ -3262,8 +3285,8 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -3338,8 +3361,8 @@ checksum = "5f7d21ccd03305a674437ee1248f3ab5d4b1db095cf1caf49f1713ddf61956b7" dependencies = [ "Inflector", "proc-macro-error", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -3478,8 +3501,8 @@ checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" dependencies = [ "pest", "pest_meta", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -3519,16 +3542,16 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 2.0.28", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -3623,7 +3646,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b83ec2d0af5c5c556257ff52c9f98934e243b9fd39604bfb2a9b75ec2e97f18" dependencies = [ - "proc-macro2 1.0.63", + "proc-macro2", "syn 1.0.107", ] @@ -3633,7 +3656,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ceca8aaf45b5c46ec7ed39fff75f57290368c1846d33d24a122ca81416ab058" dependencies = [ - "proc-macro2 1.0.63", + "proc-macro2", "syn 2.0.28", ] @@ -3663,8 +3686,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", "version_check", ] @@ -3675,25 +3698,16 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "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.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -3712,22 +3726,12 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "rand_xorshift", - "regex-syntax", + "regex-syntax 0.7.2", "rusty-fork", "tempfile", "unarray", ] -[[package]] -name = "prost" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "444879275cb4fd84958b1a1d5420d15e6fcf7c235fe47f053c9c2a80aceb6001" -dependencies = [ - "bytes", - "prost-derive 0.9.0", -] - [[package]] name = "prost" version = "0.11.9" @@ -3735,27 +3739,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes", - "prost-derive 0.11.9", -] - -[[package]] -name = "prost-build" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62941722fb675d463659e49c4f3fe1fe792ff24fe5bbaa9c08cd3b98a1c354f5" -dependencies = [ - "bytes", - "heck 0.3.3", - "itertools", - "lazy_static", - "log", - "multimap", - "petgraph", - "prost 0.9.0", - "prost-types 0.9.0", - "regex", - "tempfile", - "which", + "prost-derive", ] [[package]] @@ -3772,27 +3756,14 @@ dependencies = [ "multimap", "petgraph", "prettyplease 0.1.9", - "prost 0.11.9", - "prost-types 0.11.9", + "prost", + "prost-types", "regex", "syn 1.0.107", "tempfile", "which", ] -[[package]] -name = "prost-derive" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2 1.0.63", - "quote 1.0.29", - "syn 1.0.107", -] - [[package]] name = "prost-derive" version = "0.11.9" @@ -3801,28 +3772,18 @@ checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", "itertools", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] -[[package]] -name = "prost-types" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534b7a0e836e3c482d2693070f982e39e7611da9695d4d1f5a4b186b51faef0a" -dependencies = [ - "bytes", - "prost 0.9.0", -] - [[package]] name = "prost-types" version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ - "prost 0.11.9", + "prost", ] [[package]] @@ -3843,6 +3804,17 @@ dependencies = [ "percent-encoding 2.3.0", ] +[[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.28", +] + [[package]] name = "quick-error" version = "1.2.3" @@ -3851,61 +3823,50 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[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.8", + "rustls", "thiserror", "tokio", "tracing", - "webpki 0.22.0", ] [[package]] name = "quinn-proto" -version = "0.9.5" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c956be1b23f4261676aed05a0046e204e8a6836e50203902683a718af0797989" +checksum = "2c78e758510582acc40acb90458401172d41f1016f8c9dde89e49677afb7eec1" dependencies = [ "bytes", "rand 0.8.5", "ring", "rustc-hash", - "rustls 0.20.8", + "rustls", "rustls-native-certs", "slab", "thiserror", "tinyvec", "tracing", - "webpki 0.22.0", ] [[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", + "socket2 0.5.4", "tracing", - "windows-sys 0.42.0", -] - -[[package]] -name = "quote" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -dependencies = [ - "proc-macro2 0.4.30", + "windows-sys 0.48.0", ] [[package]] @@ -3914,7 +3875,7 @@ version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" dependencies = [ - "proc-macro2 1.0.63", + "proc-macro2", ] [[package]] @@ -4095,13 +4056,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.4" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick 1.0.2", "memchr", - "regex-syntax", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] @@ -4110,17 +4072,34 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa250384981ea14565685dea16a9ccc4d1c541a13f82b9c168572264d1df8c56" +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick 1.0.2", + "memchr", + "regex-syntax 0.8.2", +] + [[package]] name = "regex-syntax" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + [[package]] name = "reqwest" -version = "0.11.17" +version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13293b639a097af28fc8a90f22add145a9c954e49d77da06263d58cf44d5fb91" +checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ "async-compression", "base64 0.21.4", @@ -4142,21 +4121,22 @@ dependencies = [ "once_cell", "percent-encoding 2.3.0", "pin-project-lite", - "rustls 0.20.8", + "rustls", "rustls-pemfile 1.0.1", "serde", "serde_json", "serde_urlencoded", + "system-configuration", "tokio", "tokio-native-tls", - "tokio-rustls 0.23.2", + "tokio-rustls", "tokio-util 0.7.1", "tower-service", - "url 2.4.0", + "url 2.4.1", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots", + "webpki-roots 0.25.2", "winreg", ] @@ -4266,27 +4246,14 @@ dependencies = [ [[package]] name = "rustls" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" -dependencies = [ - "base64 0.13.0", - "log", - "ring", - "sct 0.6.1", - "webpki 0.21.4", -] - -[[package]] -name = "rustls" -version = "0.20.8" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" dependencies = [ "log", "ring", - "sct 0.7.0", - "webpki 0.22.0", + "rustls-webpki", + "sct", ] [[package]] @@ -4319,11 +4286,21 @@ dependencies = [ "base64 0.13.0", ] +[[package]] +name = "rustls-webpki" +version = "0.101.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "rusty-fork" @@ -4364,9 +4341,9 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "scratch" @@ -4389,21 +4366,11 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdbda6ac5cd1321e724fa9cee216f3a61885889b896f073b8f82322789c5250e" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "sct" version = "0.7.0" @@ -4439,9 +4406,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "serde" @@ -4454,9 +4421,9 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.9" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" +checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" dependencies = [ "serde", ] @@ -4467,8 +4434,8 @@ version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 2.0.28", ] @@ -4515,7 +4482,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.0.0", + "indexmap 2.0.2", "serde", "serde_json", "serde_with_macros 3.4.0", @@ -4529,8 +4496,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ "darling", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 2.0.28", ] @@ -4541,18 +4508,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788" dependencies = [ "darling", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 2.0.28", ] [[package]] name = "serde_yaml" -version = "0.9.21" +version = "0.9.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9d684e3ec7de3bf5466b32bd75303ac16f0736426e5a4e0d6e489559ce1249c" +checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" dependencies = [ - "indexmap 1.9.3", + "indexmap 2.0.2", "itoa", "ryu", "serde", @@ -4579,8 +4546,8 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 2.0.28", ] @@ -4620,6 +4587,17 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.10.7", +] + [[package]] name = "sha2" version = "0.9.8" @@ -4681,8 +4659,8 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9ec31d18dcca23f2270ccf69766a99156792da3aed050dc5713af0e778b4f2" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "shank_macro_impl", "shank_render", "syn 1.0.107", @@ -4695,8 +4673,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccaeb1359cf545507b5d18a637cc5cf192c7dcc8c737dff466013ca2d9e792c7" dependencies = [ "anyhow", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "serde", "syn 1.0.107", ] @@ -4707,8 +4685,8 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e63f0b763c4c767dfb462a884d5f5b9b99fdd0a214c910d95792eb02a13b3d69" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "shank_macro_impl", ] @@ -4754,6 +4732,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a30f10c911c0355f80f1c2faa8096efc4a58cdf8590b954d5b395efa071c711" +[[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" @@ -4805,6 +4789,16 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "socket2" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "soketto" version = "0.7.1" @@ -4822,9 +4816,9 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52aec62a85932e26d1085864b0f7b99b31934aec8dd132429bfef6d7fb1d3a6" +checksum = "ea108fb41a4d6c3bafaf7d78fa94a6c2c6e863dc4e773c8e57dec22161be42b0" dependencies = [ "Inflector", "base64 0.21.4", @@ -4835,7 +4829,6 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "solana-address-lookup-table-program", "solana-config-program", "solana-sdk", "spl-token 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4846,19 +4839,78 @@ dependencies = [ ] [[package]] -name = "solana-address-lookup-table-program" -version = "1.16.16" +name = "solana-accounts-db" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee0bd25f4ba0a15fc16c57b41b1e1b14f5271b83214fda158fdedb58758d394e" +checksum = "4f1667ba2a54bf033667d17eaf3b12a7aee362b7b55725a6b594b67cb8e8fc7f" dependencies = [ + "arrayref", "bincode", + "blake3", + "bv", "bytemuck", - "log", - "num-derive 0.3.3", - "num-traits", - "rustc_version", - "serde", - "solana-frozen-abi", + "byteorder", + "bzip2", + "crossbeam-channel", + "dashmap 4.0.2", + "flate2", + "fnv", + "fs-err", + "im", + "index_list", + "itertools", + "lazy_static", + "log", + "lz4", + "memmap2", + "modular-bitfield", + "num-derive 0.3.3", + "num-traits", + "num_cpus", + "num_enum 0.6.1", + "ouroboros", + "percentage", + "qualifier_attr", + "rand 0.8.5", + "rayon", + "regex", + "rustc_version", + "serde", + "serde_derive", + "solana-bucket-map", + "solana-config-program", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-measure", + "solana-metrics", + "solana-program-runtime", + "solana-rayon-threadlimit", + "solana-sdk", + "solana-stake-program", + "solana-system-program", + "solana-vote-program", + "static_assertions", + "strum 0.24.1", + "strum_macros 0.24.3", + "tar", + "tempfile", + "thiserror", +] + +[[package]] +name = "solana-address-lookup-table-program" +version = "1.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2ee56e31d9b1733f874bfe5b54abef43fb49810f7291deccbdf713527b44b6f" +dependencies = [ + "bincode", + "bytemuck", + "log", + "num-derive 0.3.3", + "num-traits", + "rustc_version", + "serde", + "solana-frozen-abi", "solana-frozen-abi-macro", "solana-program", "solana-program-runtime", @@ -4868,9 +4920,9 @@ dependencies = [ [[package]] name = "solana-banks-client" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37a449977903406debdb9e2fb6b64a04a51aa1feebecc8e6aecd9205bdd65518" +checksum = "4118d1d75cecd79defb0f8de61e428d186fb873d17641e817f80caed202a5647" dependencies = [ "borsh 0.10.3", "futures 0.3.28", @@ -4885,9 +4937,9 @@ dependencies = [ [[package]] name = "solana-banks-interface" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4199a498974657332646554683d813e68db4c5a355acd021df17717507176a84" +checksum = "1fdea91839646ec597a1dd6f5e884cb5c30d574db21970fcc20b04deb4747d96" dependencies = [ "serde", "solana-sdk", @@ -4896,13 +4948,14 @@ dependencies = [ [[package]] name = "solana-banks-server" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20d04ee3ada5ac704717d893598a6237146e17020c1d1e015e713891b227bbf" +checksum = "faa79d64545dcb21680e6939ed63bd9e88425f55a098492d96c9407c7a5b4990" dependencies = [ "bincode", "crossbeam-channel", "futures 0.3.28", + "solana-accounts-db", "solana-banks-interface", "solana-client", "solana-runtime", @@ -4915,14 +4968,14 @@ dependencies = [ [[package]] name = "solana-bloom" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93587bdf22cc3245200a2e39511440a3256b02c41223b96590c78755208f2c9" +checksum = "427cfd51bc19173aed04ea9d9f47861dc3bdc0bd6c1a06177823f6085ff94b6e" dependencies = [ "bv", "fnv", "log", - "rand 0.7.3", + "rand 0.8.5", "rayon", "rustc_version", "serde", @@ -4934,15 +4987,15 @@ dependencies = [ [[package]] name = "solana-bpf-loader-program" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05fb3284ae3a51bd173c7f61fcd9d6c1a10cfe46b082ce3189dec9f86120c245" +checksum = "91dc36edd5b4d37b852accbed3bf41dde302954d7716565700e0fd81e0f5dced" dependencies = [ "bincode", "byteorder", "libsecp256k1", "log", - "rand 0.7.3", + "scopeguard", "solana-measure", "solana-program-runtime", "solana-sdk", @@ -4953,16 +5006,17 @@ dependencies = [ [[package]] name = "solana-bucket-map" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d521e26cbadd0f95d1f5c3c63c81db592bf30ef9c08d9d17c5276eb4ae7294" +checksum = "36bf733cdfccac6bf2cb1e74f3bd247bd59c2024fc72760cf3ac4cb334e6b86d" dependencies = [ "bv", + "bytemuck", "log", "memmap2", "modular-bitfield", "num_enum 0.6.1", - "rand 0.7.3", + "rand 0.8.5", "solana-measure", "solana-sdk", "tempfile", @@ -4970,46 +5024,44 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e963043668c640183d48472b281ebb9f713e0c36df0271961d23e6a394e09070" +checksum = "1114079301af35bed62dba298beaad478a3788cbc376def9a56b8e9d26fc1b8f" dependencies = [ "chrono", "clap 2.34.0", "rpassword", - "solana-perf", "solana-remote-wallet", "solana-sdk", "thiserror", "tiny-bip39", "uriparse", - "url 2.4.0", + "url 2.4.1", ] [[package]] name = "solana-clap-v3-utils" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44b73d3fde5d8d4bf5401489781bb486fbfe208dd8b27bfc9555f82ae137fd7d" +checksum = "fb1a68ec80502bc7793b3f715934a8d93a092fbc5926e0f48fb5f7e90aa5df96" dependencies = [ "chrono", "clap 3.2.25", "rpassword", - "solana-perf", "solana-remote-wallet", "solana-sdk", "solana-zk-token-sdk", "thiserror", "tiny-bip39", "uriparse", - "url 2.4.0", + "url 2.4.1", ] [[package]] name = "solana-cli-config" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "febecf05517593d6da0592fc6039b069e659a1e062b114eeaf4c22d44293b2db" +checksum = "7967e8d158c82b99a3eb3775ff695ee0f87a0abc7df169dbe3e054777e08e72a" dependencies = [ "dirs-next", "lazy_static", @@ -5018,14 +5070,14 @@ dependencies = [ "serde_yaml", "solana-clap-utils", "solana-sdk", - "url 2.4.0", + "url 2.4.1", ] [[package]] name = "solana-cli-output" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864c328349439ea0f451d722d804392741b66a7237d05cd69dea0bb23d74f5cb" +checksum = "c3b3e410b5665a44951cc726a4b61f38912de6c10ce47861c24d5bb1f9775de6" dependencies = [ "Inflector", "base64 0.21.4", @@ -5050,19 +5102,19 @@ dependencies = [ [[package]] name = "solana-client" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ccf7bb34fb81c74582a9011babaa2e0220da56c71186e77f45a6f352017fdb" +checksum = "fcc2d00016dc7975d866dd9ef3ffdd7c6dffec972495645953c07e587330e135" dependencies = [ "async-trait", "bincode", + "dashmap 4.0.2", "futures 0.3.28", "futures-util", - "indexmap 1.9.3", + "indexmap 2.0.2", "indicatif", "log", "quinn", - "rand 0.7.3", "rayon", "solana-connection-cache", "solana-measure", @@ -5083,9 +5135,9 @@ dependencies = [ [[package]] name = "solana-compute-budget-program" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "910cbdb15cbc37d509a08211a4d0227e4845945f2305d7265dd6645eb59ca2b1" +checksum = "33e650787669f715616444f32bafabf1fe17240d9154e182f83c3949bdd3d627" dependencies = [ "solana-program-runtime", "solana-sdk", @@ -5093,9 +5145,9 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fd0fc1efb91a1661aeb1ff6a691156c3b1bffdaed0aa096589499dd83f9e50b" +checksum = "96a1f220474e7b9ed04cf450b13fa5ff4d03e7b7acefd36edfbe3d4c8d3f4ebb" dependencies = [ "bincode", "chrono", @@ -5107,16 +5159,17 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8759e9cb9b1e92a94c31812169ecb5e65b5e215fb70fb68691e03655de5b7b6c" +checksum = "9ac0b83f1486f474424f77d2af10608305cac2e1184fde39a13c2a4a8e4c7cc8" dependencies = [ "async-trait", "bincode", + "crossbeam-channel", "futures-util", - "indexmap 1.9.3", + "indexmap 2.0.2", "log", - "rand 0.7.3", + "rand 0.8.5", "rayon", "rcgen", "solana-measure", @@ -5128,18 +5181,20 @@ dependencies = [ [[package]] name = "solana-core" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf30ffe15c1f481591227c8e597ef83c3d7a29e31344abd9223c3079ac0aab28" +checksum = "7d6780f9f71ad19116242ef8c5a992742fe91308e6a6ea031eba77e4528c8c6c" dependencies = [ "base64 0.21.4", "bincode", "bs58", + "bytes", "chrono", "crossbeam-channel", "dashmap 4.0.2", "eager", "etcd-client", + "futures 0.3.28", "histogram", "itertools", "lazy_static", @@ -5147,16 +5202,21 @@ dependencies = [ "lru", "min-max-heap", "num_enum 0.6.1", - "rand 0.7.3", - "rand_chacha 0.2.2", + "quinn", + "rand 0.8.5", + "rand_chacha 0.3.1", "rayon", + "rcgen", "rolling-file", "rustc_version", + "rustls", "serde", + "serde_bytes", "serde_derive", - "solana-address-lookup-table-program", + "solana-accounts-db", "solana-bloom", "solana-client", + "solana-cost-model", "solana-entry", "solana-frozen-abi", "solana-frozen-abi-macro", @@ -5169,6 +5229,7 @@ dependencies = [ "solana-perf", "solana-poh", "solana-program-runtime", + "solana-quic-client", "solana-rayon-threadlimit", "solana-rpc", "solana-rpc-client-api", @@ -5178,7 +5239,9 @@ dependencies = [ "solana-streamer", "solana-tpu-client", "solana-transaction-status", + "solana-turbine", "solana-version", + "solana-vote", "solana-vote-program", "strum 0.24.1", "strum_macros 0.24.3", @@ -5190,19 +5253,42 @@ dependencies = [ "trees", ] +[[package]] +name = "solana-cost-model" +version = "1.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77597dfb4f40a753218811c06647d6bf63d31060f67336212acff6c1282efb8e" +dependencies = [ + "lazy_static", + "log", + "rustc_version", + "solana-address-lookup-table-program", + "solana-bpf-loader-program", + "solana-compute-budget-program", + "solana-config-program", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-loader-v4-program", + "solana-metrics", + "solana-program-runtime", + "solana-sdk", + "solana-stake-program", + "solana-system-program", + "solana-vote-program", +] + [[package]] name = "solana-entry" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd13a0d9c9f51c9ceba6d50481917dc2378ac0ed00444c8dd85339026e2ccb6" +checksum = "6a5d41f20906f2d20724356981ca3ba9778748c1f7f2051cf01f6ff9d0378770" dependencies = [ "bincode", "crossbeam-channel", - "dlopen", - "dlopen_derive", + "dlopen2", "lazy_static", "log", - "rand 0.7.3", + "rand 0.8.5", "rayon", "serde", "solana-measure", @@ -5215,9 +5301,9 @@ dependencies = [ [[package]] name = "solana-faucet" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f24d2bd1a6f5834700d6bbef9abfebad37dd31a11156867bb5bb39b635f2a7f6" +checksum = "34943471edf229a2f159ae62bf59825298a0fc5980e38108c578c40cb008f90f" dependencies = [ "bincode", "byteorder", @@ -5239,9 +5325,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02eb4f0ed3eade20f4abdcc0031167344237cd6e16808bd0f33945f9db7861fe" +checksum = "098378043a888c680de07eee987bf927e23e0720b472ba61c753d7b3757e6b3e" dependencies = [ "ahash 0.8.3", "blake3", @@ -5252,13 +5338,10 @@ dependencies = [ "cc", "either", "generic-array 0.14.7", - "getrandom 0.1.16", "im", "lazy_static", "log", "memmap2", - "once_cell", - "rand_core 0.6.4", "rustc_version", "serde", "serde_bytes", @@ -5272,21 +5355,21 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28514761a285944cbad5b3d7930546369b80a713ba37d84bcf6ed2753611765" +checksum = "c5f48c89a8a3a12f6a409a45fef50dae642211eae0207a91f01211aebb270026" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "rustc_version", "syn 2.0.28", ] [[package]] name = "solana-geyser-plugin-interface" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512372f741974113777872cecd560beee189cf79c3fb2eb84e1c28be69f011d1" +checksum = "db839ede8d1a65d091d8aafe5488945d864465cd283dfd0cf7d916d7732dfd3d" dependencies = [ "log", "solana-sdk", @@ -5296,9 +5379,9 @@ dependencies = [ [[package]] name = "solana-geyser-plugin-manager" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcaffd6755104004f14579501cce6a164939a351ee8f30ee443ba225f1b25508" +checksum = "14eafd17b39bfc98cfa39f03ba19fd707e8d9adbe5a28f1cea13824eda946a7b" dependencies = [ "bs58", "crossbeam-channel", @@ -5308,6 +5391,7 @@ dependencies = [ "libloading", "log", "serde_json", + "solana-accounts-db", "solana-entry", "solana-geyser-plugin-interface", "solana-ledger", @@ -5322,25 +5406,26 @@ dependencies = [ [[package]] name = "solana-gossip" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a6ff9c74e0face0f1903ffd5ba4243f76d846c36a9d0ce93515158cd0834dd5" +checksum = "08c69bbc5f324a351ac2865bb5ace113f5030ce794de51a367581a7d00c17c97" dependencies = [ + "assert_matches", "bincode", "bv", "clap 2.34.0", "crossbeam-channel", "flate2", - "indexmap 1.9.3", + "indexmap 2.0.2", "itertools", "log", "lru", - "matches", "num-traits", - "rand 0.7.3", - "rand_chacha 0.2.2", + "rand 0.8.5", + "rand_chacha 0.3.1", "rayon", "rustc_version", + "rustversion", "serde", "serde_bytes", "serde_derive", @@ -5363,6 +5448,7 @@ dependencies = [ "solana-thin-client", "solana-tpu-client", "solana-version", + "solana-vote", "solana-vote-program", "static_assertions", "thiserror", @@ -5370,13 +5456,13 @@ dependencies = [ [[package]] name = "solana-ledger" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d8dc05fc664b84950ea8777187554dbc660fd1b29fbc9be2d7f76183252639" +checksum = "3a3b30f13fd36aca0ba09274a75c56ad36fd61808758964a9ab55a82993f139a" dependencies = [ "assert_matches", "bincode", - "bitflags 1.3.2", + "bitflags 2.3.3", "byteorder", "chrono", "chrono-humanize", @@ -5391,9 +5477,9 @@ dependencies = [ "lru", "num_cpus", "num_enum 0.6.1", - "prost 0.11.9", - "rand 0.7.3", - "rand_chacha 0.2.2", + "prost", + "rand 0.8.5", + "rand_chacha 0.3.1", "rayon", "reed-solomon-erasure", "rocksdb", @@ -5403,7 +5489,9 @@ dependencies = [ "serde_bytes", "sha2 0.10.7", "solana-account-decoder", + "solana-accounts-db", "solana-bpf-loader-program", + "solana-cost-model", "solana-entry", "solana-frozen-abi", "solana-frozen-abi-macro", @@ -5418,10 +5506,13 @@ dependencies = [ "solana-storage-bigtable", "solana-storage-proto", "solana-transaction-status", + "solana-vote", "solana-vote-program", "spl-token 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "spl-token-2022 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "static_assertions", + "strum 0.24.1", + "strum_macros 0.24.3", "tempfile", "thiserror", "tokio", @@ -5431,12 +5522,11 @@ dependencies = [ [[package]] name = "solana-loader-v4-program" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd2e6d82d0d9911373bf5c3d1cdf2433e4e219c28fd6e907b6d2ecf99efe07ed" +checksum = "a86dfb559013436f20bbf6ae56323630319d853c82836e1a9a3dcae1180b9497" dependencies = [ "log", - "rand 0.7.3", "solana-measure", "solana-program-runtime", "solana-sdk", @@ -5445,9 +5535,9 @@ dependencies = [ [[package]] name = "solana-logger" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c310c6749435ce1ea25a9ae3edfb2fd2c2aed2aa4d4f7e0487a8077a0b1ee30" +checksum = "d7fa5daba09e7c2bc579b0d3151f649496f148a0ac2054bb042915fbfe9c1678" dependencies = [ "env_logger", "lazy_static", @@ -5456,9 +5546,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d171357580e62aa4ca19c780e25f4e74de064e2780cb8b9f6b6901d986fcd23" +checksum = "e87403b9fb2abd9f2f2b2879ca9e56e14b5ae58f145466e3e893a7810bcbceff" dependencies = [ "log", "solana-sdk", @@ -5466,20 +5556,19 @@ dependencies = [ [[package]] name = "solana-merkle-tree" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e290d433fc1d6e1b45dfef8ad8793992a8a80e5a7fc266881c3e504b28f702c" +checksum = "9ae716e57241958a1a2162099a7405c377fe7f192425259604ce61d3e93bbf8e" dependencies = [ "fast-math", - "matches", "solana-program", ] [[package]] name = "solana-metrics" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "013cbb3c82588278d2be18d3317ece5286cb54a3a06d5d38fc31e2a76a6d5e2d" +checksum = "e4b504a682911c4bf85b21278720870555f5996e2991daf54ea4ce300012e93e" dependencies = [ "crossbeam-channel", "gethostname", @@ -5487,49 +5576,49 @@ dependencies = [ "log", "reqwest", "solana-sdk", + "thiserror", ] [[package]] name = "solana-net-utils" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c50d7cac0694b1fe07499de25404a0c7d6836457e359aba3b08c3983c3dc5eb6" +checksum = "a573d966fd61609501401dc1350b6ba1d0dee91c166453ec77b2fb312e8072b1" dependencies = [ "bincode", "clap 3.2.25", "crossbeam-channel", "log", "nix", - "rand 0.7.3", + "rand 0.8.5", "serde", "serde_derive", - "socket2", + "socket2 0.5.4", "solana-logger", "solana-sdk", "solana-version", "tokio", - "url 2.4.0", + "url 2.4.1", ] [[package]] name = "solana-perf" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395d559e5be2c439551298e9fa95561807f24921fd9a1e08bb82a3dc05c02dea" +checksum = "fcffede3b37ccdddbd57f93e4228b268f05c0a5cb44cb6e382ed8a31a15f5573" dependencies = [ "ahash 0.8.3", "bincode", "bv", "caps", "curve25519-dalek", - "dlopen", - "dlopen_derive", + "dlopen2", "fnv", "lazy_static", "libc", "log", "nix", - "rand 0.7.3", + "rand 0.8.5", "rayon", "serde", "solana-metrics", @@ -5540,9 +5629,9 @@ dependencies = [ [[package]] name = "solana-poh" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14ed133790284621aee3b0c38404dd615ae6c05ca97cec99f19ba828e3cd23c4" +checksum = "85dcacf7c768ff43bea34ba4eb9fc11bfc5e8f1b4c2134ef5047f2a1a9e8ce87" dependencies = [ "core_affinity", "crossbeam-channel", @@ -5558,18 +5647,17 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff2aa5434a77413e9d43e971ceb47bdb003f2e8bbc0365a25b684aca2605c25" +checksum = "6e8834ffcd3773375e7fce4b261efefebbb64409da78e1627cbc4c2632139921" dependencies = [ "ark-bn254", "ark-ec", "ark-ff", "ark-serialize", - "array-bytes", "base64 0.21.4", "bincode", - "bitflags 1.3.2", + "bitflags 2.3.3", "blake3", "borsh 0.10.3", "borsh 0.9.3", @@ -5586,14 +5674,14 @@ dependencies = [ "lazy_static", "libc", "libsecp256k1", + "light-poseidon", "log", "memoffset 0.9.0", - "num-bigint 0.4.3", + "num-bigint 0.4.4", "num-derive 0.3.3", "num-traits", "parking_lot 0.12.0", - "rand 0.7.3", - "rand_chacha 0.2.2", + "rand 0.8.5", "rustc_version", "rustversion", "serde", @@ -5613,9 +5701,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1832fefc2187142dac169812518ec20da68b09abad86e4a78f8ae1787e4f56" +checksum = "99127d74ad7a383b7f3dae2ecaebfc7926250fb7cef19b67fb344811d020dc14" dependencies = [ "base64 0.21.4", "bincode", @@ -5627,7 +5715,7 @@ dependencies = [ "num-derive 0.3.3", "num-traits", "percentage", - "rand 0.7.3", + "rand 0.8.5", "rustc_version", "serde", "solana-frozen-abi", @@ -5641,9 +5729,9 @@ dependencies = [ [[package]] name = "solana-program-test" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb14fd42e9c71d246e0c1c88ed7e6e8d3461fae3e2807c19175bd13bab4904fd" +checksum = "444889fcaf4588b2aa7733aa2f726b80c126026d60d79f882064b06f70fea05b" dependencies = [ "assert_matches", "async-trait", @@ -5653,6 +5741,7 @@ dependencies = [ "crossbeam-channel", "log", "serde", + "solana-accounts-db", "solana-banks-client", "solana-banks-interface", "solana-banks-server", @@ -5662,15 +5751,16 @@ dependencies = [ "solana-runtime", "solana-sdk", "solana-vote-program", + "test-case", "thiserror", "tokio", ] [[package]] name = "solana-pubsub-client" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89388addbc3192407d948634f82c95c4dbe1efbe578582abfd136720e059556e" +checksum = "f271c0f60d010af98f03a595552891ca3f497e7074e2225131c5bb24fadca9b8" dependencies = [ "crossbeam-channel", "futures-util", @@ -5688,14 +5778,14 @@ dependencies = [ "tokio-stream", "tokio-tungstenite", "tungstenite", - "url 2.4.0", + "url 2.4.1", ] [[package]] name = "solana-quic-client" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7897b876a6df2d97b3a5ddfd764155c0591e3497e863fd7fdf32b54de4e2644" +checksum = "09e9e5f5bea29716b4c14d319058b4e01c5837d68bd29acbdfaccbeebddac68d" dependencies = [ "async-mutex", "async-trait", @@ -5705,9 +5795,8 @@ dependencies = [ "log", "quinn", "quinn-proto", - "quinn-udp", "rcgen", - "rustls 0.20.8", + "rustls", "solana-connection-cache", "solana-measure", "solana-metrics", @@ -5721,9 +5810,9 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba17a930f9974a17a9a6c6e82e7f89b40127e9cc0f9c17cfc29fc5b149d2c38" +checksum = "e864b2647831d5cad75bafa9234590821a97eba780c131fc12dc3bc45c1d9916" dependencies = [ "lazy_static", "num_cpus", @@ -5731,9 +5820,9 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80fb35e3fa78ef1d08a6a1d852e2c357e6ae388cb307d24fad359f57c34429f0" +checksum = "8d2ac9610026a977828af8b73984fdb2bac21f48bcf6b1f37767df31ca1cb0db" dependencies = [ "console", "dialoguer", @@ -5751,9 +5840,9 @@ dependencies = [ [[package]] name = "solana-rpc" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f830df5361a22e788e5a31690a8e5f0e8d5ce38fd86fcd12959f924451f14c4" +checksum = "8185f58b553e2eff2ba6edc71cfbc5e24c7a7a989cd3da780bcbb37a3e212eb9" dependencies = [ "base64 0.21.4", "bincode", @@ -5775,6 +5864,7 @@ dependencies = [ "serde_json", "soketto", "solana-account-decoder", + "solana-accounts-db", "solana-client", "solana-entry", "solana-faucet", @@ -5795,6 +5885,7 @@ dependencies = [ "solana-tpu-client", "solana-transaction-status", "solana-version", + "solana-vote", "solana-vote-program", "spl-token 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "spl-token-2022 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5806,9 +5897,9 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c512944689d747a87f76936c89bb59f5be6c9a3189631857f49746cfa47d5bd1" +checksum = "54b9bdf8cf0b55be95bd4198d2706a6536ff30957b8c939a2fdee0627343793b" dependencies = [ "async-trait", "base64 0.21.4", @@ -5832,9 +5923,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e918b75f8ac4c358a6b512bf8b7dafc8166ddcb52ded5164c6235e0693ccb09" +checksum = "d219157e9a0cf86a96b1d5601751df75340e2add88eca5ab1b0941a42307f2f1" dependencies = [ "base64 0.21.4", "bs58", @@ -5854,9 +5945,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-nonce-utils" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6e360ea2f3a756bdf6256c1f6ef13f8b01b5d2a7855b4f16cafb4a4017f0557" +checksum = "01995b2fea7b6d2623fd3ad00a4af6426f7eb225f8d529acf2397ea8cb6d3f10" dependencies = [ "clap 2.34.0", "solana-clap-utils", @@ -5867,11 +5958,12 @@ dependencies = [ [[package]] name = "solana-runtime" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9411246ad1096a5ea9df7af49323fab13658073876af0f21d1afc594e2b7e027" +checksum = "ebf7b2d9c9ae6301651ad601219e9c9ca879d9f11f86673c2eea6197aca4aafa" dependencies = [ "arrayref", + "base64 0.21.4", "bincode", "blake3", "bv", @@ -5883,6 +5975,7 @@ dependencies = [ "dir-diff", "flate2", "fnv", + "fs-err", "im", "index_list", "itertools", @@ -5896,20 +5989,24 @@ dependencies = [ "num-traits", "num_cpus", "num_enum 0.6.1", - "once_cell", "ouroboros", "percentage", - "rand 0.7.3", + "qualifier_attr", + "rand 0.8.5", "rayon", "regex", "rustc_version", "serde", "serde_derive", + "serde_json", + "siphasher", + "solana-accounts-db", "solana-address-lookup-table-program", "solana-bpf-loader-program", "solana-bucket-map", "solana-compute-budget-program", "solana-config-program", + "solana-cost-model", "solana-frozen-abi", "solana-frozen-abi-macro", "solana-loader-v4-program", @@ -5921,6 +6018,8 @@ dependencies = [ "solana-sdk", "solana-stake-program", "solana-system-program", + "solana-version", + "solana-vote", "solana-vote-program", "solana-zk-token-proof-program", "solana-zk-token-sdk", @@ -5936,14 +6035,14 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b1002048941cedbd7dd6a96fdaa3dc5238b998aaa70b81946b1e3ec108cc2be" +checksum = "dd1d4bf7b8f6a0350b8a1a81346a5819d9bd5c93096c2bf079f01b905dfe0443" dependencies = [ "assert_matches", "base64 0.21.4", "bincode", - "bitflags 1.3.2", + "bitflags 2.3.3", "borsh 0.10.3", "bs58", "bytemuck", @@ -5966,8 +6065,9 @@ dependencies = [ "num_enum 0.6.1", "pbkdf2 0.11.0", "qstring", + "qualifier_attr", "rand 0.7.3", - "rand_chacha 0.2.2", + "rand 0.8.5", "rustc_version", "rustversion", "serde", @@ -5989,22 +6089,22 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b41b63b2da4a37ce323aba108db21f4c7bfa638dd1bf58fdc870f83bdce48ba" +checksum = "170f3c87d862ba5c74c03fa37a2867c10aa68e7b210bdf004c7a8b330284c789" dependencies = [ "bs58", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "rustversion", "syn 2.0.28", ] [[package]] name = "solana-send-transaction-service" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac27f00f4e29a186c400af06124c79d5109ab1491accc306f3767659de3c0a7" +checksum = "4d4d5c756cd87641dd720dc7874182149d106f6753b0ba758023f1f1523fb8d9" dependencies = [ "crossbeam-channel", "log", @@ -6018,9 +6118,9 @@ dependencies = [ [[package]] name = "solana-stake-program" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4688885dce9619ec1dd7f95b2f58bbc439aab4bf9ee0041be120c6c00ee0cd44" +checksum = "8ea1b3f9e4a288970a308f47f25308ebba071100eae72f374fdcd777647315c9" dependencies = [ "bincode", "log", @@ -6033,9 +6133,9 @@ dependencies = [ [[package]] name = "solana-storage-bigtable" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c872369dc78d17b74a6702a39359dc377df99d935889052e1532ef858da1c4f8" +checksum = "eceb1c529665e3dfa3ce5aeabc36a58f51eb042df9ecdc35a12fb67f492205a4" dependencies = [ "backoff", "bincode", @@ -6050,8 +6150,8 @@ dependencies = [ "hyper-proxy", "log", "openssl", - "prost 0.11.9", - "prost-types 0.11.9", + "prost", + "prost-types", "serde", "serde_derive", "smpl_jwt", @@ -6061,39 +6161,39 @@ dependencies = [ "solana-transaction-status", "thiserror", "tokio", - "tonic 0.8.3", + "tonic", "zstd", ] [[package]] name = "solana-storage-proto" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5854c9bf9bc14d927942c96af1339cfa010c8a6b1c20656ce022f3b9ca421a61" +checksum = "1d99c8dbcec5045ebd53707b8f90f4126cf2cd6f2d1c393be24a0bc0572f02f6" dependencies = [ "bincode", "bs58", - "prost 0.11.9", + "prost", "protobuf-src", "serde", "solana-account-decoder", "solana-sdk", "solana-transaction-status", - "tonic-build 0.8.4", + "tonic-build", ] [[package]] name = "solana-streamer" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00e575f2bd5ae2776870fbd1d7379d4ad392c015e2a4e2a328953b821a9d36d" +checksum = "ca08a69ae2ac103925bf367020e646dcdbb778ead2ce8685d962ca15616f0fc5" dependencies = [ "async-channel", "bytes", "crossbeam-channel", "futures-util", "histogram", - "indexmap 1.9.3", + "indexmap 2.0.2", "itertools", "libc", "log", @@ -6103,10 +6203,9 @@ dependencies = [ "pkcs8", "quinn", "quinn-proto", - "quinn-udp", - "rand 0.7.3", + "rand 0.8.5", "rcgen", - "rustls 0.20.8", + "rustls", "solana-metrics", "solana-perf", "solana-sdk", @@ -6117,9 +6216,9 @@ dependencies = [ [[package]] name = "solana-system-program" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9149b38dce15baaf64e1b1cde38167f5c49d492a3c719c9a5c48b33cb645ecb" +checksum = "dcda9bf5b7e7b8726c6ddc7f06fc9110875e688e197e0602721b1b425cfc5cc2" dependencies = [ "bincode", "log", @@ -6131,9 +6230,9 @@ dependencies = [ [[package]] name = "solana-test-validator" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "382c659dbca54881d3bad2768742cbc813b19105877a2dec0e20bdf6c78596f1" +checksum = "2c18b08b7611e029d31ec91cd0177501330a91ab9e58d41ecce099ac6629638f" dependencies = [ "base64 0.21.4", "bincode", @@ -6141,6 +6240,7 @@ dependencies = [ "log", "serde_derive", "serde_json", + "solana-accounts-db", "solana-cli-output", "solana-client", "solana-core", @@ -6162,9 +6262,9 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df328e2624cce68c9949a53eac317a264eceb997131cb9bd22175698a5f5dc74" +checksum = "1d2c780ce4d234abbde57ed94342e882c0170c6ebe7d8f1f02763f6cb88a925d" dependencies = [ "bincode", "log", @@ -6177,17 +6277,16 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8ce6fe221c0e1fd8aa3078b8fcb0cc3f4c27942f1256b57a60608d81ae5348" +checksum = "e00eb9926169f8d4f9f6af95410decc01545a9ce991e12781cb8ae1515ab833f" dependencies = [ "async-trait", "bincode", "futures-util", - "indexmap 1.9.3", + "indexmap 2.0.2", "indicatif", "log", - "rand 0.7.3", "rayon", "solana-connection-cache", "solana-measure", @@ -6202,9 +6301,9 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db0b811793e78a908119cc02edca3ff8b54d5660104ebd06cc0e2e7e2f66900b" +checksum = "0f8af464b440c000a3e5306509f02240150b5311fffc4534738e1bdfdb604604" dependencies = [ "Inflector", "base64 0.21.4", @@ -6217,7 +6316,6 @@ dependencies = [ "serde_derive", "serde_json", "solana-account-decoder", - "solana-address-lookup-table-program", "solana-sdk", "spl-associated-token-account 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "spl-memo 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -6226,11 +6324,48 @@ dependencies = [ "thiserror", ] +[[package]] +name = "solana-turbine" +version = "1.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "519c0a695f79328a1654e8a8defdfeb0a9852c18bc186f640465d65c539fdaf1" +dependencies = [ + "bincode", + "bytes", + "crossbeam-channel", + "futures 0.3.28", + "itertools", + "log", + "lru", + "quinn", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rayon", + "rcgen", + "rustls", + "solana-entry", + "solana-gossip", + "solana-ledger", + "solana-measure", + "solana-metrics", + "solana-perf", + "solana-poh", + "solana-quic-client", + "solana-rayon-threadlimit", + "solana-rpc", + "solana-rpc-client-api", + "solana-runtime", + "solana-sdk", + "solana-streamer", + "thiserror", + "tokio", +] + [[package]] name = "solana-udp-client" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897ff303a15ba956e80573dee4cf96d94d41a69adc5362898b98851e347505ad" +checksum = "f2763ee4af6d7a92cd5b70679a8b46ea13f167e59a8f5f294041905b5258d9ae" dependencies = [ "async-trait", "solana-connection-cache", @@ -6243,9 +6378,9 @@ dependencies = [ [[package]] name = "solana-version" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9513754d3b2203a0e1045a211c5d68e72e4ed135e477344c21d096897fd2bf70" +checksum = "9d133bdd437accc92171e40d76cd5cd76cba59d58f6a2f89b02c8621ffab3b5d" dependencies = [ "log", "rustc_version", @@ -6257,11 +6392,30 @@ dependencies = [ "solana-sdk", ] +[[package]] +name = "solana-vote" +version = "1.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "840a57075b446db53d5591e107b32b46afeff7c5e1172c2ff90ed30067b8650a" +dependencies = [ + "crossbeam-channel", + "itertools", + "log", + "rustc_version", + "serde", + "serde_derive", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk", + "solana-vote-program", + "thiserror", +] + [[package]] name = "solana-vote-program" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b6bfc5302ce0383eb129aa3a916705a20d22c4ad448144ef684b7b028d4053f" +checksum = "733573c6e800f04d8721bd4b861165c17db94026e2c9da28d6a3553e095efacb" dependencies = [ "bincode", "log", @@ -6281,12 +6435,11 @@ dependencies = [ [[package]] name = "solana-zk-token-proof-program" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2475d6eb2fc01f3554b12b3668e5923760bf84bf723cc43a107a19cff887344f" +checksum = "4d2aa189efb2af7b1cf2339808b9bc236addeb776e62e5b5527947d2a68c699d" dependencies = [ "bytemuck", - "getrandom 0.1.16", "num-derive 0.3.3", "num-traits", "solana-program-runtime", @@ -6296,9 +6449,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d1fe77918563768a65fd5d6cd2fa06cf0aeb11e529a1ef8c230b0fe018600e3" +checksum = "34f2a9ce880cac8d1f7f0cbfaaac07fb84e163e7f616125f4980c13a21b17727" dependencies = [ "aes-gcm-siv", "base64 0.21.4", @@ -6325,9 +6478,9 @@ dependencies = [ [[package]] name = "solana_rbpf" -version = "0.6.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17d4ba1e58947346e360fabde0697029d36ba83c42f669199b16a8931313cf29" +checksum = "103318aa365ff7caa8cf534f2246b5eb7e5b34668736d52b1266b143f7a21196" dependencies = [ "byteorder", "combine", @@ -6459,7 +6612,7 @@ dependencies = [ name = "spl-discriminator-derive" version = "0.1.1" dependencies = [ - "quote 1.0.29", + "quote", "spl-discriminator-syn 0.1.1", "syn 2.0.28", ] @@ -6470,7 +6623,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fadbefec4f3c678215ca72bd71862697bb06b41fd77c0088902dd3203354387b" dependencies = [ - "quote 1.0.29", + "quote", "spl-discriminator-syn 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "syn 2.0.28", ] @@ -6479,8 +6632,8 @@ dependencies = [ name = "spl-discriminator-syn" version = "0.1.1" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "sha2 0.10.7", "syn 2.0.28", "thiserror", @@ -6492,8 +6645,8 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e5f2044ca42c8938d54d1255ce599c79a1ffd86b677dfab695caa20f9ffc3f2" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "sha2 0.10.7", "syn 2.0.28", "thiserror", @@ -6844,8 +6997,8 @@ dependencies = [ name = "spl-program-error-derive" version = "0.3.1" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "sha2 0.10.7", "syn 2.0.28", ] @@ -6856,8 +7009,8 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5269c8e868da17b6552ef35a51355a017bd8e0eae269c201fef830d35fa52c" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "sha2 0.10.7", "syn 2.0.28", ] @@ -7433,8 +7586,8 @@ dependencies = [ name = "spl-type-length-value-derive" version = "0.1.0" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 2.0.28", ] @@ -7512,8 +7665,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ "heck 0.4.1", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "rustversion", "syn 1.0.107", ] @@ -7525,8 +7678,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ "heck 0.4.1", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "rustversion", "syn 2.0.28", ] @@ -7543,25 +7696,14 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" -[[package]] -name = "syn" -version = "0.15.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "unicode-xid 0.1.0", -] - [[package]] name = "syn" version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "unicode-ident", ] @@ -7571,8 +7713,8 @@ version = "2.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "unicode-ident", ] @@ -7588,10 +7730,10 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", - "unicode-xid 0.2.2", + "unicode-xid", ] [[package]] @@ -7617,11 +7759,32 @@ dependencies = [ "walkdir", ] +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "tar" -version = "0.4.38" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" +checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" dependencies = [ "filetime", "libc", @@ -7658,8 +7821,8 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee42b4e559f17bce0385ebf511a7beb67d5cc33c12c96b7f4e9789919d9c10f" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -7708,8 +7871,8 @@ checksum = "54c25e2cb8f5fcd7318157634e8838aa6f7e4715c96637f969fabaccd1ef5462" dependencies = [ "cfg-if 1.0.0", "proc-macro-error", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 2.0.28", ] @@ -7720,8 +7883,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37cfd7bbc88a0104e304229fba519bdc45501a30b760fb72240342f1289ad257" dependencies = [ "proc-macro-error", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 2.0.28", "test-case-core", ] @@ -7766,8 +7929,8 @@ version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 2.0.28", ] @@ -7843,22 +8006,21 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.14.1" +version = "1.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d0183f6f6001549ab68f8c7585093bb732beefbcf6d23a10b9b95c73a1dd49" +checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", - "memchr", "mio", "num_cpus", - "once_cell", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "pin-project-lite", "signal-hook-registry", + "socket2 0.5.4", "tokio-macros", - "winapi 0.3.9", + "windows-sys 0.48.0", ] [[package]] @@ -7873,13 +8035,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.7.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", - "syn 1.0.107", + "proc-macro2", + "quote", + "syn 2.0.28", ] [[package]] @@ -7894,24 +8056,12 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" -dependencies = [ - "rustls 0.19.1", - "tokio", - "webpki 0.21.4", -] - -[[package]] -name = "tokio-rustls" -version = "0.23.2" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27d5f2b839802bd8267fa19b0530f5a08b9c08cd417976be2a65d130fe1c11b" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.20.8", + "rustls", "tokio", - "webpki 0.22.0", ] [[package]] @@ -7932,9 +8082,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.12" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite", @@ -7943,18 +8093,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.8", + "rustls", "tokio", - "tokio-rustls 0.23.2", + "tokio-rustls", "tungstenite", - "webpki 0.22.0", - "webpki-roots", + "webpki-roots 0.25.2", ] [[package]] @@ -7998,46 +8147,14 @@ dependencies = [ [[package]] name = "tonic" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff08f4649d10a70ffa3522ca559031285d8e421d727ac85c60825761818f5d0a" -dependencies = [ - "async-stream", - "async-trait", - "base64 0.13.0", - "bytes", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-timeout", - "percent-encoding 2.3.0", - "pin-project", - "prost 0.9.0", - "prost-derive 0.9.0", - "tokio", - "tokio-rustls 0.22.0", - "tokio-stream", - "tokio-util 0.6.9", - "tower", - "tower-layer", - "tower-service", - "tracing", - "tracing-futures", -] - -[[package]] -name = "tonic" -version = "0.8.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f219fad3b929bef19b1f86fbc0358d35daed8f2cac972037ac0dc10bbb8d5fb" +checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a" dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.13.0", + "base64 0.21.4", "bytes", "futures-core", "futures-util", @@ -8048,42 +8165,27 @@ dependencies = [ "hyper-timeout", "percent-encoding 2.3.0", "pin-project", - "prost 0.11.9", - "prost-derive 0.11.9", + "prost", "rustls-pemfile 1.0.1", "tokio", - "tokio-rustls 0.23.2", + "tokio-rustls", "tokio-stream", - "tokio-util 0.7.1", "tower", "tower-layer", "tower-service", "tracing", - "tracing-futures", ] [[package]] name = "tonic-build" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9403f1bafde247186684b230dc6f38b5cd514584e8bec1dd32514be4745fa757" -dependencies = [ - "proc-macro2 1.0.63", - "prost-build 0.9.0", - "quote 1.0.29", - "syn 1.0.107", -] - -[[package]] -name = "tonic-build" -version = "0.8.4" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf5e9b9c0f7e0a7c027dcfaba7b2c60816c7049171f679d99ee2ff65d0de8c4" +checksum = "a6fdaae4c2c638bb70fe42803a26fbd6fc6ac8c72f5c59f67ecc2a2dcabf4b07" dependencies = [ "prettyplease 0.1.9", - "proc-macro2 1.0.63", - "prost-build 0.11.9", - "quote 1.0.29", + "proc-macro2", + "prost-build", + "quote", "syn 1.0.107", ] @@ -8107,25 +8209,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "tower-http" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" -dependencies = [ - "bitflags 1.3.2", - "bytes", - "futures-core", - "futures-util", - "http", - "http-body", - "http-range-header", - "pin-project-lite", - "tower", - "tower-layer", - "tower-service", -] - [[package]] name = "tower-layer" version = "0.3.2" @@ -8134,9 +8217,9 @@ checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" [[package]] name = "tower-service" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" @@ -8157,8 +8240,8 @@ version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -8171,16 +8254,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project", - "tracing", -] - [[package]] name = "tracing-opentelemetry" version = "0.17.4" @@ -8219,24 +8292,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.0", "byteorder", "bytes", + "data-encoding", "http", "httparse", "log", "rand 0.8.5", - "rustls 0.20.8", - "sha-1 0.10.0", + "rustls", + "sha1", "thiserror", - "url 2.4.0", + "url 2.4.1", "utf-8", - "webpki 0.22.0", - "webpki-roots", + "webpki-roots 0.24.0", ] [[package]] @@ -8311,12 +8383,6 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" -[[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.2" @@ -8377,9 +8443,9 @@ dependencies = [ [[package]] name = "url" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna 0.4.0", @@ -8476,8 +8542,8 @@ dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 2.0.28", "wasm-bindgen-shared", ] @@ -8500,7 +8566,7 @@ version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ - "quote 1.0.29", + "quote", "wasm-bindgen-macro-support", ] @@ -8510,8 +8576,8 @@ version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 2.0.28", "wasm-bindgen-backend", "wasm-bindgen-shared", @@ -8534,33 +8600,19 @@ dependencies = [ ] [[package]] -name = "webpki" -version = "0.21.4" +name = "webpki-roots" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" +checksum = "b291546d5d9d1eab74f069c77749f2cb8504a12caa20f0f2de93ddbf6f411888" dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" -dependencies = [ - "ring", - "untrusted", + "rustls-webpki", ] [[package]] name = "webpki-roots" -version = "0.22.1" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c475786c6f47219345717a043a37ec04cb4bc185e28853adcc4fa0a947eba630" -dependencies = [ - "webpki 0.22.0", -] +checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" [[package]] name = "which" @@ -8629,21 +8681,6 @@ dependencies = [ "windows_x86_64_msvc 0.34.0", ] -[[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.1", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm 0.42.1", - "windows_x86_64_msvc 0.42.1", -] - [[package]] name = "windows-sys" version = "0.45.0" @@ -8808,11 +8845,12 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi 0.3.9", + "cfg-if 1.0.0", + "windows-sys 0.48.0", ] [[package]] @@ -8835,9 +8873,9 @@ dependencies = [ [[package]] name = "xattr" -version = "0.2.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" +checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" dependencies = [ "libc", ] @@ -8866,8 +8904,8 @@ version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65f1a51723ec88c66d5d1fe80c841f17f63587d6691901d66be9bec6c3b51f73" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", + "proc-macro2", + "quote", "syn 1.0.107", "synstructure", ] diff --git a/Cargo.toml b/Cargo.toml index 4825c596d30..5ac30a0132c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -67,7 +67,4 @@ members = [ exclude = [ ] -[patch.crates-io] -# Rust 1.69+ broke ntapi v0.3.x, which doesn't contain proper fix: -# https://github.com/MSxDOS/ntapi/pull/12 -ntapi = { git = "https://github.com/solana-labs/ntapi", rev = "97ede981a1777883ff86d142b75024b023f04fad" } +resolver = "2" diff --git a/account-compression/Cargo.lock b/account-compression/Cargo.lock index fdd58eba165..ac6c09f8207 100644 --- a/account-compression/Cargo.lock +++ b/account-compression/Cargo.lock @@ -8,7 +8,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.7", + "getrandom 0.2.10", "once_cell", "version_check", ] @@ -20,80 +20,65 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ "cfg-if", - "getrandom 0.2.7", + "getrandom 0.2.10", "once_cell", "version_check", ] -[[package]] -name = "aho-corasick" -version = "0.7.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" -dependencies = [ - "memchr", -] - [[package]] name = "anchor-attribute-access-control" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faa5be5b72abea167f87c868379ba3c2be356bfca9e6f474fd055fa0f7eeb4f2" +checksum = "e5f619f1d04f53621925ba8a2e633ba5a6081f2ae14758cbb67f38fd823e0a3e" dependencies = [ "anchor-syn", - "anyhow", "proc-macro2", "quote", - "regex", "syn 1.0.108", ] [[package]] name = "anchor-attribute-account" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f468970344c7c9f9d03b4da854fd7c54f21305059f53789d0045c1dd803f0018" +checksum = "e7f2a3e1df4685f18d12a943a9f2a7456305401af21a07c9fe076ef9ecd6e400" dependencies = [ "anchor-syn", - "anyhow", "bs58 0.5.0", "proc-macro2", "quote", - "rustversion", "syn 1.0.108", ] [[package]] name = "anchor-attribute-constant" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59948e7f9ef8144c2aefb3f32a40c5fce2798baeec765ba038389e82301017ef" +checksum = "9423945cb55627f0b30903288e78baf6f62c6c8ab28fb344b6b25f1ffee3dca7" dependencies = [ "anchor-syn", - "proc-macro2", + "quote", "syn 1.0.108", ] [[package]] name = "anchor-attribute-error" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc753c9d1c7981cb8948cf7e162fb0f64558999c0413058e2d43df1df5448086" +checksum = "93ed12720033cc3c3bf3cfa293349c2275cd5ab99936e33dd4bf283aaad3e241" dependencies = [ "anchor-syn", - "proc-macro2", "quote", "syn 1.0.108", ] [[package]] name = "anchor-attribute-event" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f38b4e172ba1b52078f53fdc9f11e3dc0668ad27997838a0aad2d148afac8c97" +checksum = "eef4dc0371eba2d8c8b54794b0b0eb786a234a559b77593d6f80825b6d2c77a2" dependencies = [ "anchor-syn", - "anyhow", "proc-macro2", "quote", "syn 1.0.108", @@ -101,25 +86,34 @@ dependencies = [ [[package]] name = "anchor-attribute-program" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eebd21543606ab61e2d83d9da37d24d3886a49f390f9c43a1964735e8c0f0d5" +checksum = "b18c4f191331e078d4a6a080954d1576241c29c56638783322a18d308ab27e4f" dependencies = [ "anchor-syn", - "anyhow", - "proc-macro2", "quote", "syn 1.0.108", ] [[package]] name = "anchor-derive-accounts" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec4720d899b3686396cced9508f23dab420f1308344456ec78ef76f98fda42af" +checksum = "5de10d6e9620d3bcea56c56151cad83c5992f50d5960b3a9bebc4a50390ddc3c" dependencies = [ "anchor-syn", - "anyhow", + "quote", + "syn 1.0.108", +] + +[[package]] +name = "anchor-derive-serde" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4e2e5be518ec6053d90a2a7f26843dbee607583c779e6c8395951b9739bdfbe" +dependencies = [ + "anchor-syn", + "borsh-derive-internal 0.10.3", "proc-macro2", "quote", "syn 1.0.108", @@ -127,9 +121,9 @@ dependencies = [ [[package]] name = "anchor-derive-space" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f495e85480bd96ddeb77b71d499247c7d4e8b501e75ecb234e9ef7ae7bd6552a" +checksum = "1ecc31d19fa54840e74b7a979d44bcea49d70459de846088a1d71e87ba53c419" dependencies = [ "proc-macro2", "quote", @@ -138,9 +132,9 @@ dependencies = [ [[package]] name = "anchor-lang" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d2d4b20100f1310a774aba3471ef268e5c4ba4d5c28c0bbe663c2658acbc414" +checksum = "35da4785497388af0553586d55ebdc08054a8b1724720ef2749d313494f2b8ad" dependencies = [ "anchor-attribute-access-control", "anchor-attribute-account", @@ -149,22 +143,23 @@ dependencies = [ "anchor-attribute-event", "anchor-attribute-program", "anchor-derive-accounts", + "anchor-derive-serde", "anchor-derive-space", "arrayref", "base64 0.13.0", "bincode", "borsh 0.10.3", "bytemuck", - "getrandom 0.2.7", + "getrandom 0.2.10", "solana-program", "thiserror", ] [[package]] name = "anchor-syn" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a125e4b0cc046cfec58f5aa25038e34cf440151d58f0db3afc55308251fe936d" +checksum = "d9101b84702fed2ea57bd22992f75065da5648017135b844283a2f6d74f27825" dependencies = [ "anyhow", "bs58 0.5.0", @@ -301,12 +296,6 @@ 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" @@ -315,9 +304,9 @@ checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" [[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 = "autocfg" @@ -339,9 +328,9 @@ checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "bincode" @@ -358,6 +347,15 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +dependencies = [ + "serde", +] + [[package]] name = "bitmaps" version = "2.1.0" @@ -369,9 +367,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" +checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" dependencies = [ "arrayref", "arrayvec", @@ -548,11 +546,12 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -750,9 +749,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.7" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "js-sys", @@ -884,9 +883,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libsecp256k1" @@ -936,6 +935,17 @@ dependencies = [ "libsecp256k1-core", ] +[[package]] +name = "light-poseidon" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "949bdd22e4ed93481d45e9a6badb34b99132bcad0c8a8d4f05c42f7dcc7b90bc" +dependencies = [ + "ark-bn254", + "ark-ff", + "thiserror", +] + [[package]] name = "lock_api" version = "0.4.7" @@ -948,18 +958,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "memmap2" @@ -990,9 +991,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", @@ -1022,9 +1023,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] @@ -1106,9 +1107,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -1141,6 +1142,7 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ + "libc", "rand_chacha 0.3.1", "rand_core 0.6.4", ] @@ -1180,7 +1182,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.7", + "getrandom 0.2.10", ] [[package]] @@ -1231,26 +1233,9 @@ version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" dependencies = [ - "bitflags", -] - -[[package]] -name = "regex" -version = "1.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", + "bitflags 1.3.2", ] -[[package]] -name = "regex-syntax" -version = "0.6.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" - [[package]] name = "rustc-hash" version = "1.1.0" @@ -1292,9 +1277,9 @@ checksum = "a41d061efea015927ac527063765e73601444cdc344ba855bc7bd44578b25e1c" [[package]] name = "serde" -version = "1.0.175" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d25439cd7397d044e2748a6fe2432b5e85db703d6d097bd014b3c0ad1ebff0b" +checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" dependencies = [ "serde_derive", ] @@ -1310,20 +1295,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.175" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b23f7ade6f110613c0d63858ddb8b94c1041f550eab58a16b371bdf2c9c80ab4" +checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.38", ] [[package]] name = "serde_json" -version = "1.0.103" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "itoa", "ryu", @@ -1382,9 +1367,9 @@ checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" [[package]] name = "solana-frozen-abi" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02eb4f0ed3eade20f4abdcc0031167344237cd6e16808bd0f33945f9db7861fe" +checksum = "098378043a888c680de07eee987bf927e23e0720b472ba61c753d7b3757e6b3e" dependencies = [ "ahash 0.8.3", "blake3", @@ -1395,13 +1380,10 @@ dependencies = [ "cc", "either", "generic-array", - "getrandom 0.1.16", "im", "lazy_static", "log", "memmap2", - "once_cell", - "rand_core 0.6.4", "rustc_version", "serde", "serde_bytes", @@ -1415,30 +1397,29 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28514761a285944cbad5b3d7930546369b80a713ba37d84bcf6ed2753611765" +checksum = "c5f48c89a8a3a12f6a409a45fef50dae642211eae0207a91f01211aebb270026" dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.27", + "syn 2.0.38", ] [[package]] name = "solana-program" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff2aa5434a77413e9d43e971ceb47bdb003f2e8bbc0365a25b684aca2605c25" +checksum = "6e8834ffcd3773375e7fce4b261efefebbb64409da78e1627cbc4c2632139921" dependencies = [ "ark-bn254", "ark-ec", "ark-ff", "ark-serialize", - "array-bytes", - "base64 0.21.2", + "base64 0.21.4", "bincode", - "bitflags", + "bitflags 2.4.1", "blake3", "borsh 0.10.3", "borsh 0.9.3", @@ -1449,20 +1430,20 @@ dependencies = [ "console_error_panic_hook", "console_log", "curve25519-dalek", - "getrandom 0.2.7", + "getrandom 0.2.10", "itertools", "js-sys", "lazy_static", "libc", "libsecp256k1", + "light-poseidon", "log", "memoffset 0.9.0", "num-bigint", "num-derive", "num-traits", "parking_lot", - "rand 0.7.3", - "rand_chacha 0.2.2", + "rand 0.8.5", "rustc_version", "rustversion", "serde", @@ -1482,15 +1463,15 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.16.16" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b41b63b2da4a37ce323aba108db21f4c7bfa638dd1bf58fdc870f83bdce48ba" +checksum = "170f3c87d862ba5c74c03fa37a2867c10aa68e7b210bdf004c7a8b330284c789" dependencies = [ "bs58 0.4.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.27", + "syn 2.0.38", ] [[package]] @@ -1538,9 +1519,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.27" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", @@ -1564,7 +1545,7 @@ checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.38", ] [[package]] @@ -1676,7 +1657,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.38", "wasm-bindgen-shared", ] @@ -1698,7 +1679,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.38", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1779,5 +1760,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.38", ] diff --git a/account-compression/Cargo.toml b/account-compression/Cargo.toml index 1054f841f72..94d054a43fc 100644 --- a/account-compression/Cargo.toml +++ b/account-compression/Cargo.toml @@ -3,3 +3,5 @@ members = [ "programs/account-compression", "programs/noop" ] + +resolver = "2" diff --git a/account-compression/programs/account-compression/Cargo.toml b/account-compression/programs/account-compression/Cargo.toml index 3d88d7f85d4..08f150d2f65 100644 --- a/account-compression/programs/account-compression/Cargo.toml +++ b/account-compression/programs/account-compression/Cargo.toml @@ -18,7 +18,7 @@ cpi = ["no-entrypoint"] default = [] [dependencies] -anchor-lang = "0.28.0" +anchor-lang = "0.29.0" bytemuck = "1.13" spl-concurrent-merkle-tree = { version="0.2.0", path="../../../libraries/concurrent-merkle-tree", features = [ "sol-log" ]} spl-noop = { version = "0.2.0", path="../noop", features = [ "no-entrypoint" ]} diff --git a/account-compression/programs/noop/Cargo.toml b/account-compression/programs/noop/Cargo.toml index 75113660b55..a80e338bc8e 100644 --- a/account-compression/programs/noop/Cargo.toml +++ b/account-compression/programs/noop/Cargo.toml @@ -16,4 +16,4 @@ cpi = ["no-entrypoint"] default = [] [dependencies] -solana-program = "1.16.16" +solana-program = "1.17.2" diff --git a/associated-token-account/program-test/Cargo.toml b/associated-token-account/program-test/Cargo.toml index c0ae60c8f76..032a8f0ee89 100644 --- a/associated-token-account/program-test/Cargo.toml +++ b/associated-token-account/program-test/Cargo.toml @@ -11,9 +11,9 @@ version = "0.0.1" test-sbf = [] [dev-dependencies] -solana-program = "1.16.16" -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program = "1.17.2" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" spl-associated-token-account = { version = "2", path = "../program", features = ["no-entrypoint"] } spl-token = { version = "4.0", path = "../../token/program", features = ["no-entrypoint"] } spl-token-2022 = { version = "0.9", path = "../../token/program-2022", features = ["no-entrypoint"] } diff --git a/associated-token-account/program/Cargo.toml b/associated-token-account/program/Cargo.toml index 282aed6ae04..ef461ccdc84 100644 --- a/associated-token-account/program/Cargo.toml +++ b/associated-token-account/program/Cargo.toml @@ -16,7 +16,7 @@ assert_matches = "1.5.0" borsh = "0.10" num-derive = "0.4" num-traits = "0.2" -solana-program = "1.16.16" +solana-program = "1.17.2" spl-token = { version = "4.0", path = "../../token/program", features = ["no-entrypoint"] } spl-token-2022 = { version = "0.9", path = "../../token/program-2022", features = ["no-entrypoint"] } thiserror = "1.0" diff --git a/binary-option/program/Cargo.toml b/binary-option/program/Cargo.toml index edbf9c39573..b649b5e91ec 100644 --- a/binary-option/program/Cargo.toml +++ b/binary-option/program/Cargo.toml @@ -9,7 +9,7 @@ no-entrypoint = [] test-sbf = [] [dependencies] -solana-program = "1.16.16" +solana-program = "1.17.2" thiserror = "1.0" spl-token = {version = "4.0", path = "../../token/program", features = ["no-entrypoint"]} arrayref = "0.3.7" diff --git a/binary-option/program/src/lib.rs b/binary-option/program/src/lib.rs index c7060a98f25..9c104343293 100644 --- a/binary-option/program/src/lib.rs +++ b/binary-option/program/src/lib.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] pub mod entrypoint; pub mod error; pub mod instruction; diff --git a/binary-oracle-pair/program/Cargo.toml b/binary-oracle-pair/program/Cargo.toml index 735963c89b2..bb2f93aeebb 100644 --- a/binary-oracle-pair/program/Cargo.toml +++ b/binary-oracle-pair/program/Cargo.toml @@ -13,15 +13,15 @@ test-sbf = [] [dependencies] num-derive = "0.4" num-traits = "0.2" -solana-program = "1.16.16" +solana-program = "1.17.2" spl-token = { version = "4.0", path = "../../token/program", features = [ "no-entrypoint" ] } thiserror = "1.0" uint = "0.9" borsh = "0.10" [dev-dependencies] -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" [lib] crate-type = ["cdylib", "lib"] diff --git a/ci/install-anchor.sh b/ci/install-anchor.sh index def2b9278f7..1ec3711a447 100755 --- a/ci/install-anchor.sh +++ b/ci/install-anchor.sh @@ -14,7 +14,7 @@ if [[ -n $ANCHOR_CLI_VERSION ]]; then anchor_cli_version="$ANCHOR_CLI_VERSION" else - anchor_cli_version=v0.28.0 + anchor_cli_version=v0.29.0 fi export anchor_cli_version="$anchor_cli_version" diff --git a/ci/install-build-deps.sh b/ci/install-build-deps.sh index aed837db5b6..e1bcdc556bd 100755 --- a/ci/install-build-deps.sh +++ b/ci/install-build-deps.sh @@ -6,3 +6,4 @@ sudo apt update sudo apt install libudev-dev -y sudo apt install binutils-dev -y sudo apt install libunwind-dev -y +sudo apt install protobuf-compiler -y diff --git a/ci/rust-version.sh b/ci/rust-version.sh index 7c39cc1e78c..9282c3494bb 100644 --- a/ci/rust-version.sh +++ b/ci/rust-version.sh @@ -26,7 +26,7 @@ fi if [[ -n $RUST_NIGHTLY_VERSION ]]; then nightly_version="$RUST_NIGHTLY_VERSION" else - nightly_version=2023-04-19 + nightly_version=2023-10-05 fi export rust_stable="$stable_version" diff --git a/ci/solana-version.sh b/ci/solana-version.sh index fb2692aeffe..a78996fa9e5 100755 --- a/ci/solana-version.sh +++ b/ci/solana-version.sh @@ -14,7 +14,7 @@ if [[ -n $SOLANA_VERSION ]]; then solana_version="$SOLANA_VERSION" else - solana_version=v1.16.16 + solana_version=v1.17.2 fi export solana_version="$solana_version" diff --git a/examples/rust/cross-program-invocation/Cargo.toml b/examples/rust/cross-program-invocation/Cargo.toml index 3d7ea2b7825..68822b46bbb 100644 --- a/examples/rust/cross-program-invocation/Cargo.toml +++ b/examples/rust/cross-program-invocation/Cargo.toml @@ -13,11 +13,11 @@ no-entrypoint = [] test-sbf = [] [dependencies] -solana-program = "1.16.16" +solana-program = "1.17.2" [dev-dependencies] -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" [lib] crate-type = ["cdylib", "lib"] diff --git a/examples/rust/custom-heap/Cargo.toml b/examples/rust/custom-heap/Cargo.toml index e3c42fbc2bb..1dccf426376 100644 --- a/examples/rust/custom-heap/Cargo.toml +++ b/examples/rust/custom-heap/Cargo.toml @@ -15,11 +15,11 @@ no-entrypoint = [] test-sbf = [] [dependencies] -solana-program = "1.16.16" +solana-program = "1.17.2" [dev-dependencies] -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" [lib] crate-type = ["cdylib", "lib"] diff --git a/examples/rust/logging/Cargo.toml b/examples/rust/logging/Cargo.toml index 5d41c340ae3..7133d002bb4 100644 --- a/examples/rust/logging/Cargo.toml +++ b/examples/rust/logging/Cargo.toml @@ -13,11 +13,11 @@ no-entrypoint = [] test-sbf = [] [dependencies] -solana-program = "1.16.16" +solana-program = "1.17.2" [dev-dependencies] -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" [lib] crate-type = ["cdylib", "lib"] diff --git a/examples/rust/sysvar/Cargo.toml b/examples/rust/sysvar/Cargo.toml index 51f8eab1ded..381f89b5529 100644 --- a/examples/rust/sysvar/Cargo.toml +++ b/examples/rust/sysvar/Cargo.toml @@ -13,11 +13,11 @@ no-entrypoint = [] test-sbf = [] [dependencies] -solana-program = "1.16.16" +solana-program = "1.17.2" [dev-dependencies] -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" [lib] crate-type = ["cdylib", "lib"] diff --git a/examples/rust/transfer-lamports/Cargo.toml b/examples/rust/transfer-lamports/Cargo.toml index ff03ab3ce80..59cd303abda 100644 --- a/examples/rust/transfer-lamports/Cargo.toml +++ b/examples/rust/transfer-lamports/Cargo.toml @@ -12,11 +12,11 @@ no-entrypoint = [] test-sbf = [] [dependencies] -solana-program = "1.16.16" +solana-program = "1.17.2" [dev-dependencies] -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" [lib] crate-type = ["cdylib", "lib"] diff --git a/examples/rust/transfer-lamports/src/processor.rs b/examples/rust/transfer-lamports/src/processor.rs index 2a6eb8c638a..5c8bb94ef44 100644 --- a/examples/rust/transfer-lamports/src/processor.rs +++ b/examples/rust/transfer-lamports/src/processor.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] //! Program instruction processor use solana_program::{ diff --git a/examples/rust/transfer-tokens/Cargo.toml b/examples/rust/transfer-tokens/Cargo.toml index 1ed49f3370b..69dd538d2a6 100644 --- a/examples/rust/transfer-tokens/Cargo.toml +++ b/examples/rust/transfer-tokens/Cargo.toml @@ -12,12 +12,12 @@ no-entrypoint = [] test-sbf = [] [dependencies] -solana-program = "1.16.16" +solana-program = "1.17.2" spl-token = { version = "4.0", path = "../../../token/program", features = [ "no-entrypoint" ] } [dev-dependencies] -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" [lib] crate-type = ["cdylib", "lib"] diff --git a/feature-gate/program/Cargo.toml b/feature-gate/program/Cargo.toml index 5cf6233d029..f219ea9e558 100644 --- a/feature-gate/program/Cargo.toml +++ b/feature-gate/program/Cargo.toml @@ -13,12 +13,12 @@ test-sbf = [] [dependencies] num_enum = "0.7.0" -solana-program = "1.16.16" +solana-program = "1.17.2" spl-program-error = { version = "0.3.0", path = "../../libraries/program-error" } [dev-dependencies] -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" [lib] crate-type = ["cdylib", "lib"] diff --git a/feature-proposal/cli/Cargo.toml b/feature-proposal/cli/Cargo.toml index 1dff5dd3b0a..428475c28b2 100644 --- a/feature-proposal/cli/Cargo.toml +++ b/feature-proposal/cli/Cargo.toml @@ -10,11 +10,11 @@ edition = "2021" [dependencies] chrono = "0.4.31" clap = "2.33.3" -solana-clap-utils = "1.16.16" -solana-cli-config = "1.16.16" -solana-client = "1.16.16" -solana-logger = "1.16.16" -solana-sdk = "1.16.16" +solana-clap-utils = "1.17.2" +solana-cli-config = "1.17.2" +solana-client = "1.17.2" +solana-logger = "1.17.2" +solana-sdk = "1.17.2" spl-feature-proposal = { version = "1.0", path = "../program", features = ["no-entrypoint"] } [[bin]] diff --git a/feature-proposal/cli/src/main.rs b/feature-proposal/cli/src/main.rs index 355f70c64aa..451cf7c4fe5 100644 --- a/feature-proposal/cli/src/main.rs +++ b/feature-proposal/cli/src/main.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] use { chrono::{DateTime, NaiveDateTime, SecondsFormat, Utc}, clap::{ diff --git a/feature-proposal/program/Cargo.toml b/feature-proposal/program/Cargo.toml index cb54196b373..eb278e1d982 100644 --- a/feature-proposal/program/Cargo.toml +++ b/feature-proposal/program/Cargo.toml @@ -13,12 +13,12 @@ test-sbf = [] [dependencies] borsh = "0.10" -solana-program = "1.16.16" +solana-program = "1.17.2" spl-token = { version = "4.0", path = "../../token/program", features = ["no-entrypoint"] } [dev-dependencies] -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" [lib] crate-type = ["cdylib", "lib"] diff --git a/governance/addin-api/Cargo.toml b/governance/addin-api/Cargo.toml index c7ea403163e..e86dd8d6679 100644 --- a/governance/addin-api/Cargo.toml +++ b/governance/addin-api/Cargo.toml @@ -10,4 +10,4 @@ edition = "2021" [dependencies] borsh = "0.10" spl-governance-tools= { version = "0.1.3", path ="../tools"} -solana-program = "1.16.16" +solana-program = "1.17.2" diff --git a/governance/addin-mock/program/Cargo.toml b/governance/addin-mock/program/Cargo.toml index de665b0f283..ecc74779aeb 100644 --- a/governance/addin-mock/program/Cargo.toml +++ b/governance/addin-mock/program/Cargo.toml @@ -19,7 +19,7 @@ num-derive = "0.4" num-traits = "0.2" serde = "1.0.189" serde_derive = "1.0.103" -solana-program = "1.16.16" +solana-program = "1.17.2" spl-token = { version = "4.0", path = "../../../token/program", features = [ "no-entrypoint" ] } spl-governance-addin-api= { version = "0.1.3", path ="../../addin-api"} spl-governance-tools= { version = "0.1.3", path ="../../tools"} @@ -29,8 +29,8 @@ thiserror = "1.0" [dev-dependencies] assert_matches = "1.5.0" proptest = "1.3" -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" spl-governance-test-sdk = { version = "0.1.3", path ="../../test-sdk"} diff --git a/governance/chat/program/Cargo.toml b/governance/chat/program/Cargo.toml index bbd365ab1b8..df08e50903b 100644 --- a/governance/chat/program/Cargo.toml +++ b/governance/chat/program/Cargo.toml @@ -19,7 +19,7 @@ num-derive = "0.4" num-traits = "0.2" serde = "1.0.189" serde_derive = "1.0.103" -solana-program = "1.16.16" +solana-program = "1.17.2" spl-token = { version = "4.0", path = "../../../token/program", features = [ "no-entrypoint", ] } @@ -34,8 +34,8 @@ thiserror = "1.0" [dev-dependencies] assert_matches = "1.5.0" proptest = "1.3" -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" spl-governance-test-sdk = { version = "0.1.3", path = "../../test-sdk" } spl-governance-addin-mock = { version = "0.1.3", path = "../../addin-mock/program" } diff --git a/governance/chat/program/src/lib.rs b/governance/chat/program/src/lib.rs index e0a37edaf87..6d882a08ac4 100644 --- a/governance/chat/program/src/lib.rs +++ b/governance/chat/program/src/lib.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![deny(missing_docs)] //! Governance Chat program diff --git a/governance/program/Cargo.toml b/governance/program/Cargo.toml index 766979fc987..fec231670f5 100644 --- a/governance/program/Cargo.toml +++ b/governance/program/Cargo.toml @@ -19,7 +19,7 @@ num-derive = "0.4" num-traits = "0.2" serde = "1.0.189" serde_derive = "1.0.103" -solana-program = "1.16.16" +solana-program = "1.17.2" spl-token = { version = "4.0", path = "../../token/program", features = [ "no-entrypoint" ] } spl-governance-tools= { version = "0.1.3", path ="../tools"} spl-governance-addin-api= { version = "0.1.3", path ="../addin-api"} @@ -29,8 +29,8 @@ thiserror = "1.0" assert_matches = "1.5.0" base64 = "0.21" proptest = "1.3" -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" spl-governance-test-sdk = { version = "0.1.3", path ="../test-sdk"} spl-governance-addin-mock = { version = "0.1.3", path ="../addin-mock/program"} diff --git a/governance/program/src/lib.rs b/governance/program/src/lib.rs index add231510b2..ae30d26e75e 100644 --- a/governance/program/src/lib.rs +++ b/governance/program/src/lib.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![deny(missing_docs)] //! A Governance program for the Solana blockchain. diff --git a/governance/program/tests/process_complete_proposal.rs b/governance/program/tests/process_complete_proposal.rs index 7494db92efc..b42e4ca5425 100644 --- a/governance/program/tests/process_complete_proposal.rs +++ b/governance/program/tests/process_complete_proposal.rs @@ -30,7 +30,7 @@ async fn test_complete_proposal() { .await .unwrap(); - let mut proposal_cookie = governance_test + let proposal_cookie = governance_test .with_signed_off_proposal(&token_owner_record_cookie, &mut governance_cookie) .await .unwrap(); @@ -50,7 +50,7 @@ async fn test_complete_proposal() { // Act governance_test - .complete_proposal(&mut proposal_cookie, &token_owner_record_cookie) + .complete_proposal(&proposal_cookie, &token_owner_record_cookie) .await .unwrap(); @@ -85,7 +85,7 @@ async fn test_complete_proposal_with_wrong_state_error() { .await .unwrap(); - let mut proposal_cookie = governance_test + let proposal_cookie = governance_test .with_proposal(&token_owner_record_cookie, &mut token_governance_cookie) .await .unwrap(); @@ -98,7 +98,7 @@ async fn test_complete_proposal_with_wrong_state_error() { // Act let err = governance_test - .complete_proposal(&mut proposal_cookie, &token_owner_record_cookie) + .complete_proposal(&proposal_cookie, &token_owner_record_cookie) .await .err() .unwrap(); @@ -172,7 +172,7 @@ async fn test_complete_proposal_with_completed_state_transaction_exists_error() // Act let err = governance_test - .complete_proposal(&mut proposal_cookie, &token_owner_record_cookie) + .complete_proposal(&proposal_cookie, &token_owner_record_cookie) .await .err() .unwrap(); @@ -202,7 +202,7 @@ async fn test_complete_proposal_with_owner_or_delegate_must_sign_error() { .await .unwrap(); - let mut proposal_cookie = governance_test + let proposal_cookie = governance_test .with_signed_off_proposal(&token_owner_record_cookie, &mut governance_cookie) .await .unwrap(); @@ -221,7 +221,7 @@ async fn test_complete_proposal_with_owner_or_delegate_must_sign_error() { // Act let err = governance_test - .complete_proposal(&mut proposal_cookie, &token_owner_record_cookie) + .complete_proposal(&proposal_cookie, &token_owner_record_cookie) .await .err() .unwrap(); diff --git a/governance/program/tests/process_remove_transaction.rs b/governance/program/tests/process_remove_transaction.rs index 576d97fd4f5..6aec9c71e7a 100644 --- a/governance/program/tests/process_remove_transaction.rs +++ b/governance/program/tests/process_remove_transaction.rs @@ -43,7 +43,7 @@ async fn test_remove_transaction() { governance_test .remove_transaction( - &mut proposal_cookie, + &proposal_cookie, &token_owner_record_cookie, &proposal_transaction_cookie, ) @@ -111,7 +111,7 @@ async fn test_replace_transaction() { governance_test .remove_transaction( - &mut proposal_cookie, + &proposal_cookie, &token_owner_record_cookie, &proposal_transaction_cookie, ) @@ -184,7 +184,7 @@ async fn test_remove_front_transaction() { governance_test .remove_transaction( - &mut proposal_cookie, + &proposal_cookie, &token_owner_record_cookie, &proposal_transaction_cookie, ) @@ -251,7 +251,7 @@ async fn test_remove_transaction_with_owner_or_delegate_must_sign_error() { // Act let err = governance_test .remove_transaction( - &mut proposal_cookie, + &proposal_cookie, &token_owner_record_cookie, &proposal_transaction_cookie, ) @@ -306,7 +306,7 @@ async fn test_remove_transaction_with_proposal_not_editable_error() { // Act let err = governance_test .remove_transaction( - &mut proposal_cookie, + &proposal_cookie, &token_owner_record_cookie, &proposal_transaction_cookie, ) @@ -371,7 +371,7 @@ async fn test_remove_transaction_with_proposal_transaction_from_other_proposal_e // Act let err = governance_test .remove_transaction( - &mut proposal_cookie, + &proposal_cookie, &token_owner_record_cookie, &proposal_transaction_cookie2, ) diff --git a/governance/program/tests/program_test/mod.rs b/governance/program/tests/program_test/mod.rs index a31dbb1b626..525668263bb 100644 --- a/governance/program/tests/program_test/mod.rs +++ b/governance/program/tests/program_test/mod.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] use std::str::FromStr; use borsh::BorshSerialize; @@ -2729,7 +2729,7 @@ impl GovernanceProgramTest { let hold_up_time = hold_up_time.unwrap_or(15); let instruction_data: InstructionData = instruction.clone().into(); - let mut yes_option = &mut proposal_cookie.account.options[0]; + let yes_option = &mut proposal_cookie.account.options[0]; let transaction_index = index.unwrap_or(yes_option.transactions_next_index); @@ -2988,7 +2988,7 @@ impl GovernanceProgramTest { #[allow(dead_code)] pub async fn remove_transaction( &mut self, - proposal_cookie: &mut ProposalCookie, + proposal_cookie: &ProposalCookie, token_owner_record_cookie: &TokenOwnerRecordCookie, proposal_transaction_cookie: &ProposalTransactionCookie, ) -> Result<(), ProgramError> { @@ -3339,7 +3339,7 @@ impl GovernanceProgramTest { #[allow(dead_code)] pub async fn complete_proposal( &mut self, - proposal_cookie: &mut ProposalCookie, + proposal_cookie: &ProposalCookie, token_owner_record_cookie: &TokenOwnerRecordCookie, ) -> Result<(), ProgramError> { let complete_proposal_authority = token_owner_record_cookie.get_governance_authority(); diff --git a/governance/test-sdk/Cargo.toml b/governance/test-sdk/Cargo.toml index ecdcd37fe2c..550abcc8756 100644 --- a/governance/test-sdk/Cargo.toml +++ b/governance/test-sdk/Cargo.toml @@ -16,8 +16,8 @@ num-derive = "0.4" num-traits = "0.2" serde = "1.0.189" serde_derive = "1.0.103" -solana-program = "1.16.16" -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program = "1.17.2" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" spl-token = { version = "4.0", path = "../../token/program", features = [ "no-entrypoint" ] } thiserror = "1.0" diff --git a/governance/test-sdk/src/lib.rs b/governance/test-sdk/src/lib.rs index 6d615400c6b..2587f4c55a4 100644 --- a/governance/test-sdk/src/lib.rs +++ b/governance/test-sdk/src/lib.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] use std::borrow::Borrow; use borsh::{BorshDeserialize, BorshSerialize}; diff --git a/governance/tools/Cargo.toml b/governance/tools/Cargo.toml index 7ad8047fba4..3f502d9f05f 100644 --- a/governance/tools/Cargo.toml +++ b/governance/tools/Cargo.toml @@ -15,6 +15,6 @@ num-derive = "0.4" num-traits = "0.2" serde = "1.0.189" serde_derive = "1.0.103" -solana-program = "1.16.16" +solana-program = "1.17.2" spl-token = { version = "4.0", path = "../../token/program", features = [ "no-entrypoint" ] } thiserror = "1.0" diff --git a/instruction-padding/program/Cargo.toml b/instruction-padding/program/Cargo.toml index f6a6d24c98e..44f8029a1bb 100644 --- a/instruction-padding/program/Cargo.toml +++ b/instruction-padding/program/Cargo.toml @@ -14,11 +14,11 @@ test-sbf = [] [dependencies] num_enum = "0.7.0" -solana-program = "1.16.16" +solana-program = "1.17.2" [dev-dependencies] -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" [lib] crate-type = ["cdylib", "lib"] diff --git a/instruction-padding/program/src/instruction.rs b/instruction-padding/program/src/instruction.rs index fd092cfcfda..0c666509206 100644 --- a/instruction-padding/program/src/instruction.rs +++ b/instruction-padding/program/src/instruction.rs @@ -89,7 +89,7 @@ pub fn noop( return Err(ProgramError::InvalidAccountData); } let mut accounts = Vec::with_capacity(num_accounts); - accounts.extend(padding_accounts.into_iter()); + accounts.extend(padding_accounts); Ok(Instruction { program_id, @@ -128,7 +128,7 @@ pub fn wrap_instruction( .try_into() .map_err(|_| ProgramError::InvalidInstructionData)?; data.extend(data_size.to_le_bytes().iter()); - data.extend(instruction.data.into_iter()); + data.extend(instruction.data); for i in 0..padding_data { data.push(i.checked_rem(u8::MAX as u32).unwrap() as u8); } @@ -146,9 +146,9 @@ pub fn wrap_instruction( return Err(ProgramError::InvalidAccountData); } let mut accounts = Vec::with_capacity(num_accounts); - accounts.extend(instruction.accounts.into_iter()); + accounts.extend(instruction.accounts); accounts.push(AccountMeta::new_readonly(instruction.program_id, false)); - accounts.extend(padding_accounts.into_iter()); + accounts.extend(padding_accounts); Ok(Instruction { program_id, diff --git a/libraries/concurrent-merkle-tree/src/concurrent_merkle_tree.rs b/libraries/concurrent-merkle-tree/src/concurrent_merkle_tree.rs index d1eb91e8b9e..ea75537284d 100644 --- a/libraries/concurrent-merkle-tree/src/concurrent_merkle_tree.rs +++ b/libraries/concurrent-merkle-tree/src/concurrent_merkle_tree.rs @@ -100,13 +100,13 @@ impl return Err(ConcurrentMerkleTreeError::TreeAlreadyInitialized); } let mut rightmost_proof = Path::default(); - let mut empty_node_cache = Box::new([Node::default(); MAX_DEPTH]); + let empty_node_cache = [Node::default(); MAX_DEPTH]; for (i, node) in rightmost_proof.proof.iter_mut().enumerate() { - *node = empty_node_cached::(i as u32, &mut empty_node_cache); + *node = empty_node_cached::(i as u32, &empty_node_cache); } let mut path = [Node::default(); MAX_DEPTH]; for (i, node) in path.iter_mut().enumerate() { - *node = empty_node_cached::(i as u32, &mut empty_node_cache); + *node = empty_node_cached::(i as u32, &empty_node_cache); } self.change_logs[0].root = empty_node(MAX_DEPTH as u32); self.change_logs[0].path = path; @@ -161,10 +161,8 @@ impl if !self.is_initialized() { return Err(ConcurrentMerkleTreeError::TreeNotInitialized); } - let mut empty_node_cache = Box::new([EMPTY; MAX_DEPTH]); - if self.get_root() - != empty_node_cached::(MAX_DEPTH as u32, &mut empty_node_cache) - { + let empty_node_cache = [EMPTY; MAX_DEPTH]; + if self.get_root() != empty_node_cached::(MAX_DEPTH as u32, &empty_node_cache) { return Err(ConcurrentMerkleTreeError::TreeNonEmpty); } Ok(()) @@ -262,14 +260,14 @@ impl let intersection = self.rightmost_proof.index.trailing_zeros() as usize; let mut change_list = [EMPTY; MAX_DEPTH]; let mut intersection_node = self.rightmost_proof.leaf; - let mut empty_node_cache = Box::new([Node::default(); MAX_DEPTH]); + let empty_node_cache = [Node::default(); MAX_DEPTH]; for (i, cl_item) in change_list.iter_mut().enumerate().take(MAX_DEPTH) { *cl_item = node; match i { i if i < intersection => { // Compute proof to the appended node from empty nodes - let sibling = empty_node_cached::(i as u32, &mut empty_node_cache); + let sibling = empty_node_cached::(i as u32, &empty_node_cache); hash_to_parent( &mut intersection_node, &self.rightmost_proof.proof[i], diff --git a/libraries/concurrent-merkle-tree/src/lib.rs b/libraries/concurrent-merkle-tree/src/lib.rs index 7df3f09308c..cb0c290caf5 100644 --- a/libraries/concurrent-merkle-tree/src/lib.rs +++ b/libraries/concurrent-merkle-tree/src/lib.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] //! # Concurrent Merkle Tree //! //! This crate is a Solana-optimized implementation of the diff --git a/libraries/concurrent-merkle-tree/src/node.rs b/libraries/concurrent-merkle-tree/src/node.rs index 85fcf7199e2..876ce61f095 100644 --- a/libraries/concurrent-merkle-tree/src/node.rs +++ b/libraries/concurrent-merkle-tree/src/node.rs @@ -8,11 +8,11 @@ pub const EMPTY: Node = [0_u8; 32]; /// Calculates the hash of empty nodes up to level i pub fn empty_node(level: u32) -> Node { - empty_node_cached::<0>(level, &mut Box::new([])) + empty_node_cached::<0>(level, &[]) } /// Calculates and caches the hash of empty nodes up to level i -pub fn empty_node_cached(level: u32, cache: &mut Box<[Node; N]>) -> Node { +pub fn empty_node_cached(level: u32, cache: &[Node; N]) -> Node { let mut data = EMPTY; if level != 0 { let target = (level - 1) as usize; diff --git a/libraries/concurrent-merkle-tree/tests/tests.rs b/libraries/concurrent-merkle-tree/tests/tests.rs index 9f0d8acbaad..e1f2aa5248f 100644 --- a/libraries/concurrent-merkle-tree/tests/tests.rs +++ b/libraries/concurrent-merkle-tree/tests/tests.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] use rand::thread_rng; use rand::{self, Rng}; use spl_concurrent_merkle_tree::concurrent_merkle_tree::ConcurrentMerkleTree; diff --git a/libraries/discriminator/Cargo.toml b/libraries/discriminator/Cargo.toml index 71d0bb00591..6b4f2bf67dc 100644 --- a/libraries/discriminator/Cargo.toml +++ b/libraries/discriminator/Cargo.toml @@ -13,7 +13,7 @@ borsh = ["dep:borsh"] [dependencies] borsh = { version = "0.10", optional = true } bytemuck = { version = "1.14.0", features = ["derive"] } -solana-program = "1.16.16" +solana-program = "1.17.2" spl-discriminator-derive = { version = "0.1.0", path = "./derive" } [lib] diff --git a/libraries/discriminator/syn/Cargo.toml b/libraries/discriminator/syn/Cargo.toml index f51f1c2139e..bd5c0a30620 100644 --- a/libraries/discriminator/syn/Cargo.toml +++ b/libraries/discriminator/syn/Cargo.toml @@ -14,8 +14,5 @@ sha2 = "0.10" syn = { version = "2.0", features = ["full"] } thiserror = "1.0" -[lib] -crate-type = ["cdylib", "lib"] - [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/libraries/math/Cargo.toml b/libraries/math/Cargo.toml index 3a977464e9b..495ac124835 100644 --- a/libraries/math/Cargo.toml +++ b/libraries/math/Cargo.toml @@ -15,14 +15,14 @@ test-sbf = [] borsh = "0.10" num-derive = "0.4" num-traits = "0.2" -solana-program = "1.16.16" +solana-program = "1.17.2" thiserror = "1.0" uint = "0.9" [dev-dependencies] proptest = "1.3.1" -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" libm = "0.2.8" [lib] diff --git a/libraries/math/src/approximations.rs b/libraries/math/src/approximations.rs index 4b6bb218d77..6a784d20bf2 100644 --- a/libraries/math/src/approximations.rs +++ b/libraries/math/src/approximations.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] //! Approximation calculations use { diff --git a/libraries/math/src/precise_number.rs b/libraries/math/src/precise_number.rs index e17498bd8a4..cf2c1eeb8de 100644 --- a/libraries/math/src/precise_number.rs +++ b/libraries/math/src/precise_number.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] //! Defines PreciseNumber, a U256 wrapper with float-like operations use crate::uint::U256; diff --git a/libraries/math/src/processor.rs b/libraries/math/src/processor.rs index db23f44b92e..ebdd2823a53 100644 --- a/libraries/math/src/processor.rs +++ b/libraries/math/src/processor.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] //! Program state processor use { diff --git a/libraries/math/src/uint.rs b/libraries/math/src/uint.rs index b1610ccdd2d..da7adc00d20 100644 --- a/libraries/math/src/uint.rs +++ b/libraries/math/src/uint.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] //! Large uint types // required for clippy diff --git a/libraries/merkle-tree-reference/src/lib.rs b/libraries/merkle-tree-reference/src/lib.rs index 23f8019cc54..0828517b574 100644 --- a/libraries/merkle-tree-reference/src/lib.rs +++ b/libraries/merkle-tree-reference/src/lib.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] use solana_program::keccak::hashv; use std::cell::RefCell; use std::collections::VecDeque; diff --git a/libraries/pod/Cargo.toml b/libraries/pod/Cargo.toml index 8ef07cf6a21..a2d66d37e29 100644 --- a/libraries/pod/Cargo.toml +++ b/libraries/pod/Cargo.toml @@ -16,8 +16,8 @@ base64 = { version = "0.21.4", optional = true } borsh = { version = "0.10", optional = true } bytemuck = { version = "1.14.0" } serde = { version = "1.0.189", optional = true } -solana-program = "1.16.16" -solana-zk-token-sdk = "1.16.16" +solana-program = "1.17.2" +solana-zk-token-sdk = "1.17.2" spl-program-error = { version = "0.3", path = "../program-error" } [dev-dependencies] diff --git a/libraries/program-error/Cargo.toml b/libraries/program-error/Cargo.toml index 5a915b7ea64..6bcd1d968c3 100644 --- a/libraries/program-error/Cargo.toml +++ b/libraries/program-error/Cargo.toml @@ -10,14 +10,14 @@ edition = "2021" [dependencies] num-derive = "0.4" num-traits = "0.2" -solana-program = "1.16.16" +solana-program = "1.17.2" spl-program-error-derive = { version = "0.3.1", path = "./derive" } thiserror = "1.0" [dev-dependencies] lazy_static = "1.4" serial_test = "2.0" -solana-sdk = "1.16.16" +solana-sdk = "1.17.2" [lib] crate-type = ["cdylib", "lib"] diff --git a/libraries/program-error/derive/src/lib.rs b/libraries/program-error/derive/src/lib.rs index 3be1bd7a3a3..2681e85be4e 100644 --- a/libraries/program-error/derive/src/lib.rs +++ b/libraries/program-error/derive/src/lib.rs @@ -7,7 +7,7 @@ // `quote` crate // // Culprit is `macro_impl.rs:66` -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![deny(missing_docs)] #![cfg_attr(not(test), forbid(unsafe_code))] diff --git a/libraries/tlv-account-resolution/Cargo.toml b/libraries/tlv-account-resolution/Cargo.toml index f1a19ccff25..daadd679bd4 100644 --- a/libraries/tlv-account-resolution/Cargo.toml +++ b/libraries/tlv-account-resolution/Cargo.toml @@ -12,7 +12,7 @@ test-sbf = [] [dependencies] bytemuck = { version = "1.14.0", features = ["derive"] } -solana-program = "1.16.16" +solana-program = "1.17.2" spl-discriminator = { version = "0.1", path = "../discriminator" } spl-program-error = { version = "0.3", path = "../program-error" } spl-type-length-value = { version = "0.3", path = "../type-length-value" } @@ -21,9 +21,9 @@ spl-pod = { version = "0.1", path = "../pod" } [dev-dependencies] futures = "0.3.28" futures-util = "0.3" -solana-client = "1.16.16" -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-client = "1.17.2" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" spl-discriminator = { version = "0.1", path = "../discriminator" } [lib] diff --git a/libraries/tlv-account-resolution/src/lib.rs b/libraries/tlv-account-resolution/src/lib.rs index c5e4e1c65c6..1f961ce8b6b 100644 --- a/libraries/tlv-account-resolution/src/lib.rs +++ b/libraries/tlv-account-resolution/src/lib.rs @@ -3,7 +3,7 @@ //! offchain and onchain client can fetch any additional required accounts for //! an instruction. -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![deny(missing_docs)] #![cfg_attr(not(test), forbid(unsafe_code))] diff --git a/libraries/type-length-value/Cargo.toml b/libraries/type-length-value/Cargo.toml index 7f23f054899..e681838a42a 100644 --- a/libraries/type-length-value/Cargo.toml +++ b/libraries/type-length-value/Cargo.toml @@ -13,7 +13,7 @@ derive = ["dep:spl-type-length-value-derive"] [dependencies] bytemuck = { version = "1.14.0", features = ["derive"] } -solana-program = "1.16.16" +solana-program = "1.17.2" spl-discriminator = { version = "0.1", path = "../discriminator" } spl-program-error = { version = "0.3", path = "../program-error" } spl-type-length-value-derive = { version = "0.1", path = "./derive", optional = true } diff --git a/libraries/type-length-value/src/lib.rs b/libraries/type-length-value/src/lib.rs index 36130f36b82..5cc1869cab9 100644 --- a/libraries/type-length-value/src/lib.rs +++ b/libraries/type-length-value/src/lib.rs @@ -1,7 +1,7 @@ //! Crate defining an interface for managing type-length-value entries in a slab //! of bytes, to be used with Solana accounts. -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![deny(missing_docs)] #![cfg_attr(not(test), forbid(unsafe_code))] diff --git a/libraries/type-length-value/src/state.rs b/libraries/type-length-value/src/state.rs index 201eb910d06..8321ce76f74 100644 --- a/libraries/type-length-value/src/state.rs +++ b/libraries/type-length-value/src/state.rs @@ -801,7 +801,7 @@ mod test { // check unpacking let mut state = TlvStateMut::unpack(&mut buffer).unwrap(); - let mut unpacked = state.get_first_value_mut::().unwrap(); + let unpacked = state.get_first_value_mut::().unwrap(); assert_eq!(*unpacked, TestValue { data }); // update extension diff --git a/managed-token/program/Cargo.toml b/managed-token/program/Cargo.toml index 1360e6560c1..e4d89380efe 100644 --- a/managed-token/program/Cargo.toml +++ b/managed-token/program/Cargo.toml @@ -24,11 +24,11 @@ test = [] [dependencies] borsh = "0.10" shank = "^0.2.1" -solana-program = "1.16.16" +solana-program = "1.17.2" spl-associated-token-account = { version = "2.0", path = "../../associated-token-account/program", features = [ "no-entrypoint", ] } spl-token = { version = "4.0", path = "../../token/program", features = ["no-entrypoint"] } thiserror = "^1.0.49" [dev-dependencies] -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" diff --git a/memo/program/Cargo.toml b/memo/program/Cargo.toml index 42018ec9475..ea14b889ad4 100644 --- a/memo/program/Cargo.toml +++ b/memo/program/Cargo.toml @@ -12,11 +12,11 @@ no-entrypoint = [] test-sbf = [] [dependencies] -solana-program = "1.16.16" +solana-program = "1.17.2" [dev-dependencies] -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" [lib] crate-type = ["cdylib", "lib"] diff --git a/name-service/program/Cargo.toml b/name-service/program/Cargo.toml index b9047632855..6b660dff6ce 100644 --- a/name-service/program/Cargo.toml +++ b/name-service/program/Cargo.toml @@ -17,15 +17,15 @@ no-entrypoint = [] test-sbf = [] [dependencies] -solana-program = "1.16.16" +solana-program = "1.17.2" num-traits = "0.2" borsh = "0.10" num-derive = "0.4.1" thiserror = "1.0.49" [dev-dependencies] -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" [lib] crate-type = ["cdylib", "lib"] diff --git a/name-service/program/src/processor.rs b/name-service/program/src/processor.rs index 730d176561a..80bec1faea2 100644 --- a/name-service/program/src/processor.rs +++ b/name-service/program/src/processor.rs @@ -262,7 +262,7 @@ impl Processor { match name_account.lamports().cmp(&required_lamports) { Ordering::Less => { // Overflow cannot happen here because we already checked the sizes. - #[allow(clippy::integer_arithmetic)] + #[allow(clippy::arithmetic_side_effects)] let lamports_to_add = required_lamports - name_account.lamports(); invoke( &system_instruction::transfer( @@ -279,7 +279,7 @@ impl Processor { } Ordering::Greater => { // Overflow cannot happen here because we already checked the sizes. - #[allow(clippy::integer_arithmetic)] + #[allow(clippy::arithmetic_side_effects)] let lamports_to_remove = name_account.lamports() - required_lamports; let source_amount: &mut u64 = &mut name_account.lamports.borrow_mut(); let dest_amount: &mut u64 = &mut payer_account.lamports.borrow_mut(); diff --git a/record/program/Cargo.toml b/record/program/Cargo.toml index 8e984835442..0ef907ea30a 100644 --- a/record/program/Cargo.toml +++ b/record/program/Cargo.toml @@ -15,12 +15,12 @@ test-sbf = [] borsh = "0.10" num-derive = "0.4" num-traits = "0.2" -solana-program = "1.16.16" +solana-program = "1.17.2" thiserror = "1.0" [dev-dependencies] -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" [lib] crate-type = ["cdylib", "lib"] diff --git a/rust-toolchain.toml b/rust-toolchain.toml index f2415f8315c..8142c301269 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.69.0" +channel = "1.73.0" diff --git a/shared-memory/program/Cargo.toml b/shared-memory/program/Cargo.toml index 0629b92946f..2ad0f66d2ec 100644 --- a/shared-memory/program/Cargo.toml +++ b/shared-memory/program/Cargo.toml @@ -12,11 +12,11 @@ test-sbf = [] [dependencies] arrayref = "0.3.7" -solana-program = "=1.16.16" +solana-program = "=1.17.2" [dev-dependencies] -solana-program-test = "=1.16.16" -solana-sdk = "=1.16.16" +solana-program-test = "=1.17.2" +solana-sdk = "=1.17.2" [lib] crate-type = ["cdylib", "lib"] diff --git a/shared-memory/program/src/lib.rs b/shared-memory/program/src/lib.rs index cb6496aa1ef..6003a5d24ac 100644 --- a/shared-memory/program/src/lib.rs +++ b/shared-memory/program/src/lib.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![deny(missing_docs)] //! Shared memory program for the Solana blockchain. // diff --git a/single-pool/cli/Cargo.toml b/single-pool/cli/Cargo.toml index 78154073022..44702eabbbd 100644 --- a/single-pool/cli/Cargo.toml +++ b/single-pool/cli/Cargo.toml @@ -17,23 +17,23 @@ serde = "1.0.189" serde_derive = "1.0.103" serde_json = "1.0.107" serde_with = "3.4.0" -solana-account-decoder = "=1.16.16" -solana-clap-v3-utils = "=1.16.16" -solana-cli-config = "=1.16.16" -solana-cli-output = "=1.16.16" -solana-client = "=1.16.16" -solana-logger = "=1.16.16" -solana-remote-wallet = "=1.16.16" -solana-sdk = "=1.16.16" -solana-transaction-status = "=1.16.16" -solana-vote-program = "=1.16.16" +solana-account-decoder = "=1.17.2" +solana-clap-v3-utils = "=1.17.2" +solana-cli-config = "=1.17.2" +solana-cli-output = "=1.17.2" +solana-client = "=1.17.2" +solana-logger = "=1.17.2" +solana-remote-wallet = "=1.17.2" +solana-sdk = "=1.17.2" +solana-transaction-status = "=1.17.2" +solana-vote-program = "=1.17.2" spl-token = { version = "4.0", path="../../token/program", features = [ "no-entrypoint" ] } spl-token-client = { version = "0.7", path="../../token/client" } spl-associated-token-account = { version = "2.0", path="../../associated-token-account/program", features = [ "no-entrypoint" ] } spl-single-pool = { version = "1.0.0", path="../program", features = [ "no-entrypoint" ] } [dev-dependencies] -solana-test-validator = "=1.16.16" +solana-test-validator = "=1.17.2" serial_test = "2.0.0" test-case = "3.2" tempfile = "3.8.0" diff --git a/single-pool/cli/src/cli.rs b/single-pool/cli/src/cli.rs index 16ca5615e7b..18c3f5113bf 100644 --- a/single-pool/cli/src/cli.rs +++ b/single-pool/cli/src/cli.rs @@ -5,16 +5,14 @@ use { ArgGroup, ArgMatches, Args, Parser, Subcommand, }, solana_clap_v3_utils::{ - input_validators::{ - is_amount_or_all, is_url_or_moniker, is_valid_pubkey, is_valid_signer, - normalize_to_url_if_moniker, - }, + input_parsers::{parse_url_or_moniker, Amount}, + input_validators::{is_valid_pubkey, is_valid_signer}, keypair::{pubkey_from_path, signer_from_path}, }, solana_remote_wallet::remote_wallet::RemoteWalletManager, solana_sdk::{pubkey::Pubkey, signer::Signer}, spl_single_pool::{self, find_pool_address}, - std::{str::FromStr, sync::Arc}, + std::{rc::Rc, str::FromStr, sync::Arc}, }; #[derive(Clone, Debug, Parser)] @@ -40,7 +38,7 @@ pub struct Cli { short = 'u', long = "url", id = "URL_OR_MONIKER", - value_parser = parse_json_rpc_url, + value_parser = parse_url_or_moniker, )] pub json_rpc_url: Option, @@ -190,8 +188,8 @@ pub struct DepositCli { #[clap(group(pool_source_group()))] pub struct WithdrawCli { /// Amount of tokens to burn for withdrawal - #[clap(validator = |s| is_amount_or_all(s))] - pub token_amount: String, + #[clap(value_parser = Amount::parse_decimal_or_all)] + pub token_amount: Amount, /// The token account to withdraw from. Defaults to the associated token account for the pool mint #[clap(long = "token-account", value_parser = |p: &str| parse_address(p, "token_account_address"))] @@ -299,10 +297,6 @@ fn pool_source_group() -> ArgGroup<'static> { .args(&["pool-address", "vote-account-address"]) } -pub fn parse_json_rpc_url(url_or_moniker: &str) -> Result { - is_url_or_moniker(url_or_moniker).map(|_| normalize_to_url_if_moniker(url_or_moniker)) -} - pub fn parse_address(path: &str, name: &str) -> Result { if is_valid_pubkey(path).is_ok() { // this all is ugly but safe @@ -402,7 +396,7 @@ impl Command { pub fn with_signers( mut self, matches: &ArgMatches, - wallet_manager: &mut Option>, + wallet_manager: &mut Option>, ) -> Result { match self { Command::Deposit(ref mut config) => { @@ -440,7 +434,7 @@ impl Command { pub fn with_signer( matches: &ArgMatches, - wallet_manager: &mut Option>, + wallet_manager: &mut Option>, arg: Option, name: &str, ) -> Result, Error> { diff --git a/single-pool/cli/src/config.rs b/single-pool/cli/src/config.rs index 0466e85b75b..c1a339c1890 100644 --- a/single-pool/cli/src/config.rs +++ b/single-pool/cli/src/config.rs @@ -6,7 +6,7 @@ use { solana_remote_wallet::remote_wallet::RemoteWalletManager, solana_sdk::{commitment_config::CommitmentConfig, signature::Signer}, spl_token_client::client::{ProgramClient, ProgramRpcClient, ProgramRpcClientSendTransaction}, - std::{process::exit, sync::Arc}, + std::{process::exit, rc::Rc, sync::Arc}, }; use crate::cli::*; @@ -43,7 +43,7 @@ impl Config { pub fn new( cli: Cli, matches: ArgMatches, - wallet_manager: &mut Option>, + wallet_manager: &mut Option>, ) -> Self { // get the generic cli config struct let cli_config = if let Some(config_file) = &cli.config_file { diff --git a/single-pool/cli/src/main.rs b/single-pool/cli/src/main.rs index ade41bc80e0..c46fa2fe77a 100644 --- a/single-pool/cli/src/main.rs +++ b/single-pool/cli/src/main.rs @@ -1,8 +1,9 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] use { borsh::BorshSerialize, clap::{CommandFactory, Parser}, + solana_clap_v3_utils::input_parsers::Amount, solana_client::{ rpc_config::RpcProgramAccountsConfig, rpc_filter::{Memcmp, RpcFilterType}, @@ -439,9 +440,10 @@ async fn command_withdraw(config: &Config, command_config: WithdrawCli) -> Comma let token_account = token.get_account_info(&token_account_address).await?; - let token_amount = match command_config.token_amount.as_ref() { - "ALL" => token_account.base.amount, - amount => amount.parse::()?, + let token_amount = match command_config.token_amount.sol_to_lamport() { + Amount::All => token_account.base.amount, + Amount::Raw(amount) => amount, + Amount::Decimal(_) => unreachable!(), }; println_display( diff --git a/single-pool/cli/src/quarantine.rs b/single-pool/cli/src/quarantine.rs index 785d68f35d4..3e79f1ca12b 100644 --- a/single-pool/cli/src/quarantine.rs +++ b/single-pool/cli/src/quarantine.rs @@ -6,7 +6,7 @@ use solana_sdk::{ pubkey::Pubkey, stake::{ self, - state::{Meta, Stake, StakeState}, + state::{Meta, Stake, StakeStateV2}, }, system_instruction, sysvar::{self, rent::Rent}, @@ -41,15 +41,15 @@ pub async fn get_stake_info( .get_account(*stake_account_address) .await? { - match bincode::deserialize::(&stake_account.data)? { - StakeState::Stake(meta, stake) => Ok(Some((meta, stake))), - StakeState::Initialized(_) => { + match bincode::deserialize::(&stake_account.data)? { + StakeStateV2::Stake(meta, stake, _) => Ok(Some((meta, stake))), + StakeStateV2::Initialized(_) => { Err(format!("Stake account {} is undelegated", stake_account_address).into()) } - StakeState::Uninitialized => { + StakeStateV2::Uninitialized => { Err(format!("Stake account {} is uninitialized", stake_account_address).into()) } - StakeState::RewardsPool => unimplemented!(), + StakeStateV2::RewardsPool => unimplemented!(), } } else { Ok(None) @@ -63,14 +63,14 @@ pub async fn create_uninitialized_stake_account_instruction( ) -> Result { let rent_amount = config .program_client - .get_minimum_balance_for_rent_exemption(std::mem::size_of::()) + .get_minimum_balance_for_rent_exemption(std::mem::size_of::()) .await?; Ok(system_instruction::create_account( payer, stake_account, rent_amount, - std::mem::size_of::() as u64, + std::mem::size_of::() as u64, &stake::program::id(), )) } diff --git a/single-pool/cli/tests/test.rs b/single-pool/cli/tests/test.rs index 67ef4020a4f..bd25bf0d0a9 100644 --- a/single-pool/cli/tests/test.rs +++ b/single-pool/cli/tests/test.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] use { serial_test::serial, @@ -13,7 +13,7 @@ use { signature::{write_keypair_file, Keypair, Signer}, stake::{ self, - state::{Authorized, Lockup, StakeState}, + state::{Authorized, Lockup, StakeStateV2}, }, system_instruction, system_program, transaction::Transaction, @@ -209,7 +209,7 @@ async fn create_and_delegate_stake_account( let stake_account = Keypair::new(); let stake_rent = program_client - .get_minimum_balance_for_rent_exemption(StakeState::size_of()) + .get_minimum_balance_for_rent_exemption(StakeStateV2::size_of()) .await .unwrap(); let blockhash = program_client.get_latest_blockhash().await.unwrap(); diff --git a/single-pool/program/Cargo.toml b/single-pool/program/Cargo.toml index 8b38315c6f7..859cbb10f76 100644 --- a/single-pool/program/Cargo.toml +++ b/single-pool/program/Cargo.toml @@ -17,15 +17,15 @@ borsh = "0.10" num-derive = "0.4" num-traits = "0.2" num_enum = "0.7.0" -solana-program = "1.16.16" +solana-program = "1.17.2" spl-token = { version = "4.0", path = "../../token/program", features = [ "no-entrypoint" ] } spl-associated-token-account = { version = "2.0", path = "../../associated-token-account/program", features = [ "no-entrypoint" ] } thiserror = "1.0" [dev-dependencies] -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" -solana-vote-program = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" +solana-vote-program = "1.17.2" test-case = "3.2" bincode = "1.3.1" rand = "0.8.5" diff --git a/single-pool/program/src/error.rs b/single-pool/program/src/error.rs index 43c2a871d1d..ef620c7027d 100644 --- a/single-pool/program/src/error.rs +++ b/single-pool/program/src/error.rs @@ -55,8 +55,8 @@ pub enum SinglePoolError { #[error("SignatureMissing")] SignatureMissing, /// Stake account is not in the state expected by the program. - #[error("WrongStakeState")] - WrongStakeState, + #[error("WrongStakeStake")] + WrongStakeStake, /// Unsigned subtraction crossed the zero. #[error("ArithmeticOverflow")] ArithmeticOverflow, @@ -127,7 +127,7 @@ impl PrintProgramError for SinglePoolError { msg!("Error: Not enough stake to cover the provided quantity of pool tokens. \ (Generally this should not happen absent user error, but may if the minimum delegation increases.)"), SinglePoolError::SignatureMissing => msg!("Error: Required signature is missing."), - SinglePoolError::WrongStakeState => msg!("Error: Stake account is not in the state expected by the program."), + SinglePoolError::WrongStakeStake => msg!("Error: Stake account is not in the state expected by the program."), SinglePoolError::ArithmeticOverflow => msg!("Error: Unsigned subtraction crossed the zero."), SinglePoolError::UnexpectedMathError => msg!("Error: A calculation failed unexpectedly. \ diff --git a/single-pool/program/src/instruction.rs b/single-pool/program/src/instruction.rs index 46ebb081dd7..d9f440efed4 100644 --- a/single-pool/program/src/instruction.rs +++ b/single-pool/program/src/instruction.rs @@ -137,7 +137,7 @@ pub fn initialize( let pool_rent = rent.minimum_balance(std::mem::size_of::()); let stake_address = find_pool_stake_address(program_id, &pool_address); - let stake_space = std::mem::size_of::(); + let stake_space = std::mem::size_of::(); let stake_rent_plus_minimum = rent .minimum_balance(stake_space) .saturating_add(minimum_delegation); @@ -295,7 +295,7 @@ pub fn deposit_stake( /// Creates all necessary instructions to withdraw stake into a given stake account. /// If a new stake account is required, the user should first include `system_instruction::create_account` -/// with account size `std::mem::size_of::()` and owner `stake::program::id()`. +/// with account size `std::mem::size_of::()` and owner `stake::program::id()`. pub fn withdraw( program_id: &Pubkey, pool_address: &Pubkey, @@ -379,7 +379,7 @@ pub fn create_and_delegate_user_stake( stake_amount: u64, ) -> Vec { let pool_address = find_pool_address(program_id, vote_account_address); - let stake_space = std::mem::size_of::(); + let stake_space = std::mem::size_of::(); let lamports = rent .minimum_balance(stake_space) .saturating_add(stake_amount); diff --git a/single-pool/program/src/processor.rs b/single-pool/program/src/processor.rs index 50e9eae59e4..501c966f061 100644 --- a/single-pool/program/src/processor.rs +++ b/single-pool/program/src/processor.rs @@ -30,7 +30,7 @@ use { rent::Rent, stake::{ self, - state::{Meta, Stake, StakeState}, + state::{Meta, Stake, StakeStateV2}, }, stake_history::Epoch, system_instruction, system_program, @@ -75,11 +75,11 @@ fn calculate_withdraw_amount( /// Deserialize the stake state from AccountInfo fn get_stake_state(stake_account_info: &AccountInfo) -> Result<(Meta, Stake), ProgramError> { - let stake_state = try_from_slice_unchecked::(&stake_account_info.data.borrow())?; + let stake_state = try_from_slice_unchecked::(&stake_account_info.data.borrow())?; match stake_state { - StakeState::Stake(meta, stake) => Ok((meta, stake)), - _ => Err(SinglePoolError::WrongStakeState.into()), + StakeStateV2::Stake(meta, stake, _) => Ok((meta, stake)), + _ => Err(SinglePoolError::WrongStakeStake.into()), } } @@ -652,7 +652,7 @@ impl Processor { // create the pool stake account. user has already transferred in rent plus at least the minimum let minimum_delegation = minimum_delegation()?; - let stake_space = std::mem::size_of::(); + let stake_space = std::mem::size_of::(); let stake_rent_plus_initial = rent .minimum_balance(stake_space) .saturating_add(minimum_delegation); @@ -737,7 +737,7 @@ impl Processor { let (_, pool_stake_state) = get_stake_state(pool_stake_info)?; if pool_stake_state.delegation.deactivation_epoch > clock.epoch { - return Err(SinglePoolError::WrongStakeState.into()); + return Err(SinglePoolError::WrongStakeStake.into()); } let stake_authority_seeds = &[ @@ -821,7 +821,7 @@ impl Processor { || is_stake_active_without_history(&pool_stake_state, clock.epoch) != is_stake_active_without_history(&user_stake_state, clock.epoch) { - return Err(SinglePoolError::WrongStakeState.into()); + return Err(SinglePoolError::WrongStakeStake.into()); } // merge the user stake account, which is preauthed to us, into the pool stake account @@ -1214,7 +1214,7 @@ impl Processor { } #[cfg(test)] -#[allow(clippy::integer_arithmetic)] +#[allow(clippy::arithmetic_side_effects)] mod tests { use { super::*, diff --git a/single-pool/program/tests/accounts.rs b/single-pool/program/tests/accounts.rs index d8723fb877b..5d8a928e0bb 100644 --- a/single-pool/program/tests/accounts.rs +++ b/single-pool/program/tests/accounts.rs @@ -1,4 +1,5 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] +#![allow(clippy::items_after_test_module)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/single-pool/program/tests/create_pool_token_metadata.rs b/single-pool/program/tests/create_pool_token_metadata.rs index 608a5e9a681..ac499cb2dd5 100644 --- a/single-pool/program/tests/create_pool_token_metadata.rs +++ b/single-pool/program/tests/create_pool_token_metadata.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/single-pool/program/tests/deposit.rs b/single-pool/program/tests/deposit.rs index ea062e84f7e..e0ae74d05f3 100644 --- a/single-pool/program/tests/deposit.rs +++ b/single-pool/program/tests/deposit.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; @@ -373,7 +373,7 @@ async fn fail_bad_account(activate: bool, automorph: bool) { if automorph { check_error(e, SinglePoolError::InvalidPoolStakeAccountUsage); } else { - check_error(e, SinglePoolError::WrongStakeState); + check_error(e, SinglePoolError::WrongStakeStake); } } @@ -454,5 +454,5 @@ async fn fail_activation_mismatch(pool_first: bool) { .process_transaction(transaction) .await .unwrap_err(); - check_error(e, SinglePoolError::WrongStakeState); + check_error(e, SinglePoolError::WrongStakeStake); } diff --git a/single-pool/program/tests/helpers/stake.rs b/single-pool/program/tests/helpers/stake.rs index 1b1afdebca6..f2449e7fcbe 100644 --- a/single-pool/program/tests/helpers/stake.rs +++ b/single-pool/program/tests/helpers/stake.rs @@ -10,7 +10,7 @@ use { signature::{Keypair, Signer}, stake::{ self, - state::{Meta, Stake, StakeState}, + state::{Meta, Stake, StakeStateV2}, }, system_instruction, transaction::Transaction, @@ -26,16 +26,16 @@ pub async fn get_stake_account( ) -> (Meta, Option, u64) { let stake_account = get_account(banks_client, pubkey).await; let lamports = stake_account.lamports; - match deserialize::(&stake_account.data).unwrap() { - StakeState::Initialized(meta) => (meta, None, lamports), - StakeState::Stake(meta, stake) => (meta, Some(stake), lamports), + match deserialize::(&stake_account.data).unwrap() { + StakeStateV2::Initialized(meta) => (meta, None, lamports), + StakeStateV2::Stake(meta, stake, _) => (meta, Some(stake), lamports), _ => unimplemented!(), } } pub async fn get_stake_account_rent(banks_client: &mut BanksClient) -> u64 { let rent = banks_client.get_rent().await.unwrap(); - rent.minimum_balance(std::mem::size_of::()) + rent.minimum_balance(std::mem::size_of::()) } pub async fn get_minimum_delegation( @@ -104,7 +104,7 @@ pub async fn create_blank_stake_account( &rent_payer.pubkey(), &stake.pubkey(), lamports, - std::mem::size_of::() as u64, + std::mem::size_of::() as u64, &stake::program::id(), )], Some(&fee_payer.pubkey()), diff --git a/single-pool/program/tests/initialize.rs b/single-pool/program/tests/initialize.rs index 6d3e95cb6bb..e4b42bf1677 100644 --- a/single-pool/program/tests/initialize.rs +++ b/single-pool/program/tests/initialize.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/single-pool/program/tests/reactivate.rs b/single-pool/program/tests/reactivate.rs index a7ffaa4071b..1c03b39805e 100644 --- a/single-pool/program/tests/reactivate.rs +++ b/single-pool/program/tests/reactivate.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; @@ -9,7 +9,10 @@ use { solana_sdk::{ account::AccountSharedData, signature::Signer, - stake::state::{Delegation, Stake, StakeState}, + stake::{ + stake_flags::StakeFlags, + state::{Delegation, Stake, StakeStateV2}, + }, transaction::Transaction, }, spl_single_pool::{error::SinglePoolError, id, instruction}, @@ -33,15 +36,16 @@ async fn success() { deactivation_epoch: 0, ..stake.unwrap().delegation }; - let mut account_data = vec![0; std::mem::size_of::()]; + let mut account_data = vec![0; std::mem::size_of::()]; bincode::serialize_into( &mut account_data[..], - &StakeState::Stake( + &StakeStateV2::Stake( meta, Stake { delegation, ..stake.unwrap() }, + StakeFlags::empty(), ), ) .unwrap(); @@ -74,7 +78,7 @@ async fn success() { .process_transaction(transaction) .await .unwrap_err(); - check_error(e, SinglePoolError::WrongStakeState); + check_error(e, SinglePoolError::WrongStakeStake); // reactivate let instruction = instruction::reactivate_pool_stake(&id(), &accounts.vote_account.pubkey()); @@ -148,5 +152,5 @@ async fn fail_not_deactivated(activate: bool) { .process_transaction(transaction) .await .unwrap_err(); - check_error(e, SinglePoolError::WrongStakeState); + check_error(e, SinglePoolError::WrongStakeStake); } diff --git a/single-pool/program/tests/update_pool_token_metadata.rs b/single-pool/program/tests/update_pool_token_metadata.rs index b7c19c95ea2..3f6e86d61b5 100644 --- a/single-pool/program/tests/update_pool_token_metadata.rs +++ b/single-pool/program/tests/update_pool_token_metadata.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/single-pool/program/tests/withdraw.rs b/single-pool/program/tests/withdraw.rs index 55cbd4b7c1a..d92c85dfb51 100644 --- a/single-pool/program/tests/withdraw.rs +++ b/single-pool/program/tests/withdraw.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/stake-pool/cli/Cargo.toml b/stake-pool/cli/Cargo.toml index 4674b6b169f..3aa8ab0df2d 100644 --- a/stake-pool/cli/Cargo.toml +++ b/stake-pool/cli/Cargo.toml @@ -14,15 +14,15 @@ clap = "2.33.3" serde = "1.0.189" serde_derive = "1.0.130" serde_json = "1.0.107" -solana-account-decoder = "=1.16.16" -solana-clap-utils = "=1.16.16" -solana-cli-config = "=1.16.16" -solana-cli-output = "=1.16.16" -solana-client = "=1.16.16" -solana-logger = "=1.16.16" -solana-program = "=1.16.16" -solana-remote-wallet = "=1.16.16" -solana-sdk = "=1.16.16" +solana-account-decoder = "=1.17.2" +solana-clap-utils = "=1.17.2" +solana-cli-config = "=1.17.2" +solana-cli-output = "=1.17.2" +solana-client = "=1.17.2" +solana-logger = "=1.17.2" +solana-program = "=1.17.2" +solana-remote-wallet = "=1.17.2" +solana-sdk = "=1.17.2" spl-associated-token-account = { version = "=2.2", path="../../associated-token-account/program", features = [ "no-entrypoint" ] } spl-stake-pool = { version = "=0.7.0", path="../program", features = [ "no-entrypoint" ] } spl-token = { version = "=4.0", path="../../token/program", features = [ "no-entrypoint" ] } diff --git a/stake-pool/cli/src/client.rs b/stake-pool/cli/src/client.rs index 444e4608274..9deae1a807c 100644 --- a/stake-pool/cli/src/client.rs +++ b/stake-pool/cli/src/client.rs @@ -73,7 +73,7 @@ pub fn get_token_mint( pub(crate) fn get_stake_state( rpc_client: &RpcClient, stake_address: &Pubkey, -) -> Result { +) -> Result { let account_data = rpc_client.get_account_data(stake_address)?; let stake_state = deserialize(account_data.as_slice()) .map_err(|err| format!("Invalid stake account {}: {}", stake_address, err))?; diff --git a/stake-pool/cli/src/main.rs b/stake-pool/cli/src/main.rs index 37c8cb50e7b..0edaafbc1bf 100644 --- a/stake-pool/cli/src/main.rs +++ b/stake-pool/cli/src/main.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] mod client; mod output; @@ -51,7 +51,7 @@ use { MINIMUM_RESERVE_LAMPORTS, }, std::cmp::Ordering, - std::{num::NonZeroU32, process::exit, sync::Arc}, + std::{num::NonZeroU32, process::exit, rc::Rc}, }; // use instruction::create_associated_token_account once ATA 1.0.5 is released #[allow(deprecated)] @@ -127,7 +127,7 @@ fn get_signer( matches: &ArgMatches<'_>, keypair_name: &str, keypair_path: &str, - wallet_manager: &mut Option>, + wallet_manager: &mut Option>, signer_from_path_config: SignerFromPathConfig, ) -> Box { signer_from_path_with_config( @@ -683,7 +683,7 @@ fn command_deposit_stake( println!("Depositing stake account {:?}", stake_state); } let vote_account = match stake_state { - stake::state::StakeState::Stake(_, stake) => Ok(stake.delegation.voter_pubkey), + stake::state::StakeStateV2::Stake(_, stake, _) => Ok(stake.delegation.voter_pubkey), _ => Err("Wrong stake account state, must be delegated to validator"), }?; @@ -865,7 +865,7 @@ fn command_deposit_all_stake( let stake_state = get_stake_state(&config.rpc_client, &stake_address)?; let vote_account = match stake_state { - stake::state::StakeState::Stake(_, stake) => Ok(stake.delegation.voter_pubkey), + stake::state::StakeStateV2::Stake(_, stake, _) => Ok(stake.delegation.voter_pubkey), _ => Err("Wrong stake account state, must be delegated to validator"), }?; @@ -1399,9 +1399,12 @@ fn command_withdraw_stake( let maybe_stake_receiver_state = stake_receiver_param .map(|stake_receiver_pubkey| { let stake_account = config.rpc_client.get_account(&stake_receiver_pubkey).ok()?; - let stake_state: stake::state::StakeState = deserialize(stake_account.data.as_slice()) - .map_err(|err| format!("Invalid stake account {}: {}", stake_receiver_pubkey, err)) - .ok()?; + let stake_state: stake::state::StakeStateV2 = + deserialize(stake_account.data.as_slice()) + .map_err(|err| { + format!("Invalid stake account {}: {}", stake_receiver_pubkey, err) + }) + .ok()?; if stake_state.delegation().is_some() && stake_account.owner == stake::program::id() { Some(stake_state) } else { diff --git a/stake-pool/program/Cargo.toml b/stake-pool/program/Cargo.toml index 0832372d1d6..31f02250572 100644 --- a/stake-pool/program/Cargo.toml +++ b/stake-pool/program/Cargo.toml @@ -20,7 +20,7 @@ num-traits = "0.2" num_enum = "0.7.0" serde = "1.0.189" serde_derive = "1.0.103" -solana-program = "1.16.16" +solana-program = "1.17.2" spl-math = { version = "0.2", path = "../../libraries/math", features = [ "no-entrypoint" ] } spl-pod = { version = "0.1", path = "../../libraries/pod", features = ["borsh"] } spl-token-2022 = { version = "0.9", path = "../../token/program-2022", features = [ "no-entrypoint" ] } @@ -30,9 +30,9 @@ bincode = "1.3.1" [dev-dependencies] assert_matches = "1.5.0" proptest = "1.3" -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" -solana-vote-program = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" +solana-vote-program = "1.17.2" spl-token = { version = "4.0", path = "../../token/program", features = [ "no-entrypoint" ] } test-case = "3.2" diff --git a/stake-pool/program/src/big_vec.rs b/stake-pool/program/src/big_vec.rs index 3ba5afce73b..0d05f0aee11 100644 --- a/stake-pool/program/src/big_vec.rs +++ b/stake-pool/program/src/big_vec.rs @@ -1,5 +1,5 @@ //! Big vector type, used with vectors that can't be serde'd -#![allow(clippy::integer_arithmetic)] // checked math involves too many compute units +#![allow(clippy::arithmetic_side_effects)] // checked math involves too many compute units use { arrayref::array_ref, @@ -271,7 +271,7 @@ mod tests { fn find_mut() { let mut data = [0u8; 4 + 8 * 4]; let mut v = from_slice(&mut data, &[1, 2, 3, 4]); - let mut test_struct = v + let test_struct = v .find_mut::(|x| find_predicate(x, 1)) .unwrap(); test_struct.value = [0; 8]; @@ -283,7 +283,7 @@ mod tests { fn deserialize_mut_slice() { let mut data = [0u8; 4 + 8 * 4]; let mut v = from_slice(&mut data, &[1, 2, 3, 4]); - let mut slice = v.deserialize_mut_slice::(1, 2).unwrap(); + let slice = v.deserialize_mut_slice::(1, 2).unwrap(); slice[0].value[0] = 10; slice[1].value[0] = 11; check_big_vec_eq(&v, &[1, 10, 11, 4]); diff --git a/stake-pool/program/src/error.rs b/stake-pool/program/src/error.rs index 83bcb1a0247..afeaeaf49df 100644 --- a/stake-pool/program/src/error.rs +++ b/stake-pool/program/src/error.rs @@ -48,8 +48,8 @@ pub enum StakePoolError { #[error("WrongPoolMint")] WrongPoolMint, /// Stake account is not in the state expected by the program. - #[error("WrongStakeState")] - WrongStakeState, + #[error("WrongStakeStake")] + WrongStakeStake, /// User stake is not active #[error("UserStakeNotActive")] UserStakeNotActive, diff --git a/stake-pool/program/src/processor.rs b/stake-pool/program/src/processor.rs index abf5a67c26b..b25ec780531 100644 --- a/stake-pool/program/src/processor.rs +++ b/stake-pool/program/src/processor.rs @@ -50,10 +50,10 @@ fn get_stake_state( stake_account_info: &AccountInfo, ) -> Result<(stake::state::Meta, stake::state::Stake), ProgramError> { let stake_state = - try_from_slice_unchecked::(&stake_account_info.data.borrow())?; + try_from_slice_unchecked::(&stake_account_info.data.borrow())?; match stake_state { - stake::state::StakeState::Stake(meta, stake) => Ok((meta, stake)), - _ => Err(StakePoolError::WrongStakeState.into()), + stake::state::StakeStateV2::Stake(meta, stake, _) => Ok((meta, stake)), + _ => Err(StakePoolError::WrongStakeStake.into()), } } @@ -224,7 +224,7 @@ fn check_if_stake_deactivating( vote_account_address, epoch, ); - Err(StakePoolError::WrongStakeState.into()) + Err(StakePoolError::WrongStakeStake.into()) } else { Ok(()) } @@ -246,7 +246,7 @@ fn check_if_stake_activating( vote_account_address, epoch, ); - Err(StakePoolError::WrongStakeState.into()) + Err(StakePoolError::WrongStakeStake.into()) } else { Ok(()) } @@ -266,7 +266,7 @@ fn check_stake_state( "Validator stake for {} not usable by pool, must be owned by withdraw authority", vote_account_address ); - return Err(StakePoolError::WrongStakeState.into()); + return Err(StakePoolError::WrongStakeStake.into()); } if stake.delegation.voter_pubkey != *vote_account_address { msg!( @@ -274,7 +274,7 @@ fn check_stake_state( stake_account_info.key, vote_account_address ); - return Err(StakePoolError::WrongStakeState.into()); + return Err(StakePoolError::WrongStakeStake.into()); } Ok(()) } @@ -863,13 +863,13 @@ impl Processor { msg!("Reserve stake account not owned by stake program"); return Err(ProgramError::IncorrectProgramId); } - let stake_state = try_from_slice_unchecked::( + let stake_state = try_from_slice_unchecked::( &reserve_stake_info.data.borrow(), )?; - let total_lamports = if let stake::state::StakeState::Initialized(meta) = stake_state { + let total_lamports = if let stake::state::StakeStateV2::Initialized(meta) = stake_state { if meta.lockup != stake::state::Lockup::default() { msg!("Reserve stake account has some lockup"); - return Err(StakePoolError::WrongStakeState.into()); + return Err(StakePoolError::WrongStakeStake.into()); } if meta.authorized.staker != withdraw_authority_key { @@ -878,7 +878,7 @@ impl Processor { meta.authorized.staker, withdraw_authority_key ); - return Err(StakePoolError::WrongStakeState.into()); + return Err(StakePoolError::WrongStakeStake.into()); } if meta.authorized.withdrawer != withdraw_authority_key { @@ -887,7 +887,7 @@ impl Processor { meta.authorized.staker, withdraw_authority_key ); - return Err(StakePoolError::WrongStakeState.into()); + return Err(StakePoolError::WrongStakeStake.into()); } reserve_stake_info .lamports() @@ -895,7 +895,7 @@ impl Processor { .ok_or(StakePoolError::CalculationFailure)? } else { msg!("Reserve stake account not in intialized state"); - return Err(StakePoolError::WrongStakeState.into()); + return Err(StakePoolError::WrongStakeStake.into()); }; if total_lamports > 0 { @@ -1036,18 +1036,18 @@ impl Processor { ]; // Fund the stake account with the minimum + rent-exempt balance - let stake_space = std::mem::size_of::(); + let stake_space = std::mem::size_of::(); let stake_minimum_delegation = stake::tools::get_minimum_delegation()?; let required_lamports = minimum_delegation(stake_minimum_delegation) .saturating_add(rent.minimum_balance(stake_space)); // Check that we're not draining the reserve totally - let reserve_stake = try_from_slice_unchecked::( + let reserve_stake = try_from_slice_unchecked::( &reserve_stake_info.data.borrow(), )?; let reserve_meta = reserve_stake .meta() - .ok_or(StakePoolError::WrongStakeState)?; + .ok_or(StakePoolError::WrongStakeStake)?; let minimum_lamports = minimum_reserve_lamports(&reserve_meta); let reserve_lamports = reserve_stake_info.lamports(); if reserve_lamports.saturating_sub(required_lamports) < minimum_lamports { @@ -1161,7 +1161,7 @@ impl Processor { ); return Err(StakePoolError::ValidatorNotFound.into()); } - let mut validator_stake_info = maybe_validator_stake_info.unwrap(); + let validator_stake_info = maybe_validator_stake_info.unwrap(); check_validator_stake_address( program_id, stake_pool_info.key, @@ -1319,7 +1319,7 @@ impl Processor { ); return Err(StakePoolError::ValidatorNotFound.into()); } - let mut validator_stake_info = maybe_validator_stake_info.unwrap(); + let validator_stake_info = maybe_validator_stake_info.unwrap(); check_validator_stake_address( program_id, stake_pool_info.key, @@ -1346,7 +1346,7 @@ impl Processor { )?; } - let stake_space = std::mem::size_of::(); + let stake_space = std::mem::size_of::(); let stake_rent = rent.minimum_balance(stake_space); let stake_minimum_delegation = stake::tools::get_minimum_delegation()?; @@ -1633,7 +1633,7 @@ impl Processor { ); return Err(StakePoolError::ValidatorNotFound.into()); } - let mut validator_stake_info = maybe_validator_stake_info.unwrap(); + let validator_stake_info = maybe_validator_stake_info.unwrap(); if u64::from(validator_stake_info.transient_stake_lamports) > 0 { if maybe_ephemeral_stake_seed.is_none() { msg!("Attempting to increase stake on a validator with pending transient stake, use IncreaseAdditionalValidatorStake with the existing seed"); @@ -1668,7 +1668,7 @@ impl Processor { return Err(StakePoolError::ValidatorNotFound.into()); } - let stake_space = std::mem::size_of::(); + let stake_space = std::mem::size_of::(); let stake_rent = rent.minimum_balance(stake_space); let stake_minimum_delegation = stake::tools::get_minimum_delegation()?; let current_minimum_delegation = minimum_delegation(stake_minimum_delegation); @@ -1805,12 +1805,12 @@ impl Processor { )?; // Activate transient stake to validator if necessary - let stake_state = try_from_slice_unchecked::( + let stake_state = try_from_slice_unchecked::( &transient_stake_account_info.data.borrow(), )?; match stake_state { // if it was delegated on or before this epoch, we're good - stake::state::StakeState::Stake(_, stake) + stake::state::StakeStateV2::Stake(_, stake, _) if stake.delegation.activation_epoch <= clock.epoch => {} // all other situations, delegate! _ => { @@ -1901,7 +1901,7 @@ impl Processor { } let rent = Rent::get()?; - let stake_space = std::mem::size_of::(); + let stake_space = std::mem::size_of::(); let stake_rent = rent.minimum_balance(stake_space); let stake_minimum_delegation = stake::tools::get_minimum_delegation()?; let current_minimum_delegation = minimum_delegation(stake_minimum_delegation); @@ -1957,7 +1957,7 @@ impl Processor { ); return Err(StakePoolError::ValidatorNotFound.into()); } - let mut validator_stake_info = maybe_validator_stake_info.unwrap(); + let validator_stake_info = maybe_validator_stake_info.unwrap(); check_validator_stake_address( program_id, stake_pool_info.key, @@ -2080,7 +2080,7 @@ impl Processor { ); return Err(StakePoolError::ValidatorNotFound.into()); } - let mut validator_stake_info = maybe_validator_stake_info.unwrap(); + let validator_stake_info = maybe_validator_stake_info.unwrap(); check_validator_stake_account( destination_validator_stake_account_info, program_id, @@ -2333,11 +2333,11 @@ impl Processor { let mut active_stake_lamports = 0; let mut transient_stake_lamports = 0; - let validator_stake_state = try_from_slice_unchecked::( + let validator_stake_state = try_from_slice_unchecked::( &validator_stake_info.data.borrow(), ) .ok(); - let transient_stake_state = try_from_slice_unchecked::( + let transient_stake_state = try_from_slice_unchecked::( &transient_stake_info.data.borrow(), ) .ok(); @@ -2349,7 +2349,7 @@ impl Processor { // * inactive -> merge into reserve stake // * not a stake -> ignore match transient_stake_state { - Some(stake::state::StakeState::Initialized(meta)) => { + Some(stake::state::StakeStateV2::Initialized(meta)) => { if stake_is_usable_by_pool( &meta, withdraw_authority_info.key, @@ -2373,7 +2373,7 @@ impl Processor { } } } - Some(stake::state::StakeState::Stake(meta, stake)) => { + Some(stake::state::StakeStateV2::Stake(meta, stake, _)) => { if stake_is_usable_by_pool( &meta, withdraw_authority_info.key, @@ -2395,7 +2395,7 @@ impl Processor { )?; validator_stake_record.status.remove_transient_stake()?; } else if stake.delegation.activation_epoch < clock.epoch { - if let Some(stake::state::StakeState::Stake(_, validator_stake)) = + if let Some(stake::state::StakeStateV2::Stake(_, validator_stake, _)) = validator_stake_state { if validator_stake.delegation.activation_epoch < clock.epoch { @@ -2424,19 +2424,19 @@ impl Processor { } } None - | Some(stake::state::StakeState::Uninitialized) - | Some(stake::state::StakeState::RewardsPool) => {} // do nothing + | Some(stake::state::StakeStateV2::Uninitialized) + | Some(stake::state::StakeStateV2::RewardsPool) => {} // do nothing } // Status for validator stake // * active -> do everything // * any other state / not a stake -> error state, but account for transient stake - let validator_stake_state = try_from_slice_unchecked::( + let validator_stake_state = try_from_slice_unchecked::( &validator_stake_info.data.borrow(), ) .ok(); match validator_stake_state { - Some(stake::state::StakeState::Stake(meta, stake)) => { + Some(stake::state::StakeStateV2::Stake(meta, stake, _)) => { let additional_lamports = validator_stake_info .lamports() .saturating_sub(stake.delegation.stake) @@ -2494,7 +2494,7 @@ impl Processor { } } } - Some(stake::state::StakeState::Initialized(meta)) + Some(stake::state::StakeStateV2::Initialized(meta)) if stake_is_usable_by_pool( &meta, withdraw_authority_info.key, @@ -2517,9 +2517,9 @@ impl Processor { )?; validator_stake_record.status.remove_validator_stake()?; } - Some(stake::state::StakeState::Initialized(_)) - | Some(stake::state::StakeState::Uninitialized) - | Some(stake::state::StakeState::RewardsPool) + Some(stake::state::StakeStateV2::Initialized(_)) + | Some(stake::state::StakeStateV2::Uninitialized) + | Some(stake::state::StakeStateV2::RewardsPool) | None => { msg!("Validator stake account no longer part of the pool, ignoring"); } @@ -2578,19 +2578,19 @@ impl Processor { let previous_lamports = stake_pool.total_lamports; let previous_pool_token_supply = stake_pool.pool_token_supply; - let reserve_stake = try_from_slice_unchecked::( + let reserve_stake = try_from_slice_unchecked::( &reserve_stake_info.data.borrow(), )?; - let mut total_lamports = if let stake::state::StakeState::Initialized(meta) = reserve_stake - { - reserve_stake_info - .lamports() - .checked_sub(minimum_reserve_lamports(&meta)) - .ok_or(StakePoolError::CalculationFailure)? - } else { - msg!("Reserve stake account in unknown state, aborting"); - return Err(StakePoolError::WrongStakeState.into()); - }; + let mut total_lamports = + if let stake::state::StakeStateV2::Initialized(meta) = reserve_stake { + reserve_stake_info + .lamports() + .checked_sub(minimum_reserve_lamports(&meta)) + .ok_or(StakePoolError::CalculationFailure)? + } else { + msg!("Reserve stake account in unknown state, aborting"); + return Err(StakePoolError::WrongStakeStake.into()); + }; for validator_stake_record in validator_list .deserialize_slice::(0, validator_list.len() as usize)? { @@ -2767,7 +2767,7 @@ impl Processor { } } - let mut validator_stake_info = validator_list + let validator_stake_info = validator_list .find_mut::(|x| { ValidatorStakeInfo::memcmp_pubkey(x, &vote_account_address) }) @@ -3188,9 +3188,10 @@ impl Processor { } let stake_minimum_delegation = stake::tools::get_minimum_delegation()?; - let stake_state = - try_from_slice_unchecked::(&stake_split_from.data.borrow())?; - let meta = stake_state.meta().ok_or(StakePoolError::WrongStakeState)?; + let stake_state = try_from_slice_unchecked::( + &stake_split_from.data.borrow(), + )?; + let meta = stake_state.meta().ok_or(StakePoolError::WrongStakeStake)?; let required_lamports = minimum_stake_lamports(&meta, stake_minimum_delegation); let lamports_per_pool_token = stake_pool @@ -3232,7 +3233,7 @@ impl Processor { } else { let delegation = stake_state .delegation() - .ok_or(StakePoolError::WrongStakeState)?; + .ok_or(StakePoolError::WrongStakeStake)?; let vote_account_address = delegation.voter_pubkey; if let Some(preferred_withdraw_validator) = @@ -3498,10 +3499,10 @@ impl Processor { let new_reserve_lamports = reserve_stake_info .lamports() .saturating_sub(withdraw_lamports); - let stake_state = try_from_slice_unchecked::( + let stake_state = try_from_slice_unchecked::( &reserve_stake_info.data.borrow(), )?; - if let stake::state::StakeState::Initialized(meta) = stake_state { + if let stake::state::StakeStateV2::Initialized(meta) = stake_state { let minimum_reserve_lamports = minimum_reserve_lamports(&meta); if new_reserve_lamports < minimum_reserve_lamports { msg!("Attempting to withdraw {} lamports, maximum possible SOL withdrawal is {} lamports", @@ -3512,7 +3513,7 @@ impl Processor { } } else { msg!("Reserve stake account not in intialized state"); - return Err(StakePoolError::WrongStakeState.into()); + return Err(StakePoolError::WrongStakeStake.into()); }; Self::token_burn( @@ -4083,7 +4084,7 @@ impl PrintProgramError for StakePoolError { StakePoolError::InvalidValidatorStakeList => msg!("Error: Invalid validator stake list account"), StakePoolError::InvalidFeeAccount => msg!("Error: Invalid manager fee account"), StakePoolError::WrongPoolMint => msg!("Error: Specified pool mint account is wrong"), - StakePoolError::WrongStakeState => msg!("Error: Stake account is not in the state expected by the program"), + StakePoolError::WrongStakeStake => msg!("Error: Stake account is not in the state expected by the program"), StakePoolError::UserStakeNotActive => msg!("Error: User stake is not active"), StakePoolError::ValidatorAlreadyAdded => msg!("Error: Stake account voting for this validator already exists in the pool"), StakePoolError::ValidatorNotFound => msg!("Error: Stake account for this validator not found in the pool"), diff --git a/stake-pool/program/src/state.rs b/stake-pool/program/src/state.rs index 7d12add010a..b218cecd40b 100644 --- a/stake-pool/program/src/state.rs +++ b/stake-pool/program/src/state.rs @@ -1030,7 +1030,7 @@ impl FeeType { #[cfg(test)] mod test { - #![allow(clippy::integer_arithmetic)] + #![allow(clippy::arithmetic_side_effects)] use { super::*, proptest::prelude::*, diff --git a/stake-pool/program/tests/create_pool_token_metadata.rs b/stake-pool/program/tests/create_pool_token_metadata.rs index 7734c785d5c..147e3928a07 100644 --- a/stake-pool/program/tests/create_pool_token_metadata.rs +++ b/stake-pool/program/tests/create_pool_token_metadata.rs @@ -1,4 +1,5 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] +#![allow(clippy::items_after_test_module)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/stake-pool/program/tests/decrease.rs b/stake-pool/program/tests/decrease.rs index c6ea45428b9..fe6398ae7b6 100644 --- a/stake-pool/program/tests/decrease.rs +++ b/stake-pool/program/tests/decrease.rs @@ -1,4 +1,5 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] +#![allow(clippy::items_after_test_module)] #![cfg(feature = "test-sbf")] mod helpers; @@ -30,7 +31,7 @@ async fn setup() -> ( ) { let mut context = program_test().start_with_context().await; let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let current_minimum_delegation = stake_pool_get_minimum_delegation( &mut context.banks_client, &context.payer, @@ -125,7 +126,7 @@ async fn success(instruction_type: DecreaseInstruction) { let validator_stake_account = get_account(&mut context.banks_client, &validator_stake.stake_account).await; let validator_stake_state = - deserialize::(&validator_stake_account.data).unwrap(); + deserialize::(&validator_stake_account.data).unwrap(); assert_eq!( pre_validator_stake_account.lamports - decrease_lamports, validator_stake_account.lamports @@ -140,7 +141,7 @@ async fn success(instruction_type: DecreaseInstruction) { // Check transient stake account state and balance let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let transient_stake_account = get_account( &mut context.banks_client, @@ -148,7 +149,7 @@ async fn success(instruction_type: DecreaseInstruction) { ) .await; let transient_stake_state = - deserialize::(&transient_stake_account.data).unwrap(); + deserialize::(&transient_stake_account.data).unwrap(); let transient_lamports = decrease_lamports + stake_rent; assert_eq!(transient_stake_account.lamports, transient_lamports); let reserve_lamports = if instruction_type == DecreaseInstruction::Deprecated { @@ -390,7 +391,7 @@ async fn twice( get_account(&mut context.banks_client, &validator_stake.stake_account).await; let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let first_decrease = decrease_lamports / 3; let second_decrease = decrease_lamports / 2; @@ -441,7 +442,7 @@ async fn twice( // Check validator stake account balance let stake_account = get_account(&mut context.banks_client, &validator_stake.stake_account).await; - let stake_state = deserialize::(&stake_account.data).unwrap(); + let stake_state = deserialize::(&stake_account.data).unwrap(); assert_eq!( pre_stake_account.lamports - total_decrease, stake_account.lamports @@ -458,7 +459,7 @@ async fn twice( ) .await; let transient_stake_state = - deserialize::(&transient_stake_account.data).unwrap(); + deserialize::(&transient_stake_account.data).unwrap(); let mut transient_lamports = total_decrease + stake_rent; if second_instruction == DecreaseInstruction::Additional { transient_lamports += stake_rent; @@ -514,7 +515,7 @@ async fn fail_with_small_lamport_amount(instruction_type: DecreaseInstruction) { setup().await; let rent = context.banks_client.get_rent().await.unwrap(); - let lamports = rent.minimum_balance(std::mem::size_of::()); + let lamports = rent.minimum_balance(std::mem::size_of::()); let error = stake_pool_accounts .decrease_validator_stake_either( @@ -575,7 +576,7 @@ async fn fail_overdraw(instruction_type: DecreaseInstruction) { setup().await; let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let error = stake_pool_accounts .decrease_validator_stake_either( @@ -662,6 +663,6 @@ async fn fail_additional_with_increasing() { TransactionError::InstructionError( _, InstructionError::Custom(code) - ) if code == StakePoolError::WrongStakeState as u32 + ) if code == StakePoolError::WrongStakeStake as u32 ); } diff --git a/stake-pool/program/tests/deposit.rs b/stake-pool/program/tests/deposit.rs index 2bd29b40f42..74e96194fa1 100644 --- a/stake-pool/program/tests/deposit.rs +++ b/stake-pool/program/tests/deposit.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; @@ -140,7 +140,7 @@ async fn success(token_program_id: Pubkey) { ) = setup(token_program_id).await; let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); // Save stake pool state before depositing let pre_stake_pool = get_account( @@ -312,7 +312,7 @@ async fn success_with_extra_stake_lamports() { .await; let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); // Save stake pool state before depositing let pre_stake_pool = get_account( @@ -821,7 +821,7 @@ async fn success_with_slippage(token_program_id: Pubkey) { ) = setup(token_program_id).await; let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); // Save stake pool state before depositing let pre_stake_pool = get_account( diff --git a/stake-pool/program/tests/deposit_authority.rs b/stake-pool/program/tests/deposit_authority.rs index 55665572cf0..9d64f6da046 100644 --- a/stake-pool/program/tests/deposit_authority.rs +++ b/stake-pool/program/tests/deposit_authority.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/stake-pool/program/tests/deposit_edge_cases.rs b/stake-pool/program/tests/deposit_edge_cases.rs index bd549805645..86ae9c27d56 100644 --- a/stake-pool/program/tests/deposit_edge_cases.rs +++ b/stake-pool/program/tests/deposit_edge_cases.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; @@ -274,7 +274,7 @@ async fn success_with_referral_fee() { let stake_pool = try_from_slice_unchecked::(stake_pool.data.as_slice()).unwrap(); let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let fee_tokens = stake_pool .calc_pool_tokens_sol_deposit_fee(stake_rent) .unwrap() diff --git a/stake-pool/program/tests/deposit_sol.rs b/stake-pool/program/tests/deposit_sol.rs index 7fefde709bd..bc983520700 100644 --- a/stake-pool/program/tests/deposit_sol.rs +++ b/stake-pool/program/tests/deposit_sol.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/stake-pool/program/tests/force_destake.rs b/stake-pool/program/tests/force_destake.rs index 5becdbe87da..f54bd02db35 100644 --- a/stake-pool/program/tests/force_destake.rs +++ b/stake-pool/program/tests/force_destake.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; @@ -11,7 +11,8 @@ use { pubkey::Pubkey, stake::{ self, - state::{Authorized, Delegation, Lockup, Meta, Stake, StakeState}, + stake_flags::StakeFlags, + state::{Authorized, Delegation, Lockup, Meta, Stake, StakeStateV2}, }, }, solana_program_test::*, @@ -32,7 +33,7 @@ use { async fn setup( stake_pool_accounts: &StakePoolAccounts, - forced_stake: &StakeState, + forced_stake: &StakeStateV2, voter_pubkey: &Pubkey, ) -> (ProgramTestContext, Option) { let mut program_test = program_test(); @@ -41,7 +42,7 @@ async fn setup( let (mut stake_pool, mut validator_list) = stake_pool_accounts.state(); let _ = add_vote_account_with_pubkey(voter_pubkey, &mut program_test); - let mut data = vec![0; std::mem::size_of::()]; + let mut data = vec![0; std::mem::size_of::()]; bincode::serialize_into(&mut data[..], forced_stake).unwrap(); let stake_account = Account::create( @@ -124,7 +125,7 @@ async fn success_update() { let voter_pubkey = Pubkey::new_unique(); let (mut context, validator_seed) = setup( &stake_pool_accounts, - &StakeState::Initialized(meta), + &StakeStateV2::Initialized(meta), &voter_pubkey, ) .await; @@ -193,7 +194,7 @@ async fn fail_increase() { let voter_pubkey = Pubkey::new_unique(); let (mut context, validator_seed) = setup( &stake_pool_accounts, - &StakeState::Initialized(meta), + &StakeStateV2::Initialized(meta), &voter_pubkey, ) .await; @@ -229,7 +230,7 @@ async fn fail_increase() { error, TransactionError::InstructionError( 0, - InstructionError::Custom(StakePoolError::WrongStakeState as u32) + InstructionError::Custom(StakePoolError::WrongStakeStake as u32) ) ); } @@ -258,7 +259,7 @@ async fn success_remove_validator() { }; let (mut context, validator_seed) = setup( &stake_pool_accounts, - &StakeState::Stake(meta, stake), + &StakeStateV2::Stake(meta, stake, StakeFlags::empty()), &voter_pubkey, ) .await; diff --git a/stake-pool/program/tests/helpers/mod.rs b/stake-pool/program/tests/helpers/mod.rs index a72c6cb2d6f..0bf6c1e18bb 100644 --- a/stake-pool/program/tests/helpers/mod.rs +++ b/stake-pool/program/tests/helpers/mod.rs @@ -651,7 +651,7 @@ pub async fn create_independent_stake_account( ) -> u64 { let rent = banks_client.get_rent().await.unwrap(); let lamports = - rent.minimum_balance(std::mem::size_of::()) + stake_amount; + rent.minimum_balance(std::mem::size_of::()) + stake_amount; let transaction = Transaction::new_signed_with_payer( &stake::instruction::create_account( @@ -677,14 +677,14 @@ pub async fn create_blank_stake_account( stake: &Keypair, ) -> u64 { let rent = banks_client.get_rent().await.unwrap(); - let lamports = rent.minimum_balance(std::mem::size_of::()); + let lamports = rent.minimum_balance(std::mem::size_of::()); let transaction = Transaction::new_signed_with_payer( &[system_instruction::create_account( &payer.pubkey(), &stake.pubkey(), lamports, - std::mem::size_of::() as u64, + std::mem::size_of::() as u64, &stake::program::id(), )], Some(&payer.pubkey()), @@ -2122,7 +2122,7 @@ pub async fn simple_add_validator_to_pool( ); let rent = banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let current_minimum_delegation = stake_pool_get_minimum_delegation(banks_client, payer, recent_blockhash).await; @@ -2380,7 +2380,7 @@ pub async fn get_validator_list_sum( .map(|info| info.stake_lamports().unwrap()) .sum(); let rent = banks_client.get_rent().await.unwrap(); - let rent = rent.minimum_balance(std::mem::size_of::()); + let rent = rent.minimum_balance(std::mem::size_of::()); validator_sum + reserve_stake.lamports - rent - MINIMUM_RESERVE_LAMPORTS } @@ -2451,8 +2451,13 @@ pub fn add_validator_stake_account( credits_observed: 0, }; - let mut data = vec![0u8; std::mem::size_of::()]; - let stake_data = bincode::serialize(&stake::state::StakeState::Stake(meta, stake)).unwrap(); + let mut data = vec![0u8; std::mem::size_of::()]; + let stake_data = bincode::serialize(&stake::state::StakeStateV2::Stake( + meta, + stake, + stake::stake_flags::StakeFlags::empty(), + )) + .unwrap(); data[..stake_data.len()].copy_from_slice(&stake_data); let stake_account = SolanaAccount::create( stake_amount + STAKE_ACCOUNT_RENT_EXEMPTION, @@ -2505,7 +2510,7 @@ pub fn add_reserve_stake_account( }; let reserve_stake_account = SolanaAccount::create( stake_amount + STAKE_ACCOUNT_RENT_EXEMPTION, - bincode::serialize::(&stake::state::StakeState::Initialized( + bincode::serialize::(&stake::state::StakeStateV2::Initialized( meta, )) .unwrap(), diff --git a/stake-pool/program/tests/huge_pool.rs b/stake-pool/program/tests/huge_pool.rs index 1fd94683ffa..ccfa5370b62 100644 --- a/stake-pool/program/tests/huge_pool.rs +++ b/stake-pool/program/tests/huge_pool.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/stake-pool/program/tests/increase.rs b/stake-pool/program/tests/increase.rs index 226123722eb..bd83885e496 100644 --- a/stake-pool/program/tests/increase.rs +++ b/stake-pool/program/tests/increase.rs @@ -1,4 +1,5 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] +#![allow(clippy::items_after_test_module)] #![cfg(feature = "test-sbf")] mod helpers; @@ -55,7 +56,7 @@ async fn setup() -> ( ) .await; let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let _deposit_info = simple_deposit_stake( &mut context.banks_client, @@ -98,7 +99,7 @@ async fn success(use_additional_instruction: bool) { assert!(transient_account.is_none()); let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let increase_amount = reserve_lamports - stake_rent - MINIMUM_RESERVE_LAMPORTS; let error = stake_pool_accounts .increase_validator_stake_either( @@ -122,7 +123,7 @@ async fn success(use_additional_instruction: bool) { ) .await; let reserve_stake_state = - deserialize::(&reserve_stake_account.data).unwrap(); + deserialize::(&reserve_stake_account.data).unwrap(); assert_eq!( pre_reserve_stake_account.lamports - increase_amount - stake_rent, reserve_stake_account.lamports @@ -136,7 +137,7 @@ async fn success(use_additional_instruction: bool) { ) .await; let transient_stake_state = - deserialize::(&transient_stake_account.data).unwrap(); + deserialize::(&transient_stake_account.data).unwrap(); assert_eq!( transient_stake_account.lamports, increase_amount + stake_rent @@ -389,7 +390,7 @@ async fn twice(success: bool, use_additional_first_time: bool, use_additional_se if success { assert!(error.is_none(), "{:?}", error); let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); // no ephemeral account let ephemeral_stake = find_ephemeral_stake_program_address( &id(), @@ -410,7 +411,7 @@ async fn twice(success: bool, use_additional_first_time: bool, use_additional_se ) .await; let reserve_stake_state = - deserialize::(&reserve_stake_account.data).unwrap(); + deserialize::(&reserve_stake_account.data).unwrap(); assert_eq!( pre_reserve_stake_account.lamports - total_increase - stake_rent * 2, reserve_stake_account.lamports @@ -424,7 +425,7 @@ async fn twice(success: bool, use_additional_first_time: bool, use_additional_se ) .await; let transient_stake_state = - deserialize::(&transient_stake_account.data).unwrap(); + deserialize::(&transient_stake_account.data).unwrap(); assert_eq!( transient_stake_account.lamports, total_increase + stake_rent * 2 @@ -532,7 +533,7 @@ async fn fail_additional_with_decreasing() { ) .await; let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); // warp forward to activation let first_normal_slot = context.genesis_config().epoch_schedule.first_normal_slot; @@ -586,7 +587,7 @@ async fn fail_additional_with_decreasing() { error, TransactionError::InstructionError( 0, - InstructionError::Custom(StakePoolError::WrongStakeState as u32) + InstructionError::Custom(StakePoolError::WrongStakeStake as u32) ) ); } diff --git a/stake-pool/program/tests/initialize.rs b/stake-pool/program/tests/initialize.rs index 5d0baba6716..109d52737bc 100644 --- a/stake-pool/program/tests/initialize.rs +++ b/stake-pool/program/tests/initialize.rs @@ -1,4 +1,5 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] +#![allow(clippy::items_after_test_module)] #![cfg(feature = "test-sbf")] mod helpers; @@ -1412,7 +1413,7 @@ async fn fail_with_bad_reserve() { error, TransactionError::InstructionError( 2, - InstructionError::Custom(error::StakePoolError::WrongStakeState as u32), + InstructionError::Custom(error::StakePoolError::WrongStakeStake as u32), ) ); } @@ -1464,7 +1465,7 @@ async fn fail_with_bad_reserve() { error, TransactionError::InstructionError( 2, - InstructionError::Custom(error::StakePoolError::WrongStakeState as u32), + InstructionError::Custom(error::StakePoolError::WrongStakeStake as u32), ) ); } @@ -1519,7 +1520,7 @@ async fn fail_with_bad_reserve() { error, TransactionError::InstructionError( 2, - InstructionError::Custom(error::StakePoolError::WrongStakeState as u32), + InstructionError::Custom(error::StakePoolError::WrongStakeStake as u32), ) ); } @@ -1527,7 +1528,7 @@ async fn fail_with_bad_reserve() { { let bad_stake = Keypair::new(); let rent = banks_client.get_rent().await.unwrap(); - let lamports = rent.minimum_balance(std::mem::size_of::()) + let lamports = rent.minimum_balance(std::mem::size_of::()) + MINIMUM_RESERVE_LAMPORTS; let transaction = Transaction::new_signed_with_payer( @@ -1535,7 +1536,7 @@ async fn fail_with_bad_reserve() { &payer.pubkey(), &bad_stake.pubkey(), lamports, - std::mem::size_of::() as u64, + std::mem::size_of::() as u64, &stake::program::id(), )], Some(&payer.pubkey()), @@ -1575,7 +1576,7 @@ async fn fail_with_bad_reserve() { error, TransactionError::InstructionError( 2, - InstructionError::Custom(error::StakePoolError::WrongStakeState as u32), + InstructionError::Custom(error::StakePoolError::WrongStakeStake as u32), ) ); } diff --git a/stake-pool/program/tests/redelegate.rs b/stake-pool/program/tests/redelegate.rs index 0fc70db6f99..47dc08a438a 100644 --- a/stake-pool/program/tests/redelegate.rs +++ b/stake-pool/program/tests/redelegate.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; @@ -34,7 +34,7 @@ async fn setup( ) { let mut context = program_test().start_with_context().await; let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let current_minimum_delegation = stake_pool_get_minimum_delegation( &mut context.banks_client, &context.payer, @@ -185,7 +185,7 @@ async fn success() { ) .await; let validator_stake_state = - deserialize::(&validator_stake_account.data).unwrap(); + deserialize::(&validator_stake_account.data).unwrap(); assert_eq!( pre_validator_stake_account.lamports - redelegate_lamports, validator_stake_account.lamports @@ -200,7 +200,7 @@ async fn success() { // Check source transient stake account state and balance let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let source_transient_stake_account = get_account( &mut context.banks_client, @@ -208,7 +208,7 @@ async fn success() { ) .await; let transient_stake_state = - deserialize::(&source_transient_stake_account.data).unwrap(); + deserialize::(&source_transient_stake_account.data).unwrap(); assert_eq!(source_transient_stake_account.lamports, stake_rent); let transient_delegation = transient_stake_state.delegation().unwrap(); assert_ne!(transient_delegation.deactivation_epoch, Epoch::MAX); @@ -244,7 +244,8 @@ async fn success() { ) .await; let transient_stake_state = - deserialize::(&destination_transient_stake_account.data).unwrap(); + deserialize::(&destination_transient_stake_account.data) + .unwrap(); assert_eq!( destination_transient_stake_account.lamports, redelegate_lamports @@ -386,7 +387,7 @@ async fn success_with_increasing_stake() { ) .await; let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let error = stake_pool_accounts .increase_validator_stake( @@ -499,7 +500,8 @@ async fn success_with_increasing_stake() { ) .await; let transient_stake_state = - deserialize::(&destination_transient_stake_account.data).unwrap(); + deserialize::(&destination_transient_stake_account.data) + .unwrap(); assert_eq!( destination_transient_stake_account.lamports, redelegate_lamports + current_minimum_delegation + stake_rent @@ -615,7 +617,7 @@ async fn fail_with_decreasing_stake() { ) .await; let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let minimum_decrease_lamports = current_minimum_delegation + stake_rent; simple_deposit_stake( @@ -695,7 +697,7 @@ async fn fail_with_decreasing_stake() { error, TransactionError::InstructionError( 0, - InstructionError::Custom(StakePoolError::WrongStakeState as u32) + InstructionError::Custom(StakePoolError::WrongStakeStake as u32) ) ); } diff --git a/stake-pool/program/tests/set_deposit_fee.rs b/stake-pool/program/tests/set_deposit_fee.rs index b8cbd286657..6cd6f63decf 100644 --- a/stake-pool/program/tests/set_deposit_fee.rs +++ b/stake-pool/program/tests/set_deposit_fee.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/stake-pool/program/tests/set_epoch_fee.rs b/stake-pool/program/tests/set_epoch_fee.rs index ccdb6b8d06b..db3b039ae99 100644 --- a/stake-pool/program/tests/set_epoch_fee.rs +++ b/stake-pool/program/tests/set_epoch_fee.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/stake-pool/program/tests/set_funding_authority.rs b/stake-pool/program/tests/set_funding_authority.rs index 6e091562cae..e8729691bf3 100644 --- a/stake-pool/program/tests/set_funding_authority.rs +++ b/stake-pool/program/tests/set_funding_authority.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/stake-pool/program/tests/set_manager.rs b/stake-pool/program/tests/set_manager.rs index 0e3416e098d..e0163e84202 100644 --- a/stake-pool/program/tests/set_manager.rs +++ b/stake-pool/program/tests/set_manager.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/stake-pool/program/tests/set_preferred.rs b/stake-pool/program/tests/set_preferred.rs index fffd9bc26b1..13a93ace967 100644 --- a/stake-pool/program/tests/set_preferred.rs +++ b/stake-pool/program/tests/set_preferred.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/stake-pool/program/tests/set_referral_fee.rs b/stake-pool/program/tests/set_referral_fee.rs index 93c225602e6..45d3ced9167 100644 --- a/stake-pool/program/tests/set_referral_fee.rs +++ b/stake-pool/program/tests/set_referral_fee.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/stake-pool/program/tests/set_staker.rs b/stake-pool/program/tests/set_staker.rs index f2a72fe3e6e..30d3d4919cf 100644 --- a/stake-pool/program/tests/set_staker.rs +++ b/stake-pool/program/tests/set_staker.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/stake-pool/program/tests/set_withdrawal_fee.rs b/stake-pool/program/tests/set_withdrawal_fee.rs index 1d5106362cc..5c548b0adc9 100644 --- a/stake-pool/program/tests/set_withdrawal_fee.rs +++ b/stake-pool/program/tests/set_withdrawal_fee.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/stake-pool/program/tests/update_pool_token_metadata.rs b/stake-pool/program/tests/update_pool_token_metadata.rs index cfa5a3b989f..efe30a963dd 100644 --- a/stake-pool/program/tests/update_pool_token_metadata.rs +++ b/stake-pool/program/tests/update_pool_token_metadata.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/stake-pool/program/tests/update_stake_pool_balance.rs b/stake-pool/program/tests/update_stake_pool_balance.rs index 77612bf2c60..50f9c3ee618 100644 --- a/stake-pool/program/tests/update_stake_pool_balance.rs +++ b/stake-pool/program/tests/update_stake_pool_balance.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; @@ -42,7 +42,7 @@ async fn setup( .unwrap(); let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let current_minimum_delegation = stake_pool_get_minimum_delegation( &mut context.banks_client, &context.payer, diff --git a/stake-pool/program/tests/update_validator_list_balance.rs b/stake-pool/program/tests/update_validator_list_balance.rs index 831ad30d483..bfc6b7e0ef2 100644 --- a/stake-pool/program/tests/update_validator_list_balance.rs +++ b/stake-pool/program/tests/update_validator_list_balance.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; @@ -7,7 +7,7 @@ use { helpers::*, solana_program::{borsh0_10::try_from_slice_unchecked, program_pack::Pack, pubkey::Pubkey}, solana_program_test::*, - solana_sdk::{hash::Hash, signature::Signer, stake::state::StakeState}, + solana_sdk::{hash::Hash, signature::Signer, stake::state::StakeStateV2}, spl_stake_pool::{ state::{StakePool, StakeStatus, ValidatorList}, MAX_VALIDATORS_TO_UPDATE, MINIMUM_RESERVE_LAMPORTS, @@ -183,7 +183,7 @@ async fn success_with_normal() { // Check current balance in the list let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let stake_pool_info = get_account( &mut context.banks_client, &stake_pool_accounts.stake_pool.pubkey(), @@ -395,7 +395,7 @@ async fn merge_into_validator_stake() { .await; // Increase stake to all validators - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let current_minimum_delegation = stake_pool_get_minimum_delegation( &mut context.banks_client, &context.payer, @@ -544,7 +544,7 @@ async fn merge_transient_stake_after_remove() { ) = setup(1).await; let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let current_minimum_delegation = stake_pool_get_minimum_delegation( &mut context.banks_client, &context.payer, diff --git a/stake-pool/program/tests/update_validator_list_balance_hijack.rs b/stake-pool/program/tests/update_validator_list_balance_hijack.rs index feb05248c94..ad444b20e2b 100644 --- a/stake-pool/program/tests/update_validator_list_balance_hijack.rs +++ b/stake-pool/program/tests/update_validator_list_balance_hijack.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; @@ -11,7 +11,7 @@ use { hash::Hash, instruction::InstructionError, signature::Signer, - stake::state::{Authorized, Lockup, StakeState}, + stake::state::{Authorized, Lockup, StakeStateV2}, system_instruction, transaction::{Transaction, TransactionError}, }, @@ -206,7 +206,7 @@ async fn check_ignored_hijacked_transient_stake( ) = setup(num_validators).await; let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let pre_lamports = get_validator_list_sum( &mut context.banks_client, @@ -372,7 +372,7 @@ async fn check_ignored_hijacked_validator_stake( ) = setup(num_validators).await; let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let pre_lamports = get_validator_list_sum( &mut context.banks_client, diff --git a/stake-pool/program/tests/vsa_add.rs b/stake-pool/program/tests/vsa_add.rs index 36eb049049d..e32a762309d 100644 --- a/stake-pool/program/tests/vsa_add.rs +++ b/stake-pool/program/tests/vsa_add.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; @@ -37,7 +37,7 @@ async fn setup( ) { let (mut banks_client, payer, recent_blockhash) = program_test().start().await; let rent = banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let current_minimum_delegation = stake_pool_get_minimum_delegation(&mut banks_client, &payer, &recent_blockhash).await; let minimum_for_validator = stake_rent + current_minimum_delegation; @@ -99,7 +99,7 @@ async fn success() { let validator_list = try_from_slice_unchecked::(validator_list.data.as_slice()).unwrap(); let rent = banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let current_minimum_delegation = stake_pool_get_minimum_delegation(&mut banks_client, &payer, &recent_blockhash).await; assert_eq!( @@ -128,9 +128,9 @@ async fn success() { // Check stake account existence and authority let stake = get_account(&mut banks_client, &validator_stake.stake_account).await; - let stake_state = deserialize::(&stake.data).unwrap(); + let stake_state = deserialize::(&stake.data).unwrap(); match stake_state { - stake::state::StakeState::Stake(meta, _) => { + stake::state::StakeStateV2::Stake(meta, _, _) => { assert_eq!( &meta.authorized.staker, &stake_pool_accounts.withdraw_authority @@ -434,7 +434,7 @@ async fn fail_with_wrong_system_program_id() { async fn fail_add_too_many_validator_stake_accounts() { let (mut banks_client, payer, recent_blockhash) = program_test().start().await; let rent = banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let current_minimum_delegation = stake_pool_get_minimum_delegation(&mut banks_client, &payer, &recent_blockhash).await; let minimum_for_validator = stake_rent + current_minimum_delegation; @@ -597,9 +597,9 @@ async fn success_with_lamports_in_account() { // Check stake account existence and authority let stake = get_account(&mut banks_client, &validator_stake.stake_account).await; - let stake_state = deserialize::(&stake.data).unwrap(); + let stake_state = deserialize::(&stake.data).unwrap(); match stake_state { - stake::state::StakeState::Stake(meta, _) => { + stake::state::StakeStateV2::Stake(meta, _, _) => { assert_eq!( &meta.authorized.staker, &stake_pool_accounts.withdraw_authority diff --git a/stake-pool/program/tests/vsa_remove.rs b/stake-pool/program/tests/vsa_remove.rs index 80e87851f7c..febada59196 100644 --- a/stake-pool/program/tests/vsa_remove.rs +++ b/stake-pool/program/tests/vsa_remove.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; @@ -425,7 +425,7 @@ async fn success_with_activating_transient_stake() { &validator_stake.transient_stake_account, ) .await; - let stake_state = deserialize::(&stake.data).unwrap(); + let stake_state = deserialize::(&stake.data).unwrap(); assert_ne!( stake_state.stake().unwrap().delegation.deactivation_epoch, u64::MAX @@ -437,7 +437,7 @@ async fn success_with_deactivating_transient_stake() { let (mut context, stake_pool_accounts, validator_stake) = setup().await; let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let current_minimum_delegation = stake_pool_get_minimum_delegation( &mut context.banks_client, &context.payer, @@ -667,7 +667,7 @@ async fn success_resets_preferred_validator() { async fn success_with_hijacked_transient_account() { let (mut context, stake_pool_accounts, validator_stake) = setup().await; let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let current_minimum_delegation = stake_pool_get_minimum_delegation( &mut context.banks_client, &context.payer, diff --git a/stake-pool/program/tests/withdraw.rs b/stake-pool/program/tests/withdraw.rs index 1baddb17199..c0154cbd311 100644 --- a/stake-pool/program/tests/withdraw.rs +++ b/stake-pool/program/tests/withdraw.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/stake-pool/program/tests/withdraw_edge_cases.rs b/stake-pool/program/tests/withdraw_edge_cases.rs index a2d1fd6c117..4af70cba498 100644 --- a/stake-pool/program/tests/withdraw_edge_cases.rs +++ b/stake-pool/program/tests/withdraw_edge_cases.rs @@ -1,4 +1,5 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] +#![allow(clippy::items_after_test_module)] #![cfg(feature = "test-sbf")] mod helpers; @@ -123,7 +124,7 @@ async fn success_remove_validator(multiple: u64) { .await; let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let stake_pool = stake_pool_accounts .get_stake_pool(&mut context.banks_client) .await; @@ -312,7 +313,7 @@ async fn success_with_reserve() { ) = setup_for_withdraw(spl_token::id(), STAKE_ACCOUNT_RENT_EXEMPTION).await; let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); // decrease all of stake let error = stake_pool_accounts @@ -400,7 +401,8 @@ async fn success_with_reserve() { &stake_pool_accounts.reserve_stake.pubkey(), ) .await; - let stake_state = deserialize::(&reserve_stake_account.data).unwrap(); + let stake_state = + deserialize::(&reserve_stake_account.data).unwrap(); let meta = stake_state.meta().unwrap(); assert_eq!( meta.rent_exempt_reserve + withdrawal_fee + deposit_fee + stake_rent, @@ -606,7 +608,7 @@ async fn fail_withdraw_from_transient() { .unwrap(); let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); // decrease to minimum stake + 2 lamports let error = stake_pool_accounts @@ -688,7 +690,7 @@ async fn success_withdraw_from_transient() { .await; let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let last_blockhash = context .banks_client @@ -794,7 +796,7 @@ async fn success_with_small_preferred_withdraw() { // add a tiny bit of stake, less than lamports per pool token to preferred validator let rent = context.banks_client.get_rent().await.unwrap(); - let rent_exempt = rent.minimum_balance(std::mem::size_of::()); + let rent_exempt = rent.minimum_balance(std::mem::size_of::()); let stake_minimum_delegation = stake_get_minimum_delegation(&mut context.banks_client, &context.payer, &last_blockhash) .await; diff --git a/stake-pool/program/tests/withdraw_sol.rs b/stake-pool/program/tests/withdraw_sol.rs index 75c6594fb98..67b60a7a221 100644 --- a/stake-pool/program/tests/withdraw_sol.rs +++ b/stake-pool/program/tests/withdraw_sol.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; @@ -199,7 +199,7 @@ async fn fail_overdraw_reserve() { .await; let rent = context.banks_client.get_rent().await.unwrap(); - let stake_rent = rent.minimum_balance(std::mem::size_of::()); + let stake_rent = rent.minimum_balance(std::mem::size_of::()); let error = stake_pool_accounts .increase_validator_stake( &mut context.banks_client, diff --git a/stake-pool/program/tests/withdraw_with_fee.rs b/stake-pool/program/tests/withdraw_with_fee.rs index 34c28b92c0f..b55283fbd1a 100644 --- a/stake-pool/program/tests/withdraw_with_fee.rs +++ b/stake-pool/program/tests/withdraw_with_fee.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; @@ -176,7 +176,7 @@ async fn success_empty_out_stake_with_fee() { ) .await; let stake_state = - deserialize::(&validator_stake_account.data).unwrap(); + deserialize::(&validator_stake_account.data).unwrap(); let meta = stake_state.meta().unwrap(); let stake_minimum_delegation = stake_get_minimum_delegation(&mut context.banks_client, &context.payer, &last_blockhash) @@ -226,7 +226,7 @@ async fn success_empty_out_stake_with_fee() { ) .await; let stake_state = - deserialize::(&validator_stake_account.data).unwrap(); + deserialize::(&validator_stake_account.data).unwrap(); let meta = stake_state.meta().unwrap(); assert_eq!( validator_stake_account.lamports, diff --git a/stake-pool/py/stake/state.py b/stake-pool/py/stake/state.py index 9ff48d34aec..8d8ac81f128 100644 --- a/stake-pool/py/stake/state.py +++ b/stake-pool/py/stake/state.py @@ -48,7 +48,7 @@ class StakeAuthorize(IntEnum): WITHDRAWER = 1 -class StakeStateType(IntEnum): +class StakeStakeType(IntEnum): """Stake State Types.""" UNINITIALIZED = 0 INITIALIZED = 1 @@ -56,8 +56,8 @@ class StakeStateType(IntEnum): REWARDS_POOL = 3 -class StakeState(NamedTuple): - state_type: StakeStateType +class StakeStake(NamedTuple): + state_type: StakeStakeType state: Container """Stake state.""" @@ -65,7 +65,7 @@ class StakeState(NamedTuple): def decode(cls, data: str, encoding: str): data_bytes = decode_byte_string(data, encoding) parsed = STAKE_STATE_LAYOUT.parse(data_bytes) - return StakeState( + return StakeStake( state_type=parsed['state_type'], state=parsed['state'], ) @@ -122,9 +122,9 @@ def decode(cls, data: str, encoding: str): # Switch( # lambda this: this.state, # { - # StakeStateType.UNINITIALIZED: Pass, - # StakeStateType.INITIALIZED: META_LAYOUT, - # StakeStateType.STAKE: STAKE_AND_META_LAYOUT, + # StakeStakeType.UNINITIALIZED: Pass, + # StakeStakeType.INITIALIZED: META_LAYOUT, + # StakeStakeType.STAKE: STAKE_AND_META_LAYOUT, # } # ), # diff --git a/stake-pool/py/tests/test_deposit_withdraw_stake.py b/stake-pool/py/tests/test_deposit_withdraw_stake.py index 1580db246a2..890fb9d1f4d 100644 --- a/stake-pool/py/tests/test_deposit_withdraw_stake.py +++ b/stake-pool/py/tests/test_deposit_withdraw_stake.py @@ -5,7 +5,7 @@ from stake.actions import create_stake, delegate_stake from stake.constants import STAKE_LEN -from stake.state import StakeState +from stake.state import StakeStake from stake_pool.actions import deposit_stake, withdraw_stake, update_stake_pool from stake_pool.constants import MINIMUM_ACTIVE_STAKE from stake_pool.state import StakePool @@ -25,7 +25,7 @@ async def test_deposit_withdraw_stake(async_client, validators, payer, stake_poo await delegate_stake(async_client, payer, payer, stake, validator) resp = await async_client.get_account_info(stake, commitment=Confirmed) data = resp['result']['value']['data'] - stake_state = StakeState.decode(data[0], data[1]) + stake_state = StakeStake.decode(data[0], data[1]) token_account = get_associated_token_address(payer.public_key, stake_pool.pool_mint) pre_pool_token_balance = await async_client.get_token_account_balance(token_account, Confirmed) pre_pool_token_balance = int(pre_pool_token_balance['result']['value']['amount']) diff --git a/stateless-asks/program/Cargo.toml b/stateless-asks/program/Cargo.toml index b9bc66f530b..f7104df519c 100644 --- a/stateless-asks/program/Cargo.toml +++ b/stateless-asks/program/Cargo.toml @@ -12,14 +12,14 @@ test-sbf = [] [dependencies] borsh = "0.10" -solana-program = "1.16.16" +solana-program = "1.17.2" spl-token = { version = "4.0", path = "../../token/program", features = ["no-entrypoint"] } spl-associated-token-account = {version = "2.0", path = "../../associated-token-account/program", features = ["no-entrypoint"]} thiserror = "1.0" [dev-dependencies] -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" [lib] crate-type = ["cdylib", "lib"] diff --git a/token-group/interface/Cargo.toml b/token-group/interface/Cargo.toml index b748beab31b..7f5b1676334 100644 --- a/token-group/interface/Cargo.toml +++ b/token-group/interface/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" [dependencies] bytemuck = "1.14.0" -solana-program = "1.16.16" +solana-program = "1.17.2" spl-discriminator = { version = "0.1.0" , path = "../../libraries/discriminator" } spl-pod = { version = "0.1.0" , path = "../../libraries/pod", features = ["borsh"] } spl-program-error = { version = "0.3.0" , path = "../../libraries/program-error" } diff --git a/token-lending/cli/Cargo.toml b/token-lending/cli/Cargo.toml index 4a6df8dbacd..147859a00e7 100644 --- a/token-lending/cli/Cargo.toml +++ b/token-lending/cli/Cargo.toml @@ -10,12 +10,12 @@ version = "0.2.0" [dependencies] clap = "2.33.3" -solana-clap-utils = "=1.16.16" -solana-cli-config = "=1.16.16" -solana-client = "=1.16.16" -solana-logger = "=1.16.16" -solana-sdk = "=1.16.16" -solana-program = "=1.16.16" +solana-clap-utils = "=1.17.2" +solana-cli-config = "=1.17.2" +solana-client = "=1.17.2" +solana-logger = "=1.17.2" +solana-sdk = "=1.17.2" +solana-program = "=1.17.2" spl-token-lending = { version = "0.2", path="../program", features = [ "no-entrypoint" ] } spl-token = { version = "4.0", path="../../token/program", features = [ "no-entrypoint" ] } diff --git a/token-lending/cli/src/main.rs b/token-lending/cli/src/main.rs index ea7339519a1..3ba1eb293a6 100644 --- a/token-lending/cli/src/main.rs +++ b/token-lending/cli/src/main.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] use { clap::{ crate_description, crate_name, crate_version, value_t, App, AppSettings, Arg, ArgMatches, diff --git a/token-lending/flash_loan_receiver/Cargo.toml b/token-lending/flash_loan_receiver/Cargo.toml index c9d37ac61c5..bb0429c5a9f 100644 --- a/token-lending/flash_loan_receiver/Cargo.toml +++ b/token-lending/flash_loan_receiver/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" [dependencies] arrayref = "0.3.7" -solana-program = "1.16.16" +solana-program = "1.17.2" spl-token = { version = "4.0", path = "../../token/program", features=["no-entrypoint"] } [lib] diff --git a/token-lending/program/Cargo.toml b/token-lending/program/Cargo.toml index 3d49bb99fb1..7e7d9f36ff0 100644 --- a/token-lending/program/Cargo.toml +++ b/token-lending/program/Cargo.toml @@ -16,7 +16,7 @@ arrayref = "0.3.7" bytemuck = "1.14.0" num-derive = "0.4" num-traits = "0.2" -solana-program = "1.16.16" +solana-program = "1.17.2" spl-token = { version = "4.0", path = "../../token/program", features = [ "no-entrypoint" ] } thiserror = "1.0" uint = "0.9" @@ -24,8 +24,8 @@ uint = "0.9" [dev-dependencies] assert_matches = "1.5.0" proptest = "1.3" -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" [lib] crate-type = ["cdylib", "lib"] diff --git a/token-lending/program/src/lib.rs b/token-lending/program/src/lib.rs index 133205fb5d9..55de39ea7b3 100644 --- a/token-lending/program/src/lib.rs +++ b/token-lending/program/src/lib.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![deny(missing_docs)] //! A lending program for the Solana blockchain. diff --git a/token-lending/program/tests/borrow_obligation_liquidity.rs b/token-lending/program/tests/borrow_obligation_liquidity.rs index 139f1834950..410d68926c0 100644 --- a/token-lending/program/tests/borrow_obligation_liquidity.rs +++ b/token-lending/program/tests/borrow_obligation_liquidity.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/token-lending/program/tests/deposit_obligation_collateral.rs b/token-lending/program/tests/deposit_obligation_collateral.rs index de125b5d5e6..0e44cb6bb55 100644 --- a/token-lending/program/tests/deposit_obligation_collateral.rs +++ b/token-lending/program/tests/deposit_obligation_collateral.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/token-lending/program/tests/deposit_reserve_liquidity.rs b/token-lending/program/tests/deposit_reserve_liquidity.rs index 1b7be4236d9..828a54ba816 100644 --- a/token-lending/program/tests/deposit_reserve_liquidity.rs +++ b/token-lending/program/tests/deposit_reserve_liquidity.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/token-lending/program/tests/flash_loan.rs b/token-lending/program/tests/flash_loan.rs index 8ab300ddcd9..0c59c948363 100644 --- a/token-lending/program/tests/flash_loan.rs +++ b/token-lending/program/tests/flash_loan.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/token-lending/program/tests/helpers/mod.rs b/token-lending/program/tests/helpers/mod.rs index 06da8328a73..baea93c9221 100644 --- a/token-lending/program/tests/helpers/mod.rs +++ b/token-lending/program/tests/helpers/mod.rs @@ -46,9 +46,9 @@ pub const TEST_RESERVE_CONFIG: ReserveConfig = ReserveConfig { optimal_borrow_rate: 4, max_borrow_rate: 30, fees: ReserveFees { - /// 0.00001% (Aave borrow fee) + // 0.00001% (Aave borrow fee) borrow_fee_wad: 100_000_000_000, - /// 0.3% (Aave flash loan fee) + // 0.3% (Aave flash loan fee) flash_loan_fee_wad: 3_000_000_000_000_000, host_fee_percentage: 20, }, @@ -1110,7 +1110,7 @@ pub fn add_oracle( panic!("Unable to locate {}", filename); })); - let mut pyth_price = pyth::load_mut::(pyth_price_data.as_mut_slice()).unwrap(); + let pyth_price = pyth::load_mut::(pyth_price_data.as_mut_slice()).unwrap(); let decimals = 10u64 .checked_pow(pyth_price.expo.checked_abs().unwrap().try_into().unwrap()) diff --git a/token-lending/program/tests/init_lending_market.rs b/token-lending/program/tests/init_lending_market.rs index f02610e7079..659ce8ff7c6 100644 --- a/token-lending/program/tests/init_lending_market.rs +++ b/token-lending/program/tests/init_lending_market.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/token-lending/program/tests/init_obligation.rs b/token-lending/program/tests/init_obligation.rs index 26b4e13255d..365395b8004 100644 --- a/token-lending/program/tests/init_obligation.rs +++ b/token-lending/program/tests/init_obligation.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/token-lending/program/tests/init_reserve.rs b/token-lending/program/tests/init_reserve.rs index 16c752fa4b2..ff81ba77b2b 100644 --- a/token-lending/program/tests/init_reserve.rs +++ b/token-lending/program/tests/init_reserve.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/token-lending/program/tests/liquidate_obligation.rs b/token-lending/program/tests/liquidate_obligation.rs index 457573f8bf4..82c79f86321 100644 --- a/token-lending/program/tests/liquidate_obligation.rs +++ b/token-lending/program/tests/liquidate_obligation.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/token-lending/program/tests/modify_reserve_config.rs b/token-lending/program/tests/modify_reserve_config.rs index ea79255ea00..4386baf1dac 100644 --- a/token-lending/program/tests/modify_reserve_config.rs +++ b/token-lending/program/tests/modify_reserve_config.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/token-lending/program/tests/obligation_end_to_end.rs b/token-lending/program/tests/obligation_end_to_end.rs index 468c569a0f6..badb9450378 100644 --- a/token-lending/program/tests/obligation_end_to_end.rs +++ b/token-lending/program/tests/obligation_end_to_end.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/token-lending/program/tests/redeem_reserve_collateral.rs b/token-lending/program/tests/redeem_reserve_collateral.rs index 0ea0979d956..a72cacd4e84 100644 --- a/token-lending/program/tests/redeem_reserve_collateral.rs +++ b/token-lending/program/tests/redeem_reserve_collateral.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/token-lending/program/tests/refresh_obligation.rs b/token-lending/program/tests/refresh_obligation.rs index 3af9d4f6681..cb2b20cf7e7 100644 --- a/token-lending/program/tests/refresh_obligation.rs +++ b/token-lending/program/tests/refresh_obligation.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/token-lending/program/tests/refresh_reserve.rs b/token-lending/program/tests/refresh_reserve.rs index 23e57d593b8..0b73943188c 100644 --- a/token-lending/program/tests/refresh_reserve.rs +++ b/token-lending/program/tests/refresh_reserve.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/token-lending/program/tests/repay_obligation_liquidity.rs b/token-lending/program/tests/repay_obligation_liquidity.rs index 5a55b285570..1fe9e6275b2 100644 --- a/token-lending/program/tests/repay_obligation_liquidity.rs +++ b/token-lending/program/tests/repay_obligation_liquidity.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/token-lending/program/tests/set_lending_market_owner.rs b/token-lending/program/tests/set_lending_market_owner.rs index e5bb9b6efd9..40315b85d90 100644 --- a/token-lending/program/tests/set_lending_market_owner.rs +++ b/token-lending/program/tests/set_lending_market_owner.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/token-lending/program/tests/withdraw_obligation_collateral.rs b/token-lending/program/tests/withdraw_obligation_collateral.rs index 227737e906c..1e68b5d80e1 100644 --- a/token-lending/program/tests/withdraw_obligation_collateral.rs +++ b/token-lending/program/tests/withdraw_obligation_collateral.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![cfg(feature = "test-sbf")] mod helpers; diff --git a/token-metadata/example/Cargo.toml b/token-metadata/example/Cargo.toml index 8fa6434d099..429eb40ac34 100644 --- a/token-metadata/example/Cargo.toml +++ b/token-metadata/example/Cargo.toml @@ -12,15 +12,15 @@ no-entrypoint = [] test-sbf = [] [dependencies] -solana-program = "1.16.16" -spl-token-2022 = { version = "0.9", path = "../../token/program-2022" } +solana-program = "1.17.2" +spl-token-2022 = { version = "0.9", path = "../../token/program-2022", features = ["no-entrypoint"] } spl-token-metadata-interface = { version = "0.2.0", path = "../interface" } spl-type-length-value = { version = "0.3.0" , path = "../../libraries/type-length-value" } spl-pod = { version = "0.1.0", path = "../../libraries/pod" } [dev-dependencies] -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" spl-token-client = { version = "0.7", path = "../../token/client" } test-case = "3.2" diff --git a/token-metadata/example/src/lib.rs b/token-metadata/example/src/lib.rs index e0271444f96..db86409dad6 100644 --- a/token-metadata/example/src/lib.rs +++ b/token-metadata/example/src/lib.rs @@ -1,6 +1,6 @@ //! Crate defining an example program for storing SPL token metadata -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![deny(missing_docs)] #![cfg_attr(not(test), forbid(unsafe_code))] diff --git a/token-metadata/example/tests/update_field.rs b/token-metadata/example/tests/update_field.rs index e2454df9d52..d44356df91b 100644 --- a/token-metadata/example/tests/update_field.rs +++ b/token-metadata/example/tests/update_field.rs @@ -1,4 +1,5 @@ #![cfg(feature = "test-sbf")] +#![allow(clippy::items_after_test_module)] mod program_test; use { diff --git a/token-metadata/interface/Cargo.toml b/token-metadata/interface/Cargo.toml index dc3475b7137..d389ea902e5 100644 --- a/token-metadata/interface/Cargo.toml +++ b/token-metadata/interface/Cargo.toml @@ -13,7 +13,7 @@ serde-traits = ["dep:serde", "spl-pod/serde-traits"] [dependencies] borsh = "0.10" serde = { version = "1.0.189", optional = true } -solana-program = "1.16.16" +solana-program = "1.17.2" spl-discriminator = { version = "0.1" , path = "../../libraries/discriminator" } spl-program-error = { version = "0.3" , path = "../../libraries/program-error" } spl-type-length-value = { version = "0.3", path = "../../libraries/type-length-value" } diff --git a/token-metadata/interface/src/lib.rs b/token-metadata/interface/src/lib.rs index b668ba03074..5f1ec043e13 100644 --- a/token-metadata/interface/src/lib.rs +++ b/token-metadata/interface/src/lib.rs @@ -1,6 +1,6 @@ //! Crate defining an interface for token-metadata -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![deny(missing_docs)] #![cfg_attr(not(test), forbid(unsafe_code))] diff --git a/token-swap/program/Cargo.toml b/token-swap/program/Cargo.toml index a3681b2fe8b..138e861ebba 100644 --- a/token-swap/program/Cargo.toml +++ b/token-swap/program/Cargo.toml @@ -17,7 +17,7 @@ arrayref = "0.3.7" enum_dispatch = "0.3.12" num-derive = "0.4" num-traits = "0.2" -solana-program = "1.16.16" +solana-program = "1.17.2" spl-math = { version = "0.2", path = "../../libraries/math", features = [ "no-entrypoint" ] } spl-token = { version = "4.0", path = "../../token/program", features = [ "no-entrypoint" ] } spl-token-2022 = { version = "0.9", path = "../../token/program-2022", features = [ "no-entrypoint" ] } @@ -28,7 +28,7 @@ roots = { version = "0.0.8", optional = true } [dev-dependencies] proptest = "1.3" roots = "0.0.8" -solana-sdk = "1.16.16" +solana-sdk = "1.17.2" test-case = "3.2" [lib] diff --git a/token-swap/program/fuzz/Cargo.toml b/token-swap/program/fuzz/Cargo.toml index f54592c5658..eb1c90f9029 100644 --- a/token-swap/program/fuzz/Cargo.toml +++ b/token-swap/program/fuzz/Cargo.toml @@ -11,7 +11,7 @@ publish = false [dependencies] honggfuzz = { version = "0.5.55" } arbitrary = { version = "1.3", features = ["derive"] } -solana-program = "1.16.16" +solana-program = "1.17.2" spl-math = { version = "0.2", path = "../../../libraries/math", features = [ "no-entrypoint" ] } spl-token = { version = "4.0", path = "../../../token/program", features = [ "no-entrypoint" ] } spl-token-swap = { path = "..", features = ["fuzz", "no-entrypoint"] } diff --git a/token-swap/program/fuzz/src/instructions.rs b/token-swap/program/fuzz/src/instructions.rs index 4818b0f7daf..62f765fde46 100644 --- a/token-swap/program/fuzz/src/instructions.rs +++ b/token-swap/program/fuzz/src/instructions.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] use { arbitrary::Arbitrary, honggfuzz::fuzz, @@ -390,7 +390,7 @@ fn run_fuzz_instruction( || e == TokenError::InsufficientFunds.into()) { println!("{:?}", e); - Err(e).unwrap() + panic!("{:?}", e) } }) .ok(); diff --git a/token-swap/program/fuzz/src/lib.rs b/token-swap/program/fuzz/src/lib.rs index 88adb764d44..ac2eb1bc88d 100644 --- a/token-swap/program/fuzz/src/lib.rs +++ b/token-swap/program/fuzz/src/lib.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] pub mod native_account_data; pub mod native_processor; pub mod native_token; diff --git a/token-swap/program/src/curve/base.rs b/token-swap/program/src/curve/base.rs index 6dfced9efae..b90585b12c7 100644 --- a/token-swap/program/src/curve/base.rs +++ b/token-swap/program/src/curve/base.rs @@ -382,7 +382,7 @@ mod test { let swap_source_amount: u128 = 1_000; let swap_destination_amount: u128 = 50_000; let source_amount: u128 = 100; - let curve = ConstantProductCurve::default(); + let curve = ConstantProductCurve; let fees = Fees::default(); let swap_curve = SwapCurve { curve_type: CurveType::ConstantProduct, @@ -409,7 +409,7 @@ mod test { pool_supply: u128, fees: Fees, ) -> (u128, u128) { - let curve = ConstantProductCurve::default(); + let curve = ConstantProductCurve; let swap_curve = SwapCurve { curve_type: CurveType::ConstantProduct, calculator: Arc::new(curve), diff --git a/token-swap/program/src/curve/constant_price.rs b/token-swap/program/src/curve/constant_price.rs index e4f1e10fbde..7b66df3058a 100644 --- a/token-swap/program/src/curve/constant_price.rs +++ b/token-swap/program/src/curve/constant_price.rs @@ -569,7 +569,6 @@ mod tests { ) { let curve = ConstantPriceCurve { token_b_price: token_b_price as u64 }; let pool_token_amount = pool_token_amount as u128; - let pool_token_supply = pool_token_supply; let swap_token_a_amount = swap_token_a_amount as u128; let swap_token_b_amount = swap_token_b_amount as u128; let token_b_price = token_b_price as u128; diff --git a/token-swap/program/src/curve/constant_product.rs b/token-swap/program/src/curve/constant_product.rs index 9d88cedad7d..7195119f93a 100644 --- a/token-swap/program/src/curve/constant_product.rs +++ b/token-swap/program/src/curve/constant_product.rs @@ -379,7 +379,7 @@ mod tests { #[test] fn constant_product_swap_rounding() { - let curve = ConstantProductCurve::default(); + let curve = ConstantProductCurve; // much too small assert!(curve diff --git a/token-swap/program/src/lib.rs b/token-swap/program/src/lib.rs index ad0f77ffd45..a8d325c9e6d 100644 --- a/token-swap/program/src/lib.rs +++ b/token-swap/program/src/lib.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![deny(missing_docs)] //! An Uniswap-like program for the Solana blockchain. diff --git a/token-upgrade/cli/Cargo.toml b/token-upgrade/cli/Cargo.toml index 347d9a22fd2..3f326f391b9 100644 --- a/token-upgrade/cli/Cargo.toml +++ b/token-upgrade/cli/Cargo.toml @@ -13,12 +13,12 @@ walkdir = "2" [dependencies] clap = { version = "3", features = ["cargo"] } futures-util = "0.3.28" -solana-clap-v3-utils = "1.16.16" -solana-cli-config = "1.16.16" -solana-client = "1.16.16" -solana-logger = "1.16.16" -solana-remote-wallet = "1.16.16" -solana-sdk = "1.16.16" +solana-clap-v3-utils = "1.17.2" +solana-cli-config = "1.17.2" +solana-client = "1.17.2" +solana-logger = "1.17.2" +solana-remote-wallet = "1.17.2" +solana-sdk = "1.17.2" spl-associated-token-account = { version = "2.0", path = "../../associated-token-account/program", features = ["no-entrypoint"] } spl-token = { version = "4.0", path = "../../token/program", features = ["no-entrypoint"] } spl-token-2022 = { version = "0.9", path = "../../token/program-2022", features = ["no-entrypoint"] } @@ -27,7 +27,7 @@ spl-token-upgrade = { version = "0.1", path = "../program", features = ["no-entr tokio = { version = "1", features = ["full"] } [dev-dependencies] -solana-test-validator = "1.16.16" +solana-test-validator = "1.17.2" [[bin]] name = "spl-token-upgrade" diff --git a/token-upgrade/cli/src/main.rs b/token-upgrade/cli/src/main.rs index 6d52ec714b8..24527f778ba 100644 --- a/token-upgrade/cli/src/main.rs +++ b/token-upgrade/cli/src/main.rs @@ -1,10 +1,8 @@ use { clap::{crate_description, crate_name, crate_version, Arg, Command}, solana_clap_v3_utils::{ - input_parsers::pubkey_of, - input_validators::{ - is_url_or_moniker, is_valid_pubkey, is_valid_signer, normalize_to_url_if_moniker, - }, + input_parsers::{parse_url_or_moniker, pubkey_of}, + input_validators::{is_valid_pubkey, is_valid_signer, normalize_to_url_if_moniker}, keypair::{ signer_from_path, signer_from_path_with_config, DefaultSigner, SignerFromPathConfig, }, @@ -29,7 +27,7 @@ use { token::Token, }, spl_token_upgrade::{get_token_upgrade_authority_address, instruction::exchange}, - std::{error::Error, process::exit, sync::Arc}, + std::{error::Error, process::exit, rc::Rc, sync::Arc}, }; struct Config { @@ -245,7 +243,7 @@ async fn main() -> Result<(), Box> { .value_name("URL") .takes_value(true) .global(true) - .validator(|s| is_url_or_moniker(s)) + .value_parser(parse_url_or_moniker) .help("JSON RPC URL for the cluster [default: value from configuration file]"), ) .subcommand( @@ -344,7 +342,7 @@ async fn main() -> Result<(), Box> { .get_matches(); let (command, matches) = app_matches.subcommand().unwrap(); - let mut wallet_manager: Option> = None; + let mut wallet_manager: Option> = None; let config = { let cli_config = if let Some(config_file) = matches.value_of("config_file") { @@ -363,7 +361,7 @@ async fn main() -> Result<(), Box> { let json_rpc_url = normalize_to_url_if_moniker( matches - .value_of("json_rpc_url") + .get_one::("json_rpc_url") .unwrap_or(&cli_config.json_rpc_url), ); @@ -566,17 +564,15 @@ mod test { .await; let account_keypair = Keypair::new(); - assert!(matches!( - process_create_escrow_account( - &rpc_client, - &payer, - original_token.get_address(), - new_token.get_address(), - Some(&account_keypair) - ) - .await, - Ok(_) - )); + assert!(process_create_escrow_account( + &rpc_client, + &payer, + original_token.get_address(), + new_token.get_address(), + Some(&account_keypair) + ) + .await + .is_ok()); let escrow_authority = get_token_upgrade_authority_address( original_token.get_address(), new_token.get_address(), @@ -589,17 +585,15 @@ mod test { assert_eq!(escrow.base.owner, escrow_authority); assert_eq!(&escrow.base.mint, new_token.get_address()); - assert!(matches!( - process_create_escrow_account( - &rpc_client, - &payer, - original_token.get_address(), - new_token.get_address(), - None - ) - .await, - Ok(_) - )); + assert!(process_create_escrow_account( + &rpc_client, + &payer, + original_token.get_address(), + new_token.get_address(), + None + ) + .await + .is_ok()); let escrow = new_token .get_account_info(&new_token.get_associated_token_address(&escrow_authority)) .await diff --git a/token-upgrade/program/Cargo.toml b/token-upgrade/program/Cargo.toml index 85bb91e70ce..1364a788352 100644 --- a/token-upgrade/program/Cargo.toml +++ b/token-upgrade/program/Cargo.toml @@ -15,13 +15,13 @@ test-sbf = [] num-derive = "0.4" num-traits = "0.2" num_enum = "0.7.0" -solana-program = "1.16.16" +solana-program = "1.17.2" spl-token-2022 = { version = "0.9", path = "../../token/program-2022", features = ["no-entrypoint"] } thiserror = "1.0" [dev-dependencies] -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" spl-token = { version = "4.0", path = "../../token/program", features = ["no-entrypoint"] } spl-token-client = { version = "0.7", path = "../../token/client" } test-case = "3.2" diff --git a/token-wrap/program/Cargo.toml b/token-wrap/program/Cargo.toml index 6d2ff0dc175..97698a42947 100644 --- a/token-wrap/program/Cargo.toml +++ b/token-wrap/program/Cargo.toml @@ -14,7 +14,7 @@ test-sbf = [] [dependencies] bytemuck = { version = "1.14.0", features = ["derive"] } num_enum = "0.7" -solana-program = "1.16.16" +solana-program = "1.17.2" spl-associated-token-account = { version = "2.0", path = "../../associated-token-account/program", features = ["no-entrypoint"] } spl-token = { version = "4.0", path = "../../token/program", features = ["no-entrypoint"] } spl-token-2022 = { version = "0.9", path = "../../token/program-2022", features = ["no-entrypoint"] } diff --git a/token/cli/Cargo.toml b/token/cli/Cargo.toml index 99980515c0b..4d7cf4f95a5 100644 --- a/token/cli/Cargo.toml +++ b/token/cli/Cargo.toml @@ -18,15 +18,15 @@ console = "0.15.7" serde = "1.0.189" serde_derive = "1.0.103" serde_json = "1.0.107" -solana-account-decoder = "=1.16.16" -solana-clap-utils = "=1.16.16" -solana-cli-config = "=1.16.16" -solana-cli-output = "=1.16.16" -solana-client = "=1.16.16" -solana-logger = "=1.16.16" -solana-remote-wallet = "=1.16.16" -solana-sdk = "=1.16.16" -solana-transaction-status = "=1.16.16" +solana-account-decoder = "=1.17.2" +solana-clap-utils = "=1.17.2" +solana-cli-config = "=1.17.2" +solana-cli-output = "=1.17.2" +solana-client = "=1.17.2" +solana-logger = "=1.17.2" +solana-remote-wallet = "=1.17.2" +solana-sdk = "=1.17.2" +solana-transaction-status = "=1.17.2" spl-token = { version = "4.0", path = "../program", features = [ "no-entrypoint", ] } @@ -46,7 +46,7 @@ strum_macros = "0.25" tokio = "1.14" [dev-dependencies] -solana-test-validator = "=1.16.16" +solana-test-validator = "=1.17.2" assert_cmd = "2.0.12" serial_test = "2.0.0" tempfile = "3.8.0" diff --git a/token/cli/src/bench.rs b/token/cli/src/bench.rs index 9c0a83839c8..27cf0a4482c 100644 --- a/token/cli/src/bench.rs +++ b/token/cli/src/bench.rs @@ -21,7 +21,7 @@ use { instruction, state::{Account, Mint}, }, - std::{sync::Arc, time::Instant}, + std::{rc::Rc, sync::Arc, time::Instant}, }; pub(crate) trait BenchSubCommand { @@ -169,7 +169,7 @@ pub(crate) async fn bench_process_command( matches: &ArgMatches<'_>, config: &Config<'_>, mut signers: Vec>, - wallet_manager: &mut Option>, + wallet_manager: &mut Option>, ) -> CommandResult { assert!(!config.sign_only); diff --git a/token/cli/src/config.rs b/token/cli/src/config.rs index e76b0f71b55..e66cbf7719a 100644 --- a/token/cli/src/config.rs +++ b/token/cli/src/config.rs @@ -22,7 +22,7 @@ use spl_token_2022::{ use spl_token_client::client::{ ProgramClient, ProgramOfflineClient, ProgramRpcClient, ProgramRpcClientSendTransaction, }; -use std::{process::exit, sync::Arc}; +use std::{process::exit, rc::Rc, sync::Arc}; pub(crate) struct MintInfo { pub program_id: Pubkey, @@ -50,7 +50,7 @@ pub(crate) struct Config<'a> { impl<'a> Config<'a> { pub(crate) async fn new( matches: &ArgMatches<'_>, - wallet_manager: &mut Option>, + wallet_manager: &mut Option>, bulk_signers: &mut Vec>, multisigner_ids: &'a mut Vec, ) -> Config<'a> { @@ -101,7 +101,7 @@ impl<'a> Config<'a> { fn extract_multisig_signers( matches: &ArgMatches<'_>, - wallet_manager: &mut Option>, + wallet_manager: &mut Option>, bulk_signers: &mut Vec>, multisigner_ids: &'a mut Vec, ) -> Vec<&'a Pubkey> { @@ -121,7 +121,7 @@ impl<'a> Config<'a> { pub(crate) async fn new_with_clients_and_ws_url( matches: &ArgMatches<'_>, - wallet_manager: &mut Option>, + wallet_manager: &mut Option>, bulk_signers: &mut Vec>, multisigner_ids: &'a mut Vec, rpc_client: Arc, @@ -305,7 +305,7 @@ impl<'a> Config<'a> { &self, arg_matches: &ArgMatches<'_>, override_name: &str, - wallet_manager: &mut Option>, + wallet_manager: &mut Option>, ) -> Result { let token = pubkey_of_signer(arg_matches, "token", wallet_manager) .map_err(|e| -> Error { e.to_string().into() })?; @@ -324,7 +324,7 @@ impl<'a> Config<'a> { &self, arg_matches: &ArgMatches<'_>, override_name: &str, - wallet_manager: &mut Option>, + wallet_manager: &mut Option>, token: Option, ) -> Result { if let Some(address) = pubkey_of_signer(arg_matches, override_name, wallet_manager) @@ -355,7 +355,7 @@ impl<'a> Config<'a> { &self, arg_matches: &ArgMatches<'_>, address_name: &str, - wallet_manager: &mut Option>, + wallet_manager: &mut Option>, ) -> Result { if let Some(address) = pubkey_of_signer(arg_matches, address_name, wallet_manager) .map_err(|e| -> Error { e.to_string().into() })? @@ -371,7 +371,7 @@ impl<'a> Config<'a> { &self, arg_matches: &ArgMatches, authority_name: &str, - wallet_manager: &mut Option>, + wallet_manager: &mut Option>, ) -> (Arc, Pubkey) { // If there are `--multisig-signers` on the command line, allow `NullSigner`s to // be returned for multisig account addresses diff --git a/token/cli/src/main.rs b/token/cli/src/main.rs index cbd89e16d9e..58dbefdb546 100644 --- a/token/cli/src/main.rs +++ b/token/cli/src/main.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] use clap::{ crate_description, crate_name, crate_version, value_t, value_t_or_exit, App, AppSettings, Arg, ArgGroup, ArgMatches, SubCommand, @@ -63,7 +63,9 @@ use spl_token_client::{ token::{ExtensionInitializationParams, Token}, }; use spl_token_metadata_interface::state::{Field, TokenMetadata}; -use std::{collections::HashMap, fmt, fmt::Display, process::exit, str::FromStr, sync::Arc}; +use std::{ + collections::HashMap, fmt, fmt::Display, process::exit, rc::Rc, str::FromStr, sync::Arc, +}; use strum::IntoEnumIterator; use strum_macros::{EnumIter, EnumString, IntoStaticStr}; @@ -410,7 +412,7 @@ fn new_throwaway_signer() -> (Arc, Pubkey) { fn get_signer( matches: &ArgMatches<'_>, keypair_name: &str, - wallet_manager: &mut Option>, + wallet_manager: &mut Option>, ) -> Option<(Arc, Pubkey)> { matches.value_of(keypair_name).map(|path| { let signer = signer_from_path(matches, path, keypair_name, wallet_manager) @@ -464,7 +466,7 @@ type SignersOf = Vec<(Arc, Pubkey)>; pub fn signers_of( matches: &ArgMatches<'_>, name: &str, - wallet_manager: &mut Option>, + wallet_manager: &mut Option>, ) -> Result, Box> { if let Some(values) = matches.values_of(name) { let mut results = Vec::new(); @@ -4852,7 +4854,7 @@ async fn process_command<'a>( sub_command: &CommandName, sub_matches: &ArgMatches<'_>, config: &Config<'a>, - mut wallet_manager: Option>, + mut wallet_manager: Option>, mut bulk_signers: Vec>, ) -> CommandResult { match (sub_command, sub_matches) { diff --git a/token/client/Cargo.toml b/token/client/Cargo.toml index 6efa2f86f7b..9c209264e3c 100644 --- a/token/client/Cargo.toml +++ b/token/client/Cargo.toml @@ -12,12 +12,12 @@ async-trait = "0.1" curve25519-dalek = "3.2.1" futures = "0.3.28" futures-util = "0.3" -solana-banks-interface = "1.16.16" -solana-cli-output = { version = "1.16.16", optional = true } -solana-program-test = "1.16.16" -solana-rpc-client = "1.16.16" -solana-rpc-client-api = "1.16.16" -solana-sdk = "1.16.16" +solana-banks-interface = "1.17.2" +solana-cli-output = { version = "1.17.2", optional = true } +solana-program-test = "1.17.2" +solana-rpc-client = "1.17.2" +solana-rpc-client-api = "1.17.2" +solana-sdk = "1.17.2" # We never want the entrypoint for ATA, but we want the entrypoint for token when # testing token spl-associated-token-account = { version = "2.0", path = "../../associated-token-account/program", features = ["no-entrypoint"] } diff --git a/token/client/src/lib.rs b/token/client/src/lib.rs index a8cd0ffe5a9..850cbbd3f8f 100644 --- a/token/client/src/lib.rs +++ b/token/client/src/lib.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] pub mod client; pub mod output; pub mod token; diff --git a/token/program-2022-test/Cargo.toml b/token/program-2022-test/Cargo.toml index a5c5cc84f90..75068f62fd4 100644 --- a/token/program-2022-test/Cargo.toml +++ b/token/program-2022-test/Cargo.toml @@ -20,9 +20,9 @@ walkdir = "2" async-trait = "0.1" borsh = "0.10" futures-util = "0.3" -solana-program = "=1.16.16" -solana-program-test = "=1.16.16" -solana-sdk = "=1.16.16" +solana-program = "=1.17.2" +solana-program-test = "=1.17.2" +solana-sdk = "=1.17.2" spl-associated-token-account = { version = "2.0", path = "../../associated-token-account/program" } spl-memo = { version = "4.0.0", path = "../../memo/program", features = ["no-entrypoint"] } spl-pod = { version = "0.1.0", path = "../../libraries/pod" } diff --git a/token/program-2022-test/tests/confidential_transfer.rs b/token/program-2022-test/tests/confidential_transfer.rs index 7adde29a8ed..aeca780fca1 100644 --- a/token/program-2022-test/tests/confidential_transfer.rs +++ b/token/program-2022-test/tests/confidential_transfer.rs @@ -1,5 +1,4 @@ -#![cfg(all(feature = "test-sbf"))] -// #![cfg(twoxtx)] +#![cfg(feature = "test-sbf")] mod program_test; use { diff --git a/token/program-2022-test/tests/confidential_transfer_fee.rs b/token/program-2022-test/tests/confidential_transfer_fee.rs index 6a5ea84d5a7..306d5332303 100644 --- a/token/program-2022-test/tests/confidential_transfer_fee.rs +++ b/token/program-2022-test/tests/confidential_transfer_fee.rs @@ -1,5 +1,4 @@ -#![cfg(all(feature = "test-sbf"))] -// #![cfg(twoxtx)] +#![cfg(feature = "test-sbf")] mod program_test; use { diff --git a/token/program-2022-test/tests/token_metadata_update_field.rs b/token/program-2022-test/tests/token_metadata_update_field.rs index 0555f1f8168..83417d376f4 100644 --- a/token/program-2022-test/tests/token_metadata_update_field.rs +++ b/token/program-2022-test/tests/token_metadata_update_field.rs @@ -1,4 +1,5 @@ #![cfg(feature = "test-sbf")] +#![allow(clippy::items_after_test_module)] mod program_test; use { diff --git a/token/program-2022/Cargo.toml b/token/program-2022/Cargo.toml index d1aa8e58dbe..a3e014566e7 100644 --- a/token/program-2022/Cargo.toml +++ b/token/program-2022/Cargo.toml @@ -23,8 +23,8 @@ bytemuck = { version = "1.14.0", features = ["derive"] } num-derive = "0.4" num-traits = "0.2" num_enum = "0.7.0" -solana-program = "1.16.16" -solana-zk-token-sdk = "1.16.16" +solana-program = "1.17.2" +solana-zk-token-sdk = "1.17.2" spl-memo = { version = "4.0.0", path = "../../memo/program", features = [ "no-entrypoint" ] } spl-token = { version = "4.0", path = "../program", features = ["no-entrypoint"] } spl-token-metadata-interface = { version = "0.2.0", path = "../../token-metadata/interface" } @@ -40,8 +40,8 @@ base64 = { version = "0.21.4", optional = true } lazy_static = "1.4.0" proptest = "1.3" serial_test = "2.0.0" -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" serde_json = "1.0.107" [lib] diff --git a/token/program-2022/src/extension/confidential_transfer/instruction.rs b/token/program-2022/src/extension/confidential_transfer/instruction.rs index f0d36e5b882..0e6c23d7f2b 100644 --- a/token/program-2022/src/extension/confidential_transfer/instruction.rs +++ b/token/program-2022/src/extension/confidential_transfer/instruction.rs @@ -10,7 +10,7 @@ use { instruction::{encode_instruction, TokenInstruction}, proof::ProofLocation, }, - bytemuck::{Pod, Zeroable}, + bytemuck::Zeroable, // `Pod` comes from zk_token_proof_instruction num_enum::{IntoPrimitive, TryFromPrimitive}, solana_program::{ instruction::{AccountMeta, Instruction}, diff --git a/token/program-2022/src/extension/confidential_transfer/processor.rs b/token/program-2022/src/extension/confidential_transfer/processor.rs index 3a20d277fd0..a0556415a0d 100644 --- a/token/program-2022/src/extension/confidential_transfer/processor.rs +++ b/token/program-2022/src/extension/confidential_transfer/processor.rs @@ -129,7 +129,7 @@ fn process_configure_account( // Note: The caller is expected to use the `Reallocate` instruction to ensure there is // sufficient room in their token account for the new `ConfidentialTransferAccount` extension - let mut confidential_transfer_account = + let confidential_transfer_account = token_account.init_extension::(false)?; confidential_transfer_account.approved = confidential_transfer_mint.auto_approve_new_accounts; confidential_transfer_account.elgamal_pubkey = proof_context.pubkey; @@ -150,7 +150,7 @@ fn process_configure_account( // if the mint is extended for fees, then initialize account for confidential transfer fees if mint.get_extension::().is_ok() { - let mut confidential_transfer_fee_amount = + let confidential_transfer_fee_amount = token_account.init_extension::(false)?; confidential_transfer_fee_amount.withheld_amount = EncryptedWithheldAmount::zeroed(); } @@ -179,7 +179,7 @@ fn process_approve_account(accounts: &[AccountInfo]) -> ProgramResult { maybe_confidential_transfer_mint_authority.ok_or(TokenError::NoAuthorityExists)?; if authority_info.is_signer && *authority_info.key == confidential_transfer_mint_authority { - let mut confidential_transfer_state = + let confidential_transfer_state = token_account.get_extension_mut::()?; confidential_transfer_state.approved = true.into(); Ok(()) @@ -215,7 +215,7 @@ fn process_empty_account( account_info_iter.as_slice(), )?; - let mut confidential_transfer_account = + let confidential_transfer_account = token_account.get_extension_mut::()?; // Check that the encryption public key and ciphertext associated with the confidential @@ -292,7 +292,7 @@ fn process_deposit( .ok_or(TokenError::Overflow)?; token_account.pack_base(); - let mut confidential_transfer_account = + let confidential_transfer_account = token_account.get_extension_mut::()?; confidential_transfer_account.valid_as_destination()?; @@ -384,7 +384,7 @@ fn process_withdraw( // Wrapped SOL withdrawals are not supported because lamports cannot be apparated. assert!(!token_account.base.is_native()); - let mut confidential_transfer_account = + let confidential_transfer_account = token_account.get_extension_mut::()?; confidential_transfer_account.valid_as_source()?; @@ -638,7 +638,7 @@ fn process_source_for_transfer( return Err(TokenError::MintMismatch.into()); } - let mut confidential_transfer_account = + let confidential_transfer_account = token_account.get_extension_mut::()?; confidential_transfer_account.valid_as_source()?; @@ -698,7 +698,7 @@ fn process_destination_for_transfer( check_previous_sibling_instruction_is_memo()?; } - let mut destination_confidential_transfer_account = + let destination_confidential_transfer_account = destination_token_account.get_extension_mut::()?; destination_confidential_transfer_account.valid_as_destination()?; @@ -764,7 +764,7 @@ fn process_source_for_transfer_with_fee( return Err(TokenError::MintMismatch.into()); } - let mut confidential_transfer_account = + let confidential_transfer_account = token_account.get_extension_mut::()?; confidential_transfer_account.valid_as_source()?; @@ -827,7 +827,7 @@ fn process_destination_for_transfer_with_fee( check_previous_sibling_instruction_is_memo()?; } - let mut destination_confidential_transfer_account = + let destination_confidential_transfer_account = destination_token_account.get_extension_mut::()?; destination_confidential_transfer_account.valid_as_destination()?; @@ -884,7 +884,7 @@ fn process_destination_for_transfer_with_fee( let withdraw_withheld_authority_fee_hi = fee_amount_withdraw_withheld_authority_ciphertext(&proof_context.fee_ciphertext_hi); - let mut destination_confidential_transfer_fee_amount = + let destination_confidential_transfer_fee_amount = destination_token_account.get_extension_mut::()?; // Add the fee amount to the destination withheld fee @@ -927,7 +927,7 @@ fn process_apply_pending_balance( account_info_iter.as_slice(), )?; - let mut confidential_transfer_account = + let confidential_transfer_account = token_account.get_extension_mut::()?; confidential_transfer_account.available_balance = syscall::add_with_lo_hi( @@ -973,7 +973,7 @@ fn process_allow_confidential_credits( account_info_iter.as_slice(), )?; - let mut confidential_transfer_account = + let confidential_transfer_account = token_account.get_extension_mut::()?; confidential_transfer_account.allow_confidential_credits = allow_confidential_credits.into(); @@ -1003,7 +1003,7 @@ fn process_allow_non_confidential_credits( account_info_iter.as_slice(), )?; - let mut confidential_transfer_account = + let confidential_transfer_account = token_account.get_extension_mut::()?; confidential_transfer_account.allow_non_confidential_credits = allow_non_confidential_credits.into(); diff --git a/token/program-2022/src/extension/confidential_transfer_fee/processor.rs b/token/program-2022/src/extension/confidential_transfer_fee/processor.rs index 1242f404b4b..e1ee5099371 100644 --- a/token/program-2022/src/extension/confidential_transfer_fee/processor.rs +++ b/token/program-2022/src/extension/confidential_transfer_fee/processor.rs @@ -125,7 +125,7 @@ fn process_withdraw_withheld_tokens_from_mint( if destination_account.base.is_frozen() { return Err(TokenError::AccountFrozen.into()); } - let mut destination_confidential_transfer_account = + let destination_confidential_transfer_account = destination_account.get_extension_mut::()?; destination_confidential_transfer_account.valid_as_destination()?; @@ -286,7 +286,7 @@ fn process_withdraw_withheld_tokens_from_accounts( } } - let mut destination_confidential_transfer_account = + let destination_confidential_transfer_account = destination_account.get_extension_mut::()?; destination_confidential_transfer_account.valid_as_destination()?; diff --git a/token/program-2022/src/extension/metadata_pointer/processor.rs b/token/program-2022/src/extension/metadata_pointer/processor.rs index 5ab0f73b4fb..d9911ad00d1 100644 --- a/token/program-2022/src/extension/metadata_pointer/processor.rs +++ b/token/program-2022/src/extension/metadata_pointer/processor.rs @@ -42,7 +42,7 @@ fn process_initialize( && Option::::from(*metadata_address).is_none() { msg!("The metadata pointer extension requires at least an authority or an address for initialization, neither was provided"); - return Err(TokenError::InvalidInstruction)?; + Err(TokenError::InvalidInstruction)?; } extension.metadata_address = *metadata_address; Ok(()) diff --git a/token/program-2022/src/extension/mod.rs b/token/program-2022/src/extension/mod.rs index 3fc5b04ea43..15b78bd8f4f 100644 --- a/token/program-2022/src/extension/mod.rs +++ b/token/program-2022/src/extension/mod.rs @@ -1521,7 +1521,7 @@ mod test { state.pack_base(); // check unpacking - let mut unpacked_extension = state.get_extension_mut::().unwrap(); + let unpacked_extension = state.get_extension_mut::().unwrap(); assert_eq!(*unpacked_extension, MintCloseAuthority { close_authority }); // update extension @@ -1790,7 +1790,7 @@ mod test { state.pack_base(); // check unpacking - let mut unpacked_extension = state.get_extension_mut::().unwrap(); + let unpacked_extension = state.get_extension_mut::().unwrap(); assert_eq!(*unpacked_extension, TransferFeeAmount { withheld_amount }); // update extension diff --git a/token/program-2022/src/extension/transfer_hook/processor.rs b/token/program-2022/src/extension/transfer_hook/processor.rs index 2eef4d9bdc9..41c41bcd736 100644 --- a/token/program-2022/src/extension/transfer_hook/processor.rs +++ b/token/program-2022/src/extension/transfer_hook/processor.rs @@ -45,7 +45,7 @@ fn process_initialize( } } else if Option::::from(*authority).is_none() { msg!("The transfer hook extension requires at least an authority or a program id for initialization, neither was provided"); - return Err(TokenError::InvalidInstruction)?; + Err(TokenError::InvalidInstruction)?; } extension.program_id = *transfer_hook_program_id; Ok(()) diff --git a/token/program-2022/src/lib.rs b/token/program-2022/src/lib.rs index c191afcc8ba..13077557224 100644 --- a/token/program-2022/src/lib.rs +++ b/token/program-2022/src/lib.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![deny(missing_docs)] #![cfg_attr(not(test), forbid(unsafe_code))] diff --git a/token/program-2022/src/processor.rs b/token/program-2022/src/processor.rs index 27b58ec3a88..baeca6a195e 100644 --- a/token/program-2022/src/processor.rs +++ b/token/program-2022/src/processor.rs @@ -1895,9 +1895,11 @@ mod tests { } #[test] - #[should_panic(expected = "Custom(3)")] - fn test_error_unwrap() { - Err::<(), ProgramError>(return_token_error_as_program_error()).unwrap(); + fn test_error_as_custom() { + assert_eq!( + return_token_error_as_program_error(), + ProgramError::Custom(3) + ); } #[test] diff --git a/token/program/Cargo.toml b/token/program/Cargo.toml index 3fdf2341de3..51fac3e8791 100644 --- a/token/program/Cargo.toml +++ b/token/program/Cargo.toml @@ -18,15 +18,15 @@ bytemuck = "1.14.0" num-derive = "0.4" num-traits = "0.2" num_enum = "0.7.0" -solana-program = "1.16.16" +solana-program = "1.17.2" thiserror = "1.0" [dev-dependencies] lazy_static = "1.4.0" proptest = "1.3" serial_test = "2.0.0" -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" [lib] crate-type = ["cdylib", "lib"] diff --git a/token/program/src/lib.rs b/token/program/src/lib.rs index e449506d49e..1eb3855df90 100644 --- a/token/program/src/lib.rs +++ b/token/program/src/lib.rs @@ -1,4 +1,4 @@ -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![deny(missing_docs)] #![cfg_attr(not(test), forbid(unsafe_code))] diff --git a/token/program/src/processor.rs b/token/program/src/processor.rs index 7056f2e707e..6c9b0f4fef0 100644 --- a/token/program/src/processor.rs +++ b/token/program/src/processor.rs @@ -1147,9 +1147,11 @@ mod tests { } #[test] - #[should_panic(expected = "Custom(3)")] - fn test_error_unwrap() { - Err::<(), ProgramError>(return_token_error_as_program_error()).unwrap(); + fn test_error_as_custom() { + assert_eq!( + return_token_error_as_program_error(), + ProgramError::Custom(3) + ); } #[test] diff --git a/token/transfer-hook-example/Cargo.toml b/token/transfer-hook-example/Cargo.toml index 7744a95972d..101ad3d24c0 100644 --- a/token/transfer-hook-example/Cargo.toml +++ b/token/transfer-hook-example/Cargo.toml @@ -13,15 +13,15 @@ test-sbf = [] [dependencies] arrayref = "0.3.7" -solana-program = "1.16.16" +solana-program = "1.17.2" spl-tlv-account-resolution = { version = "0.4" , path = "../../libraries/tlv-account-resolution" } spl-token-2022 = { version = "0.9", path = "../program-2022", features = ["no-entrypoint"] } spl-transfer-hook-interface = { version = "0.3" , path = "../transfer-hook-interface" } spl-type-length-value = { version = "0.3" , path = "../../libraries/type-length-value" } [dev-dependencies] -solana-program-test = "1.16.16" -solana-sdk = "1.16.16" +solana-program-test = "1.17.2" +solana-sdk = "1.17.2" [lib] crate-type = ["cdylib", "lib"] diff --git a/token/transfer-hook-example/src/lib.rs b/token/transfer-hook-example/src/lib.rs index faaa79ddfe9..9db06d9c66e 100644 --- a/token/transfer-hook-example/src/lib.rs +++ b/token/transfer-hook-example/src/lib.rs @@ -3,7 +3,7 @@ //! after all other logic, to be sure that a transfer has accomplished all //! required preconditions. -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![deny(missing_docs)] #![cfg_attr(not(test), forbid(unsafe_code))] diff --git a/token/transfer-hook-interface/Cargo.toml b/token/transfer-hook-interface/Cargo.toml index 39d09f0f5b8..1029761fa5a 100644 --- a/token/transfer-hook-interface/Cargo.toml +++ b/token/transfer-hook-interface/Cargo.toml @@ -10,7 +10,7 @@ edition = "2021" [dependencies] arrayref = "0.3.7" bytemuck = { version = "1.14.0", features = ["derive"] } -solana-program = "1.16.16" +solana-program = "1.17.2" spl-discriminator = { version = "0.1" , path = "../../libraries/discriminator" } spl-program-error = { version = "0.3" , path = "../../libraries/program-error" } spl-tlv-account-resolution = { version = "0.4" , path = "../../libraries/tlv-account-resolution" } diff --git a/token/transfer-hook-interface/src/lib.rs b/token/transfer-hook-interface/src/lib.rs index 4212fa963b2..20af3abe1ed 100644 --- a/token/transfer-hook-interface/src/lib.rs +++ b/token/transfer-hook-interface/src/lib.rs @@ -3,7 +3,7 @@ //! all other logic, to be sure that a transfer has accomplished all required //! preconditions. -#![allow(clippy::integer_arithmetic)] +#![allow(clippy::arithmetic_side_effects)] #![deny(missing_docs)] #![cfg_attr(not(test), forbid(unsafe_code))] diff --git a/utils/test-client/Cargo.toml b/utils/test-client/Cargo.toml index bbba6786293..da4097af24d 100644 --- a/utils/test-client/Cargo.toml +++ b/utils/test-client/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" # Used to ensure that SPL programs are buildable by external clients [dependencies] -solana-sdk = "1.16.16" +solana-sdk = "1.17.2" spl-memo = { path = "../../memo/program", features = [ "no-entrypoint" ] } spl-token = { path = "../../token/program", features = [ "no-entrypoint" ] } spl-token-swap = { path = "../../token-swap/program", features = [ "no-entrypoint" ] }