diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 17cc728e68bd17..c348d69acbe4ea 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -69,7 +69,7 @@ jobs: needs: - check if: > - github.repository == 'solana-labs/solana' && + github.repository == 'anza-xyz/agave' && needs.check.outputs.continue == 1 # the name is used by .mergify.yml as well name: build & deploy docs @@ -79,9 +79,9 @@ jobs: uses: actions/checkout@v4 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 22 - name: Build working-directory: docs diff --git a/.github/workflows/downstream-project-anchor.yml b/.github/workflows/downstream-project-anchor.yml index a7768f6a1c433b..52dcbdc5a23009 100644 --- a/.github/workflows/downstream-project-anchor.yml +++ b/.github/workflows/downstream-project-anchor.yml @@ -18,6 +18,7 @@ on: - "cargo-build-sbf" - "cargo-test-sbf" - "scripts/build-downstream-anchor-projects.sh" + - "scripts/patch-spl-crates-for-anchor.sh" - ".github/scripts/purge-ubuntu-runner.sh" - ".github/scripts/downstream-project-spl-install-deps.sh" - ".github/workflows/downstream-project-anchor.yml" diff --git a/CHANGELOG.md b/CHANGELOG.md index c8d5c088ca3382..8291b21f5d17c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,9 +27,15 @@ Release channels have their own copy of this changelog: getConfirmedSignaturesForAddress, getConfirmedBlock, getConfirmedBlocks, getConfirmedBlocksWithLimit, getConfirmedTransaction, getConfirmedSignaturesForAddress2, getRecentBlockhash, getFees, getFeeCalculatorForBlockhash, getFeeRateGovernor, getSnapshotSlot getStakeActivation - * `--enable-rpc-obsolete_v1_7` flag removed * Deprecated methods are removed from `RpcClient` and `RpcClient::nonblocking` * `solana-client`: deprecated re-exports removed; please import `solana-connection-cache`, `solana-quic-client`, or `solana-udp-client` directly + * Deprecated arguments removed from `agave-validator`: + * `--enable-rpc-obsolete_v1_7` (#1886) + * `--accounts-db-caching-enabled` (#2063) + * `--accounts-db-index-hashing` (#2063) + * `--no-accounts-db-index-hashing` (#2063) + * `--incremental-snapshots` (#2148) + * `--halt-on-known-validators-accounts-hash-mismatch` (#2157) * Changes * `central-scheduler` as default option for `--block-production-method` (#34891) * `solana-rpc-client-api`: `RpcFilterError` depends on `base64` version 0.22, so users may need to upgrade to `base64` version 0.22 diff --git a/Cargo.lock b/Cargo.lock index 4965bcdc3eb9a1..1dc8d1479c74fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,9 +14,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.22.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" dependencies = [ "gimli", ] @@ -34,7 +34,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ "crypto-common", - "generic-array", + "generic-array 0.14.7", ] [[package]] @@ -65,24 +65,24 @@ dependencies = [ [[package]] name = "agave-accounts-hash-cache-tool" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bytemuck", - "clap 2.34.0", + "clap 2.33.3", "solana-accounts-db", "solana-version", ] [[package]] name = "agave-cargo-registry" -version = "2.0.2" +version = "2.0.5" dependencies = [ - "clap 2.34.0", + "clap 2.33.3", "flate2", "hex", "hyper", "log", - "rustc_version", + "rustc_version 0.4.0", "serde", "serde_derive", "serde_json", @@ -100,12 +100,12 @@ dependencies = [ "tar", "tempfile", "tokio", - "toml 0.8.14", + "toml 0.8.12", ] [[package]] name = "agave-geyser-plugin-interface" -version = "2.0.2" +version = "2.0.5" dependencies = [ "log", "solana-sdk", @@ -115,13 +115,13 @@ dependencies = [ [[package]] name = "agave-install" -version = "2.0.2" +version = "2.0.5" dependencies = [ "atty", "bincode", "bzip2", "chrono", - "clap 2.34.0", + "clap 2.33.3", "console", "crossbeam-channel", "ctrlc", @@ -131,7 +131,7 @@ dependencies = [ "nix", "reqwest", "scopeguard", - "semver", + "semver 1.0.23", "serde", "serde_derive", "serde_yaml 0.8.26", @@ -151,13 +151,13 @@ dependencies = [ [[package]] name = "agave-ledger-tool" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_cmd", "bs58", "bytecount", "chrono", - "clap 2.34.0", + "clap 2.33.3", "crossbeam-channel", "csv", "dashmap", @@ -206,9 +206,9 @@ dependencies = [ [[package]] name = "agave-store-tool" -version = "2.0.2" +version = "2.0.5" dependencies = [ - "clap 2.34.0", + "clap 2.33.3", "solana-accounts-db", "solana-sdk", "solana-version", @@ -216,11 +216,11 @@ dependencies = [ [[package]] name = "agave-validator" -version = "2.0.2" +version = "2.0.5" dependencies = [ "agave-geyser-plugin-interface", "chrono", - "clap 2.34.0", + "clap 2.33.3", "console", "core_affinity", "crossbeam-channel", @@ -233,7 +233,7 @@ dependencies = [ "jsonrpc-ipc-server", "lazy_static", "libc", - "libloading 0.7.4", + "libloading", "log", "num_cpus", "rand 0.8.5", @@ -284,9 +284,9 @@ dependencies = [ [[package]] name = "agave-watchtower" -version = "2.0.2" +version = "2.0.5" dependencies = [ - "clap 2.34.0", + "clap 2.33.3", "humantime", "log", "solana-clap-utils", @@ -307,19 +307,19 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.2.10", "once_cell", "version_check", ] [[package]] name = "ahash" -version = "0.8.11" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +checksum = "8b79b82693f705137f8fb9b37871d99e4f9a7df12b917eed79c3d3954830a60b" dependencies = [ "cfg-if 1.0.0", - "getrandom 0.2.15", + "getrandom 0.2.10", "once_cell", "version_check", "zerocopy", @@ -327,33 +327,42 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.3" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +dependencies = [ + "memchr", +] + +[[package]] +name = "aho-corasick" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" dependencies = [ "memchr", ] [[package]] name = "alloc-no-stdlib" -version = "2.0.4" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" +checksum = "35ef4730490ad1c4eae5c4325b2a95f521d023e5c885853ff7aca0a6a1631db3" [[package]] name = "alloc-stdlib" -version = "0.2.2" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +checksum = "697ed7edc0f1711de49ce108c541623a0af97c6c60b2f6e2b65229847ac843c2" dependencies = [ "alloc-no-stdlib", ] [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" [[package]] name = "android-tzdata" @@ -363,9 +372,9 @@ checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" [[package]] name = "android_system_properties" -version = "0.1.5" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +checksum = "d7ed72e1635e121ca3e79420540282af22da58be50de153d36f81ddc6b83aa9e" dependencies = [ "libc", ] @@ -378,18 +387,18 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "ansi_term" -version = "0.12.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" dependencies = [ "winapi 0.3.9", ] [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" [[package]] name = "anyhow" @@ -422,9 +431,9 @@ dependencies = [ [[package]] name = "arc-swap" -version = "1.7.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" +checksum = "c5d78ce20460b82d3fa150275ed9d55e21064fc7951177baacf86a145c4a4b1f" [[package]] name = "ark-bn254" @@ -467,10 +476,10 @@ dependencies = [ "derivative", "digest 0.10.7", "itertools 0.10.5", - "num-bigint 0.4.6", + "num-bigint 0.4.5", "num-traits", "paste", - "rustc_version", + "rustc_version 0.4.0", "zeroize", ] @@ -490,7 +499,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "num-bigint 0.4.6", + "num-bigint 0.4.5", "num-traits", "proc-macro2", "quote", @@ -519,7 +528,7 @@ dependencies = [ "ark-serialize-derive", "ark-std", "digest 0.10.7", - "num-bigint 0.4.6", + "num-bigint 0.4.5", ] [[package]] @@ -569,9 +578,9 @@ checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" [[package]] name = "asn1-rs" -version = "0.5.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" +checksum = "cf6690c370453db30743b373a60ba498fc0d6d83b11f4abfd87a84a075db5dd4" dependencies = [ "asn1-rs-derive", "asn1-rs-impl", @@ -608,14 +617,13 @@ dependencies = [ [[package]] name = "assert_cmd" -version = "2.0.14" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed72493ac66d5804837f480ab3766c72bdfab91a65e565fc54fa9e42db0073a8" +checksum = "9834fcc22e0874394a010230586367d4a3e9f11b560f469262678547e1d2575e" dependencies = [ - "anstyle", - "bstr", + "bstr 1.4.0", "doc-comment", - "predicates 3.1.0", + "predicates", "predicates-core", "predicates-tree", "wait-timeout", @@ -646,9 +654,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.11" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd066d0b4ef8ecb03a55319dc13aa6910616d0f44008a045bb1835af830abff5" +checksum = "62b74f44609f0f91493e3082d3734d98497e094777144380ea4db9f9905dd5b6" dependencies = [ "brotli", "flate2", @@ -669,35 +677,34 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.5" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +checksum = "171374e7e3b2504e0e5236e3b59260560f9fe94bfe9ac39ba5e4e929c5590625" dependencies = [ "async-stream-impl", "futures-core", - "pin-project-lite", ] [[package]] name = "async-stream-impl" -version = "0.3.5" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +checksum = "648ed8c8d2ce5409ccd57453d9d1b214b342a0d69376a6feda1fd6cae3299308" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 1.0.109", ] [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", ] [[package]] @@ -713,15 +720,15 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.3.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "autotools" -version = "0.2.7" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef941527c41b0fc0dd48511a8154cd5fc7e29200a0ff8b7203c5d777dbc795cf" +checksum = "c8138adefca3e5d2e73bfba83bd6eeaf904b26a7ac1b4a19892cfe16cc7e1701" dependencies = [ "cc", ] @@ -778,7 +785,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" dependencies = [ "futures-core", - "getrandom 0.2.15", + "getrandom 0.2.10", "instant", "pin-project-lite", "rand 0.8.5", @@ -787,9 +794,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" dependencies = [ "addr2line", "cc", @@ -839,7 +846,7 @@ version = "0.69.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.5.0", "cexpr", "clang-sys", "itertools 0.12.1", @@ -850,14 +857,14 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.71", + "syn 2.0.66", ] [[package]] name = "bit-set" -version = "0.5.3" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +checksum = "6e11e16035ea35e4e5997b393eacbf6f63983188f7a2ad25bfb13465f5ad59de" dependencies = [ "bit-vec", ] @@ -876,9 +883,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" dependencies = [ "serde", ] @@ -918,14 +925,26 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +dependencies = [ + "block-padding 0.1.5", + "byte-tools", + "byteorder", + "generic-array 0.12.4", +] + [[package]] name = "block-buffer" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding", - "generic-array", + "block-padding 0.2.1", + "generic-array 0.14.7", ] [[package]] @@ -934,7 +953,16 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array", + "generic-array 0.14.7", +] + +[[package]] +name = "block-padding" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +dependencies = [ + "byte-tools", ] [[package]] @@ -986,7 +1014,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", "syn_derive", ] @@ -1014,9 +1042,9 @@ dependencies = [ [[package]] name = "brotli" -version = "6.0.0" +version = "3.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" +checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -1025,9 +1053,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "4.0.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" +checksum = "59ad2d4653bf5ca36ae797b1f4bb4dbddb60ce49ca4aed8a2ce4829f60425b80" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -1044,20 +1072,30 @@ dependencies = [ [[package]] name = "bstr" -version = "1.9.1" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" dependencies = [ "memchr", - "regex-automata", +] + +[[package]] +name = "bstr" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d4260bcc2e8fc9df1eac4919a720effeb63a3f0952f5bf4944adfa18897f09" +dependencies = [ + "memchr", + "once_cell", + "regex-automata 0.1.10", "serde", ] [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" [[package]] name = "bv" @@ -1069,6 +1107,12 @@ dependencies = [ "serde", ] +[[package]] +name = "byte-tools" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" + [[package]] name = "byte-unit" version = "4.0.19" @@ -1102,7 +1146,7 @@ checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", ] [[package]] @@ -1113,15 +1157,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "bytesize" -version = "1.3.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" +checksum = "6c58ec36aac5066d5ca17df51b3e70279f5670a72102f5752cb7e7c856adfc70" [[package]] name = "bzip2" @@ -1146,9 +1190,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +checksum = "869119e97797867fd90f5e22af7d0bd274bd4635ebb9eb68c04f3f513ae6c412" dependencies = [ "serde", ] @@ -1165,9 +1209,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.8" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" dependencies = [ "serde", ] @@ -1180,7 +1224,7 @@ checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", - "semver", + "semver 1.0.23", "serde", "serde_json", "thiserror", @@ -1192,7 +1236,7 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c24dab4283a142afa2fdca129b80ad2c6284e073930f964c3a1293c225ee39a" dependencies = [ - "rustc_version", + "rustc_version 0.4.0", ] [[package]] @@ -1203,9 +1247,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.1.5" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "324c74f2155653c90b04f25b2a47a8a631360cb908f92a772695f430c7e31052" +checksum = "17f6e324229dc011159fcc089755d1e2e216a90d43a7dea6853ca740b84f35e7" dependencies = [ "jobserver", "libc", @@ -1256,7 +1300,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.6", + "windows-targets 0.52.5", ] [[package]] @@ -1270,9 +1314,9 @@ dependencies = [ [[package]] name = "ciborium" -version = "0.2.2" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" +checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" dependencies = [ "ciborium-io", "ciborium-ll", @@ -1281,15 +1325,15 @@ dependencies = [ [[package]] name = "ciborium-io" -version = "0.2.2" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" +checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" [[package]] name = "ciborium-ll" -version = "0.2.2" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" +checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" dependencies = [ "ciborium-io", "half", @@ -1307,20 +1351,20 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.8.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +checksum = "10612c0ec0e0a1ff0e97980647cb058a6e7aedb913d01d009c406b8b7d0b26ee" dependencies = [ "glob", "libc", - "libloading 0.8.4", + "libloading", ] [[package]] name = "clap" -version = "2.34.0" +version = "2.33.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" dependencies = [ "ansi_term", "atty", @@ -1333,9 +1377,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.25" +version = "3.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" +checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" dependencies = [ "atty", "bitflags 1.3.2", @@ -1345,33 +1389,33 @@ dependencies = [ "once_cell", "strsim 0.10.0", "termcolor", - "textwrap 0.16.1", + "textwrap 0.16.0", ] [[package]] name = "clap" -version = "4.5.9" +version = "4.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" +checksum = "c27cdf28c0f604ba3f512b0c9a409f8de8513e4816705deb0498b627e7c3a3fd" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.9" +version = "4.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" +checksum = "08a9f1ab5e9f01a9b81f202e8562eb9a10de70abf9eaeac1be465c28b75aa4aa" dependencies = [ "anstyle", - "clap_lex 0.7.1", + "clap_lex 0.5.0", ] [[package]] name = "clap_derive" -version = "3.2.25" +version = "3.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" +checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65" dependencies = [ "heck", "proc-macro-error", @@ -1391,9 +1435,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" [[package]] name = "combine" @@ -1410,9 +1454,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.5.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +checksum = "c278839b831783b70278b14df4d45e1beb1aad306c07bb796637de9a0e323e8e" dependencies = [ "crossbeam-utils", ] @@ -1484,9 +1528,9 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "core-foundation" -version = "0.9.4" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" dependencies = [ "core-foundation-sys", "libc", @@ -1494,9 +1538,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "core_affinity" @@ -1512,18 +1556,18 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.4.2" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" dependencies = [ "cfg-if 1.0.0", ] @@ -1537,7 +1581,7 @@ dependencies = [ "anes", "cast 0.3.0", "ciborium", - "clap 4.5.9", + "clap 4.3.21", "criterion-plot", "is-terminal", "itertools 0.10.5", @@ -1588,28 +1632,35 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ + "cfg-if 1.0.0", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +version = "0.9.5" +source = "git+https://github.com/anza-xyz/crossbeam?rev=fd279d707025f0e60951e429bf778b4813d1b6bf#fd279d707025f0e60951e429bf778b4813d1b6bf" dependencies = [ + "cfg-if 1.0.0", "crossbeam-utils", + "lazy_static", + "memoffset 0.6.4", + "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "c3a430a770ebd84726f584a90ee7f020d28db52c6d02138900f22341f866d39c" +dependencies = [ + "cfg-if 1.0.0", +] [[package]] name = "crunchy" @@ -1623,7 +1674,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array", + "generic-array 0.14.7", "rand_core 0.6.4", "typenum", ] @@ -1634,7 +1685,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array", + "generic-array 0.14.7", "subtle", ] @@ -1693,9 +1744,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.10" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" dependencies = [ "darling_core", "darling_macro", @@ -1703,27 +1754,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.10" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim 0.11.1", - "syn 2.0.71", + "strsim 0.10.0", + "syn 2.0.66", ] [[package]] name = "darling_macro" -version = "0.20.10" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" dependencies = [ "darling_core", "quote", - "syn 2.0.71", + "syn 2.0.66", ] [[package]] @@ -1733,42 +1784,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if 1.0.0", - "hashbrown 0.14.5", + "hashbrown 0.14.3", "lock_api", "once_cell", - "parking_lot_core 0.9.10", + "parking_lot_core 0.9.8", "rayon", ] [[package]] name = "data-encoding" -version = "2.6.0" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" +checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57" [[package]] name = "der-parser" -version = "8.2.0" +version = "8.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +checksum = "42d4bc9b0db0a0df9ae64634ac5bdefb7afcb534e182275ca0beadbe486701c1" dependencies = [ "asn1-rs", "displaydoc", "nom", - "num-bigint 0.4.6", + "num-bigint 0.4.5", "num-traits", "rusticata-macros", ] -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", -] - [[package]] name = "derivation-path" version = "0.2.0" @@ -1794,20 +1836,20 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", ] [[package]] name = "derive_more" -version = "0.99.18" +version = "0.99.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" +checksum = "40eebddd2156ce1bb37b20bbe5151340a31828b1f2d22ba4141f3531710e38df" dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version", - "syn 2.0.71", + "rustc_version 0.3.3", + "syn 1.0.109", ] [[package]] @@ -1828,13 +1870,22 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +dependencies = [ + "generic-array 0.12.4", +] + [[package]] name = "digest" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array", + "generic-array 0.14.7", ] [[package]] @@ -1880,13 +1931,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.5" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 1.0.109", ] [[package]] @@ -1909,7 +1960,7 @@ checksum = "a6cbae11b3de8fce2a456e8ea3dada226b35fe791f0dc1d360c0941f0bb681f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", ] [[package]] @@ -1932,9 +1983,9 @@ checksum = "abe71d579d1812060163dff96056261deb5bf6729b100fa2e36a68b9649ba3d3" [[package]] name = "ed25519" -version = "1.5.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +checksum = "4620d40f6d2601794401d6dd95a5cf69b6c157852539470eeda433a99b3c0efc" dependencies = [ "signature", ] @@ -1967,9 +2018,9 @@ dependencies = [ [[package]] name = "educe" -version = "0.4.23" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f0042ff8246a363dbe77d2ceedb073339e85a804b9a47636c6e016a9a32c05f" +checksum = "f86b50932a01e7ec5c06160492ab660fb19b6bb2a7878030dd6cd68d21df9d4d" dependencies = [ "enum-ordinalize", "proc-macro2", @@ -1979,9 +2030,9 @@ dependencies = [ [[package]] name = "either" -version = "1.13.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" [[package]] name = "encode_unicode" @@ -1991,9 +2042,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "a74ea89a0a1b98f6332de42c95baff457ada66d1cb4030f9ff151b2041a1c746" dependencies = [ "cfg-if 1.0.0", ] @@ -2009,26 +2060,26 @@ dependencies = [ [[package]] name = "enum-iterator-derive" -version = "1.4.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" +checksum = "03cdc46ec28bd728e67540c528013c6a10eb69a02eb31078a1bda695438cbfb8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", ] [[package]] name = "enum-ordinalize" -version = "3.1.15" +version = "3.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" +checksum = "0b166c9e378360dd5a6666a9604bb4f54ae0cac39023ffbac425e917a2a04fef" dependencies = [ - "num-bigint 0.4.6", + "num-bigint 0.4.5", "num-traits", "proc-macro2", "quote", - "syn 2.0.71", + "syn 1.0.109", ] [[package]] @@ -2046,15 +2097,15 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ "libc", "windows-sys 0.52.0", @@ -2078,9 +2129,15 @@ dependencies = [ [[package]] name = "event-listener" -version = "2.5.3" +version = "2.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77f3309417938f28bf8228fcff79a4a37103981e3e186d2ccd19c74b38f4eb71" + +[[package]] +name = "fake-simd" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" [[package]] name = "fast-math" @@ -2093,9 +2150,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fd-lock" @@ -2116,9 +2173,9 @@ checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" [[package]] name = "filedescriptor" -version = "0.8.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7199d965852c3bac31f779ef99cbb4537f80e952e2d6aa0ffeb30cce00f4f46e" +checksum = "9ed3d8a5e20435ff00469e51a0d82049bae66504b5c429920dadf9bb54d47b3f" dependencies = [ "libc", "thiserror", @@ -2127,21 +2184,21 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "975ccf83d8d9d0d84682850a38c8169027be83368805971cc4f238c2b245bc98" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", + "redox_syscall 0.2.10", + "winapi 0.3.9", ] [[package]] name = "fixedbitset" -version = "0.4.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" +checksum = "398ea4fabe40b9b0d885340a2a991a44c8a645624075ad966d21f88688e2b69e" [[package]] name = "flate2" @@ -2279,7 +2336,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", ] [[package]] @@ -2325,9 +2382,9 @@ dependencies = [ [[package]] name = "gdbstub" -version = "0.6.6" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4e02bf1b1a624d96925c608f1b268d82a76cbc587ce9e59f7c755e9ea11c75c" +checksum = "32c95766e0414f8bfc1d07055574c621b67739466d6ba516c4fef8e99d30d2e6" dependencies = [ "bitflags 1.3.2", "cfg-if 1.0.0", @@ -2339,7 +2396,7 @@ dependencies = [ [[package]] name = "gen-headers" -version = "2.0.2" +version = "2.0.5" dependencies = [ "log", "regex", @@ -2347,7 +2404,7 @@ dependencies = [ [[package]] name = "gen-syscall-list" -version = "2.0.2" +version = "2.0.5" dependencies = [ "regex", ] @@ -2366,6 +2423,15 @@ dependencies = [ "windows", ] +[[package]] +name = "generic-array" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +dependencies = [ + "typenum", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -2402,9 +2468,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.15" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -2415,27 +2481,27 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" [[package]] name = "glob" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" [[package]] name = "globset" -version = "0.4.14" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +checksum = "10463d9ff00a2a068db14231982f5132edebad0d7660cd956a1c30292dbcbfbd" dependencies = [ - "aho-corasick", - "bstr", + "aho-corasick 0.7.18", + "bstr 0.2.17", + "fnv", "log", - "regex-automata", - "regex-syntax", + "regex", ] [[package]] @@ -2459,9 +2525,9 @@ dependencies = [ [[package]] name = "goblin" -version = "0.5.4" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7666983ed0dd8d21a6f6576ee00053ca0926fb281a5522577a4dbd0f1b54143" +checksum = "c955ab4e0ad8c843ea653a3d143048b87490d9be56bd7132a435c2407846ac8f" dependencies = [ "log", "plain", @@ -2489,13 +2555,9 @@ dependencies = [ [[package]] name = "half" -version = "2.4.1" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" -dependencies = [ - "cfg-if 1.0.0", - "crunchy", -] +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" [[package]] name = "hash32" @@ -2521,32 +2583,33 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.11", + "ahash 0.8.10", ] [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.11", + "ahash 0.8.10", "allocator-api2", ] [[package]] name = "headers" -version = "0.3.9" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" +checksum = "4cff78e5788be1e0ab65b04d306b2ed5092c815ec97ec70f4ebd5aee158aa55d" dependencies = [ - "base64 0.21.7", + "base64 0.13.1", + "bitflags 1.3.2", "bytes", "headers-core", "http", "httpdate", "mime", - "sha1", + "sha-1 0.10.0", ] [[package]] @@ -2560,9 +2623,9 @@ dependencies = [ [[package]] name = "heck" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" [[package]] name = "hermit-abi" @@ -2575,9 +2638,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.9" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" [[package]] name = "hex" @@ -2630,19 +2693,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", - "generic-array", + "generic-array 0.14.7", "hmac 0.8.1", ] -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "http" version = "0.2.12" @@ -2656,9 +2710,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.6" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", @@ -2667,15 +2721,15 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +checksum = "6456b8a6c8f33fee7d958fcd1b60d55b11940a79e63ae87013e6d22e26034440" [[package]] name = "humantime" @@ -2685,9 +2739,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.30" +version = "0.14.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" dependencies = [ "bytes", "futures-channel", @@ -2727,9 +2781,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.24.2" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" dependencies = [ "futures-util", "http", @@ -2766,25 +2820,15 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "ad2bfd338099682614d3ee3fe0cd72e0b6a41ca6a87f6a74a3bd593c91650501" dependencies = [ "android_system_properties", "core-foundation-sys", - "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core 0.52.0", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", + "winapi 0.3.9", ] [[package]] @@ -2838,18 +2882,18 @@ dependencies = [ [[package]] name = "include_dir" -version = "0.7.4" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" +checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" dependencies = [ "include_dir_macros", ] [[package]] name = "include_dir_macros" -version = "0.7.4" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" +checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" dependencies = [ "proc-macro2", "quote", @@ -2857,9 +2901,9 @@ dependencies = [ [[package]] name = "index_list" -version = "0.2.12" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cb725b6505e51229de32027e0cfcd9db29da4d89156f9747b0a5195643fa3e1" +checksum = "70891286cb8e844fdfcf1178b47569699f9e20b5ecc4b45a6240a64771444638" [[package]] name = "indexmap" @@ -2878,7 +2922,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.14.3", "rayon", ] @@ -2901,33 +2945,33 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "generic-array", + "generic-array 0.14.7", ] [[package]] name = "instant" -version = "0.1.13" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if 1.0.0", ] [[package]] name = "ipnet" -version = "2.9.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.9", - "libc", - "windows-sys 0.52.0", + "hermit-abi 0.3.1", + "rustix", + "windows-sys 0.48.0", ] [[package]] @@ -2950,15 +2994,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" dependencies = [ "libc", ] @@ -3128,14 +3172,14 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f81b33bc1276f3df38e938ed17bbb3d5c5eef758aa1a9997ec8388799ba3eef1" dependencies = [ - "hashbrown 0.14.5", + "hashbrown 0.14.3", ] [[package]] name = "lazy_static" -version = "1.5.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "lazycell" @@ -3159,31 +3203,11 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "libloading" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" -dependencies = [ - "cfg-if 1.0.0", - "windows-targets 0.52.6", -] - [[package]] name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - -[[package]] -name = "libredox" -version = "0.1.3" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" -dependencies = [ - "bitflags 2.6.0", - "libc", -] +checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" [[package]] name = "librocksdb-sys" @@ -3250,9 +3274,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.18" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c15da26e5af7e25c90b37a2d75cdbf940cf4a55316de9d84c679c9b8bfabf82e" +checksum = "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66" dependencies = [ "cc", "pkg-config", @@ -3267,27 +3291,27 @@ checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" dependencies = [ "ark-bn254", "ark-ff", - "num-bigint 0.4.6", + "num-bigint 0.4.5", "thiserror", ] [[package]] name = "linked-hash-map" -version = "0.5.6" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" +checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] name = "lock_api" -version = "0.4.12" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -3295,9 +3319,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.22" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "lru" @@ -3324,6 +3348,12 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ca88d725a0a943b096803bd34e73a4437208b6077654cc4ecb2947a5f91618d" +[[package]] +name = "maplit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + [[package]] name = "matches" version = "0.1.10" @@ -3332,15 +3362,15 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "matchit" -version = "0.7.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" [[package]] name = "memchr" -version = "2.7.4" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "memmap2" @@ -3351,6 +3381,15 @@ dependencies = [ "libc", ] +[[package]] +name = "memoffset" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" +dependencies = [ + "autocfg", +] + [[package]] name = "memoffset" version = "0.9.1" @@ -3374,15 +3413,15 @@ dependencies = [ [[package]] name = "mime" -version = "0.3.17" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "mime_guess" -version = "2.0.5" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" dependencies = [ "mime", "unicase", @@ -3396,15 +3435,15 @@ checksum = "2687e6cf9c00f48e9284cf9fd15f2ef341d03cc7743abf9df4c5f07fdee50b18" [[package]] name = "minimal-lexical" -version = "0.2.1" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +checksum = "9c64630dcdd71f1a64c435f54885086a0de5d6a12d104d69b165fb7d5286d677" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", ] @@ -3431,7 +3470,7 @@ dependencies = [ "fragile", "lazy_static", "mockall_derive", - "predicates 2.1.5", + "predicates", "predicates-tree", ] @@ -3476,10 +3515,11 @@ checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] name = "native-tls" -version = "0.2.12" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ + "lazy_static", "libc", "log", "openssl", @@ -3493,9 +3533,9 @@ dependencies = [ [[package]] name = "net2" -version = "0.2.39" +version = "0.2.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b13b648036a2339d06de780866fbdfda0dde886de7b3af2ddeba8b14f4ee34ac" +checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" dependencies = [ "cfg-if 0.1.10", "libc", @@ -3508,21 +3548,22 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.5.0", "cfg-if 1.0.0", "cfg_aliases 0.1.1", "libc", - "memoffset", + "memoffset 0.9.1", ] [[package]] name = "nom" -version = "7.1.3" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +checksum = "7ffd9d26838a953b4af82cbeb9f1592c6798916983959be223a7124e992742c1" dependencies = [ "memchr", "minimal-lexical", + "version_check", ] [[package]] @@ -3558,9 +3599,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.6" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" dependencies = [ "num-integer", "num-traits", @@ -3576,12 +3617,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - [[package]] name = "num-derive" version = "0.4.2" @@ -3590,7 +3625,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", ] [[package]] @@ -3604,9 +3639,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.45" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" dependencies = [ "autocfg", "num-integer", @@ -3641,7 +3676,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi 0.3.1", "libc", ] @@ -3663,7 +3698,16 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", +] + +[[package]] +name = "num_threads" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97ba99ba6393e2c3734791401b66902d981cb03bf190af674ca69949b6d5fb15" +dependencies = [ + "libc", ] [[package]] @@ -3674,47 +3718,53 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.36.1" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" dependencies = [ "memchr", ] [[package]] name = "oid-registry" -version = "0.6.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +checksum = "7d4bda43fd1b844cbc6e6e54b5444e2b1bc7838bce59ad205902cccbb26d6761" dependencies = [ "asn1-rs", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "oorandom" -version = "11.1.4" +version = "11.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" +checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" [[package]] name = "opaque-debug" -version = "0.3.1" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + +[[package]] +name = "opaque-debug" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.5.0", "cfg-if 1.0.0", "foreign-types", "libc", @@ -3725,20 +3775,20 @@ dependencies = [ [[package]] name = "openssl-macros" -version = "0.1.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 1.0.109", ] [[package]] name = "openssl-probe" -version = "0.1.5" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" [[package]] name = "openssl-src" @@ -3751,9 +3801,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -3783,9 +3833,9 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "6.6.1" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" +checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" [[package]] name = "owo-colors" @@ -3815,7 +3865,7 @@ checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", "lock_api", - "parking_lot_core 0.8.6", + "parking_lot_core 0.8.5", ] [[package]] @@ -3825,41 +3875,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", - "parking_lot_core 0.9.10", + "parking_lot_core 0.9.8", ] [[package]] name = "parking_lot_core" -version = "0.8.6" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" dependencies = [ "cfg-if 1.0.0", "instant", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.2.10", "smallvec", "winapi 0.3.9", ] [[package]] name = "parking_lot_core" -version = "0.9.10" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.5.3", + "redox_syscall 0.3.5", "smallvec", - "windows-targets 0.52.6", + "windows-targets 0.48.0", ] [[package]] name = "paste" -version = "1.0.15" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" [[package]] name = "pbkdf2" @@ -3911,20 +3961,18 @@ dependencies = [ [[package]] name = "pest" -version = "2.7.11" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" +checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" dependencies = [ - "memchr", - "thiserror", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.7.11" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a" +checksum = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" dependencies = [ "pest", "pest_generator", @@ -3932,36 +3980,36 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.11" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183" +checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.71", + "syn 1.0.109", ] [[package]] name = "pest_meta" -version = "2.7.11" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f" +checksum = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d" dependencies = [ - "once_cell", + "maplit", "pest", - "sha2 0.10.8", + "sha-1 0.8.2", ] [[package]] name = "petgraph" -version = "0.6.5" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +checksum = "4a13a2fa9d0b63e5f22328828741e523766fff0ee9e779316902290dff3f824f" dependencies = [ "fixedbitset", - "indexmap 2.2.6", + "indexmap 1.9.3", ] [[package]] @@ -3976,22 +4024,22 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.5" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 1.0.109", ] [[package]] @@ -4008,9 +4056,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "12295df4f294471248581bc09bef3c38a5e46f1e36d6a37353621a0c6c357e1f" [[package]] name = "plain" @@ -4020,9 +4068,9 @@ checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" [[package]] name = "plotters" -version = "0.3.6" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15b6eccb8484002195a3e44fe65a4ce8e93a625797a063735536fd59cb01cf3" +checksum = "2538b639e642295546c50fcd545198c9d64ee2a38620a628724a3b266d5fbf97" dependencies = [ "num-traits", "plotters-backend", @@ -4033,15 +4081,15 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.6" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414cec62c6634ae900ea1c56128dfe87cf63e7caece0852ec76aba307cebadb7" +checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142" [[package]] name = "plotters-svg" -version = "0.3.6" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b30686a7d9c3e010b84284bdd26a29f2138574f52f5eb6f794fc0ad924e705" +checksum = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f" dependencies = [ "plotters-backend", ] @@ -4054,27 +4102,21 @@ checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "opaque-debug", + "opaque-debug 0.3.0", "universal-hash", ] [[package]] name = "portable-atomic" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" - -[[package]] -name = "powerfmt" -version = "0.2.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" +checksum = "dc59d1bcc64fc5d021d67521f818db868368028108d37f0e98d74e33f68297b5" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" [[package]] name = "predicates" @@ -4090,28 +4132,17 @@ dependencies = [ "regex", ] -[[package]] -name = "predicates" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b87bfd4605926cdfefc1c3b5f8fe560e3feca9d5552cf68c466d3d8236c7e8" -dependencies = [ - "anstyle", - "difflib", - "predicates-core", -] - [[package]] name = "predicates-core" -version = "1.0.6" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" +checksum = "57e35a3326b75e49aa85f5dc6ec15b41108cf5aee58eabb1f274dd18b73c2451" [[package]] name = "predicates-tree" -version = "1.0.9" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +checksum = "338c7be2905b732ae3984a2f40032b5e94fd8f52505b186c7d4d68d193445df7" dependencies = [ "predicates-core", "termtree", @@ -4125,9 +4156,9 @@ checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" [[package]] name = "prettyplease" -version = "0.1.25" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" +checksum = "3b83ec2d0af5c5c556257ff52c9f98934e243b9fd39604bfb2a9b75ec2e97f18" dependencies = [ "proc-macro2", "syn 1.0.109", @@ -4145,7 +4176,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml 0.5.11", + "toml 0.5.8", ] [[package]] @@ -4183,22 +4214,22 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" dependencies = [ "unicode-ident", ] [[package]] name = "proptest" -version = "1.5.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.6.0", + "bitflags 2.5.0", "lazy_static", "num-traits", "rand 0.8.5", @@ -4266,7 +4297,7 @@ dependencies = [ [[package]] name = "proto" -version = "2.0.2" +version = "2.0.5" dependencies = [ "protobuf-src", "tonic-build", @@ -4298,7 +4329,7 @@ checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", ] [[package]] @@ -4344,9 +4375,9 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "055b4e778e8feb9f93c4e439f71dc2156ef13360b432b799e179a8c4cdf0b1d7" +checksum = "6df19e284d93757a9fb91d63672f7741b129246a669db09d1c0063071debc0c0" dependencies = [ "bytes", "libc", @@ -4457,7 +4488,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.2.10", ] [[package]] @@ -4518,7 +4549,7 @@ dependencies = [ [[package]] name = "rbpf-cli" -version = "2.0.2" +version = "2.0.5" [[package]] name = "rdrand" @@ -4531,40 +4562,30 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" dependencies = [ "bitflags 1.3.2", ] [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_syscall" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" -dependencies = [ - "bitflags 2.6.0", -] - [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" dependencies = [ - "getrandom 0.2.15", - "libredox", - "thiserror", + "getrandom 0.2.10", + "redox_syscall 0.2.10", ] [[package]] @@ -4579,7 +4600,7 @@ dependencies = [ "lru", "parking_lot 0.11.2", "smallvec", - "spin 0.9.8", + "spin 0.9.2", ] [[package]] @@ -4588,28 +4609,34 @@ version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ - "aho-corasick", + "aho-corasick 1.0.1", "memchr", - "regex-automata", + "regex-automata 0.4.4", "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" + +[[package]] +name = "regex-automata" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b7fa1134405e2ec9353fd416b17f8dacd46c473d7d3fd1cf202706a14eb792a" dependencies = [ - "aho-corasick", + "aho-corasick 1.0.1", "memchr", "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" @@ -4639,7 +4666,7 @@ dependencies = [ "percent-encoding 2.3.1", "pin-project-lite", "rustls", - "rustls-pemfile", + "rustls-pemfile 1.0.0", "serde", "serde_json", "serde_urlencoded", @@ -4654,7 +4681,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.25.4", + "webpki-roots 0.25.2", "winreg", ] @@ -4690,17 +4717,16 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.8" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "9babe80d5c16becf6594aa32ad2be8fe08498e7ae60b77de8df700e67f191d7e" dependencies = [ "cc", - "cfg-if 1.0.0", - "getrandom 0.2.15", + "getrandom 0.2.10", "libc", - "spin 0.9.8", + "spin 0.9.2", "untrusted 0.9.0", - "windows-sys 0.52.0", + "windows-sys 0.48.0", ] [[package]] @@ -4735,19 +4761,19 @@ dependencies = [ [[package]] name = "rtoolbox" -version = "0.0.2" +version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" +checksum = "034e22c514f5c0cb8a10ff341b9b048b5ceb21591f31c8f44c43b960f9b3524a" dependencies = [ "libc", - "windows-sys 0.48.0", + "winapi 0.3.9", ] [[package]] name = "rustc-demangle" -version = "0.1.24" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" [[package]] name = "rustc-hash" @@ -4755,13 +4781,22 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver", + "semver 1.0.23", ] [[package]] @@ -4775,11 +4810,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.5.0", "errno", "libc", "linux-raw-sys", @@ -4793,30 +4828,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", - "ring 0.17.8", + "ring 0.17.3", "rustls-webpki", "sct", ] [[package]] name = "rustls-native-certs" -version = "0.6.3" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +checksum = "5ca9ebdfa27d3fc180e42879037b5338ab1c040c06affd00d8338598e7800943" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pemfile 0.2.1", "schannel", "security-framework", ] [[package]] name = "rustls-pemfile" -version = "1.0.4" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9" dependencies = [ - "base64 0.21.7", + "base64 0.13.1", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7522c9de787ff061458fe9a829dc790a3f5b22dc571694fc5883f448b94d9a9" +dependencies = [ + "base64 0.13.1", ] [[package]] @@ -4825,7 +4869,7 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.8", + "ring 0.17.3", "untrusted 0.9.0", ] @@ -4849,9 +4893,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" [[package]] name = "same-file" @@ -4864,11 +4908,12 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" dependencies = [ - "windows-sys 0.52.0", + "lazy_static", + "winapi 0.3.9", ] [[package]] @@ -4894,32 +4939,32 @@ dependencies = [ [[package]] name = "scroll_derive" -version = "0.11.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" +checksum = "bdbda6ac5cd1321e724fa9cee216f3a61885889b896f073b8f82322789c5250e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 1.0.109", ] [[package]] name = "sct" -version = "0.7.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] name = "security-framework" -version = "2.11.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87" dependencies = [ - "bitflags 2.6.0", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -4928,21 +4973,39 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e" dependencies = [ "core-foundation-sys", "libc", ] +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + [[package]] name = "semver" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] + +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" dependencies = [ - "serde", + "pest", ] [[package]] @@ -4956,38 +5019,38 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.204" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] [[package]] name = "serde_bytes" -version = "0.11.15" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" +checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.204" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", ] [[package]] name = "serde_json" -version = "1.0.120" +version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" dependencies = [ "itoa", "ryu", @@ -4996,9 +5059,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.6" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ "serde", ] @@ -5034,7 +5097,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", ] [[package]] @@ -5084,7 +5147,19 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", +] + +[[package]] +name = "sha-1" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" +dependencies = [ + "block-buffer 0.7.3", + "digest 0.8.1", + "fake-simd", + "opaque-debug 0.2.3", ] [[package]] @@ -5097,14 +5172,25 @@ dependencies = [ "cfg-if 1.0.0", "cpufeatures", "digest 0.9.0", - "opaque-debug", + "opaque-debug 0.3.0", +] + +[[package]] +name = "sha-1" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.10.7", ] [[package]] name = "sha1" -version = "0.10.6" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ "cfg-if 1.0.0", "cpufeatures", @@ -5121,7 +5207,7 @@ dependencies = [ "cfg-if 1.0.0", "cpufeatures", "digest 0.9.0", - "opaque-debug", + "opaque-debug 0.3.0", ] [[package]] @@ -5144,7 +5230,7 @@ dependencies = [ "block-buffer 0.9.0", "digest 0.9.0", "keccak", - "opaque-debug", + "opaque-debug 0.3.0", ] [[package]] @@ -5159,9 +5245,9 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.7" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" dependencies = [ "lazy_static", ] @@ -5209,18 +5295,18 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" dependencies = [ "libc", ] [[package]] name = "signature" -version = "1.6.4" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788" [[package]] name = "simpl" @@ -5246,12 +5332,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.9" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" [[package]] name = "smallvec" @@ -5277,9 +5360,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.10" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi 0.3.9", @@ -5307,12 +5390,12 @@ dependencies = [ "httparse", "log", "rand 0.8.5", - "sha-1", + "sha-1 0.9.8", ] [[package]] name = "solana-account-decoder" -version = "2.0.2" +version = "2.0.5" dependencies = [ "Inflector", "assert_matches", @@ -5336,9 +5419,9 @@ dependencies = [ [[package]] name = "solana-accounts-bench" -version = "2.0.2" +version = "2.0.5" dependencies = [ - "clap 2.34.0", + "clap 2.33.3", "log", "rayon", "solana-accounts-db", @@ -5350,9 +5433,9 @@ dependencies = [ [[package]] name = "solana-accounts-cluster-bench" -version = "2.0.2" +version = "2.0.5" dependencies = [ - "clap 2.34.0", + "clap 2.33.3", "log", "rand 0.8.5", "rayon", @@ -5381,7 +5464,7 @@ dependencies = [ [[package]] name = "solana-accounts-db" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "bincode", @@ -5400,7 +5483,7 @@ dependencies = [ "libsecp256k1", "log", "memmap2", - "memoffset", + "memoffset 0.9.1", "modular-bitfield", "num_cpus", "num_enum", @@ -5408,7 +5491,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "rayon", - "rustc_version", + "rustc_version 0.4.0", "seqlock", "serde", "serde_bytes", @@ -5438,14 +5521,14 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-program" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "bytemuck", "log", "num-derive", "num-traits", - "rustc_version", + "rustc_version 0.4.0", "solana-program", "solana-program-runtime", "solana-sdk", @@ -5454,7 +5537,7 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-program-tests" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "bincode", @@ -5465,9 +5548,9 @@ dependencies = [ [[package]] name = "solana-banking-bench" -version = "2.0.2" +version = "2.0.5" dependencies = [ - "clap 3.2.25", + "clap 3.2.23", "crossbeam-channel", "log", "rand 0.8.5", @@ -5489,7 +5572,7 @@ dependencies = [ [[package]] name = "solana-banks-client" -version = "2.0.2" +version = "2.0.5" dependencies = [ "borsh 1.5.1", "futures 0.3.30", @@ -5506,7 +5589,7 @@ dependencies = [ [[package]] name = "solana-banks-interface" -version = "2.0.2" +version = "2.0.5" dependencies = [ "serde", "serde_derive", @@ -5516,7 +5599,7 @@ dependencies = [ [[package]] name = "solana-banks-server" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "crossbeam-channel", @@ -5534,9 +5617,9 @@ dependencies = [ [[package]] name = "solana-bench-streamer" -version = "2.0.2" +version = "2.0.5" dependencies = [ - "clap 3.2.25", + "clap 3.2.23", "crossbeam-channel", "solana-net-utils", "solana-streamer", @@ -5545,10 +5628,10 @@ dependencies = [ [[package]] name = "solana-bench-tps" -version = "2.0.2" +version = "2.0.5" dependencies = [ "chrono", - "clap 2.34.0", + "clap 2.33.3", "crossbeam-channel", "csv", "log", @@ -5591,14 +5674,14 @@ dependencies = [ [[package]] name = "solana-bloom" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bv", "fnv", "log", "rand 0.8.5", "rayon", - "rustc_version", + "rustc_version 0.4.0", "serde", "serde_derive", "solana-frozen-abi", @@ -5608,14 +5691,14 @@ dependencies = [ [[package]] name = "solana-bpf-loader-program" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "bincode", "byteorder", "libsecp256k1", "log", - "memoffset", + "memoffset 0.9.1", "rand 0.8.5", "scopeguard", "solana-compute-budget", @@ -5633,7 +5716,7 @@ dependencies = [ [[package]] name = "solana-bpf-loader-program-tests" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "bincode", @@ -5644,7 +5727,7 @@ dependencies = [ [[package]] name = "solana-bucket-map" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bv", "bytemuck", @@ -5664,7 +5747,7 @@ dependencies = [ [[package]] name = "solana-cargo-build-bpf" -version = "2.0.2" +version = "2.0.5" dependencies = [ "log", "solana-logger", @@ -5672,18 +5755,18 @@ dependencies = [ [[package]] name = "solana-cargo-build-sbf" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_cmd", "bzip2", "cargo_metadata", - "clap 3.2.25", + "clap 3.2.23", "itertools 0.12.1", "log", - "predicates 2.1.5", + "predicates", "regex", "reqwest", - "semver", + "semver 1.0.23", "serial_test", "solana-download-utils", "solana-logger", @@ -5693,14 +5776,14 @@ dependencies = [ [[package]] name = "solana-cargo-test-bpf" -version = "2.0.2" +version = "2.0.5" [[package]] name = "solana-cargo-test-sbf" -version = "2.0.2" +version = "2.0.5" dependencies = [ "cargo_metadata", - "clap 3.2.25", + "clap 3.2.23", "itertools 0.12.1", "log", "regex", @@ -5709,11 +5792,11 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "chrono", - "clap 2.34.0", + "clap 2.33.3", "rpassword", "solana-remote-wallet", "solana-sdk", @@ -5726,11 +5809,11 @@ dependencies = [ [[package]] name = "solana-clap-v3-utils" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "chrono", - "clap 3.2.25", + "clap 3.2.23", "rpassword", "solana-remote-wallet", "solana-sdk", @@ -5744,12 +5827,12 @@ dependencies = [ [[package]] name = "solana-cli" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "bincode", "bs58", - "clap 2.34.0", + "clap 2.33.3", "console", "const_format", "criterion-stats", @@ -5761,7 +5844,7 @@ dependencies = [ "num-traits", "pretty-hex", "reqwest", - "semver", + "semver 1.0.23", "serde", "serde_derive", "serde_json", @@ -5803,7 +5886,7 @@ dependencies = [ [[package]] name = "solana-cli-config" -version = "2.0.2" +version = "2.0.5" dependencies = [ "anyhow", "dirs-next", @@ -5818,18 +5901,18 @@ dependencies = [ [[package]] name = "solana-cli-output" -version = "2.0.2" +version = "2.0.5" dependencies = [ "Inflector", "base64 0.22.1", "chrono", - "clap 2.34.0", + "clap 2.33.3", "console", "ed25519-dalek", "humantime", "indicatif", "pretty-hex", - "semver", + "semver 1.0.23", "serde", "serde_json", "solana-account-decoder", @@ -5844,7 +5927,7 @@ dependencies = [ [[package]] name = "solana-client" -version = "2.0.2" +version = "2.0.5" dependencies = [ "async-trait", "bincode", @@ -5876,7 +5959,7 @@ dependencies = [ [[package]] name = "solana-client-test" -version = "2.0.2" +version = "2.0.5" dependencies = [ "futures-util", "rand 0.8.5", @@ -5906,9 +5989,9 @@ dependencies = [ [[package]] name = "solana-compute-budget" -version = "2.0.2" +version = "2.0.5" dependencies = [ - "rustc_version", + "rustc_version 0.4.0", "serde", "serde_derive", "solana-frozen-abi", @@ -5917,7 +6000,7 @@ dependencies = [ [[package]] name = "solana-compute-budget-program" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program-runtime", "solana-sdk", @@ -5925,7 +6008,7 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "chrono", @@ -5938,7 +6021,7 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "2.0.2" +version = "2.0.5" dependencies = [ "async-trait", "bincode", @@ -5961,9 +6044,9 @@ dependencies = [ [[package]] name = "solana-core" -version = "2.0.2" +version = "2.0.5" dependencies = [ - "ahash 0.8.11", + "ahash 0.8.10", "assert_matches", "base64 0.22.1", "bincode", @@ -5989,7 +6072,7 @@ dependencies = [ "rand_chacha 0.3.1", "rayon", "rolling-file", - "rustc_version", + "rustc_version 0.4.0", "rustls", "serde", "serde_bytes", @@ -6049,13 +6132,13 @@ dependencies = [ [[package]] name = "solana-cost-model" -version = "2.0.2" +version = "2.0.5" dependencies = [ - "ahash 0.8.11", + "ahash 0.8.10", "itertools 0.12.1", "lazy_static", "log", - "rustc_version", + "rustc_version 0.4.0", "solana-address-lookup-table-program", "solana-bpf-loader-program", "solana-compute-budget", @@ -6075,7 +6158,7 @@ dependencies = [ [[package]] name = "solana-curve25519" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bytemuck", "bytemuck_derive", @@ -6086,10 +6169,10 @@ dependencies = [ [[package]] name = "solana-dos" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", - "clap 3.2.25", + "clap 3.2.23", "crossbeam-channel", "itertools 0.12.1", "log", @@ -6119,7 +6202,7 @@ dependencies = [ [[package]] name = "solana-download-utils" -version = "2.0.2" +version = "2.0.5" dependencies = [ "console", "indicatif", @@ -6131,7 +6214,7 @@ dependencies = [ [[package]] name = "solana-ed25519-program-tests" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "ed25519-dalek", @@ -6142,7 +6225,7 @@ dependencies = [ [[package]] name = "solana-entry" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "bincode", @@ -6164,11 +6247,11 @@ dependencies = [ [[package]] name = "solana-faucet" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "byteorder", - "clap 2.34.0", + "clap 2.33.3", "crossbeam-channel", "log", "serde", @@ -6186,16 +6269,16 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "2.0.2" +version = "2.0.5" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.5.0", "bs58", "bv", - "generic-array", + "generic-array 0.14.7", "im", "log", "memmap2", - "rustc_version", + "rustc_version 0.4.0", "serde", "serde_bytes", "serde_derive", @@ -6207,21 +6290,21 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "2.0.2" +version = "2.0.5" dependencies = [ "proc-macro2", "quote", - "rustc_version", - "syn 2.0.71", + "rustc_version 0.4.0", + "syn 2.0.66", ] [[package]] name = "solana-genesis" -version = "2.0.2" +version = "2.0.5" dependencies = [ "base64 0.22.1", "bincode", - "clap 2.34.0", + "clap 2.33.3", "itertools 0.12.1", "serde", "serde_json", @@ -6242,7 +6325,7 @@ dependencies = [ [[package]] name = "solana-genesis-utils" -version = "2.0.2" +version = "2.0.5" dependencies = [ "log", "solana-accounts-db", @@ -6253,14 +6336,14 @@ dependencies = [ [[package]] name = "solana-geyser-plugin-manager" -version = "2.0.2" +version = "2.0.5" dependencies = [ "agave-geyser-plugin-interface", "bs58", "crossbeam-channel", "json5", "jsonrpc-core", - "libloading 0.7.4", + "libloading", "log", "serde_json", "solana-accounts-db", @@ -6278,12 +6361,12 @@ dependencies = [ [[package]] name = "solana-gossip" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "bincode", "bv", - "clap 2.34.0", + "clap 2.33.3", "crossbeam-channel", "flate2", "indexmap 2.2.6", @@ -6295,7 +6378,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "rayon", - "rustc_version", + "rustc_version 0.4.0", "rustversion", "serde", "serde_bytes", @@ -6329,19 +6412,19 @@ dependencies = [ [[package]] name = "solana-inline-spl" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bytemuck", - "rustc_version", + "rustc_version 0.4.0", "solana-sdk", ] [[package]] name = "solana-keygen" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bs58", - "clap 3.2.25", + "clap 3.2.23", "dirs-next", "num_cpus", "solana-clap-v3-utils", @@ -6355,11 +6438,11 @@ dependencies = [ [[package]] name = "solana-ledger" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "bincode", - "bitflags 2.6.0", + "bitflags 2.5.0", "bs58", "byteorder", "chrono", @@ -6379,12 +6462,13 @@ dependencies = [ "num_cpus", "num_enum", "prost", + "qualifier_attr", "rand 0.8.5", "rand_chacha 0.3.1", "rayon", "reed-solomon-erasure", "rocksdb", - "rustc_version", + "rustc_version 0.4.0", "scopeguard", "serde", "serde_bytes", @@ -6427,7 +6511,7 @@ dependencies = [ [[package]] name = "solana-loader-v4-program" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "log", @@ -6441,7 +6525,7 @@ dependencies = [ [[package]] name = "solana-local-cluster" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "crossbeam-channel", @@ -6482,10 +6566,10 @@ dependencies = [ [[package]] name = "solana-log-analyzer" -version = "2.0.2" +version = "2.0.5" dependencies = [ "byte-unit", - "clap 3.2.25", + "clap 3.2.23", "serde", "serde_json", "solana-logger", @@ -6494,7 +6578,7 @@ dependencies = [ [[package]] name = "solana-logger" -version = "2.0.2" +version = "2.0.5" dependencies = [ "env_logger", "lazy_static", @@ -6503,7 +6587,7 @@ dependencies = [ [[package]] name = "solana-measure" -version = "2.0.2" +version = "2.0.5" dependencies = [ "log", "solana-sdk", @@ -6511,13 +6595,13 @@ dependencies = [ [[package]] name = "solana-memory-management" -version = "2.0.2" +version = "2.0.5" [[package]] name = "solana-merkle-root-bench" -version = "2.0.2" +version = "2.0.5" dependencies = [ - "clap 2.34.0", + "clap 2.33.3", "log", "solana-accounts-db", "solana-logger", @@ -6528,7 +6612,7 @@ dependencies = [ [[package]] name = "solana-merkle-tree" -version = "2.0.2" +version = "2.0.5" dependencies = [ "fast-math", "hex", @@ -6537,7 +6621,7 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "2.0.2" +version = "2.0.5" dependencies = [ "crossbeam-channel", "env_logger", @@ -6553,9 +6637,9 @@ dependencies = [ [[package]] name = "solana-net-shaper" -version = "2.0.2" +version = "2.0.5" dependencies = [ - "clap 3.2.25", + "clap 3.2.23", "rand 0.8.5", "serde", "serde_derive", @@ -6565,10 +6649,10 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", - "clap 3.2.25", + "clap 3.2.23", "crossbeam-channel", "log", "nix", @@ -6592,7 +6676,7 @@ checksum = "8b8a731ed60e89177c8a7ab05fe0f1511cedd3e70e773f288f9de33a9cfdc21e" [[package]] name = "solana-notifier" -version = "2.0.2" +version = "2.0.5" dependencies = [ "log", "reqwest", @@ -6602,19 +6686,19 @@ dependencies = [ [[package]] name = "solana-package-metadata-macro" -version = "2.0.2" +version = "2.0.5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", - "toml 0.8.14", + "syn 2.0.66", + "toml 0.8.12", ] [[package]] name = "solana-perf" -version = "2.0.2" +version = "2.0.5" dependencies = [ - "ahash 0.8.11", + "ahash 0.8.10", "assert_matches", "bincode", "bv", @@ -6629,7 +6713,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "rayon", - "rustc_version", + "rustc_version 0.4.0", "serde", "solana-frozen-abi", "solana-frozen-abi-macro", @@ -6642,7 +6726,7 @@ dependencies = [ [[package]] name = "solana-poh" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "bincode", @@ -6664,9 +6748,9 @@ dependencies = [ [[package]] name = "solana-poh-bench" -version = "2.0.2" +version = "2.0.5" dependencies = [ - "clap 3.2.25", + "clap 3.2.23", "log", "rayon", "solana-entry", @@ -6680,7 +6764,7 @@ dependencies = [ [[package]] name = "solana-poseidon" -version = "2.0.2" +version = "2.0.5" dependencies = [ "ark-bn254", "light-poseidon", @@ -6689,7 +6773,7 @@ dependencies = [ [[package]] name = "solana-program" -version = "2.0.2" +version = "2.0.5" dependencies = [ "anyhow", "arbitrary", @@ -6701,7 +6785,7 @@ dependencies = [ "assert_matches", "base64 0.22.1", "bincode", - "bitflags 2.6.0", + "bitflags 2.5.0", "blake3", "borsh 0.10.3", "borsh 1.5.1", @@ -6712,20 +6796,20 @@ dependencies = [ "console_error_panic_hook", "console_log", "curve25519-dalek", - "getrandom 0.2.15", + "getrandom 0.2.10", "itertools 0.12.1", "js-sys", "lazy_static", "libsecp256k1", "log", - "memoffset", - "num-bigint 0.4.6", + "memoffset 0.9.1", + "num-bigint 0.4.5", "num-derive", "num-traits", "parking_lot 0.12.3", "qualifier_attr", "rand 0.8.5", - "rustc_version", + "rustc_version 0.4.0", "rustversion", "serde", "serde_bytes", @@ -6744,7 +6828,7 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "base64 0.22.1", @@ -6758,7 +6842,7 @@ dependencies = [ "num-traits", "percentage", "rand 0.8.5", - "rustc_version", + "rustc_version 0.4.0", "serde", "solana-compute-budget", "solana-frozen-abi", @@ -6775,7 +6859,7 @@ dependencies = [ [[package]] name = "solana-program-test" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "async-trait", @@ -6807,14 +6891,14 @@ dependencies = [ [[package]] name = "solana-pubsub-client" -version = "2.0.2" +version = "2.0.5" dependencies = [ "anyhow", "crossbeam-channel", "futures-util", "log", "reqwest", - "semver", + "semver 1.0.23", "serde", "serde_derive", "serde_json", @@ -6831,7 +6915,7 @@ dependencies = [ [[package]] name = "solana-quic-client" -version = "2.0.2" +version = "2.0.5" dependencies = [ "async-mutex", "async-trait", @@ -6858,7 +6942,7 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "2.0.2" +version = "2.0.5" dependencies = [ "lazy_static", "num_cpus", @@ -6866,7 +6950,7 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "console", @@ -6877,7 +6961,7 @@ dependencies = [ "num-traits", "parking_lot 0.12.3", "qstring", - "semver", + "semver 1.0.23", "solana-sdk", "thiserror", "uriparse", @@ -6885,7 +6969,7 @@ dependencies = [ [[package]] name = "solana-rpc" -version = "2.0.2" +version = "2.0.5" dependencies = [ "base64 0.22.1", "bincode", @@ -6946,7 +7030,7 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "async-trait", @@ -6961,7 +7045,7 @@ dependencies = [ "log", "reqwest", "reqwest-middleware", - "semver", + "semver 1.0.23", "serde", "serde_derive", "serde_json", @@ -6976,7 +7060,7 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "2.0.2" +version = "2.0.5" dependencies = [ "anyhow", "base64 0.22.1", @@ -6985,7 +7069,7 @@ dependencies = [ "jsonrpc-core", "reqwest", "reqwest-middleware", - "semver", + "semver 1.0.23", "serde", "serde_derive", "serde_json", @@ -6999,10 +7083,10 @@ dependencies = [ [[package]] name = "solana-rpc-client-nonce-utils" -version = "2.0.2" +version = "2.0.5" dependencies = [ "anyhow", - "clap 2.34.0", + "clap 2.33.3", "futures 0.3.30", "serde_json", "solana-account-decoder", @@ -7016,7 +7100,7 @@ dependencies = [ [[package]] name = "solana-rpc-test" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "bs58", @@ -7043,7 +7127,7 @@ dependencies = [ [[package]] name = "solana-runtime" -version = "2.0.2" +version = "2.0.5" dependencies = [ "aquamarine", "arrayref", @@ -7068,7 +7152,7 @@ dependencies = [ "libsecp256k1", "log", "memmap2", - "memoffset", + "memoffset 0.9.1", "mockall", "modular-bitfield", "num-derive", @@ -7081,7 +7165,7 @@ dependencies = [ "rand_chacha 0.3.1", "rayon", "regex", - "rustc_version", + "rustc_version 0.4.0", "serde", "serde_derive", "serde_json", @@ -7124,12 +7208,12 @@ dependencies = [ [[package]] name = "solana-runtime-transaction" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "log", "rand 0.8.5", - "rustc_version", + "rustc_version 0.4.0", "solana-compute-budget", "solana-program", "solana-sdk", @@ -7138,12 +7222,12 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "2.0.2" +version = "2.0.5" dependencies = [ "anyhow", "assert_matches", "bincode", - "bitflags 2.6.0", + "bitflags 2.5.0", "borsh 1.5.1", "bs58", "bytemuck", @@ -7155,7 +7239,7 @@ dependencies = [ "digest 0.10.7", "ed25519-dalek", "ed25519-dalek-bip32", - "generic-array", + "generic-array 0.14.7", "getrandom 0.1.16", "hex", "hmac 0.12.1", @@ -7171,7 +7255,7 @@ dependencies = [ "qualifier_attr", "rand 0.7.3", "rand 0.8.5", - "rustc_version", + "rustc_version 0.4.0", "rustversion", "serde", "serde_bytes", @@ -7196,13 +7280,13 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bs58", "proc-macro2", "quote", "rustversion", - "syn 2.0.71", + "syn 2.0.66", ] [[package]] @@ -7213,7 +7297,7 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-send-transaction-service" -version = "2.0.2" +version = "2.0.5" dependencies = [ "crossbeam-channel", "log", @@ -7229,9 +7313,9 @@ dependencies = [ [[package]] name = "solana-stake-accounts" -version = "2.0.2" +version = "2.0.5" dependencies = [ - "clap 2.34.0", + "clap 2.33.3", "solana-clap-utils", "solana-cli-config", "solana-remote-wallet", @@ -7245,13 +7329,13 @@ dependencies = [ [[package]] name = "solana-stake-program" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "bincode", "log", "proptest", - "rustc_version", + "rustc_version 0.4.0", "solana-compute-budget", "solana-config-program", "solana-logger", @@ -7262,9 +7346,22 @@ dependencies = [ "test-case", ] +[[package]] +name = "solana-stake-program-tests" +version = "2.0.5" +dependencies = [ + "assert_matches", + "bincode", + "rustc_version 0.4.0", + "solana-program-test", + "solana-sdk", + "solana-vote-program", + "test-case", +] + [[package]] name = "solana-storage-bigtable" -version = "2.0.2" +version = "2.0.5" dependencies = [ "backoff", "bincode", @@ -7296,7 +7393,7 @@ dependencies = [ [[package]] name = "solana-storage-proto" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "bs58", @@ -7312,7 +7409,7 @@ dependencies = [ [[package]] name = "solana-streamer" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "async-channel", @@ -7346,7 +7443,7 @@ dependencies = [ [[package]] name = "solana-svm" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "itertools 0.12.1", @@ -7359,7 +7456,7 @@ dependencies = [ "prost-types", "qualifier_attr", "rand 0.8.5", - "rustc_version", + "rustc_version 0.4.0", "serde", "serde_derive", "solana-bpf-loader-program", @@ -7380,7 +7477,7 @@ dependencies = [ [[package]] name = "solana-system-program" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "bincode", @@ -7396,7 +7493,7 @@ dependencies = [ [[package]] name = "solana-test-validator" -version = "2.0.2" +version = "2.0.5" dependencies = [ "base64 0.22.1", "bincode", @@ -7426,7 +7523,7 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "log", @@ -7440,12 +7537,12 @@ dependencies = [ [[package]] name = "solana-tokens" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "bincode", "chrono", - "clap 2.34.0", + "clap 2.33.3", "console", "csv", "ctrlc", @@ -7474,7 +7571,7 @@ dependencies = [ [[package]] name = "solana-tps-client" -version = "2.0.2" +version = "2.0.5" dependencies = [ "log", "serial_test", @@ -7495,7 +7592,7 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "2.0.2" +version = "2.0.5" dependencies = [ "async-trait", "bincode", @@ -7517,10 +7614,10 @@ dependencies = [ [[package]] name = "solana-transaction-dos" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", - "clap 2.34.0", + "clap 2.33.3", "log", "rand 0.8.5", "rayon", @@ -7544,7 +7641,7 @@ dependencies = [ [[package]] name = "solana-transaction-metrics-tracker" -version = "2.0.2" +version = "2.0.5" dependencies = [ "Inflector", "base64 0.22.1", @@ -7558,7 +7655,7 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "2.0.2" +version = "2.0.5" dependencies = [ "Inflector", "base64 0.22.1", @@ -7583,7 +7680,7 @@ dependencies = [ [[package]] name = "solana-turbine" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "bincode", @@ -7613,6 +7710,7 @@ dependencies = [ "solana-runtime", "solana-sdk", "solana-streamer", + "static_assertions", "test-case", "thiserror", "tokio", @@ -7620,7 +7718,7 @@ dependencies = [ [[package]] name = "solana-type-overrides" -version = "2.0.2" +version = "2.0.5" dependencies = [ "futures 0.3.30", "lazy_static", @@ -7630,7 +7728,7 @@ dependencies = [ [[package]] name = "solana-udp-client" -version = "2.0.2" +version = "2.0.5" dependencies = [ "async-trait", "solana-connection-cache", @@ -7643,7 +7741,7 @@ dependencies = [ [[package]] name = "solana-unified-scheduler-logic" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "solana-sdk", @@ -7652,7 +7750,7 @@ dependencies = [ [[package]] name = "solana-unified-scheduler-pool" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "crossbeam-channel", @@ -7673,7 +7771,7 @@ dependencies = [ [[package]] name = "solana-upload-perf" -version = "2.0.2" +version = "2.0.5" dependencies = [ "serde_json", "solana-metrics", @@ -7681,11 +7779,11 @@ dependencies = [ [[package]] name = "solana-version" -version = "2.0.2" +version = "2.0.5" dependencies = [ "log", - "rustc_version", - "semver", + "rustc_version 0.4.0", + "semver 1.0.23", "serde", "serde_derive", "solana-frozen-abi", @@ -7695,13 +7793,13 @@ dependencies = [ [[package]] name = "solana-vote" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "itertools 0.12.1", "log", "rand 0.8.5", - "rustc_version", + "rustc_version 0.4.0", "serde", "serde_derive", "solana-frozen-abi", @@ -7712,14 +7810,14 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "bincode", "log", "num-derive", "num-traits", - "rustc_version", + "rustc_version 0.4.0", "serde", "serde_derive", "solana-frozen-abi", @@ -7734,7 +7832,7 @@ dependencies = [ [[package]] name = "solana-wen-restart" -version = "2.0.2" +version = "2.0.5" dependencies = [ "anyhow", "assert_matches", @@ -7745,7 +7843,7 @@ dependencies = [ "protobuf-src", "rand 0.8.5", "rayon", - "rustc_version", + "rustc_version 0.4.0", "serial_test", "solana-accounts-db", "solana-entry", @@ -7763,7 +7861,7 @@ dependencies = [ [[package]] name = "solana-zk-elgamal-proof-program" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bytemuck", "num-derive", @@ -7775,10 +7873,10 @@ dependencies = [ [[package]] name = "solana-zk-keygen" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bs58", - "clap 3.2.25", + "clap 3.2.23", "dirs-next", "num_cpus", "solana-clap-v3-utils", @@ -7794,7 +7892,7 @@ dependencies = [ [[package]] name = "solana-zk-sdk" -version = "2.0.2" +version = "2.0.5" dependencies = [ "aes-gcm-siv", "base64 0.22.1", @@ -7822,7 +7920,7 @@ dependencies = [ [[package]] name = "solana-zk-token-proof-program" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bytemuck", "criterion", @@ -7836,7 +7934,7 @@ dependencies = [ [[package]] name = "solana-zk-token-proof-program-tests" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bytemuck", "curve25519-dalek", @@ -7848,7 +7946,7 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "2.0.2" +version = "2.0.5" dependencies = [ "aes-gcm-siv", "base64 0.22.1", @@ -7878,9 +7976,9 @@ dependencies = [ [[package]] name = "solana_rbpf" -version = "0.8.1" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06beab07f4104d6ad70d47baa67ad1bcd501a2345a983e20c389bade7c72305e" +checksum = "ff08afd63f70a1ba712fb0017be41e93b017f7e874785b54bb5ec9aa8949781d" dependencies = [ "byteorder", "combine", @@ -7904,9 +8002,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spin" -version = "0.9.8" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +checksum = "511254be0c5bcf062b019a6c89c01a664aa359ded62f78aa72c6fc137c0590e5" [[package]] name = "spl-associated-token-account" @@ -7943,7 +8041,7 @@ checksum = "d9e8418ea6269dcfb01c712f0444d2c75542c04448b480e87de59d2865edc750" dependencies = [ "quote", "spl-discriminator-syn", - "syn 2.0.71", + "syn 2.0.66", ] [[package]] @@ -7955,7 +8053,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.71", + "syn 2.0.66", "thiserror", ] @@ -8014,7 +8112,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.71", + "syn 2.0.66", ] [[package]] @@ -8155,12 +8253,6 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - [[package]] name = "strum" version = "0.24.1" @@ -8185,9 +8277,9 @@ dependencies = [ [[package]] name = "subtle" -version = "2.6.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "symlink" @@ -8208,9 +8300,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.71" +version = "2.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" dependencies = [ "proc-macro2", "quote", @@ -8226,7 +8318,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", ] [[package]] @@ -8380,18 +8472,18 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.4.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" dependencies = [ "winapi-util", ] [[package]] name = "termtree" -version = "0.4.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" +checksum = "13a4ec180a2de59b57434704ccfad967f789b12737738798fa08798cd5824c16" [[package]] name = "test-case" @@ -8404,25 +8496,27 @@ dependencies = [ [[package]] name = "test-case-core" -version = "3.3.1" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcb7fd841cd518e279be3d5a3eb0636409487998a4aff22f3de87b81e88384f" +checksum = "54c25e2cb8f5fcd7318157634e8838aa6f7e4715c96637f969fabaccd1ef5462" dependencies = [ "cfg-if 1.0.0", + "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", ] [[package]] name = "test-case-macros" -version = "3.3.1" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" +checksum = "37cfd7bbc88a0104e304229fba519bdc45501a30b760fb72240342f1289ad257" dependencies = [ + "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", "test-case-core", ] @@ -8437,28 +8531,28 @@ dependencies = [ [[package]] name = "textwrap" -version = "0.16.1" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" +checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.62" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.62" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", ] [[package]] @@ -8469,19 +8563,18 @@ checksum = "bcbb6aa301e5d3b0b5ef639c9a9c7e2f1c944f177b460c04dc24c69b1fa2bd99" [[package]] name = "thread_local" -version = "1.1.8" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" dependencies = [ - "cfg-if 1.0.0", "once_cell", ] [[package]] name = "tikv-jemalloc-sys" -version = "0.4.3+5.2.1-patched.2" +version = "0.4.2+5.2.1-patched.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1792ccb507d955b46af42c123ea8863668fae24d03721e40cad6a41773dbb49" +checksum = "5844e429d797c62945a566f8da4e24c7fe3fbd5d6617fd8bf7a0b7dc1ee0f22e" dependencies = [ "cc", "fs_extra", @@ -8490,9 +8583,9 @@ dependencies = [ [[package]] name = "tikv-jemallocator" -version = "0.4.3" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5b7bcecfafe4998587d636f9ae9d55eb9d0499877b88757767c346875067098" +checksum = "3c14a5a604eb8715bc5785018a37d00739b180bcf609916ddf4393d33d49ccdf" dependencies = [ "libc", "tikv-jemalloc-sys", @@ -8500,34 +8593,21 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd" dependencies = [ - "deranged", "itoa", - "num-conv", - "powerfmt", - "serde", - "time-core", + "libc", + "num_threads", "time-macros", ] -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" -dependencies = [ - "num-conv", - "time-core", -] +checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792" [[package]] name = "tiny-bip39" @@ -8560,18 +8640,18 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.8.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ "tinyvec_macros", ] [[package]] name = "tinyvec_macros" -version = "0.1.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" @@ -8587,16 +8667,16 @@ dependencies = [ "parking_lot 0.12.3", "pin-project-lite", "signal-hook-registry", - "socket2 0.4.10", + "socket2 0.4.9", "tokio-macros", "windows-sys 0.48.0", ] [[package]] name = "tokio-io-timeout" -version = "1.2.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +checksum = "90c49f106be240de154571dd31fbe48acb10ba6c6dd6f6517ad603abffa42de9" dependencies = [ "pin-project-lite", "tokio", @@ -8609,14 +8689,14 @@ source = "git+https://github.com/anza-xyz/solana-tokio.git?rev=7cf47705faacf7bf0 dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", ] [[package]] name = "tokio-native-tls" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" dependencies = [ "native-tls", "tokio", @@ -8671,7 +8751,7 @@ dependencies = [ "tokio", "tokio-rustls", "tungstenite", - "webpki-roots 0.25.4", + "webpki-roots 0.25.2", ] [[package]] @@ -8705,30 +8785,30 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.11" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" dependencies = [ "serde", ] [[package]] name = "toml" -version = "0.8.14" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.15", + "toml_edit 0.22.12", ] [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] @@ -8741,14 +8821,14 @@ checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ "indexmap 2.2.6", "toml_datetime", - "winnow 0.5.40", + "winnow 0.5.16", ] [[package]] name = "toml_edit" -version = "0.22.15" +version = "0.22.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1" +checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" dependencies = [ "indexmap 2.2.6", "serde", @@ -8778,7 +8858,7 @@ dependencies = [ "percent-encoding 2.3.1", "pin-project", "prost", - "rustls-pemfile", + "rustls-pemfile 1.0.0", "tokio", "tokio-rustls", "tokio-stream", @@ -8853,7 +8933,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", ] [[package]] @@ -8868,11 +8948,10 @@ dependencies = [ [[package]] name = "tracing-opentelemetry" -version = "0.17.4" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbbe89715c1dbbb790059e2565353978564924ee85017b5fff365c872ff6721f" +checksum = "1f9378e96a9361190ae297e7f3a8ff644aacd2897f244b1ff81f381669196fa6" dependencies = [ - "once_cell", "opentelemetry", "tracing", "tracing-core", @@ -8881,9 +8960,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "5312f325fe3588e277415f5a6cca1f4ccad0f248c4cd5a4bd33032d7286abc22" dependencies = [ "sharded-slab", "thread_local", @@ -8898,9 +8977,9 @@ checksum = "0de5f738ceab88e2491a94ddc33c3feeadfa95fedc60363ef110845df12f3878" [[package]] name = "try-lock" -version = "0.2.5" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "tungstenite" @@ -8925,15 +9004,15 @@ dependencies = [ [[package]] name = "typenum" -version = "1.17.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "ucd-trie" -version = "0.1.6" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" +checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" [[package]] name = "unarray" @@ -8943,45 +9022,45 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unicase" -version = "2.7.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" +checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" dependencies = [ "version_check", ] [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "15c61ba63f9235225a22310255a29b806b907c9b8c964bcbd0a2c70f3f2deea7" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" [[package]] name = "universal-hash" @@ -9060,9 +9139,9 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "utf8-width" -version = "0.1.7" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" +checksum = "7cf7d77f457ef8dfa11e4cd5933c5ddb5dc52a94664071951219a97710f0a32b" [[package]] name = "valuable" @@ -9111,20 +9190,22 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.5.0" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" dependencies = [ "same-file", + "winapi 0.3.9", "winapi-util", ] [[package]] name = "want" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" dependencies = [ + "log", "try-lock", ] @@ -9161,15 +9242,15 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -9195,7 +9276,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -9208,9 +9289,9 @@ checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" dependencies = [ "js-sys", "wasm-bindgen", @@ -9227,20 +9308,19 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.4" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" [[package]] name = "which" -version = "4.4.2" +version = "4.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +checksum = "ea187a8ef279bc014ec368c27a920da2024d2a711109bfbe3440585d5cf27ad9" dependencies = [ "either", - "home", - "once_cell", - "rustix", + "lazy_static", + "libc", ] [[package]] @@ -9273,11 +9353,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "windows-sys 0.52.0", + "winapi 0.3.9", ] [[package]] @@ -9292,17 +9372,8 @@ version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" dependencies = [ - "windows-core 0.54.0", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.6", + "windows-core", + "windows-targets 0.52.5", ] [[package]] @@ -9312,16 +9383,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" dependencies = [ "windows-result", - "windows-targets 0.52.6", + "windows-targets 0.52.5", ] [[package]] name = "windows-result" -version = "0.1.2" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" +checksum = "749f0da9cc72d82e600d8d2e44cadd0b9eedb9038f71a1c58556ac1c5791813b" dependencies = [ - "windows-targets 0.52.6", + "windows-targets 0.52.5", ] [[package]] @@ -9330,7 +9401,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.5", + "windows-targets 0.48.0", ] [[package]] @@ -9339,135 +9410,135 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets 0.52.5", ] [[package]] name = "windows-targets" -version = "0.48.5" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] [[package]] name = "windows-targets" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.5" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" -version = "0.48.5" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" [[package]] name = "windows_aarch64_msvc" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" -version = "0.48.5" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] name = "windows_i686_gnu" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" [[package]] name = "windows_i686_gnullvm" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" -version = "0.48.5" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" [[package]] name = "windows_i686_msvc" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" -version = "0.48.5" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" [[package]] name = "windows_x86_64_gnu" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.5" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" -version = "0.48.5" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "windows_x86_64_msvc" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" -version = "0.5.40" +version = "0.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +checksum = "037711d82167854aff2018dfd193aa0fef5370f456732f0d5a0c59b0f1b4b907" dependencies = [ "memchr", ] @@ -9540,29 +9611,29 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.35" +version = "0.7.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +checksum = "1c4061bedbb353041c12f413700357bec76df2c7e2ca8e4df8bac24c6bf68e3d" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.35" +version = "0.7.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", ] [[package]] name = "zeroize" -version = "1.8.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" dependencies = [ "zeroize_derive", ] @@ -9575,7 +9646,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.66", ] [[package]] @@ -9589,9 +9660,9 @@ dependencies = [ [[package]] name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" +version = "5.0.1+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +checksum = "7c12659121420dd6365c5c3de4901f97145b79651fb1d25814020ed2ed0585ae" dependencies = [ "libc", "zstd-sys", @@ -9599,15 +9670,10 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.12+zstd.1.5.6" +version = "2.0.1+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e40c320c3cb459d9a9ff6de98cff88f4751ee9275d140e2be94a2b74e4c13" +checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b" dependencies = [ "cc", - "pkg-config", + "libc", ] - -[[patch.unused]] -name = "crossbeam-epoch" -version = "0.9.5" -source = "git+https://github.com/anza-xyz/crossbeam?rev=fd279d707025f0e60951e429bf778b4813d1b6bf#fd279d707025f0e60951e429bf778b4813d1b6bf" diff --git a/Cargo.toml b/Cargo.toml index b1169976cf2434..4b98ba6a0afcdf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -75,6 +75,7 @@ members = [ "programs/ed25519-tests", "programs/loader-v4", "programs/stake", + "programs/stake-tests", "programs/system", "programs/vote", "programs/zk-elgamal-proof", @@ -137,7 +138,7 @@ exclude = ["programs/sbf", "svm/tests/example-programs"] resolver = "2" [workspace.package] -version = "2.0.2" +version = "2.0.5" authors = ["Anza Maintainers "] repository = "https://github.com/anza-xyz/agave" homepage = "https://anza.xyz/" @@ -319,98 +320,98 @@ smallvec = "1.13.2" smpl_jwt = "0.7.1" socket2 = "0.5.7" soketto = "0.7" -solana-account-decoder = { path = "account-decoder", version = "=2.0.2" } -solana-accounts-db = { path = "accounts-db", version = "=2.0.2" } -solana-address-lookup-table-program = { path = "programs/address-lookup-table", version = "=2.0.2" } -solana-banks-client = { path = "banks-client", version = "=2.0.2" } -solana-banks-interface = { path = "banks-interface", version = "=2.0.2" } -solana-banks-server = { path = "banks-server", version = "=2.0.2" } -solana-bench-tps = { path = "bench-tps", version = "=2.0.2" } -solana-bloom = { path = "bloom", version = "=2.0.2" } -solana-bpf-loader-program = { path = "programs/bpf_loader", version = "=2.0.2" } -solana-bucket-map = { path = "bucket_map", version = "=2.0.2" } -agave-cargo-registry = { path = "cargo-registry", version = "=2.0.2" } -solana-clap-utils = { path = "clap-utils", version = "=2.0.2" } -solana-clap-v3-utils = { path = "clap-v3-utils", version = "=2.0.2" } -solana-cli = { path = "cli", version = "=2.0.2" } -solana-cli-config = { path = "cli-config", version = "=2.0.2" } -solana-cli-output = { path = "cli-output", version = "=2.0.2" } -solana-client = { path = "client", version = "=2.0.2" } -solana-compute-budget = { path = "compute-budget", version = "=2.0.2" } -solana-compute-budget-program = { path = "programs/compute-budget", version = "=2.0.2" } -solana-config-program = { path = "programs/config", version = "=2.0.2" } -solana-connection-cache = { path = "connection-cache", version = "=2.0.2", default-features = false } -solana-core = { path = "core", version = "=2.0.2" } -solana-cost-model = { path = "cost-model", version = "=2.0.2" } -solana-curve25519 = { path = "curves/curve25519", version = "=2.0.2" } -solana-download-utils = { path = "download-utils", version = "=2.0.2" } -solana-entry = { path = "entry", version = "=2.0.2" } -solana-faucet = { path = "faucet", version = "=2.0.2" } -solana-frozen-abi = { path = "frozen-abi", version = "=2.0.2" } -solana-frozen-abi-macro = { path = "frozen-abi/macro", version = "=2.0.2" } -solana-tps-client = { path = "tps-client", version = "=2.0.2" } -solana-genesis = { path = "genesis", version = "=2.0.2" } -solana-genesis-utils = { path = "genesis-utils", version = "=2.0.2" } -agave-geyser-plugin-interface = { path = "geyser-plugin-interface", version = "=2.0.2" } -solana-geyser-plugin-manager = { path = "geyser-plugin-manager", version = "=2.0.2" } -solana-gossip = { path = "gossip", version = "=2.0.2" } -solana-inline-spl = { path = "inline-spl", version = "=2.0.2" } -solana-ledger = { path = "ledger", version = "=2.0.2" } -solana-loader-v4-program = { path = "programs/loader-v4", version = "=2.0.2" } -solana-local-cluster = { path = "local-cluster", version = "=2.0.2" } -solana-logger = { path = "logger", version = "=2.0.2" } -solana-measure = { path = "measure", version = "=2.0.2" } -solana-merkle-tree = { path = "merkle-tree", version = "=2.0.2" } -solana-metrics = { path = "metrics", version = "=2.0.2" } -solana-net-utils = { path = "net-utils", version = "=2.0.2" } +solana-account-decoder = { path = "account-decoder", version = "=2.0.5" } +solana-accounts-db = { path = "accounts-db", version = "=2.0.5" } +solana-address-lookup-table-program = { path = "programs/address-lookup-table", version = "=2.0.5" } +solana-banks-client = { path = "banks-client", version = "=2.0.5" } +solana-banks-interface = { path = "banks-interface", version = "=2.0.5" } +solana-banks-server = { path = "banks-server", version = "=2.0.5" } +solana-bench-tps = { path = "bench-tps", version = "=2.0.5" } +solana-bloom = { path = "bloom", version = "=2.0.5" } +solana-bpf-loader-program = { path = "programs/bpf_loader", version = "=2.0.5" } +solana-bucket-map = { path = "bucket_map", version = "=2.0.5" } +agave-cargo-registry = { path = "cargo-registry", version = "=2.0.5" } +solana-clap-utils = { path = "clap-utils", version = "=2.0.5" } +solana-clap-v3-utils = { path = "clap-v3-utils", version = "=2.0.5" } +solana-cli = { path = "cli", version = "=2.0.5" } +solana-cli-config = { path = "cli-config", version = "=2.0.5" } +solana-cli-output = { path = "cli-output", version = "=2.0.5" } +solana-client = { path = "client", version = "=2.0.5" } +solana-compute-budget = { path = "compute-budget", version = "=2.0.5" } +solana-compute-budget-program = { path = "programs/compute-budget", version = "=2.0.5" } +solana-config-program = { path = "programs/config", version = "=2.0.5" } +solana-connection-cache = { path = "connection-cache", version = "=2.0.5", default-features = false } +solana-core = { path = "core", version = "=2.0.5" } +solana-cost-model = { path = "cost-model", version = "=2.0.5" } +solana-curve25519 = { path = "curves/curve25519", version = "=2.0.5" } +solana-download-utils = { path = "download-utils", version = "=2.0.5" } +solana-entry = { path = "entry", version = "=2.0.5" } +solana-faucet = { path = "faucet", version = "=2.0.5" } +solana-frozen-abi = { path = "frozen-abi", version = "=2.0.5" } +solana-frozen-abi-macro = { path = "frozen-abi/macro", version = "=2.0.5" } +solana-tps-client = { path = "tps-client", version = "=2.0.5" } +solana-genesis = { path = "genesis", version = "=2.0.5" } +solana-genesis-utils = { path = "genesis-utils", version = "=2.0.5" } +agave-geyser-plugin-interface = { path = "geyser-plugin-interface", version = "=2.0.5" } +solana-geyser-plugin-manager = { path = "geyser-plugin-manager", version = "=2.0.5" } +solana-gossip = { path = "gossip", version = "=2.0.5" } +solana-inline-spl = { path = "inline-spl", version = "=2.0.5" } +solana-ledger = { path = "ledger", version = "=2.0.5" } +solana-loader-v4-program = { path = "programs/loader-v4", version = "=2.0.5" } +solana-local-cluster = { path = "local-cluster", version = "=2.0.5" } +solana-logger = { path = "logger", version = "=2.0.5" } +solana-measure = { path = "measure", version = "=2.0.5" } +solana-merkle-tree = { path = "merkle-tree", version = "=2.0.5" } +solana-metrics = { path = "metrics", version = "=2.0.5" } +solana-net-utils = { path = "net-utils", version = "=2.0.5" } solana-nohash-hasher = "0.2.1" -solana-notifier = { path = "notifier", version = "=2.0.2" } -solana-package-metadata-macro = { path = "sdk/package-metadata-macro", version = "=2.0.2" } -solana-perf = { path = "perf", version = "=2.0.2" } -solana-poh = { path = "poh", version = "=2.0.2" } -solana-poseidon = { path = "poseidon", version = "=2.0.2" } -solana-program = { path = "sdk/program", version = "=2.0.2" } -solana-program-runtime = { path = "program-runtime", version = "=2.0.2" } -solana-program-test = { path = "program-test", version = "=2.0.2" } -solana-pubsub-client = { path = "pubsub-client", version = "=2.0.2" } -solana-quic-client = { path = "quic-client", version = "=2.0.2" } -solana-rayon-threadlimit = { path = "rayon-threadlimit", version = "=2.0.2" } -solana-remote-wallet = { path = "remote-wallet", version = "=2.0.2", default-features = false } -solana-unified-scheduler-logic = { path = "unified-scheduler-logic", version = "=2.0.2" } -solana-unified-scheduler-pool = { path = "unified-scheduler-pool", version = "=2.0.2" } -solana-rpc = { path = "rpc", version = "=2.0.2" } -solana-rpc-client = { path = "rpc-client", version = "=2.0.2", default-features = false } -solana-rpc-client-api = { path = "rpc-client-api", version = "=2.0.2" } -solana-rpc-client-nonce-utils = { path = "rpc-client-nonce-utils", version = "=2.0.2" } -solana-runtime = { path = "runtime", version = "=2.0.2" } -solana-runtime-transaction = { path = "runtime-transaction", version = "=2.0.2" } -solana-sdk = { path = "sdk", version = "=2.0.2" } -solana-sdk-macro = { path = "sdk/macro", version = "=2.0.2" } -solana-send-transaction-service = { path = "send-transaction-service", version = "=2.0.2" } -solana-stake-program = { path = "programs/stake", version = "=2.0.2" } -solana-storage-bigtable = { path = "storage-bigtable", version = "=2.0.2" } -solana-storage-proto = { path = "storage-proto", version = "=2.0.2" } -solana-streamer = { path = "streamer", version = "=2.0.2" } -solana-svm = { path = "svm", version = "=2.0.2" } -solana-system-program = { path = "programs/system", version = "=2.0.2" } -solana-test-validator = { path = "test-validator", version = "=2.0.2" } -solana-thin-client = { path = "thin-client", version = "=2.0.2" } -solana-tpu-client = { path = "tpu-client", version = "=2.0.2", default-features = false } -solana-transaction-status = { path = "transaction-status", version = "=2.0.2" } -solana-transaction-metrics-tracker = { path = "transaction-metrics-tracker", version = "=2.0.2" } -solana-turbine = { path = "turbine", version = "=2.0.2" } -solana-type-overrides = { path = "type-overrides", version = "=2.0.2" } -solana-udp-client = { path = "udp-client", version = "=2.0.2" } -solana-version = { path = "version", version = "=2.0.2" } -solana-vote = { path = "vote", version = "=2.0.2" } -solana-vote-program = { path = "programs/vote", version = "=2.0.2" } -solana-wen-restart = { path = "wen-restart", version = "=2.0.2" } -solana-zk-elgamal-proof-program = { path = "programs/zk-elgamal-proof", version = "=2.0.2" } -solana-zk-keygen = { path = "zk-keygen", version = "=2.0.2" } -solana-zk-sdk = { path = "zk-sdk", version = "=2.0.2" } -solana-zk-token-proof-program = { path = "programs/zk-token-proof", version = "=2.0.2" } -solana-zk-token-sdk = { path = "zk-token-sdk", version = "=2.0.2" } -solana_rbpf = "=0.8.1" +solana-notifier = { path = "notifier", version = "=2.0.5" } +solana-package-metadata-macro = { path = "sdk/package-metadata-macro", version = "=2.0.5" } +solana-perf = { path = "perf", version = "=2.0.5" } +solana-poh = { path = "poh", version = "=2.0.5" } +solana-poseidon = { path = "poseidon", version = "=2.0.5" } +solana-program = { path = "sdk/program", version = "=2.0.5" } +solana-program-runtime = { path = "program-runtime", version = "=2.0.5" } +solana-program-test = { path = "program-test", version = "=2.0.5" } +solana-pubsub-client = { path = "pubsub-client", version = "=2.0.5" } +solana-quic-client = { path = "quic-client", version = "=2.0.5" } +solana-rayon-threadlimit = { path = "rayon-threadlimit", version = "=2.0.5" } +solana-remote-wallet = { path = "remote-wallet", version = "=2.0.5", default-features = false } +solana-unified-scheduler-logic = { path = "unified-scheduler-logic", version = "=2.0.5" } +solana-unified-scheduler-pool = { path = "unified-scheduler-pool", version = "=2.0.5" } +solana-rpc = { path = "rpc", version = "=2.0.5" } +solana-rpc-client = { path = "rpc-client", version = "=2.0.5", default-features = false } +solana-rpc-client-api = { path = "rpc-client-api", version = "=2.0.5" } +solana-rpc-client-nonce-utils = { path = "rpc-client-nonce-utils", version = "=2.0.5" } +solana-runtime = { path = "runtime", version = "=2.0.5" } +solana-runtime-transaction = { path = "runtime-transaction", version = "=2.0.5" } +solana-sdk = { path = "sdk", version = "=2.0.5" } +solana-sdk-macro = { path = "sdk/macro", version = "=2.0.5" } +solana-send-transaction-service = { path = "send-transaction-service", version = "=2.0.5" } +solana-stake-program = { path = "programs/stake", version = "=2.0.5" } +solana-storage-bigtable = { path = "storage-bigtable", version = "=2.0.5" } +solana-storage-proto = { path = "storage-proto", version = "=2.0.5" } +solana-streamer = { path = "streamer", version = "=2.0.5" } +solana-svm = { path = "svm", version = "=2.0.5" } +solana-system-program = { path = "programs/system", version = "=2.0.5" } +solana-test-validator = { path = "test-validator", version = "=2.0.5" } +solana-thin-client = { path = "thin-client", version = "=2.0.5" } +solana-tpu-client = { path = "tpu-client", version = "=2.0.5", default-features = false } +solana-transaction-status = { path = "transaction-status", version = "=2.0.5" } +solana-transaction-metrics-tracker = { path = "transaction-metrics-tracker", version = "=2.0.5" } +solana-turbine = { path = "turbine", version = "=2.0.5" } +solana-type-overrides = { path = "type-overrides", version = "=2.0.5" } +solana-udp-client = { path = "udp-client", version = "=2.0.5" } +solana-version = { path = "version", version = "=2.0.5" } +solana-vote = { path = "vote", version = "=2.0.5" } +solana-vote-program = { path = "programs/vote", version = "=2.0.5" } +solana-wen-restart = { path = "wen-restart", version = "=2.0.5" } +solana-zk-elgamal-proof-program = { path = "programs/zk-elgamal-proof", version = "=2.0.5" } +solana-zk-keygen = { path = "zk-keygen", version = "=2.0.5" } +solana-zk-sdk = { path = "zk-sdk", version = "=2.0.5" } +solana-zk-token-proof-program = { path = "programs/zk-token-proof", version = "=2.0.5" } +solana-zk-token-sdk = { path = "zk-token-sdk", version = "=2.0.5" } +solana_rbpf = "=0.8.4" spl-associated-token-account = "=4.0.0" spl-instruction-padding = "0.2" spl-memo = "=5.0.0" @@ -547,4 +548,4 @@ rev = "b500cdc2a920cd5bff9e2dd974d7b97349d61464" # [patch.crates-io.tokio] git = "https://github.com/anza-xyz/solana-tokio.git" -rev = "7cf47705faacf7bf0e43e4131a5377b3291fce21" +rev = "7cf47705faacf7bf0e43e4131a5377b3291fce21" \ No newline at end of file diff --git a/accounts-db/src/accounts_db.rs b/accounts-db/src/accounts_db.rs index 5f312704f540b5..6e3f937720b50d 100644 --- a/accounts-db/src/accounts_db.rs +++ b/accounts-db/src/accounts_db.rs @@ -1702,6 +1702,7 @@ impl SplitAncientStorages { if treat_as_ancient(storage) { // even though the slot is in range of being an ancient append vec, if it isn't actually a large append vec, // then we are better off treating all these slots as normally cacheable to reduce work in dedup. + // then we are better off treating all these slots as normally cacheable to reduce work in dedup. // Since this one is large, for the moment, this one becomes the highest slot where we want to individually cache files. len_truncate = i; } @@ -5809,6 +5810,7 @@ impl AccountsDb { /// This should only be called after the `Bank::drop()` runs in bank.rs, See BANK_DROP_SAFETY /// comment below for more explanation. /// * `is_serialized_with_abs` - indicates whether this call runs sequentially with all other + /// * `is_serialized_with_abs` - indicates whether this call runs sequentially with all other /// accounts_db relevant calls, such as shrinking, purging etc., in account background /// service. pub fn purge_slot(&self, slot: Slot, bank_id: BankId, is_serialized_with_abs: bool) { @@ -8960,6 +8962,7 @@ impl AccountsDb { // these write directly to disk, so the more threads, the better num_cpus::get() } else { + // seems to be a good heuristic given varying # cpus for in-mem disk index // seems to be a good heuristic given varying # cpus for in-mem disk index 8 }; diff --git a/bench-tps/src/bench.rs b/bench-tps/src/bench.rs index ccf601214c1743..075e08343a6447 100644 --- a/bench-tps/src/bench.rs +++ b/bench-tps/src/bench.rs @@ -1223,7 +1223,7 @@ pub fn fund_keypairs( mod tests { use { super::*, - solana_runtime::{bank::Bank, bank_client::BankClient}, + solana_runtime::{bank::Bank, bank_client::BankClient, bank_forks::BankForks}, solana_sdk::{ commitment_config::CommitmentConfig, feature_set::FeatureSet, @@ -1234,16 +1234,18 @@ mod tests { }, }; - fn bank_with_all_features(genesis_config: &GenesisConfig) -> Arc { + fn bank_with_all_features( + genesis_config: &GenesisConfig, + ) -> (Arc, Arc>) { let mut bank = Bank::new_for_tests(genesis_config); bank.feature_set = Arc::new(FeatureSet::all_enabled()); - bank.wrap_with_bank_forks_for_tests().0 + bank.wrap_with_bank_forks_for_tests() } #[test] fn test_bench_tps_bank_client() { let (genesis_config, id) = create_genesis_config(sol_to_lamports(10_000.0)); - let bank = bank_with_all_features(&genesis_config); + let (bank, _bank_forks) = bank_with_all_features(&genesis_config); let client = Arc::new(BankClient::new_shared(bank)); let config = Config { @@ -1264,7 +1266,7 @@ mod tests { #[test] fn test_bench_tps_fund_keys() { let (genesis_config, id) = create_genesis_config(sol_to_lamports(10_000.0)); - let bank = bank_with_all_features(&genesis_config); + let (bank, _bank_forks) = bank_with_all_features(&genesis_config); let client = Arc::new(BankClient::new_shared(bank)); let keypair_count = 20; let lamports = 20; @@ -1289,7 +1291,7 @@ mod tests { let (mut genesis_config, id) = create_genesis_config(sol_to_lamports(10_000.0)); let fee_rate_governor = FeeRateGovernor::new(11, 0); genesis_config.fee_rate_governor = fee_rate_governor; - let bank = bank_with_all_features(&genesis_config); + let (bank, _bank_forks) = bank_with_all_features(&genesis_config); let client = Arc::new(BankClient::new_shared(bank)); let keypair_count = 20; let lamports = 20; @@ -1307,7 +1309,7 @@ mod tests { #[test] fn test_bench_tps_create_durable_nonce() { let (genesis_config, id) = create_genesis_config(sol_to_lamports(10_000.0)); - let bank = bank_with_all_features(&genesis_config); + let (bank, _bank_forks) = bank_with_all_features(&genesis_config); let client = Arc::new(BankClient::new_shared(bank)); let keypair_count = 10; let lamports = 10_000_000; diff --git a/core/Cargo.toml b/core/Cargo.toml index d396697613fb54..250a858e9d4bcf 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -92,6 +92,7 @@ serde_json = { workspace = true } serial_test = { workspace = true } # See order-crates-for-publishing.py for using this unusual `path = "."` solana-core = { path = ".", features = ["dev-context-only-utils"] } +solana-ledger = { workspace = true, features = ["dev-context-only-utils"] } solana-logger = { workspace = true } solana-poh = { workspace = true, features = ["dev-context-only-utils"] } solana-program-runtime = { workspace = true } diff --git a/core/benches/banking_stage.rs b/core/benches/banking_stage.rs index 7a69eaf674d520..45c6e02e20f424 100644 --- a/core/benches/banking_stage.rs +++ b/core/benches/banking_stage.rs @@ -398,7 +398,7 @@ fn simulate_process_entries( let bank_fork = BankForks::new_rw_arc(bank); let bank = bank_fork.read().unwrap().get_with_scheduler(slot).unwrap(); bank.clone_without_scheduler() - .set_fork_graph_in_program_cache(bank_fork.clone()); + .set_fork_graph_in_program_cache(Arc::downgrade(&bank_fork)); for i in 0..(num_accounts / 2) { bank.transfer(initial_lamports, mint_keypair, &keypairs[i * 2].pubkey()) diff --git a/core/benches/consumer.rs b/core/benches/consumer.rs index 6dd9eb5b8bf0fa..d736b93ef96ffd 100644 --- a/core/benches/consumer.rs +++ b/core/benches/consumer.rs @@ -19,7 +19,7 @@ use { poh_recorder::{create_test_recorder, PohRecorder}, poh_service::PohService, }, - solana_runtime::bank::Bank, + solana_runtime::{bank::Bank, bank_forks::BankForks}, solana_sdk::{ account::{Account, ReadableAccount}, signature::Keypair, @@ -89,6 +89,7 @@ fn create_consumer(poh_recorder: &RwLock) -> Consumer { struct BenchFrame { bank: Arc, + _bank_forks: Arc>, ledger_path: TempDir, exit: Arc, poh_recorder: Arc>, @@ -115,7 +116,7 @@ fn setup() -> BenchFrame { bank.write_cost_tracker() .unwrap() .set_limits(u64::MAX, u64::MAX, u64::MAX); - let bank = bank.wrap_with_bank_forks_for_tests().0; + let (bank, bank_forks) = bank.wrap_with_bank_forks_for_tests(); let ledger_path = TempDir::new().unwrap(); let blockstore = Arc::new( @@ -126,6 +127,7 @@ fn setup() -> BenchFrame { BenchFrame { bank, + _bank_forks: bank_forks, ledger_path, exit, poh_recorder, @@ -147,6 +149,7 @@ fn bench_process_and_record_transactions(bencher: &mut Bencher, batch_size: usiz let BenchFrame { bank, + _bank_forks, ledger_path: _ledger_path, exit, poh_recorder, diff --git a/core/src/banking_stage.rs b/core/src/banking_stage.rs index 0e732e62e66b2b..0cf3cace2f82c0 100644 --- a/core/src/banking_stage.rs +++ b/core/src/banking_stage.rs @@ -1015,7 +1015,7 @@ mod tests { replay_vote_sender, None, Arc::new(ConnectionCache::new("connection_cache_test")), - bank_forks, + bank_forks.clone(), // keep a local-copy of bank-forks so worker threads do not lose weak access to bank-forks &Arc::new(PrioritizationFeeCache::new(0u64)), ); @@ -1064,7 +1064,7 @@ mod tests { drop(poh_recorder); let mut blockhash = start_hash; - let bank = Bank::new_no_wallclock_throttle_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_no_wallclock_throttle_for_tests(&genesis_config); bank.process_transaction(&fund_tx).unwrap(); //receive entries + ticks loop { @@ -1208,7 +1208,7 @@ mod tests { .map(|(_bank, (entry, _tick_height))| entry) .collect(); - let bank = Bank::new_no_wallclock_throttle_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_no_wallclock_throttle_for_tests(&genesis_config); for entry in entries { bank.process_entry_transactions(entry.transactions) .iter() @@ -1232,7 +1232,7 @@ mod tests { mint_keypair, .. } = create_genesis_config(10_000); - let bank = Bank::new_no_wallclock_throttle_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_no_wallclock_throttle_for_tests(&genesis_config); let ledger_path = get_tmp_ledger_path_auto_delete!(); { let blockstore = Blockstore::open(ledger_path.path()) diff --git a/core/src/banking_stage/consume_worker.rs b/core/src/banking_stage/consume_worker.rs index f83ca6724d415e..57a4778d3204b3 100644 --- a/core/src/banking_stage/consume_worker.rs +++ b/core/src/banking_stage/consume_worker.rs @@ -710,7 +710,8 @@ mod tests { }, solana_poh::poh_recorder::{PohRecorder, WorkingBankEntry}, solana_runtime::{ - prioritization_fee_cache::PrioritizationFeeCache, vote_sender_types::ReplayVoteReceiver, + bank_forks::BankForks, prioritization_fee_cache::PrioritizationFeeCache, + vote_sender_types::ReplayVoteReceiver, }, solana_sdk::{ genesis_config::GenesisConfig, poh_config::PohConfig, pubkey::Pubkey, @@ -729,6 +730,7 @@ mod tests { mint_keypair: Keypair, genesis_config: GenesisConfig, bank: Arc, + _bank_forks: Arc>, _ledger_path: TempDir, _entry_receiver: Receiver, poh_recorder: Arc>, @@ -745,7 +747,7 @@ mod tests { mint_keypair, .. } = create_slow_genesis_config(10_000); - let bank = Bank::new_no_wallclock_throttle_for_tests(&genesis_config).0; + let (bank, bank_forks) = Bank::new_no_wallclock_throttle_for_tests(&genesis_config); let ledger_path = get_tmp_ledger_path_auto_delete!(); let blockstore = Blockstore::open(ledger_path.path()) @@ -788,6 +790,7 @@ mod tests { mint_keypair, genesis_config, bank, + _bank_forks: bank_forks, _ledger_path: ledger_path, _entry_receiver: entry_receiver, poh_recorder, diff --git a/core/src/banking_stage/consumer.rs b/core/src/banking_stage/consumer.rs index 6ae0881da45d8a..3493a5f3a85408 100644 --- a/core/src/banking_stage/consumer.rs +++ b/core/src/banking_stage/consumer.rs @@ -851,7 +851,7 @@ mod tests { solana_poh::poh_recorder::{PohRecorder, Record, WorkingBankEntry}, solana_program_runtime::timings::ProgramTiming, solana_rpc::transaction_status_service::TransactionStatusService, - solana_runtime::prioritization_fee_cache::PrioritizationFeeCache, + solana_runtime::{bank_forks::BankForks, prioritization_fee_cache::PrioritizationFeeCache}, solana_sdk::{ account::AccountSharedData, account_utils::StateMut, @@ -989,6 +989,7 @@ mod tests { ) -> ( Vec, Arc, + Arc>, Arc>, Receiver, GenesisConfigInfo, @@ -1003,7 +1004,7 @@ mod tests { } = &genesis_config_info; let blockstore = Blockstore::open(ledger_path).expect("Expected to be able to open database ledger"); - let bank = Bank::new_no_wallclock_throttle_for_tests(genesis_config).0; + let (bank, bank_forks) = Bank::new_no_wallclock_throttle_for_tests(genesis_config); let exit = Arc::new(AtomicBool::default()); let (poh_recorder, entry_receiver, record_receiver) = PohRecorder::new( bank.tick_height(), @@ -1032,6 +1033,7 @@ mod tests { ( transactions, bank, + bank_forks, poh_recorder, entry_receiver, genesis_config_info, @@ -1059,7 +1061,7 @@ mod tests { mint_keypair, .. } = create_slow_genesis_config(10_000); - let bank = Bank::new_no_wallclock_throttle_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_no_wallclock_throttle_for_tests(&genesis_config); let pubkey = solana_sdk::pubkey::new_rand(); let transactions = sanitize_transactions(vec![system_transaction::transfer( @@ -1187,7 +1189,7 @@ mod tests { mint_keypair, .. } = create_slow_genesis_config(10_000); - let bank = Bank::new_no_wallclock_throttle_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_no_wallclock_throttle_for_tests(&genesis_config); let pubkey = Pubkey::new_unique(); // setup nonce account with a durable nonce different from the current @@ -1343,7 +1345,7 @@ mod tests { mint_keypair, .. } = create_slow_genesis_config(10_000); - let bank = Bank::new_no_wallclock_throttle_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_no_wallclock_throttle_for_tests(&genesis_config); let pubkey = solana_sdk::pubkey::new_rand(); let transactions = { @@ -1427,7 +1429,7 @@ mod tests { } = create_slow_genesis_config(10_000); let mut bank = Bank::new_for_tests(&genesis_config); bank.ns_per_slot = u128::MAX; - let bank = bank.wrap_with_bank_forks_for_tests().0; + let (bank, _bank_forks) = bank.wrap_with_bank_forks_for_tests(); let pubkey = solana_sdk::pubkey::new_rand(); let ledger_path = get_tmp_ledger_path_auto_delete!(); @@ -1583,7 +1585,7 @@ mod tests { mint_keypair, .. } = create_slow_genesis_config(10_000); - let bank = Bank::new_no_wallclock_throttle_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_no_wallclock_throttle_for_tests(&genesis_config); let pubkey = solana_sdk::pubkey::new_rand(); let pubkey1 = solana_sdk::pubkey::new_rand(); @@ -1660,7 +1662,7 @@ mod tests { mint_keypair, .. } = create_slow_genesis_config(lamports); - let bank = Bank::new_no_wallclock_throttle_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_no_wallclock_throttle_for_tests(&genesis_config); // set cost tracker limits to MAX so it will not filter out TXs bank.write_cost_tracker() .unwrap() @@ -1721,7 +1723,7 @@ mod tests { mint_keypair, .. } = create_slow_genesis_config(10_000); - let bank = Bank::new_no_wallclock_throttle_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_no_wallclock_throttle_for_tests(&genesis_config); // set cost tracker limits to MAX so it will not filter out TXs bank.write_cost_tracker() .unwrap() @@ -1780,7 +1782,7 @@ mod tests { mint_keypair, .. } = create_slow_genesis_config(10_000); - let bank = Bank::new_no_wallclock_throttle_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_no_wallclock_throttle_for_tests(&genesis_config); let pubkey = solana_sdk::pubkey::new_rand(); @@ -1861,7 +1863,7 @@ mod tests { } = create_slow_genesis_config(solana_sdk::native_token::sol_to_lamports(1000.0)); genesis_config.rent.lamports_per_byte_year = 50; genesis_config.rent.exemption_threshold = 2.0; - let bank = Bank::new_no_wallclock_throttle_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_no_wallclock_throttle_for_tests(&genesis_config); let pubkey = solana_sdk::pubkey::new_rand(); let pubkey1 = solana_sdk::pubkey::new_rand(); let keypair1 = Keypair::new(); @@ -2130,7 +2132,7 @@ mod tests { fn test_consume_buffered_packets() { let ledger_path = get_tmp_ledger_path_auto_delete!(); { - let (transactions, bank, poh_recorder, _entry_receiver, _, poh_simulator) = + let (transactions, bank, _bank_forks, poh_recorder, _entry_receiver, _, poh_simulator) = setup_conflicting_transactions(ledger_path.path()); let recorder: TransactionRecorder = poh_recorder.read().unwrap().new_recorder(); let num_conflicting_transactions = transactions.len(); @@ -2203,8 +2205,15 @@ mod tests { fn test_consume_buffered_packets_sanitization_error() { let ledger_path = get_tmp_ledger_path_auto_delete!(); { - let (mut transactions, bank, poh_recorder, _entry_receiver, _, poh_simulator) = - setup_conflicting_transactions(ledger_path.path()); + let ( + mut transactions, + bank, + _bank_forks, + poh_recorder, + _entry_receiver, + _, + poh_simulator, + ) = setup_conflicting_transactions(ledger_path.path()); let duplicate_account_key = transactions[0].message.account_keys[0]; transactions[0] .message @@ -2259,7 +2268,7 @@ mod tests { fn test_consume_buffered_packets_retryable() { let ledger_path = get_tmp_ledger_path_auto_delete!(); { - let (transactions, bank, poh_recorder, _entry_receiver, _, poh_simulator) = + let (transactions, bank, _bank_forks, poh_recorder, _entry_receiver, _, poh_simulator) = setup_conflicting_transactions(ledger_path.path()); let recorder = poh_recorder.read().unwrap().new_recorder(); let num_conflicting_transactions = transactions.len(); @@ -2355,8 +2364,15 @@ mod tests { fn test_consume_buffered_packets_batch_priority_guard() { let ledger_path = get_tmp_ledger_path_auto_delete!(); { - let (_, bank, poh_recorder, _entry_receiver, genesis_config_info, poh_simulator) = - setup_conflicting_transactions(ledger_path.path()); + let ( + _, + bank, + _bank_forks, + poh_recorder, + _entry_receiver, + genesis_config_info, + poh_simulator, + ) = setup_conflicting_transactions(ledger_path.path()); let recorder = poh_recorder.read().unwrap().new_recorder(); // Setup transactions: diff --git a/core/src/banking_stage/decision_maker.rs b/core/src/banking_stage/decision_maker.rs index 6ad2c3042b254f..1bd0b224fdf034 100644 --- a/core/src/banking_stage/decision_maker.rs +++ b/core/src/banking_stage/decision_maker.rs @@ -148,7 +148,7 @@ mod tests { #[test] fn test_make_consume_or_forward_decision() { let genesis_config = create_genesis_config(2).genesis_config; - let bank = Bank::new_no_wallclock_throttle_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_no_wallclock_throttle_for_tests(&genesis_config); let ledger_path = temp_dir(); let blockstore = Arc::new(Blockstore::open(ledger_path.as_path()).unwrap()); let (exit, poh_recorder, poh_service, _entry_receiver) = diff --git a/core/src/banking_stage/read_write_account_set.rs b/core/src/banking_stage/read_write_account_set.rs index 4b1efc015e2bbf..9ed0f24500d9db 100644 --- a/core/src/banking_stage/read_write_account_set.rs +++ b/core/src/banking_stage/read_write_account_set.rs @@ -84,7 +84,7 @@ mod tests { use { super::ReadWriteAccountSet, solana_ledger::genesis_utils::GenesisConfigInfo, - solana_runtime::{bank::Bank, genesis_utils::create_genesis_config}, + solana_runtime::{bank::Bank, bank_forks::BankForks, genesis_utils::create_genesis_config}, solana_sdk::{ account::AccountSharedData, address_lookup_table::{ @@ -101,7 +101,10 @@ mod tests { signer::Signer, transaction::{MessageHash, SanitizedTransaction, VersionedTransaction}, }, - std::{borrow::Cow, sync::Arc}, + std::{ + borrow::Cow, + sync::{Arc, RwLock}, + }, }; fn create_test_versioned_message( @@ -171,9 +174,9 @@ mod tests { ) } - fn create_test_bank() -> Arc { + fn create_test_bank() -> (Arc, Arc>) { let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(10_000); - Bank::new_no_wallclock_throttle_for_tests(&genesis_config).0 + Bank::new_no_wallclock_throttle_for_tests(&genesis_config) } // Helper function (could potentially use test_case in future). @@ -182,7 +185,7 @@ mod tests { // conflict_index = 2 means write lock conflict with address table key // conflict_index = 3 means read lock conflict with address table key fn test_check_and_take_locks(conflict_index: usize, add_write: bool, expectation: bool) { - let bank = create_test_bank(); + let (bank, _bank_forks) = create_test_bank(); let (bank, table_address) = create_test_address_lookup_table(bank, 2); let tx = create_test_sanitized_transaction( &Keypair::new(), diff --git a/core/src/banking_stage/unprocessed_transaction_storage.rs b/core/src/banking_stage/unprocessed_transaction_storage.rs index bc2dec2a82c7c1..e790993dfcccd0 100644 --- a/core/src/banking_stage/unprocessed_transaction_storage.rs +++ b/core/src/banking_stage/unprocessed_transaction_storage.rs @@ -1069,7 +1069,7 @@ mod tests { mint_keypair, .. } = create_genesis_config(10); - let current_bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (current_bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let simple_transactions: Vec = (0..256) .map(|_id| { diff --git a/core/src/replay_stage.rs b/core/src/replay_stage.rs index 627e0175c89e71..fda6c4a450b556 100644 --- a/core/src/replay_stage.rs +++ b/core/src/replay_stage.rs @@ -1390,15 +1390,21 @@ impl ReplayStage { ) -> (ProgressMap, HeaviestSubtreeForkChoice) { let (root_bank, frozen_banks, duplicate_slot_hashes) = { let bank_forks = bank_forks.read().unwrap(); + let root_bank = bank_forks.root_bank(); let duplicate_slots = blockstore - .duplicate_slots_iterator(bank_forks.root_bank().slot()) + // It is important that the root bank is not marked as duplicate on initialization. + // Although this bank could contain a duplicate proof, the fact that it was rooted + // either during a previous run or artificially means that we should ignore any + // duplicate proofs for the root slot, thus we start consuming duplicate proofs + // from the root slot + 1 + .duplicate_slots_iterator(root_bank.slot().saturating_add(1)) .unwrap(); let duplicate_slot_hashes = duplicate_slots.filter_map(|slot| { let bank = bank_forks.get(slot)?; Some((slot, bank.hash())) }); ( - bank_forks.root_bank(), + root_bank, bank_forks.frozen_banks().values().cloned().collect(), duplicate_slot_hashes.collect::>(), ) @@ -3230,7 +3236,7 @@ impl ReplayStage { &parent_blockhash.to_string(), bank.slot(), &bank.last_blockhash().to_string(), - &bank.rewards, + &bank.get_rewards_and_num_partitions(), Some(bank.clock().unix_timestamp), Some(bank.block_height()), bank.executed_transaction_count(), @@ -4521,6 +4527,9 @@ pub(crate) mod tests { replay_stage::ReplayStage, vote_simulator::{self, VoteSimulator}, }, + blockstore_processor::{ + confirm_full_slot, fill_blockstore_slot_with_ticks, process_bank_0, ProcessOptions, + }, crossbeam_channel::unbounded, itertools::Itertools, solana_entry::entry::{self, Entry}, @@ -9032,4 +9041,136 @@ pub(crate) mod tests { assert_eq!(tower.vote_state, expected_tower.vote_state); assert_eq!(tower.node_pubkey, expected_tower.node_pubkey); } + + #[test] + fn test_initialize_progress_and_fork_choice_with_duplicates() { + solana_logger::setup(); + let GenesisConfigInfo { + mut genesis_config, .. + } = create_genesis_config(123); + + let ticks_per_slot = 1; + genesis_config.ticks_per_slot = ticks_per_slot; + let (ledger_path, blockhash) = + solana_ledger::create_new_tmp_ledger_auto_delete!(&genesis_config); + let blockstore = Blockstore::open(ledger_path.path()).unwrap(); + + /* + Bank forks with: + slot 0 + | + slot 1 -> Duplicate before restart, the restart slot + | + slot 2 + | + slot 3 -> Duplicate before restart, artificially rooted + | + slot 4 -> Duplicate before restart, artificially rooted + | + slot 5 -> Duplicate before restart + | + slot 6 + */ + + let mut last_hash = blockhash; + for i in 0..6 { + last_hash = + fill_blockstore_slot_with_ticks(&blockstore, ticks_per_slot, i + 1, i, last_hash); + } + // Artifically root 3 and 4 + blockstore.set_roots([3, 4].iter()).unwrap(); + + // Set up bank0 + let bank_forks = BankForks::new_rw_arc(Bank::new_for_tests(&genesis_config)); + let bank0 = bank_forks.read().unwrap().get_with_scheduler(0).unwrap(); + let recyclers = VerifyRecyclers::default(); + let replay_tx_thread_pool = rayon::ThreadPoolBuilder::new() + .num_threads(1) + .thread_name(|i| format!("solReplayTx{i:02}")) + .build() + .expect("new rayon threadpool"); + + process_bank_0( + &bank0, + &blockstore, + &replay_tx_thread_pool, + &ProcessOptions::default(), + &recyclers, + None, + None, + ); + + // Mark block 1, 3, 4, 5 as duplicate + blockstore.store_duplicate_slot(1, vec![], vec![]).unwrap(); + blockstore.store_duplicate_slot(3, vec![], vec![]).unwrap(); + blockstore.store_duplicate_slot(4, vec![], vec![]).unwrap(); + blockstore.store_duplicate_slot(5, vec![], vec![]).unwrap(); + + let bank1 = bank_forks.write().unwrap().insert(Bank::new_from_parent( + bank0.clone_without_scheduler(), + &Pubkey::default(), + 1, + )); + confirm_full_slot( + &blockstore, + &bank1, + &replay_tx_thread_pool, + &ProcessOptions::default(), + &recyclers, + &mut ConfirmationProgress::new(bank0.last_blockhash()), + None, + None, + None, + &mut ExecuteTimings::default(), + ) + .unwrap(); + + bank_forks + .write() + .unwrap() + .set_root( + 1, + &solana_runtime::accounts_background_service::AbsRequestSender::default(), + None, + ) + .unwrap(); + + let leader_schedule_cache = LeaderScheduleCache::new_from_bank(&bank1); + + // process_blockstore_from_root() from slot 1 onwards + blockstore_processor::process_blockstore_from_root( + &blockstore, + &bank_forks, + &leader_schedule_cache, + &ProcessOptions::default(), + None, + None, + None, + &AbsRequestSender::default(), + ) + .unwrap(); + + assert_eq!(bank_forks.read().unwrap().root(), 4); + + // Verify that fork choice can be initialized and that the root is not marked duplicate + let (_progress, fork_choice) = + ReplayStage::initialize_progress_and_fork_choice_with_locked_bank_forks( + &bank_forks, + &Pubkey::new_unique(), + &Pubkey::new_unique(), + &blockstore, + ); + + let bank_forks = bank_forks.read().unwrap(); + // 4 (the artificial root) is the tree root and no longer duplicate + assert_eq!(fork_choice.tree_root().0, 4); + assert!(fork_choice + .is_candidate(&(4, bank_forks.bank_hash(4).unwrap())) + .unwrap()); + + // 5 is still considered duplicate, so it is not a valid fork choice candidate + assert!(!fork_choice + .is_candidate(&(5, bank_forks.bank_hash(5).unwrap())) + .unwrap()); + } } diff --git a/core/src/validator.rs b/core/src/validator.rs index 889a3a6c467d63..743612a35f35fd 100644 --- a/core/src/validator.rs +++ b/core/src/validator.rs @@ -38,7 +38,7 @@ use { utils::{move_and_async_delete_path, move_and_async_delete_path_contents}, }, solana_client::connection_cache::{ConnectionCache, Protocol}, - solana_entry::poh::compute_hash_time_ns, + solana_entry::poh::compute_hash_time, solana_geyser_plugin_manager::{ geyser_plugin_service::GeyserPluginService, GeyserPluginManagerRequest, }, @@ -1676,24 +1676,23 @@ fn check_poh_speed( if let Some(hashes_per_tick) = genesis_config.hashes_per_tick() { let ticks_per_slot = genesis_config.ticks_per_slot(); let hashes_per_slot = hashes_per_tick * ticks_per_slot; - let hash_samples = maybe_hash_samples.unwrap_or(hashes_per_slot); - let hash_time_ns = compute_hash_time_ns(hash_samples); - - let my_ns_per_slot = (hash_time_ns * hashes_per_slot) / hash_samples; - debug!("computed: ns_per_slot: {}", my_ns_per_slot); - let target_ns_per_slot = genesis_config.ns_per_slot() as u64; - debug!( - "cluster ns_per_hash: {}ns ns_per_slot: {}", - target_ns_per_slot / hashes_per_slot, - target_ns_per_slot + + let hash_time = compute_hash_time(hash_samples); + let my_hashes_per_second = (hash_samples as f64 / hash_time.as_secs_f64()) as u64; + let target_slot_duration = Duration::from_nanos(genesis_config.ns_per_slot() as u64); + let target_hashes_per_second = + (hashes_per_slot as f64 / target_slot_duration.as_secs_f64()) as u64; + + info!( + "PoH speed check: \ + computed hashes per second {my_hashes_per_second}, \ + target hashes per second {target_hashes_per_second}" ); - if my_ns_per_slot < target_ns_per_slot { - let extra_ns = target_ns_per_slot - my_ns_per_slot; - info!("PoH speed check: Will sleep {}ns per slot.", extra_ns); - } else { + if my_hashes_per_second < target_hashes_per_second { return Err(format!( - "PoH is slower than cluster target tick rate! mine: {my_ns_per_slot} cluster: {target_ns_per_slot}.", + "PoH hashes/second rate is slower than the cluster target: \ + mine {my_hashes_per_second}, cluster {target_hashes_per_second}" )); } } diff --git a/core/tests/unified_scheduler.rs b/core/tests/unified_scheduler.rs index 22f9fab0c05122..141e2fd822813e 100644 --- a/core/tests/unified_scheduler.rs +++ b/core/tests/unified_scheduler.rs @@ -83,7 +83,7 @@ fn test_scheduler_waited_by_drop_bank_service() { bank_forks.write().unwrap().install_scheduler_pool(pool); let genesis = 0; let genesis_bank = &bank_forks.read().unwrap().get(genesis).unwrap(); - genesis_bank.set_fork_graph_in_program_cache(bank_forks.clone()); + genesis_bank.set_fork_graph_in_program_cache(Arc::downgrade(&bank_forks)); // Create bank, which is pruned later let pruned = 2; diff --git a/cost-model/src/block_cost_limits.rs b/cost-model/src/block_cost_limits.rs index b04f289e0553af..18d3fafcda18e2 100644 --- a/cost-model/src/block_cost_limits.rs +++ b/cost-model/src/block_cost_limits.rs @@ -28,6 +28,8 @@ pub const SIGNATURE_COST: u64 = COMPUTE_UNIT_TO_US_RATIO * 24; pub const SECP256K1_VERIFY_COST: u64 = COMPUTE_UNIT_TO_US_RATIO * 223; /// Number of compute units for one ed25519 signature verification. pub const ED25519_VERIFY_COST: u64 = COMPUTE_UNIT_TO_US_RATIO * 76; +/// Number of compute units for one ed25519 strict signature verification. +pub const ED25519_VERIFY_STRICT_COST: u64 = COMPUTE_UNIT_TO_US_RATIO * 80; /// Number of compute units for one write lock pub const WRITE_LOCK_UNITS: u64 = COMPUTE_UNIT_TO_US_RATIO * 10; /// Number of data bytes per compute units diff --git a/cost-model/src/cost_model.rs b/cost-model/src/cost_model.rs index c444ad0885566f..a230e8149874d5 100644 --- a/cost-model/src/cost_model.rs +++ b/cost-model/src/cost_model.rs @@ -40,7 +40,7 @@ impl CostModel { } else { let mut tx_cost = UsageCostDetails::new_with_default_capacity(); - Self::get_signature_cost(&mut tx_cost, transaction); + Self::get_signature_cost(&mut tx_cost, transaction, feature_set); Self::get_write_lock_cost(&mut tx_cost, transaction, feature_set); Self::get_transaction_cost(&mut tx_cost, transaction, feature_set); tx_cost.allocated_accounts_data_size = @@ -66,7 +66,7 @@ impl CostModel { } else { let mut tx_cost = UsageCostDetails::new_with_default_capacity(); - Self::get_signature_cost(&mut tx_cost, transaction); + Self::get_signature_cost(&mut tx_cost, transaction, feature_set); Self::get_write_lock_cost(&mut tx_cost, transaction, feature_set); Self::get_instructions_data_cost(&mut tx_cost, transaction); tx_cost.allocated_accounts_data_size = @@ -82,13 +82,25 @@ impl CostModel { } } - fn get_signature_cost(tx_cost: &mut UsageCostDetails, transaction: &SanitizedTransaction) { + fn get_signature_cost( + tx_cost: &mut UsageCostDetails, + transaction: &SanitizedTransaction, + feature_set: &FeatureSet, + ) { let signatures_count_detail = transaction.message().get_signature_details(); tx_cost.num_transaction_signatures = signatures_count_detail.num_transaction_signatures(); tx_cost.num_secp256k1_instruction_signatures = signatures_count_detail.num_secp256k1_instruction_signatures(); tx_cost.num_ed25519_instruction_signatures = signatures_count_detail.num_ed25519_instruction_signatures(); + + let ed25519_verify_cost = + if feature_set.is_active(&feature_set::ed25519_precompile_verify_strict::id()) { + ED25519_VERIFY_STRICT_COST + } else { + ED25519_VERIFY_COST + }; + tx_cost.signature_cost = signatures_count_detail .num_transaction_signatures() .saturating_mul(SIGNATURE_COST) @@ -100,7 +112,7 @@ impl CostModel { .saturating_add( signatures_count_detail .num_ed25519_instruction_signatures() - .saturating_mul(ED25519_VERIFY_COST), + .saturating_mul(ed25519_verify_cost), ); } diff --git a/docs/build.sh b/docs/build.sh index 6269eabdbb78b0..4a122678a19b09 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -12,27 +12,6 @@ source ../ci/rust-version.sh ../ci/docker-run-default-image.sh docs/convert-ascii-to-svg.sh ./set-solana-release-tag.sh -# Get current channel -eval "$(../ci/channel-info.sh)" - -# Synchronize translations with Crowdin only on stable channel -if [ "$CHANNEL" = stable ]; then - echo "Downloading & updating translations..." - npm run crowdin:download - npm run crowdin:upload -fi - # Build from /src into /build npm run build echo $? - -# Publish only from merge commits and beta release tags -if [[ -n $CI ]]; then - if [[ -z $CI_PULL_REQUEST ]]; then - if [[ -n $CI_TAG ]] && [[ $CI_TAG != $BETA_CHANNEL* ]]; then - echo "not a beta tag" - exit 0 - fi - ./publish-docs.sh - fi -fi diff --git a/docs/src/cli/index.md b/docs/src/cli/index.md index 77574419618354..27deffd485dfc9 100644 --- a/docs/src/cli/index.md +++ b/docs/src/cli/index.md @@ -11,7 +11,7 @@ cluster by delegating stake. To interact with a Solana cluster, we will use its command-line interface, also known as the CLI. We use the command-line because it is the first place the -Solana core team deploys new functionality. The command-line interface is not +Anza core team deploys new functionality. The command-line interface is not necessarily the easiest to use, but it provides the most direct, flexible, and secure access to your Solana accounts. diff --git a/docs/src/operations/guides/validator-start.md b/docs/src/operations/guides/validator-start.md index d86c714be4e6a6..5907064105c794 100644 --- a/docs/src/operations/guides/validator-start.md +++ b/docs/src/operations/guides/validator-start.md @@ -260,17 +260,15 @@ Read more about [creating and managing a vote account](./vote-accounts.md). ## Known validators -If you know and respect other validator operators, you can specify this on the command line with the `--known-validator ` -argument to `agave-validator`. You can specify multiple ones by repeating the argument `--known-validator --known-validator `. -This has two effects, one is when the validator is booting with `--only-known-rpc`, it will only ask that set of -known nodes for downloading genesis and snapshot data. Another is that in combination with the `--halt-on-known-validators-accounts-hash-mismatch` option, -it will monitor the merkle root hash of the entire accounts state of other known nodes on gossip and if the hashes produce any mismatch, -the validator will halt the node to prevent the validator from voting or processing potentially incorrect state values. At the moment, the slot that -the validator publishes the hash on is tied to the snapshot interval. For the feature to be effective, all validators in the known -set should be set to the same snapshot interval value or multiples of the same. - -It is highly recommended you use these options to prevent malicious snapshot state download or -account state divergence. +If you know and respect other validator operators, you can specify this on the +command line with the `--known-validator ` argument to +`agave-validator`. You can specify multiple ones by repeating the argument +`--known-validator --known-validator `. This has the effect +that when the validator is booting with `--only-known-rpc`, it will only ask +that set of known nodes for downloading genesis and snapshot data. + +It is highly recommended you use this option to prevent malicious snapshot +state download. ## Connect Your Validator diff --git a/docs/src/operations/requirements.md b/docs/src/operations/requirements.md index 90140ed7a57061..2810c0e749bf5a 100644 --- a/docs/src/operations/requirements.md +++ b/docs/src/operations/requirements.md @@ -18,50 +18,15 @@ transaction for each block the validator agrees with, which can cost up to The hardware recommendations below are provided as a guide. Operators are encouraged to do their own performance testing. -- CPU - - 12 cores / 24 threads, or more - - 2.8GHz base clock speed, or faster - - SHA extensions instruction support - - AMD Gen 3 or newer - - Intel Ice Lake or newer - - Higher clock speed is preferable over more cores - - AVX2 instruction support (to use official release binaries, self-compile - otherwise) - - Support for AVX512f is helpful -- RAM - - 256GB or more - - Error Correction Code (ECC) memory is suggested - - Motherboard with 512GB capacity suggested -- Disk - - PCIe Gen3 x4 NVME SSD, or better - - Accounts: 500GB, or larger. High TBW (Total Bytes Written) - - Ledger: 1TB or larger. High TBW suggested - - Snapshots: 250GB or larger. High TBW suggested - - OS: (Optional) 500GB, or larger. SATA OK - - The OS may be installed on the ledger disk, though testing has shown better - performance with the ledger on its own disk - - Accounts and ledger _can_ be stored on the same disk, however due to high - IOPS, this is not recommended - - The Samsung 970 and 980 Pro series SSDs are popular with the validator community -- GPUs - - Not necessary at this time - - Operators in the validator community do not use GPUs currently - -### RPC Node Recommendations - -The [hardware recommendations](#hardware-recommendations) above should be considered -bare minimums if the validator is intended to be employed as an RPC node. To provide -full functionality and improved reliability, the following adjustments should be -made. - -- CPU - - 16 cores / 32 threads, or more -- RAM - - **1.17** 512 GB or more if an `account-index` is used, 1TB+ for all three [account indexes](https://docs.solanalabs.com/operations/setup-an-rpc-node#account-indexing) - - **1.18 or newer** 512 GB or more for all three indexes -- Disk - - Consider a larger ledger disk if longer transaction history is required - - Accounts and ledger should not be stored on the same disk +| Component | Validator Requirements | Additional RPC Node Requirements | +|-----------|------------------------|----------------------------------| +| **CPU** | - 2.8GHz base clock speed, or faster
- SHA extensions instruction support
- AMD Gen 3 or newer
- Intel Ice Lake or newer
- Higher clock speed is preferable over more cores
- AVX2 instruction support (to use official release binaries, self-compile otherwise)
- Support for AVX512f is helpful
|| +| | 12 cores / 24 threads, or more | 16 cores / 32 threads, or more | +| **RAM** | Error Correction Code (ECC) memory is suggested
Motherboard with 512GB capacity suggested || +| | 256GB or more| 512 GB or more for **all [account indexes](https://docs.solanalabs.com/operations/setup-an-rpc-node#account-indexing)** | +| **Disk** | PCIe Gen3 x4 NVME SSD, or better, on each of:
- **Accounts**: 500GB, or larger. High TBW (Total Bytes Written)
- **Ledger**: 1TB or larger. High TBW suggested
- **Snapshots**: 250GB or larger. High TBW suggested
- **OS**: (Optional) 500GB, or larger. SATA OK

The OS may be installed on the ledger disk, though testing has shown better performance with the ledger on its own disk

Accounts and ledger *can* be stored on the same disk, however due to high IOPS, this is not recommended

The Samsung 970 and 980 Pro series SSDs are popular with the validator community | Consider a larger ledger disk if longer transaction history is required

Accounts and ledger **should not** be stored on the same disk | +| **GPUs** | Not necessary at this time
Operators in the validator community do not use GPUs currently | | + ## Virtual machines on Cloud Platforms diff --git a/docs/src/runtime/sysvars.md b/docs/src/runtime/sysvars.md index 36c00747bfaa03..7bf3f04015fd59 100644 --- a/docs/src/runtime/sysvars.md +++ b/docs/src/runtime/sysvars.md @@ -154,18 +154,24 @@ and de-activations per epoch. It is updated at the start of every epoch. ## EpochRewards -The EpochRewards sysvar tracks the progress of epoch rewards distribution. The -sysvar is created in the first block of the epoch, and lasts for several blocks -while paying out the rewards. When all rewards have been distributed, the sysvar -is deleted. Unlike other sysvars, which almost always exist on-chain, -EpochRewards sysvar only exists during the reward period. Therefore, calling -`EpochRewards::get()` on blocks that are outside of the reward period will -return an error, i.e. `UnsupportedSysvar`. This can serve as a method for -determining whether epoch rewards distribution has finished. +The EpochRewards sysvar tracks whether the rewards period (including calculation +and distribution) is in progress, as well as the details needed to resume +distribution when starting from a snapshot during the rewards period. The sysvar +is repopulated at the start of the first block of each epoch. + - Address: `SysvarEpochRewards1111111111111111111111111` - Layout: [EpochRewards](https://docs.rs/solana-program/VERSION_FOR_DOCS_RS/solana_program/epoch_rewards/struct.EpochRewards.html) +- Fields: + + - `distribution_starting_block_height` - starting block height for distribution for the current epoch + - `num_partitions` - the number of partitions in the distribution + - `parent_blockhash` - the blockhash seed used to generate the partition hasher, ie. the blockhash of the parent of the first block in the epoch + - `total_points` - the total rewards points calculated for the epoch + - `total_rewards` - total rewards for epoch, in lamports + - `distributed_rewards` - rewards for the epoch distributed so far, in lamports + - `active` - whether the rewards period is currently active ## LastRestartSlot diff --git a/entry/src/poh.rs b/entry/src/poh.rs index b54c8a745ae4fd..9bf6be66a0594f 100644 --- a/entry/src/poh.rs +++ b/entry/src/poh.rs @@ -109,18 +109,18 @@ impl Poh { } } -pub fn compute_hash_time_ns(hashes_sample_size: u64) -> u64 { +pub fn compute_hash_time(hashes_sample_size: u64) -> Duration { info!("Running {} hashes...", hashes_sample_size); let mut v = Hash::default(); let start = Instant::now(); for _ in 0..hashes_sample_size { v = hash(v.as_ref()); } - start.elapsed().as_nanos() as u64 + start.elapsed() } pub fn compute_hashes_per_tick(duration: Duration, hashes_sample_size: u64) -> u64 { - let elapsed_ms = compute_hash_time_ns(hashes_sample_size) / (1000 * 1000); + let elapsed_ms = compute_hash_time(hashes_sample_size).as_millis() as u64; duration.as_millis() as u64 * hashes_sample_size / elapsed_ms } diff --git a/geyser-plugin-interface/src/geyser_plugin_interface.rs b/geyser-plugin-interface/src/geyser_plugin_interface.rs index d9a3b00f8dc4c8..1dec992bd6f10b 100644 --- a/geyser-plugin-interface/src/geyser_plugin_interface.rs +++ b/geyser-plugin-interface/src/geyser_plugin_interface.rs @@ -8,7 +8,7 @@ use { signature::Signature, transaction::SanitizedTransaction, }, - solana_transaction_status::{Reward, TransactionStatusMeta}, + solana_transaction_status::{Reward, RewardsAndNumPartitions, TransactionStatusMeta}, std::{any::Any, error, io}, thiserror::Error, }; @@ -251,11 +251,27 @@ pub struct ReplicaBlockInfoV3<'a> { pub entry_count: u64, } +/// Extending ReplicaBlockInfo by sending RewardsAndNumPartitions. +#[derive(Clone, Debug)] +#[repr(C)] +pub struct ReplicaBlockInfoV4<'a> { + pub parent_slot: Slot, + pub parent_blockhash: &'a str, + pub slot: Slot, + pub blockhash: &'a str, + pub rewards: &'a RewardsAndNumPartitions, + pub block_time: Option, + pub block_height: Option, + pub executed_transaction_count: u64, + pub entry_count: u64, +} + #[repr(u32)] pub enum ReplicaBlockInfoVersions<'a> { V0_0_1(&'a ReplicaBlockInfo<'a>), V0_0_2(&'a ReplicaBlockInfoV2<'a>), V0_0_3(&'a ReplicaBlockInfoV3<'a>), + V0_0_4(&'a ReplicaBlockInfoV4<'a>), } /// Errors returned by plugin calls diff --git a/geyser-plugin-manager/src/block_metadata_notifier.rs b/geyser-plugin-manager/src/block_metadata_notifier.rs index 87f15f41fc0ae0..acf31c2f8e7c29 100644 --- a/geyser-plugin-manager/src/block_metadata_notifier.rs +++ b/geyser-plugin-manager/src/block_metadata_notifier.rs @@ -4,13 +4,14 @@ use { geyser_plugin_manager::GeyserPluginManager, }, agave_geyser_plugin_interface::geyser_plugin_interface::{ - ReplicaBlockInfoV3, ReplicaBlockInfoVersions, + ReplicaBlockInfoV4, ReplicaBlockInfoVersions, }, log::*, solana_measure::measure::Measure, solana_metrics::*, - solana_sdk::{clock::UnixTimestamp, pubkey::Pubkey, reward_info::RewardInfo}, - solana_transaction_status::{Reward, Rewards}, + solana_runtime::bank::KeyedRewardsAndNumPartitions, + solana_sdk::clock::UnixTimestamp, + solana_transaction_status::{Reward, RewardsAndNumPartitions}, std::sync::{Arc, RwLock}, }; @@ -26,7 +27,7 @@ impl BlockMetadataNotifier for BlockMetadataNotifierImpl { parent_blockhash: &str, slot: u64, blockhash: &str, - rewards: &RwLock>, + rewards: &KeyedRewardsAndNumPartitions, block_time: Option, block_height: Option, executed_transaction_count: u64, @@ -51,7 +52,7 @@ impl BlockMetadataNotifier for BlockMetadataNotifierImpl { executed_transaction_count, entry_count, ); - let block_info = ReplicaBlockInfoVersions::V0_0_3(&block_info); + let block_info = ReplicaBlockInfoVersions::V0_0_4(&block_info); match plugin.notify_block_metadata(block_info) { Err(err) => { error!( @@ -81,18 +82,21 @@ impl BlockMetadataNotifier for BlockMetadataNotifierImpl { } impl BlockMetadataNotifierImpl { - fn build_rewards(rewards: &RwLock>) -> Rewards { - let rewards = rewards.read().unwrap(); - rewards - .iter() - .map(|(pubkey, reward)| Reward { - pubkey: pubkey.to_string(), - lamports: reward.lamports, - post_balance: reward.post_balance, - reward_type: Some(reward.reward_type), - commission: reward.commission, - }) - .collect() + fn build_rewards(rewards: &KeyedRewardsAndNumPartitions) -> RewardsAndNumPartitions { + RewardsAndNumPartitions { + rewards: rewards + .keyed_rewards + .iter() + .map(|(pubkey, reward)| Reward { + pubkey: pubkey.to_string(), + lamports: reward.lamports, + post_balance: reward.post_balance, + reward_type: Some(reward.reward_type), + commission: reward.commission, + }) + .collect(), + num_partitions: rewards.num_partitions, + } } fn build_replica_block_info<'a>( @@ -100,13 +104,13 @@ impl BlockMetadataNotifierImpl { parent_blockhash: &'a str, slot: u64, blockhash: &'a str, - rewards: &'a [Reward], + rewards: &'a RewardsAndNumPartitions, block_time: Option, block_height: Option, executed_transaction_count: u64, entry_count: u64, - ) -> ReplicaBlockInfoV3<'a> { - ReplicaBlockInfoV3 { + ) -> ReplicaBlockInfoV4<'a> { + ReplicaBlockInfoV4 { parent_slot, parent_blockhash, slot, diff --git a/geyser-plugin-manager/src/block_metadata_notifier_interface.rs b/geyser-plugin-manager/src/block_metadata_notifier_interface.rs index bb0ffe4c7f7513..b1f7b1ef50c7e3 100644 --- a/geyser-plugin-manager/src/block_metadata_notifier_interface.rs +++ b/geyser-plugin-manager/src/block_metadata_notifier_interface.rs @@ -1,6 +1,6 @@ use { - solana_sdk::{clock::UnixTimestamp, pubkey::Pubkey, reward_info::RewardInfo}, - std::sync::{Arc, RwLock}, + solana_runtime::bank::KeyedRewardsAndNumPartitions, solana_sdk::clock::UnixTimestamp, + std::sync::Arc, }; /// Interface for notifying block metadata changes @@ -13,7 +13,7 @@ pub trait BlockMetadataNotifier { parent_blockhash: &str, slot: u64, blockhash: &str, - rewards: &RwLock>, + rewards: &KeyedRewardsAndNumPartitions, block_time: Option, block_height: Option, executed_transaction_count: u64, diff --git a/ledger-tool/src/ledger_utils.rs b/ledger-tool/src/ledger_utils.rs index 98a647e21f2851..30f1d77a68043e 100644 --- a/ledger-tool/src/ledger_utils.rs +++ b/ledger-tool/src/ledger_utils.rs @@ -365,7 +365,7 @@ pub fn load_and_process_ledger( exit.clone(), abs_request_handler, process_options.accounts_db_test_hash_calculation, - None, + starting_snapshot_hashes.map(|x| x.full.0 .0), ); let enable_rpc_transaction_history = arg_matches.is_present("enable_rpc_transaction_history"); diff --git a/ledger-tool/src/main.rs b/ledger-tool/src/main.rs index 8339c0a14d07ff..51e1dfe1b08f29 100644 --- a/ledger-tool/src/main.rs +++ b/ledger-tool/src/main.rs @@ -665,9 +665,11 @@ fn main() { let matches = App::new(crate_name!()) .about(crate_description!()) .version(solana_version::version!()) - .setting(AppSettings::InferSubcommands) + .global_setting(AppSettings::ColoredHelp) + .global_setting(AppSettings::InferSubcommands) + .global_setting(AppSettings::UnifiedHelpMessage) + .global_setting(AppSettings::VersionlessSubcommands) .setting(AppSettings::SubcommandRequiredElseHelp) - .setting(AppSettings::VersionlessSubcommands) .arg( Arg::with_name("ledger_path") .short("l") diff --git a/ledger/Cargo.toml b/ledger/Cargo.toml index 8ac69167384bf2..3499216d4784ed 100644 --- a/ledger/Cargo.toml +++ b/ledger/Cargo.toml @@ -31,6 +31,7 @@ mockall = { workspace = true } num_cpus = { workspace = true } num_enum = { workspace = true } prost = { workspace = true } +qualifier_attr = { workspace = true } rand = { workspace = true } rand_chacha = { workspace = true } rayon = { workspace = true } diff --git a/ledger/benches/blockstore_processor.rs b/ledger/benches/blockstore_processor.rs index 489da8f432cfd2..8d01aa69c0d2af 100644 --- a/ledger/benches/blockstore_processor.rs +++ b/ledger/benches/blockstore_processor.rs @@ -12,7 +12,7 @@ use { }, solana_program_runtime::timings::ExecuteTimings, solana_runtime::{ - bank::Bank, prioritization_fee_cache::PrioritizationFeeCache, + bank::Bank, bank_forks::BankForks, prioritization_fee_cache::PrioritizationFeeCache, transaction_batch::TransactionBatch, }, solana_sdk::{ @@ -24,7 +24,10 @@ use { system_program, system_transaction, transaction::SanitizedTransaction, }, - std::{borrow::Cow, sync::Arc}, + std::{ + borrow::Cow, + sync::{Arc, RwLock}, + }, test::Bencher, }; @@ -74,6 +77,7 @@ fn create_transactions(bank: &Bank, num: usize) -> Vec { struct BenchFrame { bank: Arc, + _bank_forks: Arc>, prioritization_fee_cache: PrioritizationFeeCache, } @@ -100,10 +104,11 @@ fn setup(apply_cost_tracker_during_replay: bool) -> BenchFrame { bank.write_cost_tracker() .unwrap() .set_limits(u64::MAX, u64::MAX, u64::MAX); - let bank = bank.wrap_with_bank_forks_for_tests().0; + let (bank, bank_forks) = bank.wrap_with_bank_forks_for_tests(); let prioritization_fee_cache = PrioritizationFeeCache::default(); BenchFrame { bank, + _bank_forks: bank_forks, prioritization_fee_cache, } } @@ -124,6 +129,7 @@ fn bench_execute_batch( let BenchFrame { bank, + _bank_forks, prioritization_fee_cache, } = setup(apply_cost_tracker_during_replay); let transactions = create_transactions(&bank, 2_usize.pow(20)); diff --git a/ledger/src/blockstore_processor.rs b/ledger/src/blockstore_processor.rs index 0e1c247b1af1e9..b9beedf1a24d5a 100644 --- a/ledger/src/blockstore_processor.rs +++ b/ledger/src/blockstore_processor.rs @@ -1,3 +1,5 @@ +#[cfg(feature = "dev-context-only-utils")] +use qualifier_attr::qualifiers; use { crate::{ block_error::BlockError, @@ -1077,6 +1079,7 @@ fn verify_ticks( } #[allow(clippy::too_many_arguments)] +#[cfg_attr(feature = "dev-context-only-utils", qualifiers(pub))] fn confirm_full_slot( blockstore: &Blockstore, bank: &BankWithScheduler, @@ -1683,6 +1686,7 @@ fn confirm_slot_entries( } // Special handling required for processing the entries in slot 0 +#[cfg_attr(feature = "dev-context-only-utils", qualifiers(pub))] fn process_bank_0( bank0: &BankWithScheduler, blockstore: &Blockstore, @@ -3006,7 +3010,7 @@ pub mod tests { mint_keypair, .. } = create_genesis_config(2); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let keypair = Keypair::new(); let slot_entries = create_ticks(genesis_config.ticks_per_slot, 1, genesis_config.hash()); let tx = system_transaction::transfer( @@ -3171,7 +3175,7 @@ pub mod tests { mint_keypair, .. } = create_genesis_config(1000); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let keypair1 = Keypair::new(); let keypair2 = Keypair::new(); @@ -3208,7 +3212,7 @@ pub mod tests { mint_keypair, .. } = create_genesis_config(1000); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let keypair1 = Keypair::new(); let keypair2 = Keypair::new(); let keypair3 = Keypair::new(); @@ -3268,7 +3272,7 @@ pub mod tests { mint_keypair, .. } = create_genesis_config(1000); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let keypair1 = Keypair::new(); let keypair2 = Keypair::new(); let keypair3 = Keypair::new(); @@ -3418,12 +3422,11 @@ pub mod tests { let mock_program_id = solana_sdk::pubkey::new_rand(); - let bank = Bank::new_with_mockup_builtin_for_tests( + let (bank, _bank_forks) = Bank::new_with_mockup_builtin_for_tests( &genesis_config, mock_program_id, MockBuiltinOk::vm, - ) - .0; + ); let tx = Transaction::new_signed_with_payer( &[Instruction::new_with_bincode( @@ -3462,12 +3465,11 @@ pub mod tests { let mut bankhash_err = None; (0..get_instruction_errors().len()).for_each(|err| { - let bank = Bank::new_with_mockup_builtin_for_tests( + let (bank, _bank_forks) = Bank::new_with_mockup_builtin_for_tests( &genesis_config, mock_program_id, MockBuiltinErr::vm, - ) - .0; + ); let tx = Transaction::new_signed_with_payer( &[Instruction::new_with_bincode( @@ -3503,7 +3505,7 @@ pub mod tests { mint_keypair, .. } = create_genesis_config(1000); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let keypair1 = Keypair::new(); let keypair2 = Keypair::new(); let keypair3 = Keypair::new(); @@ -3597,7 +3599,7 @@ pub mod tests { mint_keypair, .. } = create_genesis_config(1000); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let keypair1 = Keypair::new(); let keypair2 = Keypair::new(); let keypair3 = Keypair::new(); @@ -3643,7 +3645,7 @@ pub mod tests { mint_keypair, .. } = create_genesis_config(1_000_000_000); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); const NUM_TRANSFERS_PER_ENTRY: usize = 8; const NUM_TRANSFERS: usize = NUM_TRANSFERS_PER_ENTRY * 32; @@ -3710,7 +3712,7 @@ pub mod tests { .. } = create_genesis_config((num_accounts + 1) as u64 * initial_lamports); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let mut keypairs: Vec = vec![]; @@ -3777,7 +3779,7 @@ pub mod tests { mint_keypair, .. } = create_genesis_config(1000); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let keypair1 = Keypair::new(); let keypair2 = Keypair::new(); let keypair3 = Keypair::new(); @@ -3839,7 +3841,7 @@ pub mod tests { mint_keypair, .. } = create_genesis_config(11_000); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let pubkey = solana_sdk::pubkey::new_rand(); bank.transfer(1_000, &mint_keypair, &pubkey).unwrap(); assert_eq!(bank.transaction_count(), 1); @@ -3880,7 +3882,7 @@ pub mod tests { mint_keypair, .. } = create_genesis_config(11_000); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let keypair1 = Keypair::new(); let keypair2 = Keypair::new(); let success_tx = system_transaction::transfer( @@ -4180,7 +4182,7 @@ pub mod tests { mint_keypair, .. } = create_genesis_config(100); - let bank0 = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank0, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let genesis_hash = genesis_config.hash(); let keypair = Keypair::new(); @@ -4244,7 +4246,7 @@ pub mod tests { mint_keypair, .. } = create_genesis_config(1_000_000_000); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let present_account_key = Keypair::new(); let present_account = AccountSharedData::new(1, 10, &Pubkey::default()); @@ -4713,9 +4715,8 @@ pub mod tests { .. } = create_genesis_config(100 * LAMPORTS_PER_SOL); let genesis_hash = genesis_config.hash(); - let bank = BankWithScheduler::new_without_scheduler( - Bank::new_with_bank_forks_for_tests(&genesis_config).0, - ); + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); + let bank = BankWithScheduler::new_without_scheduler(bank); let replay_tx_thread_pool = create_thread_pool(1); let mut timing = ConfirmationTiming::default(); let mut progress = ConfirmationProgress::new(genesis_hash); diff --git a/ledger/src/shred.rs b/ledger/src/shred.rs index 79d0c9ff79bab6..f2b7a84ed1e2ca 100644 --- a/ledger/src/shred.rs +++ b/ledger/src/shred.rs @@ -757,11 +757,8 @@ pub mod layout { .map(Hash::new) } - pub(crate) fn set_retransmitter_signature( - shred: &mut [u8], - signature: &Signature, - ) -> Result<(), Error> { - let offset = match get_shred_variant(shred)? { + fn get_retransmitter_signature_offset(shred: &[u8]) -> Result { + match get_shred_variant(shred)? { ShredVariant::LegacyCode | ShredVariant::LegacyData => Err(Error::InvalidShredVariant), ShredVariant::MerkleCode { proof_size, @@ -777,7 +774,23 @@ pub mod layout { } => { merkle::ShredData::get_retransmitter_signature_offset(proof_size, chained, resigned) } - }?; + } + } + + pub fn get_retransmitter_signature(shred: &[u8]) -> Result { + let offset = get_retransmitter_signature_offset(shred)?; + shred + .get(offset..offset + SIZE_OF_SIGNATURE) + .map(|bytes| <[u8; SIZE_OF_SIGNATURE]>::try_from(bytes).unwrap()) + .map(Signature::from) + .ok_or(Error::InvalidPayloadSize(shred.len())) + } + + pub(crate) fn set_retransmitter_signature( + shred: &mut [u8], + signature: &Signature, + ) -> Result<(), Error> { + let offset = get_retransmitter_signature_offset(shred)?; let Some(buffer) = shred.get_mut(offset..offset + SIZE_OF_SIGNATURE) else { return Err(Error::InvalidPayloadSize(shred.len())); }; diff --git a/multinode-demo/validator.sh b/multinode-demo/validator.sh index efb7a6afd56ea0..77082f6589245b 100755 --- a/multinode-demo/validator.sh +++ b/multinode-demo/validator.sh @@ -164,9 +164,6 @@ while [[ -n $1 ]]; do elif [[ $1 = --known-validator ]]; then args+=("$1" "$2") shift 2 - elif [[ $1 = --halt-on-known-validators-accounts-hash-mismatch ]]; then - args+=("$1") - shift elif [[ $1 = --max-genesis-archive-unpacked-size ]]; then args+=("$1" "$2") shift 2 diff --git a/poh/src/poh_service.rs b/poh/src/poh_service.rs index 8cd0d40266b37d..04dc8d4c5a1fed 100644 --- a/poh/src/poh_service.rs +++ b/poh/src/poh_service.rs @@ -400,7 +400,7 @@ mod tests { fn test_poh_service() { solana_logger::setup(); let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(2); - let bank = Bank::new_no_wallclock_throttle_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_no_wallclock_throttle_for_tests(&genesis_config); let prev_hash = bank.last_blockhash(); let ledger_path = get_tmp_ledger_path_auto_delete!(); let blockstore = Blockstore::open(ledger_path.path()) diff --git a/program-runtime/src/loaded_programs.rs b/program-runtime/src/loaded_programs.rs index 79c60dd639c335..5a95353b5a542a 100644 --- a/program-runtime/src/loaded_programs.rs +++ b/program-runtime/src/loaded_programs.rs @@ -30,6 +30,7 @@ use { std::{ collections::{hash_map::Entry, HashMap}, fmt::{Debug, Formatter}, + sync::Weak, }, }; @@ -640,7 +641,7 @@ pub struct ProgramCache { /// Statistics counters pub stats: ProgramCacheStats, /// Reference to the block store - pub fork_graph: Option>>, + pub fork_graph: Option>>, /// Coordinates TX batches waiting for others to complete their task during cooperative loading pub loading_task_waiter: Arc, } @@ -825,7 +826,7 @@ impl ProgramCache { } } - pub fn set_fork_graph(&mut self, fork_graph: Arc>) { + pub fn set_fork_graph(&mut self, fork_graph: Weak>) { self.fork_graph = Some(fork_graph); } @@ -948,6 +949,7 @@ impl ProgramCache { error!("Program cache doesn't have fork graph."); return; }; + let fork_graph = fork_graph.upgrade().unwrap(); let Ok(fork_graph) = fork_graph.read() else { error!("Failed to lock fork graph for reading."); return; @@ -1059,7 +1061,8 @@ impl ProgramCache { is_first_round: bool, ) -> Option<(Pubkey, u64)> { debug_assert!(self.fork_graph.is_some()); - let locked_fork_graph = self.fork_graph.as_ref().unwrap().read().unwrap(); + let fork_graph = self.fork_graph.as_ref().unwrap().upgrade().unwrap(); + let locked_fork_graph = fork_graph.read().unwrap(); let mut cooperative_loading_task = None; match &self.index { IndexImplementation::V1 { @@ -1166,6 +1169,8 @@ impl ProgramCache { self.fork_graph .as_ref() .unwrap() + .upgrade() + .unwrap() .read() .unwrap() .relationship(loaded_program.deployment_slot, slot), @@ -2026,7 +2031,7 @@ mod tests { relation: BlockRelation::Unrelated, })); - cache.set_fork_graph(fork_graph); + cache.set_fork_graph(Arc::downgrade(&fork_graph)); cache.prune(0, 0); assert!(cache.get_flattened_entries_for_tests().is_empty()); @@ -2039,7 +2044,7 @@ mod tests { relation: BlockRelation::Ancestor, })); - cache.set_fork_graph(fork_graph); + cache.set_fork_graph(Arc::downgrade(&fork_graph)); cache.prune(0, 0); assert!(cache.get_flattened_entries_for_tests().is_empty()); @@ -2052,7 +2057,7 @@ mod tests { relation: BlockRelation::Descendant, })); - cache.set_fork_graph(fork_graph); + cache.set_fork_graph(Arc::downgrade(&fork_graph)); cache.prune(0, 0); assert!(cache.get_flattened_entries_for_tests().is_empty()); @@ -2064,7 +2069,7 @@ mod tests { let fork_graph = Arc::new(RwLock::new(TestForkGraph { relation: BlockRelation::Unknown, })); - cache.set_fork_graph(fork_graph); + cache.set_fork_graph(Arc::downgrade(&fork_graph)); cache.prune(0, 0); assert!(cache.get_flattened_entries_for_tests().is_empty()); @@ -2081,7 +2086,7 @@ mod tests { relation: BlockRelation::Ancestor, })); - cache.set_fork_graph(fork_graph); + cache.set_fork_graph(Arc::downgrade(&fork_graph)); let program1 = Pubkey::new_unique(); cache.assign_program(program1, new_test_entry(10, 10)); @@ -2171,7 +2176,8 @@ mod tests { loading_slot: Slot, keys: &[Pubkey], ) -> Vec<(Pubkey, (ProgramCacheMatchCriteria, u64))> { - let locked_fork_graph = cache.fork_graph.as_ref().unwrap().read().unwrap(); + let fork_graph = cache.fork_graph.as_ref().unwrap().upgrade().unwrap(); + let locked_fork_graph = fork_graph.read().unwrap(); let entries = cache.get_flattened_entries_for_tests(); keys.iter() .filter_map(|key| { @@ -2239,7 +2245,7 @@ mod tests { fork_graph.insert_fork(&[0, 5, 11, 25, 27]); let fork_graph = Arc::new(RwLock::new(fork_graph)); - cache.set_fork_graph(fork_graph); + cache.set_fork_graph(Arc::downgrade(&fork_graph)); let program1 = Pubkey::new_unique(); cache.assign_program(program1, new_test_entry(0, 1)); @@ -2434,7 +2440,7 @@ mod tests { fork_graph.insert_fork(&[0, 5, 11, 25, 27]); let fork_graph = Arc::new(RwLock::new(fork_graph)); - cache.set_fork_graph(fork_graph); + cache.set_fork_graph(Arc::downgrade(&fork_graph)); let program1 = Pubkey::new_unique(); cache.assign_program(program1, new_test_entry(0, 1)); @@ -2491,7 +2497,7 @@ mod tests { fork_graph.insert_fork(&[0, 5, 11, 25, 27]); let fork_graph = Arc::new(RwLock::new(fork_graph)); - cache.set_fork_graph(fork_graph); + cache.set_fork_graph(Arc::downgrade(&fork_graph)); let program1 = Pubkey::new_unique(); cache.assign_program(program1, new_test_entry(0, 1)); @@ -2547,7 +2553,7 @@ mod tests { let mut cache = new_mock_cache::(); let fork_graph = TestForkGraphSpecific::default(); let fork_graph = Arc::new(RwLock::new(fork_graph)); - cache.set_fork_graph(fork_graph); + cache.set_fork_graph(Arc::downgrade(&fork_graph)); let program1 = Pubkey::new_unique(); let mut missing = vec![(program1, (ProgramCacheMatchCriteria::NoCriteria, 1))]; @@ -2619,7 +2625,7 @@ mod tests { fork_graph.insert_fork(&[0, 10, 20]); fork_graph.insert_fork(&[0, 5]); let fork_graph = Arc::new(RwLock::new(fork_graph)); - cache.set_fork_graph(fork_graph); + cache.set_fork_graph(Arc::downgrade(&fork_graph)); let program1 = Pubkey::new_unique(); cache.assign_program(program1, new_test_entry(0, 1)); @@ -2659,7 +2665,7 @@ mod tests { fork_graph.insert_fork(&[0, 10, 20]); fork_graph.insert_fork(&[0, 5, 6]); let fork_graph = Arc::new(RwLock::new(fork_graph)); - cache.set_fork_graph(fork_graph); + cache.set_fork_graph(Arc::downgrade(&fork_graph)); let program1 = Pubkey::new_unique(); cache.assign_program(program1, new_test_entry(0, 1)); diff --git a/programs/sbf/Cargo.lock b/programs/sbf/Cargo.lock index fe8f9472463d97..812a898c3112b0 100644 --- a/programs/sbf/Cargo.lock +++ b/programs/sbf/Cargo.lock @@ -65,7 +65,7 @@ dependencies = [ [[package]] name = "agave-geyser-plugin-interface" -version = "2.0.2" +version = "2.0.5" dependencies = [ "log", "solana-sdk", @@ -75,7 +75,7 @@ dependencies = [ [[package]] name = "agave-validator" -version = "2.0.2" +version = "2.0.5" dependencies = [ "agave-geyser-plugin-interface", "chrono", @@ -3166,9 +3166,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ "bitflags 2.5.0", "cfg-if 1.0.0", @@ -3207,9 +3207,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -4520,7 +4520,7 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "2.0.2" +version = "2.0.5" dependencies = [ "Inflector", "base64 0.22.1", @@ -4543,7 +4543,7 @@ dependencies = [ [[package]] name = "solana-accounts-db" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "blake3", @@ -4586,7 +4586,7 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-program" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "bytemuck", @@ -4602,7 +4602,7 @@ dependencies = [ [[package]] name = "solana-banks-client" -version = "2.0.2" +version = "2.0.5" dependencies = [ "borsh 1.5.1", "futures 0.3.30", @@ -4617,7 +4617,7 @@ dependencies = [ [[package]] name = "solana-banks-interface" -version = "2.0.2" +version = "2.0.5" dependencies = [ "serde", "serde_derive", @@ -4627,7 +4627,7 @@ dependencies = [ [[package]] name = "solana-banks-server" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "crossbeam-channel", @@ -4645,7 +4645,7 @@ dependencies = [ [[package]] name = "solana-bloom" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bv", "fnv", @@ -4660,7 +4660,7 @@ dependencies = [ [[package]] name = "solana-bpf-loader-program" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "byteorder 1.5.0", @@ -4680,7 +4680,7 @@ dependencies = [ [[package]] name = "solana-bucket-map" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bv", "bytemuck", @@ -4697,7 +4697,7 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "2.0.2" +version = "2.0.5" dependencies = [ "chrono", "clap 2.33.3", @@ -4712,7 +4712,7 @@ dependencies = [ [[package]] name = "solana-cli-config" -version = "2.0.2" +version = "2.0.5" dependencies = [ "dirs-next", "lazy_static", @@ -4726,7 +4726,7 @@ dependencies = [ [[package]] name = "solana-cli-output" -version = "2.0.2" +version = "2.0.5" dependencies = [ "Inflector", "base64 0.22.1", @@ -4751,7 +4751,7 @@ dependencies = [ [[package]] name = "solana-client" -version = "2.0.2" +version = "2.0.5" dependencies = [ "async-trait", "bincode", @@ -4782,7 +4782,7 @@ dependencies = [ [[package]] name = "solana-compute-budget" -version = "2.0.2" +version = "2.0.5" dependencies = [ "rustc_version", "solana-sdk", @@ -4790,7 +4790,7 @@ dependencies = [ [[package]] name = "solana-compute-budget-program" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program-runtime", "solana-sdk", @@ -4798,7 +4798,7 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "chrono", @@ -4810,7 +4810,7 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "2.0.2" +version = "2.0.5" dependencies = [ "async-trait", "bincode", @@ -4829,7 +4829,7 @@ dependencies = [ [[package]] name = "solana-core" -version = "2.0.2" +version = "2.0.5" dependencies = [ "ahash 0.8.10", "base64 0.22.1", @@ -4905,7 +4905,7 @@ dependencies = [ [[package]] name = "solana-cost-model" -version = "2.0.2" +version = "2.0.5" dependencies = [ "ahash 0.8.10", "lazy_static", @@ -4926,7 +4926,7 @@ dependencies = [ [[package]] name = "solana-curve25519" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bytemuck", "bytemuck_derive", @@ -4937,7 +4937,7 @@ dependencies = [ [[package]] name = "solana-download-utils" -version = "2.0.2" +version = "2.0.5" dependencies = [ "console", "indicatif", @@ -4949,7 +4949,7 @@ dependencies = [ [[package]] name = "solana-entry" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "crossbeam-channel", @@ -4969,7 +4969,7 @@ dependencies = [ [[package]] name = "solana-faucet" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "byteorder 1.5.0", @@ -4991,7 +4991,7 @@ dependencies = [ [[package]] name = "solana-genesis-utils" -version = "2.0.2" +version = "2.0.5" dependencies = [ "log", "solana-accounts-db", @@ -5002,7 +5002,7 @@ dependencies = [ [[package]] name = "solana-geyser-plugin-manager" -version = "2.0.2" +version = "2.0.5" dependencies = [ "agave-geyser-plugin-interface", "bs58", @@ -5027,7 +5027,7 @@ dependencies = [ [[package]] name = "solana-gossip" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "bincode", @@ -5073,7 +5073,7 @@ dependencies = [ [[package]] name = "solana-inline-spl" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bytemuck", "rustc_version", @@ -5082,7 +5082,7 @@ dependencies = [ [[package]] name = "solana-ledger" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "bincode", @@ -5105,6 +5105,7 @@ dependencies = [ "num_cpus", "num_enum", "prost", + "qualifier_attr", "rand 0.8.5", "rand_chacha 0.3.1", "rayon", @@ -5148,7 +5149,7 @@ dependencies = [ [[package]] name = "solana-loader-v4-program" -version = "2.0.2" +version = "2.0.5" dependencies = [ "log", "solana-compute-budget", @@ -5161,7 +5162,7 @@ dependencies = [ [[package]] name = "solana-logger" -version = "2.0.2" +version = "2.0.5" dependencies = [ "env_logger", "lazy_static", @@ -5170,7 +5171,7 @@ dependencies = [ [[package]] name = "solana-measure" -version = "2.0.2" +version = "2.0.5" dependencies = [ "log", "solana-sdk", @@ -5178,7 +5179,7 @@ dependencies = [ [[package]] name = "solana-merkle-tree" -version = "2.0.2" +version = "2.0.5" dependencies = [ "fast-math", "solana-program", @@ -5186,7 +5187,7 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "2.0.2" +version = "2.0.5" dependencies = [ "crossbeam-channel", "gethostname", @@ -5199,7 +5200,7 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "clap 3.2.25", @@ -5226,7 +5227,7 @@ checksum = "8b8a731ed60e89177c8a7ab05fe0f1511cedd3e70e773f288f9de33a9cfdc21e" [[package]] name = "solana-perf" -version = "2.0.2" +version = "2.0.5" dependencies = [ "ahash 0.8.10", "bincode", @@ -5251,7 +5252,7 @@ dependencies = [ [[package]] name = "solana-poh" -version = "2.0.2" +version = "2.0.5" dependencies = [ "core_affinity", "crossbeam-channel", @@ -5267,7 +5268,7 @@ dependencies = [ [[package]] name = "solana-poseidon" -version = "2.0.2" +version = "2.0.5" dependencies = [ "ark-bn254", "light-poseidon", @@ -5276,7 +5277,7 @@ dependencies = [ [[package]] name = "solana-program" -version = "2.0.2" +version = "2.0.5" dependencies = [ "ark-bn254", "ark-ec", @@ -5320,7 +5321,7 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "2.0.2" +version = "2.0.5" dependencies = [ "base64 0.22.1", "bincode", @@ -5347,7 +5348,7 @@ dependencies = [ [[package]] name = "solana-program-test" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "async-trait", @@ -5377,7 +5378,7 @@ dependencies = [ [[package]] name = "solana-pubsub-client" -version = "2.0.2" +version = "2.0.5" dependencies = [ "crossbeam-channel", "futures-util", @@ -5400,7 +5401,7 @@ dependencies = [ [[package]] name = "solana-quic-client" -version = "2.0.2" +version = "2.0.5" dependencies = [ "async-mutex", "async-trait", @@ -5424,7 +5425,7 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "2.0.2" +version = "2.0.5" dependencies = [ "lazy_static", "num_cpus", @@ -5432,7 +5433,7 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "2.0.2" +version = "2.0.5" dependencies = [ "console", "dialoguer", @@ -5449,7 +5450,7 @@ dependencies = [ [[package]] name = "solana-rpc" -version = "2.0.2" +version = "2.0.5" dependencies = [ "base64 0.22.1", "bincode", @@ -5506,7 +5507,7 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "2.0.2" +version = "2.0.5" dependencies = [ "async-trait", "base64 0.22.1", @@ -5531,7 +5532,7 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "2.0.2" +version = "2.0.5" dependencies = [ "anyhow", "base64 0.22.1", @@ -5553,7 +5554,7 @@ dependencies = [ [[package]] name = "solana-rpc-client-nonce-utils" -version = "2.0.2" +version = "2.0.5" dependencies = [ "clap 2.33.3", "solana-clap-utils", @@ -5564,7 +5565,7 @@ dependencies = [ [[package]] name = "solana-runtime" -version = "2.0.2" +version = "2.0.5" dependencies = [ "aquamarine", "arrayref", @@ -5642,7 +5643,7 @@ dependencies = [ [[package]] name = "solana-sbf-programs" -version = "2.0.2" +version = "2.0.5" dependencies = [ "agave-validator", "bincode", @@ -5675,7 +5676,7 @@ dependencies = [ [[package]] name = "solana-sbf-rust-128bit" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", "solana-sbf-rust-128bit-dep", @@ -5683,21 +5684,21 @@ dependencies = [ [[package]] name = "solana-sbf-rust-128bit-dep" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-alloc" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-alt-bn128" -version = "2.0.2" +version = "2.0.5" dependencies = [ "array-bytes", "solana-program", @@ -5705,7 +5706,7 @@ dependencies = [ [[package]] name = "solana-sbf-rust-alt-bn128-compression" -version = "2.0.2" +version = "2.0.5" dependencies = [ "array-bytes", "solana-program", @@ -5713,7 +5714,7 @@ dependencies = [ [[package]] name = "solana-sbf-rust-big-mod-exp" -version = "2.0.2" +version = "2.0.5" dependencies = [ "array-bytes", "serde", @@ -5724,21 +5725,21 @@ dependencies = [ [[package]] name = "solana-sbf-rust-call-depth" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-caller-access" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-curve25519" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-curve25519", "solana-program", @@ -5747,14 +5748,14 @@ dependencies = [ [[package]] name = "solana-sbf-rust-custom-heap" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-dep-crate" -version = "2.0.2" +version = "2.0.5" dependencies = [ "byteorder 1.5.0", "solana-program", @@ -5762,21 +5763,21 @@ dependencies = [ [[package]] name = "solana-sbf-rust-deprecated-loader" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-dup-accounts" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-error-handling" -version = "2.0.2" +version = "2.0.5" dependencies = [ "num-derive", "num-traits", @@ -5786,42 +5787,42 @@ dependencies = [ [[package]] name = "solana-sbf-rust-external-spend" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-finalize" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-get-minimum-delegation" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-inner_instruction_alignment_check" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-instruction-introspection" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-invoke" -version = "2.0.2" +version = "2.0.5" dependencies = [ "rustversion", "solana-program", @@ -5832,32 +5833,32 @@ dependencies = [ [[package]] name = "solana-sbf-rust-invoke-and-error" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-invoke-and-ok" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-invoke-and-return" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-invoke-dep" -version = "2.0.2" +version = "2.0.5" [[package]] name = "solana-sbf-rust-invoked" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", "solana-sbf-rust-invoked-dep", @@ -5865,28 +5866,28 @@ dependencies = [ [[package]] name = "solana-sbf-rust-invoked-dep" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-iter" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-log-data" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-many-args" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", "solana-sbf-rust-many-args-dep", @@ -5894,14 +5895,14 @@ dependencies = [ [[package]] name = "solana-sbf-rust-many-args-dep" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-mem" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", "solana-sbf-rust-mem-dep", @@ -5909,14 +5910,14 @@ dependencies = [ [[package]] name = "solana-sbf-rust-mem-dep" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-membuiltins" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", "solana-sbf-rust-mem-dep", @@ -5924,21 +5925,21 @@ dependencies = [ [[package]] name = "solana-sbf-rust-noop" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-panic" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-param-passing" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", "solana-sbf-rust-param-passing-dep", @@ -5946,14 +5947,14 @@ dependencies = [ [[package]] name = "solana-sbf-rust-param-passing-dep" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-poseidon" -version = "2.0.2" +version = "2.0.5" dependencies = [ "array-bytes", "solana-poseidon", @@ -5962,7 +5963,7 @@ dependencies = [ [[package]] name = "solana-sbf-rust-rand" -version = "2.0.2" +version = "2.0.5" dependencies = [ "getrandom 0.2.10", "rand 0.8.5", @@ -5971,7 +5972,7 @@ dependencies = [ [[package]] name = "solana-sbf-rust-realloc" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", "solana-sbf-rust-realloc-dep", @@ -5979,14 +5980,14 @@ dependencies = [ [[package]] name = "solana-sbf-rust-realloc-dep" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-realloc-invoke" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", "solana-sbf-rust-realloc-dep", @@ -5995,39 +5996,39 @@ dependencies = [ [[package]] name = "solana-sbf-rust-realloc-invoke-dep" -version = "2.0.2" +version = "2.0.5" [[package]] name = "solana-sbf-rust-remaining-compute-units" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-ro-account_modify" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-ro-modify" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-sanity" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-secp256k1-recover" -version = "2.0.2" +version = "2.0.5" dependencies = [ "libsecp256k1 0.7.0", "solana-program", @@ -6035,7 +6036,7 @@ dependencies = [ [[package]] name = "solana-sbf-rust-sha" -version = "2.0.2" +version = "2.0.5" dependencies = [ "blake3", "solana-program", @@ -6043,63 +6044,63 @@ dependencies = [ [[package]] name = "solana-sbf-rust-sibling-inner-instructions" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-sibling-instructions" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-simulation" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-spoof1" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-spoof1-system" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-sysvar" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-upgradeable" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-upgraded" -version = "2.0.2" +version = "2.0.5" dependencies = [ "solana-program", ] [[package]] name = "solana-sdk" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "bitflags 2.5.0", @@ -6147,7 +6148,7 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bs58", "proc-macro2", @@ -6164,7 +6165,7 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-send-transaction-service" -version = "2.0.2" +version = "2.0.5" dependencies = [ "crossbeam-channel", "log", @@ -6179,7 +6180,7 @@ dependencies = [ [[package]] name = "solana-stake-program" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "log", @@ -6193,7 +6194,7 @@ dependencies = [ [[package]] name = "solana-storage-bigtable" -version = "2.0.2" +version = "2.0.5" dependencies = [ "backoff", "bincode", @@ -6225,7 +6226,7 @@ dependencies = [ [[package]] name = "solana-storage-proto" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "bs58", @@ -6240,7 +6241,7 @@ dependencies = [ [[package]] name = "solana-streamer" -version = "2.0.2" +version = "2.0.5" dependencies = [ "async-channel", "bytes", @@ -6272,7 +6273,7 @@ dependencies = [ [[package]] name = "solana-svm" -version = "2.0.2" +version = "2.0.5" dependencies = [ "itertools 0.12.1", "log", @@ -6296,7 +6297,7 @@ dependencies = [ [[package]] name = "solana-system-program" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "log", @@ -6309,7 +6310,7 @@ dependencies = [ [[package]] name = "solana-test-validator" -version = "2.0.2" +version = "2.0.5" dependencies = [ "base64 0.22.1", "bincode", @@ -6339,7 +6340,7 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "log", @@ -6352,7 +6353,7 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "2.0.2" +version = "2.0.5" dependencies = [ "async-trait", "bincode", @@ -6374,7 +6375,7 @@ dependencies = [ [[package]] name = "solana-transaction-metrics-tracker" -version = "2.0.2" +version = "2.0.5" dependencies = [ "Inflector", "base64 0.22.1", @@ -6388,7 +6389,7 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "2.0.2" +version = "2.0.5" dependencies = [ "Inflector", "base64 0.22.1", @@ -6413,7 +6414,7 @@ dependencies = [ [[package]] name = "solana-turbine" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "bytes", @@ -6441,13 +6442,14 @@ dependencies = [ "solana-runtime", "solana-sdk", "solana-streamer", + "static_assertions", "thiserror", "tokio", ] [[package]] name = "solana-type-overrides" -version = "2.0.2" +version = "2.0.5" dependencies = [ "lazy_static", "rand 0.8.5", @@ -6455,7 +6457,7 @@ dependencies = [ [[package]] name = "solana-udp-client" -version = "2.0.2" +version = "2.0.5" dependencies = [ "async-trait", "solana-connection-cache", @@ -6468,7 +6470,7 @@ dependencies = [ [[package]] name = "solana-unified-scheduler-logic" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "solana-sdk", @@ -6477,7 +6479,7 @@ dependencies = [ [[package]] name = "solana-unified-scheduler-pool" -version = "2.0.2" +version = "2.0.5" dependencies = [ "assert_matches", "crossbeam-channel", @@ -6496,7 +6498,7 @@ dependencies = [ [[package]] name = "solana-version" -version = "2.0.2" +version = "2.0.5" dependencies = [ "log", "rustc_version", @@ -6508,7 +6510,7 @@ dependencies = [ [[package]] name = "solana-vote" -version = "2.0.2" +version = "2.0.5" dependencies = [ "itertools 0.12.1", "log", @@ -6521,7 +6523,7 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bincode", "log", @@ -6539,7 +6541,7 @@ dependencies = [ [[package]] name = "solana-wen-restart" -version = "2.0.2" +version = "2.0.5" dependencies = [ "anyhow", "log", @@ -6562,7 +6564,7 @@ dependencies = [ [[package]] name = "solana-zk-elgamal-proof-program" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bytemuck", "num-derive", @@ -6574,7 +6576,7 @@ dependencies = [ [[package]] name = "solana-zk-sdk" -version = "2.0.2" +version = "2.0.5" dependencies = [ "aes-gcm-siv", "base64 0.22.1", @@ -6601,7 +6603,7 @@ dependencies = [ [[package]] name = "solana-zk-token-proof-program" -version = "2.0.2" +version = "2.0.5" dependencies = [ "bytemuck", "num-derive", @@ -6613,7 +6615,7 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "2.0.2" +version = "2.0.5" dependencies = [ "aes-gcm-siv", "base64 0.22.1", @@ -6642,9 +6644,9 @@ dependencies = [ [[package]] name = "solana_rbpf" -version = "0.8.1" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06beab07f4104d6ad70d47baa67ad1bcd501a2345a983e20c389bade7c72305e" +checksum = "ff08afd63f70a1ba712fb0017be41e93b017f7e874785b54bb5ec9aa8949781d" dependencies = [ "byteorder 1.5.0", "combine", diff --git a/programs/sbf/Cargo.toml b/programs/sbf/Cargo.toml index a2880b5b1c6d9c..c1e9cc2d53eee2 100644 --- a/programs/sbf/Cargo.toml +++ b/programs/sbf/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "2.0.2" +version = "2.0.5" description = "Solana SBF test program written in Rust" authors = ["Anza Maintainers "] repository = "https://github.com/anza-xyz/agave" @@ -26,34 +26,34 @@ rustversion = "1.0.14" serde = "1.0.112" # must match the serde_derive version, see https://github.com/serde-rs/serde/issues/2584#issuecomment-1685252251 serde_derive = "1.0.112" # must match the serde version, see https://github.com/serde-rs/serde/issues/2584#issuecomment-1685252251 serde_json = "1.0.56" -solana-account-decoder = { path = "../../account-decoder", version = "=2.0.2" } -solana-accounts-db = { path = "../../accounts-db", version = "=2.0.2" } -solana-bpf-loader-program = { path = "../bpf_loader", version = "=2.0.2" } -solana-cli-output = { path = "../../cli-output", version = "=2.0.2" } -solana-compute-budget = { path = "../../compute-budget", version = "=2.0.2" } -solana-curve25519 = { path = "../../curves/curve25519", version = "=2.0.2" } -solana-ledger = { path = "../../ledger", version = "=2.0.2" } -solana-logger = { path = "../../logger", version = "=2.0.2" } -solana-measure = { path = "../../measure", version = "=2.0.2" } -solana-poseidon = { path = "../../poseidon/", version = "=2.0.2" } -solana-program = { path = "../../sdk/program", version = "=2.0.2" } -solana-program-runtime = { path = "../../program-runtime", version = "=2.0.2" } -solana-runtime = { path = "../../runtime", version = "=2.0.2" } -solana-sbf-rust-128bit-dep = { path = "rust/128bit_dep", version = "=2.0.2" } -solana-sbf-rust-invoke-dep = { path = "rust/invoke_dep", version = "=2.0.2" } -solana-sbf-rust-invoked-dep = { path = "rust/invoked_dep", version = "=2.0.2" } -solana-sbf-rust-many-args-dep = { path = "rust/many_args_dep", version = "=2.0.2" } -solana-sbf-rust-mem-dep = { path = "rust/mem_dep", version = "=2.0.2" } -solana-sbf-rust-param-passing-dep = { path = "rust/param_passing_dep", version = "=2.0.2" } -solana-sbf-rust-realloc-dep = { path = "rust/realloc_dep", version = "=2.0.2" } -solana-sbf-rust-realloc-invoke-dep = { path = "rust/realloc_invoke_dep", version = "=2.0.2" } -solana-sdk = { path = "../../sdk", version = "=2.0.2" } -solana-svm = { path = "../../svm", version = "=2.0.2" } -solana-transaction-status = { path = "../../transaction-status", version = "=2.0.2" } -solana-type-overrides = { path = "../../type-overrides", version = "=2.0.2" } -agave-validator = { path = "../../validator", version = "=2.0.2" } -solana-zk-token-sdk = { path = "../../zk-token-sdk", version = "=2.0.2" } -solana_rbpf = "=0.8.1" +solana-account-decoder = { path = "../../account-decoder", version = "=2.0.5" } +solana-accounts-db = { path = "../../accounts-db", version = "=2.0.5" } +solana-bpf-loader-program = { path = "../bpf_loader", version = "=2.0.5" } +solana-cli-output = { path = "../../cli-output", version = "=2.0.5" } +solana-compute-budget = { path = "../../compute-budget", version = "=2.0.5" } +solana-curve25519 = { path = "../../curves/curve25519", version = "=2.0.5" } +solana-ledger = { path = "../../ledger", version = "=2.0.5" } +solana-logger = { path = "../../logger", version = "=2.0.5" } +solana-measure = { path = "../../measure", version = "=2.0.5" } +solana-poseidon = { path = "../../poseidon/", version = "=2.0.5" } +solana-program = { path = "../../sdk/program", version = "=2.0.5" } +solana-program-runtime = { path = "../../program-runtime", version = "=2.0.5" } +solana-runtime = { path = "../../runtime", version = "=2.0.5" } +solana-sbf-rust-128bit-dep = { path = "rust/128bit_dep", version = "=2.0.5" } +solana-sbf-rust-invoke-dep = { path = "rust/invoke_dep", version = "=2.0.5" } +solana-sbf-rust-invoked-dep = { path = "rust/invoked_dep", version = "=2.0.5" } +solana-sbf-rust-many-args-dep = { path = "rust/many_args_dep", version = "=2.0.5" } +solana-sbf-rust-mem-dep = { path = "rust/mem_dep", version = "=2.0.5" } +solana-sbf-rust-param-passing-dep = { path = "rust/param_passing_dep", version = "=2.0.5" } +solana-sbf-rust-realloc-dep = { path = "rust/realloc_dep", version = "=2.0.5" } +solana-sbf-rust-realloc-invoke-dep = { path = "rust/realloc_invoke_dep", version = "=2.0.5" } +solana-sdk = { path = "../../sdk", version = "=2.0.5" } +solana-svm = { path = "../../svm", version = "=2.0.5" } +solana-transaction-status = { path = "../../transaction-status", version = "=2.0.5" } +solana-type-overrides = { path = "../../type-overrides", version = "=2.0.5" } +agave-validator = { path = "../../validator", version = "=2.0.5" } +solana-zk-token-sdk = { path = "../../zk-token-sdk", version = "=2.0.5" } +solana_rbpf = "=0.8.4" thiserror = "1.0" [package] diff --git a/programs/sbf/tests/programs.rs b/programs/sbf/tests/programs.rs index b26c2e74e230ff..55802a89dcbc33 100644 --- a/programs/sbf/tests/programs.rs +++ b/programs/sbf/tests/programs.rs @@ -23,6 +23,7 @@ use { solana_runtime::{ bank::{Bank, TransactionBalancesSet}, bank_client::BankClient, + bank_forks::BankForks, genesis_utils::{ bootstrap_validator_stake_lamports, create_genesis_config, create_genesis_config_with_leader_ex, GenesisConfigInfo, @@ -73,7 +74,12 @@ use { TransactionWithStatusMeta, VersionedTransactionWithStatusMeta, }, std::{ - assert_eq, cell::RefCell, collections::HashMap, str::FromStr, sync::Arc, time::Duration, + assert_eq, + cell::RefCell, + collections::HashMap, + str::FromStr, + sync::{Arc, RwLock}, + time::Duration, }, }; @@ -2530,7 +2536,7 @@ fn test_program_upgradeable_locks() { payer_keypair: &Keypair, buffer_keypair: &Keypair, program_keypair: &Keypair, - ) -> (Arc, Transaction, Transaction) { + ) -> (Arc, Arc>, Transaction, Transaction) { solana_logger::setup(); let GenesisConfigInfo { @@ -2600,7 +2606,7 @@ fn test_program_upgradeable_locks() { bank.last_blockhash(), ); - (bank, invoke_tx, upgrade_tx) + (bank, bank_forks, invoke_tx, upgrade_tx) } let payer_keypair = keypair_from_seed(&[56u8; 32]).unwrap(); @@ -2608,13 +2614,13 @@ fn test_program_upgradeable_locks() { let program_keypair = keypair_from_seed(&[77u8; 32]).unwrap(); let results1 = { - let (bank, invoke_tx, upgrade_tx) = + let (bank, _bank_forks, invoke_tx, upgrade_tx) = setup_program_upgradeable_locks(&payer_keypair, &buffer_keypair, &program_keypair); execute_transactions(&bank, vec![upgrade_tx, invoke_tx]) }; let results2 = { - let (bank, invoke_tx, upgrade_tx) = + let (bank, _bank_forks, invoke_tx, upgrade_tx) = setup_program_upgradeable_locks(&payer_keypair, &buffer_keypair, &program_keypair); execute_transactions(&bank, vec![invoke_tx, upgrade_tx]) }; diff --git a/programs/stake-tests/Cargo.toml b/programs/stake-tests/Cargo.toml new file mode 100644 index 00000000000000..4c89f4dd6d0fbf --- /dev/null +++ b/programs/stake-tests/Cargo.toml @@ -0,0 +1,26 @@ +# This package only exists to avoid circular dependencies during cargo publish: +# solana-program-test <--> solana-stake-program + +[package] +name = "solana-stake-program-tests" +publish = false +version = { workspace = true } +authors = { workspace = true } +repository = { workspace = true } +homepage = { workspace = true } +license = { workspace = true } +edition = { workspace = true } + +[dev-dependencies] +assert_matches = { workspace = true } +bincode = { workspace = true } +solana-program-test = { workspace = true } +solana-sdk = { workspace = true } +solana-vote-program = { workspace = true } +test-case = { workspace = true } + +[build-dependencies] +rustc_version = { workspace = true } + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] diff --git a/programs/stake-tests/tests/test_move_stake_and_lamports.rs b/programs/stake-tests/tests/test_move_stake_and_lamports.rs new file mode 100644 index 00000000000000..7c67db2d5520b9 --- /dev/null +++ b/programs/stake-tests/tests/test_move_stake_and_lamports.rs @@ -0,0 +1,1286 @@ +#![allow(clippy::arithmetic_side_effects)] + +// NOTE this is temporarily ported from the bpf stake program repo so MoveStake and MoveLamports can be tested comprehensively +// in the future we will either port *all* instruction tests from bpf stake program and remove existing stakeinstruction tests +// or we will develop a text fixture system that allows fuzzing and obsoletes both existing test suites +// in other words the utility functions in this file should not be broken out into modules or used elsewhere + +use { + solana_program_test::*, + solana_sdk::{ + account::Account as SolanaAccount, + entrypoint::ProgramResult, + feature_set::move_stake_and_move_lamports_ixs, + instruction::Instruction, + program_error::ProgramError, + pubkey::Pubkey, + signature::{Keypair, Signer}, + signers::Signers, + stake::{ + self, + instruction::{self as ixn, StakeError}, + program as stake_program, + state::{Authorized, Lockup, Meta, Stake, StakeStateV2}, + }, + system_instruction, system_program, + sysvar::{clock::Clock, stake_history::StakeHistory}, + transaction::{Transaction, TransactionError}, + }, + solana_vote_program::{ + self, vote_instruction, + vote_state::{VoteInit, VoteState, VoteStateVersions}, + }, + test_case::test_matrix, +}; + +const NO_SIGNERS: &[Keypair] = &[]; + +fn program_test() -> ProgramTest { + program_test_without_features(&[]) +} + +fn program_test_without_features(feature_ids: &[Pubkey]) -> ProgramTest { + let mut program_test = ProgramTest::default(); + for feature_id in feature_ids { + program_test.deactivate_feature(*feature_id); + } + + program_test +} + +#[derive(Debug, PartialEq)] +struct Accounts { + validator: Keypair, + voter: Keypair, + withdrawer: Keypair, + vote_account: Keypair, +} + +impl Accounts { + async fn initialize(&self, context: &mut ProgramTestContext) { + let slot = context.genesis_config().epoch_schedule.first_normal_slot + 1; + context.warp_to_slot(slot).unwrap(); + + create_vote( + context, + &self.validator, + &self.voter.pubkey(), + &self.withdrawer.pubkey(), + &self.vote_account, + ) + .await; + } +} + +impl Default for Accounts { + fn default() -> Self { + Self { + validator: Keypair::new(), + voter: Keypair::new(), + withdrawer: Keypair::new(), + vote_account: Keypair::new(), + } + } +} + +async fn create_vote( + context: &mut ProgramTestContext, + validator: &Keypair, + voter: &Pubkey, + withdrawer: &Pubkey, + vote_account: &Keypair, +) { + let rent = context.banks_client.get_rent().await.unwrap(); + let rent_voter = rent.minimum_balance(VoteState::size_of()); + + let mut instructions = vec![system_instruction::create_account( + &context.payer.pubkey(), + &validator.pubkey(), + rent.minimum_balance(0), + 0, + &system_program::id(), + )]; + instructions.append(&mut vote_instruction::create_account_with_config( + &context.payer.pubkey(), + &vote_account.pubkey(), + &VoteInit { + node_pubkey: validator.pubkey(), + authorized_voter: *voter, + authorized_withdrawer: *withdrawer, + ..VoteInit::default() + }, + rent_voter, + vote_instruction::CreateVoteAccountConfig { + space: VoteStateVersions::vote_state_size_of(true) as u64, + ..Default::default() + }, + )); + + let transaction = Transaction::new_signed_with_payer( + &instructions, + Some(&context.payer.pubkey()), + &[validator, vote_account, &context.payer], + context.last_blockhash, + ); + + // ignore errors for idempotency + let _ = context.banks_client.process_transaction(transaction).await; +} + +async fn transfer(context: &mut ProgramTestContext, recipient: &Pubkey, amount: u64) { + let transaction = Transaction::new_signed_with_payer( + &[system_instruction::transfer( + &context.payer.pubkey(), + recipient, + amount, + )], + Some(&context.payer.pubkey()), + &[&context.payer], + context.last_blockhash, + ); + context + .banks_client + .process_transaction(transaction) + .await + .unwrap(); +} + +async fn advance_epoch(context: &mut ProgramTestContext) { + refresh_blockhash(context).await; + + let root_slot = context.banks_client.get_root_slot().await.unwrap(); + let slots_per_epoch = context.genesis_config().epoch_schedule.slots_per_epoch; + context.warp_to_slot(root_slot + slots_per_epoch).unwrap(); +} + +async fn refresh_blockhash(context: &mut ProgramTestContext) { + context.last_blockhash = context + .banks_client + .get_new_latest_blockhash(&context.last_blockhash) + .await + .unwrap(); +} + +async fn get_account(banks_client: &mut BanksClient, pubkey: &Pubkey) -> SolanaAccount { + banks_client + .get_account(*pubkey) + .await + .expect("client error") + .expect("account not found") +} + +async fn get_stake_account( + banks_client: &mut BanksClient, + pubkey: &Pubkey, +) -> (Meta, Option, u64) { + let stake_account = get_account(banks_client, pubkey).await; + let lamports = stake_account.lamports; + match bincode::deserialize::(&stake_account.data).unwrap() { + StakeStateV2::Initialized(meta) => (meta, None, lamports), + StakeStateV2::Stake(meta, stake, _) => (meta, Some(stake), lamports), + StakeStateV2::Uninitialized => panic!("panic: uninitialized"), + _ => unimplemented!(), + } +} + +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::()) +} + +async fn get_effective_stake(banks_client: &mut BanksClient, pubkey: &Pubkey) -> u64 { + let clock = banks_client.get_sysvar::().await.unwrap(); + let stake_history = banks_client.get_sysvar::().await.unwrap(); + let stake_account = get_account(banks_client, pubkey).await; + match bincode::deserialize::(&stake_account.data).unwrap() { + StakeStateV2::Stake(_, stake, _) => { + stake + .delegation + .stake_activating_and_deactivating(clock.epoch, &stake_history, Some(0)) + .effective + } + _ => 0, + } +} + +async fn get_minimum_delegation(context: &mut ProgramTestContext) -> u64 { + let transaction = Transaction::new_signed_with_payer( + &[stake::instruction::get_minimum_delegation()], + Some(&context.payer.pubkey()), + &[&context.payer], + context.last_blockhash, + ); + let mut data = context + .banks_client + .simulate_transaction(transaction) + .await + .unwrap() + .simulation_details + .unwrap() + .return_data + .unwrap() + .data; + data.resize(8, 0); + + data.try_into().map(u64::from_le_bytes).unwrap() +} + +async fn create_blank_stake_account_from_keypair( + context: &mut ProgramTestContext, + stake: &Keypair, +) -> Pubkey { + let lamports = get_stake_account_rent(&mut context.banks_client).await; + + let transaction = Transaction::new_signed_with_payer( + &[system_instruction::create_account( + &context.payer.pubkey(), + &stake.pubkey(), + lamports, + StakeStateV2::size_of() as u64, + &stake_program::id(), + )], + Some(&context.payer.pubkey()), + &[&context.payer, stake], + context.last_blockhash, + ); + + context + .banks_client + .process_transaction(transaction) + .await + .unwrap(); + + stake.pubkey() +} + +async fn process_instruction( + context: &mut ProgramTestContext, + instruction: &Instruction, + additional_signers: &T, +) -> ProgramResult { + let mut transaction = + Transaction::new_with_payer(&[instruction.clone()], Some(&context.payer.pubkey())); + + transaction.partial_sign(&[&context.payer], context.last_blockhash); + transaction.sign(additional_signers, context.last_blockhash); + + match context.banks_client.process_transaction(transaction).await { + Ok(_) => Ok(()), + Err(e) => { + // banks client error -> transaction error -> instruction error -> program error + match e.unwrap() { + TransactionError::InstructionError(_, e) => Err(e.try_into().unwrap()), + TransactionError::InsufficientFundsForRent { .. } => { + Err(ProgramError::InsufficientFunds) + } + _ => panic!("couldnt convert {:?} to ProgramError", e), + } + } + } +} + +async fn test_instruction_with_missing_signers( + context: &mut ProgramTestContext, + instruction: &Instruction, + additional_signers: &Vec<&Keypair>, +) { + // remove every signer one by one and ensure we always fail + for i in 0..instruction.accounts.len() { + if instruction.accounts[i].is_signer { + let mut instruction = instruction.clone(); + instruction.accounts[i].is_signer = false; + let reduced_signers: Vec<_> = additional_signers + .iter() + .filter(|s| s.pubkey() != instruction.accounts[i].pubkey) + .collect(); + + let e = process_instruction(context, &instruction, &reduced_signers) + .await + .unwrap_err(); + assert_eq!(e, ProgramError::MissingRequiredSignature); + } + } + + // now make sure the instruction succeeds + process_instruction(context, instruction, additional_signers) + .await + .unwrap(); +} + +#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] +enum StakeLifecycle { + Uninitialized = 0, + Initialized, + Activating, + Active, + Deactivating, + Deactive, +} +impl StakeLifecycle { + // (stake, staker, withdrawer) + async fn new_stake_account( + self, + context: &mut ProgramTestContext, + vote_account: &Pubkey, + staked_amount: u64, + ) -> (Keypair, Keypair, Keypair) { + let stake_keypair = Keypair::new(); + let staker_keypair = Keypair::new(); + let withdrawer_keypair = Keypair::new(); + + self.new_stake_account_fully_specified( + context, + vote_account, + staked_amount, + &stake_keypair, + &staker_keypair, + &withdrawer_keypair, + &Lockup::default(), + ) + .await; + + (stake_keypair, staker_keypair, withdrawer_keypair) + } + + #[allow(clippy::too_many_arguments)] + async fn new_stake_account_fully_specified( + self, + context: &mut ProgramTestContext, + vote_account: &Pubkey, + staked_amount: u64, + stake_keypair: &Keypair, + staker_keypair: &Keypair, + withdrawer_keypair: &Keypair, + lockup: &Lockup, + ) { + let authorized = Authorized { + staker: staker_keypair.pubkey(), + withdrawer: withdrawer_keypair.pubkey(), + }; + + let stake = create_blank_stake_account_from_keypair(context, stake_keypair).await; + if staked_amount > 0 { + transfer(context, &stake, staked_amount).await; + } + + if self >= StakeLifecycle::Initialized { + let instruction = ixn::initialize(&stake, &authorized, lockup); + process_instruction(context, &instruction, NO_SIGNERS) + .await + .unwrap(); + } + + if self >= StakeLifecycle::Activating { + let instruction = ixn::delegate_stake(&stake, &staker_keypair.pubkey(), vote_account); + process_instruction(context, &instruction, &vec![staker_keypair]) + .await + .unwrap(); + } + + if self >= StakeLifecycle::Active { + advance_epoch(context).await; + assert_eq!( + get_effective_stake(&mut context.banks_client, &stake).await, + staked_amount, + ); + } + + if self >= StakeLifecycle::Deactivating { + let instruction = ixn::deactivate_stake(&stake, &staker_keypair.pubkey()); + process_instruction(context, &instruction, &vec![staker_keypair]) + .await + .unwrap(); + } + + if self == StakeLifecycle::Deactive { + advance_epoch(context).await; + assert_eq!( + get_effective_stake(&mut context.banks_client, &stake).await, + 0, + ); + } + } +} + +#[test_matrix( + [StakeLifecycle::Initialized, StakeLifecycle::Activating, StakeLifecycle::Active, + StakeLifecycle::Deactivating, StakeLifecycle::Deactive], + [StakeLifecycle::Initialized, StakeLifecycle::Activating, StakeLifecycle::Active, + StakeLifecycle::Deactivating, StakeLifecycle::Deactive], + [false, true], + [false, true] +)] +#[tokio::test] +async fn test_move_stake( + move_source_type: StakeLifecycle, + move_dest_type: StakeLifecycle, + full_move: bool, + has_lockup: bool, +) { + let mut context = program_test().start_with_context().await; + let accounts = Accounts::default(); + accounts.initialize(&mut context).await; + + let rent_exempt_reserve = get_stake_account_rent(&mut context.banks_client).await; + let minimum_delegation = get_minimum_delegation(&mut context).await; + + // source has 2x minimum so we can easily test an unfunded destination + let source_staked_amount = minimum_delegation * 2; + + // this is the amount of *staked* lamports for test checks + // destinations may have excess lamports but these are *never* activated by move + let dest_staked_amount = if move_dest_type == StakeLifecycle::Active { + minimum_delegation + } else { + 0 + }; + + // test with and without lockup. both of these cases pass, we test failures elsewhere + let lockup = if has_lockup { + let clock = context.banks_client.get_sysvar::().await.unwrap(); + let lockup = Lockup { + unix_timestamp: 0, + epoch: clock.epoch + 100, + custodian: Pubkey::new_unique(), + }; + + assert!(lockup.is_in_force(&clock, None)); + lockup + } else { + Lockup::default() + }; + + // we put an extra minimum in every account, unstaked, to test that no new lamports activate + // name them here so our asserts are readable + let source_excess = minimum_delegation; + let dest_excess = minimum_delegation; + + let move_source_keypair = Keypair::new(); + let move_dest_keypair = Keypair::new(); + let staker_keypair = Keypair::new(); + let withdrawer_keypair = Keypair::new(); + + // create source stake + move_source_type + .new_stake_account_fully_specified( + &mut context, + &accounts.vote_account.pubkey(), + source_staked_amount, + &move_source_keypair, + &staker_keypair, + &withdrawer_keypair, + &lockup, + ) + .await; + let move_source = move_source_keypair.pubkey(); + let mut source_account = get_account(&mut context.banks_client, &move_source).await; + let mut source_stake_state: StakeStateV2 = bincode::deserialize(&source_account.data).unwrap(); + + // create dest stake with same authorities + move_dest_type + .new_stake_account_fully_specified( + &mut context, + &accounts.vote_account.pubkey(), + minimum_delegation, + &move_dest_keypair, + &staker_keypair, + &withdrawer_keypair, + &lockup, + ) + .await; + let move_dest = move_dest_keypair.pubkey(); + + // true up source epoch if transient + if move_source_type == StakeLifecycle::Activating + || move_source_type == StakeLifecycle::Deactivating + { + let clock = context.banks_client.get_sysvar::().await.unwrap(); + if let StakeStateV2::Stake(_, ref mut stake, _) = &mut source_stake_state { + match move_source_type { + StakeLifecycle::Activating => stake.delegation.activation_epoch = clock.epoch, + StakeLifecycle::Deactivating => stake.delegation.deactivation_epoch = clock.epoch, + _ => (), + } + } + + source_account.data = bincode::serialize(&source_stake_state).unwrap(); + context.set_account(&move_source, &source_account.into()); + } + + // our inactive accounts have extra lamports, lets not let active feel left out + if move_dest_type == StakeLifecycle::Active { + transfer(&mut context, &move_dest, dest_excess).await; + } + + // hey why not spread the love around to everyone + transfer(&mut context, &move_source, source_excess).await; + + // alright first things first, clear out all the state failures + match (move_source_type, move_dest_type) { + // valid + (StakeLifecycle::Active, StakeLifecycle::Initialized) + | (StakeLifecycle::Active, StakeLifecycle::Active) + | (StakeLifecycle::Active, StakeLifecycle::Deactive) => (), + // invalid! get outta my test + _ => { + let instruction = ixn::move_stake( + &move_source, + &move_dest, + &staker_keypair.pubkey(), + if full_move { + source_staked_amount + } else { + minimum_delegation + }, + ); + + // this is InvalidAccountData sometimes and Custom(5) sometimes but i dont care + process_instruction(&mut context, &instruction, &vec![&staker_keypair]) + .await + .unwrap_err(); + return; + } + } + + // source has 2x minimum (always 2 sol because these tests dont have featuresets) + // so first for inactive accounts lets undershoot and fail for underfunded dest + if move_dest_type != StakeLifecycle::Active { + let instruction = ixn::move_stake( + &move_source, + &move_dest, + &staker_keypair.pubkey(), + minimum_delegation - 1, + ); + + let e = process_instruction(&mut context, &instruction, &vec![&staker_keypair]) + .await + .unwrap_err(); + assert_eq!(e, ProgramError::InvalidArgument); + } + + // now lets overshoot and fail for underfunded source + let instruction = ixn::move_stake( + &move_source, + &move_dest, + &staker_keypair.pubkey(), + minimum_delegation + 1, + ); + + let e = process_instruction(&mut context, &instruction, &vec![&staker_keypair]) + .await + .unwrap_err(); + assert_eq!(e, ProgramError::InvalidArgument); + + // now we do it juuust right + let instruction = ixn::move_stake( + &move_source, + &move_dest, + &staker_keypair.pubkey(), + if full_move { + source_staked_amount + } else { + minimum_delegation + }, + ); + + test_instruction_with_missing_signers(&mut context, &instruction, &vec![&staker_keypair]).await; + + if full_move { + let (_, option_source_stake, source_lamports) = + get_stake_account(&mut context.banks_client, &move_source).await; + + // source is deactivated and rent/excess stay behind + assert!(option_source_stake.is_none()); + assert_eq!(source_lamports, source_excess + rent_exempt_reserve); + + let (_, Some(dest_stake), dest_lamports) = + get_stake_account(&mut context.banks_client, &move_dest).await + else { + panic!("dest should be active") + }; + let dest_effective_stake = get_effective_stake(&mut context.banks_client, &move_dest).await; + + // dest captured the entire source delegation, kept its rent/excess, didnt activate its excess + assert_eq!( + dest_stake.delegation.stake, + source_staked_amount + dest_staked_amount + ); + assert_eq!(dest_effective_stake, dest_stake.delegation.stake); + assert_eq!( + dest_lamports, + dest_effective_stake + dest_excess + rent_exempt_reserve + ); + } else { + let (_, Some(source_stake), source_lamports) = + get_stake_account(&mut context.banks_client, &move_source).await + else { + panic!("source should be active") + }; + let source_effective_stake = + get_effective_stake(&mut context.banks_client, &move_source).await; + + // half of source delegation moved over, excess stayed behind + assert_eq!(source_stake.delegation.stake, source_staked_amount / 2); + assert_eq!(source_effective_stake, source_stake.delegation.stake); + assert_eq!( + source_lamports, + source_effective_stake + source_excess + rent_exempt_reserve + ); + + let (_, Some(dest_stake), dest_lamports) = + get_stake_account(&mut context.banks_client, &move_dest).await + else { + panic!("dest should be active") + }; + let dest_effective_stake = get_effective_stake(&mut context.banks_client, &move_dest).await; + + // dest mirrors our observations + assert_eq!( + dest_stake.delegation.stake, + source_staked_amount / 2 + dest_staked_amount + ); + assert_eq!(dest_effective_stake, dest_stake.delegation.stake); + assert_eq!( + dest_lamports, + dest_effective_stake + dest_excess + rent_exempt_reserve + ); + } +} + +#[test_matrix( + [StakeLifecycle::Initialized, StakeLifecycle::Activating, StakeLifecycle::Active, + StakeLifecycle::Deactivating, StakeLifecycle::Deactive], + [StakeLifecycle::Initialized, StakeLifecycle::Activating, StakeLifecycle::Active, + StakeLifecycle::Deactivating, StakeLifecycle::Deactive], + [false, true], + [false, true] +)] +#[tokio::test] +async fn test_move_lamports( + move_source_type: StakeLifecycle, + move_dest_type: StakeLifecycle, + different_votes: bool, + has_lockup: bool, +) { + let mut context = program_test().start_with_context().await; + let accounts = Accounts::default(); + accounts.initialize(&mut context).await; + + let rent_exempt_reserve = get_stake_account_rent(&mut context.banks_client).await; + let minimum_delegation = get_minimum_delegation(&mut context).await; + + // put minimum in both accounts if theyre active + let source_staked_amount = if move_source_type == StakeLifecycle::Active { + minimum_delegation + } else { + 0 + }; + + let dest_staked_amount = if move_dest_type == StakeLifecycle::Active { + minimum_delegation + } else { + 0 + }; + + // test with and without lockup. both of these cases pass, we test failures elsewhere + let lockup = if has_lockup { + let clock = context.banks_client.get_sysvar::().await.unwrap(); + let lockup = Lockup { + unix_timestamp: 0, + epoch: clock.epoch + 100, + custodian: Pubkey::new_unique(), + }; + + assert!(lockup.is_in_force(&clock, None)); + lockup + } else { + Lockup::default() + }; + + // we put an extra minimum in every account, unstaked, to test moving them + let source_excess = minimum_delegation; + let dest_excess = minimum_delegation; + + let move_source_keypair = Keypair::new(); + let move_dest_keypair = Keypair::new(); + let staker_keypair = Keypair::new(); + let withdrawer_keypair = Keypair::new(); + + // make a separate vote account if needed + let dest_vote_account = if different_votes { + let vote_account = Keypair::new(); + create_vote( + &mut context, + &Keypair::new(), + &Pubkey::new_unique(), + &Pubkey::new_unique(), + &vote_account, + ) + .await; + + vote_account.pubkey() + } else { + accounts.vote_account.pubkey() + }; + + // create source stake + move_source_type + .new_stake_account_fully_specified( + &mut context, + &accounts.vote_account.pubkey(), + minimum_delegation, + &move_source_keypair, + &staker_keypair, + &withdrawer_keypair, + &lockup, + ) + .await; + let move_source = move_source_keypair.pubkey(); + let mut source_account = get_account(&mut context.banks_client, &move_source).await; + let mut source_stake_state: StakeStateV2 = bincode::deserialize(&source_account.data).unwrap(); + + // create dest stake with same authorities + move_dest_type + .new_stake_account_fully_specified( + &mut context, + &dest_vote_account, + minimum_delegation, + &move_dest_keypair, + &staker_keypair, + &withdrawer_keypair, + &lockup, + ) + .await; + let move_dest = move_dest_keypair.pubkey(); + + // true up source epoch if transient + if move_source_type == StakeLifecycle::Activating + || move_source_type == StakeLifecycle::Deactivating + { + let clock = context.banks_client.get_sysvar::().await.unwrap(); + if let StakeStateV2::Stake(_, ref mut stake, _) = &mut source_stake_state { + match move_source_type { + StakeLifecycle::Activating => stake.delegation.activation_epoch = clock.epoch, + StakeLifecycle::Deactivating => stake.delegation.deactivation_epoch = clock.epoch, + _ => (), + } + } + + source_account.data = bincode::serialize(&source_stake_state).unwrap(); + context.set_account(&move_source, &source_account.into()); + } + + // if we activated the initial amount we need to top up with the test lamports + if move_source_type == StakeLifecycle::Active { + transfer(&mut context, &move_source, source_excess).await; + } + if move_dest_type == StakeLifecycle::Active { + transfer(&mut context, &move_dest, dest_excess).await; + } + + // clear out state failures + if move_source_type == StakeLifecycle::Activating + || move_source_type == StakeLifecycle::Deactivating + || move_dest_type == StakeLifecycle::Deactivating + { + let instruction = ixn::move_lamports( + &move_source, + &move_dest, + &staker_keypair.pubkey(), + source_excess, + ); + + process_instruction(&mut context, &instruction, &vec![&staker_keypair]) + .await + .unwrap_err(); + return; + } + + // overshoot and fail for underfunded source + let instruction = ixn::move_lamports( + &move_source, + &move_dest, + &staker_keypair.pubkey(), + source_excess + 1, + ); + + let e = process_instruction(&mut context, &instruction, &vec![&staker_keypair]) + .await + .unwrap_err(); + assert_eq!(e, ProgramError::InvalidArgument); + + let (_, _, before_source_lamports) = + get_stake_account(&mut context.banks_client, &move_source).await; + let (_, _, before_dest_lamports) = + get_stake_account(&mut context.banks_client, &move_dest).await; + + // now properly move the full excess + let instruction = ixn::move_lamports( + &move_source, + &move_dest, + &staker_keypair.pubkey(), + source_excess, + ); + + test_instruction_with_missing_signers(&mut context, &instruction, &vec![&staker_keypair]).await; + + let (_, _, after_source_lamports) = + get_stake_account(&mut context.banks_client, &move_source).await; + let source_effective_stake = get_effective_stake(&mut context.banks_client, &move_source).await; + + // source activation didnt change + assert_eq!(source_effective_stake, source_staked_amount); + + // source lamports are right + assert_eq!( + after_source_lamports, + before_source_lamports - minimum_delegation + ); + assert_eq!( + after_source_lamports, + source_effective_stake + rent_exempt_reserve + ); + + let (_, _, after_dest_lamports) = + get_stake_account(&mut context.banks_client, &move_dest).await; + let dest_effective_stake = get_effective_stake(&mut context.banks_client, &move_dest).await; + + // dest activation didnt change + assert_eq!(dest_effective_stake, dest_staked_amount); + + // dest lamports are right + assert_eq!( + after_dest_lamports, + before_dest_lamports + minimum_delegation + ); + assert_eq!( + after_dest_lamports, + dest_effective_stake + rent_exempt_reserve + source_excess + dest_excess + ); +} + +#[test_matrix( + [(StakeLifecycle::Active, StakeLifecycle::Uninitialized), + (StakeLifecycle::Uninitialized, StakeLifecycle::Initialized), + (StakeLifecycle::Uninitialized, StakeLifecycle::Uninitialized)], + [false, true] +)] +#[tokio::test] +async fn test_move_uninitialized_fail( + move_types: (StakeLifecycle, StakeLifecycle), + move_lamports: bool, +) { + let mut context = program_test().start_with_context().await; + let accounts = Accounts::default(); + accounts.initialize(&mut context).await; + + let minimum_delegation = get_minimum_delegation(&mut context).await; + let source_staked_amount = minimum_delegation * 2; + + let (move_source_type, move_dest_type) = move_types; + + let (move_source_keypair, staker_keypair, withdrawer_keypair) = move_source_type + .new_stake_account( + &mut context, + &accounts.vote_account.pubkey(), + source_staked_amount, + ) + .await; + let move_source = move_source_keypair.pubkey(); + + let move_dest_keypair = Keypair::new(); + move_dest_type + .new_stake_account_fully_specified( + &mut context, + &accounts.vote_account.pubkey(), + 0, + &move_dest_keypair, + &staker_keypair, + &withdrawer_keypair, + &Lockup::default(), + ) + .await; + let move_dest = move_dest_keypair.pubkey(); + + let source_signer = if move_source_type == StakeLifecycle::Uninitialized { + &move_source_keypair + } else { + &staker_keypair + }; + + let instruction = if move_lamports { + ixn::move_lamports( + &move_source, + &move_dest, + &source_signer.pubkey(), + minimum_delegation, + ) + } else { + ixn::move_stake( + &move_source, + &move_dest, + &source_signer.pubkey(), + minimum_delegation, + ) + }; + + let e = process_instruction(&mut context, &instruction, &vec![source_signer]) + .await + .unwrap_err(); + assert_eq!(e, ProgramError::InvalidAccountData); +} + +#[test_matrix( + [StakeLifecycle::Initialized, StakeLifecycle::Active, StakeLifecycle::Deactive], + [StakeLifecycle::Initialized, StakeLifecycle::Activating, StakeLifecycle::Active, StakeLifecycle::Deactive], + [false, true] +)] +#[tokio::test] +async fn test_move_general_fail( + move_source_type: StakeLifecycle, + move_dest_type: StakeLifecycle, + move_lamports: bool, +) { + // the test_matrix includes all valid source/dest combinations for MoveLamports + // we dont test invalid combinations because they would fail regardless of the fail cases we test here + // valid source/dest for MoveStake are a strict subset of MoveLamports + // source must be active, and dest must be active or inactive. so we skip the additional invalid MoveStake cases + if !move_lamports + && (move_source_type != StakeLifecycle::Active + || move_dest_type == StakeLifecycle::Activating) + { + return; + } + + let mut context = program_test().start_with_context().await; + let accounts = Accounts::default(); + accounts.initialize(&mut context).await; + + let minimum_delegation = get_minimum_delegation(&mut context).await; + let source_staked_amount = minimum_delegation * 2; + + let in_force_lockup = { + let clock = context.banks_client.get_sysvar::().await.unwrap(); + Lockup { + unix_timestamp: 0, + epoch: clock.epoch + 1_000_000, + custodian: Pubkey::new_unique(), + } + }; + + let mk_ixn = if move_lamports { + ixn::move_lamports + } else { + ixn::move_stake + }; + + // we can reuse source but will need a lot of dest + let (move_source_keypair, staker_keypair, withdrawer_keypair) = move_source_type + .new_stake_account( + &mut context, + &accounts.vote_account.pubkey(), + source_staked_amount, + ) + .await; + let move_source = move_source_keypair.pubkey(); + transfer(&mut context, &move_source, minimum_delegation).await; + + // self-move fails + // NOTE this error type is an artifact of the native program interface + // when we move to bpf, it should actually hit the processor error + let instruction = mk_ixn( + &move_source, + &move_source, + &staker_keypair.pubkey(), + minimum_delegation, + ); + let e = process_instruction(&mut context, &instruction, &vec![&staker_keypair]) + .await + .unwrap_err(); + assert_eq!(e, ProgramError::AccountBorrowFailed); + + // first we make a "normal" move dest + { + let move_dest_keypair = Keypair::new(); + move_dest_type + .new_stake_account_fully_specified( + &mut context, + &accounts.vote_account.pubkey(), + minimum_delegation, + &move_dest_keypair, + &staker_keypair, + &withdrawer_keypair, + &Lockup::default(), + ) + .await; + let move_dest = move_dest_keypair.pubkey(); + + // zero move fails + let instruction = mk_ixn(&move_source, &move_dest, &staker_keypair.pubkey(), 0); + let e = process_instruction(&mut context, &instruction, &vec![&staker_keypair]) + .await + .unwrap_err(); + assert_eq!(e, ProgramError::InvalidArgument); + + // sign with withdrawer fails + let instruction = mk_ixn( + &move_source, + &move_dest, + &withdrawer_keypair.pubkey(), + minimum_delegation, + ); + let e = process_instruction(&mut context, &instruction, &vec![&withdrawer_keypair]) + .await + .unwrap_err(); + assert_eq!(e, ProgramError::MissingRequiredSignature); + + // good place to test source lockup + let move_locked_source_keypair = Keypair::new(); + move_source_type + .new_stake_account_fully_specified( + &mut context, + &accounts.vote_account.pubkey(), + source_staked_amount, + &move_locked_source_keypair, + &staker_keypair, + &withdrawer_keypair, + &in_force_lockup, + ) + .await; + let move_locked_source = move_locked_source_keypair.pubkey(); + transfer(&mut context, &move_locked_source, minimum_delegation).await; + + let instruction = mk_ixn( + &move_locked_source, + &move_dest, + &staker_keypair.pubkey(), + minimum_delegation, + ); + let e = process_instruction(&mut context, &instruction, &vec![&staker_keypair]) + .await + .unwrap_err(); + assert_eq!(e, StakeError::MergeMismatch.into()); + } + + // staker mismatch + { + let move_dest_keypair = Keypair::new(); + let throwaway = Keypair::new(); + move_dest_type + .new_stake_account_fully_specified( + &mut context, + &accounts.vote_account.pubkey(), + minimum_delegation, + &move_dest_keypair, + &throwaway, + &withdrawer_keypair, + &Lockup::default(), + ) + .await; + let move_dest = move_dest_keypair.pubkey(); + + let instruction = mk_ixn( + &move_source, + &move_dest, + &staker_keypair.pubkey(), + minimum_delegation, + ); + let e = process_instruction(&mut context, &instruction, &vec![&staker_keypair]) + .await + .unwrap_err(); + assert_eq!(e, StakeError::MergeMismatch.into()); + + let instruction = mk_ixn( + &move_source, + &move_dest, + &throwaway.pubkey(), + minimum_delegation, + ); + let e = process_instruction(&mut context, &instruction, &vec![&throwaway]) + .await + .unwrap_err(); + assert_eq!(e, ProgramError::MissingRequiredSignature); + } + + // withdrawer mismatch + { + let move_dest_keypair = Keypair::new(); + let throwaway = Keypair::new(); + move_dest_type + .new_stake_account_fully_specified( + &mut context, + &accounts.vote_account.pubkey(), + minimum_delegation, + &move_dest_keypair, + &staker_keypair, + &throwaway, + &Lockup::default(), + ) + .await; + let move_dest = move_dest_keypair.pubkey(); + + let instruction = mk_ixn( + &move_source, + &move_dest, + &staker_keypair.pubkey(), + minimum_delegation, + ); + let e = process_instruction(&mut context, &instruction, &vec![&staker_keypair]) + .await + .unwrap_err(); + assert_eq!(e, StakeError::MergeMismatch.into()); + + let instruction = mk_ixn( + &move_source, + &move_dest, + &throwaway.pubkey(), + minimum_delegation, + ); + let e = process_instruction(&mut context, &instruction, &vec![&throwaway]) + .await + .unwrap_err(); + assert_eq!(e, ProgramError::MissingRequiredSignature); + } + + // dest lockup + { + let move_dest_keypair = Keypair::new(); + move_dest_type + .new_stake_account_fully_specified( + &mut context, + &accounts.vote_account.pubkey(), + minimum_delegation, + &move_dest_keypair, + &staker_keypair, + &withdrawer_keypair, + &in_force_lockup, + ) + .await; + let move_dest = move_dest_keypair.pubkey(); + + let instruction = mk_ixn( + &move_source, + &move_dest, + &staker_keypair.pubkey(), + minimum_delegation, + ); + let e = process_instruction(&mut context, &instruction, &vec![&staker_keypair]) + .await + .unwrap_err(); + assert_eq!(e, StakeError::MergeMismatch.into()); + } + + // lastly we test different vote accounts for move_stake + if !move_lamports && move_dest_type == StakeLifecycle::Active { + let dest_vote_account_keypair = Keypair::new(); + create_vote( + &mut context, + &Keypair::new(), + &Pubkey::new_unique(), + &Pubkey::new_unique(), + &dest_vote_account_keypair, + ) + .await; + + let move_dest_keypair = Keypair::new(); + move_dest_type + .new_stake_account_fully_specified( + &mut context, + &dest_vote_account_keypair.pubkey(), + minimum_delegation, + &move_dest_keypair, + &staker_keypair, + &withdrawer_keypair, + &Lockup::default(), + ) + .await; + let move_dest = move_dest_keypair.pubkey(); + + let instruction = mk_ixn( + &move_source, + &move_dest, + &staker_keypair.pubkey(), + minimum_delegation, + ); + let e = process_instruction(&mut context, &instruction, &vec![&staker_keypair]) + .await + .unwrap_err(); + assert_eq!(e, StakeError::VoteAddressMismatch.into()); + } +} + +// this test is only to be sure the feature gate is safe +// once the feature has been activated, this can all be deleted +#[test_matrix( + [StakeLifecycle::Initialized, StakeLifecycle::Active, StakeLifecycle::Deactive], + [StakeLifecycle::Initialized, StakeLifecycle::Activating, StakeLifecycle::Active, StakeLifecycle::Deactive], + [false, true] +)] +#[tokio::test] +async fn test_move_feature_gate_fail( + move_source_type: StakeLifecycle, + move_dest_type: StakeLifecycle, + move_lamports: bool, +) { + // the test_matrix includes all valid source/dest combinations for MoveLamports + // we dont test invalid combinations because they would fail regardless of the fail cases we test here + // valid source/dest for MoveStake are a strict subset of MoveLamports + // source must be active, and dest must be active or inactive. so we skip the additional invalid MoveStake cases + if !move_lamports + && (move_source_type != StakeLifecycle::Active + || move_dest_type == StakeLifecycle::Activating) + { + return; + } + + let mut context = program_test_without_features(&[move_stake_and_move_lamports_ixs::id()]) + .start_with_context() + .await; + + let accounts = Accounts::default(); + accounts.initialize(&mut context).await; + + let minimum_delegation = get_minimum_delegation(&mut context).await; + let source_staked_amount = minimum_delegation * 2; + + let mk_ixn = if move_lamports { + ixn::move_lamports + } else { + ixn::move_stake + }; + + let (move_source_keypair, staker_keypair, withdrawer_keypair) = move_source_type + .new_stake_account( + &mut context, + &accounts.vote_account.pubkey(), + source_staked_amount, + ) + .await; + let move_source = move_source_keypair.pubkey(); + transfer(&mut context, &move_source, minimum_delegation).await; + + let move_dest_keypair = Keypair::new(); + move_dest_type + .new_stake_account_fully_specified( + &mut context, + &accounts.vote_account.pubkey(), + minimum_delegation, + &move_dest_keypair, + &staker_keypair, + &withdrawer_keypair, + &Lockup::default(), + ) + .await; + let move_dest = move_dest_keypair.pubkey(); + + let instruction = mk_ixn( + &move_source, + &move_dest, + &staker_keypair.pubkey(), + minimum_delegation, + ); + let e = process_instruction(&mut context, &instruction, &vec![&staker_keypair]) + .await + .unwrap_err(); + assert_eq!(e, ProgramError::InvalidInstructionData); +} diff --git a/programs/stake/src/stake_instruction.rs b/programs/stake/src/stake_instruction.rs index 203dcebe68c462..1b874cd9750596 100644 --- a/programs/stake/src/stake_instruction.rs +++ b/programs/stake/src/stake_instruction.rs @@ -1,7 +1,8 @@ use { crate::stake_state::{ authorize, authorize_with_seed, deactivate, deactivate_delinquent, delegate, initialize, - merge, new_warmup_cooldown_rate_epoch, redelegate, set_lockup, split, withdraw, + merge, move_lamports, move_stake, new_warmup_cooldown_rate_epoch, redelegate, set_lockup, + split, withdraw, }, log::*, solana_program_runtime::{ @@ -352,6 +353,44 @@ declare_process_instruction!(Entrypoint, DEFAULT_COMPUTE_UNITS, |invoke_context| Err(InstructionError::InvalidInstructionData) } } + StakeInstruction::MoveStake(lamports) => { + if invoke_context + .get_feature_set() + .is_active(&feature_set::move_stake_and_move_lamports_ixs::id()) + { + instruction_context.check_number_of_instruction_accounts(3)?; + move_stake( + invoke_context, + transaction_context, + instruction_context, + 0, + lamports, + 1, + 2, + ) + } else { + Err(InstructionError::InvalidInstructionData) + } + } + StakeInstruction::MoveLamports(lamports) => { + if invoke_context + .get_feature_set() + .is_active(&feature_set::move_stake_and_move_lamports_ixs::id()) + { + instruction_context.check_number_of_instruction_accounts(3)?; + move_lamports( + invoke_context, + transaction_context, + instruction_context, + 0, + lamports, + 1, + 2, + ) + } else { + Err(InstructionError::InvalidInstructionData) + } + } } }); @@ -476,6 +515,7 @@ mod tests { .collect(); pubkeys.insert(clock::id()); pubkeys.insert(epoch_schedule::id()); + pubkeys.insert(stake_history::id()); #[allow(deprecated)] pubkeys .iter() @@ -671,6 +711,26 @@ mod tests { ), Err(InstructionError::InvalidAccountData), ); + process_instruction_as_one_arg( + Arc::clone(&feature_set), + &instruction::move_stake( + &Pubkey::new_unique(), + &Pubkey::new_unique(), + &Pubkey::new_unique(), + 100, + ), + Err(InstructionError::InvalidAccountData), + ); + process_instruction_as_one_arg( + Arc::clone(&feature_set), + &instruction::move_lamports( + &Pubkey::new_unique(), + &Pubkey::new_unique(), + &Pubkey::new_unique(), + 100, + ), + Err(InstructionError::InvalidAccountData), + ); } #[test_case(feature_set_no_minimum_delegation(); "no_min_delegation")] @@ -8030,6 +8090,26 @@ mod tests { )[2], Err(StakeError::EpochRewardsActive.into()), ); + process_instruction_as_one_arg( + Arc::clone(&feature_set), + &instruction::move_stake( + &Pubkey::new_unique(), + &Pubkey::new_unique(), + &Pubkey::new_unique(), + 100, + ), + Err(StakeError::EpochRewardsActive.into()), + ); + process_instruction_as_one_arg( + Arc::clone(&feature_set), + &instruction::move_lamports( + &Pubkey::new_unique(), + &Pubkey::new_unique(), + &Pubkey::new_unique(), + 100, + ), + Err(StakeError::EpochRewardsActive.into()), + ); // Only GetMinimumDelegation should not return StakeError::EpochRewardsActive process_instruction_as_one_arg( diff --git a/programs/stake/src/stake_state.rs b/programs/stake/src/stake_state.rs index d3ee57beca43f2..baee081034703d 100644 --- a/programs/stake/src/stake_state.rs +++ b/programs/stake/src/stake_state.rs @@ -132,6 +132,86 @@ fn redelegate_stake( Ok(()) } +fn move_stake_or_lamports_shared_checks( + invoke_context: &InvokeContext, + transaction_context: &TransactionContext, + instruction_context: &InstructionContext, + source_account: &BorrowedAccount, + lamports: u64, + destination_account: &BorrowedAccount, + stake_authority_index: IndexOfAccount, +) -> Result<(MergeKind, MergeKind), InstructionError> { + // authority must sign + let stake_authority_pubkey = transaction_context.get_key_of_account_at_index( + instruction_context + .get_index_of_instruction_account_in_transaction(stake_authority_index)?, + )?; + if !instruction_context.is_instruction_account_signer(stake_authority_index)? { + return Err(InstructionError::MissingRequiredSignature); + } + + let mut signers = HashSet::new(); + signers.insert(*stake_authority_pubkey); + + // check owners + if *source_account.get_owner() != id() || *destination_account.get_owner() != id() { + return Err(InstructionError::IncorrectProgramId); + } + + // confirm not the same account + if *source_account.get_key() == *destination_account.get_key() { + return Err(InstructionError::InvalidInstructionData); + } + + // source and destination must be writable + if !source_account.is_writable() || !destination_account.is_writable() { + return Err(InstructionError::InvalidInstructionData); + } + + // must move something + if lamports == 0 { + return Err(InstructionError::InvalidArgument); + } + + let clock = invoke_context.get_sysvar_cache().get_clock()?; + let stake_history = invoke_context.get_sysvar_cache().get_stake_history()?; + + // get_if_mergeable ensures accounts are not partly activated or in any form of deactivating + // we still need to exclude activating state ourselves + let source_merge_kind = MergeKind::get_if_mergeable( + invoke_context, + &source_account.get_state()?, + source_account.get_lamports(), + &clock, + &stake_history, + )?; + + // Authorized staker is allowed to move stake + source_merge_kind + .meta() + .authorized + .check(&signers, StakeAuthorize::Staker)?; + + // same transient assurance as with source + let destination_merge_kind = MergeKind::get_if_mergeable( + invoke_context, + &destination_account.get_state()?, + destination_account.get_lamports(), + &clock, + &stake_history, + )?; + + // ensure all authorities match and lockups match if lockup is in force + MergeKind::metas_can_merge( + invoke_context, + source_merge_kind.meta(), + destination_merge_kind.meta(), + &clock, + )?; + + Ok((source_merge_kind, destination_merge_kind)) +} + pub(crate) fn new_stake( stake: u64, voter_pubkey: &Pubkey, @@ -705,6 +785,191 @@ pub fn redelegate( Ok(()) } +pub fn move_stake( + invoke_context: &InvokeContext, + transaction_context: &TransactionContext, + instruction_context: &InstructionContext, + source_account_index: IndexOfAccount, + lamports: u64, + destination_account_index: IndexOfAccount, + stake_authority_index: IndexOfAccount, +) -> Result<(), InstructionError> { + let mut source_account = instruction_context + .try_borrow_instruction_account(transaction_context, source_account_index)?; + + let mut destination_account = instruction_context + .try_borrow_instruction_account(transaction_context, destination_account_index)?; + + let (source_merge_kind, destination_merge_kind) = move_stake_or_lamports_shared_checks( + invoke_context, + transaction_context, + instruction_context, + &source_account, + lamports, + &destination_account, + stake_authority_index, + )?; + + // ensure source and destination are the right size for the current version of StakeState + // this a safeguard in case there is a new version of the struct that cannot fit into an old account + if source_account.get_data().len() != StakeStateV2::size_of() + || destination_account.get_data().len() != StakeStateV2::size_of() + { + return Err(InstructionError::InvalidAccountData); + } + + // source must be fully active + let MergeKind::FullyActive(source_meta, mut source_stake) = source_merge_kind else { + return Err(InstructionError::InvalidAccountData); + }; + + let minimum_delegation = crate::get_minimum_delegation(invoke_context.get_feature_set()); + let source_effective_stake = source_stake.delegation.stake; + + // source cannot move more stake than it has, regardless of how many lamports it has + let source_final_stake = source_effective_stake + .checked_sub(lamports) + .ok_or(InstructionError::InvalidArgument)?; + + // unless all stake is being moved, source must retain at least the minimum delegation + if source_final_stake != 0 && source_final_stake < minimum_delegation { + return Err(InstructionError::InvalidArgument); + } + + // destination must be fully active or fully inactive + let destination_meta = match destination_merge_kind { + MergeKind::FullyActive(destination_meta, mut destination_stake) => { + // if active, destination must be delegated to the same vote account as source + if source_stake.delegation.voter_pubkey != destination_stake.delegation.voter_pubkey { + return Err(StakeError::VoteAddressMismatch.into()); + } + + let destination_effective_stake = destination_stake.delegation.stake; + let destination_final_stake = destination_effective_stake + .checked_add(lamports) + .ok_or(InstructionError::ArithmeticOverflow)?; + + // ensure destination meets miniumum delegation + // since it is already active, this only really applies if the minimum is raised + if destination_final_stake < minimum_delegation { + return Err(InstructionError::InvalidArgument); + } + + merge_delegation_stake_and_credits_observed( + &mut destination_stake, + lamports, + source_stake.credits_observed, + )?; + + // StakeFlags::empty() is valid here because the only existing stake flag, + // MUST_FULLY_ACTIVATE_BEFORE_DEACTIVATION_IS_PERMITTED, does not apply to active stakes + destination_account.set_state(&StakeStateV2::Stake( + destination_meta, + destination_stake, + StakeFlags::empty(), + ))?; + + destination_meta + } + MergeKind::Inactive(destination_meta, _, _) => { + // if destination is inactive, it must be given at least the minimum delegation + if lamports < minimum_delegation { + return Err(InstructionError::InvalidArgument); + } + + let mut destination_stake = source_stake; + destination_stake.delegation.stake = lamports; + + // StakeFlags::empty() is valid here because the only existing stake flag, + // MUST_FULLY_ACTIVATE_BEFORE_DEACTIVATION_IS_PERMITTED, is cleared when a stake is activated + destination_account.set_state(&StakeStateV2::Stake( + destination_meta, + destination_stake, + StakeFlags::empty(), + ))?; + + destination_meta + } + _ => return Err(InstructionError::InvalidAccountData), + }; + + if source_final_stake == 0 { + source_account.set_state(&StakeStateV2::Initialized(source_meta))?; + } else { + source_stake.delegation.stake = source_final_stake; + + // StakeFlags::empty() is valid here because the only existing stake flag, + // MUST_FULLY_ACTIVATE_BEFORE_DEACTIVATION_IS_PERMITTED, does not apply to active stakes + source_account.set_state(&StakeStateV2::Stake( + source_meta, + source_stake, + StakeFlags::empty(), + ))?; + } + + source_account.checked_sub_lamports(lamports)?; + destination_account.checked_add_lamports(lamports)?; + + // this should be impossible, but because we do all our math with delegations, best to guard it + if source_account.get_lamports() < source_meta.rent_exempt_reserve + || destination_account.get_lamports() < destination_meta.rent_exempt_reserve + { + ic_msg!( + invoke_context, + "Delegation calculations violated lamport balance assumptions" + ); + return Err(InstructionError::InvalidArgument); + } + + Ok(()) +} + +pub fn move_lamports( + invoke_context: &InvokeContext, + transaction_context: &TransactionContext, + instruction_context: &InstructionContext, + source_account_index: IndexOfAccount, + lamports: u64, + destination_account_index: IndexOfAccount, + stake_authority_index: IndexOfAccount, +) -> Result<(), InstructionError> { + let mut source_account = instruction_context + .try_borrow_instruction_account(transaction_context, source_account_index)?; + + let mut destination_account = instruction_context + .try_borrow_instruction_account(transaction_context, destination_account_index)?; + + let (source_merge_kind, _) = move_stake_or_lamports_shared_checks( + invoke_context, + transaction_context, + instruction_context, + &source_account, + lamports, + &destination_account, + stake_authority_index, + )?; + + let source_free_lamports = match source_merge_kind { + MergeKind::FullyActive(source_meta, source_stake) => source_account + .get_lamports() + .saturating_sub(source_stake.delegation.stake) + .saturating_sub(source_meta.rent_exempt_reserve), + MergeKind::Inactive(source_meta, source_lamports, _) => { + source_lamports.saturating_sub(source_meta.rent_exempt_reserve) + } + _ => return Err(InstructionError::InvalidAccountData), + }; + + if lamports > source_free_lamports { + return Err(InstructionError::InvalidArgument); + } + + source_account.checked_sub_lamports(lamports)?; + destination_account.checked_add_lamports(lamports)?; + + Ok(()) +} + #[allow(clippy::too_many_arguments)] pub fn withdraw( transaction_context: &TransactionContext, diff --git a/rpc-client-api/src/filter.rs b/rpc-client-api/src/filter.rs index bef8d1d16e8e67..4c65f4249e3aed 100644 --- a/rpc-client-api/src/filter.rs +++ b/rpc-client-api/src/filter.rs @@ -121,9 +121,10 @@ impl<'de> Deserialize<'de> for MemcmpEncodedBytes { let memcmp_encoded_bytes = match data.bytes { DataType::Encoded(bytes) => match data.encoding.unwrap_or(RpcMemcmpEncoding::Base58) { - RpcMemcmpEncoding::Base58 => MemcmpEncodedBytes::Base58(bytes), + RpcMemcmpEncoding::Base58 | RpcMemcmpEncoding::Bytes => { + MemcmpEncodedBytes::Base58(bytes) + } RpcMemcmpEncoding::Base64 => MemcmpEncodedBytes::Base64(bytes), - _ => unreachable!(), }, DataType::Raw(bytes) => MemcmpEncodedBytes::Bytes(bytes), }; @@ -334,10 +335,14 @@ mod tests { formatcp!(r#"{{"bytes":"{BASE58_STR}","offset":{OFFSET},"encoding":"base58"}}"#); const BASE64_FILTER: &str = formatcp!(r#"{{"bytes":"{BASE64_STR}","offset":{OFFSET},"encoding":"base64"}}"#); + const MISMATCHED_BASE64_FILTER: &str = + formatcp!(r#"{{"bytes":[0, 1, 2, 3],"offset":{OFFSET},"encoding":"base64"}}"#); const BYTES_FILTER: &str = formatcp!(r#"{{"bytes":[0, 1, 2, 3],"offset":{OFFSET},"encoding":null}}"#); const BYTES_FILTER_WITH_ENCODING: &str = formatcp!(r#"{{"bytes":[0, 1, 2, 3],"offset":{OFFSET},"encoding":"bytes"}}"#); + const MISMATCHED_BYTES_FILTER_WITH_ENCODING: &str = + formatcp!(r#"{{"bytes":"{BASE58_STR}","offset":{OFFSET},"encoding":"bytes"}}"#); #[test] fn test_filter_deserialize() { @@ -393,6 +398,26 @@ mod tests { bytes: MemcmpEncodedBytes::Bytes(BYTES.to_vec()), } ); + + // Mismatched input + let base64_filter: Memcmp = serde_json::from_str(MISMATCHED_BASE64_FILTER).unwrap(); + assert_eq!( + base64_filter, + Memcmp { + offset: OFFSET, + bytes: MemcmpEncodedBytes::Bytes(BYTES.to_vec()), + } + ); + + let bytes_filter: Memcmp = + serde_json::from_str(MISMATCHED_BYTES_FILTER_WITH_ENCODING).unwrap(); + assert_eq!( + bytes_filter, + Memcmp { + offset: OFFSET, + bytes: MemcmpEncodedBytes::Base58(BASE58_STR.to_string()), + } + ); } #[test] diff --git a/rpc/src/transaction_status_service.rs b/rpc/src/transaction_status_service.rs index f8356296e970a6..34e9b7fdc6f8b2 100644 --- a/rpc/src/transaction_status_service.rs +++ b/rpc/src/transaction_status_service.rs @@ -291,7 +291,7 @@ pub(crate) mod tests { #[test] fn test_notify_transaction() { let genesis_config = create_genesis_config(2).genesis_config; - let bank = Bank::new_no_wallclock_throttle_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_no_wallclock_throttle_for_tests(&genesis_config); let (transaction_status_sender, transaction_status_receiver) = unbounded(); let ledger_path = get_tmp_ledger_path_auto_delete!(); diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index fdfb140c98779d..698437702ed8de 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -190,7 +190,7 @@ use { AtomicBool, AtomicI64, AtomicU64, AtomicUsize, Ordering::{AcqRel, Acquire, Relaxed}, }, - Arc, LockResult, Mutex, RwLock, RwLockReadGuard, RwLockWriteGuard, + Arc, LockResult, Mutex, RwLock, RwLockReadGuard, RwLockWriteGuard, Weak, }, thread::Builder, time::{Duration, Instant}, @@ -1352,7 +1352,7 @@ impl Bank { new } - pub fn set_fork_graph_in_program_cache(&self, fork_graph: Arc>) { + pub fn set_fork_graph_in_program_cache(&self, fork_graph: Weak>) { self.transaction_processor .program_cache .write() diff --git a/runtime/src/bank/tests.rs b/runtime/src/bank/tests.rs index a5a6022875defe..715dd90f9d815b 100644 --- a/runtime/src/bank/tests.rs +++ b/runtime/src/bank/tests.rs @@ -318,7 +318,7 @@ fn create_simple_test_arc_bank(lamports: u64) -> (Arc, Arc = (0..max_keys) .enumerate() @@ -6435,9 +6431,8 @@ fn test_same_program_id_uses_unique_executable_accounts() { let (genesis_config, mint_keypair) = create_genesis_config(50000); let program1_pubkey = solana_sdk::pubkey::new_rand(); - let bank = - Bank::new_with_mockup_builtin_for_tests(&genesis_config, program1_pubkey, MockBuiltin::vm) - .0; + let (bank, _bank_forks) = + Bank::new_with_mockup_builtin_for_tests(&genesis_config, program1_pubkey, MockBuiltin::vm); // Add a new program owned by the first let program2_pubkey = solana_sdk::pubkey::new_rand(); @@ -6645,11 +6640,8 @@ fn test_add_builtin_no_overwrite() { let slot = 123; let program_id = solana_sdk::pubkey::new_rand(); - let mut bank = Arc::new(Bank::new_from_parent( - create_simple_test_arc_bank(100_000).0, - &Pubkey::default(), - slot, - )); + let (parent_bank, _bank_forks) = create_simple_test_arc_bank(100_000); + let mut bank = Arc::new(Bank::new_from_parent(parent_bank, &Pubkey::default(), slot)); assert_eq!(bank.get_account_modified_slot(&program_id), None); Arc::get_mut(&mut bank) @@ -6669,11 +6661,8 @@ fn test_add_builtin_loader_no_overwrite() { let slot = 123; let loader_id = solana_sdk::pubkey::new_rand(); - let mut bank = Arc::new(Bank::new_from_parent( - create_simple_test_arc_bank(100_000).0, - &Pubkey::default(), - slot, - )); + let (parent_bank, _bank_forks) = create_simple_test_arc_bank(100_000); + let mut bank = Arc::new(Bank::new_from_parent(parent_bank, &Pubkey::default(), slot)); assert_eq!(bank.get_account_modified_slot(&loader_id), None); Arc::get_mut(&mut bank) @@ -6839,11 +6828,8 @@ fn test_add_builtin_account_after_frozen() { let slot = 123; let program_id = Pubkey::from_str("CiXgo2KHKSDmDnV1F6B69eWFgNAPiSBjjYvfB4cvRNre").unwrap(); - let bank = Bank::new_from_parent( - create_simple_test_arc_bank(100_000).0, - &Pubkey::default(), - slot, - ); + let (parent_bank, _bank_forks) = create_simple_test_arc_bank(100_000); + let bank = Bank::new_from_parent(parent_bank, &Pubkey::default(), slot); bank.freeze(); bank.add_builtin_account("mock_program", &program_id); @@ -6970,11 +6956,8 @@ fn test_add_precompiled_account_after_frozen() { let slot = 123; let program_id = Pubkey::from_str("CiXgo2KHKSDmDnV1F6B69eWFgNAPiSBjjYvfB4cvRNre").unwrap(); - let bank = Bank::new_from_parent( - create_simple_test_arc_bank(100_000).0, - &Pubkey::default(), - slot, - ); + let (parent_bank, _bank_forks) = create_simple_test_arc_bank(100_000); + let bank = Bank::new_from_parent(parent_bank, &Pubkey::default(), slot); bank.freeze(); bank.add_precompiled_account(&program_id); @@ -7855,7 +7838,7 @@ fn test_bpf_loader_upgradeable_deploy_with_max_len() { #[test] fn test_compute_active_feature_set() { - let bank0 = create_simple_test_arc_bank(100_000).0; + let (bank0, _bank_forks) = create_simple_test_arc_bank(100_000); let mut bank = Bank::new_from_parent(bank0, &Pubkey::default(), 1); let test_feature = "TestFeature11111111111111111111111111111111" @@ -7906,7 +7889,7 @@ fn test_compute_active_feature_set() { #[test] fn test_reserved_account_keys() { - let bank0 = create_simple_test_arc_bank(100_000).0; + let (bank0, _bank_forks) = create_simple_test_arc_bank(100_000); let mut bank = Bank::new_from_parent(bank0, &Pubkey::default(), 1); bank.feature_set = Arc::new(FeatureSet::default()); @@ -8188,7 +8171,7 @@ fn test_timestamp_fast() { #[test] fn test_program_is_native_loader() { let (genesis_config, mint_keypair) = create_genesis_config(50000); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let tx = Transaction::new_signed_with_payer( &[Instruction::new_with_bincode( @@ -9211,7 +9194,7 @@ fn test_tx_log_order() { &Pubkey::new_unique(), bootstrap_validator_stake_lamports(), ); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); *bank.transaction_log_collector_config.write().unwrap() = TransactionLogCollectorConfig { mentioned_addresses: HashSet::new(), filter: TransactionLogCollectorFilter::All, @@ -9301,9 +9284,8 @@ fn test_tx_return_data() { bootstrap_validator_stake_lamports(), ); let mock_program_id = Pubkey::from([2u8; 32]); - let bank = - Bank::new_with_mockup_builtin_for_tests(&genesis_config, mock_program_id, MockBuiltin::vm) - .0; + let (bank, _bank_forks) = + Bank::new_with_mockup_builtin_for_tests(&genesis_config, mock_program_id, MockBuiltin::vm); declare_process_instruction!(MockBuiltin, 1, |invoke_context| { let mock_program_id = Pubkey::from([2u8; 32]); @@ -9503,8 +9485,8 @@ fn test_transfer_sysvar() { ); let program_id = solana_sdk::pubkey::new_rand(); - let bank = - Bank::new_with_mockup_builtin_for_tests(&genesis_config, program_id, MockBuiltin::vm).0; + let (bank, _bank_forks) = + Bank::new_with_mockup_builtin_for_tests(&genesis_config, program_id, MockBuiltin::vm); declare_process_instruction!(MockBuiltin, 1, |invoke_context| { let transaction_context = &invoke_context.transaction_context; @@ -9713,8 +9695,8 @@ fn test_compute_budget_program_noop() { bootstrap_validator_stake_lamports(), ); let program_id = solana_sdk::pubkey::new_rand(); - let bank = - Bank::new_with_mockup_builtin_for_tests(&genesis_config, program_id, MockBuiltin::vm).0; + let (bank, _bank_forks) = + Bank::new_with_mockup_builtin_for_tests(&genesis_config, program_id, MockBuiltin::vm); declare_process_instruction!(MockBuiltin, 1, |invoke_context| { let compute_budget = invoke_context.get_compute_budget(); @@ -9758,8 +9740,8 @@ fn test_compute_request_instruction() { bootstrap_validator_stake_lamports(), ); let program_id = solana_sdk::pubkey::new_rand(); - let bank = - Bank::new_with_mockup_builtin_for_tests(&genesis_config, program_id, MockBuiltin::vm).0; + let (bank, _bank_forks) = + Bank::new_with_mockup_builtin_for_tests(&genesis_config, program_id, MockBuiltin::vm); declare_process_instruction!(MockBuiltin, 1, |invoke_context| { let compute_budget = invoke_context.get_compute_budget(); @@ -9804,8 +9786,8 @@ fn test_failed_compute_request_instruction() { ); let program_id = solana_sdk::pubkey::new_rand(); - let bank = - Bank::new_with_mockup_builtin_for_tests(&genesis_config, program_id, MockBuiltin::vm).0; + let (bank, _bank_forks) = + Bank::new_with_mockup_builtin_for_tests(&genesis_config, program_id, MockBuiltin::vm); let payer0_keypair = Keypair::new(); let payer1_keypair = Keypair::new(); @@ -9977,7 +9959,7 @@ fn test_call_precomiled_program() { .. } = create_genesis_config_with_leader(42, &Pubkey::new_unique(), 42); activate_all_features(&mut genesis_config); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); // libsecp256k1 // Since libsecp256k1 is still using the old version of rand, this test @@ -10242,7 +10224,7 @@ fn test_an_empty_instruction_without_program() { let message = Message::new(&[ix], Some(&mint_keypair.pubkey())); let tx = Transaction::new(&[&mint_keypair], message, genesis_config.hash()); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); assert_eq!( bank.process_transaction(&tx).unwrap_err(), TransactionError::InstructionError(0, InstructionError::UnsupportedProgramId), @@ -10270,7 +10252,7 @@ fn test_accounts_data_size_with_good_transaction() { const ACCOUNT_SIZE: u64 = MAX_PERMITTED_DATA_LENGTH; let (genesis_config, mint_keypair) = create_genesis_config(1_000 * LAMPORTS_PER_SOL); let bank = Bank::new_for_tests(&genesis_config); - let bank = bank.wrap_with_bank_forks_for_tests().0; + let (bank, _bank_forks) = bank.wrap_with_bank_forks_for_tests(); let transaction = system_transaction::create_account( &mint_keypair, &Keypair::new(), @@ -10311,7 +10293,7 @@ fn test_accounts_data_size_with_bad_transaction() { const ACCOUNT_SIZE: u64 = MAX_PERMITTED_DATA_LENGTH; let (genesis_config, _mint_keypair) = create_genesis_config(1_000 * LAMPORTS_PER_SOL); let bank = Bank::new_for_tests(&genesis_config); - let bank = bank.wrap_with_bank_forks_for_tests().0; + let (bank, _bank_forks) = bank.wrap_with_bank_forks_for_tests(); let transaction = system_transaction::create_account( &Keypair::new(), &Keypair::new(), @@ -10428,12 +10410,11 @@ fn test_invalid_rent_state_changes_existing_accounts() { ), ); - let bank = Bank::new_with_mockup_builtin_for_tests( + let (bank, _bank_forks) = Bank::new_with_mockup_builtin_for_tests( &genesis_config, mock_program_id, MockTransferBuiltin::vm, - ) - .0; + ); let recent_blockhash = bank.last_blockhash(); let check_account_is_rent_exempt = |pubkey: &Pubkey| -> bool { @@ -10515,12 +10496,11 @@ fn test_invalid_rent_state_changes_new_accounts() { let account_data_size = 100; let rent_exempt_minimum = genesis_config.rent.minimum_balance(account_data_size); - let bank = Bank::new_with_mockup_builtin_for_tests( + let (bank, _bank_forks) = Bank::new_with_mockup_builtin_for_tests( &genesis_config, mock_program_id, MockTransferBuiltin::vm, - ) - .0; + ); let recent_blockhash = bank.last_blockhash(); let check_account_is_rent_exempt = |pubkey: &Pubkey| -> bool { @@ -10578,12 +10558,11 @@ fn test_drained_created_account() { // Create legacy accounts of various kinds let created_keypair = Keypair::new(); - let bank = Bank::new_with_mockup_builtin_for_tests( + let (bank, _bank_forks) = Bank::new_with_mockup_builtin_for_tests( &genesis_config, mock_program_id, MockTransferBuiltin::vm, - ) - .0; + ); let recent_blockhash = bank.last_blockhash(); // Create and drain a small data size account @@ -10694,7 +10673,7 @@ fn test_rent_state_changes_sysvars() { Account::from(validator_vote_account), ); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); // Ensure transactions with sysvars succeed, even though sysvars appear RentPaying by balance let tx = Transaction::new_signed_with_payer( @@ -10737,7 +10716,7 @@ fn test_invalid_rent_state_changes_fee_payer() { Account::new(rent_exempt_minimum, 0, &system_program::id()), ); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let recent_blockhash = bank.last_blockhash(); let check_account_is_rent_exempt = |pubkey: &Pubkey| -> bool { @@ -10966,7 +10945,7 @@ fn test_rent_state_incinerator() { genesis_config.rent = Rent::default(); let rent_exempt_minimum = genesis_config.rent.minimum_balance(0); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); for amount in [rent_exempt_minimum - 1, rent_exempt_minimum] { bank.transfer(amount, &mint_keypair, &solana_sdk::incinerator::id()) @@ -11136,12 +11115,11 @@ fn test_resize_and_rent() { activate_all_features(&mut genesis_config); let mock_program_id = Pubkey::new_unique(); - let bank = Bank::new_with_mockup_builtin_for_tests( + let (bank, _bank_forks) = Bank::new_with_mockup_builtin_for_tests( &genesis_config, mock_program_id, MockReallocBuiltin::vm, - ) - .0; + ); let recent_blockhash = bank.last_blockhash(); @@ -11412,12 +11390,11 @@ fn test_accounts_data_size_and_resize_transactions() { .. } = genesis_utils::create_genesis_config(100 * LAMPORTS_PER_SOL); let mock_program_id = Pubkey::new_unique(); - let bank = Bank::new_with_mockup_builtin_for_tests( + let (bank, _bank_forks) = Bank::new_with_mockup_builtin_for_tests( &genesis_config, mock_program_id, MockReallocBuiltin::vm, - ) - .0; + ); let recent_blockhash = bank.last_blockhash(); @@ -11667,7 +11644,7 @@ fn test_cap_accounts_data_allocations_per_transaction() { / MAX_PERMITTED_DATA_LENGTH as usize; let (genesis_config, mint_keypair) = create_genesis_config(1_000_000 * LAMPORTS_PER_SOL); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let mut instructions = Vec::new(); let mut keypairs = vec![mint_keypair.insecure_clone()]; @@ -11874,7 +11851,7 @@ fn test_calculate_fee_with_request_heap_frame_flag() { fn test_is_in_slot_hashes_history() { use solana_sdk::slot_hashes::MAX_ENTRIES; - let bank0 = create_simple_test_arc_bank(1).0; + let (bank0, _bank_forks) = create_simple_test_arc_bank(1); assert!(!bank0.is_in_slot_hashes_history(&0)); assert!(!bank0.is_in_slot_hashes_history(&1)); let mut last_bank = bank0; @@ -12181,7 +12158,7 @@ fn test_squash_timing_add_assign() { #[test] fn test_system_instruction_allocate() { let (genesis_config, mint_keypair) = create_genesis_config_no_tx_fee(sol_to_lamports(1.0)); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let bank_client = BankClient::new_shared(bank); let data_len = 2; let amount = genesis_config.rent.minimum_balance(data_len); @@ -12308,7 +12285,7 @@ fn test_create_zero_lamport_without_clean() { #[test] fn test_system_instruction_assign_with_seed() { let (genesis_config, mint_keypair) = create_genesis_config_no_tx_fee(sol_to_lamports(1.0)); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let bank_client = BankClient::new_shared(bank); let alice_keypair = Keypair::new(); @@ -12349,7 +12326,7 @@ fn test_system_instruction_unsigned_transaction() { let amount = genesis_config.rent.minimum_balance(0); // Fund to account to bypass AccountNotFound error - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let bank_client = BankClient::new_shared(bank); bank_client .transfer_and_confirm(amount, &alice_keypair, &mallory_pubkey) @@ -12850,8 +12827,8 @@ fn test_get_accounts_for_bank_hash_details(skip_rewrites: bool) { fn test_failed_simulation_compute_units() { let (genesis_config, mint_keypair) = create_genesis_config(LAMPORTS_PER_SOL); let program_id = Pubkey::new_unique(); - let bank = - Bank::new_with_mockup_builtin_for_tests(&genesis_config, program_id, MockBuiltin::vm).0; + let (bank, _bank_forks) = + Bank::new_with_mockup_builtin_for_tests(&genesis_config, program_id, MockBuiltin::vm); const TEST_UNITS: u64 = 10_000; const MOCK_BUILTIN_UNITS: u64 = 1; diff --git a/runtime/src/bank_client.rs b/runtime/src/bank_client.rs index e8c8f7774ec66e..9cac83470bc964 100644 --- a/runtime/src/bank_client.rs +++ b/runtime/src/bank_client.rs @@ -321,7 +321,7 @@ mod tests { let jane_doe_keypair = Keypair::new(); let jane_pubkey = jane_doe_keypair.pubkey(); let doe_keypairs = vec![&john_doe_keypair, &jane_doe_keypair]; - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let bank_client = BankClient::new_shared(bank); let amount = genesis_config.rent.minimum_balance(0); diff --git a/runtime/src/bank_forks.rs b/runtime/src/bank_forks.rs index 426908b288db6c..3ee3383b5d3f31 100644 --- a/runtime/src/bank_forks.rs +++ b/runtime/src/bank_forks.rs @@ -136,7 +136,7 @@ impl BankForks { scheduler_pool: None, })); - root_bank.set_fork_graph_in_program_cache(bank_forks.clone()); + root_bank.set_fork_graph_in_program_cache(Arc::downgrade(&bank_forks)); bank_forks } @@ -753,6 +753,14 @@ mod tests { std::{sync::atomic::Ordering::Relaxed, time::Duration}, }; + #[test] + fn test_bank_forks_new_rw_arc_memory_leak() { + for _ in 0..1000 { + let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(10_000); + BankForks::new_rw_arc(Bank::new_for_tests(&genesis_config)); + } + } + #[test] fn test_bank_forks_new() { let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(10_000); diff --git a/runtime/tests/stake.rs b/runtime/tests/stake.rs index 7c53e1e44a3af3..9922b8c9a5d075 100755 --- a/runtime/tests/stake.rs +++ b/runtime/tests/stake.rs @@ -142,7 +142,7 @@ fn test_stake_create_and_split_single_signature() { let staker_pubkey = staker_keypair.pubkey(); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let bank_client = BankClient::new_shared(bank.clone()); let stake_address = @@ -218,7 +218,7 @@ fn test_stake_create_and_split_to_existing_system_account() { let staker_pubkey = staker_keypair.pubkey(); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let bank_client = BankClient::new_shared(bank.clone()); let stake_address = @@ -593,7 +593,7 @@ fn test_create_stake_account_from_seed() { &solana_sdk::pubkey::new_rand(), 1_000_000, ); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let mint_pubkey = mint_keypair.pubkey(); let bank_client = BankClient::new_shared(bank.clone()); diff --git a/scripts/patch-spl-crates-for-anchor.sh b/scripts/patch-spl-crates-for-anchor.sh index 4c3dfc2ae924fd..d90b69136e140b 100644 --- a/scripts/patch-spl-crates-for-anchor.sh +++ b/scripts/patch-spl-crates-for-anchor.sh @@ -70,7 +70,10 @@ patch_crates_io() { spl-memo = { path = "$spl_dir/memo/program" } spl-pod = { path = "$spl_dir/libraries/pod" } spl-token = { path = "$spl_dir/token/program" } - spl-token-2022 = { path = "$spl_dir/token/program-2022" } + # Avoid patching spl-token-2022 to avoid forcing anchor to use 4.0.1, which + # doesn't work with the monorepo forcing 4.0.0. Allow the patching again once + # the monorepo is on 4.0.1, or relax the dependency in the monorepo. + #spl-token-2022 = { path = "$spl_dir/token/program-2022" } spl-token-group-interface = { path = "$spl_dir/token-group/interface" } spl-token-metadata-interface = { path = "$spl_dir/token-metadata/interface" } spl-tlv-account-resolution = { path = "$spl_dir/libraries/tlv-account-resolution" } diff --git a/sdk/cargo-build-sbf/src/main.rs b/sdk/cargo-build-sbf/src/main.rs index 0da59ff230b385..6d02499c8fbc6d 100644 --- a/sdk/cargo-build-sbf/src/main.rs +++ b/sdk/cargo-build-sbf/src/main.rs @@ -156,7 +156,7 @@ fn find_installed_platform_tools() -> Vec { } fn get_latest_platform_tools_version() -> Result { - let url = "https://github.com/solana-labs/platform-tools/releases/latest"; + let url = "https://github.com/anza-xyz/platform-tools/releases/latest"; let resp = reqwest::blocking::get(url).map_err(|err| format!("Failed to GET {url}: {err}"))?; let path = std::path::Path::new(resp.url().path()); let version = path.file_name().unwrap().to_string_lossy().to_string(); @@ -618,7 +618,7 @@ fn build_solana_package( install_if_missing( config, package, - "https://github.com/solana-labs/platform-tools/releases/download", + "https://github.com/anza-xyz/platform-tools/releases/download", platform_tools_download_file_name.as_str(), &target_path, ) @@ -913,7 +913,7 @@ fn main() { // The following line is scanned by CI configuration script to // separate cargo caches according to the version of platform-tools. - let platform_tools_version = String::from("v1.41"); + let platform_tools_version = String::from("v1.42"); let rust_base_version = get_base_rust_version(platform_tools_version.as_str()); let version = format!( "{}\nplatform-tools {}\n{}", diff --git a/sdk/cargo-build-sbf/tests/crates/fail/Cargo.toml b/sdk/cargo-build-sbf/tests/crates/fail/Cargo.toml index 08d34024383d90..67a9b93c946880 100644 --- a/sdk/cargo-build-sbf/tests/crates/fail/Cargo.toml +++ b/sdk/cargo-build-sbf/tests/crates/fail/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fail" -version = "2.0.2" +version = "2.0.5" description = "Solana SBF test program written in Rust" authors = ["Anza Maintainers "] repository = "https://github.com/anza-xyz/agave" @@ -10,7 +10,7 @@ edition = "2021" publish = false [dependencies] -solana-program = { path = "../../../../program", version = "=2.0.2" } +solana-program = { path = "../../../../program", version = "=2.0.5" } [lib] crate-type = ["cdylib"] diff --git a/sdk/cargo-build-sbf/tests/crates/noop/Cargo.toml b/sdk/cargo-build-sbf/tests/crates/noop/Cargo.toml index ccc5824fbe7c77..b6aa8274c103e7 100644 --- a/sdk/cargo-build-sbf/tests/crates/noop/Cargo.toml +++ b/sdk/cargo-build-sbf/tests/crates/noop/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "noop" -version = "2.0.2" +version = "2.0.5" description = "Solana SBF test program written in Rust" authors = ["Anza Maintainers "] repository = "https://github.com/anza-xyz/agave" @@ -10,7 +10,7 @@ edition = "2021" publish = false [dependencies] -solana-program = { path = "../../../../program", version = "=2.0.2" } +solana-program = { path = "../../../../program", version = "=2.0.5" } [lib] crate-type = ["cdylib"] diff --git a/sdk/program/src/stake/instruction.rs b/sdk/program/src/stake/instruction.rs index ec929864ffd6b0..e2a5b056e70618 100644 --- a/sdk/program/src/stake/instruction.rs +++ b/sdk/program/src/stake/instruction.rs @@ -307,6 +307,42 @@ pub enum StakeInstruction { /// 4. `[SIGNER]` Stake authority /// Redelegate, + + /// Move stake between accounts with the same authorities and lockups, using Staker authority. + /// + /// The source account must be fully active. If its entire delegation is moved, it immediately + /// becomes inactive. Otherwise, at least the minimum delegation of active stake must remain. + /// + /// The destination account must be fully active or fully inactive. If it is active, it must + /// be delegated to the same vote account as the source. If it is inactive, it + /// immediately becomes active, and must contain at least the minimum delegation. The + /// destination must be pre-funded with the rent-exempt reserve. + /// + /// This instruction only affects or moves active stake. Additional unstaked lamports are never + /// moved, activated, or deactivated, and accounts are never deallocated. + /// + /// # Account references + /// 0. `[WRITE]` Active source stake account + /// 1. `[WRITE]` Active or inactive destination stake account + /// 2. `[SIGNER]` Stake authority + /// + /// The u64 is the portion of the stake to move, which may be the entire delegation + MoveStake(u64), + + /// Move unstaked lamports between accounts with the same authorities and lockups, using Staker + /// authority. + /// + /// The source account must be fully active or fully inactive. The destination may be in any + /// mergeable state (active, inactive, or activating, but not in warmup cooldown). Only lamports that + /// are neither backing a delegation nor required for rent-exemption may be moved. + /// + /// # Account references + /// 0. `[WRITE]` Active or inactive source stake account + /// 1. `[WRITE]` Mergeable destination stake account + /// 2. `[SIGNER]` Stake authority + /// + /// The u64 is the portion of available lamports to move + MoveLamports(u64), } #[derive(Default, Debug, Serialize, Deserialize, PartialEq, Eq, Clone, Copy)] @@ -847,6 +883,40 @@ pub fn redelegate_with_seed( ] } +pub fn move_stake( + source_stake_pubkey: &Pubkey, + destination_stake_pubkey: &Pubkey, + authorized_pubkey: &Pubkey, + lamports: u64, +) -> Instruction { + let account_metas = vec![ + AccountMeta::new(*source_stake_pubkey, false), + AccountMeta::new(*destination_stake_pubkey, false), + AccountMeta::new_readonly(*authorized_pubkey, true), + ]; + + Instruction::new_with_bincode(id(), &StakeInstruction::MoveStake(lamports), account_metas) +} + +pub fn move_lamports( + source_stake_pubkey: &Pubkey, + destination_stake_pubkey: &Pubkey, + authorized_pubkey: &Pubkey, + lamports: u64, +) -> Instruction { + let account_metas = vec![ + AccountMeta::new(*source_stake_pubkey, false), + AccountMeta::new(*destination_stake_pubkey, false), + AccountMeta::new_readonly(*authorized_pubkey, true), + ]; + + Instruction::new_with_bincode( + id(), + &StakeInstruction::MoveLamports(lamports), + account_metas, + ) +} + #[cfg(test)] mod tests { use {super::*, crate::instruction::InstructionError}; diff --git a/sdk/sbf/scripts/install.sh b/sdk/sbf/scripts/install.sh index 12343a413ed7b7..e51f46d58c418a 100755 --- a/sdk/sbf/scripts/install.sh +++ b/sdk/sbf/scripts/install.sh @@ -109,7 +109,7 @@ if [[ ! -e criterion-$version.md || ! -e criterion ]]; then fi # Install platform tools -version=v1.41 +version=v1.42 if [[ ! -e platform-tools-$version.md || ! -e platform-tools ]]; then ( set -e diff --git a/sdk/src/ed25519_instruction.rs b/sdk/src/ed25519_instruction.rs index 10ae533f478171..bdc4d4d0c4681b 100644 --- a/sdk/src/ed25519_instruction.rs +++ b/sdk/src/ed25519_instruction.rs @@ -5,7 +5,11 @@ #![cfg(feature = "full")] use { - crate::{feature_set::FeatureSet, instruction::Instruction, precompiles::PrecompileError}, + crate::{ + feature_set::{ed25519_precompile_verify_strict, FeatureSet}, + instruction::Instruction, + precompiles::PrecompileError, + }, bytemuck::bytes_of, bytemuck_derive::{Pod, Zeroable}, ed25519_dalek::{ed25519::signature::Signature, Signer, Verifier}, @@ -86,7 +90,7 @@ pub fn new_ed25519_instruction(keypair: &ed25519_dalek::Keypair, message: &[u8]) pub fn verify( data: &[u8], instruction_datas: &[&[u8]], - _feature_set: &FeatureSet, + feature_set: &FeatureSet, ) -> Result<(), PrecompileError> { if data.len() < SIGNATURE_OFFSETS_START { return Err(PrecompileError::InvalidInstructionDataSize); @@ -145,9 +149,15 @@ pub fn verify( offsets.message_data_size as usize, )?; - publickey - .verify(message, &signature) - .map_err(|_| PrecompileError::InvalidSignature)?; + if feature_set.is_active(&ed25519_precompile_verify_strict::id()) { + publickey + .verify_strict(message, &signature) + .map_err(|_| PrecompileError::InvalidSignature)?; + } else { + publickey + .verify(message, &signature) + .map_err(|_| PrecompileError::InvalidSignature)?; + } } Ok(()) } @@ -189,9 +199,64 @@ pub mod test { signature::{Keypair, Signer}, transaction::Transaction, }, + hex, rand0_7::{thread_rng, Rng}, }; + pub fn new_ed25519_instruction_raw( + pubkey: &[u8], + signature: &[u8], + message: &[u8], + ) -> Instruction { + assert_eq!(pubkey.len(), PUBKEY_SERIALIZED_SIZE); + assert_eq!(signature.len(), SIGNATURE_SERIALIZED_SIZE); + + let mut instruction_data = Vec::with_capacity( + DATA_START + .saturating_add(SIGNATURE_SERIALIZED_SIZE) + .saturating_add(PUBKEY_SERIALIZED_SIZE) + .saturating_add(message.len()), + ); + + let num_signatures: u8 = 1; + let public_key_offset = DATA_START; + let signature_offset = public_key_offset.saturating_add(PUBKEY_SERIALIZED_SIZE); + let message_data_offset = signature_offset.saturating_add(SIGNATURE_SERIALIZED_SIZE); + + // add padding byte so that offset structure is aligned + instruction_data.extend_from_slice(bytes_of(&[num_signatures, 0])); + + let offsets = Ed25519SignatureOffsets { + signature_offset: signature_offset as u16, + signature_instruction_index: u16::MAX, + public_key_offset: public_key_offset as u16, + public_key_instruction_index: u16::MAX, + message_data_offset: message_data_offset as u16, + message_data_size: message.len() as u16, + message_instruction_index: u16::MAX, + }; + + instruction_data.extend_from_slice(bytes_of(&offsets)); + + debug_assert_eq!(instruction_data.len(), public_key_offset); + + instruction_data.extend_from_slice(pubkey); + + debug_assert_eq!(instruction_data.len(), signature_offset); + + instruction_data.extend_from_slice(signature); + + debug_assert_eq!(instruction_data.len(), message_data_offset); + + instruction_data.extend_from_slice(message); + + Instruction { + program_id: solana_sdk::ed25519_program::id(), + accounts: vec![], + data: instruction_data, + } + } + fn test_case( num_signatures: u16, offsets: &Ed25519SignatureOffsets, @@ -380,4 +445,50 @@ pub mod test { ); assert!(tx.verify_precompiles(&feature_set).is_err()); } + + #[test] + fn test_ed25519_malleability() { + solana_logger::setup(); + let mint_keypair = Keypair::new(); + + // sig created via ed25519_dalek: both pass + let privkey = ed25519_dalek::Keypair::generate(&mut thread_rng()); + let message_arr = b"hello"; + let instruction = new_ed25519_instruction(&privkey, message_arr); + let tx = Transaction::new_signed_with_payer( + &[instruction.clone()], + Some(&mint_keypair.pubkey()), + &[&mint_keypair], + Hash::default(), + ); + + let feature_set = FeatureSet::default(); + assert!(tx.verify_precompiles(&feature_set).is_ok()); + + let feature_set = FeatureSet::all_enabled(); + assert!(tx.verify_precompiles(&feature_set).is_ok()); + + // malleable sig: verify_strict does NOT pass + // for example, test number 5: + // https://github.com/C2SP/CCTV/tree/main/ed25519 + // R has low order (in fact R == 0) + let pubkey = + &hex::decode("10eb7c3acfb2bed3e0d6ab89bf5a3d6afddd1176ce4812e38d9fd485058fdb1f") + .unwrap(); + let signature = &hex::decode("00000000000000000000000000000000000000000000000000000000000000009472a69cd9a701a50d130ed52189e2455b23767db52cacb8716fb896ffeeac09").unwrap(); + let message = b"ed25519vectors 3"; + let instruction = new_ed25519_instruction_raw(pubkey, signature, message); + let tx = Transaction::new_signed_with_payer( + &[instruction.clone()], + Some(&mint_keypair.pubkey()), + &[&mint_keypair], + Hash::default(), + ); + + let feature_set = FeatureSet::default(); + assert!(tx.verify_precompiles(&feature_set).is_ok()); + + let feature_set = FeatureSet::all_enabled(); + assert!(tx.verify_precompiles(&feature_set).is_err()); // verify_strict does NOT pass + } } diff --git a/sdk/src/feature_set.rs b/sdk/src/feature_set.rs index ec8428094b7e6c..dd57edc23d0949 100644 --- a/sdk/src/feature_set.rs +++ b/sdk/src/feature_set.rs @@ -820,6 +820,7 @@ pub mod migrate_config_program_to_core_bpf { pub mod enable_get_epoch_stake_syscall { solana_sdk::declare_id!("7mScTYkJXsbdrcwTQRs7oeCSXoJm4WjzBsRyf8bCU3Np"); } + pub mod migrate_address_lookup_table_program_to_core_bpf { solana_sdk::declare_id!("C97eKZygrkU4JxJsZdjgbUY7iQR7rKTr4NyDWo2E5pRm"); } @@ -828,6 +829,14 @@ pub mod zk_elgamal_proof_program_enabled { solana_sdk::declare_id!("zkhiy5oLowR7HY4zogXjCjeMXyruLqBwSWH21qcFtnv"); } +pub mod move_stake_and_move_lamports_ixs { + solana_sdk::declare_id!("7bTK6Jis8Xpfrs8ZoUfiMDPazTcdPcTWheZFJTA5Z6X4"); +} + +pub mod ed25519_precompile_verify_strict { + solana_sdk::declare_id!("ed9tNscbWLYBooxWA7FE2B5KHWs8A6sxfY8EzezEcoo"); +} + lazy_static! { /// Map of feature identifiers to user-visible description pub static ref FEATURE_NAMES: HashMap = [ @@ -1030,6 +1039,8 @@ lazy_static! { (enable_get_epoch_stake_syscall::id(), "Enable syscall: sol_get_epoch_stake #884"), (migrate_address_lookup_table_program_to_core_bpf::id(), "Migrate Address Lookup Table program to Core BPF #1651"), (zk_elgamal_proof_program_enabled::id(), "Enable ZkElGamalProof program SIMD-0153"), + (move_stake_and_move_lamports_ixs::id(), "Enable MoveStake and MoveLamports stake program instructions #1610"), + (ed25519_precompile_verify_strict::id(), "Use strict verification in ed25519 precompile SIMD-0152"), /*************** ADD NEW FEATURES HERE ***************/ ] .iter() diff --git a/stake-accounts/src/stake_accounts.rs b/stake-accounts/src/stake_accounts.rs index 084b7837cd99f4..bcea83eee9a627 100644 --- a/stake-accounts/src/stake_accounts.rs +++ b/stake-accounts/src/stake_accounts.rs @@ -283,7 +283,7 @@ pub(crate) fn move_stake_accounts( mod tests { use { super::*, - solana_runtime::{bank::Bank, bank_client::BankClient}, + solana_runtime::{bank::Bank, bank_client::BankClient, bank_forks::BankForks}, solana_sdk::{ account::{AccountSharedData, ReadableAccount}, client::SyncClient, @@ -292,16 +292,16 @@ mod tests { stake::state::StakeStateV2, }, solana_stake_program::stake_state, - std::sync::Arc, + std::sync::{Arc, RwLock}, }; - fn create_bank(lamports: u64) -> (Arc, Keypair, u64, u64) { + fn create_bank(lamports: u64) -> (Arc, Arc>, Keypair, u64, u64) { let (mut genesis_config, mint_keypair) = create_genesis_config(lamports); genesis_config.fee_rate_governor = solana_sdk::fee_calculator::FeeRateGovernor::new(0, 0); - let bank = Bank::new_with_bank_forks_for_tests(&genesis_config).0; + let (bank, bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let stake_rent = bank.get_minimum_balance_for_rent_exemption(StakeStateV2::size_of()); let system_rent = bank.get_minimum_balance_for_rent_exemption(0); - (bank, mint_keypair, stake_rent, system_rent) + (bank, bank_forks, mint_keypair, stake_rent, system_rent) } fn create_account( @@ -355,7 +355,7 @@ mod tests { #[test] fn test_new_derived_stake_account() { - let (bank, funding_keypair, stake_rent, system_rent) = create_bank(10_000_000); + let (bank, _bank_forks, funding_keypair, stake_rent, system_rent) = create_bank(10_000_000); let funding_pubkey = funding_keypair.pubkey(); let bank_client = BankClient::new_shared(bank); let fee_payer_keypair = create_account(&bank_client, &funding_keypair, system_rent); @@ -392,7 +392,7 @@ mod tests { #[test] fn test_authorize_stake_accounts() { - let (bank, funding_keypair, stake_rent, system_rent) = create_bank(10_000_000); + let (bank, _bank_forks, funding_keypair, stake_rent, system_rent) = create_bank(10_000_000); let funding_pubkey = funding_keypair.pubkey(); let bank_client = BankClient::new_shared(bank); let fee_payer_keypair = create_account(&bank_client, &funding_keypair, system_rent); @@ -454,7 +454,7 @@ mod tests { #[test] fn test_lockup_stake_accounts() { - let (bank, funding_keypair, stake_rent, system_rent) = create_bank(10_000_000); + let (bank, _bank_forks, funding_keypair, stake_rent, system_rent) = create_bank(10_000_000); let funding_pubkey = funding_keypair.pubkey(); let bank_client = BankClient::new_shared(bank); let fee_payer_keypair = create_account(&bank_client, &funding_keypair, system_rent); @@ -545,7 +545,7 @@ mod tests { #[test] fn test_rebase_stake_accounts() { - let (bank, funding_keypair, stake_rent, system_rent) = create_bank(10_000_000); + let (bank, _bank_forks, funding_keypair, stake_rent, system_rent) = create_bank(10_000_000); let funding_pubkey = funding_keypair.pubkey(); let bank_client = BankClient::new_shared(bank); let fee_payer_keypair = create_account(&bank_client, &funding_keypair, system_rent); @@ -608,7 +608,7 @@ mod tests { #[test] fn test_move_stake_accounts() { - let (bank, funding_keypair, stake_rent, system_rent) = create_bank(10_000_000); + let (bank, _bank_forks, funding_keypair, stake_rent, system_rent) = create_bank(10_000_000); let funding_pubkey = funding_keypair.pubkey(); let bank_client = BankClient::new_shared(bank); let fee_payer_keypair = create_account(&bank_client, &funding_keypair, system_rent); diff --git a/svm/src/transaction_error_metrics.rs b/svm/src/transaction_error_metrics.rs index ad572073ac5ee3..7c8be902e738dd 100644 --- a/svm/src/transaction_error_metrics.rs +++ b/svm/src/transaction_error_metrics.rs @@ -90,7 +90,7 @@ impl TransactionErrorMetrics { ); } - pub fn report(&self, _id: &str, _slot: Slot) { + pub fn report(&self, id: &str, slot: Slot) { // datapoint_info!( // "banking_stage-leader_slot_transaction_errors", // "id" => id, diff --git a/svm/src/transaction_processor.rs b/svm/src/transaction_processor.rs index 2037489c0477f0..0013dbc485b2ee 100644 --- a/svm/src/transaction_processor.rs +++ b/svm/src/transaction_processor.rs @@ -543,7 +543,7 @@ impl TransactionBatchProcessor { }) .collect(); - let mut loaded_programs_for_txs = None; + let mut loaded_programs_for_txs: Option = None; loop { let (program_to_store, task_cookie, task_waiter) = { // Lock the global cache. @@ -584,6 +584,7 @@ impl TransactionBatchProcessor { }; if let Some((key, program)) = program_to_store { + loaded_programs_for_txs.as_mut().unwrap().loaded_missing = true; let mut program_cache = self.program_cache.write().unwrap(); // Submit our last completed loading task. if program_cache.finish_cooperative_loading_task(self.slot, key, program) @@ -1304,8 +1305,9 @@ mod tests { fn test_replenish_program_cache_with_nonexistent_accounts() { let mock_bank = MockBankCallback::default(); let batch_processor = TransactionBatchProcessor::::default(); + let fork_graph = Arc::new(RwLock::new(TestForkGraph {})); batch_processor.program_cache.write().unwrap().fork_graph = - Some(Arc::new(RwLock::new(TestForkGraph {}))); + Some(Arc::downgrade(&fork_graph)); let key = Pubkey::new_unique(); let mut account_maps: HashMap = HashMap::new(); @@ -1318,8 +1320,9 @@ mod tests { fn test_replenish_program_cache() { let mock_bank = MockBankCallback::default(); let batch_processor = TransactionBatchProcessor::::default(); + let fork_graph = Arc::new(RwLock::new(TestForkGraph {})); batch_processor.program_cache.write().unwrap().fork_graph = - Some(Arc::new(RwLock::new(TestForkGraph {}))); + Some(Arc::downgrade(&fork_graph)); let key = Pubkey::new_unique(); let mut account_data = AccountSharedData::default(); @@ -1332,6 +1335,7 @@ mod tests { let mut account_maps: HashMap = HashMap::new(); account_maps.insert(key, 4); + let mut loaded_missing = 0; for limit_to_load_programs in [false, true] { let result = batch_processor.replenish_program_cache( @@ -1341,12 +1345,17 @@ mod tests { limit_to_load_programs, ); assert!(!result.hit_max_limit); + if result.loaded_missing { + loaded_missing += 1; + } + let program = result.find(&key).unwrap(); assert!(matches!( program.program, ProgramCacheEntryType::FailedVerification(_) )); } + assert!(loaded_missing > 0); } #[test] @@ -1799,8 +1808,9 @@ mod tests { fn test_add_builtin() { let mock_bank = MockBankCallback::default(); let batch_processor = TransactionBatchProcessor::::default(); + let fork_graph = Arc::new(RwLock::new(TestForkGraph {})); batch_processor.program_cache.write().unwrap().fork_graph = - Some(Arc::new(RwLock::new(TestForkGraph {}))); + Some(Arc::downgrade(&fork_graph)); let key = Pubkey::new_unique(); let name = "a_builtin_name"; @@ -1842,8 +1852,9 @@ mod tests { fn fast_concur_test() { let mut mock_bank = MockBankCallback::default(); let batch_processor = TransactionBatchProcessor::::new(5, 5, HashSet::new()); + let fork_graph = Arc::new(RwLock::new(TestForkGraph {})); batch_processor.program_cache.write().unwrap().fork_graph = - Some(Arc::new(RwLock::new(TestForkGraph {}))); + Some(Arc::downgrade(&fork_graph)); let programs = vec![ deploy_program("hello-solana".to_string(), &mut mock_bank), diff --git a/svm/tests/conformance.rs b/svm/tests/conformance.rs index 865cf325cb2596..70ca365fd0fcae 100644 --- a/svm/tests/conformance.rs +++ b/svm/tests/conformance.rs @@ -248,6 +248,7 @@ fn run_fixture(fixture: InstrFixture, filename: OsString, execute_as_instr: bool mock_bank.override_feature_set(feature_set); let batch_processor = TransactionBatchProcessor::::new(42, 2, HashSet::new()); + let fork_graph = Arc::new(RwLock::new(MockForkGraph {})); { let mut program_cache = batch_processor.program_cache.write().unwrap(); program_cache.environments = ProgramRuntimeEnvironments { @@ -257,7 +258,7 @@ fn run_fixture(fixture: InstrFixture, filename: OsString, execute_as_instr: bool FunctionRegistry::default(), )), }; - program_cache.fork_graph = Some(Arc::new(RwLock::new(MockForkGraph {}))); + program_cache.fork_graph = Some(Arc::downgrade(&fork_graph.clone())); } batch_processor.fill_missing_sysvar_cache_entries(&mock_bank); diff --git a/svm/tests/example-programs/clock-sysvar/Cargo.toml b/svm/tests/example-programs/clock-sysvar/Cargo.toml index 485b780f533484..d9b551cacae530 100644 --- a/svm/tests/example-programs/clock-sysvar/Cargo.toml +++ b/svm/tests/example-programs/clock-sysvar/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "clock-sysvar-program" -version = "2.0.2" +version = "2.0.5" edition = "2021" [dependencies] -solana-program = { path = "../../../../sdk/program", version = "=2.0.2" } +solana-program = { path = "../../../../sdk/program", version = "=2.0.5" } [lib] crate-type = ["cdylib", "rlib"] diff --git a/svm/tests/example-programs/hello-solana/Cargo.toml b/svm/tests/example-programs/hello-solana/Cargo.toml index afc99d9b1a3fbb..7504dcb8062a03 100644 --- a/svm/tests/example-programs/hello-solana/Cargo.toml +++ b/svm/tests/example-programs/hello-solana/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "hello-solana-program" -version = "2.0.2" +version = "2.0.5" edition = "2021" [dependencies] -solana-program = { path = "../../../../sdk/program", version = "=2.0.2" } +solana-program = { path = "../../../../sdk/program", version = "=2.0.5" } [lib] crate-type = ["cdylib", "rlib"] diff --git a/svm/tests/example-programs/simple-transfer/Cargo.toml b/svm/tests/example-programs/simple-transfer/Cargo.toml index d25bbbc4ffd5f8..5ba3f1510c6c0d 100644 --- a/svm/tests/example-programs/simple-transfer/Cargo.toml +++ b/svm/tests/example-programs/simple-transfer/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "simple-transfer-program" -version = "2.0.2" +version = "2.0.5" edition = "2021" [dependencies] -solana-program = { path = "../../../../sdk/program", version = "=2.0.2" } +solana-program = { path = "../../../../sdk/program", version = "=2.0.5" } [lib] crate-type = ["cdylib", "rlib"] diff --git a/svm/tests/integration_test.rs b/svm/tests/integration_test.rs index c47ce03af9b5a1..7a202d054a0198 100644 --- a/svm/tests/integration_test.rs +++ b/svm/tests/integration_test.rs @@ -130,6 +130,7 @@ fn create_custom_environment<'a>() -> BuiltinProgram> { } fn create_executable_environment( + fork_graph: Arc>, mock_bank: &mut MockBankCallback, program_cache: &mut ProgramCache, ) { @@ -142,7 +143,7 @@ fn create_executable_environment( )), }; - program_cache.fork_graph = Some(Arc::new(RwLock::new(MockForkGraph {}))); + program_cache.fork_graph = Some(Arc::downgrade(&fork_graph)); // We must fill in the sysvar cache entries let time_now = SystemTime::now() @@ -447,7 +448,10 @@ fn svm_integration() { HashSet::new(), ); + let fork_graph = Arc::new(RwLock::new(MockForkGraph {})); + create_executable_environment( + fork_graph.clone(), &mut mock_bank, &mut batch_processor.program_cache.write().unwrap(), ); diff --git a/transaction-status/src/lib.rs b/transaction-status/src/lib.rs index 489a213c525a94..6a5eb5fb8d6397 100644 --- a/transaction-status/src/lib.rs +++ b/transaction-status/src/lib.rs @@ -628,6 +628,7 @@ pub struct Reward { pub type Rewards = Vec; +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] pub struct RewardsAndNumPartitions { pub rewards: Rewards, pub num_partitions: Option, diff --git a/transaction-status/src/parse_stake.rs b/transaction-status/src/parse_stake.rs index 8993a3eb57f95d..f1586e58694950 100644 --- a/transaction-status/src/parse_stake.rs +++ b/transaction-status/src/parse_stake.rs @@ -297,6 +297,30 @@ pub fn parse_stake( }), }) } + StakeInstruction::MoveStake(lamports) => { + check_num_stake_accounts(&instruction.accounts, 3)?; + Ok(ParsedInstructionEnum { + instruction_type: "moveStake".to_string(), + info: json!({ + "source": account_keys[instruction.accounts[0] as usize].to_string(), + "destination": account_keys[instruction.accounts[1] as usize].to_string(), + "stakeAuthority": account_keys[instruction.accounts[2] as usize].to_string(), + "lamports": lamports, + }), + }) + } + StakeInstruction::MoveLamports(lamports) => { + check_num_stake_accounts(&instruction.accounts, 3)?; + Ok(ParsedInstructionEnum { + instruction_type: "moveLamports".to_string(), + info: json!({ + "source": account_keys[instruction.accounts[0] as usize].to_string(), + "destination": account_keys[instruction.accounts[1] as usize].to_string(), + "stakeAuthority": account_keys[instruction.accounts[2] as usize].to_string(), + "lamports": lamports, + }), + }) + } } } @@ -309,6 +333,7 @@ mod test { use { super::*, solana_sdk::{ + instruction::Instruction, message::Message, pubkey::Pubkey, stake::{ @@ -1157,4 +1182,52 @@ mod test { message.instructions[0].accounts.pop(); assert!(parse_stake(&message.instructions[0], &AccountKeys::new(&keys, None)).is_err()); } + + #[test] + fn test_parse_stake_move_ix() { + let source_stake_pubkey = Pubkey::new_unique(); + let destination_stake_pubkey = Pubkey::new_unique(); + let authorized_pubkey = Pubkey::new_unique(); + let lamports = 1_000_000; + + type InstructionFn = fn(&Pubkey, &Pubkey, &Pubkey, u64) -> Instruction; + let test_vectors: Vec<(InstructionFn, String)> = vec![ + (instruction::move_stake, "moveStake".to_string()), + (instruction::move_lamports, "moveLamports".to_string()), + ]; + + for (mk_ixn, ixn_string) in test_vectors { + let instruction = mk_ixn( + &source_stake_pubkey, + &destination_stake_pubkey, + &authorized_pubkey, + lamports, + ); + let mut message = Message::new(&[instruction], None); + assert_eq!( + parse_stake( + &message.instructions[0], + &AccountKeys::new(&message.account_keys, None) + ) + .unwrap(), + ParsedInstructionEnum { + instruction_type: ixn_string, + info: json!({ + "source": source_stake_pubkey.to_string(), + "destination": destination_stake_pubkey.to_string(), + "stakeAuthority": authorized_pubkey.to_string(), + "lamports": lamports, + }), + } + ); + assert!(parse_stake( + &message.instructions[0], + &AccountKeys::new(&message.account_keys[0..2], None) + ) + .is_err()); + let keys = message.account_keys.clone(); + message.instructions[0].accounts.pop(); + assert!(parse_stake(&message.instructions[0], &AccountKeys::new(&keys, None)).is_err()); + } + } } diff --git a/turbine/Cargo.toml b/turbine/Cargo.toml index 2d2b0a79574d27..7b29f085fa0db9 100644 --- a/turbine/Cargo.toml +++ b/turbine/Cargo.toml @@ -36,6 +36,7 @@ solana-rpc-client-api = { workspace = true } solana-runtime = { workspace = true } solana-sdk = { workspace = true } solana-streamer = { workspace = true } +static_assertions = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true } diff --git a/turbine/src/broadcast_stage/standard_broadcast_run.rs b/turbine/src/broadcast_stage/standard_broadcast_run.rs index f108fc08226a6b..0ddbe1020f5f98 100644 --- a/turbine/src/broadcast_stage/standard_broadcast_run.rs +++ b/turbine/src/broadcast_stage/standard_broadcast_run.rs @@ -506,8 +506,14 @@ impl BroadcastRun for StandardBroadcastRun { } } -fn should_chain_merkle_shreds(_slot: Slot, cluster_type: ClusterType) -> bool { - cluster_type == ClusterType::Development +fn should_chain_merkle_shreds(slot: Slot, cluster_type: ClusterType) -> bool { + match cluster_type { + ClusterType::Development => true, + ClusterType::Devnet => false, + ClusterType::MainnetBeta => false, + // Roll out chained Merkle shreds to ~5% of testnet. + ClusterType::Testnet => slot % 19 == 1, + } } #[cfg(test)] diff --git a/turbine/src/cluster_nodes.rs b/turbine/src/cluster_nodes.rs index beadf7b331f59d..8cc5f29033fd86 100644 --- a/turbine/src/cluster_nodes.rs +++ b/turbine/src/cluster_nodes.rs @@ -242,8 +242,7 @@ impl ClusterNodes { // Returns the parent node in the turbine broadcast tree. // Returns None if the node is the root of the tree or if it is not staked. - #[allow(unused)] - fn get_retransmit_parent( + pub(crate) fn get_retransmit_parent( &self, leader: &Pubkey, shred: &ShredId, diff --git a/turbine/src/sigverify_shreds.rs b/turbine/src/sigverify_shreds.rs index ca7de2b5facef8..88eaecd006764d 100644 --- a/turbine/src/sigverify_shreds.rs +++ b/turbine/src/sigverify_shreds.rs @@ -1,4 +1,8 @@ use { + crate::{ + cluster_nodes::{self, ClusterNodesCache}, + retransmit_stage::RetransmitStage, + }, crossbeam_channel::{Receiver, RecvTimeoutError, SendError, Sender}, rayon::{prelude::*, ThreadPool, ThreadPoolBuilder}, solana_gossip::cluster_info::ClusterInfo, @@ -9,15 +13,22 @@ use { }, solana_perf::{self, deduper::Deduper, packet::PacketBatch, recycler_cache::RecyclerCache}, solana_rayon_threadlimit::get_thread_count, - solana_runtime::{bank::Bank, bank_forks::BankForks}, + solana_runtime::{ + bank::{Bank, MAX_LEADER_SCHEDULE_STAKES}, + bank_forks::BankForks, + }, solana_sdk::{ clock::Slot, pubkey::Pubkey, signature::{Keypair, Signer}, }, + static_assertions::const_assert_eq, std::{ collections::HashMap, - sync::{Arc, RwLock}, + sync::{ + atomic::{AtomicUsize, Ordering}, + Arc, RwLock, + }, thread::{Builder, JoinHandle}, time::{Duration, Instant}, }, @@ -30,6 +41,16 @@ const DEDUPER_FALSE_POSITIVE_RATE: f64 = 0.001; const DEDUPER_NUM_BITS: u64 = 637_534_199; // 76MB const DEDUPER_RESET_CYCLE: Duration = Duration::from_secs(5 * 60); +// Num epochs capacity should be at least 2 because near the epoch boundary we +// may receive shreds from the other side of the epoch boundary. Because of the +// TTL based eviction it does not make sense to cache more than +// MAX_LEADER_SCHEDULE_STAKES epochs. +const_assert_eq!(CLUSTER_NODES_CACHE_NUM_EPOCH_CAP, 5); +const CLUSTER_NODES_CACHE_NUM_EPOCH_CAP: usize = MAX_LEADER_SCHEDULE_STAKES as usize; +// Because for ClusterNodes::get_retransmit_parent only pubkeys of staked nodes +// are needed, we can use longer durations for cache TTL. +const CLUSTER_NODES_CACHE_TTL: Duration = Duration::from_secs(30); + #[allow(clippy::enum_variant_names)] enum Error { RecvDisconnected, @@ -48,6 +69,10 @@ pub fn spawn_shred_sigverify( let recycler_cache = RecyclerCache::warmed(); let mut stats = ShredSigVerifyStats::new(Instant::now()); let cache = RwLock::new(LruCache::new(SIGVERIFY_LRU_CACHE_CAPACITY)); + let cluster_nodes_cache = ClusterNodesCache::::new( + CLUSTER_NODES_CACHE_NUM_EPOCH_CAP, + CLUSTER_NODES_CACHE_TTL, + ); let thread_pool = ThreadPoolBuilder::new() .num_threads(get_thread_count()) .thread_name(|i| format!("solSvrfyShred{i:02}")) @@ -66,6 +91,7 @@ pub fn spawn_shred_sigverify( match run_shred_sigverify( &thread_pool, &keypair, + &cluster_info, &bank_forks, &leader_schedule_cache, &recycler_cache, @@ -73,6 +99,7 @@ pub fn spawn_shred_sigverify( &shred_fetch_receiver, &retransmit_sender, &verified_sender, + &cluster_nodes_cache, &cache, &mut stats, ) { @@ -94,6 +121,7 @@ pub fn spawn_shred_sigverify( fn run_shred_sigverify( thread_pool: &ThreadPool, keypair: &Keypair, + cluster_info: &ClusterInfo, bank_forks: &RwLock, leader_schedule_cache: &LeaderScheduleCache, recycler_cache: &RecyclerCache, @@ -101,6 +129,7 @@ fn run_shred_sigverify( shred_fetch_receiver: &Receiver, retransmit_sender: &Sender>>, verified_sender: &Sender>, + cluster_nodes_cache: &ClusterNodesCache, cache: &RwLock, stats: &mut ShredSigVerifyStats, ) -> Result<(), Error> { @@ -128,17 +157,22 @@ fn run_shred_sigverify( .map(|packet| packet.meta_mut().set_discard(true)) .count() }); + let (working_bank, root_bank) = { + let bank_forks = bank_forks.read().unwrap(); + (bank_forks.working_bank(), bank_forks.root_bank()) + }; verify_packets( thread_pool, &keypair.pubkey(), - bank_forks, + &working_bank, leader_schedule_cache, recycler_cache, &mut packets, cache, ); stats.num_discards_post += count_discards(&packets); - // Resign shreds Merkle root as the retransmitter node. + // Verify retransmitter's signature, and resign shreds + // Merkle root as the retransmitter node. let resign_start = Instant::now(); thread_pool.install(|| { packets @@ -146,16 +180,36 @@ fn run_shred_sigverify( .flatten() .filter(|packet| !packet.meta().discard()) .for_each(|packet| { - if let Some(shred) = shred::layout::get_shred_mut(packet) { - // We can ignore Error::InvalidShredVariant because that - // basically means that the shred is of a variant which - // cannot be signed by the retransmitter node. - if !matches!( - shred::layout::resign_shred(shred, keypair), - Ok(()) | Err(shred::Error::InvalidShredVariant) - ) { - packet.meta_mut().set_discard(true); - } + let repair = packet.meta().repair(); + let Some(shred) = shred::layout::get_shred_mut(packet) else { + packet.meta_mut().set_discard(true); + return; + }; + // Repair packets do not follow turbine tree and + // are verified using the trailing nonce. + if !repair + && !verify_retransmitter_signature( + shred, + &root_bank, + &working_bank, + cluster_info, + leader_schedule_cache, + cluster_nodes_cache, + stats, + ) + { + stats + .num_invalid_retransmitter + .fetch_add(1, Ordering::Relaxed); + } + // We can ignore Error::InvalidShredVariant because that + // basically means that the shred is of a variant which + // cannot be signed by the retransmitter node. + if !matches!( + shred::layout::resign_shred(shred, keypair), + Ok(()) | Err(shred::Error::InvalidShredVariant) + ) { + packet.meta_mut().set_discard(true); } }) }); @@ -175,18 +229,64 @@ fn run_shred_sigverify( Ok(()) } +#[must_use] +fn verify_retransmitter_signature( + shred: &[u8], + root_bank: &Bank, + working_bank: &Bank, + cluster_info: &ClusterInfo, + leader_schedule_cache: &LeaderScheduleCache, + cluster_nodes_cache: &ClusterNodesCache, + stats: &ShredSigVerifyStats, +) -> bool { + let signature = match shred::layout::get_retransmitter_signature(shred) { + Ok(signature) => signature, + // If the shred is not of resigned variant, + // then there is nothing to verify. + Err(shred::Error::InvalidShredVariant) => return true, + Err(_) => return false, + }; + let Some(merkle_root) = shred::layout::get_merkle_root(shred) else { + return false; + }; + let Some(shred) = shred::layout::get_shred_id(shred) else { + return false; + }; + let Some(leader) = leader_schedule_cache.slot_leader_at(shred.slot(), Some(working_bank)) + else { + stats + .num_unknown_slot_leader + .fetch_add(1, Ordering::Relaxed); + return false; + }; + let cluster_nodes = + cluster_nodes_cache.get(shred.slot(), root_bank, working_bank, cluster_info); + let data_plane_fanout = cluster_nodes::get_data_plane_fanout(shred.slot(), root_bank); + let parent = match cluster_nodes.get_retransmit_parent(&leader, &shred, data_plane_fanout) { + Ok(Some(parent)) => parent, + Ok(None) => return true, + Err(err) => { + error!("get_retransmit_parent: {err:?}"); + stats + .num_unknown_turbine_parent + .fetch_add(1, Ordering::Relaxed); + return false; + } + }; + signature.verify(parent.as_ref(), merkle_root.as_ref()) +} + fn verify_packets( thread_pool: &ThreadPool, self_pubkey: &Pubkey, - bank_forks: &RwLock, + working_bank: &Bank, leader_schedule_cache: &LeaderScheduleCache, recycler_cache: &RecyclerCache, packets: &mut [PacketBatch], cache: &RwLock, ) { - let working_bank = bank_forks.read().unwrap().working_bank(); let leader_slots: HashMap = - get_slot_leaders(self_pubkey, packets, leader_schedule_cache, &working_bank) + get_slot_leaders(self_pubkey, packets, leader_schedule_cache, working_bank) .into_iter() .filter_map(|(slot, pubkey)| Some((slot, pubkey?))) .chain(std::iter::once((Slot::MAX, Pubkey::default()))) @@ -262,7 +362,10 @@ struct ShredSigVerifyStats { num_discards_post: usize, num_discards_pre: usize, num_duplicates: usize, + num_invalid_retransmitter: AtomicUsize, num_retransmit_shreds: usize, + num_unknown_slot_leader: AtomicUsize, + num_unknown_turbine_parent: AtomicUsize, elapsed_micros: u64, resign_micros: u64, } @@ -280,7 +383,10 @@ impl ShredSigVerifyStats { num_deduper_saturations: 0usize, num_discards_post: 0usize, num_duplicates: 0usize, + num_invalid_retransmitter: AtomicUsize::default(), num_retransmit_shreds: 0usize, + num_unknown_slot_leader: AtomicUsize::default(), + num_unknown_turbine_parent: AtomicUsize::default(), elapsed_micros: 0u64, resign_micros: 0u64, } @@ -299,7 +405,22 @@ impl ShredSigVerifyStats { ("num_deduper_saturations", self.num_deduper_saturations, i64), ("num_discards_post", self.num_discards_post, i64), ("num_duplicates", self.num_duplicates, i64), + ( + "num_invalid_retransmitter", + self.num_invalid_retransmitter.load(Ordering::Relaxed), + i64 + ), ("num_retransmit_shreds", self.num_retransmit_shreds, i64), + ( + "num_unknown_slot_leader", + self.num_unknown_slot_leader.load(Ordering::Relaxed), + i64 + ), + ( + "num_unknown_turbine_parent", + self.num_unknown_turbine_parent.load(Ordering::Relaxed), + i64 + ), ("elapsed_micros", self.elapsed_micros, i64), ("resign_micros", self.resign_micros, i64), ); @@ -365,10 +486,11 @@ mod tests { let cache = RwLock::new(LruCache::new(/*capacity:*/ 128)); let thread_pool = ThreadPoolBuilder::new().num_threads(3).build().unwrap(); + let working_bank = bank_forks.read().unwrap().working_bank(); verify_packets( &thread_pool, &Pubkey::new_unique(), // self_pubkey - &bank_forks, + &working_bank, &leader_schedule_cache, &RecyclerCache::warmed(), &mut batches, diff --git a/unified-scheduler-pool/src/lib.rs b/unified-scheduler-pool/src/lib.rs index c57217285f4762..ff3911ff806cb2 100644 --- a/unified-scheduler-pool/src/lib.rs +++ b/unified-scheduler-pool/src/lib.rs @@ -1477,7 +1477,10 @@ mod tests { system_transaction, transaction::{SanitizedTransaction, TransactionError}, }, - std::{sync::Arc, thread::JoinHandle}, + std::{ + sync::{Arc, RwLock}, + thread::JoinHandle, + }, }; #[derive(Debug)] @@ -1756,7 +1759,7 @@ mod tests { .. } = create_genesis_config(10_000); let bank = Bank::new_for_tests(&genesis_config); - let bank = setup_dummy_fork_graph(bank); + let (bank, _bank_forks) = setup_dummy_fork_graph(bank); let context = SchedulingContext::new(bank.clone()); @@ -1824,7 +1827,7 @@ mod tests { let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(10_000); let bank = Bank::new_for_tests(&genesis_config); - let bank = setup_dummy_fork_graph(bank); + let (bank, _bank_forks) = setup_dummy_fork_graph(bank); let context = SchedulingContext::new(bank.clone()); @@ -1876,7 +1879,7 @@ mod tests { .. } = create_genesis_config(10_000); let bank = Bank::new_for_tests(&genesis_config); - let bank = setup_dummy_fork_graph(bank); + let (bank, _bank_forks) = setup_dummy_fork_graph(bank); let context = SchedulingContext::new(bank.clone()); @@ -1957,7 +1960,7 @@ mod tests { )); let bank = Bank::new_for_tests(&genesis_config); - let bank = setup_dummy_fork_graph(bank); + let (bank, _bank_forks) = setup_dummy_fork_graph(bank); let ignored_prioritization_fee_cache = Arc::new(PrioritizationFeeCache::new(0u64)); let pool = SchedulerPool::, _>::new( None, @@ -2050,7 +2053,7 @@ mod tests { } = create_genesis_config(10_000); let bank = Bank::new_for_tests(&genesis_config); - let bank = setup_dummy_fork_graph(bank); + let (bank, _bank_forks) = setup_dummy_fork_graph(bank); let ignored_prioritization_fee_cache = Arc::new(PrioritizationFeeCache::new(0u64)); let pool = SchedulerPool::, _>::new( None, @@ -2197,12 +2200,12 @@ mod tests { assert!(!child_bank.has_installed_scheduler()); } - fn setup_dummy_fork_graph(bank: Bank) -> Arc { + fn setup_dummy_fork_graph(bank: Bank) -> (Arc, Arc>) { let slot = bank.slot(); let bank_fork = BankForks::new_rw_arc(bank); let bank = bank_fork.read().unwrap().get(slot).unwrap(); - bank.set_fork_graph_in_program_cache(bank_fork); - bank + bank.set_fork_graph_in_program_cache(Arc::downgrade(&bank_fork)); + (bank, bank_fork) } #[test] @@ -2221,7 +2224,7 @@ mod tests { genesis_config.hash(), )); let bank = Bank::new_for_tests(&genesis_config); - let bank = setup_dummy_fork_graph(bank); + let (bank, _bank_forks) = setup_dummy_fork_graph(bank); let ignored_prioritization_fee_cache = Arc::new(PrioritizationFeeCache::new(0u64)); let pool = DefaultSchedulerPool::new_dyn(None, None, None, None, ignored_prioritization_fee_cache); @@ -2255,7 +2258,7 @@ mod tests { .. } = create_genesis_config(10_000); let bank = Bank::new_for_tests(&genesis_config); - let bank = setup_dummy_fork_graph(bank); + let (bank, _bank_forks) = setup_dummy_fork_graph(bank); let ignored_prioritization_fee_cache = Arc::new(PrioritizationFeeCache::new(0u64)); let pool_raw = DefaultSchedulerPool::do_new( @@ -2384,7 +2387,7 @@ mod tests { let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(10_000); let bank = Bank::new_for_tests(&genesis_config); - let bank = setup_dummy_fork_graph(bank); + let (bank, _bank_forks) = setup_dummy_fork_graph(bank); // Use 2 transactions with different timings to deliberately cover the two code paths of // notifying panics in the handler threads, taken conditionally depending on whether the @@ -2466,7 +2469,7 @@ mod tests { } = create_genesis_config(10_000); let bank = Bank::new_for_tests(&genesis_config); - let bank = setup_dummy_fork_graph(bank); + let (bank, _bank_forks) = setup_dummy_fork_graph(bank); let ignored_prioritization_fee_cache = Arc::new(PrioritizationFeeCache::new(0u64)); let pool = SchedulerPool::, _>::new( None, @@ -2558,7 +2561,7 @@ mod tests { )); let bank = Bank::new_for_tests(&genesis_config); - let bank = setup_dummy_fork_graph(bank); + let (bank, _bank_forks) = setup_dummy_fork_graph(bank); let ignored_prioritization_fee_cache = Arc::new(PrioritizationFeeCache::new(0u64)); let pool = SchedulerPool::, _>::new_dyn( None, @@ -2619,7 +2622,7 @@ mod tests { // Create two banks for two contexts let bank0 = Bank::new_for_tests(&genesis_config); - let bank0 = setup_dummy_fork_graph(bank0); + let bank0 = setup_dummy_fork_graph(bank0).0; let bank1 = Arc::new(Bank::new_from_parent( bank0.clone(), &Pubkey::default(), @@ -2817,7 +2820,7 @@ mod tests { slot.checked_add(1).unwrap(), ); } - let bank = setup_dummy_fork_graph(bank); + let (bank, _bank_forks) = setup_dummy_fork_graph(bank); let context = SchedulingContext::new(bank.clone()); let ignored_prioritization_fee_cache = Arc::new(PrioritizationFeeCache::new(0u64)); @@ -2888,7 +2891,7 @@ mod tests { .. } = create_genesis_config(10_000); let bank = Bank::new_for_tests(&genesis_config); - let bank = &setup_dummy_fork_graph(bank); + let (bank, _bank_forks) = &setup_dummy_fork_graph(bank); let mut tx = system_transaction::transfer( mint_keypair, diff --git a/validator/src/cli.rs b/validator/src/cli.rs index 2046651652ea58..d2b70583d20592 100644 --- a/validator/src/cli.rs +++ b/validator/src/cli.rs @@ -72,8 +72,10 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> { return App::new(crate_name!()) .about(crate_description!()) .version(version) - .setting(AppSettings::VersionlessSubcommands) - .setting(AppSettings::InferSubcommands) + .global_setting(AppSettings::ColoredHelp) + .global_setting(AppSettings::InferSubcommands) + .global_setting(AppSettings::UnifiedHelpMessage) + .global_setting(AppSettings::VersionlessSubcommands) .arg( Arg::with_name(SKIP_SEED_PHRASE_VALIDATION_ARG.name) .long(SKIP_SEED_PHRASE_VALIDATION_ARG.long) @@ -499,20 +501,21 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> { .long("no-incremental-snapshots") .takes_value(false) .help("Disable incremental snapshots") - .long_help( - "Disable incremental snapshots by setting this flag. When enabled, \ - --snapshot-interval-slots will set the incremental snapshot interval. To set \ - the full snapshot interval, use --full-snapshot-interval-slots.", - ), ) .arg( - Arg::with_name("incremental_snapshot_interval_slots") - .long("incremental-snapshot-interval-slots") - .alias("snapshot-interval-slots") + Arg::with_name("snapshot_interval_slots") + .long("snapshot-interval-slots") + .alias("incremental-snapshot-interval-slots") .value_name("NUMBER") .takes_value(true) .default_value(&default_args.incremental_snapshot_archive_interval_slots) - .help("Number of slots between generating snapshots, 0 to disable snapshots"), + .help("Number of slots between generating snapshots") + .long_help( + "Number of slots between generating snapshots. \ + If incremental snapshots are enabled, this sets the incremental snapshot interval. \ + If incremental snapshots are disabled, this sets the full snapshot interval. \ + Setting this to 0 disables all snapshots.", + ), ) .arg( Arg::with_name("full_snapshot_interval_slots") @@ -520,9 +523,10 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> { .value_name("NUMBER") .takes_value(true) .default_value(&default_args.full_snapshot_archive_interval_slots) - .help( + .help("Number of slots between generating full snapshots") + .long_help( "Number of slots between generating full snapshots. Must be a multiple of the \ - incremental snapshot interval.", + incremental snapshot interval. Only used when incremental snapshots are enabled.", ), ) .arg( @@ -2027,27 +2031,6 @@ fn deprecated_arguments() -> Vec { .long("enable-quic-servers"), usage_warning: "The quic server is now enabled by default.", ); - add_arg!( - Arg::with_name("halt_on_known_validators_accounts_hash_mismatch") - .alias("halt-on-trusted-validators-accounts-hash-mismatch") - .long("halt-on-known-validators-accounts-hash-mismatch") - .requires("known_validators") - .takes_value(false) - .help( - "Abort the validator if a bank hash mismatch is detected within known validator \ - set" - ), - ); - add_arg!(Arg::with_name("incremental_snapshots") - .long("incremental-snapshots") - .takes_value(false) - .conflicts_with("no_incremental_snapshots") - .help("Enable incremental snapshots") - .long_help( - "Enable incremental snapshots by setting this flag. When enabled, \ - --snapshot-interval-slots will set the incremental snapshot interval. To set the \ - full snapshot interval, use --full-snapshot-interval-slots.", - )); add_arg!(Arg::with_name("minimal_rpc_api") .long("minimal-rpc-api") .takes_value(false) diff --git a/validator/src/main.rs b/validator/src/main.rs index 321f31fe13d917..2301e2e4096959 100644 --- a/validator/src/main.rs +++ b/validator/src/main.rs @@ -1651,27 +1651,42 @@ pub fn main() { }) }); - let incremental_snapshot_interval_slots = - value_t_or_exit!(matches, "incremental_snapshot_interval_slots", u64); - let (full_snapshot_archive_interval_slots, incremental_snapshot_archive_interval_slots) = - if incremental_snapshot_interval_slots > 0 { - if !matches.is_present("no_incremental_snapshots") { - ( - value_t_or_exit!(matches, "full_snapshot_interval_slots", u64), - incremental_snapshot_interval_slots, - ) - } else { - ( - incremental_snapshot_interval_slots, - DISABLED_SNAPSHOT_ARCHIVE_INTERVAL, - ) - } - } else { + let (full_snapshot_archive_interval_slots, incremental_snapshot_archive_interval_slots) = match ( + !matches.is_present("no_incremental_snapshots"), + value_t_or_exit!(matches, "snapshot_interval_slots", u64), + ) { + (_, 0) => { + // snapshots are disabled ( DISABLED_SNAPSHOT_ARCHIVE_INTERVAL, DISABLED_SNAPSHOT_ARCHIVE_INTERVAL, ) - }; + } + (true, incremental_snapshot_interval_slots) => { + // incremental snapshots are enabled + // use --snapshot-interval-slots for the incremental snapshot interval + ( + value_t_or_exit!(matches, "full_snapshot_interval_slots", u64), + incremental_snapshot_interval_slots, + ) + } + (false, full_snapshot_interval_slots) => { + // incremental snapshots are *disabled* + // use --snapshot-interval-slots for the *full* snapshot interval + // also warn if --full-snapshot-interval-slots was specified + if matches.occurrences_of("full_snapshot_interval_slots") > 0 { + warn!( + "Incremental snapshots are disabled, yet --full-snapshot-interval-slots was specified! \ + Note that --full-snapshot-interval-slots is *ignored* when incremental snapshots are disabled. \ + Use --snapshot-interval-slots instead.", + ); + } + ( + full_snapshot_interval_slots, + DISABLED_SNAPSHOT_ARCHIVE_INTERVAL, + ) + } + }; validator_config.snapshot_config = SnapshotConfig { usage: if full_snapshot_archive_interval_slots == DISABLED_SNAPSHOT_ARCHIVE_INTERVAL { @@ -1698,29 +1713,30 @@ pub fn main() { incremental_snapshot_archive_interval_slots, ); + info!( + "Snapshot configuration: full snapshot interval: {} slots, incremental snapshot interval: {} slots", + if full_snapshot_archive_interval_slots == DISABLED_SNAPSHOT_ARCHIVE_INTERVAL { + "disabled".to_string() + } else { + full_snapshot_archive_interval_slots.to_string() + }, + if incremental_snapshot_archive_interval_slots == DISABLED_SNAPSHOT_ARCHIVE_INTERVAL { + "disabled".to_string() + } else { + incremental_snapshot_archive_interval_slots.to_string() + }, + ); + if !is_snapshot_config_valid( &validator_config.snapshot_config, validator_config.accounts_hash_interval_slots, ) { eprintln!( "Invalid snapshot configuration provided: snapshot intervals are incompatible. \ - \n\t- full snapshot interval MUST be a multiple of incremental snapshot interval (if \ - enabled)\ - \n\t- full snapshot interval MUST be larger than incremental snapshot \ - interval (if enabled)\ - \nSnapshot configuration values:\ - \n\tfull snapshot interval: {}\ - \n\tincremental snapshot interval: {}", - if full_snapshot_archive_interval_slots == DISABLED_SNAPSHOT_ARCHIVE_INTERVAL { - "disabled".to_string() - } else { - full_snapshot_archive_interval_slots.to_string() - }, - if incremental_snapshot_archive_interval_slots == DISABLED_SNAPSHOT_ARCHIVE_INTERVAL { - "disabled".to_string() - } else { - incremental_snapshot_archive_interval_slots.to_string() - }, + \n\t- full snapshot interval MUST be a multiple of incremental snapshot interval \ + (if enabled) \ + \n\t- full snapshot interval MUST be larger than incremental snapshot interval \ + (if enabled)", ); exit(1); }