diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
new file mode 100644
index 00000000000000..e01f5318e40257
--- /dev/null
+++ b/.github/CODEOWNERS
@@ -0,0 +1 @@
+* @anza-xyz/backport-reviewers
diff --git a/.github/scripts/downstream-project-spl-common.sh b/.github/scripts/downstream-project-spl-common.sh
index 0bfff86dcca2df..779af8f2568110 100644
--- a/.github/scripts/downstream-project-spl-common.sh
+++ b/.github/scripts/downstream-project-spl-common.sh
@@ -19,6 +19,7 @@ project_used_solana_version=$(sed -nE 's/solana-sdk = \"[>=<~]*(.*)\"/\1/p' <"to
echo "used solana version: $project_used_solana_version"
if semverGT "$project_used_solana_version" "$SOLANA_VER"; then
echo "skip"
+ export SKIP_SPL_DOWNSTREAM_PROJECT_TEST=1
return
fi
diff --git a/.github/workflows/client-targets.yml b/.github/workflows/client-targets.yml
index 848d10f85089e2..1a33d2ae59493c 100644
--- a/.github/workflows/client-targets.yml
+++ b/.github/workflows/client-targets.yml
@@ -47,7 +47,7 @@ jobs:
strategy:
matrix:
os:
- - macos-11
+ - macos-12
target:
- aarch64-apple-ios
- x86_64-apple-ios
diff --git a/.github/workflows/downstream-project-spl.yml b/.github/workflows/downstream-project-spl.yml
index d875afbd4a9c56..8d3baf25949e99 100644
--- a/.github/workflows/downstream-project-spl.yml
+++ b/.github/workflows/downstream-project-spl.yml
@@ -55,6 +55,10 @@ jobs:
run: |
source .github/scripts/downstream-project-spl-install-deps.sh
source .github/scripts/downstream-project-spl-common.sh
+ if [ -n "$SKIP_SPL_DOWNSTREAM_PROJECT_TEST" ]; then
+ exit 0
+ fi
+
cargo check
test:
@@ -103,6 +107,9 @@ jobs:
run: |
source .github/scripts/downstream-project-spl-install-deps.sh
source .github/scripts/downstream-project-spl-common.sh
+ if [ -n "$SKIP_SPL_DOWNSTREAM_PROJECT_TEST" ]; then
+ exit 0
+ fi
programStr="${{ tojson(matrix.arrays.required_programs) }}"
IFS=', ' read -ra programs <<<"${programStr//[\[\]$'\n'$'\r' ]/}"
@@ -154,6 +161,9 @@ jobs:
run: |
source .github/scripts/downstream-project-spl-install-deps.sh
source .github/scripts/downstream-project-spl-common.sh
+ if [ -n "$SKIP_SPL_DOWNSTREAM_PROJECT_TEST" ]; then
+ exit 0
+ fi
programStr="${{ tojson(matrix.programs) }}"
IFS=', ' read -ra programs <<<"${programStr//[\[\]$'\n'$'\r' ]/}"
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 102aa724f7e32d..c8d5c088ca3382 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,14 +8,28 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
and follows a [Backwards Compatibility Policy](https://docs.solanalabs.com/backwards-compatibility)
Release channels have their own copy of this changelog:
-* [edge - v2.0](#edge-channel)
-* [beta - v1.18](https://github.com/solana-labs/solana/blob/v1.18/CHANGELOG.md)
-* [stable - v1.17](https://github.com/solana-labs/solana/blob/v1.17/CHANGELOG.md)
+* [edge - v2.1](#edge-channel)
+* [beta - v2.0](https://github.com/solana-labs/solana/blob/v2.0/CHANGELOG.md)
+* [stable - v1.18](https://github.com/solana-labs/solana/blob/v1.18/CHANGELOG.md)
-## [2.0.0] - Unreleased
+## [2.1.0] - Unreleased
+
+## [2.0.0]
* Breaking
- * SDK: Support for Borsh v0.9 removed, please use v1 or v0.10 (#1440)
+ * SDK:
+ * Support for Borsh v0.9 removed, please use v1 or v0.10 (#1440)
+ * `Copy` is no longer derived on `Rent` and `EpochSchedule`, please switch to using `clone()` (solana-labs#32767)
+ * `solana-sdk`: deprecated symbols removed
+ * `solana-program`: deprecated symbols removed
+ * RPC: obsolete and deprecated v1 endpoints are removed. These endpoints are:
+ confirmTransaction, getSignatureStatus, getSignatureConfirmation, getTotalSupply,
+ 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
* 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
@@ -25,6 +39,16 @@ Release channels have their own copy of this changelog:
when the `replaceRecentBlockhash` config param is `true` (#380)
* SDK: `cargo test-sbf` accepts `--tools-version`, just like `build-sbf` (#1359)
* CLI: Can specify `--full-snapshot-archive-path` (#1631)
+ * transaction-status: The SPL Token `amountToUiAmount` instruction parses the amount into a string instead of a number (#1737)
+ * Implemented partitioned epoch rewards as per [SIMD-0118](https://github.com/solana-foundation/solana-improvement-documents/blob/fae25d5a950f43bd787f1f5d75897ef1fdd425a7/proposals/0118-partitioned-epoch-reward-distribution.md). Feature gate: #426. Specific changes include:
+ * EpochRewards sysvar expanded and made persistent (#428, #572)
+ * Stake Program credits now allowed during distribution (#631)
+ * Updated type in Bank::epoch_rewards_status (#1277)
+ * Partitions are recalculated on boot from snapshot (#1159)
+ * `epoch_rewards_status` removed from snapshot (#1274)
+ * Added `unified-scheduler` option for `--block-verification-method` (#1668)
+ * Deprecate the `fifo` option for `--rocksdb-shred-compaction` (#1882)
+ * `fifo` will remain supported in v2.0 with plans to fully remove in v2.1
## [1.18.0]
* Changes
diff --git a/Cargo.lock b/Cargo.lock
index e1c869720b7747..af027b270249ee 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -65,7 +65,7 @@ dependencies = [
[[package]]
name = "agave-accounts-hash-cache-tool"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bytemuck",
"clap 2.34.0",
@@ -75,7 +75,7 @@ dependencies = [
[[package]]
name = "agave-cargo-registry"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"clap 2.34.0",
"flate2",
@@ -105,7 +105,7 @@ dependencies = [
[[package]]
name = "agave-geyser-plugin-interface"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"log",
"solana-sdk",
@@ -115,7 +115,7 @@ dependencies = [
[[package]]
name = "agave-install"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"atty",
"bincode",
@@ -151,7 +151,7 @@ dependencies = [
[[package]]
name = "agave-ledger-tool"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_cmd",
"bs58",
@@ -194,6 +194,7 @@ dependencies = [
"solana-storage-bigtable",
"solana-streamer",
"solana-transaction-status",
+ "solana-type-overrides",
"solana-unified-scheduler-pool",
"solana-version",
"solana-vote-program",
@@ -205,7 +206,7 @@ dependencies = [
[[package]]
name = "agave-store-tool"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"clap 2.34.0",
"solana-accounts-db",
@@ -215,7 +216,7 @@ dependencies = [
[[package]]
name = "agave-validator"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"agave-geyser-plugin-interface",
"chrono",
@@ -283,7 +284,7 @@ dependencies = [
[[package]]
name = "agave-watchtower"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"clap 2.34.0",
"humantime",
@@ -626,6 +627,12 @@ version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9"
+[[package]]
+name = "assoc"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfdc70193dadb9d7287fa4b633f15f90c876915b31f6af17da307fc59c9859a8"
+
[[package]]
name = "async-channel"
version = "1.9.0"
@@ -679,18 +686,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
name = "async-trait"
-version = "0.1.80"
+version = "0.1.81"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca"
+checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -843,7 +850,7 @@ dependencies = [
"regex",
"rustc-hash",
"shlex",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -885,6 +892,18 @@ dependencies = [
"typenum",
]
+[[package]]
+name = "bitvec"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c"
+dependencies = [
+ "funty",
+ "radium",
+ "tap",
+ "wyz",
+]
+
[[package]]
name = "blake3"
version = "1.5.1"
@@ -967,7 +986,7 @@ dependencies = [
"proc-macro-crate 3.1.0",
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
"syn_derive",
]
@@ -1083,7 +1102,7 @@ checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -1094,9 +1113,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "bytes"
-version = "1.6.0"
+version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9"
+checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952"
[[package]]
name = "bytesize"
@@ -1184,13 +1203,12 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
[[package]]
name = "cc"
-version = "1.0.99"
+version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695"
+checksum = "324c74f2155653c90b04f25b2a47a8a631360cb908f92a772695f430c7e31052"
dependencies = [
"jobserver",
"libc",
- "once_cell",
]
[[package]]
@@ -1238,7 +1256,7 @@ dependencies = [
"num-traits",
"serde",
"wasm-bindgen",
- "windows-targets 0.52.5",
+ "windows-targets 0.52.6",
]
[[package]]
@@ -1332,18 +1350,18 @@ dependencies = [
[[package]]
name = "clap"
-version = "4.5.7"
+version = "4.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f"
+checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462"
dependencies = [
"clap_builder",
]
[[package]]
name = "clap_builder"
-version = "4.5.7"
+version = "4.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f"
+checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942"
dependencies = [
"anstyle",
"clap_lex 0.7.1",
@@ -1519,7 +1537,7 @@ dependencies = [
"anes",
"cast 0.3.0",
"ciborium",
- "clap 4.5.7",
+ "clap 4.5.9",
"criterion-plot",
"is-terminal",
"itertools 0.10.5",
@@ -1675,9 +1693,9 @@ dependencies = [
[[package]]
name = "darling"
-version = "0.20.9"
+version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1"
+checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989"
dependencies = [
"darling_core",
"darling_macro",
@@ -1685,27 +1703,27 @@ dependencies = [
[[package]]
name = "darling_core"
-version = "0.20.9"
+version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120"
+checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5"
dependencies = [
"fnv",
"ident_case",
"proc-macro2",
"quote",
"strsim 0.11.1",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
name = "darling_macro"
-version = "0.20.9"
+version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178"
+checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
dependencies = [
"darling_core",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -1776,7 +1794,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -1789,7 +1807,7 @@ dependencies = [
"proc-macro2",
"quote",
"rustc_version",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -1868,7 +1886,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -1891,7 +1909,7 @@ checksum = "a6cbae11b3de8fce2a456e8ea3dada226b35fe791f0dc1d360c0941f0bb681f3"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -1997,7 +2015,7 @@ checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -2010,7 +2028,7 @@ dependencies = [
"num-traits",
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -2192,6 +2210,12 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
+[[package]]
+name = "funty"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c"
+
[[package]]
name = "futures"
version = "0.1.31"
@@ -2255,7 +2279,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -2315,7 +2339,7 @@ dependencies = [
[[package]]
name = "gen-headers"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"log",
"regex",
@@ -2323,11 +2347,25 @@ dependencies = [
[[package]]
name = "gen-syscall-list"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"regex",
]
+[[package]]
+name = "generator"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "186014d53bc231d0090ef8d6f03e0920c54d85a5ed22f4f2f74315ec56cf83fb"
+dependencies = [
+ "cc",
+ "cfg-if 1.0.0",
+ "libc",
+ "log",
+ "rustversion",
+ "windows",
+]
+
[[package]]
name = "generic-array"
version = "0.14.7"
@@ -2647,9 +2685,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "hyper"
-version = "0.14.29"
+version = "0.14.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33"
+checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9"
dependencies = [
"bytes",
"futures-channel",
@@ -2737,7 +2775,7 @@ dependencies = [
"iana-time-zone-haiku",
"js-sys",
"wasm-bindgen",
- "windows-core",
+ "windows-core 0.52.0",
]
[[package]]
@@ -2819,9 +2857,9 @@ dependencies = [
[[package]]
name = "index_list"
-version = "0.2.11"
+version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70891286cb8e844fdfcf1178b47569699f9e20b5ecc4b45a6240a64771444638"
+checksum = "2cb725b6505e51229de32027e0cfcd9db29da4d89156f9747b0a5195643fa3e1"
[[package]]
name = "indexmap"
@@ -3128,7 +3166,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d"
dependencies = [
"cfg-if 1.0.0",
- "windows-targets 0.52.5",
+ "windows-targets 0.52.6",
]
[[package]]
@@ -3342,9 +3380,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
[[package]]
name = "mime_guess"
-version = "2.0.4"
+version = "2.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef"
+checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e"
dependencies = [
"mime",
"unicase",
@@ -3552,7 +3590,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -3625,7 +3663,7 @@ dependencies = [
"proc-macro-crate 3.1.0",
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -3636,9 +3674,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
[[package]]
name = "object"
-version = "0.36.0"
+version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434"
+checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce"
dependencies = [
"memchr",
]
@@ -3660,9 +3698,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
[[package]]
name = "oorandom"
-version = "11.1.3"
+version = "11.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575"
+checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9"
[[package]]
name = "opaque-debug"
@@ -3693,7 +3731,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -3749,6 +3787,12 @@ version = "6.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1"
+[[package]]
+name = "owo-colors"
+version = "3.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f"
+
[[package]]
name = "parity-tokio-ipc"
version = "0.9.0"
@@ -3806,9 +3850,9 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
dependencies = [
"cfg-if 1.0.0",
"libc",
- "redox_syscall 0.5.2",
+ "redox_syscall 0.5.3",
"smallvec",
- "windows-targets 0.52.5",
+ "windows-targets 0.52.6",
]
[[package]]
@@ -3867,9 +3911,9 @@ dependencies = [
[[package]]
name = "pest"
-version = "2.7.10"
+version = "2.7.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8"
+checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95"
dependencies = [
"memchr",
"thiserror",
@@ -3878,9 +3922,9 @@ dependencies = [
[[package]]
name = "pest_derive"
-version = "2.7.10"
+version = "2.7.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26293c9193fbca7b1a3bf9b79dc1e388e927e6cacaa78b4a3ab705a1d3d41459"
+checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a"
dependencies = [
"pest",
"pest_generator",
@@ -3888,22 +3932,22 @@ dependencies = [
[[package]]
name = "pest_generator"
-version = "2.7.10"
+version = "2.7.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ec22af7d3fb470a85dd2ca96b7c577a1eb4ef6f1683a9fe9a8c16e136c04687"
+checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183"
dependencies = [
"pest",
"pest_meta",
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
name = "pest_meta"
-version = "2.7.10"
+version = "2.7.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7a240022f37c361ec1878d646fc5b7d7c4d28d5946e1a80ad5a7a4f4ca0bdcd"
+checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f"
dependencies = [
"once_cell",
"pest",
@@ -3947,7 +3991,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -4222,7 +4266,7 @@ dependencies = [
[[package]]
name = "proto"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"protobuf-src",
"tonic-build",
@@ -4254,7 +4298,7 @@ checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -4320,6 +4364,12 @@ dependencies = [
"proc-macro2",
]
+[[package]]
+name = "radium"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09"
+
[[package]]
name = "rand"
version = "0.4.6"
@@ -4419,6 +4469,15 @@ dependencies = [
"rand_core 0.5.1",
]
+[[package]]
+name = "rand_pcg"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e"
+dependencies = [
+ "rand_core 0.6.4",
+]
+
[[package]]
name = "rand_xorshift"
version = "0.3.0"
@@ -4459,7 +4518,7 @@ dependencies = [
[[package]]
name = "rbpf-cli"
-version = "2.0.0"
+version = "2.0.2"
[[package]]
name = "rdrand"
@@ -4490,9 +4549,9 @@ dependencies = [
[[package]]
name = "redox_syscall"
-version = "0.5.2"
+version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd"
+checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4"
dependencies = [
"bitflags 2.6.0",
]
@@ -4812,6 +4871,12 @@ dependencies = [
"windows-sys 0.52.0",
]
+[[package]]
+name = "scoped-tls"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"
+
[[package]]
name = "scopeguard"
version = "1.2.0"
@@ -4835,7 +4900,7 @@ checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -4850,9 +4915,9 @@ dependencies = [
[[package]]
name = "security-framework"
-version = "2.11.0"
+version = "2.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0"
+checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
dependencies = [
"bitflags 2.6.0",
"core-foundation",
@@ -4863,9 +4928,9 @@ dependencies = [
[[package]]
name = "security-framework-sys"
-version = "2.11.0"
+version = "2.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7"
+checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf"
dependencies = [
"core-foundation-sys",
"libc",
@@ -4891,9 +4956,9 @@ dependencies = [
[[package]]
name = "serde"
-version = "1.0.203"
+version = "1.0.204"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094"
+checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12"
dependencies = [
"serde_derive",
]
@@ -4909,20 +4974,20 @@ dependencies = [
[[package]]
name = "serde_derive"
-version = "1.0.203"
+version = "1.0.204"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba"
+checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
name = "serde_json"
-version = "1.0.118"
+version = "1.0.120"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d947f6b3163d8857ea16c4fa0dd4840d52f3041039a85decd46867eb1abef2e4"
+checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5"
dependencies = [
"itoa",
"ryu",
@@ -4969,7 +5034,7 @@ dependencies = [
"darling",
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -5019,7 +5084,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -5113,6 +5178,25 @@ version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+[[package]]
+name = "shuttle"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2d9a8db61a44e2b663f169a08206a789bcbd22ba32011e14951562848e7b9c98"
+dependencies = [
+ "assoc",
+ "bitvec",
+ "generator",
+ "hex",
+ "owo-colors",
+ "rand 0.8.5",
+ "rand_core 0.6.4",
+ "rand_pcg",
+ "scoped-tls",
+ "smallvec",
+ "tracing",
+]
+
[[package]]
name = "signal-hook"
version = "0.3.17"
@@ -5228,7 +5312,7 @@ dependencies = [
[[package]]
name = "solana-account-decoder"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"Inflector",
"assert_matches",
@@ -5252,7 +5336,7 @@ dependencies = [
[[package]]
name = "solana-accounts-bench"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"clap 2.34.0",
"log",
@@ -5266,7 +5350,7 @@ dependencies = [
[[package]]
name = "solana-accounts-cluster-bench"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"clap 2.34.0",
"log",
@@ -5297,13 +5381,14 @@ dependencies = [
[[package]]
name = "solana-accounts-db"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"bincode",
"blake3",
"bv",
"bytemuck",
+ "bytemuck_derive",
"criterion",
"crossbeam-channel",
"dashmap",
@@ -5331,6 +5416,7 @@ dependencies = [
"smallvec",
"solana-accounts-db",
"solana-bucket-map",
+ "solana-compute-budget",
"solana-frozen-abi",
"solana-frozen-abi-macro",
"solana-inline-spl",
@@ -5352,7 +5438,7 @@ dependencies = [
[[package]]
name = "solana-address-lookup-table-program"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bincode",
"bytemuck",
@@ -5368,7 +5454,7 @@ dependencies = [
[[package]]
name = "solana-address-lookup-table-program-tests"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"bincode",
@@ -5379,7 +5465,7 @@ dependencies = [
[[package]]
name = "solana-banking-bench"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"clap 3.2.25",
"crossbeam-channel",
@@ -5403,7 +5489,7 @@ dependencies = [
[[package]]
name = "solana-banks-client"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"borsh 1.5.1",
"futures 0.3.30",
@@ -5420,7 +5506,7 @@ dependencies = [
[[package]]
name = "solana-banks-interface"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"serde",
"serde_derive",
@@ -5430,7 +5516,7 @@ dependencies = [
[[package]]
name = "solana-banks-server"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bincode",
"crossbeam-channel",
@@ -5448,7 +5534,7 @@ dependencies = [
[[package]]
name = "solana-bench-streamer"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"clap 3.2.25",
"crossbeam-channel",
@@ -5459,7 +5545,7 @@ dependencies = [
[[package]]
name = "solana-bench-tps"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"chrono",
"clap 2.34.0",
@@ -5505,7 +5591,7 @@ dependencies = [
[[package]]
name = "solana-bloom"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bv",
"fnv",
@@ -5522,7 +5608,7 @@ dependencies = [
[[package]]
name = "solana-bpf-loader-program"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"bincode",
@@ -5533,12 +5619,13 @@ dependencies = [
"rand 0.8.5",
"scopeguard",
"solana-compute-budget",
+ "solana-curve25519",
"solana-measure",
"solana-poseidon",
"solana-program-runtime",
"solana-sdk",
+ "solana-type-overrides",
"solana-vote",
- "solana-zk-token-sdk",
"solana_rbpf",
"test-case",
"thiserror",
@@ -5546,7 +5633,7 @@ dependencies = [
[[package]]
name = "solana-bpf-loader-program-tests"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"bincode",
@@ -5557,10 +5644,11 @@ dependencies = [
[[package]]
name = "solana-bucket-map"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bv",
"bytemuck",
+ "bytemuck_derive",
"fs_extra",
"log",
"memmap2",
@@ -5576,7 +5664,7 @@ dependencies = [
[[package]]
name = "solana-cargo-build-bpf"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"log",
"solana-logger",
@@ -5584,7 +5672,7 @@ dependencies = [
[[package]]
name = "solana-cargo-build-sbf"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_cmd",
"bzip2",
@@ -5605,11 +5693,11 @@ dependencies = [
[[package]]
name = "solana-cargo-test-bpf"
-version = "2.0.0"
+version = "2.0.2"
[[package]]
name = "solana-cargo-test-sbf"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"cargo_metadata",
"clap 3.2.25",
@@ -5621,7 +5709,7 @@ dependencies = [
[[package]]
name = "solana-clap-utils"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"chrono",
@@ -5638,7 +5726,7 @@ dependencies = [
[[package]]
name = "solana-clap-v3-utils"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"chrono",
@@ -5656,7 +5744,7 @@ dependencies = [
[[package]]
name = "solana-cli"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"bincode",
@@ -5715,7 +5803,7 @@ dependencies = [
[[package]]
name = "solana-cli-config"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"anyhow",
"dirs-next",
@@ -5730,7 +5818,7 @@ dependencies = [
[[package]]
name = "solana-cli-output"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"Inflector",
"base64 0.22.1",
@@ -5756,7 +5844,7 @@ dependencies = [
[[package]]
name = "solana-client"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"async-trait",
"bincode",
@@ -5788,7 +5876,7 @@ dependencies = [
[[package]]
name = "solana-client-test"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"futures-util",
"rand 0.8.5",
@@ -5818,7 +5906,7 @@ dependencies = [
[[package]]
name = "solana-compute-budget"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"rustc_version",
"solana-frozen-abi",
@@ -5827,7 +5915,7 @@ dependencies = [
[[package]]
name = "solana-compute-budget-program"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"solana-program-runtime",
"solana-sdk",
@@ -5835,7 +5923,7 @@ dependencies = [
[[package]]
name = "solana-config-program"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bincode",
"chrono",
@@ -5848,7 +5936,7 @@ dependencies = [
[[package]]
name = "solana-connection-cache"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"async-trait",
"bincode",
@@ -5871,7 +5959,7 @@ dependencies = [
[[package]]
name = "solana-core"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"ahash 0.8.11",
"assert_matches",
@@ -5910,6 +5998,7 @@ dependencies = [
"solana-bloom",
"solana-client",
"solana-compute-budget",
+ "solana-connection-cache",
"solana-core",
"solana-cost-model",
"solana-entry",
@@ -5958,7 +6047,7 @@ dependencies = [
[[package]]
name = "solana-cost-model"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"ahash 0.8.11",
"itertools 0.12.1",
@@ -5982,9 +6071,20 @@ dependencies = [
"test-case",
]
+[[package]]
+name = "solana-curve25519"
+version = "2.0.2"
+dependencies = [
+ "bytemuck",
+ "bytemuck_derive",
+ "curve25519-dalek",
+ "solana-program",
+ "thiserror",
+]
+
[[package]]
name = "solana-dos"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bincode",
"clap 3.2.25",
@@ -5995,6 +6095,7 @@ dependencies = [
"serde",
"solana-bench-tps",
"solana-client",
+ "solana-connection-cache",
"solana-core",
"solana-faucet",
"solana-gossip",
@@ -6016,7 +6117,7 @@ dependencies = [
[[package]]
name = "solana-download-utils"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"console",
"indicatif",
@@ -6028,7 +6129,7 @@ dependencies = [
[[package]]
name = "solana-ed25519-program-tests"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"ed25519-dalek",
@@ -6039,7 +6140,7 @@ dependencies = [
[[package]]
name = "solana-entry"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"bincode",
@@ -6061,7 +6162,7 @@ dependencies = [
[[package]]
name = "solana-faucet"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bincode",
"byteorder",
@@ -6083,7 +6184,7 @@ dependencies = [
[[package]]
name = "solana-frozen-abi"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bitflags 2.6.0",
"bs58",
@@ -6104,17 +6205,17 @@ dependencies = [
[[package]]
name = "solana-frozen-abi-macro"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"proc-macro2",
"quote",
"rustc_version",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
name = "solana-genesis"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"base64 0.22.1",
"bincode",
@@ -6139,7 +6240,7 @@ dependencies = [
[[package]]
name = "solana-genesis-utils"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"log",
"solana-accounts-db",
@@ -6150,7 +6251,7 @@ dependencies = [
[[package]]
name = "solana-geyser-plugin-manager"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"agave-geyser-plugin-interface",
"bs58",
@@ -6175,7 +6276,7 @@ dependencies = [
[[package]]
name = "solana-gossip"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"bincode",
@@ -6226,7 +6327,7 @@ dependencies = [
[[package]]
name = "solana-inline-spl"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bytemuck",
"rustc_version",
@@ -6235,7 +6336,7 @@ dependencies = [
[[package]]
name = "solana-keygen"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bs58",
"clap 3.2.25",
@@ -6252,7 +6353,7 @@ dependencies = [
[[package]]
name = "solana-ledger"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"bincode",
@@ -6324,7 +6425,7 @@ dependencies = [
[[package]]
name = "solana-loader-v4-program"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bincode",
"log",
@@ -6332,12 +6433,13 @@ dependencies = [
"solana-measure",
"solana-program-runtime",
"solana-sdk",
+ "solana-type-overrides",
"solana_rbpf",
]
[[package]]
name = "solana-local-cluster"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"crossbeam-channel",
@@ -6356,6 +6458,7 @@ dependencies = [
"solana-entry",
"solana-gossip",
"solana-ledger",
+ "solana-local-cluster",
"solana-logger",
"solana-pubsub-client",
"solana-quic-client",
@@ -6377,7 +6480,7 @@ dependencies = [
[[package]]
name = "solana-log-analyzer"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"byte-unit",
"clap 3.2.25",
@@ -6389,7 +6492,7 @@ dependencies = [
[[package]]
name = "solana-logger"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"env_logger",
"lazy_static",
@@ -6398,7 +6501,7 @@ dependencies = [
[[package]]
name = "solana-measure"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"log",
"solana-sdk",
@@ -6406,11 +6509,11 @@ dependencies = [
[[package]]
name = "solana-memory-management"
-version = "2.0.0"
+version = "2.0.2"
[[package]]
name = "solana-merkle-root-bench"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"clap 2.34.0",
"log",
@@ -6423,7 +6526,7 @@ dependencies = [
[[package]]
name = "solana-merkle-tree"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"fast-math",
"hex",
@@ -6432,7 +6535,7 @@ dependencies = [
[[package]]
name = "solana-metrics"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"crossbeam-channel",
"env_logger",
@@ -6448,7 +6551,7 @@ dependencies = [
[[package]]
name = "solana-net-shaper"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"clap 3.2.25",
"rand 0.8.5",
@@ -6460,7 +6563,7 @@ dependencies = [
[[package]]
name = "solana-net-utils"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bincode",
"clap 3.2.25",
@@ -6487,7 +6590,7 @@ checksum = "8b8a731ed60e89177c8a7ab05fe0f1511cedd3e70e773f288f9de33a9cfdc21e"
[[package]]
name = "solana-notifier"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"log",
"reqwest",
@@ -6497,17 +6600,17 @@ dependencies = [
[[package]]
name = "solana-package-metadata-macro"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
"toml 0.8.14",
]
[[package]]
name = "solana-perf"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"ahash 0.8.11",
"assert_matches",
@@ -6537,7 +6640,7 @@ dependencies = [
[[package]]
name = "solana-poh"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"bincode",
@@ -6559,7 +6662,7 @@ dependencies = [
[[package]]
name = "solana-poh-bench"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"clap 3.2.25",
"log",
@@ -6575,7 +6678,7 @@ dependencies = [
[[package]]
name = "solana-poseidon"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"ark-bn254",
"light-poseidon",
@@ -6584,7 +6687,7 @@ dependencies = [
[[package]]
name = "solana-program"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"anyhow",
"arbitrary",
@@ -6603,7 +6706,7 @@ dependencies = [
"bs58",
"bv",
"bytemuck",
- "cc",
+ "bytemuck_derive",
"console_error_panic_hook",
"console_log",
"curve25519-dalek",
@@ -6618,6 +6721,7 @@ dependencies = [
"num-derive",
"num-traits",
"parking_lot 0.12.3",
+ "qualifier_attr",
"rand 0.8.5",
"rustc_version",
"rustversion",
@@ -6638,7 +6742,7 @@ dependencies = [
[[package]]
name = "solana-program-runtime"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"base64 0.22.1",
@@ -6660,6 +6764,7 @@ dependencies = [
"solana-logger",
"solana-measure",
"solana-sdk",
+ "solana-type-overrides",
"solana-vote",
"solana_rbpf",
"test-case",
@@ -6668,7 +6773,7 @@ dependencies = [
[[package]]
name = "solana-program-test"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"async-trait",
@@ -6700,7 +6805,7 @@ dependencies = [
[[package]]
name = "solana-pubsub-client"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"anyhow",
"crossbeam-channel",
@@ -6724,7 +6829,7 @@ dependencies = [
[[package]]
name = "solana-quic-client"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"async-mutex",
"async-trait",
@@ -6751,7 +6856,7 @@ dependencies = [
[[package]]
name = "solana-rayon-threadlimit"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"lazy_static",
"num_cpus",
@@ -6759,7 +6864,7 @@ dependencies = [
[[package]]
name = "solana-remote-wallet"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"console",
@@ -6778,7 +6883,7 @@ dependencies = [
[[package]]
name = "solana-rpc"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"base64 0.22.1",
"bincode",
@@ -6839,7 +6944,7 @@ dependencies = [
[[package]]
name = "solana-rpc-client"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"async-trait",
@@ -6869,11 +6974,12 @@ dependencies = [
[[package]]
name = "solana-rpc-client-api"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"anyhow",
"base64 0.22.1",
"bs58",
+ "const_format",
"jsonrpc-core",
"reqwest",
"reqwest-middleware",
@@ -6891,7 +6997,7 @@ dependencies = [
[[package]]
name = "solana-rpc-client-nonce-utils"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"anyhow",
"clap 2.34.0",
@@ -6908,7 +7014,7 @@ dependencies = [
[[package]]
name = "solana-rpc-test"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bincode",
"bs58",
@@ -6935,7 +7041,7 @@ dependencies = [
[[package]]
name = "solana-runtime"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"aquamarine",
"arrayref",
@@ -7002,6 +7108,8 @@ dependencies = [
"solana-version",
"solana-vote",
"solana-vote-program",
+ "solana-zk-elgamal-proof-program",
+ "solana-zk-sdk",
"solana-zk-token-proof-program",
"solana-zk-token-sdk",
"static_assertions",
@@ -7014,7 +7122,7 @@ dependencies = [
[[package]]
name = "solana-runtime-transaction"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bincode",
"log",
@@ -7028,7 +7136,7 @@ dependencies = [
[[package]]
name = "solana-sdk"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"anyhow",
"assert_matches",
@@ -7037,6 +7145,7 @@ dependencies = [
"borsh 1.5.1",
"bs58",
"bytemuck",
+ "bytemuck_derive",
"byteorder",
"chrono",
"curve25519-dalek",
@@ -7085,13 +7194,13 @@ dependencies = [
[[package]]
name = "solana-sdk-macro"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bs58",
"proc-macro2",
"quote",
"rustversion",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -7102,11 +7211,12 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183"
[[package]]
name = "solana-send-transaction-service"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"crossbeam-channel",
"log",
"solana-client",
+ "solana-connection-cache",
"solana-logger",
"solana-measure",
"solana-metrics",
@@ -7117,7 +7227,7 @@ dependencies = [
[[package]]
name = "solana-stake-accounts"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"clap 2.34.0",
"solana-clap-utils",
@@ -7133,7 +7243,7 @@ dependencies = [
[[package]]
name = "solana-stake-program"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"bincode",
@@ -7145,13 +7255,14 @@ dependencies = [
"solana-logger",
"solana-program-runtime",
"solana-sdk",
+ "solana-type-overrides",
"solana-vote-program",
"test-case",
]
[[package]]
name = "solana-storage-bigtable"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"backoff",
"bincode",
@@ -7183,7 +7294,7 @@ dependencies = [
[[package]]
name = "solana-storage-proto"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bincode",
"bs58",
@@ -7199,7 +7310,7 @@ dependencies = [
[[package]]
name = "solana-streamer"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"async-channel",
@@ -7233,7 +7344,7 @@ dependencies = [
[[package]]
name = "solana-svm"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bincode",
"itertools 0.12.1",
@@ -7261,12 +7372,13 @@ dependencies = [
"solana-sdk",
"solana-svm",
"solana-system-program",
+ "solana-type-overrides",
"solana-vote",
]
[[package]]
name = "solana-system-program"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"bincode",
@@ -7277,11 +7389,12 @@ dependencies = [
"solana-logger",
"solana-program-runtime",
"solana-sdk",
+ "solana-type-overrides",
]
[[package]]
name = "solana-test-validator"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"base64 0.22.1",
"bincode",
@@ -7311,7 +7424,7 @@ dependencies = [
[[package]]
name = "solana-thin-client"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bincode",
"log",
@@ -7325,7 +7438,7 @@ dependencies = [
[[package]]
name = "solana-tokens"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"bincode",
@@ -7359,7 +7472,7 @@ dependencies = [
[[package]]
name = "solana-tps-client"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"log",
"serial_test",
@@ -7380,7 +7493,7 @@ dependencies = [
[[package]]
name = "solana-tpu-client"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"async-trait",
"bincode",
@@ -7402,7 +7515,7 @@ dependencies = [
[[package]]
name = "solana-transaction-dos"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bincode",
"clap 2.34.0",
@@ -7429,7 +7542,7 @@ dependencies = [
[[package]]
name = "solana-transaction-metrics-tracker"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"Inflector",
"base64 0.22.1",
@@ -7443,7 +7556,7 @@ dependencies = [
[[package]]
name = "solana-transaction-status"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"Inflector",
"base64 0.22.1",
@@ -7468,7 +7581,7 @@ dependencies = [
[[package]]
name = "solana-turbine"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"bincode",
@@ -7503,9 +7616,19 @@ dependencies = [
"tokio",
]
+[[package]]
+name = "solana-type-overrides"
+version = "2.0.2"
+dependencies = [
+ "futures 0.3.30",
+ "lazy_static",
+ "rand 0.8.5",
+ "shuttle",
+]
+
[[package]]
name = "solana-udp-client"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"async-trait",
"solana-connection-cache",
@@ -7518,7 +7641,7 @@ dependencies = [
[[package]]
name = "solana-unified-scheduler-logic"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"solana-sdk",
@@ -7527,7 +7650,7 @@ dependencies = [
[[package]]
name = "solana-unified-scheduler-pool"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"crossbeam-channel",
@@ -7548,7 +7671,7 @@ dependencies = [
[[package]]
name = "solana-upload-perf"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"serde_json",
"solana-metrics",
@@ -7556,7 +7679,7 @@ dependencies = [
[[package]]
name = "solana-version"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"log",
"rustc_version",
@@ -7570,7 +7693,7 @@ dependencies = [
[[package]]
name = "solana-vote"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bincode",
"itertools 0.12.1",
@@ -7587,7 +7710,7 @@ dependencies = [
[[package]]
name = "solana-vote-program"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"assert_matches",
"bincode",
@@ -7609,7 +7732,7 @@ dependencies = [
[[package]]
name = "solana-wen-restart"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"anyhow",
"assert_matches",
@@ -7638,7 +7761,7 @@ dependencies = [
[[package]]
name = "solana-zk-elgamal-proof-program"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bytemuck",
"num-derive",
@@ -7650,7 +7773,7 @@ dependencies = [
[[package]]
name = "solana-zk-keygen"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bs58",
"clap 3.2.25",
@@ -7669,12 +7792,13 @@ dependencies = [
[[package]]
name = "solana-zk-sdk"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"aes-gcm-siv",
"base64 0.22.1",
"bincode",
"bytemuck",
+ "bytemuck_derive",
"curve25519-dalek",
"itertools 0.12.1",
"lazy_static",
@@ -7696,7 +7820,7 @@ dependencies = [
[[package]]
name = "solana-zk-token-proof-program"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bytemuck",
"criterion",
@@ -7710,7 +7834,7 @@ dependencies = [
[[package]]
name = "solana-zk-token-proof-program-tests"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"bytemuck",
"curve25519-dalek",
@@ -7722,15 +7846,15 @@ dependencies = [
[[package]]
name = "solana-zk-token-sdk"
-version = "2.0.0"
+version = "2.0.2"
dependencies = [
"aes-gcm-siv",
"base64 0.22.1",
"bincode",
"bytemuck",
+ "bytemuck_derive",
"byteorder",
"curve25519-dalek",
- "getrandom 0.1.16",
"itertools 0.12.1",
"lazy_static",
"merlin",
@@ -7741,6 +7865,7 @@ dependencies = [
"serde_derive",
"serde_json",
"sha3 0.9.1",
+ "solana-curve25519",
"solana-program",
"solana-sdk",
"subtle",
@@ -7783,9 +7908,9 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
[[package]]
name = "spl-associated-token-account"
-version = "3.0.2"
+version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a2e688554bac5838217ffd1fab7845c573ff106b6336bf7d290db7c98d5a8efd"
+checksum = "68034596cf4804880d265f834af1ff2f821ad5293e41fa0f8f59086c181fc38e"
dependencies = [
"assert_matches",
"borsh 1.5.1",
@@ -7799,9 +7924,9 @@ dependencies = [
[[package]]
name = "spl-discriminator"
-version = "0.2.2"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34d1814406e98b08c5cd02c1126f83fd407ad084adce0b05fda5730677822eac"
+checksum = "a38ea8b6dedb7065887f12d62ed62c1743aa70749e8558f963609793f6fb12bc"
dependencies = [
"bytemuck",
"solana-program",
@@ -7816,7 +7941,7 @@ checksum = "d9e8418ea6269dcfb01c712f0444d2c75542c04448b480e87de59d2865edc750"
dependencies = [
"quote",
"spl-discriminator-syn",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -7828,15 +7953,15 @@ dependencies = [
"proc-macro2",
"quote",
"sha2 0.10.8",
- "syn 2.0.68",
+ "syn 2.0.71",
"thiserror",
]
[[package]]
name = "spl-instruction-padding"
-version = "0.1.1"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be3f0c53b6eb2dfccb77b5710bddb04548da338a3f56bed214177f6a577d1ca6"
+checksum = "8cdbcd2652240c5b04befd4807c2b0f9412c66b18db398ca955f236a8ff1c378"
dependencies = [
"num_enum",
"solana-program",
@@ -7844,21 +7969,22 @@ dependencies = [
[[package]]
name = "spl-memo"
-version = "4.0.1"
+version = "5.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "58e9bae02de3405079a057fe244c867a08f92d48327d231fc60da831f94caf0a"
+checksum = "a0dba2f2bb6419523405d21c301a32c9f9568354d4742552e7972af801f4bdb3"
dependencies = [
"solana-program",
]
[[package]]
name = "spl-pod"
-version = "0.2.2"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "046ce669f48cf2eca1ec518916d8725596bfb655beb1c74374cf71dc6cb773c9"
+checksum = "e6166a591d93af33afd75bbd8573c5fd95fb1213f1bf254f0508c89fdb5ee156"
dependencies = [
"borsh 1.5.1",
"bytemuck",
+ "bytemuck_derive",
"solana-program",
"solana-zk-token-sdk",
"spl-program-error",
@@ -7866,9 +7992,9 @@ dependencies = [
[[package]]
name = "spl-program-error"
-version = "0.4.1"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49065093ea91f57b9b2bd81493ff705e2ad4e64507a07dbc02b085778e02770e"
+checksum = "d7b28bed65356558133751cc32b48a7a5ddfc59ac4e941314630bbed1ac10532"
dependencies = [
"num-derive",
"num-traits",
@@ -7886,14 +8012,14 @@ dependencies = [
"proc-macro2",
"quote",
"sha2 0.10.8",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
name = "spl-tlv-account-resolution"
-version = "0.6.3"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cace91ba08984a41556efe49cbf2edca4db2f577b649da7827d3621161784bf8"
+checksum = "37a75a5f0fcc58126693ed78a17042e9dc53f07e357d6be91789f7d62aff61a4"
dependencies = [
"bytemuck",
"solana-program",
@@ -7905,9 +8031,9 @@ dependencies = [
[[package]]
name = "spl-token"
-version = "4.0.1"
+version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95ae123223633a389f95d1da9d49c2d0a50d499e7060b9624626a69e536ad2a4"
+checksum = "70a0f06ac7f23dc0984931b1fe309468f14ea58e32660439c1cef19456f5d0e3"
dependencies = [
"arrayref",
"bytemuck",
@@ -7920,9 +8046,9 @@ dependencies = [
[[package]]
name = "spl-token-2022"
-version = "3.0.2"
+version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5412f99ae7ee6e0afde00defaa354e6228e47e30c0e3adf553e2e01e6abb584"
+checksum = "d9c10f3483e48679619c76598d4e4aebb955bc49b0a5cc63323afbf44135c9bf"
dependencies = [
"arrayref",
"bytemuck",
@@ -7944,9 +8070,9 @@ dependencies = [
[[package]]
name = "spl-token-group-interface"
-version = "0.2.3"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d419b5cfa3ee8e0f2386fd7e02a33b3ec8a7db4a9c7064a2ea24849dc4a273b6"
+checksum = "df8752b85a5ecc1d9f3a43bce3dd9a6a053673aacf5deb513d1cbb88d3534ffd"
dependencies = [
"bytemuck",
"solana-program",
@@ -7957,9 +8083,9 @@ dependencies = [
[[package]]
name = "spl-token-metadata-interface"
-version = "0.3.3"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30179c47e93625680dabb620c6e7931bd12d62af390f447bc7beb4a3a9b5feee"
+checksum = "c6c2318ddff97e006ed9b1291ebec0750a78547f870f62a69c56fe3b46a5d8fc"
dependencies = [
"borsh 1.5.1",
"solana-program",
@@ -7971,9 +8097,9 @@ dependencies = [
[[package]]
name = "spl-transfer-hook-interface"
-version = "0.6.3"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "66a98359769cd988f7b35c02558daa56d496a7e3bd8626e61f90a7c757eedb9b"
+checksum = "a110f33d941275d9f868b96daaa993f1e73b6806cc8836e43075b4d3ad8338a7"
dependencies = [
"arrayref",
"bytemuck",
@@ -7987,9 +8113,9 @@ dependencies = [
[[package]]
name = "spl-type-length-value"
-version = "0.4.3"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "422ce13429dbd41d2cee8a73931c05fda0b0c8ca156a8b0c19445642550bb61a"
+checksum = "bdcd73ec187bc409464c60759232e309f83b52a18a9c5610bf281c9c6432918c"
dependencies = [
"bytemuck",
"solana-program",
@@ -8080,9 +8206,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.68"
+version = "2.0.71"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9"
+checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462"
dependencies = [
"proc-macro2",
"quote",
@@ -8098,7 +8224,7 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -8177,6 +8303,12 @@ dependencies = [
"winapi 0.3.9",
]
+[[package]]
+name = "tap"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
+
[[package]]
name = "tar"
version = "0.4.41"
@@ -8277,7 +8409,7 @@ dependencies = [
"cfg-if 1.0.0",
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -8288,7 +8420,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
"test-case-core",
]
@@ -8309,22 +8441,22 @@ checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9"
[[package]]
name = "thiserror"
-version = "1.0.61"
+version = "1.0.62"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709"
+checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.61"
+version = "1.0.62"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533"
+checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -8426,9 +8558,9 @@ dependencies = [
[[package]]
name = "tinyvec"
-version = "1.6.1"
+version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c55115c6fbe2d2bef26eb09ad74bde02d8255476fc0c7b515ef09fbb35742d82"
+checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938"
dependencies = [
"tinyvec_macros",
]
@@ -8475,7 +8607,7 @@ source = "git+https://github.com/anza-xyz/solana-tokio.git?rev=7cf47705faacf7bf0
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -8587,7 +8719,7 @@ dependencies = [
"serde",
"serde_spanned",
"toml_datetime",
- "toml_edit 0.22.14",
+ "toml_edit 0.22.15",
]
[[package]]
@@ -8612,9 +8744,9 @@ dependencies = [
[[package]]
name = "toml_edit"
-version = "0.22.14"
+version = "0.22.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38"
+checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1"
dependencies = [
"indexmap 2.2.6",
"serde",
@@ -8719,7 +8851,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -9027,7 +9159,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
"wasm-bindgen-shared",
]
@@ -9061,7 +9193,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@@ -9152,13 +9284,42 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+[[package]]
+name = "windows"
+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.5",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-core"
+version = "0.54.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65"
+dependencies = [
+ "windows-result",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-result"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8"
+dependencies = [
+ "windows-targets 0.52.6",
]
[[package]]
@@ -9176,7 +9337,7 @@ version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
- "windows-targets 0.52.5",
+ "windows-targets 0.52.6",
]
[[package]]
@@ -9196,18 +9357,18 @@ dependencies = [
[[package]]
name = "windows-targets"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb"
+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
- "windows_aarch64_gnullvm 0.52.5",
- "windows_aarch64_msvc 0.52.5",
- "windows_i686_gnu 0.52.5",
+ "windows_aarch64_gnullvm 0.52.6",
+ "windows_aarch64_msvc 0.52.6",
+ "windows_i686_gnu 0.52.6",
"windows_i686_gnullvm",
- "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",
+ "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",
]
[[package]]
@@ -9218,9 +9379,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
[[package]]
name = "windows_aarch64_gnullvm"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263"
+checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
@@ -9230,9 +9391,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
[[package]]
name = "windows_aarch64_msvc"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6"
+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
@@ -9242,15 +9403,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
[[package]]
name = "windows_i686_gnu"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670"
+checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9"
+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
@@ -9260,9 +9421,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
[[package]]
name = "windows_i686_msvc"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf"
+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
@@ -9272,9 +9433,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
[[package]]
name = "windows_x86_64_gnu"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9"
+checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
@@ -9284,9 +9445,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
[[package]]
name = "windows_x86_64_gnullvm"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596"
+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
@@ -9296,9 +9457,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
[[package]]
name = "windows_x86_64_msvc"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0"
+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "winnow"
@@ -9328,6 +9489,15 @@ dependencies = [
"windows-sys 0.48.0",
]
+[[package]]
+name = "wyz"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed"
+dependencies = [
+ "tap",
+]
+
[[package]]
name = "x509-parser"
version = "0.14.0"
@@ -9368,22 +9538,22 @@ dependencies = [
[[package]]
name = "zerocopy"
-version = "0.7.34"
+version = "0.7.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087"
+checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
-version = "0.7.34"
+version = "0.7.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b"
+checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -9403,7 +9573,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.68",
+ "syn 2.0.71",
]
[[package]]
@@ -9427,9 +9597,9 @@ dependencies = [
[[package]]
name = "zstd-sys"
-version = "2.0.11+zstd.1.5.6"
+version = "2.0.12+zstd.1.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75652c55c0b6f3e6f12eb786fe1bc960396bf05a1eb3bf1f3691c3610ac2e6d4"
+checksum = "0a4e40c320c3cb459d9a9ff6de98cff88f4751ee9275d140e2be94a2b74e4c13"
dependencies = [
"cc",
"pkg-config",
diff --git a/Cargo.toml b/Cargo.toml
index cdea68a673eff1..b1169976cf2434 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -31,6 +31,7 @@ members = [
"connection-cache",
"core",
"cost-model",
+ "curves/*",
"dos",
"download-utils",
"entry",
@@ -116,6 +117,7 @@ members = [
"transaction-metrics-tracker",
"transaction-status",
"turbine",
+ "type-overrides",
"udp-client",
"unified-scheduler-logic",
"unified-scheduler-pool",
@@ -135,7 +137,7 @@ exclude = ["programs/sbf", "svm/tests/example-programs"]
resolver = "2"
[workspace.package]
-version = "2.0.0"
+version = "2.0.2"
authors = ["Anza Maintainers "]
repository = "https://github.com/anza-xyz/agave"
homepage = "https://anza.xyz/"
@@ -171,13 +173,13 @@ bs58 = "0.5.1"
bv = "0.11.1"
byte-unit = "4.0.19"
bytecount = "0.6.8"
-bytemuck = "1.16.0"
+bytemuck = "1.16.1"
+bytemuck_derive = "1.7.0"
byteorder = "1.5.0"
bytes = "1.6"
bzip2 = "0.4.4"
caps = "0.5.5"
cargo_metadata = "0.15.4"
-cc = "1.0.94"
chrono = { version = "0.4.38", default-features = false }
chrono-humanize = "0.2.3"
clap = "2.33.1"
@@ -310,110 +312,113 @@ serde_yaml = "0.9.34"
serial_test = "2.0.0"
sha2 = "0.10.8"
sha3 = "0.10.8"
+shuttle = "0.7.1"
signal-hook = "0.3.17"
siphasher = "0.3.11"
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.0" }
-solana-accounts-db = { path = "accounts-db", version = "=2.0.0" }
-solana-address-lookup-table-program = { path = "programs/address-lookup-table", version = "=2.0.0" }
-solana-banks-client = { path = "banks-client", version = "=2.0.0" }
-solana-banks-interface = { path = "banks-interface", version = "=2.0.0" }
-solana-banks-server = { path = "banks-server", version = "=2.0.0" }
-solana-bench-tps = { path = "bench-tps", version = "=2.0.0" }
-solana-bloom = { path = "bloom", version = "=2.0.0" }
-solana-bpf-loader-program = { path = "programs/bpf_loader", version = "=2.0.0" }
-solana-bucket-map = { path = "bucket_map", version = "=2.0.0" }
-agave-cargo-registry = { path = "cargo-registry", version = "=2.0.0" }
-solana-clap-utils = { path = "clap-utils", version = "=2.0.0" }
-solana-clap-v3-utils = { path = "clap-v3-utils", version = "=2.0.0" }
-solana-cli = { path = "cli", version = "=2.0.0" }
-solana-cli-config = { path = "cli-config", version = "=2.0.0" }
-solana-cli-output = { path = "cli-output", version = "=2.0.0" }
-solana-client = { path = "client", version = "=2.0.0" }
-solana-compute-budget = { path = "compute-budget", version = "=2.0.0" }
-solana-compute-budget-program = { path = "programs/compute-budget", version = "=2.0.0" }
-solana-config-program = { path = "programs/config", version = "=2.0.0" }
-solana-connection-cache = { path = "connection-cache", version = "=2.0.0", default-features = false }
-solana-core = { path = "core", version = "=2.0.0" }
-solana-cost-model = { path = "cost-model", version = "=2.0.0" }
-solana-download-utils = { path = "download-utils", version = "=2.0.0" }
-solana-entry = { path = "entry", version = "=2.0.0" }
-solana-faucet = { path = "faucet", version = "=2.0.0" }
-solana-frozen-abi = { path = "frozen-abi", version = "=2.0.0" }
-solana-frozen-abi-macro = { path = "frozen-abi/macro", version = "=2.0.0" }
-solana-tps-client = { path = "tps-client", version = "=2.0.0" }
-solana-genesis = { path = "genesis", version = "=2.0.0" }
-solana-genesis-utils = { path = "genesis-utils", version = "=2.0.0" }
-agave-geyser-plugin-interface = { path = "geyser-plugin-interface", version = "=2.0.0" }
-solana-geyser-plugin-manager = { path = "geyser-plugin-manager", version = "=2.0.0" }
-solana-gossip = { path = "gossip", version = "=2.0.0" }
-solana-inline-spl = { path = "inline-spl", version = "=2.0.0" }
-solana-ledger = { path = "ledger", version = "=2.0.0" }
-solana-loader-v4-program = { path = "programs/loader-v4", version = "=2.0.0" }
-solana-local-cluster = { path = "local-cluster", version = "=2.0.0" }
-solana-logger = { path = "logger", version = "=2.0.0" }
-solana-measure = { path = "measure", version = "=2.0.0" }
-solana-merkle-tree = { path = "merkle-tree", version = "=2.0.0" }
-solana-metrics = { path = "metrics", version = "=2.0.0" }
-solana-net-utils = { path = "net-utils", version = "=2.0.0" }
+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-nohash-hasher = "0.2.1"
-solana-notifier = { path = "notifier", version = "=2.0.0" }
-solana-package-metadata-macro = { path = "sdk/package-metadata-macro", version = "=2.0.0" }
-solana-perf = { path = "perf", version = "=2.0.0" }
-solana-poh = { path = "poh", version = "=2.0.0" }
-solana-poseidon = { path = "poseidon", version = "=2.0.0" }
-solana-program = { path = "sdk/program", version = "=2.0.0" }
-solana-program-runtime = { path = "program-runtime", version = "=2.0.0" }
-solana-program-test = { path = "program-test", version = "=2.0.0" }
-solana-pubsub-client = { path = "pubsub-client", version = "=2.0.0" }
-solana-quic-client = { path = "quic-client", version = "=2.0.0" }
-solana-rayon-threadlimit = { path = "rayon-threadlimit", version = "=2.0.0" }
-solana-remote-wallet = { path = "remote-wallet", version = "=2.0.0", default-features = false }
-solana-unified-scheduler-logic = { path = "unified-scheduler-logic", version = "=2.0.0" }
-solana-unified-scheduler-pool = { path = "unified-scheduler-pool", version = "=2.0.0" }
-solana-rpc = { path = "rpc", version = "=2.0.0" }
-solana-rpc-client = { path = "rpc-client", version = "=2.0.0", default-features = false }
-solana-rpc-client-api = { path = "rpc-client-api", version = "=2.0.0" }
-solana-rpc-client-nonce-utils = { path = "rpc-client-nonce-utils", version = "=2.0.0" }
-solana-runtime = { path = "runtime", version = "=2.0.0" }
-solana-runtime-transaction = { path = "runtime-transaction", version = "=2.0.0" }
-solana-sdk = { path = "sdk", version = "=2.0.0" }
-solana-sdk-macro = { path = "sdk/macro", version = "=2.0.0" }
-solana-send-transaction-service = { path = "send-transaction-service", version = "=2.0.0" }
-solana-stake-program = { path = "programs/stake", version = "=2.0.0" }
-solana-storage-bigtable = { path = "storage-bigtable", version = "=2.0.0" }
-solana-storage-proto = { path = "storage-proto", version = "=2.0.0" }
-solana-streamer = { path = "streamer", version = "=2.0.0" }
-solana-svm = { path = "svm", version = "=2.0.0" }
-solana-system-program = { path = "programs/system", version = "=2.0.0" }
-solana-test-validator = { path = "test-validator", version = "=2.0.0" }
-solana-thin-client = { path = "thin-client", version = "=2.0.0" }
-solana-tpu-client = { path = "tpu-client", version = "=2.0.0", default-features = false }
-solana-transaction-status = { path = "transaction-status", version = "=2.0.0" }
-solana-transaction-metrics-tracker = { path = "transaction-metrics-tracker", version = "=2.0.0" }
-solana-turbine = { path = "turbine", version = "=2.0.0" }
-solana-udp-client = { path = "udp-client", version = "=2.0.0" }
-solana-version = { path = "version", version = "=2.0.0" }
-solana-vote = { path = "vote", version = "=2.0.0" }
-solana-vote-program = { path = "programs/vote", version = "=2.0.0" }
-solana-wen-restart = { path = "wen-restart", version = "=2.0.0" }
-solana-zk-elgamal-proof-program = { path = "programs/zk-elgamal-proof", version = "=2.0.0" }
-solana-zk-keygen = { path = "zk-keygen", version = "=2.0.0" }
-solana-zk-sdk = { path = "zk-sdk", version = "=2.0.0" }
-solana-zk-token-proof-program = { path = "programs/zk-token-proof", version = "=2.0.0" }
-solana-zk-token-sdk = { path = "zk-token-sdk", version = "=2.0.0" }
+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"
-spl-associated-token-account = "=3.0.2"
-spl-instruction-padding = "0.1"
-spl-memo = "=4.0.1"
-spl-pod = "=0.2.2"
-spl-token = "=4.0.1"
-spl-token-2022 = "=3.0.2"
-spl-token-group-interface = "=0.2.3"
-spl-token-metadata-interface = "=0.3.3"
+spl-associated-token-account = "=4.0.0"
+spl-instruction-padding = "0.2"
+spl-memo = "=5.0.0"
+spl-pod = "=0.3.0"
+spl-token = "=6.0.0"
+spl-token-2022 = "=4.0.0"
+spl-token-group-interface = "=0.3.0"
+spl-token-metadata-interface = "=0.4.0"
static_assertions = "1.1.0"
stream-cancel = "0.8.2"
strum = "0.24"
@@ -442,7 +447,7 @@ tonic-build = "0.9.2"
trees = "0.4.2"
tungstenite = "0.20.1"
uriparse = "0.6.4"
-url = "2.5.1"
+url = "2.5.2"
vec_extract_if_polyfill = "0.1.0"
wasm-bindgen = "0.2"
winapi = "0.3.8"
@@ -488,6 +493,7 @@ crossbeam-epoch = { git = "https://github.com/anza-xyz/crossbeam", rev = "fd279d
#
# There is a similar override in `programs/sbf/Cargo.toml`. Please keep both
# comments and the overrides in sync.
+solana-curve25519 = { path = "curves/curve25519" }
solana-program = { path = "sdk/program" }
solana-zk-sdk = { path = "zk-sdk" }
solana-zk-token-sdk = { path = "zk-token-sdk" }
diff --git a/account-decoder/src/parse_token.rs b/account-decoder/src/parse_token.rs
index 41a7eb44f9e14f..878d738fe03367 100644
--- a/account-decoder/src/parse_token.rs
+++ b/account-decoder/src/parse_token.rs
@@ -26,37 +26,6 @@ pub fn is_known_spl_token_id(program_id: &Pubkey) -> bool {
*program_id == spl_token::id() || *program_id == spl_token_2022::id()
}
-// A helper function to convert spl_token::native_mint::id() as spl_sdk::pubkey::Pubkey to
-// solana_sdk::pubkey::Pubkey
-#[deprecated(
- since = "1.16.0",
- note = "Pubkey conversions no longer needed. Please use spl_token::native_mint::id() directly"
-)]
-pub fn spl_token_native_mint() -> Pubkey {
- Pubkey::new_from_array(spl_token::native_mint::id().to_bytes())
-}
-
-// The program id of the `spl_token_native_mint` account
-#[deprecated(
- since = "1.16.0",
- note = "Pubkey conversions no longer needed. Please use spl_token::id() directly"
-)]
-pub fn spl_token_native_mint_program_id() -> Pubkey {
- spl_token::id()
-}
-
-// A helper function to convert a solana_sdk::pubkey::Pubkey to spl_sdk::pubkey::Pubkey
-#[deprecated(since = "1.16.0", note = "Pubkey conversions no longer needed")]
-pub fn spl_token_pubkey(pubkey: &Pubkey) -> SplTokenPubkey {
- SplTokenPubkey::new_from_array(pubkey.to_bytes())
-}
-
-// A helper function to convert a spl_sdk::pubkey::Pubkey to solana_sdk::pubkey::Pubkey
-#[deprecated(since = "1.16.0", note = "Pubkey conversions no longer needed")]
-pub fn pubkey_from_spl_token(pubkey: &SplTokenPubkey) -> Pubkey {
- Pubkey::new_from_array(pubkey.to_bytes())
-}
-
#[deprecated(since = "2.0.0", note = "Use `parse_token_v2` instead")]
pub fn parse_token(
data: &[u8],
diff --git a/accounts-db/Cargo.toml b/accounts-db/Cargo.toml
index 62632c24de696f..b7c1327194f2dd 100644
--- a/accounts-db/Cargo.toml
+++ b/accounts-db/Cargo.toml
@@ -14,6 +14,7 @@ bincode = { workspace = true }
blake3 = { workspace = true }
bv = { workspace = true, features = ["serde"] }
bytemuck = { workspace = true }
+bytemuck_derive = { workspace = true }
# bzip2 = { workspace = true }
crossbeam-channel = { workspace = true }
dashmap = { workspace = true, features = ["rayon", "raw-api"] }
@@ -65,8 +66,10 @@ rand_chacha = { workspace = true }
serde_bytes = { workspace = true }
# See order-crates-for-publishing.py for using this unusual `path = "."`
solana-accounts-db = { path = ".", features = ["dev-context-only-utils"] }
+solana-compute-budget = { workspace = true }
solana-logger = { workspace = true }
solana-sdk = { workspace = true, features = ["dev-context-only-utils"] }
+solana-svm = { workspace = true, features = ["dev-context-only-utils"] }
static_assertions = { workspace = true }
strum = { workspace = true, features = ["derive"] }
strum_macros = { workspace = true }
diff --git a/accounts-db/accounts-hash-cache-tool/Cargo.toml b/accounts-db/accounts-hash-cache-tool/Cargo.toml
index 501e0dfdb8b71d..e4803261ef6995 100644
--- a/accounts-db/accounts-hash-cache-tool/Cargo.toml
+++ b/accounts-db/accounts-hash-cache-tool/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "agave-accounts-hash-cache-tool"
-description = "Tool to inspect accounts hash cache files"
+description = "Tool for accounts hash cache files"
publish = false
version = { workspace = true }
authors = { workspace = true }
diff --git a/accounts-db/accounts-hash-cache-tool/src/main.rs b/accounts-db/accounts-hash-cache-tool/src/main.rs
index 98778049504216..c56369391c8077 100644
--- a/accounts-db/accounts-hash-cache-tool/src/main.rs
+++ b/accounts-db/accounts-hash-cache-tool/src/main.rs
@@ -1,12 +1,17 @@
use {
bytemuck::Zeroable as _,
- clap::{crate_description, crate_name, value_t_or_exit, App, Arg},
+ clap::{
+ crate_description, crate_name, value_t_or_exit, App, AppSettings, Arg, ArgMatches,
+ SubCommand,
+ },
solana_accounts_db::{CacheHashDataFileEntry, CacheHashDataFileHeader},
std::{
+ collections::HashMap,
fs::File,
io::{self, BufReader, Read as _},
mem::size_of,
num::Saturating,
+ path::Path,
},
};
@@ -14,62 +19,73 @@ fn main() {
let matches = App::new(crate_name!())
.about(crate_description!())
.version(solana_version::version!())
- .arg(
- Arg::with_name("path")
- .index(1)
- .takes_value(true)
- .value_name("PATH")
- .help("Accounts hash cache file to inspect"),
+ .global_setting(AppSettings::ArgRequiredElseHelp)
+ .global_setting(AppSettings::ColoredHelp)
+ .global_setting(AppSettings::InferSubcommands)
+ .global_setting(AppSettings::UnifiedHelpMessage)
+ .global_setting(AppSettings::VersionlessSubcommands)
+ .subcommand(
+ SubCommand::with_name("inspect")
+ .about(
+ "Inspect an accounts hash cache file and display \
+ each account's address, hash, and balance",
+ )
+ .arg(
+ Arg::with_name("force")
+ .long("force")
+ .takes_value(false)
+ .help("Continue even if sanity checks fail"),
+ )
+ .arg(
+ Arg::with_name("path")
+ .index(1)
+ .takes_value(true)
+ .value_name("PATH")
+ .help("Accounts hash cache file to inspect"),
+ ),
)
- .arg(
- Arg::with_name("force")
- .long("force")
- .takes_value(false)
- .help("Continue even if sanity checks fail"),
+ .subcommand(
+ SubCommand::with_name("diff")
+ .about("Diff two accounts hash cache files")
+ .arg(
+ Arg::with_name("path1")
+ .index(1)
+ .takes_value(true)
+ .value_name("PATH1")
+ .help("Accounts hash cache file 1 to diff"),
+ )
+ .arg(
+ Arg::with_name("path2")
+ .index(2)
+ .takes_value(true)
+ .value_name("PATH2")
+ .help("Accounts hash cache file 2 to diff"),
+ ),
)
.get_matches();
- let force = matches.is_present("force");
- let path = value_t_or_exit!(matches, "path", String);
-
- let file = File::open(&path).unwrap_or_else(|err| {
- eprintln!("Failed to open accounts hash cache file '{path}': {err}");
- std::process::exit(1);
- });
- let actual_file_size = file
- .metadata()
- .unwrap_or_else(|err| {
- eprintln!("Failed to query file metadata: {err}");
- std::process::exit(1);
- })
- .len();
- let mut reader = BufReader::new(file);
-
- let header = {
- let mut header = CacheHashDataFileHeader::zeroed();
- reader
- .read_exact(bytemuck::bytes_of_mut(&mut header))
- .unwrap_or_else(|err| {
- eprintln!("Failed to read header: {err}");
- std::process::exit(1);
- });
- header
- };
-
- // Sanity checks -- ensure the actual file size matches the expected file size
- let expected_file_size = size_of::()
- .saturating_add(size_of::().saturating_mul(header.count));
- if actual_file_size != expected_file_size as u64 {
- eprintln!(
- "Failed sanitization: actual file size does not match expected file size! \
- actual: {actual_file_size}, expected: {expected_file_size}",
- );
- if !force {
- std::process::exit(1);
+ match matches.subcommand() {
+ ("inspect", Some(subcommand_matches)) => do_inspect(&matches, subcommand_matches)
+ .map_err(|err| format!("inspection failed: {err}")),
+ ("diff", Some(subcommand_matches)) => {
+ do_diff(&matches, subcommand_matches).map_err(|err| format!("diff failed: {err}"))
}
- eprintln!("Forced. Continuing... Results may be incorrect.");
+ _ => unreachable!(),
}
+ .unwrap_or_else(|err| {
+ eprintln!("Error: {err}");
+ std::process::exit(1);
+ });
+}
+fn do_inspect(
+ _app_matches: &ArgMatches<'_>,
+ subcommand_matches: &ArgMatches<'_>,
+) -> Result<(), String> {
+ let force = subcommand_matches.is_present("force");
+ let path = value_t_or_exit!(subcommand_matches, "path", String);
+ let (mut reader, header) = open_file(&path, force)
+ .map_err(|err| format!("failed to open accounts hash cache file '{path}': {err}"))?;
let count_width = (header.count as f64).log10().ceil() as usize;
let mut count = Saturating(0usize);
loop {
@@ -80,10 +96,13 @@ fn main() {
Err(err) => {
if err.kind() == io::ErrorKind::UnexpectedEof && count.0 == header.count {
// we've hit the expected end of the file
+ break;
} else {
- eprintln!("Failed to read entry {count}: {err}");
+ return Err(format!(
+ "failed to read entry {count}, expected {}: {err}",
+ header.count,
+ ));
}
- break;
}
};
println!(
@@ -96,4 +115,173 @@ fn main() {
}
println!("actual entries: {count}, expected: {}", header.count);
+ Ok(())
+}
+
+fn do_diff(
+ _app_matches: &ArgMatches<'_>,
+ subcommand_matches: &ArgMatches<'_>,
+) -> Result<(), String> {
+ let force = false; // skipping sanity checks is not supported when diffing
+ let path1 = value_t_or_exit!(subcommand_matches, "path1", String);
+ let path2 = value_t_or_exit!(subcommand_matches, "path2", String);
+ let (mut reader1, header1) = open_file(&path1, force)
+ .map_err(|err| format!("failed to open accounts hash cache file 1 '{path1}': {err}"))?;
+ let (mut reader2, header2) = open_file(&path2, force)
+ .map_err(|err| format!("failed to open accounts hash cache file 2 '{path2}': {err}"))?;
+ // Note: Purposely open both files before reading either one. This way, if there's an error
+ // opening file 2, we can bail early without having to wait for file 1 to be read completely.
+
+ // extract the entries from both files
+ let do_extract = |num, reader: &mut BufReader<_>, header: &CacheHashDataFileHeader| {
+ let mut entries = HashMap::<_, _>::default();
+ loop {
+ let mut entry = CacheHashDataFileEntry::zeroed();
+ let result = reader.read_exact(bytemuck::bytes_of_mut(&mut entry));
+ match result {
+ Ok(()) => {}
+ Err(err) => {
+ if err.kind() == io::ErrorKind::UnexpectedEof && entries.len() == header.count {
+ // we've hit the expected end of the file
+ break;
+ } else {
+ return Err(format!(
+ "failed to read entry {}, expected {}: {err}",
+ entries.len(),
+ header.count,
+ ));
+ }
+ }
+ };
+ let CacheHashDataFileEntry {
+ hash,
+ lamports,
+ pubkey,
+ } = entry;
+ let old_value = entries.insert(pubkey, (hash, lamports));
+ if let Some(old_value) = old_value {
+ let new_value = entries.get(&pubkey);
+ return Err(format!("found duplicate pubkey in file {num}: {pubkey}, old value: {old_value:?}, new value: {new_value:?}"));
+ }
+ }
+ Ok(entries)
+ };
+ let entries1 = do_extract(1, &mut reader1, &header1)?;
+ let entries2 = do_extract(2, &mut reader2, &header2)?;
+
+ // compute the differences between the files
+ let do_compute = |lhs: &HashMap<_, (_, _)>, rhs: &HashMap<_, (_, _)>| {
+ let mut unique_entries = Vec::new();
+ let mut mismatch_entries = Vec::new();
+ for (lhs_key, lhs_value) in lhs.iter() {
+ if let Some(rhs_value) = rhs.get(lhs_key) {
+ if lhs_value != rhs_value {
+ mismatch_entries.push((
+ CacheHashDataFileEntry {
+ hash: lhs_value.0,
+ lamports: lhs_value.1,
+ pubkey: *lhs_key,
+ },
+ CacheHashDataFileEntry {
+ hash: rhs_value.0,
+ lamports: rhs_value.1,
+ pubkey: *lhs_key,
+ },
+ ));
+ }
+ } else {
+ unique_entries.push(CacheHashDataFileEntry {
+ hash: lhs_value.0,
+ lamports: lhs_value.1,
+ pubkey: *lhs_key,
+ });
+ }
+ }
+ unique_entries.sort_unstable_by(|a, b| a.pubkey.cmp(&b.pubkey));
+ mismatch_entries.sort_unstable_by(|a, b| a.0.pubkey.cmp(&b.0.pubkey));
+ (unique_entries, mismatch_entries)
+ };
+ let (unique_entries1, mismatch_entries) = do_compute(&entries1, &entries2);
+ let (unique_entries2, _) = do_compute(&entries2, &entries1);
+
+ // display the unique entries in each file
+ let do_print = |entries: &[CacheHashDataFileEntry]| {
+ let count_width = (entries.len() as f64).log10().ceil() as usize;
+ if entries.is_empty() {
+ println!("(none)");
+ } else {
+ for (i, entry) in entries.iter().enumerate() {
+ println!(
+ "{i:count_width$}: pubkey: {:44}, hash: {:44}, lamports: {}",
+ entry.pubkey.to_string(),
+ entry.hash.0.to_string(),
+ entry.lamports,
+ );
+ }
+ }
+ };
+ println!("Unique entries in file 1:");
+ do_print(&unique_entries1);
+ println!("Unique entries in file 2:");
+ do_print(&unique_entries2);
+
+ println!("Mismatch values:");
+ let count_width = (mismatch_entries.len() as f64).log10().ceil() as usize;
+ if mismatch_entries.is_empty() {
+ println!("(none)");
+ } else {
+ for (i, (lhs, rhs)) in mismatch_entries.iter().enumerate() {
+ println!(
+ "{i:count_width$}: pubkey: {:44}, hash: {:44}, lamports: {}",
+ lhs.pubkey.to_string(),
+ lhs.hash.0.to_string(),
+ lhs.lamports,
+ );
+ println!(
+ "{i:count_width$}: file 2: {:44}, hash: {:44}, lamports: {}",
+ "(same)".to_string(),
+ rhs.hash.0.to_string(),
+ rhs.lamports,
+ );
+ }
+ }
+
+ Ok(())
+}
+
+fn open_file(
+ path: impl AsRef,
+ force: bool,
+) -> Result<(BufReader, CacheHashDataFileHeader), String> {
+ let file = File::open(path).map_err(|err| format!("{err}"))?;
+ let actual_file_size = file
+ .metadata()
+ .map_err(|err| format!("failed to query file metadata: {err}"))?
+ .len();
+ let mut reader = BufReader::new(file);
+
+ let header = {
+ let mut header = CacheHashDataFileHeader::zeroed();
+ reader
+ .read_exact(bytemuck::bytes_of_mut(&mut header))
+ .map_err(|err| format!("failed to read header: {err}"))?;
+ header
+ };
+
+ // Sanity checks -- ensure the actual file size matches the expected file size
+ let expected_file_size = size_of::()
+ .saturating_add(size_of::().saturating_mul(header.count));
+ if actual_file_size != expected_file_size as u64 {
+ let err_msg = format!(
+ "failed sanitization: actual file size does not match expected file size! \
+ actual: {actual_file_size}, expected: {expected_file_size}",
+ );
+ if force {
+ eprintln!("Warning: {err_msg}\nForced. Continuing... Results may be incorrect.");
+ } else {
+ return Err(err_msg);
+ }
+ }
+
+ Ok((reader, header))
}
diff --git a/accounts-db/benches/accounts.rs b/accounts-db/benches/accounts.rs
index 6c3f26ebfd3b41..202a220e10e425 100644
--- a/accounts-db/benches/accounts.rs
+++ b/accounts-db/benches/accounts.rs
@@ -340,6 +340,7 @@ fn bench_load_largest_accounts(b: &mut Bencher) {
20,
&HashSet::new(),
AccountAddressFilter::Exclude,
+ false,
)
});
}
diff --git a/accounts-db/src/accounts.rs b/accounts-db/src/accounts.rs
index 67fde4ce30394b..1f87be1ae86e44 100644
--- a/accounts-db/src/accounts.rs
+++ b/accounts-db/src/accounts.rs
@@ -29,9 +29,8 @@ use {
transaction_context::TransactionAccount,
},
solana_svm::{
- account_loader::TransactionLoadResult,
- nonce_info::{NonceFull, NonceInfo},
- transaction_results::TransactionExecutionResult,
+ account_loader::TransactionLoadResult, nonce_info::NonceInfo,
+ rollback_accounts::RollbackAccounts, transaction_results::TransactionExecutionResult,
},
std::{
cmp::Reverse,
@@ -254,6 +253,7 @@ impl Accounts {
num: usize,
filter_by_address: &HashSet,
filter: AccountAddressFilter,
+ sort_results: bool,
) -> ScanResult> {
if num == 0 {
return Ok(vec![]);
@@ -287,7 +287,7 @@ impl Accounts {
account_balances.push(Reverse((account.lamports(), *pubkey)));
}
},
- &ScanConfig::default(),
+ &ScanConfig::new(!sort_results),
)?;
Ok(account_balances
.into_sorted_vec()
@@ -480,6 +480,7 @@ impl Accounts {
&self,
ancestors: &Ancestors,
bank_id: BankId,
+ sort_results: bool,
) -> ScanResult> {
let mut collector = Vec::new();
self.accounts_db
@@ -493,7 +494,7 @@ impl Accounts {
collector.push((*pubkey, account, slot))
}
},
- &ScanConfig::default(),
+ &ScanConfig::new(!sort_results),
)
.map(|_| collector)
}
@@ -503,12 +504,17 @@ impl Accounts {
ancestors: &Ancestors,
bank_id: BankId,
scan_func: F,
+ sort_results: bool,
) -> ScanResult<()>
where
F: FnMut(Option<(&Pubkey, AccountSharedData, Slot)>),
{
- self.accounts_db
- .scan_accounts(ancestors, bank_id, scan_func, &ScanConfig::default())
+ self.accounts_db.scan_accounts(
+ ancestors,
+ bank_id,
+ scan_func,
+ &ScanConfig::new(!sort_results),
+ )
}
pub fn hold_range_in_memory(
@@ -534,7 +540,7 @@ impl Accounts {
"", // disable logging of this. We now parallelize it and this results in multiple parallel logs
ancestors,
range,
- &ScanConfig::new(true),
+ &ScanConfig::default(),
|option| Self::load_with_slot(&mut collector, option),
);
collector
@@ -716,21 +722,6 @@ impl Accounts {
TransactionExecutionResult::NotExecuted(_) => continue,
};
- enum AccountCollectionMode<'a> {
- Normal,
- FailedWithNonce { nonce: &'a NonceFull },
- }
-
- let collection_mode = match (execution_status, &loaded_transaction.nonce) {
- (Ok(_), _) => AccountCollectionMode::Normal,
- (Err(_), Some(nonce)) => AccountCollectionMode::FailedWithNonce { nonce },
- (Err(_), None) => {
- // Fees for failed transactions which don't use durable nonces are
- // deducted in Bank::filter_program_errors_and_collect_fee
- continue;
- }
- };
-
// Accounts that are invoked and also not passed as an instruction
// account to a program don't need to be stored because it's assumed
// to be impossible for a committable transaction to modify an
@@ -748,21 +739,24 @@ impl Accounts {
};
let message = tx.message();
+ let rollback_accounts = &loaded_transaction.rollback_accounts;
+ let maybe_nonce_address = rollback_accounts.nonce().map(|account| account.address());
+
for (i, (address, account)) in (0..message.account_keys().len())
.zip(loaded_transaction.accounts.iter_mut())
.filter(|(i, _)| is_storable_account(message, *i))
{
if message.is_writable(i) {
- let should_collect_account = match collection_mode {
- AccountCollectionMode::Normal => true,
- AccountCollectionMode::FailedWithNonce { nonce } => {
+ let should_collect_account = match execution_status {
+ Ok(()) => true,
+ Err(_) => {
let is_fee_payer = i == 0;
- let is_nonce_account = address == nonce.address();
- post_process_failed_nonce(
+ let is_nonce_account = Some(&*address) == maybe_nonce_address;
+ post_process_failed_tx(
account,
is_fee_payer,
is_nonce_account,
- nonce,
+ rollback_accounts,
durable_nonce,
lamports_per_signature,
);
@@ -783,41 +777,43 @@ impl Accounts {
}
}
-fn post_process_failed_nonce(
+fn post_process_failed_tx(
account: &mut AccountSharedData,
is_fee_payer: bool,
is_nonce_account: bool,
- nonce: &NonceFull,
+ rollback_accounts: &RollbackAccounts,
&durable_nonce: &DurableNonce,
lamports_per_signature: u64,
) {
+ // For the case of RollbackAccounts::SameNonceAndFeePayer, it's crucial
+ // for `is_nonce_account` to be checked earlier than `is_fee_payer`.
if is_nonce_account {
- // The transaction failed which would normally drop the account
- // processing changes, since this account is now being included
- // in the accounts written back to the db, roll it back to
- // pre-processing state.
- *account = nonce.account().clone();
-
- // Advance the stored blockhash to prevent fee theft by someone
- // replaying nonce transactions that have failed with an
- // `InstructionError`.
- //
- // Since we know we are dealing with a valid nonce account,
- // unwrap is safe here
- let nonce_versions = StateMut::::state(account).unwrap();
- if let NonceState::Initialized(ref data) = nonce_versions.state() {
- let nonce_state =
- NonceState::new_initialized(&data.authority, durable_nonce, lamports_per_signature);
- let nonce_versions = NonceVersions::new(nonce_state);
- account.set_state(&nonce_versions).unwrap();
+ if let Some(nonce) = rollback_accounts.nonce() {
+ // The transaction failed which would normally drop the account
+ // processing changes, since this account is now being included
+ // in the accounts written back to the db, roll it back to
+ // pre-processing state.
+ *account = nonce.account().clone();
+
+ // Advance the stored blockhash to prevent fee theft by someone
+ // replaying nonce transactions that have failed with an
+ // `InstructionError`.
+ //
+ // Since we know we are dealing with a valid nonce account,
+ // unwrap is safe here
+ let nonce_versions = StateMut::::state(account).unwrap();
+ if let NonceState::Initialized(ref data) = nonce_versions.state() {
+ let nonce_state = NonceState::new_initialized(
+ &data.authority,
+ durable_nonce,
+ lamports_per_signature,
+ );
+ let nonce_versions = NonceVersions::new(nonce_state);
+ account.set_state(&nonce_versions).unwrap();
+ }
}
} else if is_fee_payer {
- if let Some(fee_payer_account) = nonce.fee_payer_account() {
- // Instruction error and fee-payer for this nonce tx is not
- // the nonce account itself, rollback the fee payer to the
- // fee-paid original state.
- *account = fee_payer_account.clone();
- }
+ *account = rollback_accounts.fee_payer_account().clone();
}
}
@@ -826,6 +822,7 @@ mod tests {
use {
super::*,
assert_matches::assert_matches,
+ solana_compute_budget::compute_budget_processor::ComputeBudgetLimits,
solana_sdk::{
account::{AccountSharedData, WritableAccount},
address_lookup_table::state::LookupTableMeta,
@@ -833,14 +830,17 @@ mod tests {
hash::Hash,
instruction::{CompiledInstruction, InstructionError},
message::{Message, MessageHeader},
- native_loader, nonce, nonce_account,
+ native_loader,
+ nonce::state::Data as NonceData,
+ nonce_account,
rent_debits::RentDebits,
signature::{keypair_from_seed, signers::Signers, Keypair, Signer},
system_instruction, system_program,
transaction::{Transaction, MAX_TX_ACCOUNT_LOCKS},
},
solana_svm::{
- account_loader::LoadedTransaction, transaction_results::TransactionExecutionDetails,
+ account_loader::LoadedTransaction, nonce_info::NoncePartial,
+ transaction_results::TransactionExecutionDetails,
},
std::{
borrow::Cow,
@@ -862,17 +862,13 @@ mod tests {
))
}
- fn new_execution_result(
- status: Result<()>,
- nonce: Option<&NonceFull>,
- ) -> TransactionExecutionResult {
+ fn new_execution_result(status: Result<()>) -> TransactionExecutionResult {
TransactionExecutionResult::Executed {
details: TransactionExecutionDetails {
status,
log_messages: None,
inner_instructions: None,
fee_details: FeeDetails::default(),
- is_nonce: nonce.is_some(),
return_data: None,
executed_units: 0,
accounts_data_len_delta: 0,
@@ -1569,8 +1565,9 @@ mod tests {
let loaded0 = Ok(LoadedTransaction {
accounts: transaction_accounts0,
program_indices: vec![],
- nonce: None,
fee_details: FeeDetails::default(),
+ rollback_accounts: RollbackAccounts::default(),
+ compute_budget_limits: ComputeBudgetLimits::default(),
rent: 0,
rent_debits: RentDebits::default(),
loaded_accounts_data_size: 0,
@@ -1579,8 +1576,9 @@ mod tests {
let loaded1 = Ok(LoadedTransaction {
accounts: transaction_accounts1,
program_indices: vec![],
- nonce: None,
fee_details: FeeDetails::default(),
+ rollback_accounts: RollbackAccounts::default(),
+ compute_budget_limits: ComputeBudgetLimits::default(),
rent: 0,
rent_debits: RentDebits::default(),
loaded_accounts_data_size: 0,
@@ -1598,7 +1596,7 @@ mod tests {
.insert_new_readonly(&pubkey);
}
let txs = vec![tx0.clone(), tx1.clone()];
- let execution_results = vec![new_execution_result(Ok(()), None); 2];
+ let execution_results = vec![new_execution_result(Ok(())); 2];
let (collected_accounts, transactions) = accounts.collect_accounts_to_store(
&txs,
&execution_results,
@@ -1655,34 +1653,26 @@ mod tests {
accounts.accounts_db.clean_accounts_for_tests();
}
- fn create_accounts_post_process_failed_nonce() -> (
+ fn create_accounts_post_process_failed_tx() -> (
Pubkey,
AccountSharedData,
AccountSharedData,
DurableNonce,
u64,
- Option,
) {
- let data = NonceVersions::new(NonceState::Initialized(nonce::state::Data::default()));
+ let data = NonceVersions::new(NonceState::Initialized(NonceData::default()));
let account = AccountSharedData::new_data(42, &data, &system_program::id()).unwrap();
let mut pre_account = account.clone();
pre_account.set_lamports(43);
let durable_nonce = DurableNonce::from_blockhash(&Hash::new(&[1u8; 32]));
- (
- Pubkey::default(),
- pre_account,
- account,
- durable_nonce,
- 1234,
- None,
- )
+ (Pubkey::default(), pre_account, account, durable_nonce, 1234)
}
- fn run_post_process_failed_nonce_test(
+ fn run_post_process_failed_tx_test(
account: &mut AccountSharedData,
is_fee_payer: bool,
is_nonce_account: bool,
- nonce: &NonceFull,
+ rollback_accounts: &RollbackAccounts,
durable_nonce: &DurableNonce,
lamports_per_signature: u64,
expect_account: &AccountSharedData,
@@ -1690,17 +1680,17 @@ mod tests {
// Verify expect_account's relationship
if !is_fee_payer {
if is_nonce_account {
- assert_ne!(expect_account, nonce.account());
+ assert_ne!(expect_account, rollback_accounts.nonce().unwrap().account());
} else {
assert_eq!(expect_account, account);
}
}
- post_process_failed_nonce(
+ post_process_failed_tx(
account,
is_fee_payer,
is_nonce_account,
- nonce,
+ rollback_accounts,
durable_nonce,
lamports_per_signature,
);
@@ -1709,33 +1699,25 @@ mod tests {
}
#[test]
- fn test_post_process_failed_nonce_expected() {
- let (
- pre_account_address,
- pre_account,
- mut post_account,
- blockhash,
- lamports_per_signature,
- maybe_fee_payer_account,
- ) = create_accounts_post_process_failed_nonce();
- let nonce = NonceFull::new(
- pre_account_address,
- pre_account.clone(),
- maybe_fee_payer_account,
- );
+ fn test_post_process_failed_tx_expected() {
+ let (pre_account_address, pre_account, mut post_account, blockhash, lamports_per_signature) =
+ create_accounts_post_process_failed_tx();
+ let rollback_accounts = RollbackAccounts::SameNonceAndFeePayer {
+ nonce: NoncePartial::new(pre_account_address, pre_account.clone()),
+ };
let mut expect_account = pre_account;
expect_account
.set_state(&NonceVersions::new(NonceState::Initialized(
- nonce::state::Data::new(Pubkey::default(), blockhash, lamports_per_signature),
+ NonceData::new(Pubkey::default(), blockhash, lamports_per_signature),
)))
.unwrap();
- assert!(run_post_process_failed_nonce_test(
+ assert!(run_post_process_failed_tx_test(
&mut post_account,
false, // is_fee_payer
true, // is_nonce_account
- &nonce,
+ &rollback_accounts,
&blockhash,
lamports_per_signature,
&expect_account,
@@ -1743,24 +1725,20 @@ mod tests {
}
#[test]
- fn test_post_process_failed_nonce_not_nonce_address() {
- let (
- pre_account_address,
- pre_account,
- mut post_account,
- blockhash,
- lamports_per_signature,
- maybe_fee_payer_account,
- ) = create_accounts_post_process_failed_nonce();
+ fn test_post_process_failed_tx_not_nonce_address() {
+ let (pre_account_address, pre_account, mut post_account, blockhash, lamports_per_signature) =
+ create_accounts_post_process_failed_tx();
- let nonce = NonceFull::new(pre_account_address, pre_account, maybe_fee_payer_account);
+ let rollback_accounts = RollbackAccounts::SameNonceAndFeePayer {
+ nonce: NoncePartial::new(pre_account_address, pre_account.clone()),
+ };
let expect_account = post_account.clone();
- assert!(run_post_process_failed_nonce_test(
+ assert!(run_post_process_failed_tx_test(
&mut post_account,
false, // is_fee_payer
false, // is_nonce_account
- &nonce,
+ &rollback_accounts,
&blockhash,
lamports_per_signature,
&expect_account,
@@ -1774,27 +1752,26 @@ mod tests {
AccountSharedData::new_data(42, &(), &system_program::id()).unwrap();
let post_fee_payer_account =
AccountSharedData::new_data(84, &[1, 2, 3, 4], &system_program::id()).unwrap();
- let nonce = NonceFull::new(
- Pubkey::new_unique(),
- nonce_account,
- Some(pre_fee_payer_account.clone()),
- );
+ let rollback_accounts = RollbackAccounts::SeparateNonceAndFeePayer {
+ nonce: NoncePartial::new(Pubkey::new_unique(), nonce_account),
+ fee_payer_account: pre_fee_payer_account.clone(),
+ };
- assert!(run_post_process_failed_nonce_test(
+ assert!(run_post_process_failed_tx_test(
&mut post_fee_payer_account.clone(),
false, // is_fee_payer
false, // is_nonce_account
- &nonce,
+ &rollback_accounts,
&DurableNonce::default(),
1,
&post_fee_payer_account,
));
- assert!(run_post_process_failed_nonce_test(
+ assert!(run_post_process_failed_tx_test(
&mut post_fee_payer_account.clone(),
true, // is_fee_payer
false, // is_nonce_account
- &nonce,
+ &rollback_accounts,
&DurableNonce::default(),
1,
&pre_fee_payer_account,
@@ -1809,7 +1786,7 @@ mod tests {
let from_address = from.pubkey();
let to_address = Pubkey::new_unique();
let durable_nonce = DurableNonce::from_blockhash(&Hash::new_unique());
- let nonce_state = NonceVersions::new(NonceState::Initialized(nonce::state::Data::new(
+ let nonce_state = NonceVersions::new(NonceState::Initialized(NonceData::new(
nonce_authority.pubkey(),
durable_nonce,
0,
@@ -1837,7 +1814,7 @@ mod tests {
let tx = new_sanitized_tx(&[&nonce_authority, &from], message, blockhash);
let durable_nonce = DurableNonce::from_blockhash(&Hash::new_unique());
- let nonce_state = NonceVersions::new(NonceState::Initialized(nonce::state::Data::new(
+ let nonce_state = NonceVersions::new(NonceState::Initialized(NonceData::new(
nonce_authority.pubkey(),
durable_nonce,
0,
@@ -1846,17 +1823,16 @@ mod tests {
AccountSharedData::new_data(42, &nonce_state, &system_program::id()).unwrap();
let from_account_pre = AccountSharedData::new(4242, 0, &Pubkey::default());
- let nonce = Some(NonceFull::new(
- nonce_address,
- nonce_account_pre.clone(),
- Some(from_account_pre.clone()),
- ));
-
+ let nonce = NoncePartial::new(nonce_address, nonce_account_pre.clone());
let loaded = Ok(LoadedTransaction {
accounts: transaction_accounts,
program_indices: vec![],
- nonce: nonce.clone(),
fee_details: FeeDetails::default(),
+ rollback_accounts: RollbackAccounts::SeparateNonceAndFeePayer {
+ nonce: nonce.clone(),
+ fee_payer_account: from_account_pre.clone(),
+ },
+ compute_budget_limits: ComputeBudgetLimits::default(),
rent: 0,
rent_debits: RentDebits::default(),
loaded_accounts_data_size: 0,
@@ -1868,13 +1844,9 @@ mod tests {
let accounts_db = AccountsDb::new_single_for_tests();
let accounts = Accounts::new(Arc::new(accounts_db));
let txs = vec![tx];
- let execution_results = vec![new_execution_result(
- Err(TransactionError::InstructionError(
- 1,
- InstructionError::InvalidArgument,
- )),
- nonce.as_ref(),
- )];
+ let execution_results = vec![new_execution_result(Err(
+ TransactionError::InstructionError(1, InstructionError::InvalidArgument),
+ ))];
let (collected_accounts, _) = accounts.collect_accounts_to_store(
&txs,
&execution_results,
@@ -1916,7 +1888,7 @@ mod tests {
let from_address = from.pubkey();
let to_address = Pubkey::new_unique();
let durable_nonce = DurableNonce::from_blockhash(&Hash::new_unique());
- let nonce_state = NonceVersions::new(NonceState::Initialized(nonce::state::Data::new(
+ let nonce_state = NonceVersions::new(NonceState::Initialized(NonceData::new(
nonce_authority.pubkey(),
durable_nonce,
0,
@@ -1944,7 +1916,7 @@ mod tests {
let tx = new_sanitized_tx(&[&nonce_authority, &from], message, blockhash);
let durable_nonce = DurableNonce::from_blockhash(&Hash::new_unique());
- let nonce_state = NonceVersions::new(NonceState::Initialized(nonce::state::Data::new(
+ let nonce_state = NonceVersions::new(NonceState::Initialized(NonceData::new(
nonce_authority.pubkey(),
durable_nonce,
0,
@@ -1952,17 +1924,15 @@ mod tests {
let nonce_account_pre =
AccountSharedData::new_data(42, &nonce_state, &system_program::id()).unwrap();
- let nonce = Some(NonceFull::new(
- nonce_address,
- nonce_account_pre.clone(),
- None,
- ));
-
+ let nonce = NoncePartial::new(nonce_address, nonce_account_pre.clone());
let loaded = Ok(LoadedTransaction {
accounts: transaction_accounts,
program_indices: vec![],
- nonce: nonce.clone(),
fee_details: FeeDetails::default(),
+ rollback_accounts: RollbackAccounts::SameNonceAndFeePayer {
+ nonce: nonce.clone(),
+ },
+ compute_budget_limits: ComputeBudgetLimits::default(),
rent: 0,
rent_debits: RentDebits::default(),
loaded_accounts_data_size: 0,
@@ -1974,13 +1944,9 @@ mod tests {
let accounts_db = AccountsDb::new_single_for_tests();
let accounts = Accounts::new(Arc::new(accounts_db));
let txs = vec![tx];
- let execution_results = vec![new_execution_result(
- Err(TransactionError::InstructionError(
- 1,
- InstructionError::InvalidArgument,
- )),
- nonce.as_ref(),
- )];
+ let execution_results = vec![new_execution_result(Err(
+ TransactionError::InstructionError(1, InstructionError::InvalidArgument),
+ ))];
let (collected_accounts, _) = accounts.collect_accounts_to_store(
&txs,
&execution_results,
@@ -2046,7 +2012,8 @@ mod tests {
bank_id,
0,
&HashSet::new(),
- AccountAddressFilter::Exclude
+ AccountAddressFilter::Exclude,
+ false
)
.unwrap(),
vec![]
@@ -2058,7 +2025,8 @@ mod tests {
bank_id,
0,
&all_pubkeys,
- AccountAddressFilter::Include
+ AccountAddressFilter::Include,
+ false
)
.unwrap(),
vec![]
@@ -2073,7 +2041,8 @@ mod tests {
bank_id,
1,
&HashSet::new(),
- AccountAddressFilter::Exclude
+ AccountAddressFilter::Exclude,
+ false
)
.unwrap(),
vec![(pubkey1, 42)]
@@ -2085,7 +2054,8 @@ mod tests {
bank_id,
2,
&HashSet::new(),
- AccountAddressFilter::Exclude
+ AccountAddressFilter::Exclude,
+ false
)
.unwrap(),
vec![(pubkey1, 42), (pubkey0, 42)]
@@ -2097,7 +2067,8 @@ mod tests {
bank_id,
3,
&HashSet::new(),
- AccountAddressFilter::Exclude
+ AccountAddressFilter::Exclude,
+ false
)
.unwrap(),
vec![(pubkey1, 42), (pubkey0, 42), (pubkey2, 41)]
@@ -2111,7 +2082,8 @@ mod tests {
bank_id,
6,
&HashSet::new(),
- AccountAddressFilter::Exclude
+ AccountAddressFilter::Exclude,
+ false
)
.unwrap(),
vec![(pubkey1, 42), (pubkey0, 42), (pubkey2, 41)]
@@ -2126,7 +2098,8 @@ mod tests {
bank_id,
1,
&exclude1,
- AccountAddressFilter::Exclude
+ AccountAddressFilter::Exclude,
+ false
)
.unwrap(),
vec![(pubkey0, 42)]
@@ -2138,7 +2111,8 @@ mod tests {
bank_id,
2,
&exclude1,
- AccountAddressFilter::Exclude
+ AccountAddressFilter::Exclude,
+ false
)
.unwrap(),
vec![(pubkey0, 42), (pubkey2, 41)]
@@ -2150,7 +2124,8 @@ mod tests {
bank_id,
3,
&exclude1,
- AccountAddressFilter::Exclude
+ AccountAddressFilter::Exclude,
+ false
)
.unwrap(),
vec![(pubkey0, 42), (pubkey2, 41)]
@@ -2165,7 +2140,8 @@ mod tests {
bank_id,
1,
&include1_2,
- AccountAddressFilter::Include
+ AccountAddressFilter::Include,
+ false
)
.unwrap(),
vec![(pubkey1, 42)]
@@ -2177,7 +2153,8 @@ mod tests {
bank_id,
2,
&include1_2,
- AccountAddressFilter::Include
+ AccountAddressFilter::Include,
+ false
)
.unwrap(),
vec![(pubkey1, 42), (pubkey2, 41)]
@@ -2189,7 +2166,8 @@ mod tests {
bank_id,
3,
&include1_2,
- AccountAddressFilter::Include
+ AccountAddressFilter::Include,
+ false
)
.unwrap(),
vec![(pubkey1, 42), (pubkey2, 41)]
@@ -2217,7 +2195,10 @@ mod tests {
#[test]
fn test_maybe_abort_scan() {
assert!(Accounts::maybe_abort_scan(ScanResult::Ok(vec![]), &ScanConfig::default()).is_ok());
- let config = ScanConfig::default().recreate_with_abort();
+ assert!(
+ Accounts::maybe_abort_scan(ScanResult::Ok(vec![]), &ScanConfig::new(false)).is_ok()
+ );
+ let config = ScanConfig::new(false).recreate_with_abort();
assert!(Accounts::maybe_abort_scan(ScanResult::Ok(vec![]), &config).is_ok());
config.abort();
assert!(Accounts::maybe_abort_scan(ScanResult::Ok(vec![]), &config).is_err());
diff --git a/accounts-db/src/accounts_db.rs b/accounts-db/src/accounts_db.rs
index c21f000975b235..5f312704f540b5 100644
--- a/accounts-db/src/accounts_db.rs
+++ b/accounts-db/src/accounts_db.rs
@@ -1701,7 +1701,7 @@ impl SplitAncientStorages {
i += 1;
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 cachable 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;
}
@@ -1957,6 +1957,9 @@ pub(crate) struct ShrinkAncientStats {
pub(crate) slots_considered: AtomicU64,
pub(crate) ancient_scanned: AtomicU64,
pub(crate) bytes_ancient_created: AtomicU64,
+ pub(crate) bytes_from_must_shrink: AtomicU64,
+ pub(crate) bytes_from_smallest_storages: AtomicU64,
+ pub(crate) bytes_from_newest_storages: AtomicU64,
pub(crate) many_ref_slots_skipped: AtomicU64,
pub(crate) slots_cannot_move_count: AtomicU64,
pub(crate) many_refs_old_alive: AtomicU64,
@@ -2250,6 +2253,21 @@ impl ShrinkAncientStats {
// i64
// ),
// (
+ // "bytes_from_must_shrink",
+ // self.bytes_from_must_shrink.swap(0, Ordering::Relaxed) as i64,
+ // i64
+ // ),
+ // (
+ // "bytes_from_smallest_storages",
+ // self.bytes_from_smallest_storages.swap(0, Ordering::Relaxed) as i64,
+ // i64
+ // ),
+ // (
+ // "bytes_from_newest_storages",
+ // self.bytes_from_newest_storages.swap(0, Ordering::Relaxed) as i64,
+ // i64
+ // ),
+ // (
// "many_ref_slots_skipped",
// self.many_ref_slots_skipped.swap(0, Ordering::Relaxed),
// i64
@@ -5790,7 +5808,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 whehter 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) {
@@ -6174,7 +6192,7 @@ impl AccountsDb {
// allocate a buffer on the stack that's big enough
// to hold a token account or a stake account
const META_SIZE: usize = 8 /* lamports */ + 8 /* rent_epoch */ + 1 /* executable */ + 32 /* owner */ + 32 /* pubkey */;
- const DATA_SIZE: usize = 200; // stake acounts are 200 B and token accounts are 165-182ish B
+ const DATA_SIZE: usize = 200; // stake accounts are 200 B and token accounts are 165-182ish B
const BUFFER_SIZE: usize = META_SIZE + DATA_SIZE;
let mut buffer = SmallVec::<[u8; BUFFER_SIZE]>::new();
@@ -8942,7 +8960,7 @@ impl AccountsDb {
// these write directly to disk, so the more threads, the better
num_cpus::get()
} else {
- // seems to be a good hueristic given varying # cpus for in-mem disk index
+ // seems to be a good heuristic given varying # cpus for in-mem disk index
8
};
let chunk_size = (outer_slots_len / (std::cmp::max(1, threads.saturating_sub(1)))) + 1; // approximately 400k slots in a snapshot
diff --git a/accounts-db/src/accounts_db/geyser_plugin_utils.rs b/accounts-db/src/accounts_db/geyser_plugin_utils.rs
index efd765e0c722b7..b4f11664ab7955 100644
--- a/accounts-db/src/accounts_db/geyser_plugin_utils.rs
+++ b/accounts-db/src/accounts_db/geyser_plugin_utils.rs
@@ -121,7 +121,7 @@ impl AccountsDb {
// later entries in the same slot are more recent and override earlier accounts for the same pubkey
// We can pass an incrementing number here for write_version in the future, if the storage does not have a write_version.
- // As long as all accounts for this slot are in 1 append vec that can be itereated olest to newest.
+ // As long as all accounts for this slot are in 1 append vec that can be iterated oldest to newest.
self.notify_filtered_accounts(
slot,
notified_accounts,
diff --git a/accounts-db/src/accounts_hash.rs b/accounts-db/src/accounts_hash.rs
index 2d673b13d2d08d..b2ffff49eea56b 100644
--- a/accounts-db/src/accounts_hash.rs
+++ b/accounts-db/src/accounts_hash.rs
@@ -5,7 +5,7 @@ use {
ancestors::Ancestors,
pubkey_bins::PubkeyBinCalculator24,
},
- bytemuck::{Pod, Zeroable},
+ bytemuck_derive::{Pod, Zeroable},
log::*,
memmap2::MmapMut,
rayon::prelude::*,
diff --git a/accounts-db/src/accounts_index.rs b/accounts-db/src/accounts_index.rs
index db7ddf6ea2e44e..6df2051556c809 100644
--- a/accounts-db/src/accounts_index.rs
+++ b/accounts-db/src/accounts_index.rs
@@ -90,7 +90,7 @@ pub enum UpsertReclaim {
IgnoreReclaims,
}
-#[derive(Debug, Default)]
+#[derive(Debug)]
pub struct ScanConfig {
/// checked by the scan. When true, abort scan.
pub abort: Option>,
@@ -100,11 +100,20 @@ pub struct ScanConfig {
pub collect_all_unsorted: bool,
}
+impl Default for ScanConfig {
+ fn default() -> Self {
+ Self {
+ abort: None,
+ collect_all_unsorted: true,
+ }
+ }
+}
+
impl ScanConfig {
pub fn new(collect_all_unsorted: bool) -> Self {
Self {
collect_all_unsorted,
- ..ScanConfig::default()
+ ..Default::default()
}
}
@@ -4210,10 +4219,14 @@ pub mod tests {
assert!(!config.is_aborted());
}
- let config = ScanConfig::default();
+ let config = ScanConfig::new(false);
assert!(!config.collect_all_unsorted);
assert!(config.abort.is_none());
+ let config = ScanConfig::default();
+ assert!(config.collect_all_unsorted);
+ assert!(config.abort.is_none());
+
let config = config.recreate_with_abort();
assert!(config.abort.is_some());
assert!(!config.is_aborted());
diff --git a/accounts-db/src/ancient_append_vecs.rs b/accounts-db/src/ancient_append_vecs.rs
index 5b73aab489d6ac..07660e33efaf31 100644
--- a/accounts-db/src/ancient_append_vecs.rs
+++ b/accounts-db/src/ancient_append_vecs.rs
@@ -8,8 +8,8 @@ use {
account_storage::ShrinkInProgress,
accounts_db::{
AccountFromStorage, AccountStorageEntry, AccountsDb, AliveAccounts,
- GetUniqueAccountsResult, ShrinkCollect, ShrinkCollectAliveSeparatedByRefs,
- ShrinkStatsSub,
+ GetUniqueAccountsResult, ShrinkAncientStats, ShrinkCollect,
+ ShrinkCollectAliveSeparatedByRefs, ShrinkStatsSub,
},
accounts_file::AccountsFile,
accounts_index::AccountsIndexScanResult,
@@ -27,6 +27,10 @@ use {
},
};
+/// this many # of highest slot values should be treated as desirable to pack.
+/// This gives us high slots to move packed accounts into.
+const HIGH_SLOT_OFFSET: u64 = 100;
+
/// ancient packing algorithm tuning per pass
#[derive(Debug)]
struct PackedAncientStorageTuning {
@@ -57,6 +61,9 @@ struct SlotInfo {
alive_bytes: u64,
/// true if this should be shrunk due to ratio
should_shrink: bool,
+ /// this slot is a high slot #
+ /// It is important to include some high slot #s so that we have new slots to try each time pack runs.
+ is_high_slot: bool,
}
/// info for all storages in ancient slots
@@ -83,6 +90,7 @@ impl AncientSlotInfos {
storage: Arc,
can_randomly_shrink: bool,
ideal_size: NonZeroU64,
+ is_high_slot: bool,
) -> bool {
let mut was_randomly_shrunk = false;
let alive_bytes = storage.alive_bytes() as u64;
@@ -122,6 +130,7 @@ impl AncientSlotInfos {
storage,
alive_bytes,
should_shrink,
+ is_high_slot,
});
self.total_alive_bytes += alive_bytes;
}
@@ -130,12 +139,16 @@ impl AncientSlotInfos {
/// modify 'self' to contain only the slot infos for the slots that should be combined
/// (and in this process effectively shrunk)
- fn filter_ancient_slots(&mut self, tuning: &PackedAncientStorageTuning) {
+ fn filter_ancient_slots(
+ &mut self,
+ tuning: &PackedAncientStorageTuning,
+ stats: &ShrinkAncientStats,
+ ) {
// figure out which slots to combine
// 1. should_shrink: largest bytes saved above some cutoff of ratio
self.choose_storages_to_shrink(tuning);
// 2. smallest files so we get the largest number of files to remove
- self.filter_by_smallest_capacity(tuning);
+ self.filter_by_smallest_capacity(tuning, stats);
}
// sort 'shrink_indexes' by most bytes saved, highest to lowest
@@ -185,42 +198,73 @@ impl AncientSlotInfos {
/// 'all_infos' are combined, the total number of storages <= 'max_storages'
/// The idea is that 'all_infos' is sorted from smallest capacity to largest,
/// but that isn't required for this function to be 'correct'.
- fn truncate_to_max_storages(&mut self, tuning: &PackedAncientStorageTuning) {
+ fn truncate_to_max_storages(
+ &mut self,
+ tuning: &PackedAncientStorageTuning,
+ stats: &ShrinkAncientStats,
+ ) {
// these indexes into 'all_infos' are useless once we truncate 'all_infos', so make sure they're cleared out to avoid any issues
self.shrink_indexes.clear();
let total_storages = self.all_infos.len();
let mut cumulative_bytes = Saturating(0u64);
let low_threshold = tuning.max_ancient_slots * 50 / 100;
+ let mut bytes_from_must_shrink = 0;
+ let mut bytes_from_smallest_storages = 0;
+ let mut bytes_from_newest_storages = 0;
for (i, info) in self.all_infos.iter().enumerate() {
cumulative_bytes += info.alive_bytes;
let ancient_storages_required =
- (cumulative_bytes.0 / tuning.ideal_storage_size + 1) as usize;
+ div_ceil(cumulative_bytes.0, tuning.ideal_storage_size) as usize;
let storages_remaining = total_storages - i - 1;
// if the remaining uncombined storages and the # of resulting
- // combined ancient storages is less than the threshold, then
+ // combined ancient storages are less than the threshold, then
// we've gone too far, so get rid of this entry and all after it.
- // Every storage after this one is larger.
+ // Every storage after this one is larger than the ones we've chosen.
// if we ever get to more than `max_resulting_storages` required ancient storages, that is enough to stop for now.
- // It will take a while to create that many. This should be a limit that only affects
- // extreme testing environments.
- if storages_remaining + ancient_storages_required < low_threshold
- || ancient_storages_required as u64 > u64::from(tuning.max_resulting_storages)
+ // It will take a lot of time for the pack algorithm to create that many, and that is bad for system performance.
+ // This should be a limit that only affects extreme testing environments.
+ // We do not stop including entries until we have dealt with all the high slot #s. This allows the algorithm to continue
+ // to make progress each time it is called. There are exceptions that can cause the pack to fail, such as accounts with multiple
+ // refs.
+ if !info.is_high_slot
+ && (storages_remaining + ancient_storages_required < low_threshold
+ || ancient_storages_required as u64 > u64::from(tuning.max_resulting_storages))
{
self.all_infos.truncate(i);
break;
}
+ if info.should_shrink {
+ bytes_from_must_shrink += info.alive_bytes;
+ } else if info.is_high_slot {
+ bytes_from_newest_storages += info.alive_bytes;
+ } else {
+ bytes_from_smallest_storages += info.alive_bytes;
+ }
}
+ stats
+ .bytes_from_must_shrink
+ .fetch_add(bytes_from_must_shrink, Ordering::Relaxed);
+ stats
+ .bytes_from_smallest_storages
+ .fetch_add(bytes_from_smallest_storages, Ordering::Relaxed);
+ stats
+ .bytes_from_newest_storages
+ .fetch_add(bytes_from_newest_storages, Ordering::Relaxed);
}
/// remove entries from 'all_infos' such that combining
/// the remaining entries into storages of 'ideal_storage_size'
/// will get us below 'max_storages'
- /// The entires that are removed will be reconsidered the next time around.
+ /// The entries that are removed will be reconsidered the next time around.
/// Combining too many storages costs i/o and cpu so the goal is to find the sweet spot so
/// that we make progress in cleaning/shrinking/combining but that we don't cause unnecessary
/// churn.
- fn filter_by_smallest_capacity(&mut self, tuning: &PackedAncientStorageTuning) {
+ fn filter_by_smallest_capacity(
+ &mut self,
+ tuning: &PackedAncientStorageTuning,
+ stats: &ShrinkAncientStats,
+ ) {
let total_storages = self.all_infos.len();
if total_storages <= tuning.max_ancient_slots {
// currently fewer storages than max, so nothing to shrink
@@ -229,16 +273,21 @@ impl AncientSlotInfos {
return;
}
- // sort by 'should_shrink' then smallest capacity to largest
+ // sort by:
+ // 1. `high_slot`: we want to include new, high slots each time so that we try new slots
+ // each time alg runs and have several high target slots for packed storages.
+ // 2. 'should_shrink' so we make progress on shrinking ancient storages
+ // 3. smallest capacity to largest so that we remove the most slots possible
self.all_infos.sort_unstable_by(|l, r| {
- r.should_shrink
- .cmp(&l.should_shrink)
+ r.is_high_slot
+ .cmp(&l.is_high_slot)
+ .then_with(|| r.should_shrink.cmp(&l.should_shrink))
.then_with(|| l.capacity.cmp(&r.capacity))
});
// remove any storages we don't need to combine this pass to achieve
// # resulting storages <= 'max_storages'
- self.truncate_to_max_storages(tuning);
+ self.truncate_to_max_storages(tuning, stats);
}
}
@@ -452,7 +501,7 @@ impl AccountsDb {
tuning.ideal_storage_size,
);
- ancient_slot_infos.filter_ancient_slots(tuning);
+ ancient_slot_infos.filter_ancient_slots(tuning, &self.shrink_ancient_stats);
ancient_slot_infos
}
@@ -498,10 +547,20 @@ impl AccountsDb {
..AncientSlotInfos::default()
};
let mut randoms = 0;
+ let max_slot = slots.iter().max().cloned().unwrap_or_default();
+ // heuristic to include some # of newly eligible ancient slots so that the pack algorithm always makes progress
+ let high_slot_boundary = max_slot.saturating_sub(HIGH_SLOT_OFFSET);
+ let is_high_slot = |slot| slot >= high_slot_boundary;
for slot in &slots {
if let Some(storage) = self.storage.get_slot_storage_entry(*slot) {
- if infos.add(*slot, storage, can_randomly_shrink, ideal_size) {
+ if infos.add(
+ *slot,
+ storage,
+ can_randomly_shrink,
+ ideal_size,
+ is_high_slot(*slot),
+ ) {
randoms += 1;
}
}
@@ -548,9 +607,6 @@ impl AccountsDb {
self.thread_pool_clean.install(|| {
packer.par_iter().for_each(|(target_slot, pack)| {
let mut write_ancient_accounts_local = WriteAncientAccounts::default();
- self.shrink_ancient_stats
- .bytes_ancient_created
- .fetch_add(pack.bytes, Ordering::Relaxed);
self.write_one_packed_storage(
pack,
**target_slot,
@@ -1059,6 +1115,25 @@ pub fn is_ancient(storage: &AccountsFile) -> bool {
storage.capacity() >= get_ancient_append_vec_capacity()
}
+/// Divides `x` by `y` and rounds up
+///
+/// # Notes
+///
+/// It is undefined behavior if `x + y` overflows a u64.
+/// Debug builds check this invariant, and will panic if broken.
+fn div_ceil(x: u64, y: NonZeroU64) -> u64 {
+ let y = y.get();
+ debug_assert!(
+ x.checked_add(y).is_some(),
+ "x + y must not overflow! x: {x}, y: {y}",
+ );
+ // SAFETY: The caller guaranteed `x + y` does not overflow
+ // SAFETY: Since `y` is NonZero:
+ // - we know the denominator is > 0, and thus safe (cannot have divide-by-zero)
+ // - we know `x + y` is non-zero, and thus the numerator is safe (cannot underflow)
+ (x + y - 1) / y
+}
+
#[cfg(test)]
pub mod tests {
use {
@@ -1078,17 +1153,22 @@ pub mod tests {
},
accounts_hash::AccountHash,
accounts_index::UpsertReclaim,
- append_vec::{aligned_stored_size, AppendVec, AppendVecStoredAccountMeta},
+ append_vec::{
+ aligned_stored_size, AppendVec, AppendVecStoredAccountMeta,
+ MAXIMUM_APPEND_VEC_FILE_SIZE,
+ },
storable_accounts::{tests::build_accounts_from_storage, StorableAccountsBySlot},
},
+ rand::seq::SliceRandom as _,
solana_sdk::{
account::{AccountSharedData, ReadableAccount, WritableAccount},
hash::Hash,
pubkey::Pubkey,
},
- std::ops::Range,
+ std::{collections::HashSet, ops::Range},
strum::IntoEnumIterator,
strum_macros::EnumIter,
+ test_case::test_case,
};
fn get_sample_storages(
@@ -1105,6 +1185,7 @@ pub mod tests {
let original_stores = (0..slots)
.filter_map(|slot| db.storage.get_slot_storage_entry((slot as Slot) + slot1))
.collect::>();
+ let is_high_slot = false;
let slot_infos = original_stores
.iter()
.map(|storage| SlotInfo {
@@ -1113,6 +1194,7 @@ pub mod tests {
capacity: 0,
alive_bytes: 0,
should_shrink: false,
+ is_high_slot,
})
.collect();
(
@@ -2379,6 +2461,7 @@ pub mod tests {
let mut infos = AncientSlotInfos::default();
let storage = db.storage.get_slot_storage_entry(slot1).unwrap();
let alive_bytes_expected = storage.alive_bytes();
+ let high_slot = false;
match method {
TestCollectInfo::Add => {
// test lower level 'add'
@@ -2387,6 +2470,7 @@ pub mod tests {
Arc::clone(&storage),
can_randomly_shrink,
NonZeroU64::new(get_ancient_append_vec_capacity()).unwrap(),
+ high_slot,
);
}
TestCollectInfo::CalcAncientSlotInfo => {
@@ -2445,12 +2529,14 @@ pub mod tests {
let (db, slot1) = create_db_with_storages_and_index(alive, slots, None);
let mut infos = AncientSlotInfos::default();
let storage = db.storage.get_slot_storage_entry(slot1).unwrap();
+ let high_slot = false;
if call_add {
infos.add(
slot1,
Arc::clone(&storage),
can_randomly_shrink,
NonZeroU64::new(get_ancient_append_vec_capacity()).unwrap(),
+ high_slot,
);
} else {
infos = db.calc_ancient_slot_info(
@@ -2628,6 +2714,7 @@ pub mod tests {
capacity: 1,
alive_bytes: 1,
should_shrink: false,
+ is_high_slot: false,
})
.collect(),
shrink_indexes: (0..count).collect(),
@@ -2659,10 +2746,10 @@ pub mod tests {
match method {
TestSmallestCapacity::FilterAncientSlots => {
infos.shrink_indexes.clear();
- infos.filter_ancient_slots(&tuning);
+ infos.filter_ancient_slots(&tuning, &ShrinkAncientStats::default());
}
TestSmallestCapacity::FilterBySmallestCapacity => {
- infos.filter_by_smallest_capacity(&tuning);
+ infos.filter_by_smallest_capacity(&tuning, &ShrinkAncientStats::default());
}
}
assert!(infos.all_infos.is_empty());
@@ -2671,7 +2758,7 @@ pub mod tests {
}
#[test]
- fn test_filter_by_smaller_capacity_sort() {
+ fn test_filter_by_smallest_capacity_sort() {
// max is 6
// 7 storages
// storage[last] is big enough to cause us to need another storage
@@ -2705,11 +2792,11 @@ pub mod tests {
};
match method {
TestSmallestCapacity::FilterBySmallestCapacity => {
- infos.filter_by_smallest_capacity(&tuning);
+ infos.filter_by_smallest_capacity(&tuning, &ShrinkAncientStats::default());
}
TestSmallestCapacity::FilterAncientSlots => {
infos.shrink_indexes.clear();
- infos.filter_ancient_slots(&tuning);
+ infos.filter_ancient_slots(&tuning, &ShrinkAncientStats::default());
}
}
assert_eq!(
@@ -2729,11 +2816,106 @@ pub mod tests {
}
}
+ /// Test that we always include the high slots when filtering which ancient infos to pack
+ ///
+ /// If we have *more* high slots than max resulting storages set in the tuning parameters,
+ /// we should still have all the high slots after calling `filter_by_smallest_capacity().
+ #[test]
+ fn test_filter_by_smallest_capacity_high_slot_more() {
+ let tuning = default_tuning();
+
+ // Ensure we have more storages with high slots than the 'max resulting storages'.
+ let num_high_slots = tuning.max_resulting_storages.get() * 2;
+ let num_ancient_storages = num_high_slots * 3;
+ let mut infos = create_test_infos(num_ancient_storages as usize);
+ infos
+ .all_infos
+ .sort_unstable_by_key(|slot_info| slot_info.slot);
+ infos
+ .all_infos
+ .iter_mut()
+ .rev()
+ .take(num_high_slots as usize)
+ .for_each(|slot_info| {
+ slot_info.is_high_slot = true;
+ });
+ let slots_expected: Vec<_> = infos
+ .all_infos
+ .iter()
+ .filter_map(|slot_info| slot_info.is_high_slot.then_some(slot_info.slot))
+ .collect();
+
+ // shuffle the infos so they actually need to be sorted
+ infos.all_infos.shuffle(&mut thread_rng());
+ infos.filter_by_smallest_capacity(&tuning, &ShrinkAncientStats::default());
+
+ infos
+ .all_infos
+ .sort_unstable_by_key(|slot_info| slot_info.slot);
+ let slots_actual: Vec<_> = infos
+ .all_infos
+ .iter()
+ .map(|slot_info| slot_info.slot)
+ .collect();
+ assert_eq!(infos.all_infos.len() as u64, num_high_slots);
+ assert_eq!(slots_actual, slots_expected);
+ }
+
+ /// Test that we always include the high slots when filtering which ancient infos to pack
+ ///
+ /// If we have *less* high slots than max resulting storages set in the tuning parameters,
+ /// we should still have all the high slots after calling `filter_by_smallest_capacity().
+ #[test]
+ fn test_filter_by_smallest_capacity_high_slot_less() {
+ let tuning = default_tuning();
+
+ // Ensure we have less storages with high slots than the 'max resulting storages'.
+ let num_high_slots = tuning.max_resulting_storages.get() / 2;
+ let num_ancient_storages = num_high_slots * 5;
+ let mut infos = create_test_infos(num_ancient_storages as usize);
+ infos
+ .all_infos
+ .sort_unstable_by_key(|slot_info| slot_info.slot);
+ infos
+ .all_infos
+ .iter_mut()
+ .rev()
+ .take(num_high_slots as usize)
+ .for_each(|slot_info| {
+ slot_info.is_high_slot = true;
+ });
+ let high_slots: Vec<_> = infos
+ .all_infos
+ .iter()
+ .filter_map(|slot_info| slot_info.is_high_slot.then_some(slot_info.slot))
+ .collect();
+
+ // shuffle the infos so they actually need to be sorted
+ infos.all_infos.shuffle(&mut thread_rng());
+ infos.filter_by_smallest_capacity(&tuning, &ShrinkAncientStats::default());
+
+ infos
+ .all_infos
+ .sort_unstable_by_key(|slot_info| slot_info.slot);
+ let slots_actual: HashSet<_> = infos
+ .all_infos
+ .iter()
+ .map(|slot_info| slot_info.slot)
+ .collect();
+ assert_eq!(
+ infos.all_infos.len() as u64,
+ tuning.max_resulting_storages.get(),
+ );
+ assert!(high_slots
+ .iter()
+ .all(|high_slot| slots_actual.contains(high_slot)));
+ }
+
fn test(filter: bool, infos: &mut AncientSlotInfos, tuning: &PackedAncientStorageTuning) {
if filter {
- infos.filter_by_smallest_capacity(tuning);
+ infos.filter_by_smallest_capacity(tuning, &ShrinkAncientStats::default());
} else {
- infos.truncate_to_max_storages(tuning);
+ infos.truncate_to_max_storages(tuning, &ShrinkAncientStats::default());
}
}
@@ -3157,7 +3339,7 @@ pub mod tests {
};
match method {
TestShouldShrink::FilterAncientSlots => {
- infos.filter_ancient_slots(&tuning);
+ infos.filter_ancient_slots(&tuning, &ShrinkAncientStats::default());
}
TestShouldShrink::ClearShouldShrink => {
infos.clear_should_shrink_after_cutoff(&tuning);
@@ -3212,6 +3394,7 @@ pub mod tests {
capacity: info1_capacity,
alive_bytes: 0,
should_shrink: false,
+ is_high_slot: false,
};
let info2 = SlotInfo {
storage: storage.clone(),
@@ -3219,6 +3402,7 @@ pub mod tests {
capacity: 2,
alive_bytes: 1,
should_shrink: false,
+ is_high_slot: false,
};
let mut infos = AncientSlotInfos {
all_infos: vec![info1, info2],
@@ -3653,4 +3837,29 @@ pub mod tests {
assert!(expected_ref_counts.is_empty());
}
}
+
+ #[test_case(0, 1 => 0)]
+ #[test_case(1, 1 => 1)]
+ #[test_case(2, 1 => 2)]
+ #[test_case(2, 2 => 1)]
+ #[test_case(2, 3 => 1)]
+ #[test_case(2, 4 => 1)]
+ #[test_case(3, 4 => 1)]
+ #[test_case(4, 4 => 1)]
+ #[test_case(5, 4 => 2)]
+ #[test_case(0, u64::MAX => 0)]
+ #[test_case(MAXIMUM_APPEND_VEC_FILE_SIZE - 1, MAXIMUM_APPEND_VEC_FILE_SIZE => 1)]
+ #[test_case(MAXIMUM_APPEND_VEC_FILE_SIZE + 1, MAXIMUM_APPEND_VEC_FILE_SIZE => 2)]
+ fn test_div_ceil(x: u64, y: u64) -> u64 {
+ div_ceil(x, NonZeroU64::new(y).unwrap())
+ }
+
+ #[should_panic(expected = "x + y must not overflow")]
+ #[test_case(1, u64::MAX)]
+ #[test_case(u64::MAX, 1)]
+ #[test_case(u64::MAX/2 + 2, u64::MAX/2)]
+ #[test_case(u64::MAX/2, u64::MAX/2 + 2)]
+ fn test_div_ceil_overflow(x: u64, y: u64) {
+ div_ceil(x, NonZeroU64::new(y).unwrap());
+ }
}
diff --git a/accounts-db/src/bucket_map_holder.rs b/accounts-db/src/bucket_map_holder.rs
index bc7e19112e516f..fb90b68d124702 100644
--- a/accounts-db/src/bucket_map_holder.rs
+++ b/accounts-db/src/bucket_map_holder.rs
@@ -533,7 +533,7 @@ pub mod tests {
(0..threads).into_par_iter().for_each(|_| {
// This test used to be more strict with time, but in a parallel, multi test environment,
// sometimes threads starve and this test intermittently fails. So, give it more time than it should require.
- // This may be aggrevated by the strategy of only allowing thread 0 to advance the age.
+ // This may be aggravated by the strategy of only allowing thread 0 to advance the age.
while now.elapsed().as_millis() < (time as u128) * 100 {
if test.maybe_advance_age() {
test.bucket_flushed_at_current_age(true);
diff --git a/accounts-db/src/buffered_reader.rs b/accounts-db/src/buffered_reader.rs
index e6efd07f7d138c..5298b386793d2a 100644
--- a/accounts-db/src/buffered_reader.rs
+++ b/accounts-db/src/buffered_reader.rs
@@ -5,7 +5,7 @@
//! calling read(), advance_offset() and set_required_data_len(account_data_len) once the next account
//! data length is known.
//!
-//! Unlike BufRead/BufReader, this type guarnatees that on the next read() after calling
+//! Unlike BufRead/BufReader, this type guarantees that on the next read() after calling
//! set_required_data_len(len), the whole account data is buffered _linearly_ in memory and available to
//! be returned.
use {
@@ -119,147 +119,209 @@ mod tests {
#[test]
fn test_buffered_reader() {
// Setup a sample file with 32 bytes of data
+ let file_size = 32;
let mut sample_file = tempfile().unwrap();
- let bytes: Vec = (0..32).collect();
+ let bytes: Vec = (0..file_size as u8).collect();
sample_file.write_all(&bytes).unwrap();
// First read 16 bytes to fill buffer
- let mut reader = BufferedReader::new(16, 32, &sample_file, 8);
+ let buffer_size = 16;
+ let file_len_valid = 32;
+ let default_min_read = 8;
+ let mut reader =
+ BufferedReader::new(buffer_size, file_len_valid, &sample_file, default_min_read);
let result = reader.read().unwrap();
assert_eq!(result, BufferedReaderStatus::Success);
let (offset, slice) = reader.get_offset_and_data();
- assert_eq!(offset, 0);
- assert_eq!(slice.len(), 16);
- assert_eq!(slice.slice(), &bytes[0..16]);
+ let mut expected_offset = 0;
+ assert_eq!(offset, expected_offset);
+ assert_eq!(slice.len(), buffer_size);
+ assert_eq!(slice.slice(), &bytes[0..buffer_size]);
// Consume the data and attempt to read next 32 bytes, expect to hit EOF and only read 16 bytes
- reader.advance_offset(16);
- reader.set_required_data_len(32);
+ let advance = 16;
+ let mut required_len = 32;
+ reader.advance_offset(advance);
+ reader.set_required_data_len(required_len);
let result = reader.read().unwrap();
assert_eq!(result, BufferedReaderStatus::Eof);
let (offset, slice) = reader.get_offset_and_data();
- assert_eq!(offset, 16);
- assert_eq!(slice.len(), 16);
- assert_eq!(slice.slice(), &bytes[16..32]);
+ expected_offset += advance;
+ let expected_slice_len = 16;
+ assert_eq!(offset, expected_offset);
+ assert_eq!(slice.len(), expected_slice_len);
+ assert_eq!(slice.slice(), &bytes[offset..file_size]);
// Continue reading should yield EOF and empty slice.
- reader.advance_offset(16);
- reader.set_required_data_len(32);
+ reader.advance_offset(advance);
+ reader.set_required_data_len(required_len);
let result = reader.read().unwrap();
assert_eq!(result, BufferedReaderStatus::Eof);
let (offset, slice) = reader.get_offset_and_data();
- assert_eq!(offset, 32);
- assert_eq!(slice.len(), 0);
+ expected_offset += advance;
+ assert_eq!(offset, expected_offset);
+ let expected_slice_len = 0;
+ assert_eq!(slice.len(), expected_slice_len);
// set_required_data to zero and offset should not change, and slice should be empty.
- reader.set_required_data_len(0);
+ required_len = 0;
+ reader.set_required_data_len(required_len);
let result = reader.read().unwrap();
assert_eq!(result, BufferedReaderStatus::Success);
let (offset, slice) = reader.get_offset_and_data();
- assert_eq!(offset, 32);
- assert_eq!(slice.len(), 0);
+ let expected_offset = file_len_valid;
+ assert_eq!(offset, expected_offset);
+ let expected_slice_len = 0;
+ assert_eq!(slice.len(), expected_slice_len);
}
#[test]
fn test_buffered_reader_with_extra_data_in_file() {
// Setup a sample file with 32 bytes of data
let mut sample_file = tempfile().unwrap();
- let bytes: Vec = (0..32).collect();
+ let file_size = 32;
+ let bytes: Vec = (0..file_size as u8).collect();
sample_file.write_all(&bytes).unwrap();
// Set file valid_len to 30 (i.e. 2 garbage bytes at the end of the file)
let valid_len = 30;
// First read 16 bytes to fill buffer
- let mut reader = BufferedReader::new(16, valid_len, &sample_file, 8);
+ let buffer_size = 16;
+ let default_min_read_size = 8;
+ let mut reader =
+ BufferedReader::new(buffer_size, valid_len, &sample_file, default_min_read_size);
let result = reader.read().unwrap();
assert_eq!(result, BufferedReaderStatus::Success);
let (offset, slice) = reader.get_offset_and_data();
- assert_eq!(offset, 0);
- assert_eq!(slice.len(), 16);
- assert_eq!(slice.slice(), &bytes[0..16]);
+ let mut expected_offset = 0;
+ assert_eq!(offset, expected_offset);
+ assert_eq!(slice.len(), buffer_size);
+ assert_eq!(slice.slice(), &bytes[0..buffer_size]);
// Consume the data and attempt read next 32 bytes, expect to hit `valid_len`, and only read 14 bytes
- reader.advance_offset(16);
- reader.set_required_data_len(32);
+ let mut advance = 16;
+ let mut required_data_len = 32;
+ reader.advance_offset(advance);
+ reader.set_required_data_len(required_data_len);
let result = reader.read().unwrap();
assert_eq!(result, BufferedReaderStatus::Eof);
let (offset, slice) = reader.get_offset_and_data();
- assert_eq!(offset, 16);
- assert_eq!(slice.len(), 14);
- assert_eq!(slice.slice(), &bytes[16..30]);
+ expected_offset += advance;
+ assert_eq!(offset, expected_offset);
+ let expected_slice_len = valid_len - offset;
+ assert_eq!(slice.len(), expected_slice_len);
+ let expected_slice_range = 16..30;
+ assert_eq!(slice.slice(), &bytes[expected_slice_range]);
// Continue reading should yield EOF and empty slice.
- reader.advance_offset(14);
- reader.set_required_data_len(32);
+ advance = 14;
+ required_data_len = 32;
+ reader.advance_offset(advance);
+ reader.set_required_data_len(required_data_len);
let result = reader.read().unwrap();
assert_eq!(result, BufferedReaderStatus::Eof);
let (offset, slice) = reader.get_offset_and_data();
- assert_eq!(offset, 30);
- assert_eq!(slice.len(), 0);
+ expected_offset += advance;
+ assert_eq!(offset, expected_offset);
+ let expected_slice_len = 0;
+ assert_eq!(slice.len(), expected_slice_len);
// Move the offset passed `valid_len`, expect to hit EOF and return empty slice.
- reader.advance_offset(1);
- reader.set_required_data_len(8);
+ advance = 1;
+ required_data_len = 8;
+ reader.advance_offset(advance);
+ reader.set_required_data_len(required_data_len);
let result = reader.read().unwrap();
assert_eq!(result, BufferedReaderStatus::Eof);
let (offset, slice) = reader.get_offset_and_data();
- assert_eq!(offset, 31);
- assert_eq!(slice.len(), 0);
+ expected_offset += advance;
+ assert_eq!(offset, expected_offset);
+ let expected_slice_len = 0;
+ assert_eq!(slice.len(), expected_slice_len);
// Move the offset passed file_len, expect to hit EOF and return empty slice.
- reader.advance_offset(3);
- reader.set_required_data_len(8);
+ advance = 3;
+ required_data_len = 8;
+ reader.advance_offset(advance);
+ reader.set_required_data_len(required_data_len);
let result = reader.read().unwrap();
assert_eq!(result, BufferedReaderStatus::Eof);
let (offset, slice) = reader.get_offset_and_data();
- assert_eq!(offset, 34);
- assert_eq!(slice.len(), 0);
+ expected_offset += advance;
+ assert_eq!(offset, expected_offset);
+ let expected_slice_len = 0;
+ assert_eq!(slice.len(), expected_slice_len);
}
#[test]
fn test_buffered_reader_partial_consume() {
// Setup a sample file with 32 bytes of data
let mut sample_file = tempfile().unwrap();
- let bytes: Vec = (0..32).collect();
+ let file_size = 32;
+ let bytes: Vec = (0..file_size as u8).collect();
sample_file.write_all(&bytes).unwrap();
// First read 16 bytes to fill buffer
- let mut reader = BufferedReader::new(16, 32, &sample_file, 8);
+ let buffer_size = 16;
+ let file_len_valid = 32;
+ let default_min_read_size = 8;
+ let mut reader = BufferedReader::new(
+ buffer_size,
+ file_len_valid,
+ &sample_file,
+ default_min_read_size,
+ );
let result = reader.read().unwrap();
assert_eq!(result, BufferedReaderStatus::Success);
let (offset, slice) = reader.get_offset_and_data();
- assert_eq!(offset, 0);
- assert_eq!(slice.len(), 16);
- assert_eq!(slice.slice(), &bytes[0..16]);
+ let mut expected_offset = 0;
+ assert_eq!(offset, expected_offset);
+ assert_eq!(slice.len(), buffer_size);
+ assert_eq!(slice.slice(), &bytes[0..buffer_size]);
// Consume the partial data (8 byte) and attempt to read next 8 bytes
- reader.advance_offset(8);
- reader.set_required_data_len(8);
+ let mut advance = 8;
+ let mut required_len = 8;
+ reader.advance_offset(advance);
+ reader.set_required_data_len(required_len);
let result = reader.read().unwrap();
assert_eq!(result, BufferedReaderStatus::Success);
let (offset, slice) = reader.get_offset_and_data();
- assert_eq!(offset, 8);
- assert_eq!(slice.len(), 8);
- assert_eq!(slice.slice(), &bytes[8..16]); // no need to read more
+ expected_offset += advance;
+ assert_eq!(offset, expected_offset);
+ assert_eq!(slice.len(), required_len);
+ assert_eq!(
+ slice.slice(),
+ &bytes[expected_offset..expected_offset + required_len]
+ ); // no need to read more
// Continue reading should succeed and read the rest 16 bytes.
- reader.advance_offset(8);
- reader.set_required_data_len(16);
+ advance = 8;
+ required_len = 16;
+ reader.advance_offset(advance);
+ reader.set_required_data_len(required_len);
let result = reader.read().unwrap();
assert_eq!(result, BufferedReaderStatus::Success);
let (offset, slice) = reader.get_offset_and_data();
- assert_eq!(offset, 16);
- assert_eq!(slice.len(), 16);
- assert_eq!(slice.slice(), &bytes[16..32]);
+ expected_offset += advance;
+ assert_eq!(offset, expected_offset);
+ assert_eq!(slice.len(), required_len);
+ assert_eq!(
+ slice.slice(),
+ &bytes[expected_offset..expected_offset + required_len]
+ );
// Continue reading should yield EOF and empty slice.
- reader.advance_offset(16);
- reader.set_required_data_len(32);
+ advance = 16;
+ required_len = 32;
+ reader.advance_offset(advance);
+ reader.set_required_data_len(required_len);
let result = reader.read().unwrap();
assert_eq!(result, BufferedReaderStatus::Eof);
let (offset, slice) = reader.get_offset_and_data();
- assert_eq!(offset, 32);
+ expected_offset += advance;
+ assert_eq!(offset, expected_offset);
assert_eq!(slice.len(), 0);
}
@@ -267,37 +329,55 @@ mod tests {
fn test_buffered_reader_partial_consume_with_move() {
// Setup a sample file with 32 bytes of data
let mut sample_file = tempfile().unwrap();
- let bytes: Vec = (0..32).collect();
+ let file_size = 32;
+ let bytes: Vec = (0..file_size as u8).collect();
sample_file.write_all(&bytes).unwrap();
// First read 16 bytes to fill buffer
- let mut reader = BufferedReader::new(16, 32, &sample_file, 8);
+ let buffer_size = 16;
+ let valid_len = 32;
+ let default_min_read = 8;
+ let mut reader =
+ BufferedReader::new(buffer_size, valid_len, &sample_file, default_min_read);
let result = reader.read().unwrap();
assert_eq!(result, BufferedReaderStatus::Success);
let (offset, slice) = reader.get_offset_and_data();
- assert_eq!(offset, 0);
- assert_eq!(slice.len(), 16);
- assert_eq!(slice.slice(), &bytes[0..16]);
+ let mut expected_offset = 0;
+ assert_eq!(offset, expected_offset);
+ assert_eq!(slice.len(), buffer_size);
+ assert_eq!(slice.slice(), &bytes[0..buffer_size]);
// Consume the partial data (8 bytes) and attempt to read next 16 bytes
// This will move the leftover 8bytes and read next 8 bytes.
- reader.advance_offset(8);
- reader.set_required_data_len(16);
+ let mut advance = 8;
+ let mut required_data_len = 16;
+ reader.advance_offset(advance);
+ reader.set_required_data_len(required_data_len);
let result = reader.read().unwrap();
assert_eq!(result, BufferedReaderStatus::Success);
let (offset, slice) = reader.get_offset_and_data();
- assert_eq!(offset, 8);
- assert_eq!(slice.len(), 16);
- assert_eq!(slice.slice(), &bytes[8..24]);
+ expected_offset += advance;
+ assert_eq!(offset, expected_offset);
+ assert_eq!(slice.len(), required_data_len);
+ assert_eq!(
+ slice.slice(),
+ &bytes[expected_offset..expected_offset + required_data_len]
+ );
// Continue reading should succeed and read the rest 8 bytes.
- reader.advance_offset(16);
- reader.set_required_data_len(8);
+ advance = 16;
+ required_data_len = 8;
+ reader.advance_offset(advance);
+ reader.set_required_data_len(required_data_len);
let result = reader.read().unwrap();
assert_eq!(result, BufferedReaderStatus::Success);
let (offset, slice) = reader.get_offset_and_data();
- assert_eq!(offset, 24);
- assert_eq!(slice.len(), 8);
- assert_eq!(slice.slice(), &bytes[24..32]);
+ expected_offset += advance;
+ assert_eq!(offset, expected_offset);
+ assert_eq!(slice.len(), required_data_len);
+ assert_eq!(
+ slice.slice(),
+ &bytes[expected_offset..expected_offset + required_data_len]
+ );
}
}
diff --git a/accounts-db/src/cache_hash_data.rs b/accounts-db/src/cache_hash_data.rs
index f5e7c0129563fc..b69ee39185bda5 100644
--- a/accounts-db/src/cache_hash_data.rs
+++ b/accounts-db/src/cache_hash_data.rs
@@ -3,7 +3,7 @@
use crate::pubkey_bins::PubkeyBinCalculator24;
use {
crate::{accounts_hash::CalculateHashIntermediate, cache_hash_data_stats::CacheHashDataStats},
- bytemuck::{Pod, Zeroable},
+ bytemuck_derive::{Pod, Zeroable},
memmap2::MmapMut,
solana_measure::measure::Measure,
solana_sdk::clock::Slot,
diff --git a/accounts-db/src/file_io.rs b/accounts-db/src/file_io.rs
index 517c2834f1dbe6..a217aa94002ed6 100644
--- a/accounts-db/src/file_io.rs
+++ b/accounts-db/src/file_io.rs
@@ -92,65 +92,105 @@ mod tests {
fn test_read_into_buffer() {
// Setup a sample file with 32 bytes of data
let mut sample_file = tempfile().unwrap();
- let bytes: Vec = (0..32).collect();
+ let file_size = 32;
+ let bytes: Vec = (0..file_size as u8).collect();
sample_file.write_all(&bytes).unwrap();
// Read all 32 bytes into buffer
let mut buffer = [0; 32];
- let num_bytes_read = read_into_buffer(&sample_file, 32, 0, &mut buffer).unwrap();
- assert_eq!(num_bytes_read, 32);
+ let mut buffer_len = buffer.len();
+ let mut valid_len = 32;
+ let mut start_offset = 0;
+ let num_bytes_read =
+ read_into_buffer(&sample_file, valid_len, start_offset, &mut buffer).unwrap();
+ assert_eq!(num_bytes_read, buffer_len);
assert_eq!(bytes, buffer);
// Given a 64-byte buffer, it should only read 32 bytes into the buffer
let mut buffer = [0; 64];
- let num_bytes_read = read_into_buffer(&sample_file, 32, 0, &mut buffer).unwrap();
- assert_eq!(num_bytes_read, 32);
- assert_eq!(bytes, buffer[0..32]);
- assert_eq!(buffer[32..64], [0; 32]);
+ buffer_len = buffer.len();
+ let num_bytes_read =
+ read_into_buffer(&sample_file, valid_len, start_offset, &mut buffer).unwrap();
+ assert_eq!(num_bytes_read, valid_len);
+ assert_eq!(bytes, buffer[0..valid_len]);
+ assert_eq!(buffer[valid_len..buffer_len], [0; 32]);
// Given the `valid_file_len` is 16, it should only read 16 bytes into the buffer
let mut buffer = [0; 32];
- let num_bytes_read = read_into_buffer(&sample_file, 16, 0, &mut buffer).unwrap();
- assert_eq!(num_bytes_read, 16);
- assert_eq!(bytes[0..16], buffer[0..16]);
+ buffer_len = buffer.len();
+ valid_len = 16;
+ let num_bytes_read =
+ read_into_buffer(&sample_file, valid_len, start_offset, &mut buffer).unwrap();
+ assert_eq!(num_bytes_read, valid_len);
+ assert_eq!(bytes[0..valid_len], buffer[0..valid_len]);
// As a side effect of the `read_into_buffer` the data passed `valid_file_len` was
// read and put into the buffer, though these data should not be
// consumed.
- assert_eq!(buffer[16..32], bytes[16..32]);
+ assert_eq!(buffer[valid_len..buffer_len], bytes[valid_len..buffer_len]);
// Given the start offset 8, it should only read 24 bytes into buffer
let mut buffer = [0; 32];
- let num_bytes_read = read_into_buffer(&sample_file, 32, 8, &mut buffer).unwrap();
- assert_eq!(num_bytes_read, 24);
- assert_eq!(buffer[0..24], bytes[8..32]);
- assert_eq!(buffer[24..32], [0; 8])
+ buffer_len = buffer.len();
+ valid_len = 32;
+ start_offset = 8;
+ let num_bytes_read =
+ read_into_buffer(&sample_file, valid_len, start_offset, &mut buffer).unwrap();
+ assert_eq!(num_bytes_read, valid_len - start_offset);
+ assert_eq!(buffer[0..num_bytes_read], bytes[start_offset..buffer_len]);
+ assert_eq!(buffer[num_bytes_read..buffer_len], [0; 8])
}
#[test]
fn test_read_more_buffer() {
// Setup a sample file with 32 bytes of data
let mut sample_file = tempfile().unwrap();
- let bytes: Vec = (0..32).collect();
+ let file_size = 32;
+ let bytes: Vec = (0..file_size as u8).collect();
sample_file.write_all(&bytes).unwrap();
// Should move left-over 8 bytes to and read 24 bytes from file
let mut buffer = [0xFFu8; 32];
+ let buffer_len = buffer.len();
let mut offset = 0;
let mut valid_bytes = 24..32;
- read_more_buffer(&sample_file, 32, &mut offset, &mut buffer, &mut valid_bytes).unwrap();
- assert_eq!(offset, 24);
- assert_eq!(valid_bytes, 0..32);
- assert_eq!(buffer[0..8], [0xFFu8; 8]);
- assert_eq!(buffer[8..32], bytes[0..24]);
+ let mut valid_bytes_len = valid_bytes.len();
+ let valid_len = 32;
+ read_more_buffer(
+ &sample_file,
+ valid_len,
+ &mut offset,
+ &mut buffer,
+ &mut valid_bytes,
+ )
+ .unwrap();
+ assert_eq!(offset, buffer_len - valid_bytes_len);
+ assert_eq!(valid_bytes, 0..buffer_len);
+ assert_eq!(buffer[0..valid_bytes_len], [0xFFu8; 8]);
+ assert_eq!(
+ buffer[valid_bytes_len..buffer_len],
+ bytes[0..buffer_len - valid_bytes_len]
+ );
// Should move left-over 8 bytes to and read 16 bytes from file due to EOF
let mut buffer = [0xFFu8; 32];
+ let start_offset = 16;
let mut offset = 16;
let mut valid_bytes = 24..32;
- read_more_buffer(&sample_file, 32, &mut offset, &mut buffer, &mut valid_bytes).unwrap();
- assert_eq!(offset, 32);
+ valid_bytes_len = valid_bytes.len();
+ read_more_buffer(
+ &sample_file,
+ valid_len,
+ &mut offset,
+ &mut buffer,
+ &mut valid_bytes,
+ )
+ .unwrap();
+ assert_eq!(offset, file_size);
assert_eq!(valid_bytes, 0..24);
- assert_eq!(buffer[0..8], [0xFFu8; 8]);
- assert_eq!(buffer[8..24], bytes[16..32]);
+ assert_eq!(buffer[0..valid_bytes_len], [0xFFu8; 8]);
+ assert_eq!(
+ buffer[valid_bytes_len..valid_bytes.end],
+ bytes[start_offset..file_size]
+ );
}
}
diff --git a/accounts-db/src/tiered_storage/file.rs b/accounts-db/src/tiered_storage/file.rs
index e14f75673ca3f2..4728134a4f990c 100644
--- a/accounts-db/src/tiered_storage/file.rs
+++ b/accounts-db/src/tiered_storage/file.rs
@@ -1,6 +1,6 @@
use {
super::{error::TieredStorageError, TieredStorageResult},
- bytemuck::{AnyBitPattern, NoUninit, Pod, Zeroable},
+ bytemuck::{AnyBitPattern, NoUninit, Zeroable},
std::{
fs::{File, OpenOptions},
io::{BufWriter, Read, Result as IoResult, Seek, SeekFrom, Write},
@@ -13,7 +13,7 @@ use {
/// The ending 8 bytes of a valid tiered account storage file.
pub const FILE_MAGIC_NUMBER: u64 = u64::from_le_bytes(*b"AnzaTech");
-#[derive(Debug, PartialEq, Eq, Clone, Copy, Pod, Zeroable)]
+#[derive(Debug, PartialEq, Eq, Clone, Copy, bytemuck_derive::Pod, bytemuck_derive::Zeroable)]
#[repr(C)]
pub struct TieredStorageMagicNumber(pub u64);
diff --git a/accounts-db/src/tiered_storage/hot.rs b/accounts-db/src/tiered_storage/hot.rs
index 4d4a14e9cf28c7..74656584dee99b 100644
--- a/accounts-db/src/tiered_storage/hot.rs
+++ b/accounts-db/src/tiered_storage/hot.rs
@@ -19,7 +19,7 @@ use {
StorableAccounts, TieredStorageError, TieredStorageFormat, TieredStorageResult,
},
},
- bytemuck::{Pod, Zeroable},
+ bytemuck_derive::{Pod, Zeroable},
memmap2::{Mmap, MmapOptions},
modular_bitfield::prelude::*,
solana_sdk::{
diff --git a/accounts-db/src/tiered_storage/index.rs b/accounts-db/src/tiered_storage/index.rs
index 5caf0687be5d2b..326ab3df66ea1b 100644
--- a/accounts-db/src/tiered_storage/index.rs
+++ b/accounts-db/src/tiered_storage/index.rs
@@ -24,7 +24,7 @@ pub trait AccountOffset: Clone + Copy + Pod + Zeroable {}
/// This can be used to obtain the AccountOffset and address by looking through
/// the accounts index block.
#[repr(C)]
-#[derive(Clone, Copy, Debug, Eq, PartialEq, Pod, Zeroable)]
+#[derive(Clone, Copy, Debug, Eq, PartialEq, bytemuck_derive::Pod, bytemuck_derive::Zeroable)]
pub struct IndexOffset(pub u32);
// Ensure there are no implicit padding bytes
diff --git a/accounts-db/src/tiered_storage/meta.rs b/accounts-db/src/tiered_storage/meta.rs
index a174bbc0e5299e..16d50f43086738 100644
--- a/accounts-db/src/tiered_storage/meta.rs
+++ b/accounts-db/src/tiered_storage/meta.rs
@@ -2,7 +2,7 @@
use {
crate::tiered_storage::owners::OwnerOffset,
- bytemuck::{Pod, Zeroable},
+ bytemuck_derive::{Pod, Zeroable},
modular_bitfield::prelude::*,
solana_sdk::{pubkey::Pubkey, stake_history::Epoch},
};
diff --git a/banks-client/src/lib.rs b/banks-client/src/lib.rs
index 61105575e2ca2e..aae81192d3a07b 100644
--- a/banks-client/src/lib.rs
+++ b/banks-client/src/lib.rs
@@ -17,8 +17,7 @@ use {
BanksTransactionResultWithSimulation,
},
solana_program::{
- clock::Slot, fee_calculator::FeeCalculator, hash::Hash, program_pack::Pack, pubkey::Pubkey,
- rent::Rent, sysvar::Sysvar,
+ clock::Slot, hash::Hash, program_pack::Pack, pubkey::Pubkey, rent::Rent, sysvar::Sysvar,
},
solana_sdk::{
account::{from_account, Account},
@@ -69,21 +68,6 @@ impl BanksClient {
.map_err(Into::into)
}
- #[deprecated(
- since = "1.9.0",
- note = "Please use `get_fee_for_message` or `is_blockhash_valid` instead"
- )]
- pub fn get_fees_with_commitment_and_context(
- &mut self,
- ctx: Context,
- commitment: CommitmentLevel,
- ) -> impl Future