diff --git a/Cargo.lock b/Cargo.lock index 5c671d9c718b88..5e4b1c9673340c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -101,13 +101,13 @@ dependencies = [ "solana-cli-config", "solana-cli-output", "solana-commitment-config", - "solana-keypair 3.0.0", - "solana-logger", - "solana-pubkey 3.0.0", + "solana-keypair", + "solana-logger 3.0.0", + "solana-pubkey", "solana-remote-wallet", "solana-rpc-client", "solana-rpc-client-api", - "solana-signer 3.0.0", + "solana-signer", "solana-version", "tar", "tempfile", @@ -122,10 +122,10 @@ dependencies = [ "ahash 0.8.11", "solana-epoch-schedule", "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-hash 3.0.0", - "solana-pubkey 3.0.0", - "solana-sha256-hasher 3.0.0", + "solana-frozen-abi-macro 3.0.0", + "solana-hash", + "solana-pubkey", + "solana-sha256-hasher", "solana-svm-feature-set", ] @@ -135,8 +135,8 @@ version = "3.0.0" dependencies = [ "log", "solana-clock", - "solana-hash 3.0.0", - "solana-signature 3.1.0", + "solana-hash", + "solana-signature", "solana-transaction", "solana-transaction-status", "thiserror 2.0.14", @@ -166,15 +166,16 @@ dependencies = [ "serde_yaml 0.9.34+deprecated", "solana-clap-utils", "solana-config-interface", - "solana-hash 3.0.0", - "solana-keypair 3.0.0", - "solana-logger", + "solana-config-program-client", + "solana-hash", + "solana-keypair", + "solana-logger 3.0.0", "solana-message", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rpc-client", - "solana-sha256-hasher 3.0.0", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-sha256-hasher", + "solana-signature", + "solana-signer", "solana-transaction", "solana-version", "tar", @@ -229,7 +230,6 @@ dependencies = [ "solana-clap-utils", "solana-cli-output", "solana-clock", - "solana-cluster-type", "solana-compute-budget", "solana-core", "solana-cost-model", @@ -238,18 +238,18 @@ dependencies = [ "solana-genesis-config", "solana-geyser-plugin-manager", "solana-gossip", - "solana-hash 3.0.0", + "solana-hash", "solana-inflation", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-instruction", + "solana-keypair", "solana-ledger", "solana-loader-v3-interface", - "solana-logger", + "solana-logger 3.0.0", "solana-measure", "solana-message", "solana-native-token", "solana-program-runtime", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rent", "solana-rpc", "solana-runtime", @@ -257,7 +257,7 @@ dependencies = [ "solana-sbpf", "solana-sdk-ids", "solana-shred-version", - "solana-signature 3.1.0", + "solana-signature", "solana-stake-interface", "solana-stake-program", "solana-storage-bigtable", @@ -287,19 +287,19 @@ dependencies = [ "bincode", "bytemuck", "digest 0.10.7", - "ed25519-dalek 1.0.1", + "ed25519-dalek", "hex", "libsecp256k1", "openssl", "rand 0.7.3", "sha3", "solana-ed25519-program", - "solana-instruction 3.0.0", + "solana-instruction", "solana-keccak-hasher", - "solana-logger", + "solana-logger 3.0.0", "solana-message", "solana-precompile-error", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-sdk-ids", "solana-secp256k1-program", "solana-secp256r1-program", @@ -311,9 +311,9 @@ version = "3.0.0" dependencies = [ "agave-feature-set", "solana-frozen-abi", - "solana-frozen-abi-macro", + "solana-frozen-abi-macro 3.0.0", "solana-message", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-sdk-ids", "solana-sysvar", ] @@ -335,7 +335,7 @@ dependencies = [ "rayon", "solana-account", "solana-accounts-db", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-system-interface", "solana-version", ] @@ -359,8 +359,8 @@ dependencies = [ "solana-epoch-rewards", "solana-epoch-schedule", "solana-fee-calculator", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", + "solana-hash", + "solana-instruction", "solana-keccak-hasher", "solana-last-restart-slot", "solana-loader-v3-interface", @@ -368,15 +368,14 @@ dependencies = [ "solana-program", "solana-program-entrypoint", "solana-program-runtime", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rent", "solana-sbpf", "solana-sdk-ids", "solana-secp256k1-recover", - "solana-sha256-hasher 3.0.0", + "solana-sha256-hasher", "solana-slot-hashes", "solana-stable-layout", - "solana-stake-interface", "solana-svm-callback", "solana-svm-feature-set", "solana-svm-log-collector", @@ -400,7 +399,7 @@ dependencies = [ "anyhow", "axum 0.7.9", "cfg-if 1.0.1", - "env_logger", + "env_logger 0.11.8", "hyper 0.14.32", "log", "num_cpus", @@ -421,16 +420,16 @@ dependencies = [ "agave-transaction-view", "bincode", "criterion", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-instruction", + "solana-keypair", "solana-message", "solana-packet", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-sdk-ids", "solana-short-vec", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-svm-transaction", "solana-system-interface", "solana-transaction", @@ -482,11 +481,11 @@ dependencies = [ "solana-genesis-utils", "solana-geyser-plugin-manager", "solana-gossip", - "solana-hash 3.0.0", + "solana-hash", "solana-inflation", - "solana-keypair 3.0.0", + "solana-keypair", "solana-ledger", - "solana-logger", + "solana-logger 3.0.0", "solana-metrics", "solana-native-token", "solana-net-utils", @@ -495,7 +494,7 @@ dependencies = [ "solana-program-option", "solana-program-pack", "solana-program-runtime", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-quic-definitions", "solana-rayon-threadlimit", "solana-rent", @@ -505,7 +504,7 @@ dependencies = [ "solana-runtime", "solana-sdk-ids", "solana-send-transaction-service", - "solana-signer 3.0.0", + "solana-signer", "solana-storage-bigtable", "solana-streamer", "solana-system-interface", @@ -546,12 +545,12 @@ dependencies = [ "solana-clap-utils", "solana-cli-config", "solana-cli-output", - "solana-hash 3.0.0", - "solana-logger", + "solana-hash", + "solana-logger 3.0.0", "solana-metrics", "solana-native-token", "solana-notifier", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rpc-client", "solana-rpc-client-api", "solana-version", @@ -728,7 +727,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -1011,7 +1010,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -1200,12 +1199,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - [[package]] name = "base64" version = "0.12.3" @@ -1230,12 +1223,6 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "base64ct" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" - [[package]] name = "bencher" version = "0.1.5" @@ -1268,7 +1255,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -1375,16 +1362,39 @@ dependencies = [ "byte-tools", ] +[[package]] +name = "borsh" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" +dependencies = [ + "borsh-derive 0.10.3", + "hashbrown 0.13.2", +] + [[package]] name = "borsh" version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad8646f98db542e39fc66e68a20b2144f6a732636df7c2354e74645faaa433ce" dependencies = [ - "borsh-derive", + "borsh-derive 1.5.7", "cfg_aliases", ] +[[package]] +name = "borsh-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" +dependencies = [ + "borsh-derive-internal", + "borsh-schema-derive-internal", + "proc-macro-crate 0.1.5", + "proc-macro2", + "syn 1.0.109", +] + [[package]] name = "borsh-derive" version = "1.5.7" @@ -1395,7 +1405,29 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] @@ -1479,9 +1511,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.23.2" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3995eaeebcdf32f91f980d360f78732ddc061097ab4e39991ae7a6ace9194677" +checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" dependencies = [ "bytemuck_derive", ] @@ -1494,7 +1526,7 @@ checksum = "4f154e572231cb6ba2bd1176980827e3d5dc04cc183a75dea38109fbdd672d29" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -1657,7 +1689,7 @@ checksum = "45565fc9416b9896014f5732ac776f810ee53a66730c17e4020c3ec064a8f88f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -1807,7 +1839,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -1896,10 +1928,24 @@ dependencies = [ ] [[package]] -name = "const-oid" -version = "0.9.6" +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if 1.0.1", + "wasm-bindgen", +] + +[[package]] +name = "console_log" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" +dependencies = [ + "log", + "web-sys", +] [[package]] name = "const_format" @@ -2103,18 +2149,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" -[[package]] -name = "crypto-bigint" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" -dependencies = [ - "generic-array 0.14.7", - "rand_core 0.6.4", - "subtle", - "zeroize", -] - [[package]] name = "crypto-common" version = "0.1.6" @@ -2215,7 +2249,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -2239,7 +2273,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -2250,7 +2284,7 @@ checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" dependencies = [ "darling_core", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -2274,16 +2308,6 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57" -[[package]] -name = "der" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" -dependencies = [ - "const-oid", - "zeroize", -] - [[package]] name = "der-parser" version = "8.1.0" @@ -2334,7 +2358,7 @@ checksum = "ef941ded77d15ca19b40374869ac6000af1c9f2a4c0f3d4c70926287e6364a8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -2345,7 +2369,7 @@ checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -2379,7 +2403,7 @@ dependencies = [ "convert_case 0.6.0", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", "unicode-xid", ] @@ -2432,7 +2456,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", - "const-oid", "crypto-common", "subtle", ] @@ -2498,7 +2521,7 @@ checksum = "a6cbae11b3de8fce2a456e8ea3dada226b35fe791f0dc1d360c0941f0bb681f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -2525,37 +2548,13 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abe71d579d1812060163dff96056261deb5bf6729b100fa2e36a68b9649ba3d3" -[[package]] -name = "ecdsa" -version = "0.16.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" -dependencies = [ - "der", - "digest 0.10.7", - "elliptic-curve", - "rfc6979", - "signature 2.2.0", - "spki", -] - [[package]] name = "ed25519" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4620d40f6d2601794401d6dd95a5cf69b6c157852539470eeda433a99b3c0efc" dependencies = [ - "signature 1.4.0", -] - -[[package]] -name = "ed25519" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" -dependencies = [ - "pkcs8", - "signature 2.2.0", + "signature", ] [[package]] @@ -2565,36 +2564,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" dependencies = [ "curve25519-dalek 3.2.0", - "ed25519 1.2.0", + "ed25519", "rand 0.7.3", "serde", "sha2 0.9.9", "zeroize", ] -[[package]] -name = "ed25519-dalek" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" -dependencies = [ - "curve25519-dalek 4.1.3", - "ed25519 2.2.3", - "rand_core 0.6.4", - "serde", - "sha2 0.10.9", - "subtle", - "zeroize", -] - [[package]] name = "ed25519-dalek-bip32" -version = "0.3.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b49a684b133c4980d7ee783936af771516011c8cd15f429dbda77245e282f03" +checksum = "9d2be62a4061b872c8c0873ee4fc6f101ce7b889d039f019c5fa2af471a59908" dependencies = [ "derivation-path", - "ed25519-dalek 2.2.0", + "ed25519-dalek", "hmac 0.12.1", "sha2 0.10.9", ] @@ -2617,25 +2601,6 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" -[[package]] -name = "elliptic-curve" -version = "0.13.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" -dependencies = [ - "base16ct", - "crypto-bigint", - "digest 0.10.7", - "ff", - "generic-array 0.14.7", - "group", - "pkcs8", - "rand_core 0.6.4", - "sec1", - "subtle", - "zeroize", -] - [[package]] name = "encode_unicode" version = "1.0.0" @@ -2668,7 +2633,7 @@ checksum = "03cdc46ec28bd728e67540c528013c6a10eb69a02eb31078a1bda695438cbfb8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -2694,6 +2659,19 @@ dependencies = [ "regex", ] +[[package]] +name = "env_logger" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + [[package]] name = "env_logger" version = "0.11.8" @@ -2816,16 +2794,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" -[[package]] -name = "ff" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" -dependencies = [ - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "fiat-crypto" version = "0.2.9" @@ -3027,7 +2995,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -3137,7 +3105,6 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", - "zeroize", ] [[package]] @@ -3254,17 +3221,6 @@ dependencies = [ "spinning_top", ] -[[package]] -name = "group" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" -dependencies = [ - "ff", - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "h2" version = "0.3.26" @@ -3802,7 +3758,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -4038,7 +3994,7 @@ checksum = "03343451ff899767262ec32146f6d559dd759fdadf42ff0e227c7c48f72594b4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -4214,17 +4170,13 @@ dependencies = [ ] [[package]] -name = "k256" -version = "0.13.4" +name = "kaigan" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +checksum = "2ba15de5aeb137f0f65aa3bf82187647f1285abfe5b20c80c2c37f7007ad519a" dependencies = [ - "cfg-if 1.0.1", - "ecdsa", - "elliptic-curve", - "once_cell", - "sha2 0.10.9", - "signature 2.2.0", + "borsh 0.10.3", + "serde", ] [[package]] @@ -4742,7 +4694,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -4815,7 +4767,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -4904,7 +4856,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -5194,16 +5146,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - [[package]] name = "pkg-config" version = "0.3.22" @@ -5401,9 +5343,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.97" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61789d7719defeb74ea5fe81f2fdfdbd28a803847077cecce2ff14e1472f6f1" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ "unicode-ident", ] @@ -5516,7 +5458,7 @@ checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -5996,16 +5938,6 @@ dependencies = [ "tower-service", ] -[[package]] -name = "rfc6979" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" -dependencies = [ - "hmac 0.12.1", - "subtle", -] - [[package]] name = "ring" version = "0.17.14" @@ -6310,20 +6242,6 @@ dependencies = [ "untrusted", ] -[[package]] -name = "sec1" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" -dependencies = [ - "base16ct", - "der", - "generic-array 0.14.7", - "pkcs8", - "subtle", - "zeroize", -] - [[package]] name = "security-framework" version = "2.11.1" @@ -6431,7 +6349,7 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -6497,7 +6415,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -6547,7 +6465,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -6696,16 +6614,6 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788" -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", -] - [[package]] name = "simpl" version = "0.1.0" @@ -6799,9 +6707,9 @@ dependencies = [ [[package]] name = "solana-account" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f885ce7f937871ecb56aadbeaaec963b234a580b7d6ebbdb8fa4249a36f92433" +checksum = "0f949fe4edaeaea78c844023bfc1c898e0b1f5a100f8a8d2d0f85d0a7b090258" dependencies = [ "bincode", "qualifier_attr", @@ -6811,10 +6719,10 @@ dependencies = [ "solana-account-info", "solana-clock", "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-instruction-error", - "solana-logger", - "solana-pubkey 3.0.0", + "solana-frozen-abi-macro 2.2.1", + "solana-instruction", + "solana-logger 2.3.1", + "solana-pubkey", "solana-sdk-ids", "solana-sysvar", ] @@ -6836,16 +6744,16 @@ dependencies = [ "solana-account-decoder-client-types", "solana-address-lookup-table-interface", "solana-clock", - "solana-config-interface", + "solana-config-program-client", "solana-epoch-schedule", "solana-fee-calculator", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", + "solana-hash", + "solana-instruction", "solana-loader-v3-interface", "solana-nonce", "solana-program-option", "solana-program-pack", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rent", "solana-sdk-ids", "solana-slot-hashes", @@ -6873,21 +6781,21 @@ dependencies = [ "serde_derive", "serde_json", "solana-account", - "solana-pubkey 3.0.0", + "solana-pubkey", "zstd", ] [[package]] name = "solana-account-info" -version = "3.0.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82f4691b69b172c687d218dd2f1f23fc7ea5e9aa79df9ac26dab3d8dd829ce48" +checksum = "c8f5152a288ef1912300fc6efa6c2d1f9bb55d9398eb6c72326360b8063987da" dependencies = [ "bincode", "serde", "solana-program-error", "solana-program-memory", - "solana-pubkey 3.0.0", + "solana-pubkey", ] [[package]] @@ -6908,23 +6816,23 @@ dependencies = [ "solana-core", "solana-faucet", "solana-gossip", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-instruction", + "solana-keypair", "solana-local-cluster", - "solana-logger", + "solana-logger 3.0.0", "solana-measure", "solana-message", "solana-native-token", "solana-net-utils", "solana-poh-config", "solana-program-pack", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rpc-client", "solana-rpc-client-api", "solana-runtime", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-streamer", "solana-system-interface", "solana-test-validator", @@ -6984,25 +6892,25 @@ dependencies = [ "solana-epoch-schedule", "solana-fee-calculator", "solana-frozen-abi", - "solana-frozen-abi-macro", + "solana-frozen-abi-macro 3.0.0", "solana-genesis-config", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-instruction", + "solana-keypair", "solana-lattice-hash", - "solana-logger", + "solana-logger 3.0.0", "solana-measure", "solana-message", "solana-metrics", "solana-nohash-hasher", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rayon-threadlimit", "solana-rent", "solana-reward-info", "solana-sdk-ids", - "solana-sha256-hasher 3.0.0", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-sha256-hasher", + "solana-signature", + "solana-signer", "solana-slot-hashes", "solana-slot-history", "solana-stake-program", @@ -7013,7 +6921,7 @@ dependencies = [ "solana-time-utils", "solana-transaction", "solana-transaction-context", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "solana-vote-program", "spl-generic-token", "static_assertions", @@ -7026,45 +6934,19 @@ dependencies = [ "tikv-jemallocator", ] -[[package]] -name = "solana-address" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a7a457086457ea9db9a5199d719dc8734dc2d0342fad0d8f77633c31eb62f19" -dependencies = [ - "arbitrary", - "borsh", - "bytemuck", - "bytemuck_derive", - "curve25519-dalek 4.1.3", - "five8", - "five8_const", - "rand 0.8.5", - "serde", - "serde_derive", - "solana-atomic-u64 3.0.0", - "solana-define-syscall 3.0.0", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-program-error", - "solana-sanitize 3.0.0", - "solana-sha256-hasher 3.0.0", -] - [[package]] name = "solana-address-lookup-table-interface" -version = "3.0.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2f56cac5e70517a2f27d05e5100b20de7182473ffd0035b23ea273307905987" +checksum = "d1673f67efe870b64a65cb39e6194be5b26527691ce5922909939961a6e6b395" dependencies = [ "bincode", "bytemuck", "serde", "serde_derive", "solana-clock", - "solana-instruction 3.0.0", - "solana-instruction-error", - "solana-pubkey 3.0.0", + "solana-instruction", + "solana-pubkey", "solana-sdk-ids", "solana-slot-hashes", ] @@ -7078,15 +6960,6 @@ dependencies = [ "parking_lot 0.12.3", ] -[[package]] -name = "solana-atomic-u64" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a933ff1e50aff72d02173cfcd7511bd8540b027ee720b75f353f594f834216d0" -dependencies = [ - "parking_lot 0.12.3", -] - [[package]] name = "solana-banking-bench" version = "3.0.0" @@ -7102,18 +6975,18 @@ dependencies = [ "solana-compute-budget-interface", "solana-core", "solana-gossip", - "solana-hash 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-keypair", "solana-ledger", - "solana-logger", + "solana-logger 3.0.0", "solana-measure", "solana-message", "solana-perf", "solana-poh", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-runtime", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-streamer", "solana-system-interface", "solana-system-transaction", @@ -7127,26 +7000,26 @@ dependencies = [ name = "solana-banks-client" version = "3.0.0" dependencies = [ - "borsh", + "borsh 1.5.7", "futures 0.3.31", "solana-account", "solana-banks-interface", "solana-banks-server", "solana-clock", "solana-commitment-config", - "solana-hash 3.0.0", + "solana-hash", "solana-message", "solana-program-pack", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rent", "solana-runtime", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-system-interface", "solana-sysvar", "solana-transaction", "solana-transaction-context", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "tarpc", "thiserror 2.0.14", "tokio", @@ -7162,13 +7035,13 @@ dependencies = [ "solana-account", "solana-clock", "solana-commitment-config", - "solana-hash 3.0.0", + "solana-hash", "solana-message", - "solana-pubkey 3.0.0", - "solana-signature 3.1.0", + "solana-pubkey", + "solana-signature", "solana-transaction", "solana-transaction-context", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "tarpc", ] @@ -7185,16 +7058,16 @@ dependencies = [ "solana-client", "solana-clock", "solana-commitment-config", - "solana-hash 3.0.0", + "solana-hash", "solana-message", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-runtime", "solana-runtime-transaction", "solana-send-transaction-service", - "solana-signature 3.1.0", + "solana-signature", "solana-svm", "solana-transaction", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "tarpc", "tokio", "tokio-serde", @@ -7242,18 +7115,18 @@ dependencies = [ "solana-genesis", "solana-genesis-config", "solana-gossip", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-instruction", + "solana-keypair", "solana-local-cluster", - "solana-logger", + "solana-logger 3.0.0", "solana-measure", "solana-message", "solana-metrics", "solana-native-token", "solana-net-utils", "solana-nonce", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-quic-client", "solana-rent", "solana-rpc", @@ -7262,8 +7135,8 @@ dependencies = [ "solana-rpc-client-nonce-utils", "solana-runtime", "solana-sdk-ids", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-streamer", "solana-system-interface", "solana-test-validator", @@ -7289,13 +7162,13 @@ dependencies = [ "solana-clap-utils", "solana-client", "solana-connection-cache", - "solana-hash 3.0.0", - "solana-keypair 3.0.0", - "solana-logger", + "solana-hash", + "solana-keypair", + "solana-logger 3.0.0", "solana-message", "solana-net-utils", - "solana-pubkey 3.0.0", - "solana-signer 3.0.0", + "solana-pubkey", + "solana-signer", "solana-streamer", "solana-transaction", "solana-version", @@ -7305,35 +7178,36 @@ dependencies = [ [[package]] name = "solana-big-mod-exp" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30c80fb6d791b3925d5ec4bf23a7c169ef5090c013059ec3ed7d0b2c04efa085" +checksum = "75db7f2bbac3e62cfd139065d15bcda9e2428883ba61fc8d27ccb251081e7567" dependencies = [ "num-bigint 0.4.6", "num-traits", - "solana-define-syscall 3.0.0", + "solana-define-syscall", ] [[package]] name = "solana-bincode" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534a37aecd21986089224d0c01006a75b96ac6fb2f418c24edc15baf0d2a4c99" +checksum = "19a3787b8cf9c9fe3dd360800e8b70982b9e5a8af9e11c354b6665dd4a003adc" dependencies = [ "bincode", "serde", - "solana-instruction-error", + "solana-instruction", ] [[package]] name = "solana-blake3-hasher" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffa2e3bdac3339c6d0423275e45dafc5ac25f4d43bf344d026a3cc9a85e244a6" +checksum = "a1a0801e25a1b31a14494fc80882a036be0ffd290efc4c2d640bfcca120a4672" dependencies = [ "blake3", - "solana-define-syscall 3.0.0", - "solana-hash 3.0.0", + "solana-define-syscall", + "solana-hash", + "solana-sanitize", ] [[package]] @@ -7348,36 +7222,37 @@ dependencies = [ "serde", "serde_derive", "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-hash 3.0.0", - "solana-sanitize 3.0.0", - "solana-sha256-hasher 3.0.0", - "solana-signature 3.1.0", + "solana-frozen-abi-macro 3.0.0", + "solana-hash", + "solana-sanitize", + "solana-sha256-hasher", + "solana-signature", "solana-time-utils", ] [[package]] name = "solana-bn254" -version = "3.0.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20a5f01e99addb316d95d4ed31aa6eacfda557fffc00ae316b919e8ba0fc5b91" +checksum = "4420f125118732833f36facf96a27e7b78314b2d642ba07fa9ffdacd8d79e243" dependencies = [ "ark-bn254", "ark-ec", "ark-ff", "ark-serialize", "bytemuck", - "solana-define-syscall 3.0.0", + "solana-define-syscall", "thiserror 2.0.14", ] [[package]] name = "solana-borsh" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc402b16657abbfa9991cd5cbfac5a11d809f7e7d28d3bb291baeb088b39060e" +checksum = "718333bcd0a1a7aed6655aa66bef8d7fb047944922b2d3a18f49cbc13e73d004" dependencies = [ - "borsh", + "borsh 0.10.3", + "borsh 1.5.7", ] [[package]] @@ -7397,7 +7272,7 @@ dependencies = [ "solana-epoch-rewards", "solana-epoch-schedule", "solana-fee-calculator", - "solana-instruction 3.0.0", + "solana-instruction", "solana-last-restart-slot", "solana-loader-v3-interface", "solana-loader-v4-interface", @@ -7405,7 +7280,7 @@ dependencies = [ "solana-program", "solana-program-entrypoint", "solana-program-runtime", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rent", "solana-sbpf", "solana-sdk-ids", @@ -7429,16 +7304,16 @@ dependencies = [ "bincode", "solana-account", "solana-bpf-loader-program", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-instruction", + "solana-keypair", "solana-loader-v3-interface", "solana-program-test", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-sdk-ids", - "solana-signer 3.0.0", + "solana-signer", "solana-system-interface", "solana-transaction", - "solana-transaction-error 3.0.0", + "solana-transaction-error", ] [[package]] @@ -7456,9 +7331,9 @@ dependencies = [ "rayon", "solana-bucket-map", "solana-clock", - "solana-logger", + "solana-logger 3.0.0", "solana-measure", - "solana-pubkey 3.0.0", + "solana-pubkey", "tempfile", ] @@ -7469,10 +7344,10 @@ dependencies = [ "agave-feature-set", "solana-bpf-loader-program", "solana-compute-budget-program", - "solana-hash 3.0.0", + "solana-hash", "solana-loader-v4-program", "solana-program-runtime", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-sdk-ids", "solana-stake-program", "solana-system-program", @@ -7493,7 +7368,7 @@ dependencies = [ "solana-compute-budget-program", "solana-frozen-abi", "solana-loader-v4-program", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-sdk-ids", "solana-stake-program", "solana-system-program", @@ -7517,8 +7392,8 @@ dependencies = [ "semver 1.0.26", "serial_test", "solana-file-download", - "solana-keypair 2.2.1", - "solana-logger", + "solana-keypair", + "solana-logger 3.0.0", "tar", ] @@ -7531,7 +7406,7 @@ dependencies = [ "itertools 0.12.1", "log", "regex", - "solana-logger", + "solana-logger 3.0.0", ] [[package]] @@ -7546,16 +7421,16 @@ dependencies = [ "solana-cluster-type", "solana-commitment-config", "solana-derivation-path", - "solana-hash 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-keypair", "solana-message", "solana-native-token", "solana-presigner", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-remote-wallet", - "solana-seed-phrase 3.0.0", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-seed-phrase", + "solana-signature", + "solana-signer", "solana-system-interface", "tempfile", "thiserror 2.0.14", @@ -7576,19 +7451,19 @@ dependencies = [ "solana-cluster-type", "solana-commitment-config", "solana-derivation-path", - "solana-hash 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-keypair", "solana-message", "solana-native-token", "solana-presigner", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-remote-wallet", "solana-seed-derivable", - "solana-seed-phrase 3.0.0", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-seed-phrase", + "solana-signature", + "solana-signer", "solana-system-interface", - "solana-zk-sdk", + "solana-zk-sdk 3.0.0", "tempfile", "thiserror 2.0.14", "tiny-bip39", @@ -7634,19 +7509,21 @@ dependencies = [ "solana-commitment-config", "solana-compute-budget-interface", "solana-config-interface", + "solana-config-program-client", "solana-connection-cache", "solana-epoch-schedule", "solana-faucet", + "solana-feature-gate-client", "solana-feature-gate-interface", "solana-fee-calculator", "solana-fee-structure", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-instruction", + "solana-keypair", "solana-loader-v3-interface", "solana-loader-v4-interface", "solana-loader-v4-program", - "solana-logger", + "solana-logger 3.0.0", "solana-message", "solana-native-token", "solana-nonce", @@ -7655,7 +7532,7 @@ dependencies = [ "solana-packet", "solana-presigner", "solana-program-runtime", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-pubsub-client", "solana-quic-client", "solana-remote-wallet", @@ -7666,9 +7543,9 @@ dependencies = [ "solana-rpc-client-nonce-utils", "solana-sbpf", "solana-sdk-ids", - "solana-sha256-hasher 3.0.0", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-sha256-hasher", + "solana-signature", + "solana-signer", "solana-slot-history", "solana-stake-interface", "solana-streamer", @@ -7678,7 +7555,7 @@ dependencies = [ "solana-tps-client", "solana-tpu-client", "solana-transaction", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "solana-transaction-status", "solana-transaction-status-client-types", "solana-udp-client", @@ -7715,7 +7592,7 @@ dependencies = [ "chrono", "clap 2.33.3", "console 0.16.0", - "ed25519-dalek 1.0.1", + "ed25519-dalek", "humantime", "indicatif 0.18.0", "pretty-hex", @@ -7729,20 +7606,22 @@ dependencies = [ "solana-cli-config", "solana-clock", "solana-epoch-info", - "solana-hash 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-keypair", "solana-message", + "solana-native-token", "solana-packet", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rpc-client-api", "solana-sdk-ids", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-stake-interface", "solana-system-interface", + "solana-sysvar", "solana-transaction", "solana-transaction-context", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "solana-transaction-status", "solana-transaction-status-client-types", "solana-vote-program", @@ -7769,26 +7648,26 @@ dependencies = [ "solana-commitment-config", "solana-connection-cache", "solana-epoch-info", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-instruction", + "solana-keypair", "solana-measure", "solana-message", "solana-net-utils", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-pubsub-client", "solana-quic-client", "solana-quic-definitions", "solana-rpc-client", "solana-rpc-client-api", "solana-rpc-client-nonce-utils", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-streamer", "solana-time-utils", "solana-tpu-client", "solana-transaction", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "solana-transaction-status-client-types", "solana-udp-client", "thiserror 2.0.14", @@ -7804,23 +7683,23 @@ dependencies = [ "solana-client", "solana-clock", "solana-commitment-config", - "solana-keypair 3.0.0", + "solana-keypair", "solana-ledger", - "solana-logger", + "solana-logger 3.0.0", "solana-measure", "solana-merkle-tree", "solana-message", "solana-native-token", "solana-net-utils", "solana-perf", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-pubsub-client", "solana-rayon-threadlimit", "solana-rpc", "solana-rpc-client", "solana-rpc-client-api", "solana-runtime", - "solana-signer 3.0.0", + "solana-signer", "solana-streamer", "solana-system-interface", "solana-system-transaction", @@ -7834,30 +7713,30 @@ dependencies = [ [[package]] name = "solana-client-traits" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08618ed587e128105510c54ae3e456b9a06d674d8640db75afe66dad65cb4e02" +checksum = "83f0071874e629f29e0eb3dab8a863e98502ac7aba55b7e0df1803fc5cac72a7" dependencies = [ "solana-account", "solana-commitment-config", "solana-epoch-info", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-instruction", + "solana-keypair", "solana-message", - "solana-pubkey 3.0.0", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-pubkey", + "solana-signature", + "solana-signer", "solana-system-interface", "solana-transaction", - "solana-transaction-error 3.0.0", + "solana-transaction-error", ] [[package]] name = "solana-clock" -version = "3.0.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb62e9381182459a4520b5fe7fb22d423cae736239a6427fc398a88743d0ed59" +checksum = "1bb482ab70fced82ad3d7d3d87be33d466a3498eb8aa856434ff3c0dfc2e2e31" dependencies = [ "serde", "serde_derive", @@ -7868,20 +7747,20 @@ dependencies = [ [[package]] name = "solana-cluster-type" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb7692fa6bf10a1a86b450c4775526f56d7e0e2116a53313f2533b5694abea64" +checksum = "7ace9fea2daa28354d107ea879cff107181d85cd4e0f78a2bedb10e1a428c97e" dependencies = [ "serde", "serde_derive", - "solana-hash 3.0.0", + "solana-hash", ] [[package]] name = "solana-commitment-config" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fa5933a62dadb7d3ed35e6329de5cebb0678acc8f9cfdf413269084eeccc63f" +checksum = "ac49c4dde3edfa832de1697e9bcdb7c3b3f7cb7a1981b7c62526c8bb6700fb73" dependencies = [ "serde", "serde_derive", @@ -7910,30 +7789,30 @@ dependencies = [ "solana-builtins-default-costs", "solana-compute-budget", "solana-compute-budget-interface", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-instruction", + "solana-keypair", "solana-message", "solana-packet", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-sdk-ids", - "solana-signer 3.0.0", + "solana-signer", "solana-stake-interface", "solana-svm-transaction", "solana-system-interface", "solana-transaction", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "thiserror 2.0.14", ] [[package]] name = "solana-compute-budget-interface" -version = "3.0.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8292c436b269ad23cecc8b24f7da3ab07ca111661e25e00ce0e1d22771951ab9" +checksum = "8432d2c4c22d0499aa06d62e4f7e333f81777b3d7c96050ae9e5cb71a8c3aee4" dependencies = [ - "borsh", - "solana-instruction 3.0.0", + "borsh 1.5.7", + "solana-instruction", "solana-sdk-ids", ] @@ -7961,21 +7840,35 @@ dependencies = [ [[package]] name = "solana-config-interface" -version = "2.0.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63e401ae56aed512821cc7a0adaa412ff97fecd2dff4602be7b1330d2daec0c4" +checksum = "3fbdbcfedb467322ac9686ca61da0a1fdede2fd99a01fb2ed52b49452abd22e0" dependencies = [ "bincode", "serde", "serde_derive", "solana-account", - "solana-instruction 3.0.0", - "solana-pubkey 3.0.0", + "solana-instruction", + "solana-pubkey", "solana-sdk-ids", "solana-short-vec", "solana-system-interface", ] +[[package]] +name = "solana-config-program-client" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef9867b9ffae6e48a97ce6349e7796fcb34084298e909a8fa1fe427f41b52fd4" +dependencies = [ + "bincode", + "borsh 0.10.3", + "kaigan", + "serde", + "solana-config-interface", + "solana-program", +] + [[package]] name = "solana-connection-cache" version = "3.0.0" @@ -7990,13 +7883,13 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "rayon", - "solana-keypair 3.0.0", - "solana-logger", + "solana-keypair", + "solana-logger 3.0.0", "solana-measure", "solana-metrics", "solana-net-utils", "solana-time-utils", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "thiserror 2.0.14", "tokio", ] @@ -8059,7 +7952,6 @@ dependencies = [ "solana-builtins-default-costs", "solana-client", "solana-clock", - "solana-cluster-type", "solana-compute-budget", "solana-compute-budget-instruction", "solana-compute-budget-interface", @@ -8073,17 +7965,17 @@ dependencies = [ "solana-fee-calculator", "solana-fee-structure", "solana-frozen-abi", - "solana-frozen-abi-macro", + "solana-frozen-abi-macro 3.0.0", "solana-genesis-config", "solana-geyser-plugin-manager", "solana-gossip", "solana-hard-forks", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-instruction", + "solana-keypair", "solana-ledger", "solana-loader-v3-interface", - "solana-logger", + "solana-logger 3.0.0", "solana-measure", "solana-message", "solana-metrics", @@ -8096,7 +7988,7 @@ dependencies = [ "solana-poh", "solana-poh-config", "solana-program-runtime", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-quic-client", "solana-quic-definitions", "solana-rayon-threadlimit", @@ -8105,14 +7997,14 @@ dependencies = [ "solana-rpc-client-api", "solana-runtime", "solana-runtime-transaction", - "solana-sanitize 3.0.0", + "solana-sanitize", "solana-sdk-ids", "solana-send-transaction-service", - "solana-sha256-hasher 3.0.0", + "solana-sha256-hasher", "solana-short-vec", "solana-shred-version", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-slot-hashes", "solana-slot-history", "solana-stake-program", @@ -8129,7 +8021,7 @@ dependencies = [ "solana-tpu-client", "solana-tpu-client-next", "solana-transaction", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "solana-transaction-status", "solana-turbine", "solana-unified-scheduler-logic", @@ -8175,25 +8067,25 @@ dependencies = [ "solana-cost-model", "solana-fee-structure", "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", - "solana-logger", + "solana-frozen-abi-macro 3.0.0", + "solana-hash", + "solana-instruction", + "solana-keypair", + "solana-logger 3.0.0", "solana-message", "solana-metrics", "solana-packet", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-runtime-transaction", "solana-sdk-ids", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-svm-transaction", "solana-system-interface", "solana-system-program", "solana-system-transaction", "solana-transaction", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "solana-vote", "solana-vote-program", "static_assertions", @@ -8202,28 +8094,28 @@ dependencies = [ [[package]] name = "solana-cpi" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16238feb63d1cbdf915fb287f29ef7a7ebf81469bd6214f8b72a53866b593f8f" +checksum = "8dc71126edddc2ba014622fc32d0f5e2e78ec6c5a1e0eb511b85618c09e9ea11" dependencies = [ "solana-account-info", - "solana-define-syscall 3.0.0", - "solana-instruction 3.0.0", + "solana-define-syscall", + "solana-instruction", "solana-program-error", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-stable-layout", ] [[package]] name = "solana-curve25519" -version = "2.3.7" +version = "2.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b162f50499b391b785d57b2f2c73e3b9754d88fd4894bef444960b00bda8dcca" +checksum = "def3cfe5279edb64fc39111cff6dcf77b01fbfba2c02c13ced41e6a48baf4cbe" dependencies = [ "bytemuck", "bytemuck_derive", "curve25519-dalek 4.1.3", - "solana-define-syscall 2.3.0", + "solana-define-syscall", "subtle", "thiserror 2.0.14", ] @@ -8235,7 +8127,7 @@ dependencies = [ "bytemuck", "bytemuck_derive", "curve25519-dalek 4.1.3", - "solana-define-syscall 3.0.0", + "solana-define-syscall", "subtle", "thiserror 2.0.14", ] @@ -8255,17 +8147,11 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ae3e2abcf541c8122eafe9a625d4d194b4023c20adde1e251f94e056bb1aee2" -[[package]] -name = "solana-define-syscall" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9697086a4e102d28a156b8d6b521730335d6951bd39a5e766512bbe09007cee" - [[package]] name = "solana-derivation-path" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff71743072690fdbdfcdc37700ae1cb77485aaad49019473a81aee099b1e0b8c" +checksum = "939756d798b25c5ec3cca10e06212bdca3b1443cb9bb740a38124f58b258737b" dependencies = [ "derivation-path", "qstring", @@ -8289,22 +8175,22 @@ dependencies = [ "solana-core", "solana-faucet", "solana-gossip", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-instruction", + "solana-keypair", "solana-local-cluster", - "solana-logger", + "solana-logger 3.0.0", "solana-measure", "solana-message", "solana-net-utils", "solana-perf", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-quic-client", "solana-rpc", "solana-rpc-client", "solana-runtime", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-stake-interface", "solana-streamer", "solana-system-interface", @@ -8328,13 +8214,16 @@ dependencies = [ [[package]] name = "solana-ed25519-program" -version = "3.0.0" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1419197f1c06abf760043f6d64ba9d79a03ad5a43f18c7586471937122094da" +checksum = "a1feafa1691ea3ae588f99056f4bdd1293212c7ece28243d7da257c443e84753" dependencies = [ "bytemuck", "bytemuck_derive", - "solana-instruction 3.0.0", + "ed25519-dalek", + "solana-feature-set", + "solana-instruction", + "solana-precompile-error", "solana-sdk-ids", ] @@ -8343,15 +8232,15 @@ name = "solana-ed25519-program-tests" version = "3.0.0" dependencies = [ "assert_matches", - "ed25519-dalek 1.0.1", + "ed25519-dalek", "rand 0.8.5", "solana-ed25519-program", - "solana-instruction 3.0.0", + "solana-instruction", "solana-precompile-error", "solana-program-test", - "solana-signer 3.0.0", + "solana-signer", "solana-transaction", - "solana-transaction-error 3.0.0", + "solana-transaction-error", ] [[package]] @@ -8369,30 +8258,30 @@ dependencies = [ "rayon", "serde", "solana-entry", - "solana-hash 3.0.0", - "solana-keypair 3.0.0", - "solana-logger", + "solana-hash", + "solana-keypair", + "solana-logger 3.0.0", "solana-measure", "solana-merkle-tree", "solana-message", "solana-metrics", "solana-packet", "solana-perf", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-runtime-transaction", - "solana-sha256-hasher 3.0.0", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-sha256-hasher", + "solana-signature", + "solana-signer", "solana-system-transaction", "solana-transaction", - "solana-transaction-error 3.0.0", + "solana-transaction-error", ] [[package]] name = "solana-epoch-info" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a6b69bd71386f61344f2bcf0f527f5fd6dd3b22add5880e2e1bf1dd1fa8059" +checksum = "90ef6f0b449290b0b9f32973eefd95af35b01c5c0c34c569f936c34c5b20d77b" dependencies = [ "serde", "serde_derive", @@ -8400,13 +8289,13 @@ dependencies = [ [[package]] name = "solana-epoch-rewards" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b319a4ed70390af911090c020571f0ff1f4ec432522d05ab89f5c08080381995" +checksum = "86b575d3dd323b9ea10bb6fe89bf6bf93e249b215ba8ed7f68f1a3633f384db7" dependencies = [ "serde", "serde_derive", - "solana-hash 3.0.0", + "solana-hash", "solana-sdk-ids", "solana-sdk-macro", "solana-sysvar-id", @@ -8414,56 +8303,46 @@ dependencies = [ [[package]] name = "solana-epoch-rewards-hasher" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e507099d0c2c5d7870c9b1848281ea67bbeee80d171ca85003ee5767994c9c38" +checksum = "96c5fd2662ae7574810904585fd443545ed2b568dbd304b25a31e79ccc76e81b" dependencies = [ "siphasher 0.3.11", - "solana-hash 3.0.0", - "solana-pubkey 3.0.0", + "solana-hash", + "solana-pubkey", ] [[package]] name = "solana-epoch-schedule" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5481e72cc4d52c169db73e4c0cd16de8bc943078aac587ec4817a75cc6388f" +checksum = "3fce071fbddecc55d727b1d7ed16a629afe4f6e4c217bc8d00af3b785f6f67ed" dependencies = [ "serde", "serde_derive", "solana-frozen-abi", - "solana-frozen-abi-macro", + "solana-frozen-abi-macro 2.2.1", "solana-sdk-ids", "solana-sdk-macro", "solana-sysvar-id", ] -[[package]] -name = "solana-epoch-stake" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc6693d0ea833b880514b9b88d95afb80b42762dca98b0712465d1fcbbcb89e" -dependencies = [ - "solana-define-syscall 3.0.0", - "solana-pubkey 3.0.0", -] - [[package]] name = "solana-example-mocks" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978855d164845c1b0235d4b4d101cadc55373fffaf0b5b6cfa2194d25b2ed658" +checksum = "84461d56cbb8bb8d539347151e0525b53910102e4bced875d49d5139708e39d3" dependencies = [ "serde", "serde_derive", "solana-address-lookup-table-interface", "solana-clock", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", + "solana-hash", + "solana-instruction", "solana-keccak-hasher", "solana-message", "solana-nonce", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-sdk-ids", "solana-system-interface", "thiserror 2.0.14", @@ -8481,16 +8360,16 @@ dependencies = [ "serde_derive", "solana-clap-utils", "solana-cli-config", - "solana-cli-output", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", - "solana-logger", + "solana-hash", + "solana-instruction", + "solana-keypair", + "solana-logger 3.0.0", "solana-message", "solana-metrics", + "solana-native-token", "solana-packet", - "solana-pubkey 3.0.0", - "solana-signer 3.0.0", + "solana-pubkey", + "solana-signer", "solana-system-interface", "solana-system-transaction", "solana-transaction", @@ -8500,25 +8379,52 @@ dependencies = [ "tokio", ] +[[package]] +name = "solana-feature-gate-client" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1056507c534839b5cd1b1010ffedb9e8c92313269786fb5066ff53b30326dc3" +dependencies = [ + "borsh 0.10.3", + "num-derive", + "num-traits", + "solana-program", + "thiserror 2.0.14", +] + [[package]] name = "solana-feature-gate-interface" -version = "3.0.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7347ab62e6d47a82e340c865133795b394feea7c2b2771d293f57691c6544c3f" +checksum = "43f5c5382b449e8e4e3016fb05e418c53d57782d8b5c30aa372fc265654b956d" dependencies = [ "bincode", "serde", "serde_derive", "solana-account", "solana-account-info", - "solana-instruction 3.0.0", + "solana-instruction", "solana-program-error", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rent", "solana-sdk-ids", "solana-system-interface", ] +[[package]] +name = "solana-feature-set" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92f6c09cc41059c0e03ccbee7f5d4cc0a315d68ef0d59b67eb90246adfd8cc35" +dependencies = [ + "ahash 0.8.11", + "lazy_static", + "solana-epoch-schedule", + "solana-hash", + "solana-pubkey", + "solana-sha256-hasher", +] + [[package]] name = "solana-fee" version = "3.0.0" @@ -8530,26 +8436,28 @@ dependencies = [ [[package]] name = "solana-fee-calculator" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a73cc03ca4bed871ca174558108835f8323e85917bb38b9c81c7af2ab853efe" +checksum = "d89bc408da0fb3812bc3008189d148b4d3e08252c79ad810b245482a3f70cd8d" dependencies = [ "log", "serde", "serde_derive", "solana-frozen-abi", - "solana-frozen-abi-macro", + "solana-frozen-abi-macro 2.2.1", ] [[package]] name = "solana-fee-structure" -version = "3.0.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e2abdb1223eea8ec64136f39cb1ffcf257e00f915c957c35c0dd9e3f4e700b0" +checksum = "33adf673581c38e810bf618f745bf31b683a0a4a4377682e6aaac5d9a058dd4e" dependencies = [ "serde", "serde_derive", "solana-frozen-abi", + "solana-message", + "solana-native-token", ] [[package]] @@ -8566,9 +8474,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "3.0.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f19aad3b79cf84cd24de85e711ed1718de1e5bf46a710fa73179efa6a117d707" +checksum = "4ac93e831736e9cbd1571c5c692fa7533a304f184f77cba52e5b83c4c7eeebda" dependencies = [ "boxcar", "bs58", @@ -8582,10 +8490,21 @@ dependencies = [ "serde_derive", "serde_with", "sha2 0.10.9", - "solana-frozen-abi-macro", + "solana-frozen-abi-macro 2.2.1", "thiserror 2.0.14", ] +[[package]] +name = "solana-frozen-abi-macro" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b83f88a126213cbcb57672c5e70ddb9791eff9b480e9f39fe9285fd2abca66fa" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + [[package]] name = "solana-frozen-abi-macro" version = "3.0.0" @@ -8594,7 +8513,7 @@ checksum = "d42809b90c84963eb5f2e17afafb1384892341b0d8ec12ae8f4a8c69a96138e4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -8615,7 +8534,6 @@ dependencies = [ "solana-clap-utils", "solana-cli-config", "solana-clock", - "solana-cluster-type", "solana-commitment-config", "solana-entry", "solana-epoch-schedule", @@ -8623,19 +8541,19 @@ dependencies = [ "solana-fee-calculator", "solana-genesis-config", "solana-inflation", - "solana-keypair 3.0.0", + "solana-keypair", "solana-ledger", "solana-loader-v3-interface", - "solana-logger", + "solana-logger 3.0.0", "solana-native-token", "solana-poh-config", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rent", "solana-rpc-client", "solana-rpc-client-api", "solana-runtime", "solana-sdk-ids", - "solana-signer 3.0.0", + "solana-signer", "solana-stake-interface", "solana-stake-program", "solana-time-utils", @@ -8646,9 +8564,9 @@ dependencies = [ [[package]] name = "solana-genesis-config" -version = "3.0.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "749eccc960e85c9b33608450093d256006253e1cb436b8380e71777840a3f675" +checksum = "b3725085d47b96d37fef07a29d78d2787fc89a0b9004c66eed7753d1e554989f" dependencies = [ "bincode", "chrono", @@ -8660,16 +8578,17 @@ dependencies = [ "solana-cluster-type", "solana-epoch-schedule", "solana-fee-calculator", - "solana-hash 3.0.0", + "solana-hash", "solana-inflation", - "solana-keypair 3.0.0", + "solana-keypair", + "solana-logger 2.3.1", "solana-poh-config", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rent", "solana-sdk-ids", - "solana-sha256-hasher 3.0.0", + "solana-sha256-hasher", "solana-shred-version", - "solana-signer 3.0.0", + "solana-signer", "solana-time-utils", ] @@ -8681,7 +8600,7 @@ dependencies = [ "solana-accounts-db", "solana-download-utils", "solana-genesis-config", - "solana-hash 3.0.0", + "solana-hash", "solana-rpc-client", ] @@ -8701,14 +8620,14 @@ dependencies = [ "solana-accounts-db", "solana-clock", "solana-entry", - "solana-hash 3.0.0", + "solana-hash", "solana-ledger", "solana-measure", "solana-metrics", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rpc", "solana-runtime", - "solana-signature 3.1.0", + "solana-signature", "solana-transaction", "solana-transaction-status", "thiserror 2.0.14", @@ -8752,16 +8671,16 @@ dependencies = [ "solana-clap-utils", "solana-client", "solana-clock", - "solana-cluster-type", "solana-connection-cache", "solana-entry", "solana-epoch-schedule", "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-hash 3.0.0", - "solana-keypair 3.0.0", + "solana-frozen-abi-macro 3.0.0", + "solana-genesis-config", + "solana-hash", + "solana-keypair", "solana-ledger", - "solana-logger", + "solana-logger 3.0.0", "solana-low-pass-filter", "solana-measure", "solana-metrics", @@ -8769,17 +8688,17 @@ dependencies = [ "solana-net-utils", "solana-packet", "solana-perf", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-quic-definitions", "solana-rayon-threadlimit", "solana-rpc-client", "solana-runtime", - "solana-sanitize 3.0.0", + "solana-sanitize", "solana-serde-varint", - "solana-sha256-hasher 3.0.0", + "solana-sha256-hasher", "solana-short-vec", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-streamer", "solana-system-transaction", "solana-time-utils", @@ -8796,14 +8715,14 @@ dependencies = [ [[package]] name = "solana-hard-forks" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0abacc4b66ce471f135f48f22facf75cbbb0f8a252fbe2c1e0aa59d5b203f519" +checksum = "b6c28371f878e2ead55611d8ba1b5fb879847156d04edea13693700ad1a28baf" dependencies = [ "serde", "serde_derive", "solana-frozen-abi", - "solana-frozen-abi-macro", + "solana-frozen-abi-macro 2.2.1", ] [[package]] @@ -8812,41 +8731,30 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5b96e9f0300fa287b545613f007dfe20043d7812bee255f418c1eb649c93b63" dependencies = [ - "five8", - "js-sys", - "solana-atomic-u64 2.2.1", - "solana-sanitize 2.2.1", - "wasm-bindgen", -] - -[[package]] -name = "solana-hash" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a063723b9e84c14d8c0d2cdf0268207dc7adecf546e31251f9e07c7b00b566c" -dependencies = [ - "borsh", + "borsh 1.5.7", "bytemuck", "bytemuck_derive", "five8", + "js-sys", "serde", "serde_derive", - "solana-atomic-u64 3.0.0", + "solana-atomic-u64", "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-sanitize 3.0.0", + "solana-frozen-abi-macro 2.2.1", + "solana-sanitize", + "wasm-bindgen", ] [[package]] name = "solana-inflation" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e92f37a14e7c660628752833250dd3dcd8e95309876aee751d7f8769a27947c6" +checksum = "23eef6a09eb8e568ce6839573e4966850e85e9ce71e6ae1a6c930c1c43947de3" dependencies = [ "serde", "serde_derive", "solana-frozen-abi", - "solana-frozen-abi-macro", + "solana-frozen-abi-macro 2.2.1", ] [[package]] @@ -8855,58 +8763,32 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47298e2ce82876b64f71e9d13a46bc4b9056194e7f9937ad3084385befa50885" dependencies = [ + "bincode", + "borsh 1.5.7", "getrandom 0.2.15", "js-sys", - "num-traits", - "solana-define-syscall 2.3.0", - "solana-pubkey 2.4.0", - "wasm-bindgen", -] - -[[package]] -name = "solana-instruction" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df4e8fcba01d7efa647ed20a081c234475df5e11a93acb4393cc2c9a7b99bab" -dependencies = [ - "bincode", - "borsh", - "serde", - "serde_derive", - "solana-define-syscall 3.0.0", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-instruction-error", - "solana-pubkey 3.0.0", -] - -[[package]] -name = "solana-instruction-error" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f0d483b8ae387178d9210e0575b666b05cdd4bd0f2f188128249f6e454d39d" -dependencies = [ "num-traits", "serde", "serde_derive", + "solana-define-syscall", "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-program-error", + "solana-frozen-abi-macro 2.2.1", + "solana-pubkey", + "wasm-bindgen", ] [[package]] name = "solana-instructions-sysvar" -version = "3.0.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ddf67876c541aa1e21ee1acae35c95c6fbc61119814bfef70579317a5e26955" +checksum = "e0e85a6fad5c2d0c4f5b91d34b8ca47118fc593af706e523cdbedf846a954f57" dependencies = [ "bitflags 2.9.1", "solana-account-info", - "solana-instruction 3.0.0", - "solana-instruction-error", + "solana-instruction", "solana-program-error", - "solana-pubkey 3.0.0", - "solana-sanitize 3.0.0", + "solana-pubkey", + "solana-sanitize", "solana-sdk-ids", "solana-serialize-utils", "solana-sysvar-id", @@ -8914,13 +8796,14 @@ dependencies = [ [[package]] name = "solana-keccak-hasher" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57eebd3012946913c8c1b8b43cdf8a6249edb09c0b6be3604ae910332a3acd97" +checksum = "c7aeb957fbd42a451b99235df4942d96db7ef678e8d5061ef34c9b34cae12f79" dependencies = [ "sha3", - "solana-define-syscall 3.0.0", - "solana-hash 3.0.0", + "solana-define-syscall", + "solana-hash", + "solana-sanitize", ] [[package]] @@ -8935,13 +8818,13 @@ dependencies = [ "solana-clap-v3-utils", "solana-cli-config", "solana-derivation-path", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-instruction", + "solana-keypair", "solana-message", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-remote-wallet", "solana-seed-derivable", - "solana-signer 3.0.0", + "solana-signer", "solana-version", "tempfile", "tiny-bip39", @@ -8954,38 +8837,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3dbb7042c2e0c561afa07242b2099d55c57bd1b1da3b6476932197d84e15e3e4" dependencies = [ "bs58", - "ed25519-dalek 1.0.1", - "rand 0.7.3", - "solana-pubkey 2.4.0", - "solana-seed-phrase 2.2.1", - "solana-signature 2.3.0", - "solana-signer 2.2.1", - "wasm-bindgen", -] - -[[package]] -name = "solana-keypair" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80eaf45d386c94e59c0c2d3db4a76c05f90365394aa848edce5826d3f7e77fb3" -dependencies = [ - "ed25519-dalek 2.2.0", + "ed25519-dalek", "ed25519-dalek-bip32", - "five8", - "rand 0.8.5", + "rand 0.7.3", "solana-derivation-path", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-seed-derivable", - "solana-seed-phrase 3.0.0", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-seed-phrase", + "solana-signature", + "solana-signer", + "wasm-bindgen", ] [[package]] name = "solana-last-restart-slot" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcda154ec827f5fc1e4da0af3417951b7e9b8157540f81f936c4a8b1156134d0" +checksum = "4a6360ac2fdc72e7463565cd256eedcf10d7ef0c28a1249d261ec168c1b55cdd" dependencies = [ "serde", "serde_derive", @@ -9059,13 +8927,13 @@ dependencies = [ "solana-entry", "solana-epoch-schedule", "solana-frozen-abi", - "solana-frozen-abi-macro", + "solana-frozen-abi-macro 3.0.0", "solana-genesis-config", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-instruction", + "solana-keypair", "solana-ledger", - "solana-logger", + "solana-logger 3.0.0", "solana-measure", "solana-message", "solana-metrics", @@ -9076,15 +8944,15 @@ dependencies = [ "solana-program-option", "solana-program-pack", "solana-program-runtime", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rayon-threadlimit", "solana-runtime", "solana-runtime-transaction", "solana-seed-derivable", - "solana-sha256-hasher 3.0.0", + "solana-sha256-hasher", "solana-shred-version", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-stake-interface", "solana-stake-program", "solana-storage-bigtable", @@ -9098,7 +8966,7 @@ dependencies = [ "solana-time-utils", "solana-transaction", "solana-transaction-context", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "solana-transaction-status", "solana-vote", "solana-vote-program", @@ -9118,44 +8986,44 @@ dependencies = [ [[package]] name = "solana-loader-v2-interface" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e4a6f0ad4fd9c30679bfee2ce3ea6a449cac38049f210480b751f65676dfe82" +checksum = "d8ab08006dad78ae7cd30df8eea0539e207d08d91eaefb3e1d49a446e1c49654" dependencies = [ "serde", "serde_bytes", "serde_derive", - "solana-instruction 3.0.0", - "solana-pubkey 3.0.0", + "solana-instruction", + "solana-pubkey", "solana-sdk-ids", ] [[package]] name = "solana-loader-v3-interface" -version = "6.1.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee44c9b1328c5c712c68966fb8de07b47f3e7bac006e74ddd1bb053d3e46e5d" +checksum = "6f7162a05b8b0773156b443bccd674ea78bb9aa406325b467ea78c06c99a63a2" dependencies = [ "serde", "serde_bytes", "serde_derive", - "solana-instruction 3.0.0", - "solana-pubkey 3.0.0", + "solana-instruction", + "solana-pubkey", "solana-sdk-ids", "solana-system-interface", ] [[package]] name = "solana-loader-v4-interface" -version = "3.1.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c948b33ff81fa89699911b207059e493defdba9647eaf18f23abdf3674e0fb" +checksum = "706a777242f1f39a83e2a96a2a6cb034cb41169c6ecbee2cf09cb873d9659e7e" dependencies = [ "serde", "serde_bytes", "serde_derive", - "solana-instruction 3.0.0", - "solana-pubkey 3.0.0", + "solana-instruction", + "solana-pubkey", "solana-sdk-ids", "solana-system-interface", ] @@ -9171,12 +9039,12 @@ dependencies = [ "solana-bincode", "solana-bpf-loader-program", "solana-clock", - "solana-instruction 3.0.0", + "solana-instruction", "solana-loader-v3-interface", "solana-loader-v4-interface", "solana-packet", "solana-program-runtime", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-sbpf", "solana-sdk-ids", "solana-svm-log-collector", @@ -9204,7 +9072,6 @@ dependencies = [ "solana-client", "solana-client-traits", "solana-clock", - "solana-cluster-type", "solana-commitment-config", "solana-core", "solana-download-utils", @@ -9213,16 +9080,16 @@ dependencies = [ "solana-genesis-config", "solana-gossip", "solana-hard-forks", - "solana-hash 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-keypair", "solana-ledger", "solana-local-cluster", - "solana-logger", + "solana-logger 3.0.0", "solana-message", "solana-native-token", "solana-net-utils", "solana-poh-config", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-pubsub-client", "solana-quic-client", "solana-rpc-client", @@ -9230,7 +9097,7 @@ dependencies = [ "solana-runtime", "solana-sdk-ids", "solana-shred-version", - "solana-signer 3.0.0", + "solana-signer", "solana-slot-hashes", "solana-stake-interface", "solana-stake-program", @@ -9240,7 +9107,7 @@ dependencies = [ "solana-time-utils", "solana-tpu-client", "solana-transaction", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "solana-turbine", "solana-validator-exit", "solana-vote", @@ -9252,13 +9119,26 @@ dependencies = [ "trees", ] +[[package]] +name = "solana-logger" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db8e777ec1afd733939b532a42492d888ec7c88d8b4127a5d867eb45c6eb5cd5" +dependencies = [ + "env_logger 0.9.3", + "lazy_static", + "libc", + "log", + "signal-hook", +] + [[package]] name = "solana-logger" version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef7421d1092680d72065edbf5c7605856719b021bf5f173656c71febcdd5d003" dependencies = [ - "env_logger", + "env_logger 0.11.8", "lazy_static", "libc", "log", @@ -9283,28 +9163,31 @@ version = "3.0.0" dependencies = [ "fast-math", "hex", - "solana-hash 3.0.0", - "solana-sha256-hasher 3.0.0", + "solana-hash", + "solana-sha256-hasher", ] [[package]] name = "solana-message" -version = "3.0.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c33e9fa7871147ac3235a7320386afa2dc64bbb21ca3cf9d79a6f6827313176" +checksum = "1796aabce376ff74bf89b78d268fa5e683d7d7a96a0a4e4813ec34de49d5314b" dependencies = [ "bincode", "blake3", "lazy_static", "serde", "serde_derive", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-pubkey 3.0.0", - "solana-sanitize 3.0.0", + "solana-bincode", + "solana-hash", + "solana-instruction", + "solana-pubkey", + "solana-sanitize", "solana-sdk-ids", "solana-short-vec", - "solana-transaction-error 3.0.0", + "solana-system-interface", + "solana-transaction-error", + "wasm-bindgen", ] [[package]] @@ -9313,32 +9196,32 @@ version = "3.0.0" dependencies = [ "bencher", "crossbeam-channel", - "env_logger", + "env_logger 0.11.8", "gethostname", "log", "rand 0.8.5", "reqwest 0.12.22", "serial_test", "solana-cluster-type", - "solana-sha256-hasher 3.0.0", + "solana-sha256-hasher", "solana-time-utils", "thiserror 2.0.14", ] [[package]] name = "solana-msg" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "264275c556ea7e22b9d3f87d56305546a38d4eee8ec884f3b126236cb7dcbbb4" +checksum = "f36a1a14399afaabc2781a1db09cb14ee4cc4ee5c7a5a3cfcc601811379a8092" dependencies = [ - "solana-define-syscall 3.0.0", + "solana-define-syscall", ] [[package]] name = "solana-native-token" -version = "3.0.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8dd4c280dca9d046139eb5b7a5ac9ad10403fbd64964c7d7571214950d758f" +checksum = "307fb2f78060995979e9b4f68f833623565ed4e55d3725f100454ce78a99a1a3" [[package]] name = "solana-net-shaper" @@ -9349,7 +9232,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "solana-logger", + "solana-logger 3.0.0", ] [[package]] @@ -9368,7 +9251,7 @@ dependencies = [ "serde", "serde_derive", "socket2 0.6.0", - "solana-logger", + "solana-logger 3.0.0", "solana-serde", "tokio", "url 2.5.4", @@ -9382,26 +9265,26 @@ checksum = "8b8a731ed60e89177c8a7ab05fe0f1511cedd3e70e773f288f9de33a9cfdc21e" [[package]] name = "solana-nonce" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abbdc6c8caf1c08db9f36a50967539d0f72b9f1d4aea04fec5430f532e5afadc" +checksum = "703e22eb185537e06204a5bd9d509b948f0066f2d1d814a6f475dafb3ddf1325" dependencies = [ "serde", "serde_derive", "solana-fee-calculator", - "solana-hash 3.0.0", - "solana-pubkey 3.0.0", - "solana-sha256-hasher 3.0.0", + "solana-hash", + "solana-pubkey", + "solana-sha256-hasher", ] [[package]] name = "solana-nonce-account" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "805fd25b29e5a1a0e6c3dd6320c9da80f275fbe4ff6e392617c303a2085c435e" +checksum = "cde971a20b8dbf60144d6a84439dda86b5466e00e2843091fe731083cda614da" dependencies = [ "solana-account", - "solana-hash 3.0.0", + "solana-hash", "solana-nonce", "solana-sdk-ids", ] @@ -9413,30 +9296,30 @@ dependencies = [ "log", "reqwest 0.12.22", "serde_json", - "solana-hash 3.0.0", + "solana-hash", ] [[package]] name = "solana-offchain-message" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6e2a1141a673f72a05cf406b99e4b2b8a457792b7c01afa07b3f00d4e2de393" +checksum = "b526398ade5dea37f1f147ce55dae49aa017a5d7326606359b0445ca8d946581" dependencies = [ "num_enum", - "solana-hash 3.0.0", + "solana-hash", "solana-packet", - "solana-pubkey 3.0.0", - "solana-sanitize 3.0.0", - "solana-sha256-hasher 3.0.0", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-pubkey", + "solana-sanitize", + "solana-sha256-hasher", + "solana-signature", + "solana-signer", ] [[package]] name = "solana-packet" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6edf2f25743c95229ac0fdc32f8f5893ef738dbf332c669e9861d33ddb0f469d" +checksum = "004f2d2daf407b3ec1a1ca5ec34b3ccdfd6866dd2d3c7d0715004a96e4b6d127" dependencies = [ "bincode", "bitflags 2.9.1", @@ -9445,7 +9328,7 @@ dependencies = [ "serde_derive", "serde_with", "solana-frozen-abi", - "solana-frozen-abi-macro", + "solana-frozen-abi-macro 2.2.1", ] [[package]] @@ -9471,20 +9354,20 @@ dependencies = [ "serde", "solana-clock", "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-hash 3.0.0", - "solana-keypair 3.0.0", - "solana-logger", + "solana-frozen-abi-macro 3.0.0", + "solana-hash", + "solana-keypair", + "solana-logger 3.0.0", "solana-message", "solana-metrics", "solana-packet", "solana-perf", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rayon-threadlimit", "solana-sdk-ids", "solana-short-vec", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-system-interface", "solana-system-transaction", "solana-time-utils", @@ -9510,19 +9393,19 @@ dependencies = [ "rand 0.8.5", "solana-clock", "solana-entry", - "solana-hash 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-keypair", "solana-ledger", - "solana-logger", + "solana-logger 3.0.0", "solana-measure", "solana-metrics", "solana-perf", "solana-poh", "solana-poh-config", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-runtime", - "solana-sha256-hasher 3.0.0", - "solana-signer 3.0.0", + "solana-sha256-hasher", + "solana-signer", "solana-system-transaction", "solana-time-utils", "solana-transaction", @@ -9539,18 +9422,18 @@ dependencies = [ "num_cpus", "rayon", "solana-entry", - "solana-logger", + "solana-logger 3.0.0", "solana-measure", "solana-perf", - "solana-sha256-hasher 3.0.0", + "solana-sha256-hasher", "solana-version", ] [[package]] name = "solana-poh-config" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f1fef1f2ff2480fdbcc64bef5e3c47bec6e1647270db88b43f23e3a55f8d9cf" +checksum = "d650c3b4b9060082ac6b0efbbb66865089c58405bfb45de449f3f2b91eccee75" dependencies = [ "serde", "serde_derive", @@ -9562,120 +9445,176 @@ version = "3.0.0" dependencies = [ "ark-bn254", "light-poseidon", - "solana-define-syscall 3.0.0", + "solana-define-syscall", "thiserror 2.0.14", ] [[package]] name = "solana-precompile-error" -version = "3.0.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cafcd950de74c6c39d55dc8ca108bbb007799842ab370ef26cf45a34453c31e1" +checksum = "4d87b2c1f5de77dfe2b175ee8dd318d196aaca4d0f66f02842f80c852811f9f8" dependencies = [ "num-traits", + "solana-decode-error", +] + +[[package]] +name = "solana-precompiles" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a460ab805ec063802105b463ecb5eb02c3ffe469e67a967eea8a6e778e0bc06" +dependencies = [ + "lazy_static", + "solana-ed25519-program", + "solana-feature-set", + "solana-message", + "solana-precompile-error", + "solana-pubkey", + "solana-sdk-ids", + "solana-secp256k1-program", + "solana-secp256r1-program", ] [[package]] name = "solana-presigner" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f704eaf825be3180832445b9e4983b875340696e8e7239bf2d535b0f86c14a2" +checksum = "81a57a24e6a4125fc69510b6774cd93402b943191b6cddad05de7281491c90fe" dependencies = [ - "solana-pubkey 3.0.0", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-pubkey", + "solana-signature", + "solana-signer", ] [[package]] name = "solana-program" -version = "3.0.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91b12305dd81045d705f427acd0435a2e46444b65367d7179d7bdcfc3bc5f5eb" +checksum = "98eca145bd3545e2fbb07166e895370576e47a00a7d824e325390d33bf467210" dependencies = [ + "bincode", + "blake3", + "borsh 0.10.3", + "borsh 1.5.7", + "bs58", + "bytemuck", + "console_error_panic_hook", + "console_log", + "getrandom 0.2.15", + "lazy_static", + "log", "memoffset 0.9.1", + "num-bigint 0.4.6", + "num-derive", + "num-traits", + "rand 0.8.5", + "serde", + "serde_bytes", + "serde_derive", "solana-account-info", + "solana-address-lookup-table-interface", + "solana-atomic-u64", "solana-big-mod-exp", + "solana-bincode", "solana-blake3-hasher", + "solana-borsh", "solana-clock", "solana-cpi", - "solana-define-syscall 3.0.0", + "solana-decode-error", + "solana-define-syscall", "solana-epoch-rewards", "solana-epoch-schedule", - "solana-epoch-stake", "solana-example-mocks", + "solana-feature-gate-interface", "solana-fee-calculator", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-instruction-error", + "solana-hash", + "solana-instruction", "solana-instructions-sysvar", "solana-keccak-hasher", "solana-last-restart-slot", + "solana-loader-v2-interface", + "solana-loader-v3-interface", + "solana-loader-v4-interface", + "solana-message", "solana-msg", "solana-native-token", + "solana-nonce", "solana-program-entrypoint", "solana-program-error", "solana-program-memory", "solana-program-option", "solana-program-pack", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rent", + "solana-sanitize", "solana-sdk-ids", + "solana-sdk-macro", "solana-secp256k1-recover", "solana-serde-varint", "solana-serialize-utils", - "solana-sha256-hasher 3.0.0", + "solana-sha256-hasher", "solana-short-vec", "solana-slot-hashes", "solana-slot-history", "solana-stable-layout", + "solana-stake-interface", + "solana-system-interface", "solana-sysvar", "solana-sysvar-id", + "solana-vote-interface", + "thiserror 2.0.14", + "wasm-bindgen", ] [[package]] name = "solana-program-entrypoint" -version = "3.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6557cf5b5e91745d1667447438a1baa7823c6086e4ece67f8e6ebfa7a8f72660" +checksum = "32ce041b1a0ed275290a5008ee1a4a6c48f5054c8a3d78d313c08958a06aedbd" dependencies = [ "solana-account-info", - "solana-define-syscall 3.0.0", "solana-msg", "solana-program-error", - "solana-pubkey 3.0.0", + "solana-pubkey", ] [[package]] name = "solana-program-error" -version = "3.0.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1af32c995a7b692a915bb7414d5f8e838450cf7c70414e763d8abcae7b51f28" +checksum = "9ee2e0217d642e2ea4bee237f37bd61bb02aec60da3647c48ff88f6556ade775" dependencies = [ - "borsh", + "borsh 1.5.7", + "num-traits", "serde", "serde_derive", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-pubkey", ] [[package]] name = "solana-program-memory" -version = "3.0.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10e5660c60749c7bfb30b447542529758e4dbcecd31b1e8af1fdc92e2bdde90a" +checksum = "3a5426090c6f3fd6cfdc10685322fede9ca8e5af43cd6a59e98bfe4e91671712" dependencies = [ - "solana-define-syscall 3.0.0", + "solana-define-syscall", ] [[package]] name = "solana-program-option" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e7b4ddb464f274deb4a497712664c3b612e3f5f82471d4e47710fc4ab1c3095" +checksum = "dc677a2e9bc616eda6dbdab834d463372b92848b2bfe4a1ed4e4b4adba3397d0" [[package]] name = "solana-program-pack" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c169359de21f6034a63ebf96d6b380980307df17a8d371344ff04a883ec4e9d0" +checksum = "319f0ef15e6e12dc37c597faccb7d62525a509fec5f6975ecb9419efddeb277b" dependencies = [ "solana-program-error", ] @@ -9699,21 +9638,19 @@ dependencies = [ "solana-epoch-schedule", "solana-fee-structure", "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-instruction-error", - "solana-keypair 3.0.0", + "solana-frozen-abi-macro 3.0.0", + "solana-hash", + "solana-instruction", + "solana-keypair", "solana-last-restart-slot", "solana-program-entrypoint", "solana-program-runtime", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rent", "solana-sbpf", "solana-sdk-ids", - "solana-signer 3.0.0", + "solana-signer", "solana-slot-hashes", - "solana-stake-interface", "solana-svm-callback", "solana-svm-feature-set", "solana-svm-log-collector", @@ -9750,7 +9687,6 @@ dependencies = [ "solana-banks-interface", "solana-banks-server", "solana-clock", - "solana-cluster-type", "solana-commitment-config", "solana-compute-budget", "solana-cpi", @@ -9758,11 +9694,11 @@ dependencies = [ "solana-epoch-schedule", "solana-fee-calculator", "solana-genesis-config", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-instruction", + "solana-keypair", "solana-loader-v3-interface", - "solana-logger", + "solana-logger 3.0.0", "solana-message", "solana-msg", "solana-native-token", @@ -9771,12 +9707,12 @@ dependencies = [ "solana-program-entrypoint", "solana-program-error", "solana-program-runtime", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rent", "solana-runtime", "solana-sbpf", "solana-sdk-ids", - "solana-signer 3.0.0", + "solana-signer", "solana-stable-layout", "solana-stake-interface", "solana-stake-program", @@ -9788,7 +9724,7 @@ dependencies = [ "solana-sysvar-id", "solana-transaction", "solana-transaction-context", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "solana-vote-program", "spl-generic-token", "test-case", @@ -9802,29 +9738,30 @@ version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b62adb9c3261a052ca1f999398c388f1daf558a1b492f60a6d9e64857db4ff1" dependencies = [ + "arbitrary", + "borsh 0.10.3", + "borsh 1.5.7", + "bytemuck", + "bytemuck_derive", + "curve25519-dalek 4.1.3", "five8", "five8_const", "getrandom 0.2.15", "js-sys", "num-traits", - "solana-atomic-u64 2.2.1", + "rand 0.8.5", + "serde", + "serde_derive", + "solana-atomic-u64", "solana-decode-error", - "solana-define-syscall 2.3.0", - "solana-sanitize 2.2.1", - "solana-sha256-hasher 2.3.0", + "solana-define-syscall", + "solana-frozen-abi", + "solana-frozen-abi-macro 2.2.1", + "solana-sanitize", + "solana-sha256-hasher", "wasm-bindgen", ] -[[package]] -name = "solana-pubkey" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8909d399deb0851aa524420beeb5646b115fd253ef446e35fe4504c904da3941" -dependencies = [ - "rand 0.8.5", - "solana-address", -] - [[package]] name = "solana-pubsub-client" version = "3.0.0" @@ -9841,9 +9778,9 @@ dependencies = [ "solana-account-decoder-client-types", "solana-clock", "solana-commitment-config", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rpc-client-types", - "solana-signature 3.1.0", + "solana-signature", "thiserror 2.0.14", "tokio", "tokio-stream", @@ -9866,31 +9803,31 @@ dependencies = [ "quinn-proto", "rustls 0.23.31", "solana-connection-cache", - "solana-keypair 3.0.0", - "solana-logger", + "solana-keypair", + "solana-logger 3.0.0", "solana-measure", "solana-metrics", "solana-net-utils", "solana-packet", "solana-perf", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-quic-definitions", "solana-rpc-client-api", - "solana-signer 3.0.0", + "solana-signer", "solana-streamer", "solana-tls-utils", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "thiserror 2.0.14", "tokio", ] [[package]] name = "solana-quic-definitions" -version = "3.0.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15319accf7d3afd845817aeffa6edd8cc185f135cefbc6b985df29cfd8c09609" +checksum = "7011ee2af2baad991762b6d63ea94b08d06f7928effb76ce273b232c9902c205" dependencies = [ - "solana-keypair 3.0.0", + "solana-keypair", ] [[package]] @@ -9917,23 +9854,23 @@ dependencies = [ "semver 1.0.26", "solana-derivation-path", "solana-offchain-message", - "solana-pubkey 3.0.0", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-pubkey", + "solana-signature", + "solana-signer", "thiserror 2.0.14", "uriparse", ] [[package]] name = "solana-rent" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b702d8c43711e3c8a9284a4f1bbc6a3de2553deb25b0c8142f9a44ef0ce5ddc1" +checksum = "d1aea8fdea9de98ca6e8c2da5827707fb3842833521b528a713810ca685d2480" dependencies = [ "serde", "serde_derive", "solana-frozen-abi", - "solana-frozen-abi-macro", + "solana-frozen-abi-macro 2.2.1", "solana-sdk-ids", "solana-sdk-macro", "solana-sysvar-id", @@ -9941,9 +9878,9 @@ dependencies = [ [[package]] name = "solana-reward-info" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82be7946105c2ee6be9f9ee7bd18a068b558389221d29efa92b906476102bfcc" +checksum = "18205b69139b1ae0ab8f6e11cdcb627328c0814422ad2482000fa2ca54ae4a2f" dependencies = [ "serde", "serde_derive", @@ -9979,10 +9916,8 @@ dependencies = [ "solana-account-decoder", "solana-accounts-db", "solana-address-lookup-table-interface", - "solana-cli-output", "solana-client", "solana-clock", - "solana-cluster-type", "solana-commitment-config", "solana-compute-budget-interface", "solana-entry", @@ -9994,9 +9929,9 @@ dependencies = [ "solana-fee-structure", "solana-genesis-config", "solana-gossip", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-instruction", + "solana-keypair", "solana-ledger", "solana-measure", "solana-message", @@ -10011,7 +9946,7 @@ dependencies = [ "solana-program-option", "solana-program-pack", "solana-program-runtime", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-quic-definitions", "solana-rayon-threadlimit", "solana-rent", @@ -10021,9 +9956,9 @@ dependencies = [ "solana-runtime-transaction", "solana-sdk-ids", "solana-send-transaction-service", - "solana-sha256-hasher 3.0.0", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-sha256-hasher", + "solana-signature", + "solana-signer", "solana-slot-history", "solana-stake-interface", "solana-stake-program", @@ -10038,7 +9973,7 @@ dependencies = [ "solana-tpu-client", "solana-transaction", "solana-transaction-context", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "solana-transaction-status", "solana-validator-exit", "solana-version", @@ -10086,17 +10021,17 @@ dependencies = [ "solana-epoch-info", "solana-epoch-schedule", "solana-feature-gate-interface", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-instruction", + "solana-keypair", "solana-message", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rpc-client-api", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-system-transaction", "solana-transaction", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "solana-transaction-status-client-types", "solana-version", "solana-vote-interface", @@ -10118,8 +10053,8 @@ dependencies = [ "solana-account-decoder-client-types", "solana-clock", "solana-rpc-client-types", - "solana-signer 3.0.0", - "solana-transaction-error 3.0.0", + "solana-signer", + "solana-transaction-error", "solana-transaction-status-client-types", "test-case", "thiserror 2.0.14", @@ -10138,16 +10073,16 @@ dependencies = [ "solana-clap-utils", "solana-commitment-config", "solana-fee-calculator", - "solana-hash 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-keypair", "solana-message", "solana-nonce", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rpc-client", "solana-rpc-client-api", "solana-sdk-ids", - "solana-sha256-hasher 3.0.0", - "solana-signer 3.0.0", + "solana-sha256-hasher", + "solana-signer", "solana-system-interface", "solana-transaction", "thiserror 2.0.14", @@ -10171,8 +10106,8 @@ dependencies = [ "solana-commitment-config", "solana-fee-calculator", "solana-inflation", - "solana-pubkey 3.0.0", - "solana-transaction-error 3.0.0", + "solana-pubkey", + "solana-transaction-error", "solana-transaction-status-client-types", "solana-version", "spl-generic-token", @@ -10196,18 +10131,18 @@ dependencies = [ "solana-clock", "solana-commitment-config", "solana-connection-cache", - "solana-hash 3.0.0", - "solana-keypair 3.0.0", - "solana-logger", + "solana-hash", + "solana-keypair", + "solana-logger 3.0.0", "solana-net-utils", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-pubsub-client", "solana-rent", "solana-rpc", "solana-rpc-client", "solana-rpc-client-api", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-streamer", "solana-system-transaction", "solana-test-validator", @@ -10239,7 +10174,7 @@ dependencies = [ "crossbeam-channel", "dashmap", "dir-diff", - "ed25519-dalek 1.0.1", + "ed25519-dalek", "fnv", "im", "itertools 0.12.1", @@ -10275,7 +10210,6 @@ dependencies = [ "solana-builtins", "solana-client-traits", "solana-clock", - "solana-cluster-type", "solana-commitment-config", "solana-compute-budget", "solana-compute-budget-instruction", @@ -10291,18 +10225,17 @@ dependencies = [ "solana-fee-calculator", "solana-fee-structure", "solana-frozen-abi", - "solana-frozen-abi-macro", + "solana-frozen-abi-macro 3.0.0", "solana-genesis-config", "solana-hard-forks", - "solana-hash 3.0.0", + "solana-hash", "solana-inflation", - "solana-instruction 3.0.0", - "solana-instruction-error", - "solana-keypair 3.0.0", + "solana-instruction", + "solana-keypair", "solana-lattice-hash", "solana-loader-v3-interface", "solana-loader-v4-interface", - "solana-logger", + "solana-logger 3.0.0", "solana-measure", "solana-message", "solana-metrics", @@ -10315,7 +10248,7 @@ dependencies = [ "solana-poh-config", "solana-precompile-error", "solana-program-runtime", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rayon-threadlimit", "solana-rent", "solana-reward-info", @@ -10325,9 +10258,9 @@ dependencies = [ "solana-secp256k1-program", "solana-seed-derivable", "solana-serde", - "solana-sha256-hasher 3.0.0", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-sha256-hasher", + "solana-signature", + "solana-signer", "solana-slot-hashes", "solana-slot-history", "solana-stake-interface", @@ -10344,7 +10277,7 @@ dependencies = [ "solana-time-utils", "solana-transaction", "solana-transaction-context", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "solana-transaction-status-client-types", "solana-unified-scheduler-logic", "solana-version", @@ -10377,19 +10310,19 @@ dependencies = [ "solana-compute-budget", "solana-compute-budget-instruction", "solana-compute-budget-interface", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-instruction", + "solana-keypair", "solana-message", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-sdk-ids", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-svm-transaction", "solana-system-interface", "solana-system-transaction", "solana-transaction", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "solana-vote-interface", "thiserror 2.0.14", ] @@ -10400,12 +10333,6 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61f1bc1357b8188d9c4a3af3fc55276e56987265eb7ad073ae6f8180ee54cecf" -[[package]] -name = "solana-sanitize" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927e833259588ac8f860861db0f6e2668c3cc46d917798ade116858960acfe8a" - [[package]] name = "solana-sbpf" version = "0.12.2" @@ -10427,70 +10354,74 @@ dependencies = [ [[package]] name = "solana-sdk-ids" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1b6d6aaf60669c592838d382266b173881c65fb1cdec83b37cb8ce7cb89f9ad" +checksum = "5c5d8b9cc68d5c88b062a33e23a6466722467dde0035152d8fb1afbcdf350a5f" dependencies = [ - "solana-pubkey 3.0.0", + "solana-pubkey", ] [[package]] name = "solana-sdk-macro" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6430000e97083460b71d9fbadc52a2ab2f88f53b3a4c5e58c5ae3640a0e8c00" +checksum = "86280da8b99d03560f6ab5aca9de2e38805681df34e0bb8f238e69b29433b9df" dependencies = [ "bs58", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] name = "solana-secp256k1-program" -version = "3.0.0" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8efa767b0188f577edae7080e8bf080e5db9458e2b6ee5beaa73e2e6bb54e99d" +checksum = "f19833e4bc21558fe9ec61f239553abe7d05224347b57d65c2218aeeb82d6149" dependencies = [ "bincode", "digest 0.10.7", - "k256", + "libsecp256k1", "serde", "serde_derive", "sha3", - "solana-instruction 3.0.0", + "solana-feature-set", + "solana-instruction", + "solana-precompile-error", "solana-sdk-ids", - "solana-signature 3.1.0", + "solana-signature", ] [[package]] name = "solana-secp256k1-recover" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "394a4470477d66296af5217970a905b1c5569032a7732c367fb69e5666c8607e" +checksum = "baa3120b6cdaa270f39444f5093a90a7b03d296d362878f7a6991d6de3bbe496" dependencies = [ - "k256", - "solana-define-syscall 3.0.0", + "libsecp256k1", + "solana-define-syscall", "thiserror 2.0.14", ] [[package]] name = "solana-secp256r1-program" -version = "3.0.0" +version = "2.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445d8e12592631d76fc4dc57858bae66c9fd7cc838c306c62a472547fc9d0ce6" +checksum = "ce0ae46da3071a900f02d367d99b2f3058fe2e90c5062ac50c4f20cfedad8f0f" dependencies = [ "bytemuck", "openssl", - "solana-instruction 3.0.0", + "solana-feature-set", + "solana-instruction", + "solana-precompile-error", "solana-sdk-ids", ] [[package]] name = "solana-seed-derivable" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff7bdb72758e3bec33ed0e2658a920f1f35dfb9ed576b951d20d63cb61ecd95c" +checksum = "3beb82b5adb266c6ea90e5cf3967235644848eac476c5a1f2f9283a143b7c97f" dependencies = [ "solana-derivation-path", ] @@ -10506,17 +10437,6 @@ dependencies = [ "sha2 0.10.9", ] -[[package]] -name = "solana-seed-phrase" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc905b200a95f2ea9146e43f2a7181e3aeb55de6bc12afb36462d00a3c7310de" -dependencies = [ - "hmac 0.12.1", - "pbkdf2 0.11.0", - "sha2 0.10.9", -] - [[package]] name = "solana-send-transaction-service" version = "3.0.0" @@ -10531,19 +10451,19 @@ dependencies = [ "solana-connection-cache", "solana-fee-calculator", "solana-genesis-config", - "solana-hash 3.0.0", - "solana-keypair 3.0.0", - "solana-logger", + "solana-hash", + "solana-keypair", + "solana-logger 3.0.0", "solana-measure", "solana-metrics", "solana-net-utils", "solana-nonce", "solana-nonce-account", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-quic-definitions", "solana-runtime", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-system-interface", "solana-system-transaction", "solana-time-utils", @@ -10554,31 +10474,31 @@ dependencies = [ [[package]] name = "solana-serde" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "709a93cab694c70f40b279d497639788fc2ccbcf9b4aa32273d4b361322c02dd" +checksum = "1931484a408af466e14171556a47adaa215953c7f48b24e5f6b0282763818b04" dependencies = [ "serde", ] [[package]] name = "solana-serde-varint" -version = "3.0.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e5174c57d5ff3c1995f274d17156964664566e2cde18a07bba1586d35a70d3b" +checksum = "2a7e155eba458ecfb0107b98236088c3764a09ddf0201ec29e52a0be40857113" dependencies = [ "serde", ] [[package]] name = "solana-serialize-utils" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7665da4f6e07b58c93ef6aaf9fb6a923fd11b0922ffc53ba74c3cadfa490f26" +checksum = "817a284b63197d2b27afdba829c5ab34231da4a9b4e763466a003c40ca4f535e" dependencies = [ - "solana-instruction-error", - "solana-pubkey 3.0.0", - "solana-sanitize 3.0.0", + "solana-instruction", + "solana-pubkey", + "solana-sanitize", ] [[package]] @@ -10588,41 +10508,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5aa3feb32c28765f6aa1ce8f3feac30936f16c5c3f7eb73d63a5b8f6f8ecdc44" dependencies = [ "sha2 0.10.9", - "solana-define-syscall 2.3.0", - "solana-hash 2.3.0", -] - -[[package]] -name = "solana-sha256-hasher" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9b912ba6f71cb202c0c3773ec77bf898fa9fe0c78691a2d6859b3b5b8954719" -dependencies = [ - "sha2 0.10.9", - "solana-define-syscall 3.0.0", - "solana-hash 3.0.0", + "solana-define-syscall", + "solana-hash", ] [[package]] name = "solana-short-vec" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b69d029da5428fc1c57f7d49101b2077c61f049d4112cd5fb8456567cc7d2638" +checksum = "5c54c66f19b9766a56fa0057d060de8378676cb64987533fa088861858fc5a69" dependencies = [ "serde", "solana-frozen-abi", - "solana-frozen-abi-macro", + "solana-frozen-abi-macro 2.2.1", ] [[package]] name = "solana-shred-version" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94953e22ca28fe4541a3447d6baeaf519cc4ddc063253bfa673b721f34c136bb" +checksum = "afd3db0461089d1ad1a78d9ba3f15b563899ca2386351d38428faa5350c60a98" dependencies = [ "solana-hard-forks", - "solana-hash 3.0.0", - "solana-sha256-hasher 3.0.0", + "solana-hash", + "solana-sha256-hasher", ] [[package]] @@ -10631,26 +10540,15 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64c8ec8e657aecfc187522fc67495142c12f35e55ddeca8698edbb738b8dbd8c" dependencies = [ - "ed25519-dalek 1.0.1", - "five8", - "solana-sanitize 2.2.1", -] - -[[package]] -name = "solana-signature" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bb8057cc0e9f7b5e89883d49de6f407df655bb6f3a71d0b7baf9986a2218fd9" -dependencies = [ - "ed25519-dalek 2.2.0", + "ed25519-dalek", "five8", "rand 0.8.5", "serde", "serde-big-array", "serde_derive", "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-sanitize 3.0.0", + "solana-frozen-abi-macro 2.2.1", + "solana-sanitize", ] [[package]] @@ -10659,40 +10557,29 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c41991508a4b02f021c1342ba00bcfa098630b213726ceadc7cb032e051975b" dependencies = [ - "solana-pubkey 2.4.0", - "solana-signature 2.3.0", - "solana-transaction-error 2.2.1", -] - -[[package]] -name = "solana-signer" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bfea97951fee8bae0d6038f39a5efcb6230ecdfe33425ac75196d1a1e3e3235" -dependencies = [ - "solana-pubkey 3.0.0", - "solana-signature 3.1.0", - "solana-transaction-error 3.0.0", + "solana-pubkey", + "solana-signature", + "solana-transaction-error", ] [[package]] name = "solana-slot-hashes" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80a293f952293281443c04f4d96afd9d547721923d596e92b4377ed2360f1746" +checksum = "0c8691982114513763e88d04094c9caa0376b867a29577939011331134c301ce" dependencies = [ "serde", "serde_derive", - "solana-hash 3.0.0", + "solana-hash", "solana-sdk-ids", "solana-sysvar-id", ] [[package]] name = "solana-slot-history" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f914f6b108f5bba14a280b458d023e3621c9973f27f015a4d755b50e88d89e97" +checksum = "97ccc1b2067ca22754d5283afb2b0126d61eae734fc616d23871b0943b0d935e" dependencies = [ "bv", "serde", @@ -10703,12 +10590,12 @@ dependencies = [ [[package]] name = "solana-stable-layout" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1da74507795b6e8fb60b7c7306c0c36e2c315805d16eaaf479452661234685ac" +checksum = "9f14f7d02af8f2bc1b5efeeae71bc1c2b7f0f65cd75bcc7d8180f2c762a57f54" dependencies = [ - "solana-instruction 3.0.0", - "solana-pubkey 3.0.0", + "solana-instruction", + "solana-pubkey", ] [[package]] @@ -10719,23 +10606,22 @@ dependencies = [ "solana-account", "solana-clap-utils", "solana-cli-config", - "solana-cli-output", "solana-client-traits", "solana-clock", "solana-commitment-config", "solana-fee-calculator", "solana-genesis-config", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-instruction", + "solana-keypair", "solana-message", "solana-native-token", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-remote-wallet", "solana-rpc-client", "solana-rpc-client-api", "solana-runtime", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-stake-interface", "solana-stake-program", "solana-transaction", @@ -10744,23 +10630,24 @@ dependencies = [ [[package]] name = "solana-stake-interface" -version = "2.0.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fd582fe900e43db96651a5b43956b8ebfab1944d091b391d89140635900ef46" +checksum = "5269e89fde216b4d7e1d1739cf5303f8398a1ff372a81232abbee80e554a838c" dependencies = [ - "borsh", + "borsh 0.10.3", + "borsh 1.5.7", "num-traits", "serde", "serde_derive", "solana-clock", "solana-cpi", + "solana-decode-error", "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-instruction 3.0.0", + "solana-frozen-abi-macro 2.2.1", + "solana-instruction", "solana-program-error", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-system-interface", - "solana-sysvar", "solana-sysvar-id", ] @@ -10778,15 +10665,15 @@ dependencies = [ "solana-bincode", "solana-clock", "solana-compute-budget", - "solana-config-interface", + "solana-config-program-client", "solana-epoch-rewards", "solana-epoch-schedule", "solana-genesis-config", - "solana-instruction 3.0.0", + "solana-instruction", "solana-native-token", "solana-packet", "solana-program-runtime", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rent", "solana-sdk-ids", "solana-stake-interface", @@ -10810,17 +10697,17 @@ dependencies = [ "assert_matches", "bincode", "solana-account", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-instruction", + "solana-keypair", "solana-program-error", "solana-program-test", - "solana-pubkey 3.0.0", - "solana-signer 3.0.0", + "solana-pubkey", + "solana-signer", "solana-stake-interface", "solana-system-interface", "solana-sysvar", "solana-transaction", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "solana-vote-program", "test-case", ] @@ -10849,19 +10736,19 @@ dependencies = [ "serde_derive", "smpl_jwt", "solana-clock", - "solana-hash 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-keypair", "solana-message", "solana-metrics", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-serde", - "solana-signature 3.1.0", + "solana-signature", "solana-storage-proto", "solana-system-transaction", "solana-time-utils", "solana-transaction", "solana-transaction-context", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "solana-transaction-status", "thiserror 2.0.14", "tokio", @@ -10880,15 +10767,15 @@ dependencies = [ "protobuf-src", "serde", "solana-account-decoder", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", + "solana-hash", + "solana-instruction", "solana-message", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-serde", - "solana-signature 3.1.0", + "solana-signature", "solana-transaction", "solana-transaction-context", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "solana-transaction-status", "test-case", "tonic-build", @@ -10922,21 +10809,21 @@ dependencies = [ "rustls 0.23.31", "smallvec", "socket2 0.6.0", - "solana-keypair 3.0.0", - "solana-logger", + "solana-keypair", + "solana-logger 3.0.0", "solana-measure", "solana-metrics", "solana-net-utils", "solana-packet", "solana-perf", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-quic-definitions", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-streamer", "solana-time-utils", "solana-tls-utils", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "solana-transaction-metrics-tracker", "thiserror 2.0.14", "tokio", @@ -10953,7 +10840,7 @@ dependencies = [ "ahash 0.8.11", "assert_matches", "bincode", - "ed25519-dalek 1.0.1", + "ed25519-dalek", "libsecp256k1", "log", "openssl", @@ -10974,15 +10861,15 @@ dependencies = [ "solana-fee-calculator", "solana-fee-structure", "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", + "solana-frozen-abi-macro 3.0.0", + "solana-hash", + "solana-instruction", "solana-instructions-sysvar", - "solana-keypair 3.0.0", + "solana-keypair", "solana-loader-v3-interface", "solana-loader-v4-interface", "solana-loader-v4-program", - "solana-logger", + "solana-logger 3.0.0", "solana-message", "solana-native-token", "solana-nonce", @@ -10991,14 +10878,14 @@ dependencies = [ "solana-program-entrypoint", "solana-program-pack", "solana-program-runtime", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rent", "solana-sbpf", "solana-sdk-ids", "solana-secp256k1-program", "solana-secp256r1-program", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-svm", "solana-svm-callback", "solana-svm-feature-set", @@ -11014,7 +10901,7 @@ dependencies = [ "solana-sysvar-id", "solana-transaction", "solana-transaction-context", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "spl-generic-token", "spl-token-interface", "test-case", @@ -11028,7 +10915,7 @@ dependencies = [ "solana-account", "solana-clock", "solana-precompile-error", - "solana-pubkey 3.0.0", + "solana-pubkey", ] [[package]] @@ -11052,14 +10939,14 @@ version = "3.0.0" dependencies = [ "bencher", "crossbeam-channel", - "env_logger", + "env_logger 0.11.8", "gethostname", "log", "rand 0.8.5", "reqwest 0.12.22", "serial_test", "solana-cluster-type", - "solana-sha256-hasher 3.0.0", + "solana-sha256-hasher", "solana-time-utils", "thiserror 2.0.14", ] @@ -11070,19 +10957,19 @@ version = "3.0.0" dependencies = [ "eager", "enum-iterator", - "solana-pubkey 3.0.0", + "solana-pubkey", ] [[package]] name = "solana-svm-transaction" version = "3.0.0" dependencies = [ - "solana-hash 3.0.0", + "solana-hash", "solana-message", "solana-nonce", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-sdk-ids", - "solana-signature 3.1.0", + "solana-signature", "solana-system-interface", "solana-transaction", "static_assertions", @@ -11100,17 +10987,18 @@ dependencies = [ [[package]] name = "solana-system-interface" -version = "2.0.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e1790547bfc3061f1ee68ea9d8dc6c973c02a163697b24263a8e9f2e6d4afa2" +checksum = "94d7c18cb1a91c6be5f5a8ac9276a1d7c737e39a21beba9ea710ab4b9c63bc90" dependencies = [ + "js-sys", "num-traits", "serde", "serde_derive", - "solana-instruction 3.0.0", - "solana-msg", - "solana-program-error", - "solana-pubkey 3.0.0", + "solana-decode-error", + "solana-instruction", + "solana-pubkey", + "wasm-bindgen", ] [[package]] @@ -11128,16 +11016,16 @@ dependencies = [ "solana-bincode", "solana-compute-budget", "solana-fee-calculator", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", + "solana-hash", + "solana-instruction", "solana-nonce", "solana-nonce-account", "solana-packet", "solana-program-runtime", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rent", "solana-sdk-ids", - "solana-sha256-hasher 3.0.0", + "solana-sha256-hasher", "solana-svm-callback", "solana-svm-feature-set", "solana-svm-log-collector", @@ -11149,24 +11037,24 @@ dependencies = [ [[package]] name = "solana-system-transaction" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31b5699ec533621515e714f1533ee6b3b0e71c463301d919eb59b8c1e249d30" +checksum = "5bd98a25e5bcba8b6be8bcbb7b84b24c2a6a8178d7fb0e3077a916855ceba91a" dependencies = [ - "solana-hash 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-keypair", "solana-message", - "solana-pubkey 3.0.0", - "solana-signer 3.0.0", + "solana-pubkey", + "solana-signer", "solana-system-interface", "solana-transaction", ] [[package]] name = "solana-sysvar" -version = "3.0.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63205e68d680bcc315337dec311b616ab32fea0a612db3b883ce4de02e0953f9" +checksum = "d50c92bc019c590f5e42c61939676e18d14809ed00b2a59695dd5c67ae72c097" dependencies = [ "base64 0.22.1", "bincode", @@ -11177,34 +11065,35 @@ dependencies = [ "serde_derive", "solana-account-info", "solana-clock", - "solana-define-syscall 3.0.0", + "solana-define-syscall", "solana-epoch-rewards", "solana-epoch-schedule", "solana-fee-calculator", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", + "solana-hash", + "solana-instruction", + "solana-instructions-sysvar", "solana-last-restart-slot", "solana-program-entrypoint", "solana-program-error", "solana-program-memory", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rent", + "solana-sanitize", "solana-sdk-ids", "solana-sdk-macro", "solana-slot-hashes", "solana-slot-history", + "solana-stake-interface", "solana-sysvar-id", ] [[package]] name = "solana-sysvar-id" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5051bc1a16d5d96a96bc33b5b2ec707495c48fe978097bdaba68d3c47987eb32" +checksum = "5762b273d3325b047cfda250787f8d796d781746860d5d0a746ee29f3e8812c1" dependencies = [ - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-sdk-ids", ] @@ -11233,23 +11122,23 @@ dependencies = [ "solana-geyser-plugin-manager", "solana-gossip", "solana-inflation", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-instruction", + "solana-keypair", "solana-ledger", "solana-loader-v3-interface", - "solana-logger", + "solana-logger 3.0.0", "solana-message", "solana-native-token", "solana-net-utils", "solana-program-test", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rent", "solana-rpc", "solana-rpc-client", "solana-rpc-client-api", "solana-runtime", "solana-sdk-ids", - "solana-signer 3.0.0", + "solana-signer", "solana-streamer", "solana-tpu-client", "solana-transaction", @@ -11259,18 +11148,18 @@ dependencies = [ [[package]] name = "solana-time-utils" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ced92c60aa76ec4780a9d93f3bd64dfa916e1b998eacc6f1c110f3f444f02c9" +checksum = "6af261afb0e8c39252a04d026e3ea9c405342b08c871a2ad8aa5448e068c784c" [[package]] name = "solana-tls-utils" version = "3.0.0" dependencies = [ "rustls 0.23.31", - "solana-keypair 3.0.0", - "solana-pubkey 3.0.0", - "solana-signer 3.0.0", + "solana-keypair", + "solana-pubkey", + "solana-signer", "x509-parser", ] @@ -11293,29 +11182,28 @@ dependencies = [ "solana-account-decoder", "solana-clap-utils", "solana-cli-config", - "solana-cli-output", "solana-clock", "solana-commitment-config", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", - "solana-logger", + "solana-hash", + "solana-instruction", + "solana-keypair", + "solana-logger 3.0.0", "solana-message", "solana-native-token", "solana-program-error", "solana-program-pack", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-remote-wallet", "solana-rpc-client", "solana-rpc-client-api", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-stake-interface", "solana-streamer", "solana-system-interface", "solana-test-validator", "solana-transaction", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "solana-transaction-status", "solana-version", "spl-associated-token-account-interface", @@ -11336,20 +11224,20 @@ dependencies = [ "solana-commitment-config", "solana-connection-cache", "solana-epoch-info", - "solana-hash 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-keypair", "solana-message", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-quic-client", "solana-rpc-client", "solana-rpc-client-api", "solana-runtime", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-streamer", "solana-tpu-client", "solana-transaction", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "solana-transaction-status", "tempfile", "thiserror 2.0.14", @@ -11374,15 +11262,15 @@ dependencies = [ "solana-measure", "solana-message", "solana-net-utils", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-pubsub-client", "solana-quic-definitions", "solana-rpc-client", "solana-rpc-client-api", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-transaction", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "thiserror 2.0.14", "tokio", ] @@ -11402,14 +11290,14 @@ dependencies = [ "solana-clock", "solana-commitment-config", "solana-connection-cache", - "solana-keypair 3.0.0", + "solana-keypair", "solana-measure", "solana-metrics", "solana-net-utils", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-quic-definitions", "solana-rpc-client", - "solana-signer 3.0.0", + "solana-signer", "solana-streamer", "solana-time-utils", "solana-tls-utils", @@ -11422,23 +11310,29 @@ dependencies = [ [[package]] name = "solana-transaction" -version = "3.0.0" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2db6ac3984042d9248fd9b06761ece438ed9ba412c001240052ce6216fee3141" +checksum = "80657d6088f721148f5d889c828ca60c7daeedac9a8679f9ec215e0c42bcbf41" dependencies = [ "bincode", "serde", "serde_derive", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", + "solana-bincode", + "solana-feature-set", + "solana-hash", + "solana-instruction", + "solana-keypair", "solana-message", - "solana-pubkey 3.0.0", - "solana-sanitize 3.0.0", + "solana-precompiles", + "solana-pubkey", + "solana-sanitize", "solana-sdk-ids", "solana-short-vec", - "solana-signature 3.1.0", - "solana-signer 3.0.0", - "solana-transaction-error 3.0.0", + "solana-signature", + "solana-signer", + "solana-system-interface", + "solana-transaction-error", + "wasm-bindgen", ] [[package]] @@ -11450,13 +11344,13 @@ dependencies = [ "serde_derive", "solana-account", "solana-account-info", - "solana-instruction 3.0.0", + "solana-instruction", "solana-instructions-sysvar", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rent", "solana-sbpf", "solana-sdk-ids", - "solana-signature 3.1.0", + "solana-signature", "solana-system-interface", "solana-transaction-context", "static_assertions", @@ -11478,20 +11372,20 @@ dependencies = [ "solana-core", "solana-faucet", "solana-gossip", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-instruction", + "solana-keypair", "solana-local-cluster", - "solana-logger", + "solana-logger 3.0.0", "solana-measure", "solana-message", "solana-net-utils", "solana-packet", "solana-poh-config", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rpc-client", "solana-runtime", - "solana-signer 3.0.0", + "solana-signer", "solana-streamer", "solana-system-interface", "solana-transaction", @@ -11504,23 +11398,13 @@ name = "solana-transaction-error" version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "222a9dc8fdb61c6088baab34fc3a8b8473a03a7a5fd404ed8dd502fa79b67cb1" -dependencies = [ - "solana-instruction 2.3.0", - "solana-sanitize 2.2.1", -] - -[[package]] -name = "solana-transaction-error" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4222065402340d7e6aec9dc3e54d22992ddcf923d91edcd815443c2bfca3144a" dependencies = [ "serde", "serde_derive", "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-instruction-error", - "solana-sanitize 3.0.0", + "solana-frozen-abi-macro 2.2.1", + "solana-instruction", + "solana-sanitize", ] [[package]] @@ -11531,13 +11415,13 @@ dependencies = [ "bincode", "log", "rand 0.8.5", - "solana-hash 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-keypair", "solana-packet", "solana-perf", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-short-vec", - "solana-signature 3.1.0", + "solana-signature", "solana-system-transaction", ] @@ -11550,7 +11434,7 @@ dependencies = [ "base64 0.22.1", "bencher", "bincode", - "borsh", + "borsh 1.5.7", "bs58", "bytemuck", "log", @@ -11560,20 +11444,20 @@ dependencies = [ "solana-account-decoder", "solana-address-lookup-table-interface", "solana-clock", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", + "solana-hash", + "solana-instruction", "solana-loader-v2-interface", "solana-loader-v3-interface", "solana-message", "solana-program-option", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-reward-info", "solana-sdk-ids", - "solana-signature 3.1.0", + "solana-signature", "solana-stake-interface", "solana-system-interface", "solana-transaction", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "solana-transaction-status-client-types", "solana-vote-interface", "spl-associated-token-account-interface", @@ -11598,14 +11482,14 @@ dependencies = [ "serde_json", "solana-account-decoder-client-types", "solana-commitment-config", - "solana-instruction 3.0.0", + "solana-instruction", "solana-message", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-reward-info", - "solana-signature 3.1.0", + "solana-signature", "solana-transaction", "solana-transaction-context", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "test-case", "thiserror 2.0.14", ] @@ -11639,30 +11523,30 @@ dependencies = [ "solana-entry", "solana-genesis-config", "solana-gossip", - "solana-hash 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-keypair", "solana-ledger", - "solana-logger", + "solana-logger 3.0.0", "solana-measure", "solana-metrics", "solana-native-token", "solana-net-utils", "solana-perf", "solana-poh", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-quic-client", "solana-rayon-threadlimit", "solana-rpc", "solana-rpc-client-api", "solana-runtime", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-signature", + "solana-signer", "solana-streamer", "solana-system-transaction", "solana-time-utils", "solana-tls-utils", "solana-transaction", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "solana-turbine", "static_assertions", "test-case", @@ -11676,11 +11560,11 @@ version = "3.0.0" dependencies = [ "async-trait", "solana-connection-cache", - "solana-keypair 3.0.0", + "solana-keypair", "solana-net-utils", "solana-packet", "solana-streamer", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "thiserror 2.0.14", "tokio", ] @@ -11690,9 +11574,9 @@ name = "solana-unified-scheduler-logic" version = "3.0.0" dependencies = [ "assert_matches", - "solana-instruction 3.0.0", + "solana-instruction", "solana-message", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-runtime-transaction", "solana-transaction", "static_assertions", @@ -11717,20 +11601,20 @@ dependencies = [ "solana-clock", "solana-cost-model", "solana-entry", - "solana-hash 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-keypair", "solana-ledger", - "solana-logger", + "solana-logger 3.0.0", "solana-metrics", "solana-poh", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-runtime", "solana-runtime-transaction", "solana-svm", "solana-svm-timings", "solana-system-transaction", "solana-transaction", - "solana-transaction-error 3.0.0", + "solana-transaction-error", "solana-unified-scheduler-logic", "static_assertions", "test-case", @@ -11749,9 +11633,9 @@ dependencies = [ [[package]] name = "solana-validator-exit" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5d2face763df5afeaa9509b9019968860e69cc1531ec8b4a2e6c7b702204d5a" +checksum = "7bbf6d7a3c0b28dd5335c52c0e9eae49d0ae489a8f324917faf0ded65a812c1d" [[package]] name = "solana-version" @@ -11763,8 +11647,8 @@ dependencies = [ "serde", "serde_derive", "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-sanitize 3.0.0", + "solana-frozen-abi-macro 3.0.0", + "solana-sanitize", "solana-serde-varint", ] @@ -11802,17 +11686,17 @@ dependencies = [ "solana-clock", "solana-commitment-config", "solana-core", - "solana-keypair 3.0.0", + "solana-keypair", "solana-local-cluster", - "solana-logger", + "solana-logger 3.0.0", "solana-measure", "solana-metrics", "solana-native-token", "solana-net-utils", "solana-perf", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-quic-definitions", - "solana-signer 3.0.0", + "solana-signer", "solana-streamer", "solana-transaction-metrics-tracker", "solana-version", @@ -11838,18 +11722,18 @@ dependencies = [ "solana-bincode", "solana-clock", "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", - "solana-logger", + "solana-frozen-abi-macro 3.0.0", + "solana-hash", + "solana-instruction", + "solana-keypair", + "solana-logger 3.0.0", "solana-packet", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-sdk-ids", "solana-serialize-utils", - "solana-sha256-hasher 3.0.0", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-sha256-hasher", + "solana-signature", + "solana-signer", "solana-svm-transaction", "solana-transaction", "solana-vote-interface", @@ -11859,25 +11743,23 @@ dependencies = [ [[package]] name = "solana-vote-interface" -version = "3.0.0" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66631ddbe889dab5ec663294648cd1df395ec9df7a4476e7b3e095604cfdb539" +checksum = "b80d57478d6599d30acc31cc5ae7f93ec2361a06aefe8ea79bc81739a08af4c3" dependencies = [ "arbitrary", "bincode", - "cfg_eval", "num-derive", "num-traits", "serde", "serde_derive", - "serde_with", "solana-clock", + "solana-decode-error", "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-instruction-error", - "solana-pubkey 3.0.0", + "solana-frozen-abi-macro 2.2.1", + "solana-hash", + "solana-instruction", + "solana-pubkey", "solana-rent", "solana-sdk-ids", "solana-serde-varint", @@ -11905,19 +11787,19 @@ dependencies = [ "solana-epoch-schedule", "solana-fee-calculator", "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-hash 3.0.0", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", - "solana-logger", + "solana-frozen-abi-macro 3.0.0", + "solana-hash", + "solana-instruction", + "solana-keypair", + "solana-logger 3.0.0", "solana-metrics", "solana-packet", "solana-program-runtime", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-rent", "solana-sdk-ids", - "solana-sha256-hasher 3.0.0", - "solana-signer 3.0.0", + "solana-sha256-hasher", + "solana-signer", "solana-slot-hashes", "solana-transaction", "solana-transaction-context", @@ -11945,14 +11827,14 @@ dependencies = [ "solana-clock", "solana-entry", "solana-gossip", - "solana-hash 3.0.0", - "solana-keypair 3.0.0", + "solana-hash", + "solana-keypair", "solana-ledger", - "solana-logger", - "solana-pubkey 3.0.0", + "solana-logger 3.0.0", + "solana-pubkey", "solana-runtime", "solana-shred-version", - "solana-signer 3.0.0", + "solana-signer", "solana-streamer", "solana-svm-timings", "solana-time-utils", @@ -11972,11 +11854,11 @@ dependencies = [ "curve25519-dalek 4.1.3", "num-derive", "num-traits", - "solana-instruction 3.0.0", + "solana-instruction", "solana-program-runtime", "solana-sdk-ids", "solana-svm-log-collector", - "solana-zk-sdk", + "solana-zk-sdk 3.0.0", ] [[package]] @@ -11987,15 +11869,15 @@ dependencies = [ "solana-account", "solana-compute-budget", "solana-compute-budget-interface", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", + "solana-instruction", + "solana-keypair", "solana-program-test", - "solana-pubkey 3.0.0", - "solana-signer 3.0.0", + "solana-pubkey", + "solana-signer", "solana-system-interface", "solana-transaction", - "solana-transaction-error 3.0.0", - "solana-zk-sdk", + "solana-transaction-error", + "solana-zk-sdk 3.0.0", ] [[package]] @@ -12006,12 +11888,12 @@ dependencies = [ "clap 3.2.23", "dirs-next", "solana-clap-v3-utils", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-remote-wallet", "solana-seed-derivable", - "solana-signer 3.0.0", + "solana-signer", "solana-version", - "solana-zk-sdk", + "solana-zk-token-sdk", "tempfile", "thiserror 2.0.14", "tiny-bip39", @@ -12019,9 +11901,45 @@ dependencies = [ [[package]] name = "solana-zk-sdk" -version = "4.0.0" +version = "2.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9602bcb1f7af15caef92b91132ec2347e1c51a72ecdbefdaefa3eac4b8711475" +checksum = "05857892ac50fe03c125d8445fd790c6768015b76f4ad1e4b4b1499938b357f0" +dependencies = [ + "aes-gcm-siv", + "base64 0.22.1", + "bincode", + "bytemuck", + "bytemuck_derive", + "curve25519-dalek 4.1.3", + "itertools 0.12.1", + "js-sys", + "merlin", + "num-derive", + "num-traits", + "rand 0.8.5", + "serde", + "serde_derive", + "serde_json", + "sha3", + "solana-derivation-path", + "solana-instruction", + "solana-pubkey", + "solana-sdk-ids", + "solana-seed-derivable", + "solana-seed-phrase", + "solana-signature", + "solana-signer", + "subtle", + "thiserror 2.0.14", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "solana-zk-sdk" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dffbd0b7537f4249d69b74c632f8eac1d2726572022791f9ead65a67d3f6905" dependencies = [ "aes-gcm-siv", "base64 0.22.1", @@ -12029,7 +11947,6 @@ dependencies = [ "bytemuck", "bytemuck_derive", "curve25519-dalek 4.1.3", - "getrandom 0.2.15", "itertools 0.12.1", "js-sys", "merlin", @@ -12041,13 +11958,13 @@ dependencies = [ "serde_json", "sha3", "solana-derivation-path", - "solana-instruction 3.0.0", - "solana-pubkey 3.0.0", + "solana-instruction", + "solana-pubkey", "solana-sdk-ids", "solana-seed-derivable", - "solana-seed-phrase 3.0.0", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-seed-phrase", + "solana-signature", + "solana-signer", "subtle", "thiserror 2.0.14", "wasm-bindgen", @@ -12064,7 +11981,7 @@ dependencies = [ "curve25519-dalek 4.1.3", "num-derive", "num-traits", - "solana-instruction 3.0.0", + "solana-instruction", "solana-program-runtime", "solana-sdk-ids", "solana-svm-log-collector", @@ -12092,14 +12009,14 @@ dependencies = [ "sha3", "solana-curve25519 3.0.0", "solana-derivation-path", - "solana-instruction 3.0.0", - "solana-keypair 3.0.0", - "solana-pubkey 3.0.0", + "solana-instruction", + "solana-keypair", + "solana-pubkey", "solana-sdk-ids", "solana-seed-derivable", - "solana-seed-phrase 3.0.0", - "solana-signature 3.1.0", - "solana-signer 3.0.0", + "solana-seed-phrase", + "solana-signature", + "solana-signer", "subtle", "thiserror 2.0.14", "tiny-bip39", @@ -12121,36 +12038,26 @@ dependencies = [ "lock_api", ] -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - [[package]] name = "spl-associated-token-account-interface" -version = "2.0.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6433917b60441d68d99a17e121d9db0ea15a9a69c0e5afa34649cf5ba12612f" +checksum = "5e6bbe0794e532ac08428d3abf5bf8ae75bd81dfddd785c388e326c00c92c6f5" dependencies = [ - "borsh", - "solana-instruction 3.0.0", - "solana-pubkey 3.0.0", + "borsh 1.5.7", + "solana-instruction", + "solana-pubkey", ] [[package]] name = "spl-discriminator" -version = "0.5.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48cc11459e265d5b501534144266620289720b4c44522a47bc6b63cd295d2f3" +checksum = "0a20542d4c8264856d205c0090512f374dbf7b3124479a3d93ab6184ae3631aa" dependencies = [ "bytemuck", "solana-program-error", - "solana-sha256-hasher 3.0.0", + "solana-sha256-hasher", "spl-discriminator-derive", ] @@ -12162,7 +12069,7 @@ checksum = "d9e8418ea6269dcfb01c712f0444d2c75542c04448b480e87de59d2865edc750" dependencies = [ "quote", "spl-discriminator-syn", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -12174,66 +12081,67 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.9", - "syn 2.0.105", + "syn 2.0.104", "thiserror 1.0.69", ] [[package]] name = "spl-generic-token" -version = "2.0.1" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233df81b75ab99b42f002b5cdd6e65a7505ffa930624f7096a7580a56765e9cf" +checksum = "741a62a566d97c58d33f9ed32337ceedd4e35109a686e31b1866c5dfa56abddc" dependencies = [ "bytemuck", - "solana-pubkey 3.0.0", + "solana-pubkey", ] [[package]] name = "spl-instruction-padding-interface" -version = "1.0.0" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3a77c0c9b83b111ee29bc6aa6eaab54b82e1ed5db40ba9786527b80283c3ef" +checksum = "0f738b75144edbb32c01de832632eecad71113b62a48ef8e55e60c5a692bae4e" dependencies = [ "num_enum", - "solana-instruction 3.0.0", + "solana-instruction", "solana-program-error", - "solana-pubkey 3.0.0", + "solana-pubkey", ] [[package]] name = "spl-memo-interface" -version = "2.0.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d4e2aedd58f858337fa609af5ad7100d4a243fdaf6a40d6eb4c28c5f19505d3" +checksum = "24af0730130fea732616be9425fe8eb77782e2aab2f0e76837b6a66aaba96c6b" dependencies = [ - "solana-instruction 3.0.0", - "solana-pubkey 3.0.0", + "solana-instruction", + "solana-pubkey", ] [[package]] name = "spl-pod" -version = "0.7.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1233fdecd7461611d69bb87bc2e95af742df47291975d21232a0be8217da9de" +checksum = "d994afaf86b779104b4a95ba9ca75b8ced3fdb17ee934e38cb69e72afbe17799" dependencies = [ - "borsh", + "borsh 1.5.7", "bytemuck", "bytemuck_derive", "num-derive", "num-traits", - "num_enum", + "solana-decode-error", + "solana-msg", "solana-program-error", "solana-program-option", - "solana-pubkey 3.0.0", - "solana-zk-sdk", + "solana-pubkey", + "solana-zk-sdk 2.3.6", "thiserror 2.0.14", ] [[package]] name = "spl-token-2022-interface" -version = "2.0.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0888304af6b3d839e435712e6c84025e09513017425ff62045b6b8c41feb77d9" +checksum = "62d7ae2ee6b856f8ddcbdc3b3a9f4d2141582bbe150f93e5298ee97e0251fa04" dependencies = [ "arrayref", "bytemuck", @@ -12241,13 +12149,15 @@ dependencies = [ "num-traits", "num_enum", "solana-account-info", - "solana-instruction 3.0.0", + "solana-decode-error", + "solana-instruction", + "solana-msg", "solana-program-error", "solana-program-option", "solana-program-pack", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-sdk-ids", - "solana-zk-sdk", + "solana-zk-sdk 2.3.6", "spl-pod", "spl-token-confidential-transfer-proof-extraction", "spl-token-confidential-transfer-proof-generation", @@ -12259,48 +12169,49 @@ dependencies = [ [[package]] name = "spl-token-confidential-transfer-proof-extraction" -version = "0.5.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a22217af69b7a61ca813f47c018afb0b00b02a74a4c70ff099cd4287740bc3d" +checksum = "bedc4675c80409a004da46978674e4073c65c4b1c611bf33d120381edeffe036" dependencies = [ "bytemuck", "solana-account-info", - "solana-curve25519 2.3.7", - "solana-instruction 3.0.0", + "solana-curve25519 2.2.15", + "solana-instruction", "solana-instructions-sysvar", "solana-msg", "solana-program-error", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-sdk-ids", - "solana-zk-sdk", + "solana-zk-sdk 2.3.6", "spl-pod", "thiserror 2.0.14", ] [[package]] name = "spl-token-confidential-transfer-proof-generation" -version = "0.5.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63a2b41095945dc15274b924b21ccae9b3ec9dc2fdd43dbc08de8c33bbcd915" +checksum = "ae5b124840d4aed474cef101d946a798b806b46a509ee4df91021e1ab1cef3ef" dependencies = [ "curve25519-dalek 4.1.3", - "solana-zk-sdk", + "solana-zk-sdk 2.3.6", "thiserror 2.0.14", ] [[package]] name = "spl-token-group-interface" -version = "0.7.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "452d0f758af20caaa10d9a6f7608232e000d4c74462f248540b3d2ddfa419776" +checksum = "5597b4cd76f85ce7cd206045b7dc22da8c25516573d42d267c8d1fd128db5129" dependencies = [ "bytemuck", "num-derive", "num-traits", - "num_enum", - "solana-instruction 3.0.0", + "solana-decode-error", + "solana-instruction", + "solana-msg", "solana-program-error", - "solana-pubkey 3.0.0", + "solana-pubkey", "spl-discriminator", "spl-pod", "thiserror 2.0.14", @@ -12308,37 +12219,39 @@ dependencies = [ [[package]] name = "spl-token-interface" -version = "2.0.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c564ac05a7c8d8b12e988a37d82695b5ba4db376d07ea98bc4882c81f96c7f3" +checksum = "06e0c2d4e38ef5834cf7fb1b592b8a8c6eab8485f5ac7a04a151b502c63a0aaa" dependencies = [ "arrayref", "bytemuck", "num-derive", "num-traits", "num_enum", - "solana-instruction 3.0.0", + "solana-instruction", "solana-program-error", "solana-program-option", "solana-program-pack", - "solana-pubkey 3.0.0", + "solana-pubkey", "solana-sdk-ids", "thiserror 2.0.14", ] [[package]] name = "spl-token-metadata-interface" -version = "0.8.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c467c7c3bd056f8fe60119e7ec34ddd6f23052c2fa8f1f51999098063b72676" +checksum = "304d6e06f0de0c13a621464b1fd5d4b1bebf60d15ca71a44d3839958e0da16ee" dependencies = [ - "borsh", + "borsh 1.5.7", "num-derive", "num-traits", "solana-borsh", - "solana-instruction 3.0.0", + "solana-decode-error", + "solana-instruction", + "solana-msg", "solana-program-error", - "solana-pubkey 3.0.0", + "solana-pubkey", "spl-discriminator", "spl-pod", "spl-type-length-value", @@ -12347,15 +12260,15 @@ dependencies = [ [[package]] name = "spl-type-length-value" -version = "0.9.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca20a1a19f4507a98ca4b28ff5ed54cac9b9d34ed27863e2bde50a3238f9a6ac" +checksum = "d417eb548214fa822d93f84444024b4e57c13ed6719d4dcc68eec24fb481e9f5" dependencies = [ "bytemuck", "num-derive", "num-traits", - "num_enum", "solana-account-info", + "solana-decode-error", "solana-msg", "solana-program-error", "spl-discriminator", @@ -12451,9 +12364,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.105" +version = "2.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bc3fcb250e53458e712715cf74285c1f889686520d79294a9ef3bd7aa1fc619" +checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" dependencies = [ "proc-macro2", "quote", @@ -12495,7 +12408,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -12655,7 +12568,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -12667,7 +12580,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", "test-case-core", ] @@ -12712,7 +12625,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -12723,7 +12636,7 @@ checksum = "cc5b44b4ab9c2fdd0e0512e6bece8388e214c0749f5862b114cc5b7a25daf227" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -12885,7 +12798,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -13173,7 +13086,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -13533,7 +13446,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", "wasm-bindgen-shared", ] @@ -13567,7 +13480,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -14151,7 +14064,7 @@ checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", "synstructure 0.13.1", ] @@ -14181,7 +14094,7 @@ checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -14192,7 +14105,7 @@ checksum = "6352c01d0edd5db859a63e2605f4ea3183ddbd15e2c4a9e7d32184df75e4f154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -14212,7 +14125,7 @@ checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", "synstructure 0.13.1", ] @@ -14233,7 +14146,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] @@ -14255,7 +14168,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.104", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index f4d61d3a3a7203..6389d2018237d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -213,6 +213,7 @@ bincode = "1.3.3" bitflags = { version = "2.9.1" } blake3 = "1.8.2" borsh = { version = "1.5.7", features = ["derive", "unstable__schema"] } +borsh0-10 = { package = "borsh", version = "0.10.3" } bs58 = { version = "0.5.1", default-features = false } bv = "0.11.1" byte-unit = "4.0.19" @@ -370,23 +371,23 @@ smallvec = "1.15.1" smpl_jwt = "0.7.1" socket2 = "0.6.0" soketto = "0.7" -solana-account = "3.0.0" +solana-account = "2.2.1" solana-account-decoder = { path = "account-decoder", version = "=3.0.0" } solana-account-decoder-client-types = { path = "account-decoder-client-types", version = "=3.0.0" } -solana-account-info = "3.0.0" +solana-account-info = "2.3.0" solana-accounts-db = { path = "accounts-db", version = "=3.0.0" } -solana-address-lookup-table-interface = "3.0.0" -solana-atomic-u64 = "3.0.0" +solana-address-lookup-table-interface = "2.2.2" +solana-atomic-u64 = "2.2.1" solana-banks-client = { path = "banks-client", version = "=3.0.0" } solana-banks-interface = { path = "banks-interface", version = "=3.0.0" } solana-banks-server = { path = "banks-server", version = "=3.0.0" } solana-bench-tps = { path = "bench-tps", version = "=3.0.0" } -solana-big-mod-exp = "3.0.0" -solana-bincode = "3.0.0" -solana-blake3-hasher = "3.0.0" +solana-big-mod-exp = "2.2.1" +solana-bincode = "2.2.1" +solana-blake3-hasher = "2.2.1" solana-bloom = { path = "bloom", version = "=3.0.0" } -solana-bn254 = "3.0.0" -solana-borsh = "3.0.0" +solana-bn254 = "2.2.2" +solana-borsh = "2.2.1" solana-bpf-loader-program = { path = "programs/bpf_loader", version = "=3.0.0" } solana-bucket-map = { path = "bucket_map", version = "=3.0.0" } solana-builtins = { path = "builtins", version = "=3.0.0" } @@ -397,96 +398,97 @@ solana-cli = { path = "cli", version = "=3.0.0" } solana-cli-config = { path = "cli-config", version = "=3.0.0" } solana-cli-output = { path = "cli-output", version = "=3.0.0" } solana-client = { path = "client", version = "=3.0.0" } -solana-client-traits = "3.0.0" -solana-clock = "3.0.0" -solana-cluster-type = "3.0.0" -solana-commitment-config = "3.0.0" +solana-client-traits = "2.2.1" +solana-clock = "2.2.2" +solana-cluster-type = "2.2.1" +solana-commitment-config = "2.2.1" solana-compute-budget = { path = "compute-budget", version = "=3.0.0" } solana-compute-budget-instruction = { path = "compute-budget-instruction", version = "=3.0.0" } -solana-compute-budget-interface = "3.0.0" +solana-compute-budget-interface = "2.2.2" solana-compute-budget-program = { path = "programs/compute-budget", version = "=3.0.0" } -solana-config-interface = "2.0.0" +solana-config-interface = "1.0.0" +solana-config-program-client = "1.1.0" solana-connection-cache = { path = "connection-cache", version = "=3.0.0", default-features = false } solana-core = { path = "core", version = "=3.0.0" } solana-cost-model = { path = "cost-model", version = "=3.0.0" } -solana-cpi = "3.0.0" +solana-cpi = "2.2.1" solana-curve25519 = { path = "curves/curve25519", version = "=3.0.0" } -solana-define-syscall = "3.0.0" -solana-derivation-path = "3.0.0" +solana-define-syscall = "2.3.0" +solana-derivation-path = "2.2.1" solana-download-utils = { path = "download-utils", version = "=3.0.0" } -solana-ed25519-program = "3.0.0" +solana-ed25519-program = "2.2.3" solana-entry = { path = "entry", version = "=3.0.0" } -solana-epoch-info = "3.0.0" -solana-epoch-rewards = "3.0.0" -solana-epoch-rewards-hasher = "3.0.0" -solana-epoch-schedule = "3.0.0" -solana-example-mocks = "3.0.0" +solana-epoch-info = "2.2.1" +solana-epoch-rewards = "2.2.1" +solana-epoch-rewards-hasher = "2.2.1" +solana-epoch-schedule = "2.2.1" +solana-example-mocks = "2.2.1" solana-faucet = { path = "faucet", version = "=3.0.0" } -solana-feature-gate-interface = "3.0.0" +solana-feature-gate-client = "0.0.2" +solana-feature-gate-interface = "2.2.2" solana-fee = { path = "fee", version = "=3.0.0" } -solana-fee-calculator = "3.0.0" -solana-fee-structure = "3.0.0" +solana-fee-calculator = "2.2.1" +solana-fee-structure = "2.3.0" solana-file-download = "3.0.0" -solana-frozen-abi = "3.0.0" +solana-frozen-abi = "2.3.0" solana-frozen-abi-macro = "3.0.0" solana-genesis = { path = "genesis", version = "=3.0.0" } -solana-genesis-config = "3.0.0" +solana-genesis-config = "2.3.0" solana-genesis-utils = { path = "genesis-utils", version = "=3.0.0" } solana-geyser-plugin-manager = { path = "geyser-plugin-manager", version = "=3.0.0" } solana-gossip = { path = "gossip", version = "=3.0.0" } -solana-hard-forks = "3.0.0" -solana-hash = "3.0.0" -solana-inflation = "3.0.0" -solana-instruction = "3.0.0" -solana-instruction-error = "2.0.0" -solana-instructions-sysvar = "3.0.0" -solana-keccak-hasher = "3.0.0" -solana-keypair = "3.0.0" -solana-last-restart-slot = "3.0.0" +solana-hard-forks = "2.2.1" +solana-hash = "2.3.0" +solana-inflation = "2.2.1" +solana-instruction = "2.3.0" +solana-instructions-sysvar = "2.2.2" +solana-keccak-hasher = "2.2.1" +solana-keypair = "2.2.1" +solana-last-restart-slot = "2.2.1" solana-lattice-hash = { path = "lattice-hash", version = "=3.0.0" } solana-ledger = { path = "ledger", version = "=3.0.0" } -solana-loader-v2-interface = "3.0.0" -solana-loader-v3-interface = "6.1.0" -solana-loader-v4-interface = "3.1.0" +solana-loader-v2-interface = "2.2.1" +solana-loader-v3-interface = "5.0.0" +solana-loader-v4-interface = "2.2.1" solana-loader-v4-program = { path = "programs/loader-v4", version = "=3.0.0" } solana-local-cluster = { path = "local-cluster", version = "=3.0.0" } solana-logger = "3.0.0" solana-low-pass-filter = { path = "low-pass-filter", version = "=3.0.0" } solana-measure = { path = "measure", version = "=3.0.0" } solana-merkle-tree = { path = "merkle-tree", version = "=3.0.0" } -solana-message = "3.0.0" +solana-message = "2.4.0" solana-metrics = { path = "metrics", version = "=3.0.0" } -solana-msg = "3.0.0" -solana-native-token = "3.0.0" +solana-msg = "2.2.1" +solana-native-token = "2.2.2" solana-net-utils = { path = "net-utils", version = "=3.0.0" } solana-nohash-hasher = "0.2.1" -solana-nonce = "3.0.0" -solana-nonce-account = "3.0.0" +solana-nonce = "2.2.1" +solana-nonce-account = "2.2.1" solana-notifier = { path = "notifier", version = "=3.0.0" } -solana-offchain-message = "3.0.0" -solana-packet = "3.0.0" +solana-offchain-message = "2.2.1" +solana-packet = "2.2.1" solana-perf = { path = "perf", version = "=3.0.0" } solana-poh = { path = "poh", version = "=3.0.0" } -solana-poh-config = "3.0.0" +solana-poh-config = "2.2.1" solana-poseidon = { path = "poseidon", version = "=3.0.0" } -solana-precompile-error = "3.0.0" -solana-presigner = "3.0.0" -solana-program = { version = "3.0.0", default-features = false } -solana-program-entrypoint = "3.1.0" -solana-program-error = "3.0.0" -solana-program-memory = "3.0.0" -solana-program-option = "3.0.0" -solana-program-pack = "3.0.0" +solana-precompile-error = "2.2.2" +solana-presigner = "2.2.1" +solana-program = { version = "2.3.0", default-features = false } +solana-program-entrypoint = "2.3.0" +solana-program-error = "2.2.2" +solana-program-memory = "2.3.1" +solana-program-option = "2.2.1" +solana-program-pack = "2.2.1" solana-program-runtime = { path = "program-runtime", version = "=3.0.0" } solana-program-test = { path = "program-test", version = "=3.0.0" } -solana-pubkey = { version = "3.0.0", default-features = false } +solana-pubkey = { version = "2.4.0", default-features = false } solana-pubsub-client = { path = "pubsub-client", version = "=3.0.0" } solana-quic-client = { path = "quic-client", version = "=3.0.0" } -solana-quic-definitions = "3.0.0" +solana-quic-definitions = "2.3.0" solana-rayon-threadlimit = { path = "rayon-threadlimit", version = "=3.0.0" } solana-remote-wallet = { path = "remote-wallet", version = "=3.0.0", default-features = false } -solana-rent = "3.0.0" -solana-reward-info = "3.0.0" +solana-rent = "2.2.1" +solana-reward-info = "2.2.1" solana-rpc = { path = "rpc", version = "=3.0.0" } solana-rpc-client = { path = "rpc-client", version = "=3.0.0", default-features = false } solana-rpc-client-api = { path = "rpc-client-api", version = "=3.0.0" } @@ -494,27 +496,27 @@ solana-rpc-client-nonce-utils = { path = "rpc-client-nonce-utils", version = "=3 solana-rpc-client-types = { path = "rpc-client-types", version = "=3.0.0" } solana-runtime = { path = "runtime", version = "=3.0.0" } solana-runtime-transaction = { path = "runtime-transaction", version = "=3.0.0" } -solana-sanitize = "3.0.0" +solana-sanitize = "2.2.1" solana-sbpf = "=0.12.2" -solana-sdk-ids = "3.0.0" -solana-secp256k1-program = "3.0.0" -solana-secp256k1-recover = "3.0.0" -solana-secp256r1-program = "3.0.0" -solana-seed-derivable = "3.0.0" -solana-seed-phrase = "3.0.0" +solana-sdk-ids = "2.2.1" +solana-secp256k1-program = "2.2.3" +solana-secp256k1-recover = "2.2.1" +solana-secp256r1-program = "2.2.4" +solana-seed-derivable = "2.2.1" +solana-seed-phrase = "2.2.1" solana-send-transaction-service = { path = "send-transaction-service", version = "=3.0.0" } -solana-serde = "3.0.0" -solana-serde-varint = "3.0.0" -solana-serialize-utils = "3.0.0" -solana-sha256-hasher = "3.0.0" -solana-short-vec = "3.0.0" -solana-shred-version = "3.0.0" -solana-signature = { version = "3.1.0", default-features = false } -solana-signer = "3.0.0" -solana-slot-hashes = "3.0.0" -solana-slot-history = "3.0.0" -solana-stable-layout = "3.0.0" -solana-stake-interface = { version = "2.0.0" } +solana-serde = "2.2.1" +solana-serde-varint = "2.2.2" +solana-serialize-utils = "2.2.1" +solana-sha256-hasher = "2.3.0" +solana-short-vec = "2.2.1" +solana-shred-version = "2.2.1" +solana-signature = { version = "2.3.0", default-features = false } +solana-signer = "2.2.1" +solana-slot-hashes = "2.2.1" +solana-slot-history = "2.2.1" +solana-stable-layout = "2.2.1" +solana-stake-interface = { version = "1.2.1" } solana-stake-program = { path = "programs/stake", version = "=3.0.0" } solana-storage-bigtable = { path = "storage-bigtable", version = "=3.0.0" } solana-storage-proto = { path = "storage-proto", version = "=3.0.0" } @@ -528,20 +530,20 @@ solana-svm-metrics = { path = "svm-metrics", version = "=3.0.0" } solana-svm-timings = { path = "svm-timings", version = "=3.0.0" } solana-svm-transaction = { path = "svm-transaction", version = "=3.0.0" } solana-svm-type-overrides = { path = "svm-type-overrides", version = "=3.0.0" } -solana-system-interface = "2.0" +solana-system-interface = "1.0" solana-system-program = { path = "programs/system", version = "=3.0.0" } -solana-system-transaction = "3.0.0" -solana-sysvar = "3.0.0" -solana-sysvar-id = "3.0.0" +solana-system-transaction = "2.2.1" +solana-sysvar = "2.2.2" +solana-sysvar-id = "2.2.1" solana-test-validator = { path = "test-validator", version = "=3.0.0" } -solana-time-utils = "3.0.0" +solana-time-utils = "2.2.1" solana-tls-utils = { path = "tls-utils", version = "=3.0.0" } solana-tps-client = { path = "tps-client", version = "=3.0.0" } solana-tpu-client = { path = "tpu-client", version = "=3.0.0", default-features = false } solana-tpu-client-next = { path = "tpu-client-next", version = "=3.0.0" } -solana-transaction = "3.0.0" +solana-transaction = "2.2.3" solana-transaction-context = { path = "transaction-context", version = "=3.0.0", features = ["bincode"] } -solana-transaction-error = "3.0.0" +solana-transaction-error = "2.2.1" solana-transaction-metrics-tracker = { path = "transaction-metrics-tracker", version = "=3.0.0" } solana-transaction-status = { path = "transaction-status", version = "=3.0.0" } solana-transaction-status-client-types = { path = "transaction-status-client-types", version = "=3.0.0" } @@ -549,26 +551,26 @@ solana-turbine = { path = "turbine", version = "=3.0.0" } solana-udp-client = { path = "udp-client", version = "=3.0.0" } solana-unified-scheduler-logic = { path = "unified-scheduler-logic", version = "=3.0.0" } solana-unified-scheduler-pool = { path = "unified-scheduler-pool", version = "=3.0.0" } -solana-validator-exit = "3.0.0" +solana-validator-exit = "2.2.1" solana-version = { path = "version", version = "=3.0.0" } solana-vote = { path = "vote", version = "=3.0.0" } -solana-vote-interface = "3.0.0" +solana-vote-interface = "2.2.6" solana-vote-program = { path = "programs/vote", version = "=3.0.0", default-features = false } solana-wen-restart = { path = "wen-restart", version = "=3.0.0" } solana-zk-elgamal-proof-program = { path = "programs/zk-elgamal-proof", version = "=3.0.0" } solana-zk-keygen = { path = "zk-keygen", version = "=3.0.0" } -solana-zk-sdk = "4.0.0" +solana-zk-sdk = "3.0.0" solana-zk-token-proof-program = { path = "programs/zk-token-proof", version = "=3.0.0" } solana-zk-token-sdk = { path = "zk-token-sdk", version = "=3.0.0" } -spl-associated-token-account-interface = "2.0.0" -spl-generic-token = "2.0.0" -spl-memo-interface = "2.0.0" -spl-pod = "0.7.0" -spl-token-2022-interface = "2.0.0" -spl-token-confidential-transfer-proof-extraction = "0.5.0" -spl-token-group-interface = "0.7.0" -spl-token-interface = "2.0.0" -spl-token-metadata-interface = "0.8.0" +spl-associated-token-account-interface = "1.0.0" +spl-generic-token = "1.0.1" +spl-memo-interface = "1.0.0" +spl-pod = "0.5.1" +spl-token-2022-interface = "1.0.0" +spl-token-confidential-transfer-proof-extraction = "0.4.0" +spl-token-group-interface = "0.6.0" +spl-token-interface = "1.0.0" +spl-token-metadata-interface = "0.7.0" static_assertions = "1.1.0" stream-cancel = "0.8.2" strum = "0.24" diff --git a/account-decoder/Cargo.toml b/account-decoder/Cargo.toml index d94c96a1954b15..b6ba7fd8a67dd9 100644 --- a/account-decoder/Cargo.toml +++ b/account-decoder/Cargo.toml @@ -28,7 +28,7 @@ solana-address-lookup-table-interface = { workspace = true, features = [ "bytemuck", ] } solana-clock = { workspace = true } -solana-config-interface = { workspace = true, features = ["bincode"] } +solana-config-program-client = { workspace = true, features = ["serde"] } solana-epoch-schedule = { workspace = true } solana-fee-calculator = { workspace = true } solana-instruction = { workspace = true } @@ -41,7 +41,7 @@ solana-rent = { workspace = true } solana-sdk-ids = { workspace = true } solana-slot-hashes = { workspace = true } solana-slot-history = { workspace = true } -solana-stake-interface = { workspace = true, features = ["bincode", "sysvar"] } +solana-stake-interface = { workspace = true } solana-sysvar = { workspace = true } solana-vote-interface = { workspace = true, features = ["bincode"] } spl-generic-token = { workspace = true } diff --git a/account-decoder/src/parse_account_data.rs b/account-decoder/src/parse_account_data.rs index 5b1d0bf5279a3e..807cedee64eba8 100644 --- a/account-decoder/src/parse_account_data.rs +++ b/account-decoder/src/parse_account_data.rs @@ -165,7 +165,7 @@ mod test { }, solana_vote_interface::{ program::id as vote_program_id, - state::{VoteStateV3, VoteStateVersions}, + state::{VoteState, VoteStateVersions}, }, }; @@ -176,10 +176,10 @@ mod test { let data = vec![0; 4]; assert!(parse_account_data_v3(&account_pubkey, &other_program, &data, None).is_err()); - let vote_state = VoteStateV3::default(); - let mut vote_account_data: Vec = vec![0; VoteStateV3::size_of()]; - let versioned = VoteStateVersions::new_v3(vote_state); - VoteStateV3::serialize(&versioned, &mut vote_account_data).unwrap(); + let vote_state = VoteState::default(); + let mut vote_account_data: Vec = vec![0; VoteState::size_of()]; + let versioned = VoteStateVersions::new_current(vote_state); + VoteState::serialize(&versioned, &mut vote_account_data).unwrap(); let parsed = parse_account_data_v3( &account_pubkey, &vote_program_id(), @@ -188,7 +188,7 @@ mod test { ) .unwrap(); assert_eq!(parsed.program, "vote".to_string()); - assert_eq!(parsed.space, VoteStateV3::size_of() as u64); + assert_eq!(parsed.space, VoteState::size_of() as u64); let nonce_data = Versions::new(State::Initialized(Data::default())); let nonce_account_data = bincode::serialize(&nonce_data).unwrap(); diff --git a/account-decoder/src/parse_config.rs b/account-decoder/src/parse_config.rs index 08be68fc42bc26..4f03503806de36 100644 --- a/account-decoder/src/parse_config.rs +++ b/account-decoder/src/parse_config.rs @@ -5,7 +5,7 @@ use { }, bincode::deserialize, serde_json::Value, - solana_config_interface::state::{get_config_data, ConfigKeys}, + solana_config_program_client::{get_config_data, ConfigKeys}, solana_pubkey::Pubkey, solana_stake_interface::config::{ Config as StakeConfig, {self as stake_config}, @@ -101,6 +101,7 @@ mod test { bincode::serialize, serde_json::json, solana_account::{Account, AccountSharedData, ReadableAccount}, + solana_config_program_client::ConfigKeys, }; fn create_config_account( diff --git a/account-decoder/src/parse_sysvar.rs b/account-decoder/src/parse_sysvar.rs index 9a5c70c89d0a3b..c0b260f1542010 100644 --- a/account-decoder/src/parse_sysvar.rs +++ b/account-decoder/src/parse_sysvar.rs @@ -14,9 +14,11 @@ use { solana_sdk_ids::sysvar, solana_slot_hashes::SlotHashes, solana_slot_history::{self as slot_history, SlotHistory}, - solana_stake_interface::stake_history::{StakeHistory, StakeHistoryEntry}, solana_sysvar::{ - epoch_rewards::EpochRewards, last_restart_slot::LastRestartSlot, rewards::Rewards, + epoch_rewards::EpochRewards, + last_restart_slot::LastRestartSlot, + rewards::Rewards, + stake_history::{StakeHistory, StakeHistoryEntry}, }, }; diff --git a/account-decoder/src/parse_vote.rs b/account-decoder/src/parse_vote.rs index 3dfb5aa63bce55..aca75b74f8354d 100644 --- a/account-decoder/src/parse_vote.rs +++ b/account-decoder/src/parse_vote.rs @@ -2,11 +2,11 @@ use { crate::{parse_account_data::ParseAccountError, StringAmount}, solana_clock::{Epoch, Slot}, solana_pubkey::Pubkey, - solana_vote_interface::state::{BlockTimestamp, Lockout, VoteStateV3}, + solana_vote_interface::state::{BlockTimestamp, Lockout, VoteState}, }; pub fn parse_vote(data: &[u8]) -> Result { - let mut vote_state = VoteStateV3::deserialize(data).map_err(ParseAccountError::from)?; + let mut vote_state = VoteState::deserialize(data).map_err(ParseAccountError::from)?; let epoch_credits = vote_state .epoch_credits() .iter() @@ -125,10 +125,10 @@ mod test { #[test] fn test_parse_vote() { - let vote_state = VoteStateV3::default(); - let mut vote_account_data: Vec = vec![0; VoteStateV3::size_of()]; - let versioned = VoteStateVersions::new_v3(vote_state); - VoteStateV3::serialize(&versioned, &mut vote_account_data).unwrap(); + let vote_state = VoteState::default(); + let mut vote_account_data: Vec = vec![0; VoteState::size_of()]; + let versioned = VoteStateVersions::new_current(vote_state); + VoteState::serialize(&versioned, &mut vote_account_data).unwrap(); let expected_vote_state = UiVoteState { node_pubkey: Pubkey::default().to_string(), authorized_withdrawer: Pubkey::default().to_string(), diff --git a/accounts-cluster-bench/src/main.rs b/accounts-cluster-bench/src/main.rs index 6e80376be1bd75..bdbe2cf4813cce 100644 --- a/accounts-cluster-bench/src/main.rs +++ b/accounts-cluster-bench/src/main.rs @@ -1420,7 +1420,7 @@ pub mod test { validator_configs::make_identical_validator_configs, }, solana_measure::measure::Measure, - solana_native_token::LAMPORTS_PER_SOL, + solana_native_token::sol_to_lamports, solana_poh_config::PohConfig, solana_program_pack::Pack, solana_test_validator::TestValidator, @@ -1572,7 +1572,11 @@ pub mod test { let funder = Keypair::new(); let latest_blockhash = rpc_client.get_latest_blockhash().unwrap(); let signature = rpc_client - .request_airdrop_with_blockhash(&funder.pubkey(), LAMPORTS_PER_SOL, &latest_blockhash) + .request_airdrop_with_blockhash( + &funder.pubkey(), + sol_to_lamports(1.0), + &latest_blockhash, + ) .unwrap(); rpc_client .confirm_transaction_with_spinner( diff --git a/banks-client/src/lib.rs b/banks-client/src/lib.rs index 90432b08544474..6068666f18f9fa 100644 --- a/banks-client/src/lib.rs +++ b/banks-client/src/lib.rs @@ -25,7 +25,7 @@ use { solana_pubkey::Pubkey, solana_rent::Rent, solana_signature::Signature, - solana_sysvar::SysvarSerialize, + solana_sysvar::Sysvar, solana_transaction::versioned::VersionedTransaction, tarpc::{ client::{self, NewClient, RequestDispatch}, @@ -182,7 +182,7 @@ impl BanksClient { } /// Return the cluster Sysvar - pub async fn get_sysvar(&self) -> Result { + pub async fn get_sysvar(&self) -> Result { let sysvar = self .get_account(T::id()) .await? diff --git a/bench-tps/Cargo.toml b/bench-tps/Cargo.toml index 84bd2fb79536e8..6aee1554e7db51 100644 --- a/bench-tps/Cargo.toml +++ b/bench-tps/Cargo.toml @@ -67,7 +67,7 @@ solana-tpu-client = { workspace = true } solana-transaction = { workspace = true } solana-transaction-status = { workspace = true } solana-version = { workspace = true } -spl-instruction-padding-interface = { version = "=1.0.0" } +spl-instruction-padding-interface = { version = "=0.1.0" } thiserror = { workspace = true } [target.'cfg(not(any(target_env = "msvc", target_os = "freebsd")))'.dependencies] diff --git a/bench-tps/src/bench.rs b/bench-tps/src/bench.rs index c22180b29b757b..dda72cbd4068b8 100644 --- a/bench-tps/src/bench.rs +++ b/bench-tps/src/bench.rs @@ -1226,7 +1226,7 @@ mod tests { solana_commitment_config::CommitmentConfig, solana_fee_calculator::FeeRateGovernor, solana_genesis_config::{create_genesis_config, GenesisConfig}, - solana_native_token::LAMPORTS_PER_SOL, + solana_native_token::sol_to_lamports, solana_nonce::state::State, solana_runtime::{bank::Bank, bank_client::BankClient, bank_forks::BankForks}, }; @@ -1241,7 +1241,7 @@ mod tests { #[test] fn test_bench_tps_bank_client() { - let (genesis_config, id) = create_genesis_config(10_000 * LAMPORTS_PER_SOL); + let (genesis_config, id) = create_genesis_config(sol_to_lamports(10_000.0)); let (bank, _bank_forks) = bank_with_all_features(&genesis_config); let client = Arc::new(BankClient::new_shared(bank)); @@ -1262,7 +1262,7 @@ mod tests { #[test] fn test_bench_tps_fund_keys() { - let (genesis_config, id) = create_genesis_config(10_000 * LAMPORTS_PER_SOL); + let (genesis_config, id) = create_genesis_config(sol_to_lamports(10_000.0)); let (bank, _bank_forks) = bank_with_all_features(&genesis_config); let client = Arc::new(BankClient::new_shared(bank)); let keypair_count = 20; @@ -1285,7 +1285,7 @@ mod tests { #[test] fn test_bench_tps_fund_keys_with_fees() { - let (mut genesis_config, id) = create_genesis_config(10_000 * LAMPORTS_PER_SOL); + let (mut genesis_config, id) = create_genesis_config(sol_to_lamports(10_000.0)); let fee_rate_governor = FeeRateGovernor::new(11, 0); genesis_config.fee_rate_governor = fee_rate_governor; let (bank, _bank_forks) = bank_with_all_features(&genesis_config); @@ -1305,7 +1305,7 @@ mod tests { #[test] fn test_bench_tps_create_durable_nonce() { - let (genesis_config, id) = create_genesis_config(10_000 * LAMPORTS_PER_SOL); + let (genesis_config, id) = create_genesis_config(sol_to_lamports(10_000.0)); let (bank, _bank_forks) = bank_with_all_features(&genesis_config); let client = Arc::new(BankClient::new_shared(bank)); let keypair_count = 10; diff --git a/bench-tps/src/keypairs.rs b/bench-tps/src/keypairs.rs index b278bc0e6198a8..36c7db5e901783 100644 --- a/bench-tps/src/keypairs.rs +++ b/bench-tps/src/keypairs.rs @@ -34,7 +34,7 @@ where .into_iter() .for_each(|(keypair, primordial_account)| { let bytes: Vec = serde_json::from_str(keypair.as_str()).unwrap(); - keypairs.push(Keypair::try_from(bytes.as_ref()).unwrap()); + keypairs.push(Keypair::from_bytes(&bytes).unwrap()); last_balance = primordial_account.balance; }); diff --git a/clap-utils/src/input_parsers.rs b/clap-utils/src/input_parsers.rs index 180c8e301113a9..6ddd92b539ff6a 100644 --- a/clap-utils/src/input_parsers.rs +++ b/clap-utils/src/input_parsers.rs @@ -386,9 +386,9 @@ mod tests { #[test] #[ignore = "historical reference; shows float behavior fixed in pull #4988"] fn test_lamports_of_sol_origin() { - use solana_native_token::sol_str_to_lamports; + use solana_native_token::sol_to_lamports; pub fn lamports_of_sol(matches: &ArgMatches<'_>, name: &str) -> Option { - matches.value_of(name).and_then(sol_str_to_lamports) + value_of(matches, name).map(sol_to_lamports) } let matches = app().get_matches_from(vec!["test", "--single", "50"]); diff --git a/clap-v3-utils/src/input_parsers/mod.rs b/clap-v3-utils/src/input_parsers/mod.rs index d1856807a9f09f..a216cff3bb2260 100644 --- a/clap-v3-utils/src/input_parsers/mod.rs +++ b/clap-v3-utils/src/input_parsers/mod.rs @@ -9,7 +9,7 @@ use { solana_cluster_type::ClusterType, solana_commitment_config::CommitmentConfig, solana_keypair::{read_keypair_file, Keypair}, - solana_native_token::sol_str_to_lamports, + solana_native_token::sol_to_lamports, solana_pubkey::{Pubkey, MAX_SEED_LEN}, solana_signer::Signer, std::str::FromStr, @@ -80,7 +80,7 @@ pub fn unix_timestamp_from_rfc3339_datetime( )] #[allow(deprecated)] pub fn lamports_of_sol(matches: &ArgMatches, name: &str) -> Option { - matches.value_of(name).and_then(sol_str_to_lamports) + value_of(matches, name).map(sol_to_lamports) } #[deprecated( diff --git a/cli-output/Cargo.toml b/cli-output/Cargo.toml index 0db753b6f34a0a..f8a6b403636f10 100644 --- a/cli-output/Cargo.toml +++ b/cli-output/Cargo.toml @@ -34,6 +34,7 @@ solana-clock = { workspace = true } solana-epoch-info = { workspace = true, features = ["serde"] } solana-hash = { workspace = true } solana-message = { workspace = true } +solana-native-token = { workspace = true } solana-packet = { workspace = true } solana-pubkey = { workspace = true } solana-rpc-client-api = { workspace = true } @@ -41,6 +42,7 @@ solana-sdk-ids = { workspace = true } solana-signature = { workspace = true } solana-stake-interface = { workspace = true } solana-system-interface = { workspace = true } +solana-sysvar = { workspace = true } solana-transaction = { workspace = true, features = ["verify"] } solana-transaction-error = { workspace = true } solana-transaction-status = { workspace = true } diff --git a/cli-output/src/cli_output.rs b/cli-output/src/cli_output.rs index 3803a932f33b22..a34af79a43d211 100644 --- a/cli-output/src/cli_output.rs +++ b/cli-output/src/cli_output.rs @@ -25,16 +25,15 @@ use { solana_clock::{Epoch, Slot, UnixTimestamp}, solana_epoch_info::EpochInfo, solana_hash::Hash, + solana_native_token::lamports_to_sol, solana_pubkey::Pubkey, solana_rpc_client_api::response::{ RpcAccountBalance, RpcContactInfo, RpcInflationGovernor, RpcInflationRate, RpcKeyedAccount, RpcSupply, RpcVoteAccountInfo, }, solana_signature::Signature, - solana_stake_interface::{ - stake_history::StakeHistoryEntry, - state::{Authorized, Lockup}, - }, + solana_stake_interface::state::{Authorized, Lockup}, + solana_sysvar::stake_history::StakeHistoryEntry, solana_transaction::{versioned::VersionedTransaction, Transaction}, solana_transaction_status::{ EncodedConfirmedBlock, EncodedTransaction, TransactionConfirmationStatus, @@ -1078,8 +1077,8 @@ impl VerboseDisplay for CliKeyedEpochRewards { keyed_reward.address, reward.effective_slot, Utc.timestamp_opt(reward.block_time, 0).unwrap(), - build_balance_message(reward.amount, false, false), - build_balance_message(reward.post_balance, false, false), + lamports_to_sol(reward.amount), + lamports_to_sol(reward.post_balance), reward.percent_change, reward .apr @@ -1123,8 +1122,8 @@ impl fmt::Display for CliKeyedEpochRewards { f, " {:<44} â—Ž{:<17.9} â—Ž{:<17.9} {:>13.9}% {:>7} {:>10}", keyed_reward.address, - build_balance_message(reward.amount, false, false), - build_balance_message(reward.post_balance, false, false), + lamports_to_sol(reward.amount), + lamports_to_sol(reward.post_balance), reward.percent_change, reward .apr @@ -1299,13 +1298,13 @@ fn show_epoch_rewards( format_as!( f, "{},{},{},{},{},{}%,{},{}", - " {:<6} {:<11} {:<26} â—Ž{:<17.11} â—Ž{:<17.11} {:>13.3}% {:>14} {:>10}", + " {:<6} {:<11} {:<26} â—Ž{:<17.9} â—Ž{:<17.9} {:>13.3}% {:>14} {:>10}", fmt, reward.epoch, reward.effective_slot, Utc.timestamp_opt(reward.block_time, 0).unwrap(), - build_balance_message(reward.amount, false, false), - build_balance_message(reward.post_balance, false, false), + lamports_to_sol(reward.amount), + lamports_to_sol(reward.post_balance), reward.percent_change, reward .apr @@ -2026,10 +2025,7 @@ impl fmt::Display for CliAccountBalances { f, "{:<44} {}", account.address, - &format!( - "{} SOL", - build_balance_message(account.lamports, false, false) - ), + &format!("{} SOL", lamports_to_sol(account.lamports)) )?; } Ok(()) @@ -2064,26 +2060,16 @@ impl VerboseDisplay for CliSupply {} impl fmt::Display for CliSupply { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - writeln_name_value( - f, - "Total:", - &format!("{} SOL", build_balance_message(self.total, false, false)), - )?; + writeln_name_value(f, "Total:", &format!("{} SOL", lamports_to_sol(self.total)))?; writeln_name_value( f, "Circulating:", - &format!( - "{} SOL", - build_balance_message(self.circulating, false, false) - ), + &format!("{} SOL", lamports_to_sol(self.circulating)), )?; writeln_name_value( f, "Non-Circulating:", - &format!( - "{} SOL", - build_balance_message(self.non_circulating, false, false) - ), + &format!("{} SOL", lamports_to_sol(self.non_circulating)), )?; if self.print_accounts { writeln!(f)?; @@ -2849,14 +2835,14 @@ impl fmt::Display for CliBlock { format!( "{}â—Ž{:<14.9}", sign, - build_balance_message(reward.lamports.unsigned_abs(), false, false) + lamports_to_sol(reward.lamports.unsigned_abs()) ), if reward.post_balance == 0 { " - -".to_string() } else { format!( "â—Ž{:<19.9} {:>13.9}%", - build_balance_message(reward.post_balance, false, false), + lamports_to_sol(reward.post_balance), (reward.lamports.abs() as f64 / (reward.post_balance as f64 - reward.lamports as f64)) * 100.0 @@ -2874,7 +2860,7 @@ impl fmt::Display for CliBlock { f, "Total Rewards: {}â—Ž{:<12.9}", sign, - build_balance_message(total_rewards.unsigned_abs(), false, false) + lamports_to_sol(total_rewards.unsigned_abs()) )?; } for (index, transaction_with_meta) in @@ -3542,7 +3528,7 @@ mod tests { ..CliVoteAccount::default() }; let s = format!("{c}"); - assert_eq!(s, "Account Balance: 0.00001 SOL\nValidator Identity: 11111111111111111111111111111111\nVote Authority: None\nWithdraw Authority: \nCredits: 0\nCommission: 0%\nRoot Slot: ~\nRecent Timestamp: 1970-01-01T00:00:00Z from slot 0\nEpoch Rewards:\n Epoch Reward Slot Time Amount New Balance Percent Change APR Commission\n 1 100 1970-01-01 00:00:00 UTC â—Ž0.00000001 â—Ž0.0000001 11.000% 10.00% 1%\n 2 200 1970-01-12 13:46:40 UTC â—Ž0.000000012 â—Ž0.0000001 11.000% 13.00% 1%\n"); + assert_eq!(s, "Account Balance: 0.00001 SOL\nValidator Identity: 11111111111111111111111111111111\nVote Authority: None\nWithdraw Authority: \nCredits: 0\nCommission: 0%\nRoot Slot: ~\nRecent Timestamp: 1970-01-01T00:00:00Z from slot 0\nEpoch Rewards:\n Epoch Reward Slot Time Amount New Balance Percent Change APR Commission\n 1 100 1970-01-01 00:00:00 UTC â—Ž0.000000010 â—Ž0.000000100 11.000% 10.00% 1%\n 2 200 1970-01-12 13:46:40 UTC â—Ž0.000000012 â—Ž0.000000100 11.000% 13.00% 1%\n"); println!("{s}"); c.use_csv = true; diff --git a/cli-output/src/display.rs b/cli-output/src/display.rs index d31fb4ab3ae323..115471b76fad7f 100644 --- a/cli-output/src/display.rs +++ b/cli-output/src/display.rs @@ -10,6 +10,7 @@ use { solana_clock::UnixTimestamp, solana_hash::Hash, solana_message::{compiled_instruction::CompiledInstruction, v0::MessageAddressTableLookup}, + solana_native_token::lamports_to_sol, solana_pubkey::Pubkey, solana_signature::Signature, solana_stake_interface as stake, @@ -51,8 +52,7 @@ pub fn build_balance_message_with_config( let value = if config.use_lamports_unit { lamports.to_string() } else { - const LAMPORTS_PER_SOL_F64: f64 = 1_000_000_000.; - let sol = lamports as f64 / LAMPORTS_PER_SOL_F64; + let sol = lamports_to_sol(lamports); let sol_str = format!("{sol:.9}"); if config.trim_trailing_zeros { sol_str @@ -530,8 +530,8 @@ fn write_rewards( "-".to_string() }, sign, - build_balance_message(reward.lamports.unsigned_abs(), false, false), - build_balance_message(reward.post_balance, false, false) + lamports_to_sol(reward.lamports.unsigned_abs()), + lamports_to_sol(reward.post_balance) )?; } } @@ -556,12 +556,7 @@ fn write_status( } fn write_fees(w: &mut W, transaction_fee: u64, prefix: &str) -> io::Result<()> { - writeln!( - w, - "{} Fee: â—Ž{}", - prefix, - build_balance_message(transaction_fee, false, false) - ) + writeln!(w, "{} Fee: â—Ž{}", prefix, lamports_to_sol(transaction_fee)) } fn write_balances( @@ -585,7 +580,7 @@ fn write_balances( "{} Account {} balance: â—Ž{}", prefix, i, - build_balance_message(*pre, false, false) + lamports_to_sol(*pre) )?; } else { writeln!( @@ -593,8 +588,8 @@ fn write_balances( "{} Account {} balance: â—Ž{} -> â—Ž{}", prefix, i, - build_balance_message(*pre, false, false), - build_balance_message(*post, false, false) + lamports_to_sol(*pre), + lamports_to_sol(*post) )?; } } @@ -745,7 +740,7 @@ mod test { let secret = ed25519_dalek::SecretKey::from_bytes(&[0u8; 32]).unwrap(); let public = ed25519_dalek::PublicKey::from(&secret); let keypair = ed25519_dalek::Keypair { secret, public }; - Keypair::try_from(keypair.to_bytes().as_ref()).unwrap() + Keypair::from_bytes(&keypair.to_bytes()).unwrap() } fn new_test_v0_transaction() -> VersionedTransaction { @@ -862,7 +857,7 @@ Return Data from Program 8qbHbw2BbbTHBW1sbeqakYXVKRQM8Ne7pLK7m6CVfeR: 0000: 01 02 03 ... Rewards: Address Type Amount New Balance \0 - 4vJ9JU1bJJE96FWSJKvHsmmFADCg4gpZQff4P3bkLKi rent -â—Ž0.0000001 â—Ž0.0000099 \0 + 4vJ9JU1bJJE96FWSJKvHsmmFADCg4gpZQff4P3bkLKi rent -â—Ž0.000000100 â—Ž0.000009900 \0 ".replace("\\0", "") // replace marker used to subvert trailing whitespace linter on CI ); } @@ -951,7 +946,7 @@ Return Data from Program 8qbHbw2BbbTHBW1sbeqakYXVKRQM8Ne7pLK7m6CVfeR: 0000: 01 02 03 ... Rewards: Address Type Amount New Balance \0 - CktRuQ2mttgRGkXJtyksdKHjUdc2C4TgDzyB98oEzy8 rent -â—Ž0.0000001 â—Ž0.0000149 \0 + CktRuQ2mttgRGkXJtyksdKHjUdc2C4TgDzyB98oEzy8 rent -â—Ž0.000000100 â—Ž0.000014900 \0 ".replace("\\0", "") // replace marker used to subvert trailing whitespace linter on CI ); } diff --git a/cli/Cargo.toml b/cli/Cargo.toml index bff0ce49f24160..23476560b7ccf8 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -37,64 +37,66 @@ semver = { workspace = true } serde = { workspace = true } serde_derive = { workspace = true } serde_json = { workspace = true } -solana-account = "=3.0.0" +solana-account = "=2.2.1" solana-account-decoder = { workspace = true } solana-address-lookup-table-interface = { workspace = true } -solana-borsh = "=3.0.0" +solana-borsh = "=2.2.1" solana-clap-utils = { workspace = true } solana-cli-config = { workspace = true } solana-cli-output = { workspace = true } solana-client = { workspace = true } -solana-clock = "=3.0.0" -solana-cluster-type = "=3.0.0" -solana-commitment-config = "=3.0.0" -solana-compute-budget-interface = { version = "=3.0.0", features = ["borsh"] } -solana-config-interface = "=2.0.0" +solana-clock = "=2.2.2" +solana-cluster-type = "=2.2.1" +solana-commitment-config = "=2.2.1" +solana-compute-budget-interface = { version = "=2.2.2", features = ["borsh"] } +solana-config-interface = "=1.0.0" +solana-config-program-client = { workspace = true, features = ["serde"] } solana-connection-cache = { workspace = true } -solana-epoch-schedule = "=3.0.0" -solana-feature-gate-interface = { version = "=3.0.0", features = ["bincode"] } -solana-fee-calculator = "=3.0.0" -solana-fee-structure = "=3.0.0" -solana-hash = "=3.0.0" -solana-instruction = "=3.0.0" -solana-keypair = "=3.0.0" -solana-loader-v3-interface = { version = "=6.1.0", features = ["bincode"] } -solana-loader-v4-interface = "=3.1.0" +solana-epoch-schedule = "=2.2.1" +solana-feature-gate-client = "=0.0.2" +solana-feature-gate-interface = "=2.2.2" +solana-fee-calculator = "=2.2.1" +solana-fee-structure = "=2.3.0" +solana-hash = "=2.3.0" +solana-instruction = "=2.3.0" +solana-keypair = "=2.2.1" +solana-loader-v3-interface = { version = "=5.0.0", features = ["bincode"] } +solana-loader-v4-interface = "=2.2.1" solana-loader-v4-program = { workspace = true } solana-logger = "=3.0.0" -solana-message = "=3.0.0" -solana-native-token = "=3.0.0" -solana-nonce = "=3.0.0" -solana-offchain-message = { version = "=3.0.0", features = ["verify"] } -solana-packet = "=3.0.0" +solana-message = "=2.4.0" +solana-native-token = "=2.2.2" +solana-nonce = "=2.2.1" +solana-offchain-message = { version = "=2.2.1", features = ["verify"] } +solana-packet = "=2.2.1" solana-program-runtime = { workspace = true } -solana-pubkey = { version = "=3.0.0", default-features = false } +solana-pubkey = { version = "=2.4.0", default-features = false } solana-pubsub-client = { workspace = true } solana-quic-client = { workspace = true } solana-remote-wallet = { workspace = true, features = ["default"] } -solana-rent = "=3.0.0" +solana-rent = "=2.2.1" solana-rpc-client = { workspace = true, features = ["default"] } solana-rpc-client-api = { workspace = true } solana-rpc-client-nonce-utils = { workspace = true, features = ["clap"] } solana-sbpf = { workspace = true } -solana-sdk-ids = "=3.0.0" -solana-signature = { version = "=3.1.0", default-features = false } -solana-signer = "=3.0.0" -solana-slot-history = "=3.0.0" -solana-stake-interface = "=2.0.0" +solana-sdk-ids = "=2.2.1" +solana-signature = { version = "=2.3.0", default-features = false } +solana-signer = "=2.2.1" +solana-slot-history = "=2.2.1" +solana-stake-interface = "=1.2.1" solana-streamer = { workspace = true } -solana-system-interface = { version = "=2.0", features = ["bincode"] } -solana-sysvar = "=3.0.0" +solana-system-interface = { version = "=1.0", features = ["bincode"] } +solana-sysvar = "=2.2.2" solana-tps-client = { workspace = true } solana-tpu-client = { workspace = true, features = ["default"] } -solana-transaction = "=3.0.0" -solana-transaction-error = "=3.0.0" +solana-transaction = "=2.2.3" +solana-transaction-error = "=2.2.1" solana-transaction-status = { workspace = true } solana-transaction-status-client-types = { workspace = true } solana-udp-client = { workspace = true } solana-version = { workspace = true } solana-vote-program = { workspace = true } -spl-memo-interface = { version = "=2.0.0" } +spl-memo-interface = { version = "=1.0.0" } thiserror = { workspace = true } tiny-bip39 = { workspace = true } diff --git a/cli/src/checks.rs b/cli/src/checks.rs index 01805429406831..7a4b64ee1f55da 100644 --- a/cli/src/checks.rs +++ b/cli/src/checks.rs @@ -1,6 +1,6 @@ use { - crate::cli::CliError, solana_cli_output::display::build_balance_message, - solana_commitment_config::CommitmentConfig, solana_message::Message, solana_pubkey::Pubkey, + crate::cli::CliError, solana_commitment_config::CommitmentConfig, solana_message::Message, + solana_native_token::lamports_to_sol, solana_pubkey::Pubkey, solana_rpc_client::rpc_client::RpcClient, solana_rpc_client_api::client_error::Result as ClientResult, }; @@ -83,8 +83,8 @@ pub fn check_account_for_spend_and_fee_with_commitment( balance .checked_add(fee) .ok_or(CliError::InsufficientFundsForSpendAndFee( - build_balance_message(balance, false, false), - build_balance_message(fee, false, false), + lamports_to_sol(balance), + lamports_to_sol(fee), *account_pubkey, ))?; @@ -96,13 +96,13 @@ pub fn check_account_for_spend_and_fee_with_commitment( )? { if balance > 0 { return Err(CliError::InsufficientFundsForSpendAndFee( - build_balance_message(balance, false, false), - build_balance_message(fee, false, false), + lamports_to_sol(balance), + lamports_to_sol(fee), *account_pubkey, )); } else { return Err(CliError::InsufficientFundsForFee( - build_balance_message(fee, false, false), + lamports_to_sol(fee), *account_pubkey, )); } diff --git a/cli/src/cli.rs b/cli/src/cli.rs index a2584e83f00c98..e19965175979e2 100644 --- a/cli/src/cli.rs +++ b/cli/src/cli.rs @@ -488,11 +488,11 @@ pub enum CliError { #[error("Command not recognized: {0}")] CommandNotRecognized(String), #[error("Account {1} has insufficient funds for fee ({0} SOL)")] - InsufficientFundsForFee(String, Pubkey), + InsufficientFundsForFee(f64, Pubkey), #[error("Account {1} has insufficient funds for spend ({0} SOL)")] - InsufficientFundsForSpend(String, Pubkey), + InsufficientFundsForSpend(f64, Pubkey), #[error("Account {2} has insufficient funds for spend ({0} SOL) + fee ({1} SOL)")] - InsufficientFundsForSpendAndFee(String, String, Pubkey), + InsufficientFundsForSpendAndFee(f64, f64, Pubkey), #[error(transparent)] InvalidNonce(solana_rpc_client_nonce_utils::Error), #[error("Dynamic program error: {0}")] @@ -1744,26 +1744,6 @@ where } } -pub fn to_str_error_adapter(ix_error: &InstructionError) -> Option -where - E: 'static + std::error::Error + std::convert::TryFrom, -{ - match ix_error { - InstructionError::Custom(code) => E::try_from(*code).ok(), - _ => None, - } -} - -pub fn log_instruction_custom_error_to_str( - result: ClientResult, - config: &CliConfig, -) -> ProcessResult -where - E: 'static + std::error::Error + std::convert::TryFrom, -{ - log_instruction_custom_error_ex::(result, &config.output_format, to_str_error_adapter) -} - pub fn log_instruction_custom_error( result: ClientResult, config: &CliConfig, @@ -1780,7 +1760,7 @@ pub fn log_instruction_custom_error_ex( error_adapter: F, ) -> ProcessResult where - E: 'static + std::error::Error, + E: 'static + std::error::Error + FromPrimitive, F: Fn(&InstructionError) -> Option, { match result { diff --git a/cli/src/cluster_query.rs b/cli/src/cluster_query.rs index c81b144057e557..ff8392f9fcf013 100644 --- a/cli/src/cluster_query.rs +++ b/cli/src/cluster_query.rs @@ -31,6 +31,7 @@ use { solana_commitment_config::CommitmentConfig, solana_hash::Hash, solana_message::Message, + solana_native_token::lamports_to_sol, solana_nonce::state::State as NonceState, solana_pubkey::Pubkey, solana_pubsub_client::pubsub_client::PubsubClient, @@ -1412,10 +1413,7 @@ pub fn process_supply( pub fn process_total_supply(rpc_client: &RpcClient, _config: &CliConfig) -> ProcessResult { let supply = rpc_client.supply()?.value; - Ok(format!( - "{} SOL", - build_balance_message(supply.total, false, false) - )) + Ok(format!("{} SOL", lamports_to_sol(supply.total))) } pub fn process_get_transaction_count(rpc_client: &RpcClient, _config: &CliConfig) -> ProcessResult { diff --git a/cli/src/feature.rs b/cli/src/feature.rs index 2f0cfbc115b2fc..432fd06ba37800 100644 --- a/cli/src/feature.rs +++ b/cli/src/feature.rs @@ -1,8 +1,8 @@ use { crate::{ cli::{ - log_instruction_custom_error, log_instruction_custom_error_to_str, CliCommand, - CliCommandInfo, CliConfig, CliError, ProcessResult, + log_instruction_custom_error, CliCommand, CliCommandInfo, CliConfig, CliError, + ProcessResult, }, spend_utils::{resolve_spend_tx_and_check_account_balance, SpendAmount}, }, @@ -19,10 +19,10 @@ use { solana_clock::{Epoch, Slot}, solana_cluster_type::ClusterType, solana_epoch_schedule::EpochSchedule, - solana_feature_gate_interface::{ - activate_with_lamports, error::FeatureGateError, from_account, - instruction::revoke_pending_activation, Feature, + solana_feature_gate_client::{ + errors::SolanaFeatureGateError, instructions::RevokePendingActivation, }, + solana_feature_gate_interface::{activate_with_lamports, from_account, Feature}, solana_message::Message, solana_pubkey::Pubkey, solana_remote_wallet::remote_wallet::RemoteWalletManager, @@ -31,6 +31,7 @@ use { client_error::Error as ClientError, request::MAX_MULTIPLE_ACCOUNTS, response::RpcVoteAccountInfo, }, + solana_sdk_ids::{incinerator, system_program}, solana_system_interface::error::SystemError, solana_transaction::Transaction, std::{cmp::Ordering, collections::HashMap, fmt, rc::Rc, str::FromStr}, @@ -1085,7 +1086,12 @@ fn process_revoke( ComputeUnitLimit::Default, |_lamports| { Message::new( - &[revoke_pending_activation(&feature_id)], + &[RevokePendingActivation { + feature: feature_id, + incinerator: incinerator::id(), + system_program: system_program::id(), + } + .instruction()], Some(&fee_payer.pubkey()), ) }, @@ -1104,5 +1110,5 @@ fn process_revoke( config.commitment, config.send_transaction_config, ); - log_instruction_custom_error_to_str::(result, config) + log_instruction_custom_error::(result, config) } diff --git a/cli/src/spend_utils.rs b/cli/src/spend_utils.rs index a6942808e18b92..b06739376c2f73 100644 --- a/cli/src/spend_utils.rs +++ b/cli/src/spend_utils.rs @@ -9,10 +9,10 @@ use { solana_clap_utils::{ compute_budget::ComputeUnitLimit, input_parsers::lamports_of_sol, offline::SIGN_ONLY_ARG, }, - solana_cli_output::display::build_balance_message, solana_commitment_config::CommitmentConfig, solana_hash::Hash, solana_message::Message, + solana_native_token::lamports_to_sol, solana_pubkey::Pubkey, solana_rpc_client::rpc_client::RpcClient, }; @@ -162,22 +162,22 @@ where if from_pubkey == fee_pubkey { if from_balance == 0 || from_balance < spend.saturating_add(fee) { return Err(CliError::InsufficientFundsForSpendAndFee( - build_balance_message(spend, false, false), - build_balance_message(fee, false, false), + lamports_to_sol(spend), + lamports_to_sol(fee), *from_pubkey, )); } } else { if from_balance < spend { return Err(CliError::InsufficientFundsForSpend( - build_balance_message(spend, false, false), + lamports_to_sol(spend), *from_pubkey, )); } if !check_account_for_balance_with_commitment(rpc_client, fee_pubkey, fee, commitment)? { return Err(CliError::InsufficientFundsForFee( - build_balance_message(fee, false, false), + lamports_to_sol(fee), *fee_pubkey, )); } diff --git a/cli/src/stake.rs b/cli/src/stake.rs index fe931fa1f2678d..ea84b939a63316 100644 --- a/cli/src/stake.rs +++ b/cli/src/stake.rs @@ -54,11 +54,11 @@ use { self as stake, error::StakeError, instruction::{self as stake_instruction, LockupArgs}, - stake_history::StakeHistory, state::{Authorized, Lockup, Meta, StakeActivationStatus, StakeAuthorize, StakeStateV2}, tools::{acceptable_reference_epoch_credits, eligible_for_deactivate_delinquent}, }, solana_system_interface::{error::SystemError, instruction as system_instruction}, + solana_sysvar::stake_history::StakeHistory, solana_transaction::Transaction, std::{ops::Deref, rc::Rc}, }; diff --git a/cli/src/validator_info.rs b/cli/src/validator_info.rs index 605d4277a0bf9d..9920e0b2431b69 100644 --- a/cli/src/validator_info.rs +++ b/cli/src/validator_info.rs @@ -20,10 +20,8 @@ use { keypair::DefaultSigner, }, solana_cli_output::{CliValidatorInfo, CliValidatorInfoVec}, - solana_config_interface::{ - instruction::{self as config_instruction}, - state::{get_config_data, ConfigKeys}, - }, + solana_config_interface::instruction::{self as config_instruction}, + solana_config_program_client::{get_config_data, ConfigKeys}, solana_keypair::Keypair, solana_message::Message, solana_pubkey::Pubkey, @@ -132,7 +130,7 @@ fn parse_validator_info( pubkey: &Pubkey, account: &Account, ) -> Result<(Pubkey, Map), Box> { - if account.owner != solana_config_interface::id() { + if account.owner != solana_config_program_client::ID { return Err(format!("{pubkey} is not a validator info account").into()); } let key_list: ConfigKeys = deserialize(&account.data)?; @@ -305,7 +303,7 @@ pub fn process_set_validator_info( } // Check for existing validator-info account - let all_config = rpc_client.get_program_accounts(&solana_config_interface::id())?; + let all_config = rpc_client.get_program_accounts(&solana_config_program_client::ID)?; let existing_account = all_config .iter() .filter( @@ -434,7 +432,7 @@ pub fn process_get_validator_info( rpc_client.get_account(&validator_info_pubkey)?, )] } else { - let all_config = rpc_client.get_program_accounts(&solana_config_interface::id())?; + let all_config = rpc_client.get_program_accounts(&solana_config_program_client::ID)?; all_config .into_iter() .filter(|(_, validator_info_account)| { @@ -588,7 +586,7 @@ mod tests { parse_validator_info( &Pubkey::default(), &Account { - owner: solana_config_interface::id(), + owner: solana_config_program_client::ID, data, ..Account::default() } @@ -623,7 +621,7 @@ mod tests { assert!(parse_validator_info( &Pubkey::default(), &Account { - owner: solana_config_interface::id(), + owner: solana_config_program_client::ID, data, ..Account::default() }, diff --git a/cli/src/vote.rs b/cli/src/vote.rs index ae34f799317b66..e3879581521f5b 100644 --- a/cli/src/vote.rs +++ b/cli/src/vote.rs @@ -26,11 +26,12 @@ use { offline::*, }, solana_cli_output::{ - display::build_balance_message, return_signers_with_config, CliEpochVotingHistory, - CliLandedVote, CliVoteAccount, ReturnSignersConfig, + return_signers_with_config, CliEpochVotingHistory, CliLandedVote, CliVoteAccount, + ReturnSignersConfig, }, solana_commitment_config::CommitmentConfig, solana_message::Message, + solana_native_token::lamports_to_sol, solana_pubkey::Pubkey, solana_remote_wallet::remote_wallet::RemoteWalletManager, solana_rpc_client::rpc_client::RpcClient, @@ -42,7 +43,7 @@ use { vote_error::VoteError, vote_instruction::{self, withdraw, CreateVoteAccountConfig}, vote_state::{ - VoteAuthorize, VoteInit, VoteStateV3, VoteStateVersions, VOTE_CREDITS_MAXIMUM_PER_SLOT, + VoteAuthorize, VoteInit, VoteState, VoteStateVersions, VOTE_CREDITS_MAXIMUM_PER_SLOT, }, }, std::rc::Rc, @@ -828,7 +829,7 @@ pub fn process_create_vote_account( )?; let required_balance = rpc_client - .get_minimum_balance_for_rent_exemption(VoteStateV3::size_of())? + .get_minimum_balance_for_rent_exemption(VoteState::size_of())? .max(1); let amount = SpendAmount::Some(required_balance); @@ -1260,7 +1261,7 @@ pub(crate) fn get_vote_account( rpc_client: &RpcClient, vote_account_pubkey: &Pubkey, commitment_config: CommitmentConfig, -) -> Result<(Account, VoteStateV3), Box> { +) -> Result<(Account, VoteState), Box> { let vote_account = rpc_client .get_account_with_commitment(vote_account_pubkey, commitment_config)? .value @@ -1274,7 +1275,7 @@ pub(crate) fn get_vote_account( )) .into()); } - let vote_state = VoteStateV3::deserialize(&vote_account.data).map_err(|_| { + let vote_state = VoteState::deserialize(&vote_account.data).map_err(|_| { CliError::RpcRequestError( "Account data could not be deserialized to vote state".to_string(), ) @@ -1428,14 +1429,14 @@ pub fn process_withdraw_from_vote_account( if !sign_only { let current_balance = rpc_client.get_balance(vote_account_pubkey)?; let minimum_balance = - rpc_client.get_minimum_balance_for_rent_exemption(VoteStateV3::size_of())?; + rpc_client.get_minimum_balance_for_rent_exemption(VoteState::size_of())?; if let SpendAmount::Some(withdraw_amount) = withdraw_amount { let balance_remaining = current_balance.saturating_sub(withdraw_amount); if balance_remaining < minimum_balance && balance_remaining != 0 { return Err(CliError::BadParameter(format!( "Withdraw amount too large. The vote account balance must be at least {} SOL \ to remain rent exempt", - build_balance_message(minimum_balance, false, false) + lamports_to_sol(minimum_balance) )) .into()); } diff --git a/cli/tests/cluster_query.rs b/cli/tests/cluster_query.rs index 4df7cef6721f74..b3c6f12f3a9ea3 100644 --- a/cli/tests/cluster_query.rs +++ b/cli/tests/cluster_query.rs @@ -8,7 +8,7 @@ use { solana_faucet::faucet::run_local_faucet, solana_fee_structure::FeeStructure, solana_keypair::Keypair, - solana_native_token::LAMPORTS_PER_SOL, + solana_native_token::sol_to_lamports, solana_rpc_client::rpc_client::RpcClient, solana_signer::Signer, solana_streamer::socket::SocketAddrSpace, @@ -42,8 +42,9 @@ fn test_ping(compute_unit_price: Option) { config.json_rpc_url = test_validator.rpc_url(); config.signers = vec![&default_signer]; - request_and_confirm_airdrop(&rpc_client, &config, &signer_pubkey, LAMPORTS_PER_SOL).unwrap(); - check_balance!(LAMPORTS_PER_SOL, &rpc_client, &signer_pubkey); + request_and_confirm_airdrop(&rpc_client, &config, &signer_pubkey, sol_to_lamports(1.0)) + .unwrap(); + check_balance!(sol_to_lamports(1.0), &rpc_client, &signer_pubkey); check_ready(&rpc_client); let count = 5; diff --git a/cli/tests/nonce.rs b/cli/tests/nonce.rs index bd2125975bf3df..0245a8e26af492 100644 --- a/cli/tests/nonce.rs +++ b/cli/tests/nonce.rs @@ -11,7 +11,7 @@ use { solana_faucet::faucet::run_local_faucet, solana_hash::Hash, solana_keypair::{keypair_from_seed, Keypair}, - solana_native_token::LAMPORTS_PER_SOL, + solana_native_token::sol_to_lamports, solana_pubkey::Pubkey, solana_rpc_client::rpc_client::RpcClient, solana_rpc_client_nonce_utils::blockhash_query::{self, BlockhashQuery}, @@ -46,11 +46,11 @@ fn test_nonce(seed: Option, use_nonce_authority: bool, compute_unit_pric &rpc_client, &config_payer, &config_payer.signers[0].pubkey(), - 2000 * LAMPORTS_PER_SOL, + sol_to_lamports(2000.0), ) .unwrap(); check_balance!( - 2000 * LAMPORTS_PER_SOL, + sol_to_lamports(2000.0), &rpc_client, &config_payer.signers[0].pubkey(), ); @@ -85,17 +85,17 @@ fn test_nonce(seed: Option, use_nonce_authority: bool, compute_unit_pric seed, nonce_authority: optional_authority, memo: None, - amount: SpendAmount::Some(1000 * LAMPORTS_PER_SOL), + amount: SpendAmount::Some(sol_to_lamports(1000.0)), compute_unit_price, }; process_command(&config_payer).unwrap(); check_balance!( - 1000 * LAMPORTS_PER_SOL, + sol_to_lamports(1000.0), &rpc_client, &config_payer.signers[0].pubkey(), ); - check_balance!(1000 * LAMPORTS_PER_SOL, &rpc_client, &nonce_account); + check_balance!(sol_to_lamports(1000.0), &rpc_client, &nonce_account); // Get nonce config_payer.signers.pop(); @@ -144,17 +144,17 @@ fn test_nonce(seed: Option, use_nonce_authority: bool, compute_unit_pric nonce_authority: index, memo: None, destination_account_pubkey: payee_pubkey, - lamports: 100 * LAMPORTS_PER_SOL, + lamports: sol_to_lamports(100.0), compute_unit_price, }; process_command(&config_payer).unwrap(); check_balance!( - 1000 * LAMPORTS_PER_SOL, + sol_to_lamports(1000.0), &rpc_client, &config_payer.signers[0].pubkey(), ); - check_balance!(900 * LAMPORTS_PER_SOL, &rpc_client, &nonce_account); - check_balance!(100 * LAMPORTS_PER_SOL, &rpc_client, &payee_pubkey); + check_balance!(sol_to_lamports(900.0), &rpc_client, &nonce_account); + check_balance!(sol_to_lamports(100.0), &rpc_client, &payee_pubkey); // Show nonce account config_payer.command = CliCommand::ShowNonceAccount { @@ -199,29 +199,29 @@ fn test_nonce(seed: Option, use_nonce_authority: bool, compute_unit_pric nonce_authority: 1, memo: None, destination_account_pubkey: payee_pubkey, - lamports: 100 * LAMPORTS_PER_SOL, + lamports: sol_to_lamports(100.0), compute_unit_price, }; process_command(&config_payer).unwrap(); check_balance!( - 1000 * LAMPORTS_PER_SOL, + sol_to_lamports(1000.0), &rpc_client, &config_payer.signers[0].pubkey(), ); - check_balance!(800 * LAMPORTS_PER_SOL, &rpc_client, &nonce_account); - check_balance!(200 * LAMPORTS_PER_SOL, &rpc_client, &payee_pubkey); + check_balance!(sol_to_lamports(800.0), &rpc_client, &nonce_account); + check_balance!(sol_to_lamports(200.0), &rpc_client, &payee_pubkey); } #[test] fn test_create_account_with_seed() { - const ONE_SIG_FEE: u64 = 5000; + const ONE_SIG_FEE: f64 = 0.000005; solana_logger::setup(); let mint_keypair = Keypair::new(); let mint_pubkey = mint_keypair.pubkey(); let faucet_addr = run_local_faucet(mint_keypair, None); let test_validator = TestValidator::with_custom_fees( mint_pubkey, - ONE_SIG_FEE, + sol_to_lamports(ONE_SIG_FEE), Some(faucet_addr), SocketAddrSpace::Unspecified, ); @@ -237,23 +237,23 @@ fn test_create_account_with_seed() { &rpc_client, &CliConfig::recent_for_tests(), &offline_nonce_authority_signer.pubkey(), - 42 * LAMPORTS_PER_SOL, + sol_to_lamports(42.0), ) .unwrap(); request_and_confirm_airdrop( &rpc_client, &CliConfig::recent_for_tests(), &online_nonce_creator_signer.pubkey(), - 4242 * LAMPORTS_PER_SOL, + sol_to_lamports(4242.0), ) .unwrap(); check_balance!( - 42 * LAMPORTS_PER_SOL, + sol_to_lamports(42.0), &rpc_client, &offline_nonce_authority_signer.pubkey(), ); check_balance!( - 4242 * LAMPORTS_PER_SOL, + sol_to_lamports(4242.0), &rpc_client, &online_nonce_creator_signer.pubkey(), ); @@ -277,18 +277,18 @@ fn test_create_account_with_seed() { seed: Some(seed), nonce_authority: Some(authority_pubkey), memo: None, - amount: SpendAmount::Some(241 * LAMPORTS_PER_SOL), + amount: SpendAmount::Some(sol_to_lamports(241.0)), compute_unit_price: None, }; process_command(&creator_config).unwrap(); - check_balance!(241 * LAMPORTS_PER_SOL, &rpc_client, &nonce_address); + check_balance!(sol_to_lamports(241.0), &rpc_client, &nonce_address); check_balance!( - 42 * LAMPORTS_PER_SOL, + sol_to_lamports(42.0), &rpc_client, &offline_nonce_authority_signer.pubkey(), ); check_balance!( - 4001 * LAMPORTS_PER_SOL - ONE_SIG_FEE, + sol_to_lamports(4001.0 - ONE_SIG_FEE), &rpc_client, &online_nonce_creator_signer.pubkey(), ); @@ -312,7 +312,7 @@ fn test_create_account_with_seed() { authority_config.command = CliCommand::ClusterVersion; process_command(&authority_config).unwrap_err(); authority_config.command = CliCommand::Transfer { - amount: SpendAmount::Some(10 * LAMPORTS_PER_SOL), + amount: SpendAmount::Some(sol_to_lamports(10.0)), to: to_address, from: 0, sign_only: true, @@ -339,7 +339,7 @@ fn test_create_account_with_seed() { submit_config.json_rpc_url = test_validator.rpc_url(); submit_config.signers = vec![&authority_presigner]; submit_config.command = CliCommand::Transfer { - amount: SpendAmount::Some(10 * LAMPORTS_PER_SOL), + amount: SpendAmount::Some(sol_to_lamports(10.0)), to: to_address, from: 0, sign_only: false, @@ -359,16 +359,16 @@ fn test_create_account_with_seed() { compute_unit_price: None, }; process_command(&submit_config).unwrap(); - check_balance!(241 * LAMPORTS_PER_SOL, &rpc_client, &nonce_address); + check_balance!(sol_to_lamports(241.0), &rpc_client, &nonce_address); check_balance!( - 32 * LAMPORTS_PER_SOL - ONE_SIG_FEE, + sol_to_lamports(32.0 - ONE_SIG_FEE), &rpc_client, &offline_nonce_authority_signer.pubkey(), ); check_balance!( - 4001 * LAMPORTS_PER_SOL - ONE_SIG_FEE, + sol_to_lamports(4001.0 - ONE_SIG_FEE), &rpc_client, &online_nonce_creator_signer.pubkey(), ); - check_balance!(10 * LAMPORTS_PER_SOL, &rpc_client, &to_address); + check_balance!(sol_to_lamports(10.0), &rpc_client, &to_address); } diff --git a/cli/tests/request_airdrop.rs b/cli/tests/request_airdrop.rs index f6f499711733fc..ed93fdc6401b96 100644 --- a/cli/tests/request_airdrop.rs +++ b/cli/tests/request_airdrop.rs @@ -4,7 +4,7 @@ use { solana_commitment_config::CommitmentConfig, solana_faucet::faucet::run_local_faucet, solana_keypair::Keypair, - solana_native_token::LAMPORTS_PER_SOL, + solana_native_token::sol_to_lamports, solana_rpc_client::rpc_client::RpcClient, solana_signer::Signer, solana_streamer::socket::SocketAddrSpace, @@ -23,7 +23,7 @@ fn test_cli_request_airdrop() { bob_config.json_rpc_url = test_validator.rpc_url(); bob_config.command = CliCommand::Airdrop { pubkey: None, - lamports: 50 * LAMPORTS_PER_SOL, + lamports: sol_to_lamports(50.0), }; let keypair = Keypair::new(); bob_config.signers = vec![&keypair]; @@ -37,5 +37,5 @@ fn test_cli_request_airdrop() { let balance = rpc_client .get_balance(&bob_config.signers[0].pubkey()) .unwrap(); - assert_eq!(balance, 50 * LAMPORTS_PER_SOL); + assert_eq!(balance, sol_to_lamports(50.0)); } diff --git a/cli/tests/stake.rs b/cli/tests/stake.rs index b76cd7dd5e5b5d..25fd1a2e733697 100644 --- a/cli/tests/stake.rs +++ b/cli/tests/stake.rs @@ -16,7 +16,7 @@ use { solana_fee_calculator::FeeRateGovernor, solana_fee_structure::FeeStructure, solana_keypair::{keypair_from_seed, Keypair}, - solana_native_token::LAMPORTS_PER_SOL, + solana_native_token::sol_to_lamports, solana_nonce::state::State as NonceState, solana_pubkey::Pubkey, solana_rent::Rent, @@ -318,7 +318,7 @@ fn test_stake_delegation_and_withdraw_available() { &rpc_client, &config_validator, &config_validator.signers[0].pubkey(), - 100 * LAMPORTS_PER_SOL, + sol_to_lamports(100.0), ) .unwrap(); check_balance!( @@ -336,7 +336,7 @@ fn test_stake_delegation_and_withdraw_available() { withdrawer: None, withdrawer_signer: None, lockup: Lockup::default(), - amount: SpendAmount::Some(50 * LAMPORTS_PER_SOL), + amount: SpendAmount::Some(sol_to_lamports(50.0)), sign_only: false, dump_transaction_message: false, blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster), @@ -395,10 +395,10 @@ fn test_stake_delegation_and_withdraw_available() { &rpc_client, &config_validator, &stake_keypair.pubkey(), - 5 * LAMPORTS_PER_SOL, + sol_to_lamports(5.0), ) .unwrap(); - check_balance!(55 * LAMPORTS_PER_SOL, &rpc_client, &stake_keypair.pubkey()); + check_balance!(sol_to_lamports(55.0), &rpc_client, &stake_keypair.pubkey()); // Withdraw available stake config_validator.signers = vec![&validator_keypair]; @@ -420,7 +420,7 @@ fn test_stake_delegation_and_withdraw_available() { }; process_command(&config_validator).unwrap(); // Extra (inactive) SOL is withdrawn - check_balance!(5 * LAMPORTS_PER_SOL, &rpc_client, &recipient_pubkey); + check_balance!(sol_to_lamports(5.0), &rpc_client, &recipient_pubkey); // Deactivate stake config_validator.command = CliCommand::DeactivateStake { @@ -459,7 +459,7 @@ fn test_stake_delegation_and_withdraw_available() { }; process_command(&config_validator).unwrap(); // Complete balance is withdrawn because all stake is inactive - check_balance!(55 * LAMPORTS_PER_SOL, &rpc_client, &recipient_pubkey); + check_balance!(sol_to_lamports(55.0), &rpc_client, &recipient_pubkey); } #[test] @@ -487,7 +487,7 @@ fn test_stake_delegation_and_withdraw_all() { &rpc_client, &config_validator, &config_validator.signers[0].pubkey(), - 100 * LAMPORTS_PER_SOL, + sol_to_lamports(100.0), ) .unwrap(); check_balance!( @@ -505,7 +505,7 @@ fn test_stake_delegation_and_withdraw_all() { withdrawer: None, withdrawer_signer: None, lockup: Lockup::default(), - amount: SpendAmount::Some(50 * LAMPORTS_PER_SOL), + amount: SpendAmount::Some(sol_to_lamports(50.0)), sign_only: false, dump_transaction_message: false, blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster), @@ -561,10 +561,10 @@ fn test_stake_delegation_and_withdraw_all() { &rpc_client, &config_validator, &stake_keypair.pubkey(), - 5 * LAMPORTS_PER_SOL, + sol_to_lamports(5.0), ) .unwrap(); - check_balance!(55 * LAMPORTS_PER_SOL, &rpc_client, &stake_keypair.pubkey()); + check_balance!(sol_to_lamports(55.0), &rpc_client, &stake_keypair.pubkey()); // Withdraw all stake still fails, because it attempts to withdraw both // activating and inactive stake @@ -623,7 +623,7 @@ fn test_stake_delegation_and_withdraw_all() { compute_unit_price: None, }; process_command(&config_validator).unwrap(); - check_balance!(55 * LAMPORTS_PER_SOL, &rpc_client, &recipient_pubkey); + check_balance!(sol_to_lamports(55.0), &rpc_client, &recipient_pubkey); } #[test_case(None; "base")] diff --git a/cli/tests/transfer.rs b/cli/tests/transfer.rs index e3aa0377bcb710..5badc4e015620a 100644 --- a/cli/tests/transfer.rs +++ b/cli/tests/transfer.rs @@ -13,7 +13,7 @@ use { solana_fee_structure::FeeStructure, solana_keypair::{keypair_from_seed, Keypair}, solana_message::Message, - solana_native_token::LAMPORTS_PER_SOL, + solana_native_token::sol_to_lamports, solana_nonce::state::State as NonceState, solana_pubkey::Pubkey, solana_rpc_client::rpc_client::RpcClient, @@ -56,16 +56,16 @@ fn test_transfer(skip_preflight: bool) { let sender_pubkey = config.signers[0].pubkey(); let recipient_pubkey = Pubkey::from([1u8; 32]); - request_and_confirm_airdrop(&rpc_client, &config, &sender_pubkey, 5 * LAMPORTS_PER_SOL) + request_and_confirm_airdrop(&rpc_client, &config, &sender_pubkey, sol_to_lamports(5.0)) .unwrap(); - check_balance!(5 * LAMPORTS_PER_SOL, &rpc_client, &sender_pubkey); + check_balance!(sol_to_lamports(5.0), &rpc_client, &sender_pubkey); check_balance!(0, &rpc_client, &recipient_pubkey); check_ready(&rpc_client); // Plain ole transfer config.command = CliCommand::Transfer { - amount: SpendAmount::Some(LAMPORTS_PER_SOL), + amount: SpendAmount::Some(sol_to_lamports(1.0)), to: recipient_pubkey, from: 0, sign_only: false, @@ -83,15 +83,15 @@ fn test_transfer(skip_preflight: bool) { }; process_command(&config).unwrap(); check_balance!( - 4 * LAMPORTS_PER_SOL - fee_one_sig, + sol_to_lamports(4.0) - fee_one_sig, &rpc_client, &sender_pubkey ); - check_balance!(LAMPORTS_PER_SOL, &rpc_client, &recipient_pubkey); + check_balance!(sol_to_lamports(1.0), &rpc_client, &recipient_pubkey); // Plain ole transfer, failure due to InsufficientFundsForSpendAndFee config.command = CliCommand::Transfer { - amount: SpendAmount::Some(4 * LAMPORTS_PER_SOL), + amount: SpendAmount::Some(sol_to_lamports(4.0)), to: recipient_pubkey, from: 0, sign_only: false, @@ -109,11 +109,11 @@ fn test_transfer(skip_preflight: bool) { }; assert!(process_command(&config).is_err()); check_balance!( - 4 * LAMPORTS_PER_SOL - fee_one_sig, + sol_to_lamports(4.0) - fee_one_sig, &rpc_client, &sender_pubkey ); - check_balance!(LAMPORTS_PER_SOL, &rpc_client, &recipient_pubkey); + check_balance!(sol_to_lamports(1.0), &rpc_client, &recipient_pubkey); let mut offline = CliConfig::recent_for_tests(); offline.json_rpc_url = String::default(); @@ -123,13 +123,14 @@ fn test_transfer(skip_preflight: bool) { process_command(&offline).unwrap_err(); let offline_pubkey = offline.signers[0].pubkey(); - request_and_confirm_airdrop(&rpc_client, &offline, &offline_pubkey, LAMPORTS_PER_SOL).unwrap(); - check_balance!(LAMPORTS_PER_SOL, &rpc_client, &offline_pubkey); + request_and_confirm_airdrop(&rpc_client, &offline, &offline_pubkey, sol_to_lamports(1.0)) + .unwrap(); + check_balance!(sol_to_lamports(1.0), &rpc_client, &offline_pubkey); // Offline transfer let blockhash = rpc_client.get_latest_blockhash().unwrap(); offline.command = CliCommand::Transfer { - amount: SpendAmount::Some(LAMPORTS_PER_SOL / 2), + amount: SpendAmount::Some(sol_to_lamports(0.5)), to: recipient_pubkey, from: 0, sign_only: true, @@ -152,7 +153,7 @@ fn test_transfer(skip_preflight: bool) { let offline_presigner = sign_only.presigner_of(&offline_pubkey).unwrap(); config.signers = vec![&offline_presigner]; config.command = CliCommand::Transfer { - amount: SpendAmount::Some(LAMPORTS_PER_SOL / 2), + amount: SpendAmount::Some(sol_to_lamports(0.5)), to: recipient_pubkey, from: 0, sign_only: false, @@ -170,11 +171,11 @@ fn test_transfer(skip_preflight: bool) { }; process_command(&config).unwrap(); check_balance!( - LAMPORTS_PER_SOL / 2 - fee_one_sig, + sol_to_lamports(0.5) - fee_one_sig, &rpc_client, &offline_pubkey ); - check_balance!(1_500_000_000, &rpc_client, &recipient_pubkey); + check_balance!(sol_to_lamports(1.5), &rpc_client, &recipient_pubkey); // Create nonce account let nonce_account = keypair_from_seed(&[3u8; 32]).unwrap(); @@ -192,7 +193,7 @@ fn test_transfer(skip_preflight: bool) { }; process_command(&config).unwrap(); check_balance!( - 4 * LAMPORTS_PER_SOL - fee_one_sig - fee_two_sig - minimum_nonce_balance, + sol_to_lamports(4.0) - fee_one_sig - fee_two_sig - minimum_nonce_balance, &rpc_client, &sender_pubkey, ); @@ -210,7 +211,7 @@ fn test_transfer(skip_preflight: bool) { // Nonced transfer config.signers = vec![&default_signer]; config.command = CliCommand::Transfer { - amount: SpendAmount::Some(LAMPORTS_PER_SOL), + amount: SpendAmount::Some(sol_to_lamports(1.0)), to: recipient_pubkey, from: 0, sign_only: false, @@ -231,11 +232,11 @@ fn test_transfer(skip_preflight: bool) { }; process_command(&config).unwrap(); check_balance!( - 3 * LAMPORTS_PER_SOL - 2 * fee_one_sig - fee_two_sig - minimum_nonce_balance, + sol_to_lamports(3.0) - 2 * fee_one_sig - fee_two_sig - minimum_nonce_balance, &rpc_client, &sender_pubkey, ); - check_balance!(2_500_000_000, &rpc_client, &recipient_pubkey); + check_balance!(sol_to_lamports(2.5), &rpc_client, &recipient_pubkey); let new_nonce_hash = solana_rpc_client_nonce_utils::get_account_with_commitment( &rpc_client, &nonce_account.pubkey(), @@ -257,7 +258,7 @@ fn test_transfer(skip_preflight: bool) { }; process_command(&config).unwrap(); check_balance!( - 3 * LAMPORTS_PER_SOL - 3 * fee_one_sig - fee_two_sig - minimum_nonce_balance, + sol_to_lamports(3.0) - 3 * fee_one_sig - fee_two_sig - minimum_nonce_balance, &rpc_client, &sender_pubkey, ); @@ -275,7 +276,7 @@ fn test_transfer(skip_preflight: bool) { // Offline, nonced transfer offline.signers = vec![&default_offline_signer]; offline.command = CliCommand::Transfer { - amount: SpendAmount::Some(400_000_000), + amount: SpendAmount::Some(sol_to_lamports(0.4)), to: recipient_pubkey, from: 0, sign_only: true, @@ -297,7 +298,7 @@ fn test_transfer(skip_preflight: bool) { let offline_presigner = sign_only.presigner_of(&offline_pubkey).unwrap(); config.signers = vec![&offline_presigner]; config.command = CliCommand::Transfer { - amount: SpendAmount::Some(400_000_000), + amount: SpendAmount::Some(sol_to_lamports(0.4)), to: recipient_pubkey, from: 0, sign_only: false, @@ -318,11 +319,11 @@ fn test_transfer(skip_preflight: bool) { }; process_command(&config).unwrap(); check_balance!( - LAMPORTS_PER_SOL / 10 - 2 * fee_one_sig, + sol_to_lamports(0.1) - 2 * fee_one_sig, &rpc_client, &offline_pubkey ); - check_balance!(2_900_000_000, &rpc_client, &recipient_pubkey); + check_balance!(sol_to_lamports(2.9), &rpc_client, &recipient_pubkey); } #[test] @@ -352,23 +353,23 @@ fn test_transfer_multisession_signing() { &rpc_client, &CliConfig::recent_for_tests(), &offline_from_signer.pubkey(), - 43 * LAMPORTS_PER_SOL, + sol_to_lamports(43.0), ) .unwrap(); request_and_confirm_airdrop( &rpc_client, &CliConfig::recent_for_tests(), &offline_fee_payer_signer.pubkey(), - LAMPORTS_PER_SOL + 2 * fee_two_sig, + sol_to_lamports(1.0) + 2 * fee_two_sig, ) .unwrap(); check_balance!( - 43 * LAMPORTS_PER_SOL, + sol_to_lamports(43.0), &rpc_client, &offline_from_signer.pubkey(), ); check_balance!( - LAMPORTS_PER_SOL + 2 * fee_two_sig, + sol_to_lamports(1.0) + 2 * fee_two_sig, &rpc_client, &offline_fee_payer_signer.pubkey(), ); @@ -386,7 +387,7 @@ fn test_transfer_multisession_signing() { fee_payer_config.command = CliCommand::ClusterVersion; process_command(&fee_payer_config).unwrap_err(); fee_payer_config.command = CliCommand::Transfer { - amount: SpendAmount::Some(42 * LAMPORTS_PER_SOL), + amount: SpendAmount::Some(sol_to_lamports(42.0)), to: to_pubkey, from: 1, sign_only: true, @@ -418,7 +419,7 @@ fn test_transfer_multisession_signing() { from_config.command = CliCommand::ClusterVersion; process_command(&from_config).unwrap_err(); from_config.command = CliCommand::Transfer { - amount: SpendAmount::Some(42 * LAMPORTS_PER_SOL), + amount: SpendAmount::Some(sol_to_lamports(42.0)), to: to_pubkey, from: 1, sign_only: true, @@ -447,7 +448,7 @@ fn test_transfer_multisession_signing() { config.json_rpc_url = test_validator.rpc_url(); config.signers = vec![&fee_payer_presigner, &from_presigner]; config.command = CliCommand::Transfer { - amount: SpendAmount::Some(42 * LAMPORTS_PER_SOL), + amount: SpendAmount::Some(sol_to_lamports(42.0)), to: to_pubkey, from: 1, sign_only: false, @@ -465,13 +466,17 @@ fn test_transfer_multisession_signing() { }; process_command(&config).unwrap(); - check_balance!(LAMPORTS_PER_SOL, &rpc_client, &offline_from_signer.pubkey(),); check_balance!( - LAMPORTS_PER_SOL + fee_two_sig, + sol_to_lamports(1.0), + &rpc_client, + &offline_from_signer.pubkey(), + ); + check_balance!( + sol_to_lamports(1.0) + fee_two_sig, &rpc_client, &offline_fee_payer_signer.pubkey(), ); - check_balance!(42 * LAMPORTS_PER_SOL, &rpc_client, &to_pubkey); + check_balance!(sol_to_lamports(42.0), &rpc_client, &to_pubkey); } #[test_case(None; "default")] @@ -642,18 +647,19 @@ fn test_transfer_with_seed() { ) .unwrap(); - request_and_confirm_airdrop(&rpc_client, &config, &sender_pubkey, LAMPORTS_PER_SOL).unwrap(); - request_and_confirm_airdrop(&rpc_client, &config, &derived_address, 5 * LAMPORTS_PER_SOL) + request_and_confirm_airdrop(&rpc_client, &config, &sender_pubkey, sol_to_lamports(1.0)) + .unwrap(); + request_and_confirm_airdrop(&rpc_client, &config, &derived_address, sol_to_lamports(5.0)) .unwrap(); - check_balance!(LAMPORTS_PER_SOL, &rpc_client, &sender_pubkey); - check_balance!(5 * LAMPORTS_PER_SOL, &rpc_client, &derived_address); + check_balance!(sol_to_lamports(1.0), &rpc_client, &sender_pubkey); + check_balance!(sol_to_lamports(5.0), &rpc_client, &derived_address); check_balance!(0, &rpc_client, &recipient_pubkey); check_ready(&rpc_client); // Transfer with seed config.command = CliCommand::Transfer { - amount: SpendAmount::Some(5 * LAMPORTS_PER_SOL), + amount: SpendAmount::Some(sol_to_lamports(5.0)), to: recipient_pubkey, from: 0, sign_only: false, @@ -670,7 +676,7 @@ fn test_transfer_with_seed() { compute_unit_price: None, }; process_command(&config).unwrap(); - check_balance!(LAMPORTS_PER_SOL - fee, &rpc_client, &sender_pubkey); - check_balance!(5 * LAMPORTS_PER_SOL, &rpc_client, &recipient_pubkey); + check_balance!(sol_to_lamports(1.0) - fee, &rpc_client, &sender_pubkey); + check_balance!(sol_to_lamports(5.0), &rpc_client, &recipient_pubkey); check_balance!(0, &rpc_client, &derived_address); } diff --git a/cli/tests/vote.rs b/cli/tests/vote.rs index fb87889f80718c..c490be1a5fb2c2 100644 --- a/cli/tests/vote.rs +++ b/cli/tests/vote.rs @@ -64,7 +64,7 @@ fn test_vote_authorize_and_withdraw(compute_unit_price: Option) { .get_account(&vote_account_keypair.pubkey()) .unwrap(); let vote_state: VoteStateVersions = vote_account.state().unwrap(); - let authorized_withdrawer = vote_state.convert_to_v3().authorized_withdrawer; + let authorized_withdrawer = vote_state.convert_to_current().authorized_withdrawer; assert_eq!(authorized_withdrawer, config.signers[0].pubkey()); let expected_balance = rpc_client .get_minimum_balance_for_rent_exemption(VoteStateV3::size_of()) @@ -118,7 +118,7 @@ fn test_vote_authorize_and_withdraw(compute_unit_price: Option) { .get_account(&vote_account_keypair.pubkey()) .unwrap(); let vote_state: VoteStateVersions = vote_account.state().unwrap(); - let authorized_withdrawer = vote_state.convert_to_v3().authorized_withdrawer; + let authorized_withdrawer = vote_state.convert_to_current().authorized_withdrawer; assert_eq!(authorized_withdrawer, first_withdraw_authority.pubkey()); // Authorize vote account withdrawal to another signer with checked instruction @@ -165,7 +165,7 @@ fn test_vote_authorize_and_withdraw(compute_unit_price: Option) { .get_account(&vote_account_keypair.pubkey()) .unwrap(); let vote_state: VoteStateVersions = vote_account.state().unwrap(); - let authorized_withdrawer = vote_state.convert_to_v3().authorized_withdrawer; + let authorized_withdrawer = vote_state.convert_to_current().authorized_withdrawer; assert_eq!(authorized_withdrawer, withdraw_authority.pubkey()); // Withdraw from vote account @@ -292,7 +292,7 @@ fn test_offline_vote_authorize_and_withdraw(compute_unit_price: Option) { .get_account(&vote_account_keypair.pubkey()) .unwrap(); let vote_state: VoteStateVersions = vote_account.state().unwrap(); - let authorized_withdrawer = vote_state.convert_to_v3().authorized_withdrawer; + let authorized_withdrawer = vote_state.convert_to_current().authorized_withdrawer; assert_eq!(authorized_withdrawer, offline_keypair.pubkey()); let expected_balance = rpc_client .get_minimum_balance_for_rent_exemption(VoteStateV3::size_of()) @@ -369,7 +369,7 @@ fn test_offline_vote_authorize_and_withdraw(compute_unit_price: Option) { .get_account(&vote_account_keypair.pubkey()) .unwrap(); let vote_state: VoteStateVersions = vote_account.state().unwrap(); - let authorized_withdrawer = vote_state.convert_to_v3().authorized_withdrawer; + let authorized_withdrawer = vote_state.convert_to_current().authorized_withdrawer; assert_eq!(authorized_withdrawer, withdraw_authority.pubkey()); // Withdraw from vote account offline diff --git a/client-test/tests/client.rs b/client-test/tests/client.rs index eac55d7f60e60a..8d8e938abc8405 100644 --- a/client-test/tests/client.rs +++ b/client-test/tests/client.rs @@ -5,7 +5,7 @@ use { solana_commitment_config::{CommitmentConfig, CommitmentLevel}, solana_keypair::Keypair, solana_ledger::{blockstore::Blockstore, get_tmp_ledger_path_auto_delete}, - solana_native_token::LAMPORTS_PER_SOL, + solana_native_token::sol_to_lamports, solana_pubkey::Pubkey, solana_pubsub_client::{nonblocking, pubsub_client::PubsubClient}, solana_rpc::{ @@ -80,7 +80,7 @@ fn test_rpc_client() { let blockhash = client.get_latest_blockhash().unwrap(); - let tx = system_transaction::transfer(&alice, &bob_pubkey, 20 * LAMPORTS_PER_SOL, blockhash); + let tx = system_transaction::transfer(&alice, &bob_pubkey, sol_to_lamports(20.0), blockhash); let signature = client.send_transaction(&tx).unwrap(); let mut confirmed_tx = false; @@ -106,14 +106,14 @@ fn test_rpc_client() { .get_balance_with_commitment(&bob_pubkey, CommitmentConfig::processed()) .unwrap() .value, - 20 * LAMPORTS_PER_SOL + sol_to_lamports(20.0) ); assert_eq!( client .get_balance_with_commitment(&alice.pubkey(), CommitmentConfig::processed()) .unwrap() .value, - original_alice_balance - 20 * LAMPORTS_PER_SOL + original_alice_balance - sol_to_lamports(20.0) ); } diff --git a/client-test/tests/send_and_confirm_transactions_in_parallel.rs b/client-test/tests/send_and_confirm_transactions_in_parallel.rs index 839041ff119a15..570007acc47809 100644 --- a/client-test/tests/send_and_confirm_transactions_in_parallel.rs +++ b/client-test/tests/send_and_confirm_transactions_in_parallel.rs @@ -9,7 +9,7 @@ use { solana_commitment_config::CommitmentConfig, solana_keypair::Keypair, solana_message::Message, - solana_native_token::LAMPORTS_PER_SOL, + solana_native_token::sol_to_lamports, solana_pubkey::Pubkey, solana_rpc_client::rpc_client::RpcClient, solana_signer::Signer, @@ -21,15 +21,15 @@ use { const NUM_TRANSACTIONS: usize = 1000; -fn create_messages(from: Pubkey, to: Pubkey) -> (Vec, u64) { +fn create_messages(from: Pubkey, to: Pubkey) -> (Vec, f64) { let mut messages = vec![]; - let mut sum = 0u64; + let mut sum = 0.0; for i in 1..NUM_TRANSACTIONS { - let amount_to_transfer = (i as u64).checked_mul(LAMPORTS_PER_SOL).unwrap(); - let ix = system_instruction::transfer(&from, &to, amount_to_transfer); + let amount_to_transfer = i as f64; + let ix = system_instruction::transfer(&from, &to, sol_to_lamports(amount_to_transfer)); let message = Message::new(&[ix], Some(&from)); messages.push(message); - sum = sum.checked_add(amount_to_transfer).unwrap(); + sum += amount_to_transfer; } (messages, sum) } @@ -80,14 +80,14 @@ fn test_send_and_confirm_transactions_in_parallel_without_tpu_client() { .get_balance_with_commitment(&bob_pubkey, CommitmentConfig::processed()) .unwrap() .value, - sum + sol_to_lamports(sum) ); assert_eq!( rpc_client .get_balance_with_commitment(&alice_pubkey, CommitmentConfig::processed()) .unwrap() .value, - original_alice_balance - sum + original_alice_balance - sol_to_lamports(sum) ); } @@ -145,13 +145,13 @@ fn test_send_and_confirm_transactions_in_parallel_with_tpu_client() { .get_balance_with_commitment(&bob_pubkey, CommitmentConfig::processed()) .unwrap() .value, - sum + sol_to_lamports(sum) ); assert_eq!( rpc_client .get_balance_with_commitment(&alice_pubkey, CommitmentConfig::processed()) .unwrap() .value, - original_alice_balance - sum + original_alice_balance - sol_to_lamports(sum) ); } diff --git a/core/Cargo.toml b/core/Cargo.toml index 0c73df28854758..09e650e806fc8e 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -89,7 +89,6 @@ solana-bloom = { workspace = true } solana-builtins-default-costs = { workspace = true } solana-client = { workspace = true } solana-clock = { workspace = true } -solana-cluster-type = { workspace = true } solana-compute-budget = { workspace = true } solana-compute-budget-instruction = { workspace = true } solana-compute-budget-interface = { workspace = true } diff --git a/core/src/banking_stage/consumer.rs b/core/src/banking_stage/consumer.rs index 72f3dc32946ae5..1f9959c0662790 100644 --- a/core/src/banking_stage/consumer.rs +++ b/core/src/banking_stage/consumer.rs @@ -1560,7 +1560,7 @@ mod tests { mut genesis_config, mint_keypair, .. - } = create_slow_genesis_config(solana_native_token::LAMPORTS_PER_SOL * 1000); + } = create_slow_genesis_config(solana_native_token::sol_to_lamports(1000.0)); genesis_config.rent.lamports_per_byte_year = 50; genesis_config.rent.exemption_threshold = 2.0; let (bank, _bank_forks) = Bank::new_no_wallclock_throttle_for_tests(&genesis_config); diff --git a/core/src/banking_stage/immutable_deserialized_packet.rs b/core/src/banking_stage/immutable_deserialized_packet.rs index 7e2b5c7c8e87a5..b6db7fcae50071 100644 --- a/core/src/banking_stage/immutable_deserialized_packet.rs +++ b/core/src/banking_stage/immutable_deserialized_packet.rs @@ -4,7 +4,7 @@ use { solana_compute_budget::compute_budget_limits::ComputeBudgetLimits, solana_compute_budget_instruction::instructions_processor::process_compute_budget_instructions, solana_hash::Hash, - solana_message::{v0::LoadedAddresses, Message, SimpleAddressLoader}, + solana_message::{v0::LoadedAddresses, AddressLoaderError, Message, SimpleAddressLoader}, solana_perf::packet::PacketRef, solana_pubkey::Pubkey, solana_runtime::bank::Bank, @@ -19,7 +19,6 @@ use { sanitized::{MessageHash, SanitizedTransaction}, versioned::{sanitized::SanitizedVersionedTransaction, VersionedTransaction}, }, - solana_transaction_error::AddressLoaderError, std::{cmp::Ordering, collections::HashSet, mem::size_of}, thiserror::Error, }; diff --git a/core/src/commitment_service.rs b/core/src/commitment_service.rs index c6f59efa6181c8..ec55bfaae15539 100644 --- a/core/src/commitment_service.rs +++ b/core/src/commitment_service.rs @@ -467,7 +467,7 @@ mod tests { process_slot_vote_unchecked(&mut vote_state1, 3); process_slot_vote_unchecked(&mut vote_state1, 5); if !with_node_vote_state { - let versioned = VoteStateVersions::new_v3(vote_state1.clone()); + let versioned = VoteStateVersions::new_current(vote_state1.clone()); vote_state::to(&versioned, &mut vote_account1).unwrap(); bank.store_account(&pk1, &vote_account1); } @@ -475,19 +475,19 @@ mod tests { let mut vote_state2 = vote_state::from(&vote_account2).unwrap(); process_slot_vote_unchecked(&mut vote_state2, 9); process_slot_vote_unchecked(&mut vote_state2, 10); - let versioned = VoteStateVersions::new_v3(vote_state2); + let versioned = VoteStateVersions::new_current(vote_state2); vote_state::to(&versioned, &mut vote_account2).unwrap(); bank.store_account(&pk2, &vote_account2); let mut vote_state3 = vote_state::from(&vote_account3).unwrap(); vote_state3.root_slot = Some(1); - let versioned = VoteStateVersions::new_v3(vote_state3); + let versioned = VoteStateVersions::new_current(vote_state3); vote_state::to(&versioned, &mut vote_account3).unwrap(); bank.store_account(&pk3, &vote_account3); let mut vote_state4 = vote_state::from(&vote_account4).unwrap(); vote_state4.root_slot = Some(2); - let versioned = VoteStateVersions::new_v3(vote_state4); + let versioned = VoteStateVersions::new_current(vote_state4); vote_state::to(&versioned, &mut vote_account4).unwrap(); bank.store_account(&pk4, &vote_account4); diff --git a/core/src/consensus.rs b/core/src/consensus.rs index 1bf1b964a72220..4b185f0de31471 100644 --- a/core/src/consensus.rs +++ b/core/src/consensus.rs @@ -1788,7 +1788,7 @@ pub mod test { solana_slot_history::SlotHistory, solana_vote::vote_account::VoteAccount, solana_vote_program::vote_state::{ - process_slot_vote_unchecked, Vote, VoteStateV3, VoteStateVersions, MAX_LOCKOUT_HISTORY, + process_slot_vote_unchecked, Vote, VoteState, VoteStateVersions, MAX_LOCKOUT_HISTORY, }, std::{ collections::{HashMap, VecDeque}, @@ -1806,17 +1806,17 @@ pub mod test { .iter() .map(|(lamports, votes)| { let mut account = AccountSharedData::from(Account { - data: vec![0; VoteStateV3::size_of()], + data: vec![0; VoteState::size_of()], lamports: *lamports, owner: solana_vote_program::id(), ..Account::default() }); - let mut vote_state = VoteStateV3::default(); + let mut vote_state = VoteState::default(); for slot in *votes { process_slot_vote_unchecked(&mut vote_state, *slot); } - VoteStateV3::serialize( - &VoteStateVersions::new_v3(vote_state), + VoteState::serialize( + &VoteStateVersions::new_current(vote_state), account.data_as_mut_slice(), ) .expect("serialize state"); diff --git a/core/src/consensus/tower1_14_11.rs b/core/src/consensus/tower1_14_11.rs index d3cfc93ea8ab90..522c3660215d06 100644 --- a/core/src/consensus/tower1_14_11.rs +++ b/core/src/consensus/tower1_14_11.rs @@ -9,7 +9,7 @@ use { #[cfg_attr( feature = "frozen-abi", derive(AbiExample), - frozen_abi(digest = "71y495cpyaY6VjW4s47PGkpP4eZwQW4EVCmQ1gNERxJk") + frozen_abi(digest = "3MECXPvR1Tq3jRJkS1kCDuXDjqjgAkctaQ2avYnwKGE7") )] #[derive(Clone, Serialize, Deserialize, Debug, PartialEq)] pub struct Tower1_14_11 { diff --git a/core/src/consensus/tower1_7_14.rs b/core/src/consensus/tower1_7_14.rs index 51266687683431..6be66ff74d57ee 100644 --- a/core/src/consensus/tower1_7_14.rs +++ b/core/src/consensus/tower1_7_14.rs @@ -10,7 +10,7 @@ use { #[cfg_attr( feature = "frozen-abi", derive(AbiExample), - frozen_abi(digest = "FJeuD6UBJe9D8s6iWwianu6KcnJxSozHxDpPQMTrkNJK") + frozen_abi(digest = "FCocsqtauW2QfMz2hXDd5DCwJBw9NBFoq3CokeiDLMqv") )] #[derive(Clone, Serialize, Deserialize, Debug, PartialEq)] pub struct Tower1_7_14 { diff --git a/core/src/consensus/tower_storage.rs b/core/src/consensus/tower_storage.rs index f6ccabafe7aba6..534ce829241f8b 100644 --- a/core/src/consensus/tower_storage.rs +++ b/core/src/consensus/tower_storage.rs @@ -380,7 +380,7 @@ pub mod test { solana_keypair::Keypair, solana_vote::vote_transaction::VoteTransaction, solana_vote_program::vote_state::{ - BlockTimestamp, LandedVote, Vote, VoteState1_14_11, VoteStateV3, MAX_LOCKOUT_HISTORY, + BlockTimestamp, LandedVote, Vote, VoteState, VoteState1_14_11, MAX_LOCKOUT_HISTORY, }, tempfile::TempDir, }; @@ -390,7 +390,7 @@ pub mod test { let tower_path = TempDir::new().unwrap(); let identity_keypair = Keypair::new(); let node_pubkey = identity_keypair.pubkey(); - let mut vote_state = VoteStateV3::default(); + let mut vote_state = VoteState::default(); vote_state .votes .resize(MAX_LOCKOUT_HISTORY, LandedVote::default()); diff --git a/core/src/repair/ancestor_hashes_service.rs b/core/src/repair/ancestor_hashes_service.rs index b6e7cf08fccc13..340bc33db18db7 100644 --- a/core/src/repair/ancestor_hashes_service.rs +++ b/core/src/repair/ancestor_hashes_service.rs @@ -20,7 +20,7 @@ use { crossbeam_channel::{unbounded, Receiver, RecvTimeoutError, Sender}, dashmap::{mapref::entry::Entry::Occupied, DashMap}, solana_clock::{Slot, DEFAULT_MS_PER_SLOT}, - solana_cluster_type::ClusterType, + solana_genesis_config::ClusterType, solana_gossip::{cluster_info::ClusterInfo, contact_info::Protocol, ping_pong::Pong}, solana_keypair::{signable::Signable, Keypair}, solana_ledger::blockstore::Blockstore, diff --git a/core/src/repair/serve_repair.rs b/core/src/repair/serve_repair.rs index 1d4bb309fa8a3e..06e71cb7e05c5e 100644 --- a/core/src/repair/serve_repair.rs +++ b/core/src/repair/serve_repair.rs @@ -25,7 +25,7 @@ use { Rng, }, solana_clock::Slot, - solana_cluster_type::ClusterType, + solana_genesis_config::ClusterType, solana_gossip::{ cluster_info::{ClusterInfo, ClusterInfoError}, contact_info::{ContactInfo, Protocol}, @@ -229,7 +229,7 @@ type PingCache = ping_pong::PingCache; #[cfg_attr( feature = "frozen-abi", derive(AbiEnumVisitor, AbiExample), - frozen_abi(digest = "FGw38CCo7vg24qxe7TfGP11WdX2poe6T55BGN1r3XMFA") + frozen_abi(digest = "9KN64WUT7XDYj9zZopS1hztGyAP9y4N4QznsyC4mqsGs") )] #[derive(Debug, Deserialize, Serialize)] pub enum RepairProtocol { diff --git a/core/src/replay_stage.rs b/core/src/replay_stage.rs index b98ea519ca19ab..dab1b4390d187c 100644 --- a/core/src/replay_stage.rs +++ b/core/src/replay_stage.rs @@ -5155,7 +5155,7 @@ pub(crate) mod tests { let mut leader_vote_account = bank.get_account(pubkey).unwrap(); let mut vote_state = vote_state::from(&leader_vote_account).unwrap(); vote_state::process_slot_vote_unchecked(&mut vote_state, vote_slot); - let versioned = VoteStateVersions::new_v3(vote_state.clone()); + let versioned = VoteStateVersions::new_current(vote_state.clone()); vote_state::to(&versioned, &mut leader_vote_account).unwrap(); bank.store_account(pubkey, &leader_vote_account); (*pubkey, TowerVoteState::from(vote_state)) @@ -5285,7 +5285,7 @@ pub(crate) mod tests { mut genesis_config, mint_keypair, .. - } = create_genesis_config(solana_native_token::LAMPORTS_PER_SOL * 1000); + } = create_genesis_config(solana_native_token::sol_to_lamports(1000.0)); genesis_config.rent.lamports_per_byte_year = 50; genesis_config.rent.exemption_threshold = 2.0; let (ledger_path, _) = create_new_tmp_ledger!(&genesis_config); diff --git a/core/src/validator.rs b/core/src/validator.rs index 17a92155984cc7..0ca0fb07b89ea0 100644 --- a/core/src/validator.rs +++ b/core/src/validator.rs @@ -41,10 +41,9 @@ use { }, solana_client::connection_cache::{ConnectionCache, Protocol}, solana_clock::Slot, - solana_cluster_type::ClusterType, solana_entry::poh::compute_hash_time, solana_epoch_schedule::MAX_LEADER_SCHEDULE_EPOCH_OFFSET, - solana_genesis_config::GenesisConfig, + solana_genesis_config::{ClusterType, GenesisConfig}, solana_geyser_plugin_manager::{ geyser_plugin_service::GeyserPluginService, GeyserPluginManagerRequest, }, diff --git a/core/tests/scheduler_cost_adjustment.rs b/core/tests/scheduler_cost_adjustment.rs index 89021eea519e77..55435c92ecd1b4 100644 --- a/core/tests/scheduler_cost_adjustment.rs +++ b/core/tests/scheduler_cost_adjustment.rs @@ -10,7 +10,7 @@ use { solana_keypair::Keypair, solana_loader_v3_interface::state::UpgradeableLoaderState, solana_message::Message, - solana_native_token::LAMPORTS_PER_SOL, + solana_native_token::sol_to_lamports, solana_pubkey::Pubkey, solana_rent::Rent, solana_runtime::{bank::Bank, bank_forks::BankForks}, @@ -58,7 +58,7 @@ struct TestSetup { impl TestSetup { fn new() -> Self { - let (mut genesis_config, mint_keypair) = create_genesis_config(LAMPORTS_PER_SOL); + let (mut genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1.)); genesis_config.rent = Rent::default(); Self { genesis_config, diff --git a/faucet/Cargo.toml b/faucet/Cargo.toml index 62b2e1df850c0e..628f96fbae7231 100644 --- a/faucet/Cargo.toml +++ b/faucet/Cargo.toml @@ -29,20 +29,20 @@ serde = { workspace = true } serde_derive = { workspace = true } solana-clap-utils = { workspace = true } solana-cli-config = { workspace = true } -solana-cli-output = { workspace = true } -solana-hash = "=3.0.0" -solana-instruction = "=3.0.0" -solana-keypair = "=3.0.0" +solana-hash = "=2.3.0" +solana-instruction = "=2.3.0" +solana-keypair = "=2.2.1" solana-logger = "=3.0.0" -solana-message = "=3.0.0" +solana-message = "=2.4.0" solana-metrics = { workspace = true } -solana-packet = "=3.0.0" -solana-pubkey = { version = "=3.0.0", features = ["rand"] } -solana-signer = "=3.0.0" -solana-system-interface = "=2.0" -solana-system-transaction = "=3.0.0" -solana-transaction = "=3.0.0" +solana-native-token = "=2.2.2" +solana-packet = "=2.2.1" +solana-pubkey = { version = "=2.4.0", features = ["rand"] } +solana-signer = "=2.2.1" +solana-system-interface = "=1.0" +solana-system-transaction = "=2.2.1" +solana-transaction = "=2.2.3" solana-version = { workspace = true } -spl-memo-interface = { version = "=2.0.0" } +spl-memo-interface = { version = "=1.0.0" } thiserror = { workspace = true } tokio = { workspace = true, features = ["full"] } diff --git a/faucet/src/faucet.rs b/faucet/src/faucet.rs index 62360b22ae98b6..86a36e5624433a 100644 --- a/faucet/src/faucet.rs +++ b/faucet/src/faucet.rs @@ -9,12 +9,12 @@ use { crossbeam_channel::{unbounded, Sender}, log::*, serde_derive::{Deserialize, Serialize}, - solana_cli_output::display::build_balance_message, solana_hash::Hash, solana_instruction::Instruction, solana_keypair::Keypair, solana_message::Message, solana_metrics::datapoint_info, + solana_native_token::lamports_to_sol, solana_packet::PACKET_DATA_SIZE, solana_pubkey::Pubkey, solana_signer::Signer, @@ -67,10 +67,10 @@ pub enum FaucetError { NoDataReceived, #[error("request too large; req: â—Ž{0}, cap: â—Ž{1}")] - PerRequestCapExceeded(String, String), + PerRequestCapExceeded(f64, f64), #[error("limit reached; req: â—Ž{0}, to: {1}, current: â—Ž{2}, cap: â—Ž{3}")] - PerTimeCapExceeded(String, String, String, String), + PerTimeCapExceeded(f64, String, f64, f64), } #[derive(Serialize, Deserialize, Debug, Clone, Copy)] @@ -126,8 +126,8 @@ impl Faucet { warn!( "per_time_cap {} SOL < per_request_cap {} SOL; \ maximum single requests will fail", - build_balance_message(per_time_cap, false, false), - build_balance_message(per_request_cap, false, false), + lamports_to_sol(per_time_cap), + lamports_to_sol(per_request_cap), ); } } @@ -152,10 +152,10 @@ impl Faucet { if let Some(cap) = self.per_time_cap { if new_total > cap { return Err(FaucetError::PerTimeCapExceeded( - build_balance_message(request_amount, false, false), + lamports_to_sol(request_amount), to.to_string(), - build_balance_message(new_total, false, false), - build_balance_message(cap, false, false), + lamports_to_sol(new_total), + lamports_to_sol(cap), )); } } @@ -186,7 +186,7 @@ impl Faucet { let mint_pubkey = self.faucet_keypair.pubkey(); info!( "Requesting airdrop of {} SOL to {:?}", - build_balance_message(lamports, false, false), + lamports_to_sol(lamports), to ); @@ -195,8 +195,8 @@ impl Faucet { let memo = format!( "{}", FaucetError::PerRequestCapExceeded( - build_balance_message(lamports, false, false), - build_balance_message(cap, false, false), + lamports_to_sol(lamports), + lamports_to_sol(cap), ) ); let memo_instruction = Instruction { diff --git a/genesis/Cargo.toml b/genesis/Cargo.toml index 38503b573bbb66..5fa8aac76d742e 100644 --- a/genesis/Cargo.toml +++ b/genesis/Cargo.toml @@ -28,35 +28,34 @@ itertools = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } serde_yaml = { workspace = true } -solana-account = "=3.0.0" +solana-account = "=2.2.1" solana-accounts-db = { workspace = true } solana-clap-utils = { workspace = true } solana-cli-config = { workspace = true } -solana-clock = "=3.0.0" -solana-cluster-type = "=3.0.0" -solana-commitment-config = "=3.0.0" +solana-clock = "=2.2.2" +solana-commitment-config = "=2.2.1" solana-entry = { workspace = true } -solana-epoch-schedule = "=3.0.0" -solana-feature-gate-interface = "=3.0.0" -solana-fee-calculator = "=3.0.0" -solana-genesis-config = "=3.0.0" -solana-inflation = "=3.0.0" -solana-keypair = "=3.0.0" +solana-epoch-schedule = "=2.2.1" +solana-feature-gate-interface = "=2.2.2" +solana-fee-calculator = "=2.2.1" +solana-genesis-config = "=2.3.0" +solana-inflation = "=2.2.1" +solana-keypair = "=2.2.1" solana-ledger = { workspace = true } -solana-loader-v3-interface = "6.1.0" +solana-loader-v3-interface = "5.0.0" solana-logger = "=3.0.0" -solana-native-token = "=3.0.0" -solana-poh-config = "=3.0.0" -solana-pubkey = { version = "=3.0.0", default-features = false } -solana-rent = "=3.0.0" +solana-native-token = "=2.2.2" +solana-poh-config = "=2.2.1" +solana-pubkey = { version = "=2.4.0", default-features = false } +solana-rent = "=2.2.1" solana-rpc-client = { workspace = true } solana-rpc-client-api = { workspace = true } solana-runtime = { workspace = true } -solana-sdk-ids = "=3.0.0" -solana-signer = "=3.0.0" -solana-stake-interface = { version = "=2.0.0", features = ["borsh"] } +solana-sdk-ids = "=2.2.1" +solana-signer = "=2.2.1" +solana-stake-interface = "=1.2.1" solana-stake-program = { workspace = true } -solana-time-utils = "3.0.0" +solana-time-utils = "2.2.1" solana-version = { workspace = true } solana-vote-program = { workspace = true } tempfile = { workspace = true } diff --git a/genesis/src/genesis_accounts.rs b/genesis/src/genesis_accounts.rs index 2fe4ffe9665fbd..d34247c71c0ab4 100644 --- a/genesis/src/genesis_accounts.rs +++ b/genesis/src/genesis_accounts.rs @@ -3,8 +3,7 @@ use { stakes::{create_and_add_stakes, StakerInfo}, unlocks::UnlockInfo, }, - solana_cluster_type::ClusterType, - solana_genesis_config::GenesisConfig, + solana_genesis_config::{ClusterType, GenesisConfig}, solana_native_token::LAMPORTS_PER_SOL, }; diff --git a/genesis/src/main.rs b/genesis/src/main.rs index cdf6e30919229b..fc891f4b71b82a 100644 --- a/genesis/src/main.rs +++ b/genesis/src/main.rs @@ -18,7 +18,6 @@ use { }, }, solana_clock as clock, - solana_cluster_type::ClusterType, solana_commitment_config::CommitmentConfig, solana_entry::poh::compute_hashes_per_tick, solana_epoch_schedule::EpochSchedule, @@ -28,12 +27,12 @@ use { genesis_accounts::add_genesis_accounts, Base64Account, StakedValidatorAccountInfo, ValidatorAccountsFile, }, - solana_genesis_config::GenesisConfig, + solana_genesis_config::{ClusterType, GenesisConfig}, solana_inflation::Inflation, solana_keypair::{read_keypair_file, Keypair}, solana_ledger::{blockstore::create_new_ledger, blockstore_options::LedgerColumnOptions}, solana_loader_v3_interface::state::UpgradeableLoaderState, - solana_native_token::LAMPORTS_PER_SOL, + solana_native_token::sol_to_lamports, solana_poh_config::PohConfig, solana_pubkey::Pubkey, solana_rent::Rent, @@ -66,7 +65,7 @@ fn pubkey_from_str(key_str: &str) -> Result> { Pubkey::from_str(key_str).or_else(|_| { let bytes: Vec = serde_json::from_str(key_str)?; let keypair = - Keypair::try_from(bytes.as_ref()).map_err(|e| std::io::Error::other(e.to_string()))?; + Keypair::from_bytes(&bytes).map_err(|e| std::io::Error::other(e.to_string()))?; Ok(keypair.pubkey()) }) } @@ -314,11 +313,11 @@ fn main() -> Result<(), Box> { }; // vote account - let default_bootstrap_validator_lamports = &(500 * LAMPORTS_PER_SOL) + let default_bootstrap_validator_lamports = &sol_to_lamports(500.0) .max(VoteStateV3::get_rent_exempt_reserve(&rent)) .to_string(); // stake account - let default_bootstrap_validator_stake_lamports = &(LAMPORTS_PER_SOL / 2) + let default_bootstrap_validator_stake_lamports = &sol_to_lamports(0.5) .max(rent.minimum_balance(StakeStateV2::size_of())) .to_string(); diff --git a/gossip/Cargo.toml b/gossip/Cargo.toml index 4cd64d1ed7907f..54f62d40b52ea4 100644 --- a/gossip/Cargo.toml +++ b/gossip/Cargo.toml @@ -61,43 +61,43 @@ solana-account = { workspace = true } solana-bloom = { workspace = true } solana-clap-utils = { workspace = true } solana-client = { workspace = true } -solana-clock = "=3.0.0" -solana-cluster-type = "=3.0.0" +solana-clock = "=2.2.2" solana-connection-cache = { workspace = true } solana-entry = { workspace = true } -solana-epoch-schedule = "=3.0.0" -solana-frozen-abi = { version = "=3.0.0", optional = true, features = [ +solana-epoch-schedule = "=2.2.1" +solana-frozen-abi = { version = "=2.3.0", optional = true, features = [ "frozen-abi", ] } solana-frozen-abi-macro = { version = "=3.0.0", optional = true, features = [ "frozen-abi", ] } -solana-hash = "=3.0.0" -solana-keypair = "=3.0.0" +solana-genesis-config = { workspace = true } +solana-hash = "=2.3.0" +solana-keypair = "=2.2.1" solana-ledger = { workspace = true, features = ["agave-unstable-api"] } solana-logger = "=3.0.0" solana-low-pass-filter = { workspace = true, features = ["agave-unstable-api"] } solana-measure = { workspace = true } solana-metrics = { workspace = true } -solana-native-token = "=3.0.0" +solana-native-token = "=2.2.2" solana-net-utils = { workspace = true } -solana-packet = "=3.0.0" +solana-packet = "=2.2.1" solana-perf = { workspace = true } -solana-pubkey = { version = "=3.0.0", features = ["rand"] } -solana-quic-definitions = "=3.0.0" +solana-pubkey = { version = "=2.4.0", features = ["rand"] } +solana-quic-definitions = "=2.3.0" solana-rayon-threadlimit = { workspace = true } solana-rpc-client = { workspace = true } solana-runtime = { workspace = true } -solana-sanitize = "=3.0.0" -solana-serde-varint = "=3.0.0" -solana-sha256-hasher = "=3.0.0" -solana-short-vec = "=3.0.0" -solana-signature = { version = "=3.1.0", default-features = false } -solana-signer = "=3.0.0" +solana-sanitize = "=2.2.1" +solana-serde-varint = "=2.2.2" +solana-sha256-hasher = "=2.3.0" +solana-short-vec = "=2.2.1" +solana-signature = { version = "=2.3.0", default-features = false } +solana-signer = "=2.2.1" solana-streamer = { workspace = true } -solana-time-utils = "=3.0.0" +solana-time-utils = "=2.2.1" solana-tpu-client = { workspace = true } -solana-transaction = "=3.0.0" +solana-transaction = "=2.2.3" solana-version = { workspace = true } solana-vote = { workspace = true } solana-vote-program = { workspace = true } @@ -115,7 +115,7 @@ serial_test = { workspace = true } solana-net-utils = { workspace = true, features = ["dev-context-only-utils"] } solana-perf = { workspace = true, features = ["dev-context-only-utils"] } solana-runtime = { workspace = true, features = ["dev-context-only-utils"] } -solana-signature = { version = "=3.1.0", features = ["rand"] } +solana-signature = { version = "=2.3.0", features = ["rand"] } solana-system-transaction = { workspace = true } solana-vote-interface = { workspace = true } static_assertions = { workspace = true } diff --git a/gossip/src/cluster_info.rs b/gossip/src/cluster_info.rs index 64e797ff44cb2b..99b73271b28e16 100644 --- a/gossip/src/cluster_info.rs +++ b/gossip/src/cluster_info.rs @@ -3762,27 +3762,21 @@ mod tests { fn test_contact_trace() { solana_logger::setup(); let keypair43 = Arc::new( - Keypair::try_from( - [ - 198, 203, 8, 178, 196, 71, 119, 152, 31, 96, 221, 142, 115, 224, 45, 34, 173, - 138, 254, 39, 181, 238, 168, 70, 183, 47, 210, 91, 221, 179, 237, 153, 14, 58, - 154, 59, 67, 220, 235, 106, 241, 99, 4, 72, 60, 245, 53, 30, 225, 122, 145, - 225, 8, 40, 30, 174, 26, 228, 125, 127, 125, 21, 96, 28, - ] - .as_ref(), - ) + Keypair::from_bytes(&[ + 198, 203, 8, 178, 196, 71, 119, 152, 31, 96, 221, 142, 115, 224, 45, 34, 173, 138, + 254, 39, 181, 238, 168, 70, 183, 47, 210, 91, 221, 179, 237, 153, 14, 58, 154, 59, + 67, 220, 235, 106, 241, 99, 4, 72, 60, 245, 53, 30, 225, 122, 145, 225, 8, 40, 30, + 174, 26, 228, 125, 127, 125, 21, 96, 28, + ]) .unwrap(), ); let keypair44 = Arc::new( - Keypair::try_from( - [ - 66, 88, 3, 70, 228, 215, 125, 64, 130, 183, 180, 98, 22, 166, 201, 234, 89, 80, - 135, 24, 228, 35, 20, 52, 105, 130, 50, 51, 46, 229, 244, 108, 70, 57, 45, 247, - 57, 177, 39, 126, 190, 238, 50, 96, 186, 208, 28, 168, 148, 56, 9, 106, 92, - 213, 63, 205, 252, 225, 244, 101, 77, 182, 4, 2, - ] - .as_ref(), - ) + Keypair::from_bytes(&[ + 66, 88, 3, 70, 228, 215, 125, 64, 130, 183, 180, 98, 22, 166, 201, 234, 89, 80, + 135, 24, 228, 35, 20, 52, 105, 130, 50, 51, 46, 229, 244, 108, 70, 57, 45, 247, 57, + 177, 39, 126, 190, 238, 50, 96, 186, 208, 28, 168, 148, 56, 9, 106, 92, 213, 63, + 205, 252, 225, 244, 101, 77, 182, 4, 2, + ]) .unwrap(), ); diff --git a/gossip/src/crds_gossip_push.rs b/gossip/src/crds_gossip_push.rs index 665f4b42c16700..90ab5321c9a4d8 100644 --- a/gossip/src/crds_gossip_push.rs +++ b/gossip/src/crds_gossip_push.rs @@ -24,7 +24,7 @@ use { stake_weighting_config::{get_gossip_config_from_account, WeightingConfig}, }, itertools::Itertools, - solana_cluster_type::ClusterType, + solana_genesis_config::ClusterType, solana_keypair::Keypair, solana_pubkey::Pubkey, solana_runtime::bank::Bank, diff --git a/gossip/src/crds_value.rs b/gossip/src/crds_value.rs index bddb44cc0ae2d0..fe537790ff28d3 100644 --- a/gossip/src/crds_value.rs +++ b/gossip/src/crds_value.rs @@ -362,16 +362,6 @@ mod test { #[test] fn test_serialize_round_trip() { - // Unfortunately doing `Keypair::new_from_array(rng.gen())` gives - // different results, so this essentially inlines the implementation - // from ed25519_dalek v1: - // https://docs.rs/ed25519-dalek/1.0.1/src/ed25519_dalek/secret.rs.html#171 - fn random_keypair(rng: &mut R) -> Keypair { - let mut secret_bytes = [0u8; 32]; - rng.fill_bytes(&mut secret_bytes); - Keypair::new_from_array(secret_bytes) - } - use rand0_7::RngCore; let mut rng = ChaChaRng::from_seed( bs58::decode("4nHgVgCvVaHnsrg4dYggtvWYYgV3JbeyiRBWupPMt3EG") .into_vec() @@ -381,7 +371,7 @@ mod test { ); let values: Vec = vec![ { - let keypair = random_keypair(&mut rng); + let keypair = Keypair::generate(&mut rng); let lockouts: [Lockout; 4] = [ Lockout::new_with_confirmation_count(302_388_991, 11), Lockout::new_with_confirmation_count(302_388_995, 7), @@ -395,16 +385,13 @@ mod test { timestamp: Some(1_732_044_716_167), block_id: Hash::new_from_array(rng.gen()), }; - let blockhash = Hash::new_from_array(rng.gen()); - let vote_keypair = random_keypair(&mut rng); - let voter_keypair = random_keypair(&mut rng); let vote = new_tower_sync_transaction( tower_sync, - blockhash, // blockhash - &keypair, // node_keypair - &vote_keypair, // vote_keypair - &voter_keypair, // authorized_voter_keypair - None, // switch_proof_hash + Hash::new_from_array(rng.gen()), // blockhash + &keypair, // node_keypair + &Keypair::generate(&mut rng), // vote_keypair + &Keypair::generate(&mut rng), // authorized_voter_keypair + None, // switch_proof_hash ); let vote = Vote::new( keypair.pubkey(), @@ -415,7 +402,7 @@ mod test { CrdsValue::new(CrdsData::Vote(5, vote), &keypair) }, { - let keypair = random_keypair(&mut rng); + let keypair = Keypair::generate(&mut rng); let lockouts: [Lockout; 3] = [ Lockout::new_with_confirmation_count(302_410_500, 9), Lockout::new_with_confirmation_count(302_410_505, 5), @@ -428,16 +415,13 @@ mod test { timestamp: Some(1_732_053_615_237), block_id: Hash::new_from_array(rng.gen()), }; - let blockhash = Hash::new_from_array(rng.gen()); - let vote_keypair = random_keypair(&mut rng); - let voter_keypair = random_keypair(&mut rng); let vote = new_tower_sync_transaction( tower_sync, - blockhash, // blockhash - &keypair, // node_keypair - &vote_keypair, // vote_keypair - &voter_keypair, // authorized_voter_keypair - None, // switch_proof_hash + Hash::new_from_array(rng.gen()), // blockhash + &keypair, // node_keypair + &Keypair::generate(&mut rng), // vote_keypair + &Keypair::generate(&mut rng), // authorized_voter_keypair + None, // switch_proof_hash ); let vote = Vote::new( keypair.pubkey(), diff --git a/install/Cargo.toml b/install/Cargo.toml index f307fd3b53613f..1a7e0c1d6bd773 100644 --- a/install/Cargo.toml +++ b/install/Cargo.toml @@ -32,17 +32,18 @@ serde_derive = { workspace = true } serde_yaml = { workspace = true } serde_yaml_08 = { package = "serde_yaml", version = "0.8.26" } solana-clap-utils = { workspace = true } -solana-config-interface = { version = "=2.0.0", features = ["bincode"] } -solana-hash = "=3.0.0" -solana-keypair = "=3.0.0" +solana-config-interface = "=1.0.0" +solana-config-program-client = { version = "=1.1.0", features = ["serde"] } +solana-hash = "=2.3.0" +solana-keypair = "=2.2.1" solana-logger = "=3.0.0" -solana-message = "=3.0.0" -solana-pubkey = { version = "=3.0.0", default-features = false } +solana-message = "=2.4.0" +solana-pubkey = { version = "=2.4.0", default-features = false } solana-rpc-client = { workspace = true } solana-sha256-hasher = { workspace = true } -solana-signature = { version = "=3.1.0", default-features = false } -solana-signer = "=3.0.0" -solana-transaction = "=3.0.0" +solana-signature = { version = "=2.3.0", default-features = false } +solana-signer = "=2.2.1" +solana-transaction = "=2.2.3" solana-version = { workspace = true } tar = { workspace = true } tempfile = { workspace = true } diff --git a/install/src/command.rs b/install/src/command.rs index af7d6d233df5e9..32005da6215f8b 100644 --- a/install/src/command.rs +++ b/install/src/command.rs @@ -9,10 +9,8 @@ use { crossbeam_channel::unbounded, indicatif::{ProgressBar, ProgressStyle}, serde_derive::{Deserialize, Serialize}, - solana_config_interface::{ - instruction::{self as config_instruction}, - state::get_config_data, - }, + solana_config_interface::instruction::{self as config_instruction}, + solana_config_program_client::get_config_data, solana_hash::Hash, solana_keypair::{read_keypair_file, signable::Signable, Keypair}, solana_message::Message, diff --git a/keygen/Cargo.toml b/keygen/Cargo.toml index 39eaf75e9a379b..540f857dc074ba 100644 --- a/keygen/Cargo.toml +++ b/keygen/Cargo.toml @@ -17,21 +17,21 @@ name = "solana-keygen" path = "src/keygen.rs" [dependencies] -bs58 = { workspace = true, features = ["std"] } +bs58 = { workspace = true } clap = { version = "3.1.5", features = ["cargo"] } dirs-next = { workspace = true } num_cpus = { workspace = true } serde_json = { workspace = true } solana-clap-v3-utils = { workspace = true } solana-cli-config = { workspace = true } -solana-derivation-path = "=3.0.0" -solana-instruction = { version = "=3.0.0", features = ["bincode"] } -solana-keypair = "=3.0.0" -solana-message = { version = "=3.0.0", features = ["bincode"] } -solana-pubkey = { version = "=3.0.0", default-features = false } +solana-derivation-path = "=2.2.1" +solana-instruction = { version = "=2.3.0", features = ["bincode"] } +solana-keypair = "=2.2.1" +solana-message = { version = "=2.4.0", features = ["bincode"] } +solana-pubkey = { version = "=2.4.0", default-features = false } solana-remote-wallet = { workspace = true, features = ["default"] } -solana-seed-derivable = "=3.0.0" -solana-signer = "=3.0.0" +solana-seed-derivable = "=2.2.1" +solana-signer = "=2.2.1" solana-version = { workspace = true } tiny-bip39 = { workspace = true } diff --git a/ledger-tool/Cargo.toml b/ledger-tool/Cargo.toml index 20f13e43ea4df7..4a476c6294feef 100644 --- a/ledger-tool/Cargo.toml +++ b/ledger-tool/Cargo.toml @@ -44,7 +44,6 @@ solana-bpf-loader-program = { workspace = true } solana-clap-utils = { workspace = true } solana-cli-output = { workspace = true } solana-clock = { workspace = true } -solana-cluster-type = { workspace = true } solana-compute-budget = { workspace = true } solana-core = { workspace = true, features = ["dev-context-only-utils"] } solana-cost-model = { workspace = true } diff --git a/ledger-tool/src/main.rs b/ledger-tool/src/main.rs index b33b01257dd217..31ae0427e03c8e 100644 --- a/ledger-tool/src/main.rs +++ b/ledger-tool/src/main.rs @@ -30,9 +30,8 @@ use { is_within_range, }, }, - solana_cli_output::{display::build_balance_message, CliAccount, OutputFormat}, + solana_cli_output::{CliAccount, OutputFormat}, solana_clock::{Epoch, Slot}, - solana_cluster_type::ClusterType, solana_core::{ banking_simulation::{BankingSimulator, BankingTraceEvents}, system_monitor_service::{SystemMonitorService, SystemMonitorStatsReportConfig}, @@ -40,6 +39,7 @@ use { }, solana_cost_model::{cost_model::CostModel, cost_tracker::CostTracker}, solana_feature_gate_interface::{self as feature, Feature}, + solana_genesis_config::ClusterType, solana_inflation::Inflation, solana_instruction::TRANSACTION_LEVEL_STACK_HEIGHT, solana_ledger::{ @@ -51,7 +51,7 @@ use { }, solana_measure::{measure::Measure, measure_time}, solana_message::SimpleAddressLoader, - solana_native_token::{Sol, LAMPORTS_PER_SOL}, + solana_native_token::{lamports_to_sol, sol_to_lamports, Sol}, solana_pubkey::Pubkey, solana_rent::Rent, solana_runtime::{ @@ -281,7 +281,7 @@ fn graph_forks(bank_forks: &BankForks, config: &GraphConfig) -> String { format!( "\nvotes: {}, stake: {:.1} SOL ({:.1}%)", votes, - build_balance_message(*stake, false, false), + lamports_to_sol(*stake), *stake as f64 / *total_stake as f64 * 100., ) } else { @@ -377,7 +377,7 @@ fn graph_forks(bank_forks: &BankForks, config: &GraphConfig) -> String { r#" "last vote {}"[shape=box,label="Latest validator vote: {}\nstake: {} SOL\nroot slot: {}\n{}"];"#, node_pubkey, node_pubkey, - build_balance_message(*stake, false, false), + lamports_to_sol(*stake), vote_state_view.root_slot().unwrap_or(0), vote_history, )); @@ -399,7 +399,7 @@ fn graph_forks(bank_forks: &BankForks, config: &GraphConfig) -> String { dot.push(format!( r#" "..."[label="...\nvotes: {}, stake: {:.1} SOL {:.1}%"];"#, absent_votes, - build_balance_message(absent_stake, false, false), + lamports_to_sol(absent_stake), absent_stake as f64 / lowest_total_stake as f64 * 100., )); } @@ -941,10 +941,10 @@ fn main() { .help("Print account data in specified format when printing account contents."); let rent = Rent::default(); - let default_bootstrap_validator_lamports = &(500 * LAMPORTS_PER_SOL) + let default_bootstrap_validator_lamports = &sol_to_lamports(500.0) .max(VoteStateV3::get_rent_exempt_reserve(&rent)) .to_string(); - let default_bootstrap_validator_stake_lamports = &(LAMPORTS_PER_SOL / 2) + let default_bootstrap_validator_stake_lamports = &sol_to_lamports(0.5) .max(rent.minimum_balance(StakeStateV2::size_of())) .to_string(); let default_graph_vote_account_mode = GraphVoteAccountMode::default(); diff --git a/ledger-tool/src/output.rs b/ledger-tool/src/output.rs index 73e55154f59412..5b984ee51c6f9d 100644 --- a/ledger-tool/src/output.rs +++ b/ledger-tool/src/output.rs @@ -14,8 +14,8 @@ use { is_loadable::IsLoadable as _, }, solana_cli_output::{ - display::{build_balance_message, writeln_transaction}, - CliAccount, CliAccountNewConfig, OutputFormat, QuietDisplay, VerboseDisplay, + display::writeln_transaction, CliAccount, CliAccountNewConfig, OutputFormat, QuietDisplay, + VerboseDisplay, }, solana_clock::{Slot, UnixTimestamp}, solana_hash::Hash, @@ -24,6 +24,7 @@ use { blockstore_meta::{DuplicateSlotProof, ErasureMeta}, shred::{Shred, ShredType}, }, + solana_native_token::lamports_to_sol, solana_pubkey::Pubkey, solana_runtime::bank::Bank, solana_transaction::versioned::VersionedTransaction, @@ -257,14 +258,14 @@ impl fmt::Display for CliBlockWithEntries { format!( "{}â—Ž{:<14.9}", sign, - build_balance_message(reward.lamports.unsigned_abs(), false, false) + lamports_to_sol(reward.lamports.unsigned_abs()) ), if reward.post_balance == 0 { " - -".to_string() } else { format!( "â—Ž{:<19.9} {:>13.9}%", - build_balance_message(reward.post_balance, false, false), + lamports_to_sol(reward.post_balance), (reward.lamports.abs() as f64 / (reward.post_balance as f64 - reward.lamports as f64)) * 100.0 @@ -282,7 +283,7 @@ impl fmt::Display for CliBlockWithEntries { f, "Total Rewards: {}â—Ž{:<12.9}", sign, - build_balance_message(total_rewards.unsigned_abs(), false, false) + lamports_to_sol(total_rewards.unsigned_abs()) )?; } for (index, entry) in self.encoded_confirmed_block.entries.iter().enumerate() { diff --git a/ledger/src/blockstore_processor.rs b/ledger/src/blockstore_processor.rs index ff7102981ac591..27b446b10238bd 100644 --- a/ledger/src/blockstore_processor.rs +++ b/ledger/src/blockstore_processor.rs @@ -3521,7 +3521,7 @@ pub mod tests { InstructionError::ProgramFailedToCompile, InstructionError::Immutable, InstructionError::IncorrectAuthority, - InstructionError::BorshIoError, + InstructionError::BorshIoError("error".to_string()), InstructionError::AccountNotRentExempt, InstructionError::InvalidAccountOwner, InstructionError::ArithmeticOverflow, @@ -4848,7 +4848,7 @@ pub mod tests { VoteStateV3::size_of(), &solana_vote_program::id(), ); - let versioned = VoteStateVersions::new_v3(vote_state); + let versioned = VoteStateVersions::new_current(vote_state); VoteStateV3::serialize(&versioned, vote_account.data_as_mut_slice()).unwrap(); ( solana_pubkey::new_rand(), diff --git a/ledger/src/sigverify_shreds.rs b/ledger/src/sigverify_shreds.rs index 02a9c26eb6a42b..62f3415a9de0d9 100644 --- a/ledger/src/sigverify_shreds.rs +++ b/ledger/src/sigverify_shreds.rs @@ -390,7 +390,7 @@ fn sign_shreds_cpu(thread_pool: &ThreadPool, keypair: &Keypair, batches: &mut [P fn sign_shreds_gpu_pinned_keypair(keypair: &Keypair, cache: &RecyclerCache) -> PinnedVec { let mut vec = cache.buffer().allocate("pinned_keypair"); let pubkey = keypair.pubkey().to_bytes(); - let secret = keypair.secret_bytes(); + let secret = keypair.secret().to_bytes(); let mut hasher = Sha512::default(); hasher.update(secret); let mut result = hasher.finalize(); diff --git a/ledger/src/staking_utils.rs b/ledger/src/staking_utils.rs index 884cb3cf635d23..8e677b22067a12 100644 --- a/ledger/src/staking_utils.rs +++ b/ledger/src/staking_utils.rs @@ -112,7 +112,7 @@ pub(crate) mod tests { let vote_accounts = stakes.into_iter().map(|(stake, vote_state)| { let account = AccountSharedData::new_data( rng.gen(), // lamports - &VoteStateVersions::new_v3(vote_state), + &VoteStateVersions::new_current(vote_state), &solana_vote_program::id(), // owner ) .unwrap(); diff --git a/local-cluster/Cargo.toml b/local-cluster/Cargo.toml index 3455ab69d3a061..7aac89612af26e 100644 --- a/local-cluster/Cargo.toml +++ b/local-cluster/Cargo.toml @@ -26,7 +26,6 @@ solana-accounts-db = { workspace = true } solana-client = { workspace = true } solana-client-traits = { workspace = true } solana-clock = { workspace = true } -solana-cluster-type = { workspace = true } solana-commitment-config = { workspace = true } solana-core = { workspace = true } solana-entry = { workspace = true } diff --git a/local-cluster/src/local_cluster.rs b/local-cluster/src/local_cluster.rs index 8ef84d7033681c..0dbc4e123d4c66 100644 --- a/local-cluster/src/local_cluster.rs +++ b/local-cluster/src/local_cluster.rs @@ -11,14 +11,13 @@ use { solana_accounts_db::utils::create_accounts_run_and_snapshot_dirs, solana_client::connection_cache::ConnectionCache, solana_clock::{Slot, DEFAULT_DEV_SLOTS_PER_EPOCH, DEFAULT_TICKS_PER_SLOT}, - solana_cluster_type::ClusterType, solana_commitment_config::CommitmentConfig, solana_core::{ consensus::tower_storage::FileTowerStorage, validator::{Validator, ValidatorConfig, ValidatorStartProgress, ValidatorTpuConfig}, }, solana_epoch_schedule::EpochSchedule, - solana_genesis_config::GenesisConfig, + solana_genesis_config::{ClusterType, GenesisConfig}, solana_gossip::{ contact_info::{ContactInfo, Protocol}, gossip_service::{discover, discover_validators}, diff --git a/local-cluster/tests/local_cluster.rs b/local-cluster/tests/local_cluster.rs index c45e92d86d7447..7d90e8302b1a4f 100644 --- a/local-cluster/tests/local_cluster.rs +++ b/local-cluster/tests/local_cluster.rs @@ -15,7 +15,6 @@ use { solana_clock::{ self as clock, Slot, DEFAULT_SLOTS_PER_EPOCH, DEFAULT_TICKS_PER_SLOT, MAX_PROCESSING_AGE, }, - solana_cluster_type::ClusterType, solana_commitment_config::CommitmentConfig, solana_core::{ consensus::{ @@ -28,6 +27,7 @@ use { solana_download_utils::download_snapshot_archive, solana_entry::entry::create_ticks, solana_epoch_schedule::{MAX_LEADER_SCHEDULE_EPOCH_OFFSET, MINIMUM_SLOTS_PER_EPOCH}, + solana_genesis_config::ClusterType, solana_gossip::{crds_data::MAX_VOTES, gossip_service::discover_validators}, solana_hard_forks::HardForks, solana_hash::Hash, diff --git a/precompiles/Cargo.toml b/precompiles/Cargo.toml index d67c1f2d7c4a98..c2a5a854af7696 100644 --- a/precompiles/Cargo.toml +++ b/precompiles/Cargo.toml @@ -19,7 +19,7 @@ agave-feature-set = { workspace = true } bincode = { workspace = true } digest = { workspace = true } ed25519-dalek = { workspace = true } -libsecp256k1 = { workspace = true, features = ["hmac"] } +libsecp256k1 = { workspace = true } openssl = { workspace = true } sha3 = { workspace = true } solana-ed25519-program = { workspace = true } @@ -35,7 +35,7 @@ bytemuck = { workspace = true } hex = { workspace = true } rand0-7 = { workspace = true } solana-instruction = { workspace = true } -solana-keccak-hasher = { workspace = true, features = ["sha3"] } +solana-keccak-hasher = { workspace = true } solana-logger = { workspace = true } solana-secp256k1-program = { workspace = true, features = ["bincode"] } diff --git a/precompiles/src/secp256k1.rs b/precompiles/src/secp256k1.rs index 13be6de184a3ba..f647aa4e08d5c0 100644 --- a/precompiles/src/secp256k1.rs +++ b/precompiles/src/secp256k1.rs @@ -355,7 +355,7 @@ pub mod tests { hasher.result() }; - let secp_message = libsecp256k1::Message::parse(message_hash.as_bytes()); + let secp_message = libsecp256k1::Message::parse(&message_hash.0); let (signature, recovery_id) = libsecp256k1::sign(&secp_message, &secret_key); // Flip the S value in the signature to make a different but valid signature. diff --git a/program-runtime/Cargo.toml b/program-runtime/Cargo.toml index ac6edde62aac7a..4f897363aa4900 100644 --- a/program-runtime/Cargo.toml +++ b/program-runtime/Cargo.toml @@ -51,7 +51,6 @@ solana-rent = { workspace = true } solana-sbpf = { workspace = true } solana-sdk-ids = { workspace = true } solana-slot-hashes = { workspace = true } -solana-stake-interface = { workspace = true, features = ["bincode", "sysvar"] } solana-svm-callback = { workspace = true } solana-svm-feature-set = { workspace = true } solana-svm-log-collector = { workspace = true } @@ -61,7 +60,7 @@ solana-svm-timings = { workspace = true } solana-svm-transaction = { workspace = true } solana-svm-type-overrides = { workspace = true } solana-system-interface = { workspace = true } -solana-sysvar = { workspace = true, features = ["bincode"] } +solana-sysvar = { workspace = true } solana-sysvar-id = { workspace = true } solana-transaction-context = { workspace = true } @@ -69,7 +68,6 @@ solana-transaction-context = { workspace = true } assert_matches = { workspace = true } solana-account-info = { workspace = true } solana-instruction = { workspace = true, features = ["bincode"] } -solana-instruction-error = { workspace = true, features = ["serde"] } solana-keypair = { workspace = true } solana-program-runtime = { path = ".", features = ["dev-context-only-utils"] } solana-pubkey = { workspace = true, features = ["rand"] } diff --git a/program-runtime/src/serialization.rs b/program-runtime/src/serialization.rs index 868c6f1d700ea4..8a601dffd299b1 100644 --- a/program-runtime/src/serialization.rs +++ b/program-runtime/src/serialization.rs @@ -840,11 +840,7 @@ mod tests { assert_eq!(account.data(), &account_info.data.borrow()[..]); assert_eq!(account.owner(), account_info.owner); assert_eq!(account.executable(), account_info.executable); - #[allow(deprecated)] - { - // Using the sdk entrypoint, the rent-epoch is skipped - assert_eq!(0, account_info._unused); - } + assert_eq!(u64::MAX, account_info.rent_epoch); } } } @@ -1001,11 +997,7 @@ mod tests { assert_eq!(account.data(), &account_info.data.borrow()[..]); assert_eq!(account.owner(), account_info.owner); assert_eq!(account.executable(), account_info.executable); - #[allow(deprecated)] - { - // Using the sdk entrypoint, the rent-epoch is skipped - assert_eq!(0, account_info._unused); - } + assert_eq!(u64::MAX, account_info.rent_epoch); assert_eq!( (*account_info.lamports.borrow() as *const u64).align_offset(BPF_ALIGN_OF_U128), @@ -1089,10 +1081,7 @@ mod tests { assert_eq!(account.data(), &account_info.data.borrow()[..]); assert_eq!(account.owner(), account_info.owner); assert_eq!(account.executable(), account_info.executable); - #[allow(deprecated)] - { - assert_eq!(u64::MAX, account_info._unused); - } + assert_eq!(u64::MAX, account_info.rent_epoch); } deserialize_parameters( @@ -1236,11 +1225,21 @@ mod tests { }; for account_info in de_accounts { - // Using program-entrypoint, the rent-epoch will always be 0 - #[allow(deprecated)] - { - assert_eq!(0, account_info._unused); - } + let index_in_transaction = invoke_context + .transaction_context + .find_index_of_account(account_info.key) + .unwrap(); + let account = invoke_context + .transaction_context + .accounts() + .try_borrow(index_in_transaction) + .unwrap(); + let expected_rent_epoch = if mask_out_rent_epoch_in_vm_serialization { + u64::MAX + } else { + account.rent_epoch() + }; + assert_eq!(expected_rent_epoch, account_info.rent_epoch); } // check serialize_parameters_unaligned @@ -1284,10 +1283,7 @@ mod tests { } else { account.rent_epoch() }; - #[allow(deprecated)] - { - assert_eq!(expected_rent_epoch, account_info._unused); - } + assert_eq!(expected_rent_epoch, account_info.rent_epoch); } } } @@ -1380,10 +1376,9 @@ mod tests { let executable = Ptr::::read_possibly_unaligned(input, offset) != 0; offset += size_of::(); - let unused = Ptr::::read_possibly_unaligned(input, offset); + let rent_epoch = Ptr::::read_possibly_unaligned(input, offset); offset += size_of::(); - #[allow(deprecated)] accounts.push(AccountInfo { key, is_signer, @@ -1392,7 +1387,7 @@ mod tests { data, owner, executable, - _unused: unused, + rent_epoch, }); } else { // duplicate account, clone the original diff --git a/program-runtime/src/sysvar_cache.rs b/program-runtime/src/sysvar_cache.rs index 6a96019b1a32b2..d435579045fe3e 100644 --- a/program-runtime/src/sysvar_cache.rs +++ b/program-runtime/src/sysvar_cache.rs @@ -12,9 +12,8 @@ use { solana_rent::Rent, solana_sdk_ids::sysvar, solana_slot_hashes::SlotHashes, - solana_stake_interface::stake_history::StakeHistory, solana_svm_type_overrides::sync::Arc, - solana_sysvar::SysvarSerialize, + solana_sysvar::{stake_history::StakeHistory, Sysvar}, solana_sysvar_id::SysvarId, solana_transaction_context::{IndexOfAccount, InstructionContext, TransactionContext}, }; @@ -60,7 +59,7 @@ const RECENT_BLOCKHASHES_ID: Pubkey = impl SysvarCache { /// Overwrite a sysvar. For testing purposes only. #[allow(deprecated)] - pub fn set_sysvar_for_tests(&mut self, sysvar: &T) { + pub fn set_sysvar_for_tests(&mut self, sysvar: &T) { let data = bincode::serialize(sysvar).expect("Failed to serialize sysvar."); let sysvar_id = T::id(); match sysvar_id { @@ -284,7 +283,7 @@ impl SysvarCache { pub mod get_sysvar_with_account_check { use super::*; - fn check_sysvar_account( + fn check_sysvar_account( transaction_context: &TransactionContext, instruction_context: &InstructionContext, instruction_account_index: IndexOfAccount, @@ -395,7 +394,7 @@ mod tests { #[test_case(SlotHashes::default(); "slot_hashes")] #[test_case(StakeHistory::default(); "stake_history")] #[test_case(LastRestartSlot::default(); "last_restart_slot")] - fn test_sysvar_cache_preserves_bytes(_: T) { + fn test_sysvar_cache_preserves_bytes(_: T) { let id = T::id(); let size = T::size_of().saturating_mul(2); let in_buf = vec![0; size]; diff --git a/program-test/Cargo.toml b/program-test/Cargo.toml index fd54f5ff758875..71a27e36895237 100644 --- a/program-test/Cargo.toml +++ b/program-test/Cargo.toml @@ -25,7 +25,6 @@ solana-banks-client = { workspace = true } solana-banks-interface = { workspace = true } solana-banks-server = { workspace = true } solana-clock = { workspace = true } -solana-cluster-type = { workspace = true } solana-commitment-config = { workspace = true } solana-compute-budget = { workspace = true } solana-epoch-rewards = { workspace = true } diff --git a/program-test/src/lib.rs b/program-test/src/lib.rs index 5c3293027a6204..0232e770bc50f7 100644 --- a/program-test/src/lib.rs +++ b/program-test/src/lib.rs @@ -14,17 +14,16 @@ use { solana_banks_client::start_client, solana_banks_server::banks_server::start_local_server, solana_clock::{Epoch, Slot}, - solana_cluster_type::ClusterType, solana_compute_budget::compute_budget::ComputeBudget, solana_fee_calculator::{FeeRateGovernor, DEFAULT_TARGET_LAMPORTS_PER_SIGNATURE}, - solana_genesis_config::GenesisConfig, + solana_genesis_config::{ClusterType, GenesisConfig}, solana_hash::Hash, solana_instruction::{ error::{InstructionError, UNSUPPORTED_SYSVAR}, Instruction, }, solana_keypair::Keypair, - solana_native_token::LAMPORTS_PER_SOL, + solana_native_token::sol_to_lamports, solana_poh_config::PohConfig, solana_program_entrypoint::{deserialize, SUCCESS}, solana_program_error::{ProgramError, ProgramResult}, @@ -44,7 +43,7 @@ use { solana_signer::Signer, solana_svm_log_collector::ic_msg, solana_svm_timings::ExecuteTimings, - solana_sysvar::SysvarSerialize, + solana_sysvar::Sysvar, solana_sysvar_id::SysvarId, solana_vote_program::vote_state::{self, VoteStateV3, VoteStateVersions}, std::{ @@ -217,7 +216,7 @@ macro_rules! processor { }; } -fn get_sysvar( +fn get_sysvar( sysvar: Result, InstructionError>, var_addr: *mut u8, ) -> u64 { @@ -613,7 +612,7 @@ impl ProgramTest { ); } - pub fn add_sysvar_account(&mut self, address: Pubkey, sysvar: &S) { + pub fn add_sysvar_account(&mut self, address: Pubkey, sysvar: &S) { let account = create_account_shared_data_for_test(sysvar); self.add_account(address, account.into()); } @@ -802,13 +801,13 @@ impl ProgramTest { }; let bootstrap_validator_pubkey = Pubkey::new_unique(); let bootstrap_validator_stake_lamports = - rent.minimum_balance(VoteStateV3::size_of()) + 1_000_000 * LAMPORTS_PER_SOL; + rent.minimum_balance(VoteStateV3::size_of()) + sol_to_lamports(1_000_000.0); let mint_keypair = Keypair::new(); let voting_keypair = Keypair::new(); let mut genesis_config = create_genesis_config_with_leader_ex( - 1_000_000 * LAMPORTS_PER_SOL, + sol_to_lamports(1_000_000.0), &mint_keypair.pubkey(), &bootstrap_validator_pubkey, &voting_keypair.pubkey(), @@ -1109,7 +1108,7 @@ impl ProgramTestContext { for _ in 0..number_of_credits { vote_state.increment_credits(epoch, 1); } - let versioned = VoteStateVersions::new_v3(vote_state); + let versioned = VoteStateVersions::new_current(vote_state); vote_state::to(&versioned, &mut vote_account).unwrap(); bank.store_account(vote_account_address, &vote_account); } @@ -1132,7 +1131,7 @@ impl ProgramTestContext { /// that would be difficult to replicate on a new test cluster. Beware /// that it can be used to create states that would not be reachable /// under normal conditions! - pub fn set_sysvar(&self, sysvar: &T) { + pub fn set_sysvar(&self, sysvar: &T) { let bank_forks = self.bank_forks.read().unwrap(); let bank = bank_forks.working_bank(); bank.set_sysvar_for_tests(sysvar); diff --git a/program-test/tests/sysvar_last_restart_slot.rs b/program-test/tests/sysvar_last_restart_slot.rs index 79f1d5dad17f0b..dd2d64d54cdfc6 100644 --- a/program-test/tests/sysvar_last_restart_slot.rs +++ b/program-test/tests/sysvar_last_restart_slot.rs @@ -7,9 +7,7 @@ use { solana_program_test::{processor, ProgramTest, ProgramTestContext}, solana_pubkey::Pubkey, solana_signer::Signer, - solana_sysvar::{ - last_restart_slot, last_restart_slot::LastRestartSlot, Sysvar, SysvarSerialize, - }, + solana_sysvar::{last_restart_slot, last_restart_slot::LastRestartSlot, Sysvar}, solana_transaction::Transaction, }; diff --git a/program-test/tests/warp.rs b/program-test/tests/warp.rs index 2e9ed32ee930ce..6c8c71e394c34c 100644 --- a/program-test/tests/warp.rs +++ b/program-test/tests/warp.rs @@ -19,12 +19,14 @@ use { solana_signer::Signer, solana_stake_interface::{ instruction as stake_instruction, - stake_history::StakeHistory, state::{StakeActivationStatus, StakeStateV2}, - sysvar::stake_history, }, solana_stake_program::stake_state, - solana_sysvar::{clock, SysvarSerialize}, + solana_sysvar::{ + clock, + stake_history::{self, StakeHistory}, + Sysvar, + }, solana_transaction::Transaction, solana_transaction_error::TransactionError, solana_vote_program::vote_state, diff --git a/programs/bpf_loader/src/lib.rs b/programs/bpf_loader/src/lib.rs index 3d0bfdbbdcb510..96f0bdd24c6268 100644 --- a/programs/bpf_loader/src/lib.rs +++ b/programs/bpf_loader/src/lib.rs @@ -606,13 +606,10 @@ fn process_loader_upgradeable_instruction( let transaction_context = &invoke_context.transaction_context; let instruction_context = transaction_context.get_current_instruction_context()?; let caller_program_id = instruction_context.get_program_key(transaction_context)?; - // The conversion from `PubkeyError` to `InstructionError` through - // num-traits is incorrect, but it's the existing behavior. let signers = [[new_program_id.as_ref(), &[bump_seed]]] .iter() .map(|seeds| Pubkey::create_program_address(seeds, caller_program_id)) - .collect::, solana_pubkey::PubkeyError>>() - .map_err(|e| e as u64)?; + .collect::, solana_pubkey::PubkeyError>>()?; invoke_context.native_invoke(instruction, signers.as_slice())?; // Load and verify the program bits diff --git a/programs/sbf/Cargo.lock b/programs/sbf/Cargo.lock index bb4663a227facc..3e68a4a665cd1f 100644 --- a/programs/sbf/Cargo.lock +++ b/programs/sbf/Cargo.lock @@ -114,7 +114,7 @@ dependencies = [ "agave-feature-set", "bincode", "digest 0.10.7", - "ed25519-dalek 1.0.1", + "ed25519-dalek", "libsecp256k1 0.6.0", "openssl", "sha3", @@ -154,7 +154,7 @@ dependencies = [ "solana-hash", "solana-instruction", "solana-keccak-hasher", - "solana-loader-v3-interface", + "solana-loader-v3-interface 5.0.0", "solana-poseidon", "solana-program-entrypoint", "solana-program-runtime", @@ -164,7 +164,6 @@ dependencies = [ "solana-secp256k1-recover", "solana-sha256-hasher", "solana-stable-layout", - "solana-stake-interface", "solana-svm-callback", "solana-svm-feature-set", "solana-svm-log-collector", @@ -237,7 +236,7 @@ dependencies = [ "solana-inflation", "solana-keypair", "solana-ledger", - "solana-logger", + "solana-logger 3.0.0", "solana-metrics", "solana-native-token", "solana-net-utils", @@ -840,12 +839,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - [[package]] name = "base64" version = "0.12.3" @@ -870,12 +863,6 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "base64ct" -version = "1.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" - [[package]] name = "bincode" version = "1.3.3" @@ -961,16 +948,39 @@ dependencies = [ "generic-array", ] +[[package]] +name = "borsh" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" +dependencies = [ + "borsh-derive 0.10.3", + "hashbrown 0.13.2", +] + [[package]] name = "borsh" version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad8646f98db542e39fc66e68a20b2144f6a732636df7c2354e74645faaa433ce" dependencies = [ - "borsh-derive", + "borsh-derive 1.5.7", "cfg_aliases", ] +[[package]] +name = "borsh-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" +dependencies = [ + "borsh-derive-internal", + "borsh-schema-derive-internal", + "proc-macro-crate 0.1.5", + "proc-macro2", + "syn 1.0.109", +] + [[package]] name = "borsh-derive" version = "1.5.7" @@ -984,6 +994,28 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "borsh-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "brotli" version = "3.3.4" @@ -1042,9 +1074,9 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.23.2" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3995eaeebcdf32f91f980d360f78732ddc061097ab4e39991ae7a6ace9194677" +checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" dependencies = [ "bytemuck_derive", ] @@ -1297,10 +1329,24 @@ dependencies = [ ] [[package]] -name = "const-oid" -version = "0.9.6" +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if 1.0.0", + "wasm-bindgen", +] + +[[package]] +name = "console_log" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" +dependencies = [ + "log", + "web-sys", +] [[package]] name = "constant_time_eq" @@ -1436,18 +1482,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" -[[package]] -name = "crypto-bigint" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" -dependencies = [ - "generic-array", - "rand_core 0.6.4", - "subtle", - "zeroize", -] - [[package]] name = "crypto-common" version = "0.1.6" @@ -1575,16 +1609,6 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" -[[package]] -name = "der" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" -dependencies = [ - "const-oid", - "zeroize", -] - [[package]] name = "der-parser" version = "8.2.0" @@ -1705,7 +1729,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", - "const-oid", "crypto-common", "subtle", ] @@ -1792,37 +1815,13 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abe71d579d1812060163dff96056261deb5bf6729b100fa2e36a68b9649ba3d3" -[[package]] -name = "ecdsa" -version = "0.16.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" -dependencies = [ - "der", - "digest 0.10.7", - "elliptic-curve", - "rfc6979", - "signature 2.2.0", - "spki", -] - [[package]] name = "ed25519" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf038a7b6fd7ef78ad3348b63f3a17550877b0e28f8d68bcc94894d1412158bc" dependencies = [ - "signature 1.1.0", -] - -[[package]] -name = "ed25519" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" -dependencies = [ - "pkcs8", - "signature 2.2.0", + "signature", ] [[package]] @@ -1832,36 +1831,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" dependencies = [ "curve25519-dalek 3.2.0", - "ed25519 1.0.1", + "ed25519", "rand 0.7.3", "serde", "sha2 0.9.9", "zeroize", ] -[[package]] -name = "ed25519-dalek" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" -dependencies = [ - "curve25519-dalek 4.1.3", - "ed25519 2.2.3", - "rand_core 0.6.4", - "serde", - "sha2 0.10.9", - "subtle", - "zeroize", -] - [[package]] name = "ed25519-dalek-bip32" -version = "0.3.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b49a684b133c4980d7ee783936af771516011c8cd15f429dbda77245e282f03" +checksum = "9d2be62a4061b872c8c0873ee4fc6f101ce7b889d039f019c5fa2af471a59908" dependencies = [ "derivation-path", - "ed25519-dalek 2.2.0", + "ed25519-dalek", "hmac 0.12.1", "sha2 0.10.9", ] @@ -1893,25 +1877,6 @@ dependencies = [ "byteorder 0.5.3", ] -[[package]] -name = "elliptic-curve" -version = "0.13.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" -dependencies = [ - "base16ct", - "crypto-bigint", - "digest 0.10.7", - "ff", - "generic-array", - "group", - "pkcs8", - "rand_core 0.6.4", - "sec1", - "subtle", - "zeroize", -] - [[package]] name = "encode_unicode" version = "1.0.0" @@ -1970,6 +1935,19 @@ dependencies = [ "regex", ] +[[package]] +name = "env_logger" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + [[package]] name = "env_logger" version = "0.11.6" @@ -2086,16 +2064,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" -[[package]] -name = "ff" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" -dependencies = [ - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "fiat-crypto" version = "0.2.9" @@ -2322,7 +2290,6 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", - "zeroize", ] [[package]] @@ -2438,17 +2405,6 @@ dependencies = [ "spinning_top", ] -[[package]] -name = "group" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" -dependencies = [ - "ff", - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "h2" version = "0.3.26" @@ -3331,17 +3287,13 @@ dependencies = [ ] [[package]] -name = "k256" -version = "0.13.4" +name = "kaigan" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +checksum = "2ba15de5aeb137f0f65aa3bf82187647f1285abfe5b20c80c2c37f7007ad519a" dependencies = [ - "cfg-if 1.0.0", - "ecdsa", - "elliptic-curve", - "once_cell", - "sha2 0.10.9", - "signature 2.2.0", + "borsh 0.10.3", + "serde", ] [[package]] @@ -4305,16 +4257,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - [[package]] name = "pkg-config" version = "0.3.17" @@ -4450,9 +4392,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.97" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61789d7719defeb74ea5fe81f2fdfdbd28a803847077cecce2ff14e1472f6f1" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ "unicode-ident", ] @@ -4940,16 +4882,6 @@ dependencies = [ "tower-service", ] -[[package]] -name = "rfc6979" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" -dependencies = [ - "hmac 0.12.1", - "subtle", -] - [[package]] name = "ring" version = "0.17.14" @@ -5226,20 +5158,6 @@ dependencies = [ "untrusted", ] -[[package]] -name = "sec1" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" -dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", - "subtle", - "zeroize", -] - [[package]] name = "security-framework" version = "2.3.1" @@ -5493,16 +5411,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65211b7b6fc3f14ff9fc7a2011a434e3e6880585bd2e9e9396315ae24cbf7852" -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", -] - [[package]] name = "simpl" version = "0.1.0" @@ -5596,9 +5504,9 @@ dependencies = [ [[package]] name = "solana-account" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f885ce7f937871ecb56aadbeaaec963b234a580b7d6ebbdb8fa4249a36f92433" +checksum = "0f949fe4edaeaea78c844023bfc1c898e0b1f5a100f8a8d2d0f85d0a7b090258" dependencies = [ "bincode", "qualifier_attr", @@ -5607,7 +5515,7 @@ dependencies = [ "serde_derive", "solana-account-info", "solana-clock", - "solana-instruction-error", + "solana-instruction", "solana-pubkey", "solana-sdk-ids", "solana-sysvar", @@ -5629,11 +5537,11 @@ dependencies = [ "solana-account-decoder-client-types", "solana-address-lookup-table-interface", "solana-clock", - "solana-config-interface", + "solana-config-program-client", "solana-epoch-schedule", "solana-fee-calculator", "solana-instruction", - "solana-loader-v3-interface", + "solana-loader-v3-interface 5.0.0", "solana-nonce", "solana-program-option", "solana-program-pack", @@ -5670,9 +5578,9 @@ dependencies = [ [[package]] name = "solana-account-info" -version = "3.0.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82f4691b69b172c687d218dd2f1f23fc7ea5e9aa79df9ac26dab3d8dd829ce48" +checksum = "c8f5152a288ef1912300fc6efa6c2d1f9bb55d9398eb6c72326360b8063987da" dependencies = [ "bincode", "serde", @@ -5744,33 +5652,11 @@ dependencies = [ "thiserror 2.0.14", ] -[[package]] -name = "solana-address" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a7a457086457ea9db9a5199d719dc8734dc2d0342fad0d8f77633c31eb62f19" -dependencies = [ - "borsh", - "bytemuck", - "bytemuck_derive", - "curve25519-dalek 4.1.3", - "five8", - "five8_const", - "rand 0.8.5", - "serde", - "serde_derive", - "solana-atomic-u64", - "solana-define-syscall 3.0.0", - "solana-program-error", - "solana-sanitize", - "solana-sha256-hasher", -] - [[package]] name = "solana-address-lookup-table-interface" -version = "3.0.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2f56cac5e70517a2f27d05e5100b20de7182473ffd0035b23ea273307905987" +checksum = "d1673f67efe870b64a65cb39e6194be5b26527691ce5922909939961a6e6b395" dependencies = [ "bincode", "bytemuck", @@ -5778,7 +5664,6 @@ dependencies = [ "serde_derive", "solana-clock", "solana-instruction", - "solana-instruction-error", "solana-pubkey", "solana-sdk-ids", "solana-slot-hashes", @@ -5786,9 +5671,9 @@ dependencies = [ [[package]] name = "solana-atomic-u64" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a933ff1e50aff72d02173cfcd7511bd8540b027ee720b75f353f594f834216d0" +checksum = "d52e52720efe60465b052b9e7445a01c17550666beec855cce66f44766697bc2" dependencies = [ "parking_lot 0.12.2", ] @@ -5797,7 +5682,7 @@ dependencies = [ name = "solana-banks-client" version = "3.0.0" dependencies = [ - "borsh", + "borsh 1.5.7", "futures 0.3.31", "solana-account", "solana-banks-interface", @@ -5868,35 +5753,36 @@ dependencies = [ [[package]] name = "solana-big-mod-exp" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30c80fb6d791b3925d5ec4bf23a7c169ef5090c013059ec3ed7d0b2c04efa085" +checksum = "75db7f2bbac3e62cfd139065d15bcda9e2428883ba61fc8d27ccb251081e7567" dependencies = [ "num-bigint 0.4.6", "num-traits", - "solana-define-syscall 3.0.0", + "solana-define-syscall", ] [[package]] name = "solana-bincode" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534a37aecd21986089224d0c01006a75b96ac6fb2f418c24edc15baf0d2a4c99" +checksum = "19a3787b8cf9c9fe3dd360800e8b70982b9e5a8af9e11c354b6665dd4a003adc" dependencies = [ "bincode", "serde", - "solana-instruction-error", + "solana-instruction", ] [[package]] name = "solana-blake3-hasher" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffa2e3bdac3339c6d0423275e45dafc5ac25f4d43bf344d026a3cc9a85e244a6" +checksum = "a1a0801e25a1b31a14494fc80882a036be0ffd290efc4c2d640bfcca120a4672" dependencies = [ "blake3", - "solana-define-syscall 3.0.0", + "solana-define-syscall", "solana-hash", + "solana-sanitize", ] [[package]] @@ -5914,26 +5800,27 @@ dependencies = [ [[package]] name = "solana-bn254" -version = "3.0.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20a5f01e99addb316d95d4ed31aa6eacfda557fffc00ae316b919e8ba0fc5b91" +checksum = "4420f125118732833f36facf96a27e7b78314b2d642ba07fa9ffdacd8d79e243" dependencies = [ "ark-bn254", "ark-ec", "ark-ff", "ark-serialize", "bytemuck", - "solana-define-syscall 3.0.0", + "solana-define-syscall", "thiserror 2.0.14", ] [[package]] name = "solana-borsh" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc402b16657abbfa9991cd5cbfac5a11d809f7e7d28d3bb291baeb088b39060e" +checksum = "718333bcd0a1a7aed6655aa66bef8d7fb047944922b2d3a18f49cbc13e73d004" dependencies = [ - "borsh", + "borsh 0.10.3", + "borsh 1.5.7", ] [[package]] @@ -5947,7 +5834,7 @@ dependencies = [ "solana-bincode", "solana-clock", "solana-instruction", - "solana-loader-v3-interface", + "solana-loader-v3-interface 5.0.0", "solana-loader-v4-interface", "solana-packet", "solana-program-entrypoint", @@ -6081,6 +5968,7 @@ dependencies = [ "solana-epoch-info", "solana-hash", "solana-message", + "solana-native-token", "solana-packet", "solana-pubkey", "solana-rpc-client-api", @@ -6088,6 +5976,7 @@ dependencies = [ "solana-signature", "solana-stake-interface", "solana-system-interface", + "solana-sysvar", "solana-transaction", "solana-transaction-error", "solana-transaction-status", @@ -6142,9 +6031,9 @@ dependencies = [ [[package]] name = "solana-client-traits" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08618ed587e128105510c54ae3e456b9a06d674d8640db75afe66dad65cb4e02" +checksum = "83f0071874e629f29e0eb3dab8a863e98502ac7aba55b7e0df1803fc5cac72a7" dependencies = [ "solana-account", "solana-commitment-config", @@ -6163,9 +6052,9 @@ dependencies = [ [[package]] name = "solana-clock" -version = "3.0.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb62e9381182459a4520b5fe7fb22d423cae736239a6427fc398a88743d0ed59" +checksum = "1bb482ab70fced82ad3d7d3d87be33d466a3498eb8aa856434ff3c0dfc2e2e31" dependencies = [ "serde", "serde_derive", @@ -6176,9 +6065,9 @@ dependencies = [ [[package]] name = "solana-cluster-type" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb7692fa6bf10a1a86b450c4775526f56d7e0e2116a53313f2533b5694abea64" +checksum = "7ace9fea2daa28354d107ea879cff107181d85cd4e0f78a2bedb10e1a428c97e" dependencies = [ "serde", "serde_derive", @@ -6187,9 +6076,9 @@ dependencies = [ [[package]] name = "solana-commitment-config" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fa5933a62dadb7d3ed35e6329de5cebb0678acc8f9cfdf413269084eeccc63f" +checksum = "ac49c4dde3edfa832de1697e9bcdb7c3b3f7cb7a1981b7c62526c8bb6700fb73" dependencies = [ "serde", "serde_derive", @@ -6224,11 +6113,11 @@ dependencies = [ [[package]] name = "solana-compute-budget-interface" -version = "3.0.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8292c436b269ad23cecc8b24f7da3ab07ca111661e25e00ce0e1d22771951ab9" +checksum = "8432d2c4c22d0499aa06d62e4f7e333f81777b3d7c96050ae9e5cb71a8c3aee4" dependencies = [ - "borsh", + "borsh 1.5.7", "solana-instruction", "solana-sdk-ids", ] @@ -6242,9 +6131,9 @@ dependencies = [ [[package]] name = "solana-config-interface" -version = "2.0.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63e401ae56aed512821cc7a0adaa412ff97fecd2dff4602be7b1330d2daec0c4" +checksum = "3fbdbcfedb467322ac9686ca61da0a1fdede2fd99a01fb2ed52b49452abd22e0" dependencies = [ "bincode", "serde", @@ -6257,6 +6146,20 @@ dependencies = [ "solana-system-interface", ] +[[package]] +name = "solana-config-program-client" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef9867b9ffae6e48a97ce6349e7796fcb34084298e909a8fa1fe427f41b52fd4" +dependencies = [ + "bincode", + "borsh 0.10.3", + "kaigan", + "serde", + "solana-config-interface", + "solana-program", +] + [[package]] name = "solana-connection-cache" version = "3.0.0" @@ -6330,7 +6233,6 @@ dependencies = [ "solana-builtins-default-costs", "solana-client", "solana-clock", - "solana-cluster-type", "solana-compute-budget", "solana-compute-budget-instruction", "solana-compute-budget-interface", @@ -6349,7 +6251,7 @@ dependencies = [ "solana-instruction", "solana-keypair", "solana-ledger", - "solana-loader-v3-interface", + "solana-loader-v3-interface 5.0.0", "solana-measure", "solana-message", "solana-metrics", @@ -6442,12 +6344,12 @@ dependencies = [ [[package]] name = "solana-cpi" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16238feb63d1cbdf915fb287f29ef7a7ebf81469bd6214f8b72a53866b593f8f" +checksum = "8dc71126edddc2ba014622fc32d0f5e2e78ec6c5a1e0eb511b85618c09e9ea11" dependencies = [ "solana-account-info", - "solana-define-syscall 3.0.0", + "solana-define-syscall", "solana-instruction", "solana-program-error", "solana-pubkey", @@ -6456,14 +6358,14 @@ dependencies = [ [[package]] name = "solana-curve25519" -version = "2.3.7" +version = "2.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b162f50499b391b785d57b2f2c73e3b9754d88fd4894bef444960b00bda8dcca" +checksum = "def3cfe5279edb64fc39111cff6dcf77b01fbfba2c02c13ced41e6a48baf4cbe" dependencies = [ "bytemuck", "bytemuck_derive", "curve25519-dalek 4.1.3", - "solana-define-syscall 2.3.0", + "solana-define-syscall", "subtle", "thiserror 2.0.14", ] @@ -6475,28 +6377,31 @@ dependencies = [ "bytemuck", "bytemuck_derive", "curve25519-dalek 4.1.3", - "solana-define-syscall 3.0.0", + "solana-define-syscall", "subtle", "thiserror 2.0.14", ] [[package]] -name = "solana-define-syscall" -version = "2.3.0" +name = "solana-decode-error" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae3e2abcf541c8122eafe9a625d4d194b4023c20adde1e251f94e056bb1aee2" +checksum = "10a6a6383af236708048f8bd8d03db8ca4ff7baf4a48e5d580f4cce545925470" +dependencies = [ + "num-traits", +] [[package]] name = "solana-define-syscall" -version = "3.0.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9697086a4e102d28a156b8d6b521730335d6951bd39a5e766512bbe09007cee" +checksum = "2ae3e2abcf541c8122eafe9a625d4d194b4023c20adde1e251f94e056bb1aee2" [[package]] name = "solana-derivation-path" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff71743072690fdbdfcdc37700ae1cb77485aaad49019473a81aee099b1e0b8c" +checksum = "939756d798b25c5ec3cca10e06212bdca3b1443cb9bb740a38124f58b258737b" dependencies = [ "derivation-path", "qstring", @@ -6516,13 +6421,16 @@ dependencies = [ [[package]] name = "solana-ed25519-program" -version = "3.0.0" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1419197f1c06abf760043f6d64ba9d79a03ad5a43f18c7586471937122094da" +checksum = "a1feafa1691ea3ae588f99056f4bdd1293212c7ece28243d7da257c443e84753" dependencies = [ "bytemuck", "bytemuck_derive", + "ed25519-dalek", + "solana-feature-set", "solana-instruction", + "solana-precompile-error", "solana-sdk-ids", ] @@ -6552,9 +6460,9 @@ dependencies = [ [[package]] name = "solana-epoch-info" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a6b69bd71386f61344f2bcf0f527f5fd6dd3b22add5880e2e1bf1dd1fa8059" +checksum = "90ef6f0b449290b0b9f32973eefd95af35b01c5c0c34c569f936c34c5b20d77b" dependencies = [ "serde", "serde_derive", @@ -6562,9 +6470,9 @@ dependencies = [ [[package]] name = "solana-epoch-rewards" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b319a4ed70390af911090c020571f0ff1f4ec432522d05ab89f5c08080381995" +checksum = "86b575d3dd323b9ea10bb6fe89bf6bf93e249b215ba8ed7f68f1a3633f384db7" dependencies = [ "serde", "serde_derive", @@ -6576,9 +6484,9 @@ dependencies = [ [[package]] name = "solana-epoch-rewards-hasher" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e507099d0c2c5d7870c9b1848281ea67bbeee80d171ca85003ee5767994c9c38" +checksum = "96c5fd2662ae7574810904585fd443545ed2b568dbd304b25a31e79ccc76e81b" dependencies = [ "siphasher 0.3.11", "solana-hash", @@ -6587,9 +6495,9 @@ dependencies = [ [[package]] name = "solana-epoch-schedule" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5481e72cc4d52c169db73e4c0cd16de8bc943078aac587ec4817a75cc6388f" +checksum = "3fce071fbddecc55d727b1d7ed16a629afe4f6e4c217bc8d00af3b785f6f67ed" dependencies = [ "serde", "serde_derive", @@ -6598,21 +6506,11 @@ dependencies = [ "solana-sysvar-id", ] -[[package]] -name = "solana-epoch-stake" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc6693d0ea833b880514b9b88d95afb80b42762dca98b0712465d1fcbbcb89e" -dependencies = [ - "solana-define-syscall 3.0.0", - "solana-pubkey", -] - [[package]] name = "solana-example-mocks" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978855d164845c1b0235d4b4d101cadc55373fffaf0b5b6cfa2194d25b2ed658" +checksum = "84461d56cbb8bb8d539347151e0525b53910102e4bced875d49d5139708e39d3" dependencies = [ "serde", "serde_derive", @@ -6641,13 +6539,13 @@ dependencies = [ "serde_derive", "solana-clap-utils", "solana-cli-config", - "solana-cli-output", "solana-hash", "solana-instruction", "solana-keypair", - "solana-logger", + "solana-logger 3.0.0", "solana-message", "solana-metrics", + "solana-native-token", "solana-packet", "solana-pubkey", "solana-signer", @@ -6662,9 +6560,9 @@ dependencies = [ [[package]] name = "solana-feature-gate-interface" -version = "3.0.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7347ab62e6d47a82e340c865133795b394feea7c2b2771d293f57691c6544c3f" +checksum = "43f5c5382b449e8e4e3016fb05e418c53d57782d8b5c30aa372fc265654b956d" dependencies = [ "bincode", "serde", @@ -6679,6 +6577,20 @@ dependencies = [ "solana-system-interface", ] +[[package]] +name = "solana-feature-set" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92f6c09cc41059c0e03ccbee7f5d4cc0a315d68ef0d59b67eb90246adfd8cc35" +dependencies = [ + "ahash 0.8.11", + "lazy_static", + "solana-epoch-schedule", + "solana-hash", + "solana-pubkey", + "solana-sha256-hasher", +] + [[package]] name = "solana-fee" version = "3.0.0" @@ -6690,9 +6602,9 @@ dependencies = [ [[package]] name = "solana-fee-calculator" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a73cc03ca4bed871ca174558108835f8323e85917bb38b9c81c7af2ab853efe" +checksum = "d89bc408da0fb3812bc3008189d148b4d3e08252c79ad810b245482a3f70cd8d" dependencies = [ "log", "serde", @@ -6701,12 +6613,14 @@ dependencies = [ [[package]] name = "solana-fee-structure" -version = "3.0.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e2abdb1223eea8ec64136f39cb1ffcf257e00f915c957c35c0dd9e3f4e700b0" +checksum = "33adf673581c38e810bf618f745bf31b683a0a4a4377682e6aaac5d9a058dd4e" dependencies = [ "serde", "serde_derive", + "solana-message", + "solana-native-token", ] [[package]] @@ -6723,9 +6637,9 @@ dependencies = [ [[package]] name = "solana-genesis-config" -version = "3.0.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "749eccc960e85c9b33608450093d256006253e1cb436b8380e71777840a3f675" +checksum = "b3725085d47b96d37fef07a29d78d2787fc89a0b9004c66eed7753d1e554989f" dependencies = [ "bincode", "chrono", @@ -6740,6 +6654,7 @@ dependencies = [ "solana-hash", "solana-inflation", "solana-keypair", + "solana-logger 2.3.1", "solana-poh-config", "solana-pubkey", "solana-rent", @@ -6822,14 +6737,14 @@ dependencies = [ "solana-clap-utils", "solana-client", "solana-clock", - "solana-cluster-type", "solana-connection-cache", "solana-entry", "solana-epoch-schedule", + "solana-genesis-config", "solana-hash", "solana-keypair", "solana-ledger", - "solana-logger", + "solana-logger 3.0.0", "solana-low-pass-filter", "solana-measure", "solana-metrics", @@ -6861,9 +6776,9 @@ dependencies = [ [[package]] name = "solana-hard-forks" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0abacc4b66ce471f135f48f22facf75cbbb0f8a252fbe2c1e0aa59d5b203f519" +checksum = "b6c28371f878e2ead55611d8ba1b5fb879847156d04edea13693700ad1a28baf" dependencies = [ "serde", "serde_derive", @@ -6871,25 +6786,27 @@ dependencies = [ [[package]] name = "solana-hash" -version = "3.0.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a063723b9e84c14d8c0d2cdf0268207dc7adecf546e31251f9e07c7b00b566c" +checksum = "b5b96e9f0300fa287b545613f007dfe20043d7812bee255f418c1eb649c93b63" dependencies = [ - "borsh", + "borsh 1.5.7", "bytemuck", "bytemuck_derive", "five8", + "js-sys", "serde", "serde_derive", "solana-atomic-u64", "solana-sanitize", + "wasm-bindgen", ] [[package]] name = "solana-inflation" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e92f37a14e7c660628752833250dd3dcd8e95309876aee751d7f8769a27947c6" +checksum = "23eef6a09eb8e568ce6839573e4966850e85e9ce71e6ae1a6c930c1c43947de3" dependencies = [ "serde", "serde_derive", @@ -6897,41 +6814,31 @@ dependencies = [ [[package]] name = "solana-instruction" -version = "3.0.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df4e8fcba01d7efa647ed20a081c234475df5e11a93acb4393cc2c9a7b99bab" +checksum = "47298e2ce82876b64f71e9d13a46bc4b9056194e7f9937ad3084385befa50885" dependencies = [ "bincode", - "borsh", - "serde", - "serde_derive", - "solana-define-syscall 3.0.0", - "solana-instruction-error", - "solana-pubkey", -] - -[[package]] -name = "solana-instruction-error" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f0d483b8ae387178d9210e0575b666b05cdd4bd0f2f188128249f6e454d39d" -dependencies = [ + "borsh 1.5.7", + "getrandom 0.2.10", + "js-sys", "num-traits", "serde", "serde_derive", - "solana-program-error", + "solana-define-syscall", + "solana-pubkey", + "wasm-bindgen", ] [[package]] name = "solana-instructions-sysvar" -version = "3.0.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ddf67876c541aa1e21ee1acae35c95c6fbc61119814bfef70579317a5e26955" +checksum = "e0e85a6fad5c2d0c4f5b91d34b8ca47118fc593af706e523cdbedf846a954f57" dependencies = [ "bitflags 2.9.1", "solana-account-info", "solana-instruction", - "solana-instruction-error", "solana-program-error", "solana-pubkey", "solana-sanitize", @@ -6942,38 +6849,40 @@ dependencies = [ [[package]] name = "solana-keccak-hasher" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57eebd3012946913c8c1b8b43cdf8a6249edb09c0b6be3604ae910332a3acd97" +checksum = "c7aeb957fbd42a451b99235df4942d96db7ef678e8d5061ef34c9b34cae12f79" dependencies = [ "sha3", - "solana-define-syscall 3.0.0", + "solana-define-syscall", "solana-hash", + "solana-sanitize", ] [[package]] name = "solana-keypair" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80eaf45d386c94e59c0c2d3db4a76c05f90365394aa848edce5826d3f7e77fb3" +checksum = "3dbb7042c2e0c561afa07242b2099d55c57bd1b1da3b6476932197d84e15e3e4" dependencies = [ - "ed25519-dalek 2.2.0", + "bs58", + "ed25519-dalek", "ed25519-dalek-bip32", - "five8", - "rand 0.8.5", + "rand 0.7.3", "solana-derivation-path", "solana-pubkey", "solana-seed-derivable", "solana-seed-phrase", "solana-signature", "solana-signer", + "wasm-bindgen", ] [[package]] name = "solana-last-restart-slot" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcda154ec827f5fc1e4da0af3417951b7e9b8157540f81f936c4a8b1156134d0" +checksum = "4a6360ac2fdc72e7463565cd256eedcf10d7ef0c28a1249d261ec168c1b55cdd" dependencies = [ "serde", "serde_derive", @@ -7091,9 +7000,23 @@ dependencies = [ [[package]] name = "solana-loader-v2-interface" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8ab08006dad78ae7cd30df8eea0539e207d08d91eaefb3e1d49a446e1c49654" +dependencies = [ + "serde", + "serde_bytes", + "serde_derive", + "solana-instruction", + "solana-pubkey", + "solana-sdk-ids", +] + +[[package]] +name = "solana-loader-v3-interface" version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e4a6f0ad4fd9c30679bfee2ce3ea6a449cac38049f210480b751f65676dfe82" +checksum = "fa4be76cfa9afd84ca2f35ebc09f0da0f0092935ccdac0595d98447f259538c2" dependencies = [ "serde", "serde_bytes", @@ -7101,13 +7024,14 @@ dependencies = [ "solana-instruction", "solana-pubkey", "solana-sdk-ids", + "solana-system-interface", ] [[package]] name = "solana-loader-v3-interface" -version = "6.1.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee44c9b1328c5c712c68966fb8de07b47f3e7bac006e74ddd1bb053d3e46e5d" +checksum = "6f7162a05b8b0773156b443bccd674ea78bb9aa406325b467ea78c06c99a63a2" dependencies = [ "serde", "serde_bytes", @@ -7120,9 +7044,9 @@ dependencies = [ [[package]] name = "solana-loader-v4-interface" -version = "3.1.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c948b33ff81fa89699911b207059e493defdba9647eaf18f23abdf3674e0fb" +checksum = "706a777242f1f39a83e2a96a2a6cb034cb41169c6ecbee2cf09cb873d9659e7e" dependencies = [ "serde", "serde_bytes", @@ -7143,7 +7067,7 @@ dependencies = [ "solana-bincode", "solana-bpf-loader-program", "solana-instruction", - "solana-loader-v3-interface", + "solana-loader-v3-interface 5.0.0", "solana-loader-v4-interface", "solana-packet", "solana-program-runtime", @@ -7156,13 +7080,26 @@ dependencies = [ "solana-transaction-context", ] +[[package]] +name = "solana-logger" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db8e777ec1afd733939b532a42492d888ec7c88d8b4127a5d867eb45c6eb5cd5" +dependencies = [ + "env_logger 0.9.3", + "lazy_static", + "libc", + "log", + "signal-hook", +] + [[package]] name = "solana-logger" version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef7421d1092680d72065edbf5c7605856719b021bf5f173656c71febcdd5d003" dependencies = [ - "env_logger", + "env_logger 0.11.6", "lazy_static", "libc", "log", @@ -7188,22 +7125,25 @@ dependencies = [ [[package]] name = "solana-message" -version = "3.0.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c33e9fa7871147ac3235a7320386afa2dc64bbb21ca3cf9d79a6f6827313176" +checksum = "1796aabce376ff74bf89b78d268fa5e683d7d7a96a0a4e4813ec34de49d5314b" dependencies = [ "bincode", "blake3", "lazy_static", "serde", "serde_derive", + "solana-bincode", "solana-hash", "solana-instruction", "solana-pubkey", "solana-sanitize", "solana-sdk-ids", "solana-short-vec", + "solana-system-interface", "solana-transaction-error", + "wasm-bindgen", ] [[package]] @@ -7222,18 +7162,18 @@ dependencies = [ [[package]] name = "solana-msg" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "264275c556ea7e22b9d3f87d56305546a38d4eee8ec884f3b126236cb7dcbbb4" +checksum = "f36a1a14399afaabc2781a1db09cb14ee4cc4ee5c7a5a3cfcc601811379a8092" dependencies = [ - "solana-define-syscall 3.0.0", + "solana-define-syscall", ] [[package]] name = "solana-native-token" -version = "3.0.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8dd4c280dca9d046139eb5b7a5ac9ad10403fbd64964c7d7571214950d758f" +checksum = "307fb2f78060995979e9b4f68f833623565ed4e55d3725f100454ce78a99a1a3" [[package]] name = "solana-net-utils" @@ -7262,9 +7202,9 @@ checksum = "8b8a731ed60e89177c8a7ab05fe0f1511cedd3e70e773f288f9de33a9cfdc21e" [[package]] name = "solana-nonce" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abbdc6c8caf1c08db9f36a50967539d0f72b9f1d4aea04fec5430f532e5afadc" +checksum = "703e22eb185537e06204a5bd9d509b948f0066f2d1d814a6f475dafb3ddf1325" dependencies = [ "serde", "serde_derive", @@ -7276,9 +7216,9 @@ dependencies = [ [[package]] name = "solana-nonce-account" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "805fd25b29e5a1a0e6c3dd6320c9da80f275fbe4ff6e392617c303a2085c435e" +checksum = "cde971a20b8dbf60144d6a84439dda86b5466e00e2843091fe731083cda614da" dependencies = [ "solana-account", "solana-hash", @@ -7288,9 +7228,9 @@ dependencies = [ [[package]] name = "solana-offchain-message" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6e2a1141a673f72a05cf406b99e4b2b8a457792b7c01afa07b3f00d4e2de393" +checksum = "b526398ade5dea37f1f147ce55dae49aa017a5d7326606359b0445ca8d946581" dependencies = [ "num_enum", "solana-hash", @@ -7303,9 +7243,9 @@ dependencies = [ [[package]] name = "solana-packet" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6edf2f25743c95229ac0fdc32f8f5893ef738dbf332c669e9861d33ddb0f469d" +checksum = "004f2d2daf407b3ec1a1ca5ec34b3ccdfd6866dd2d3c7d0715004a96e4b6d127" dependencies = [ "bincode", "bitflags 2.9.1", @@ -7370,9 +7310,9 @@ dependencies = [ [[package]] name = "solana-poh-config" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f1fef1f2ff2480fdbcc64bef5e3c47bec6e1647270db88b43f23e3a55f8d9cf" +checksum = "d650c3b4b9060082ac6b0efbbb66865089c58405bfb45de449f3f2b91eccee75" dependencies = [ "serde", "serde_derive", @@ -7384,24 +7324,25 @@ version = "3.0.0" dependencies = [ "ark-bn254", "light-poseidon", - "solana-define-syscall 3.0.0", + "solana-define-syscall", "thiserror 2.0.14", ] [[package]] name = "solana-precompile-error" -version = "3.0.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cafcd950de74c6c39d55dc8ca108bbb007799842ab370ef26cf45a34453c31e1" +checksum = "4d87b2c1f5de77dfe2b175ee8dd318d196aaca4d0f66f02842f80c852811f9f8" dependencies = [ "num-traits", + "solana-decode-error", ] [[package]] name = "solana-presigner" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f704eaf825be3180832445b9e4983b875340696e8e7239bf2d535b0f86c14a2" +checksum = "81a57a24e6a4125fc69510b6774cd93402b943191b6cddad05de7281491c90fe" dependencies = [ "solana-pubkey", "solana-signature", @@ -7410,31 +7351,57 @@ dependencies = [ [[package]] name = "solana-program" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91b12305dd81045d705f427acd0435a2e46444b65367d7179d7bdcfc3bc5f5eb" +checksum = "586469467e93ceb79048f8d8e3a619bf61d05396ee7de95cb40280301a589d05" dependencies = [ + "bincode", + "blake3", + "borsh 0.10.3", + "borsh 1.5.7", + "bs58", + "bytemuck", + "console_error_panic_hook", + "console_log", + "getrandom 0.2.10", + "lazy_static", + "log", "memoffset 0.9.0", + "num-bigint 0.4.6", + "num-derive", + "num-traits", + "rand 0.8.5", + "serde", + "serde_bytes", + "serde_derive", "solana-account-info", + "solana-address-lookup-table-interface", + "solana-atomic-u64", "solana-big-mod-exp", + "solana-bincode", "solana-blake3-hasher", "solana-borsh", "solana-clock", "solana-cpi", - "solana-define-syscall 3.0.0", + "solana-decode-error", + "solana-define-syscall", "solana-epoch-rewards", "solana-epoch-schedule", - "solana-epoch-stake", "solana-example-mocks", + "solana-feature-gate-interface", "solana-fee-calculator", "solana-hash", "solana-instruction", - "solana-instruction-error", "solana-instructions-sysvar", "solana-keccak-hasher", "solana-last-restart-slot", + "solana-loader-v2-interface", + "solana-loader-v3-interface 3.0.0", + "solana-loader-v4-interface", + "solana-message", "solana-msg", "solana-native-token", + "solana-nonce", "solana-program-entrypoint", "solana-program-error", "solana-program-memory", @@ -7442,7 +7409,9 @@ dependencies = [ "solana-program-pack", "solana-pubkey", "solana-rent", + "solana-sanitize", "solana-sdk-ids", + "solana-sdk-macro", "solana-secp256k1-recover", "solana-serde-varint", "solana-serialize-utils", @@ -7451,18 +7420,22 @@ dependencies = [ "solana-slot-hashes", "solana-slot-history", "solana-stable-layout", + "solana-stake-interface", + "solana-system-interface", "solana-sysvar", "solana-sysvar-id", + "solana-vote-interface", + "thiserror 2.0.14", + "wasm-bindgen", ] [[package]] name = "solana-program-entrypoint" -version = "3.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6557cf5b5e91745d1667447438a1baa7823c6086e4ece67f8e6ebfa7a8f72660" +checksum = "32ce041b1a0ed275290a5008ee1a4a6c48f5054c8a3d78d313c08958a06aedbd" dependencies = [ "solana-account-info", - "solana-define-syscall 3.0.0", "solana-msg", "solana-program-error", "solana-pubkey", @@ -7470,35 +7443,41 @@ dependencies = [ [[package]] name = "solana-program-error" -version = "3.0.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1af32c995a7b692a915bb7414d5f8e838450cf7c70414e763d8abcae7b51f28" +checksum = "9ee2e0217d642e2ea4bee237f37bd61bb02aec60da3647c48ff88f6556ade775" dependencies = [ - "borsh", + "borsh 1.5.7", + "num-traits", "serde", "serde_derive", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-pubkey", ] [[package]] name = "solana-program-memory" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10e5660c60749c7bfb30b447542529758e4dbcecd31b1e8af1fdc92e2bdde90a" +checksum = "1b0268f6c89825fb634a34bd0c3b8fdaeaecfc3728be1d622a8ee6dd577b60d4" dependencies = [ - "solana-define-syscall 3.0.0", + "num-traits", + "solana-define-syscall", ] [[package]] name = "solana-program-option" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e7b4ddb464f274deb4a497712664c3b612e3f5f82471d4e47710fc4ab1c3095" +checksum = "dc677a2e9bc616eda6dbdab834d463372b92848b2bfe4a1ed4e4b4adba3397d0" [[package]] name = "solana-program-pack" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c169359de21f6034a63ebf96d6b380980307df17a8d371344ff04a883ec4e9d0" +checksum = "319f0ef15e6e12dc37c597faccb7d62525a509fec5f6975ecb9419efddeb277b" dependencies = [ "solana-program-error", ] @@ -7528,7 +7507,6 @@ dependencies = [ "solana-sbpf", "solana-sdk-ids", "solana-slot-hashes", - "solana-stake-interface", "solana-svm-callback", "solana-svm-feature-set", "solana-svm-log-collector", @@ -7563,7 +7541,6 @@ dependencies = [ "solana-banks-interface", "solana-banks-server", "solana-clock", - "solana-cluster-type", "solana-commitment-config", "solana-compute-budget", "solana-epoch-rewards", @@ -7573,8 +7550,8 @@ dependencies = [ "solana-hash", "solana-instruction", "solana-keypair", - "solana-loader-v3-interface", - "solana-logger", + "solana-loader-v3-interface 5.0.0", + "solana-logger 3.0.0", "solana-message", "solana-msg", "solana-native-token", @@ -7607,12 +7584,29 @@ dependencies = [ [[package]] name = "solana-pubkey" -version = "3.0.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8909d399deb0851aa524420beeb5646b115fd253ef446e35fe4504c904da3941" +checksum = "9b62adb9c3261a052ca1f999398c388f1daf558a1b492f60a6d9e64857db4ff1" dependencies = [ + "borsh 0.10.3", + "borsh 1.5.7", + "bytemuck", + "bytemuck_derive", + "curve25519-dalek 4.1.3", + "five8", + "five8_const", + "getrandom 0.2.10", + "js-sys", + "num-traits", "rand 0.8.5", - "solana-address", + "serde", + "serde_derive", + "solana-atomic-u64", + "solana-decode-error", + "solana-define-syscall", + "solana-sanitize", + "solana-sha256-hasher", + "wasm-bindgen", ] [[package]] @@ -7670,9 +7664,9 @@ dependencies = [ [[package]] name = "solana-quic-definitions" -version = "3.0.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15319accf7d3afd845817aeffa6edd8cc185f135cefbc6b985df29cfd8c09609" +checksum = "7011ee2af2baad991762b6d63ea94b08d06f7928effb76ce273b232c9902c205" dependencies = [ "solana-keypair", ] @@ -7709,9 +7703,9 @@ dependencies = [ [[package]] name = "solana-rent" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b702d8c43711e3c8a9284a4f1bbc6a3de2553deb25b0c8142f9a44ef0ce5ddc1" +checksum = "d1aea8fdea9de98ca6e8c2da5827707fb3842833521b528a713810ca685d2480" dependencies = [ "serde", "serde_derive", @@ -7722,9 +7716,9 @@ dependencies = [ [[package]] name = "solana-reward-info" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82be7946105c2ee6be9f9ee7bd18a068b558389221d29efa92b906476102bfcc" +checksum = "18205b69139b1ae0ab8f6e11cdcb627328c0814422ad2482000fa2ca54ae4a2f" dependencies = [ "serde", "serde_derive", @@ -7757,7 +7751,6 @@ dependencies = [ "solana-account", "solana-account-decoder", "solana-accounts-db", - "solana-cli-output", "solana-client", "solana-clock", "solana-commitment-config", @@ -7964,7 +7957,6 @@ dependencies = [ "solana-builtins", "solana-client-traits", "solana-clock", - "solana-cluster-type", "solana-commitment-config", "solana-compute-budget", "solana-compute-budget-instruction", @@ -7986,7 +7978,7 @@ dependencies = [ "solana-instruction", "solana-keypair", "solana-lattice-hash", - "solana-loader-v3-interface", + "solana-loader-v3-interface 5.0.0", "solana-loader-v4-interface", "solana-measure", "solana-message", @@ -8067,9 +8059,9 @@ dependencies = [ [[package]] name = "solana-sanitize" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927e833259588ac8f860861db0f6e2668c3cc46d917798ade116858960acfe8a" +checksum = "61f1bc1357b8188d9c4a3af3fc55276e56987265eb7ad073ae6f8180ee54cecf" [[package]] name = "solana-sbf-programs" @@ -8080,7 +8072,7 @@ dependencies = [ "agave-syscalls", "agave-validator", "bincode", - "borsh", + "borsh 1.5.7", "byteorder 1.5.0", "elf", "itertools 0.12.1", @@ -8095,7 +8087,6 @@ dependencies = [ "solana-cli-output", "solana-client-traits", "solana-clock", - "solana-cluster-type", "solana-compute-budget", "solana-compute-budget-instruction", "solana-compute-budget-interface", @@ -8107,9 +8098,9 @@ dependencies = [ "solana-instruction", "solana-keypair", "solana-ledger", - "solana-loader-v3-interface", + "solana-loader-v3-interface 5.0.0", "solana-loader-v4-interface", - "solana-logger", + "solana-logger 2.3.1", "solana-measure", "solana-message", "solana-program", @@ -8224,7 +8215,7 @@ dependencies = [ name = "solana-sbf-rust-call-args" version = "3.0.0" dependencies = [ - "borsh", + "borsh 1.5.7", "solana-account-info", "solana-program", "solana-program-entrypoint", @@ -8686,8 +8677,6 @@ name = "solana-sbf-rust-secp256k1-recover" version = "3.0.0" dependencies = [ "libsecp256k1 0.7.0", - "sha3", - "solana-hash", "solana-keccak-hasher", "solana-msg", "solana-program-entrypoint", @@ -8699,10 +8688,7 @@ name = "solana-sbf-rust-sha" version = "3.0.0" dependencies = [ "blake3", - "sha2 0.10.9", - "sha3", "solana-blake3-hasher", - "solana-hash", "solana-keccak-hasher", "solana-msg", "solana-program-entrypoint", @@ -8777,7 +8763,7 @@ version = "3.0.0" dependencies = [ "bincode", "solana-account-info", - "solana-define-syscall 3.0.0", + "solana-define-syscall", "solana-instruction", "solana-instructions-sysvar", "solana-msg", @@ -8785,7 +8771,6 @@ dependencies = [ "solana-program-error", "solana-pubkey", "solana-sdk-ids", - "solana-stake-interface", "solana-sysvar", ] @@ -8844,18 +8829,18 @@ dependencies = [ [[package]] name = "solana-sdk-ids" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1b6d6aaf60669c592838d382266b173881c65fb1cdec83b37cb8ce7cb89f9ad" +checksum = "5c5d8b9cc68d5c88b062a33e23a6466722467dde0035152d8fb1afbcdf350a5f" dependencies = [ "solana-pubkey", ] [[package]] name = "solana-sdk-macro" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6430000e97083460b71d9fbadc52a2ab2f88f53b3a4c5e58c5ae3640a0e8c00" +checksum = "86280da8b99d03560f6ab5aca9de2e38805681df34e0bb8f238e69b29433b9df" dependencies = [ "bs58", "proc-macro2", @@ -8865,12 +8850,12 @@ dependencies = [ [[package]] name = "solana-secp256k1-program" -version = "3.0.0" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8efa767b0188f577edae7080e8bf080e5db9458e2b6ee5beaa73e2e6bb54e99d" +checksum = "f19833e4bc21558fe9ec61f239553abe7d05224347b57d65c2218aeeb82d6149" dependencies = [ "digest 0.10.7", - "k256", + "libsecp256k1 0.6.0", "serde", "serde_derive", "sha3", @@ -8879,41 +8864,43 @@ dependencies = [ [[package]] name = "solana-secp256k1-recover" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "394a4470477d66296af5217970a905b1c5569032a7732c367fb69e5666c8607e" +checksum = "baa3120b6cdaa270f39444f5093a90a7b03d296d362878f7a6991d6de3bbe496" dependencies = [ - "k256", - "solana-define-syscall 3.0.0", + "libsecp256k1 0.6.0", + "solana-define-syscall", "thiserror 2.0.14", ] [[package]] name = "solana-secp256r1-program" -version = "3.0.0" +version = "2.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445d8e12592631d76fc4dc57858bae66c9fd7cc838c306c62a472547fc9d0ce6" +checksum = "ce0ae46da3071a900f02d367d99b2f3058fe2e90c5062ac50c4f20cfedad8f0f" dependencies = [ "bytemuck", "openssl", + "solana-feature-set", "solana-instruction", + "solana-precompile-error", "solana-sdk-ids", ] [[package]] name = "solana-seed-derivable" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff7bdb72758e3bec33ed0e2658a920f1f35dfb9ed576b951d20d63cb61ecd95c" +checksum = "3beb82b5adb266c6ea90e5cf3967235644848eac476c5a1f2f9283a143b7c97f" dependencies = [ "solana-derivation-path", ] [[package]] name = "solana-seed-phrase" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc905b200a95f2ea9146e43f2a7181e3aeb55de6bc12afb36462d00a3c7310de" +checksum = "36187af2324f079f65a675ec22b31c24919cb4ac22c79472e85d819db9bbbc15" dependencies = [ "hmac 0.12.1", "pbkdf2 0.11.0", @@ -8948,58 +8935,58 @@ dependencies = [ [[package]] name = "solana-serde" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "709a93cab694c70f40b279d497639788fc2ccbcf9b4aa32273d4b361322c02dd" +checksum = "1931484a408af466e14171556a47adaa215953c7f48b24e5f6b0282763818b04" dependencies = [ "serde", ] [[package]] name = "solana-serde-varint" -version = "3.0.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e5174c57d5ff3c1995f274d17156964664566e2cde18a07bba1586d35a70d3b" +checksum = "2a7e155eba458ecfb0107b98236088c3764a09ddf0201ec29e52a0be40857113" dependencies = [ "serde", ] [[package]] name = "solana-serialize-utils" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7665da4f6e07b58c93ef6aaf9fb6a923fd11b0922ffc53ba74c3cadfa490f26" +checksum = "817a284b63197d2b27afdba829c5ab34231da4a9b4e763466a003c40ca4f535e" dependencies = [ - "solana-instruction-error", + "solana-instruction", "solana-pubkey", "solana-sanitize", ] [[package]] name = "solana-sha256-hasher" -version = "3.0.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9b912ba6f71cb202c0c3773ec77bf898fa9fe0c78691a2d6859b3b5b8954719" +checksum = "5aa3feb32c28765f6aa1ce8f3feac30936f16c5c3f7eb73d63a5b8f6f8ecdc44" dependencies = [ "sha2 0.10.9", - "solana-define-syscall 3.0.0", + "solana-define-syscall", "solana-hash", ] [[package]] name = "solana-short-vec" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b69d029da5428fc1c57f7d49101b2077c61f049d4112cd5fb8456567cc7d2638" +checksum = "5c54c66f19b9766a56fa0057d060de8378676cb64987533fa088861858fc5a69" dependencies = [ "serde", ] [[package]] name = "solana-shred-version" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94953e22ca28fe4541a3447d6baeaf519cc4ddc063253bfa673b721f34c136bb" +checksum = "afd3db0461089d1ad1a78d9ba3f15b563899ca2386351d38428faa5350c60a98" dependencies = [ "solana-hard-forks", "solana-hash", @@ -9008,11 +8995,11 @@ dependencies = [ [[package]] name = "solana-signature" -version = "3.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bb8057cc0e9f7b5e89883d49de6f407df655bb6f3a71d0b7baf9986a2218fd9" +checksum = "64c8ec8e657aecfc187522fc67495142c12f35e55ddeca8698edbb738b8dbd8c" dependencies = [ - "ed25519-dalek 2.2.0", + "ed25519-dalek", "five8", "serde", "serde-big-array", @@ -9022,9 +9009,9 @@ dependencies = [ [[package]] name = "solana-signer" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bfea97951fee8bae0d6038f39a5efcb6230ecdfe33425ac75196d1a1e3e3235" +checksum = "7c41991508a4b02f021c1342ba00bcfa098630b213726ceadc7cb032e051975b" dependencies = [ "solana-pubkey", "solana-signature", @@ -9033,9 +9020,9 @@ dependencies = [ [[package]] name = "solana-slot-hashes" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80a293f952293281443c04f4d96afd9d547721923d596e92b4377ed2360f1746" +checksum = "0c8691982114513763e88d04094c9caa0376b867a29577939011331134c301ce" dependencies = [ "serde", "serde_derive", @@ -9046,9 +9033,9 @@ dependencies = [ [[package]] name = "solana-slot-history" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f914f6b108f5bba14a280b458d023e3621c9973f27f015a4d755b50e88d89e97" +checksum = "97ccc1b2067ca22754d5283afb2b0126d61eae734fc616d23871b0943b0d935e" dependencies = [ "bv", "serde", @@ -9059,9 +9046,9 @@ dependencies = [ [[package]] name = "solana-stable-layout" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1da74507795b6e8fb60b7c7306c0c36e2c315805d16eaaf479452661234685ac" +checksum = "9f14f7d02af8f2bc1b5efeeae71bc1c2b7f0f65cd75bcc7d8180f2c762a57f54" dependencies = [ "solana-instruction", "solana-pubkey", @@ -9069,20 +9056,22 @@ dependencies = [ [[package]] name = "solana-stake-interface" -version = "2.0.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fd582fe900e43db96651a5b43956b8ebfab1944d091b391d89140635900ef46" +checksum = "5269e89fde216b4d7e1d1739cf5303f8398a1ff372a81232abbee80e554a838c" dependencies = [ + "borsh 0.10.3", + "borsh 1.5.7", "num-traits", "serde", "serde_derive", "solana-clock", "solana-cpi", + "solana-decode-error", "solana-instruction", "solana-program-error", "solana-pubkey", "solana-system-interface", - "solana-sysvar", "solana-sysvar-id", ] @@ -9096,7 +9085,7 @@ dependencies = [ "solana-account", "solana-bincode", "solana-clock", - "solana-config-interface", + "solana-config-program-client", "solana-genesis-config", "solana-instruction", "solana-native-token", @@ -9239,7 +9228,7 @@ dependencies = [ "solana-hash", "solana-instruction", "solana-instructions-sysvar", - "solana-loader-v3-interface", + "solana-loader-v3-interface 5.0.0", "solana-loader-v4-interface", "solana-loader-v4-program", "solana-message", @@ -9335,17 +9324,18 @@ dependencies = [ [[package]] name = "solana-system-interface" -version = "2.0.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e1790547bfc3061f1ee68ea9d8dc6c973c02a163697b24263a8e9f2e6d4afa2" +checksum = "94d7c18cb1a91c6be5f5a8ac9276a1d7c737e39a21beba9ea710ab4b9c63bc90" dependencies = [ + "js-sys", "num-traits", "serde", "serde_derive", + "solana-decode-error", "solana-instruction", - "solana-msg", - "solana-program-error", "solana-pubkey", + "wasm-bindgen", ] [[package]] @@ -9375,9 +9365,9 @@ dependencies = [ [[package]] name = "solana-system-transaction" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31b5699ec533621515e714f1533ee6b3b0e71c463301d919eb59b8c1e249d30" +checksum = "5bd98a25e5bcba8b6be8bcbb7b84b24c2a6a8178d7fb0e3077a916855ceba91a" dependencies = [ "solana-hash", "solana-keypair", @@ -9390,9 +9380,9 @@ dependencies = [ [[package]] name = "solana-sysvar" -version = "3.0.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63205e68d680bcc315337dec311b616ab32fea0a612db3b883ce4de02e0953f9" +checksum = "d50c92bc019c590f5e42c61939676e18d14809ed00b2a59695dd5c67ae72c097" dependencies = [ "base64 0.22.1", "bincode", @@ -9403,30 +9393,33 @@ dependencies = [ "serde_derive", "solana-account-info", "solana-clock", - "solana-define-syscall 3.0.0", + "solana-define-syscall", "solana-epoch-rewards", "solana-epoch-schedule", "solana-fee-calculator", "solana-hash", "solana-instruction", + "solana-instructions-sysvar", "solana-last-restart-slot", "solana-program-entrypoint", "solana-program-error", "solana-program-memory", "solana-pubkey", "solana-rent", + "solana-sanitize", "solana-sdk-ids", "solana-sdk-macro", "solana-slot-hashes", "solana-slot-history", + "solana-stake-interface", "solana-sysvar-id", ] [[package]] name = "solana-sysvar-id" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5051bc1a16d5d96a96bc33b5b2ec707495c48fe978097bdaba68d3c47987eb32" +checksum = "5762b273d3325b047cfda250787f8d796d781746860d5d0a746ee29f3e8812c1" dependencies = [ "solana-pubkey", "solana-sdk-ids", @@ -9460,8 +9453,8 @@ dependencies = [ "solana-instruction", "solana-keypair", "solana-ledger", - "solana-loader-v3-interface", - "solana-logger", + "solana-loader-v3-interface 5.0.0", + "solana-logger 3.0.0", "solana-message", "solana-native-token", "solana-net-utils", @@ -9483,9 +9476,9 @@ dependencies = [ [[package]] name = "solana-time-utils" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ced92c60aa76ec4780a9d93f3bd64dfa916e1b998eacc6f1c110f3f444f02c9" +checksum = "6af261afb0e8c39252a04d026e3ea9c405342b08c871a2ad8aa5448e068c784c" [[package]] name = "solana-tls-utils" @@ -9557,15 +9550,17 @@ dependencies = [ [[package]] name = "solana-transaction" -version = "3.0.0" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2db6ac3984042d9248fd9b06761ece438ed9ba412c001240052ce6216fee3141" +checksum = "80657d6088f721148f5d889c828ca60c7daeedac9a8679f9ec215e0c42bcbf41" dependencies = [ "bincode", "serde", "serde_derive", + "solana-bincode", "solana-hash", "solana-instruction", + "solana-keypair", "solana-message", "solana-pubkey", "solana-sanitize", @@ -9573,7 +9568,9 @@ dependencies = [ "solana-short-vec", "solana-signature", "solana-signer", + "solana-system-interface", "solana-transaction-error", + "wasm-bindgen", ] [[package]] @@ -9594,13 +9591,13 @@ dependencies = [ [[package]] name = "solana-transaction-error" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4222065402340d7e6aec9dc3e54d22992ddcf923d91edcd815443c2bfca3144a" +checksum = "222a9dc8fdb61c6088baab34fc3a8b8473a03a7a5fd404ed8dd502fa79b67cb1" dependencies = [ "serde", "serde_derive", - "solana-instruction-error", + "solana-instruction", "solana-sanitize", ] @@ -9626,7 +9623,7 @@ dependencies = [ "agave-reserved-account-keys", "base64 0.22.1", "bincode", - "borsh", + "borsh 1.5.7", "bs58", "log", "serde", @@ -9638,7 +9635,7 @@ dependencies = [ "solana-hash", "solana-instruction", "solana-loader-v2-interface", - "solana-loader-v3-interface", + "solana-loader-v3-interface 5.0.0", "solana-message", "solana-program-option", "solana-pubkey", @@ -9796,9 +9793,9 @@ dependencies = [ [[package]] name = "solana-validator-exit" -version = "3.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5d2face763df5afeaa9509b9019968860e69cc1531ec8b4a2e6c7b702204d5a" +checksum = "7bbf6d7a3c0b28dd5335c52c0e9eae49d0ae489a8f324917faf0ded65a812c1d" [[package]] name = "solana-version" @@ -9843,21 +9840,19 @@ dependencies = [ [[package]] name = "solana-vote-interface" -version = "3.0.0" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66631ddbe889dab5ec663294648cd1df395ec9df7a4476e7b3e095604cfdb539" +checksum = "b80d57478d6599d30acc31cc5ae7f93ec2361a06aefe8ea79bc81739a08af4c3" dependencies = [ "bincode", - "cfg_eval", "num-derive", "num-traits", "serde", "serde_derive", - "serde_with", "solana-clock", + "solana-decode-error", "solana-hash", "solana-instruction", - "solana-instruction-error", "solana-pubkey", "solana-rent", "solana-sdk-ids", @@ -9937,14 +9932,50 @@ dependencies = [ "solana-program-runtime", "solana-sdk-ids", "solana-svm-log-collector", - "solana-zk-sdk", + "solana-zk-sdk 3.0.0", ] [[package]] name = "solana-zk-sdk" -version = "4.0.0" +version = "2.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9602bcb1f7af15caef92b91132ec2347e1c51a72ecdbefdaefa3eac4b8711475" +checksum = "05857892ac50fe03c125d8445fd790c6768015b76f4ad1e4b4b1499938b357f0" +dependencies = [ + "aes-gcm-siv", + "base64 0.22.1", + "bincode", + "bytemuck", + "bytemuck_derive", + "curve25519-dalek 4.1.3", + "itertools 0.12.1", + "js-sys", + "merlin", + "num-derive", + "num-traits", + "rand 0.8.5", + "serde", + "serde_derive", + "serde_json", + "sha3", + "solana-derivation-path", + "solana-instruction", + "solana-pubkey", + "solana-sdk-ids", + "solana-seed-derivable", + "solana-seed-phrase", + "solana-signature", + "solana-signer", + "subtle", + "thiserror 2.0.14", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "solana-zk-sdk" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dffbd0b7537f4249d69b74c632f8eac1d2726572022791f9ead65a67d3f6905" dependencies = [ "aes-gcm-siv", "base64 0.22.1", @@ -9952,7 +9983,6 @@ dependencies = [ "bytemuck", "bytemuck_derive", "curve25519-dalek 4.1.3", - "getrandom 0.2.10", "itertools 0.12.1", "js-sys", "merlin", @@ -10040,32 +10070,22 @@ dependencies = [ "lock_api", ] -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - [[package]] name = "spl-associated-token-account-interface" -version = "2.0.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6433917b60441d68d99a17e121d9db0ea15a9a69c0e5afa34649cf5ba12612f" +checksum = "5e6bbe0794e532ac08428d3abf5bf8ae75bd81dfddd785c388e326c00c92c6f5" dependencies = [ - "borsh", + "borsh 1.5.7", "solana-instruction", "solana-pubkey", ] [[package]] name = "spl-discriminator" -version = "0.5.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48cc11459e265d5b501534144266620289720b4c44522a47bc6b63cd295d2f3" +checksum = "0a20542d4c8264856d205c0090512f374dbf7b3124479a3d93ab6184ae3631aa" dependencies = [ "bytemuck", "solana-program-error", @@ -10099,9 +10119,9 @@ dependencies = [ [[package]] name = "spl-generic-token" -version = "2.0.1" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233df81b75ab99b42f002b5cdd6e65a7505ffa930624f7096a7580a56765e9cf" +checksum = "741a62a566d97c58d33f9ed32337ceedd4e35109a686e31b1866c5dfa56abddc" dependencies = [ "bytemuck", "solana-pubkey", @@ -10109,9 +10129,9 @@ dependencies = [ [[package]] name = "spl-memo-interface" -version = "2.0.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d4e2aedd58f858337fa609af5ad7100d4a243fdaf6a40d6eb4c28c5f19505d3" +checksum = "24af0730130fea732616be9425fe8eb77782e2aab2f0e76837b6a66aaba96c6b" dependencies = [ "solana-instruction", "solana-pubkey", @@ -10119,28 +10139,29 @@ dependencies = [ [[package]] name = "spl-pod" -version = "0.7.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1233fdecd7461611d69bb87bc2e95af742df47291975d21232a0be8217da9de" +checksum = "d994afaf86b779104b4a95ba9ca75b8ced3fdb17ee934e38cb69e72afbe17799" dependencies = [ - "borsh", + "borsh 1.5.7", "bytemuck", "bytemuck_derive", "num-derive", "num-traits", - "num_enum", + "solana-decode-error", + "solana-msg", "solana-program-error", "solana-program-option", "solana-pubkey", - "solana-zk-sdk", + "solana-zk-sdk 2.3.6", "thiserror 2.0.14", ] [[package]] name = "spl-token-2022-interface" -version = "2.0.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0888304af6b3d839e435712e6c84025e09513017425ff62045b6b8c41feb77d9" +checksum = "62d7ae2ee6b856f8ddcbdc3b3a9f4d2141582bbe150f93e5298ee97e0251fa04" dependencies = [ "arrayref", "bytemuck", @@ -10148,13 +10169,15 @@ dependencies = [ "num-traits", "num_enum", "solana-account-info", + "solana-decode-error", "solana-instruction", + "solana-msg", "solana-program-error", "solana-program-option", "solana-program-pack", "solana-pubkey", "solana-sdk-ids", - "solana-zk-sdk", + "solana-zk-sdk 2.3.6", "spl-pod", "spl-token-confidential-transfer-proof-extraction", "spl-token-confidential-transfer-proof-generation", @@ -10166,46 +10189,47 @@ dependencies = [ [[package]] name = "spl-token-confidential-transfer-proof-extraction" -version = "0.5.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a22217af69b7a61ca813f47c018afb0b00b02a74a4c70ff099cd4287740bc3d" +checksum = "bedc4675c80409a004da46978674e4073c65c4b1c611bf33d120381edeffe036" dependencies = [ "bytemuck", "solana-account-info", - "solana-curve25519 2.3.7", + "solana-curve25519 2.2.15", "solana-instruction", "solana-instructions-sysvar", "solana-msg", "solana-program-error", "solana-pubkey", "solana-sdk-ids", - "solana-zk-sdk", + "solana-zk-sdk 2.3.6", "spl-pod", "thiserror 2.0.14", ] [[package]] name = "spl-token-confidential-transfer-proof-generation" -version = "0.5.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63a2b41095945dc15274b924b21ccae9b3ec9dc2fdd43dbc08de8c33bbcd915" +checksum = "ae5b124840d4aed474cef101d946a798b806b46a509ee4df91021e1ab1cef3ef" dependencies = [ "curve25519-dalek 4.1.3", - "solana-zk-sdk", + "solana-zk-sdk 2.3.6", "thiserror 2.0.14", ] [[package]] name = "spl-token-group-interface" -version = "0.7.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "452d0f758af20caaa10d9a6f7608232e000d4c74462f248540b3d2ddfa419776" +checksum = "5597b4cd76f85ce7cd206045b7dc22da8c25516573d42d267c8d1fd128db5129" dependencies = [ "bytemuck", "num-derive", "num-traits", - "num_enum", + "solana-decode-error", "solana-instruction", + "solana-msg", "solana-program-error", "solana-pubkey", "spl-discriminator", @@ -10215,9 +10239,9 @@ dependencies = [ [[package]] name = "spl-token-interface" -version = "2.0.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c564ac05a7c8d8b12e988a37d82695b5ba4db376d07ea98bc4882c81f96c7f3" +checksum = "06e0c2d4e38ef5834cf7fb1b592b8a8c6eab8485f5ac7a04a151b502c63a0aaa" dependencies = [ "arrayref", "bytemuck", @@ -10235,15 +10259,17 @@ dependencies = [ [[package]] name = "spl-token-metadata-interface" -version = "0.8.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c467c7c3bd056f8fe60119e7ec34ddd6f23052c2fa8f1f51999098063b72676" +checksum = "304d6e06f0de0c13a621464b1fd5d4b1bebf60d15ca71a44d3839958e0da16ee" dependencies = [ - "borsh", + "borsh 1.5.7", "num-derive", "num-traits", "solana-borsh", + "solana-decode-error", "solana-instruction", + "solana-msg", "solana-program-error", "solana-pubkey", "spl-discriminator", @@ -10254,15 +10280,15 @@ dependencies = [ [[package]] name = "spl-type-length-value" -version = "0.9.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca20a1a19f4507a98ca4b28ff5ed54cac9b9d34ed27863e2bde50a3238f9a6ac" +checksum = "d417eb548214fa822d93f84444024b4e57c13ed6719d4dcc68eec24fb481e9f5" dependencies = [ "bytemuck", "num-derive", "num-traits", - "num_enum", "solana-account-info", + "solana-decode-error", "solana-msg", "solana-program-error", "spl-discriminator", @@ -10502,6 +10528,15 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "termcolor" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +dependencies = [ + "winapi-util", +] + [[package]] name = "termtree" version = "0.4.1" diff --git a/programs/sbf/Cargo.toml b/programs/sbf/Cargo.toml index 8f75fbbd500d77..28f024f1230470 100644 --- a/programs/sbf/Cargo.toml +++ b/programs/sbf/Cargo.toml @@ -112,37 +112,35 @@ rand = "0.8" serde = "1.0.112" # must match the serde_derive version, see https://github.com/serde-rs/serde/issues/2584#issuecomment-1685252251 serde_derive = "1.0.112" # must match the serde version, see https://github.com/serde-rs/serde/issues/2584#issuecomment-1685252251 serde_json = "1.0.56" -sha2 = "0.10.8" -sha3 = "0.10.8" solana-account-decoder = { path = "../../account-decoder", version = "=3.0.0" } -solana-account-info = "=3.0.0" +solana-account-info = "=2.3.0" solana-accounts-db = { path = "../../accounts-db", version = "=3.0.0" } -solana-big-mod-exp = "=3.0.0" -solana-blake3-hasher = { version = "=3.0.0", features = ["blake3"] } -solana-bn254 = "=3.0.0" +solana-big-mod-exp = "=2.2.1" +solana-blake3-hasher = { version = "=2.2.1", features = ["blake3"] } +solana-bn254 = "=2.2.2" solana-bpf-loader-program = { path = "../bpf_loader", version = "=3.0.0" } solana-cli-output = { path = "../../cli-output", version = "=3.0.0" } -solana-clock = { version = "=3.0.0", features = ["serde", "sysvar"] } +solana-clock = { version = "=2.2.2", features = ["serde", "sysvar"] } solana-compute-budget = { path = "../../compute-budget", version = "=3.0.0" } solana-compute-budget-instruction = { path = "../../compute-budget-instruction", version = "=3.0.0" } solana-curve25519 = { path = "../../curves/curve25519", version = "=3.0.0" } -solana-define-syscall = "=3.0.0" +solana-define-syscall = "=2.3.0" solana-fee = { path = "../../fee", version = "=3.0.0" } -solana-hash = { version = "=3.0.0", features = ["bytemuck", "serde", "std"] } -solana-instruction = "=3.0.0" -solana-instructions-sysvar = "=3.0.0" -solana-keccak-hasher = { version = "=3.0.0", features = ["sha3"] } +solana-hash = { version = "=2.3.0", features = ["bytemuck", "serde", "std"] } +solana-instruction = "=2.3.0" +solana-instructions-sysvar = "=2.2.2" +solana-keccak-hasher = { version = "=2.2.1", features = ["sha3"] } solana-ledger = { path = "../../ledger", version = "=3.0.0" } -solana-logger = "=3.0.0" +solana-logger = "=2.3.1" solana-measure = { path = "../../measure", version = "=3.0.0" } -solana-msg = "=3.0.0" +solana-msg = "=2.2.1" solana-poseidon = { path = "../../poseidon/", version = "=3.0.0" } -solana-program = "=3.0.0" -solana-program-entrypoint = "=3.1.0" -solana-program-error = "=3.0.0" -solana-program-memory = "=3.0.0" +solana-program = "=2.2.1" +solana-program-entrypoint = "=2.3.0" +solana-program-error = "=2.2.2" +solana-program-memory = "=2.2.1" solana-program-runtime = { path = "../../program-runtime", version = "=3.0.0" } -solana-pubkey = { version = "=3.0.0", default-features = false } +solana-pubkey = { version = "=2.4.0", default-features = false } solana-runtime = { path = "../../runtime", version = "=3.0.0" } solana-runtime-transaction = { path = "../../runtime-transaction", version = "=3.0.0" } solana-sbf-rust-128bit-dep = { path = "rust/128bit_dep", version = "=3.0.0" } @@ -154,10 +152,10 @@ solana-sbf-rust-param-passing-dep = { path = "rust/param_passing_dep", version = solana-sbf-rust-realloc-dep = { path = "rust/realloc_dep", version = "=3.0.0" } solana-sbf-rust-realloc-invoke-dep = { path = "rust/realloc_invoke_dep", version = "=3.0.0" } solana-sbpf = "=0.12.2" -solana-sdk-ids = "=3.0.0" -solana-secp256k1-recover = "=3.0.0" -solana-sha256-hasher = { version = "=3.0.0", features = ["sha2"] } -solana-stake-interface = { version = "=2.0.0", features = ["bincode"] } +solana-sdk-ids = "=2.2.1" +solana-secp256k1-recover = "=2.2.1" +solana-sha256-hasher = { version = "=2.3.0", features = ["sha2"] } +solana-stake-interface = { version = "=1.2.1", features = ["bincode"] } solana-svm = { path = "../../svm", version = "=3.0.0" } solana-svm-callback = { path = "../../svm-callback", version = "=3.0.0" } solana-svm-feature-set = { path = "../../svm-feature-set", version = "=3.0.0" } @@ -165,8 +163,8 @@ solana-svm-log-collector = { path = "../../svm-log-collector", version = "=3.0.0 solana-svm-timings = { path = "../../svm-timings", version = "=3.0.0" } solana-svm-transaction = { path = "../../svm-transaction", version = "=3.0.0" } solana-svm-type-overrides = { path = "../../svm-type-overrides", version = "=3.0.0" } -solana-system-interface = { version = "=2.0", features = ["bincode"] } -solana-sysvar = "=3.0.0" +solana-system-interface = { version = "=1.0", features = ["bincode"] } +solana-sysvar = "=2.2.2" solana-transaction-context = { path = "../../transaction-context", version = "=3.0.0" } solana-transaction-status = { path = "../../transaction-status", version = "=3.0.0" } solana-vote = { path = "../../vote", version = "=3.0.0" } @@ -194,38 +192,37 @@ itertools = { workspace = true } log = { workspace = true } miow = { workspace = true } net2 = { workspace = true } -solana-account = "3.0.0" +solana-account = "2.2.1" solana-account-decoder = { workspace = true } -solana-account-info = "3.0.0" +solana-account-info = "2.3.0" solana-accounts-db = { workspace = true } solana-bpf-loader-program = { workspace = true } solana-cli-output = { workspace = true } -solana-client-traits = "3.0.0" -solana-clock = "3.0.0" -solana-cluster-type = "3.0.0" +solana-client-traits = "2.2.1" +solana-clock = "2.2.1" solana-compute-budget = { workspace = true } solana-compute-budget-instruction = { workspace = true, features = [ "dev-context-only-utils", ] } -solana-compute-budget-interface = "3.0.0" +solana-compute-budget-interface = "2.2.2" solana-fee = { workspace = true } -solana-fee-calculator = "3.0.0" -solana-fee-structure = "3.0.0" -solana-genesis-config = "3.0.0" -solana-hash = "3.0.0" -solana-instruction = "3.0.0" -solana-keypair = "3.0.0" +solana-fee-calculator = "2.2.1" +solana-fee-structure = "2.3.0" +solana-genesis-config = "2.2.1" +solana-hash = "2.2.1" +solana-instruction = "2.2.1" +solana-keypair = "2.2.1" solana-ledger = { workspace = true } -solana-loader-v3-interface = "6.1.0" -solana-loader-v4-interface = "3.1.0" +solana-loader-v3-interface = "5.0.0" +solana-loader-v4-interface = "2.2.1" solana-logger = { workspace = true } solana-measure = { workspace = true } -solana-message = "3.0.0" +solana-message = "2.3.0" solana-program = { workspace = true } -solana-program-entrypoint = "3.1.0" +solana-program-entrypoint = "2.3.0" solana-program-runtime = { workspace = true } -solana-pubkey = "3.0.0" -solana-rent = "3.0.0" +solana-pubkey = "2.4.0" +solana-rent = "2.2.1" solana-runtime = { workspace = true, features = ["dev-context-only-utils"] } solana-runtime-transaction = { workspace = true, features = [ "dev-context-only-utils", @@ -234,9 +231,9 @@ solana-sbf-rust-invoke-dep = { workspace = true } solana-sbf-rust-realloc-dep = { workspace = true } solana-sbf-rust-realloc-invoke-dep = { workspace = true } solana-sbpf = { workspace = true } -solana-sdk-ids = "3.0.0" -solana-signer = "3.0.0" -solana-stake-interface = "2.0.0" +solana-sdk-ids = "2.2.1" +solana-signer = "2.2.1" +solana-stake-interface = "1.2.1" solana-svm = { workspace = true } solana-svm-callback = { workspace = true } solana-svm-feature-set = { workspace = true } @@ -244,11 +241,11 @@ solana-svm-log-collector = { workspace = true } solana-svm-timings = { workspace = true } solana-svm-transaction = { workspace = true } solana-svm-type-overrides = { workspace = true } -solana-system-interface = "2.0" -solana-sysvar = "3.0.0" -solana-transaction = "3.0.0" +solana-system-interface = "1.0" +solana-sysvar = "2.2.1" +solana-transaction = "2.2.2" solana-transaction-context = { workspace = true, features = ["dev-context-only-utils"] } -solana-transaction-error = "3.0.0" +solana-transaction-error = "2.2.1" solana-transaction-status = { workspace = true } solana-vote = { workspace = true } solana-vote-program = { workspace = true } diff --git a/programs/sbf/rust/account_mem/src/lib.rs b/programs/sbf/rust/account_mem/src/lib.rs index 3cbc0857b3453d..7d20446b9f0101 100644 --- a/programs/sbf/rust/account_mem/src/lib.rs +++ b/programs/sbf/rust/account_mem/src/lib.rs @@ -27,103 +27,107 @@ pub fn process_instruction( unsafe { std::slice::from_raw_parts_mut(data, data_len) } }; - unsafe { - match instruction_data[0] { - 0 => { - // memcmp overlaps begining - #[allow(clippy::manual_memcpy)] - for i in 0..500 { - buf[i] = too_early(8)[i]; - } - - sol_memcmp(too_early(8), &buf, 500); + match instruction_data[0] { + 0 => { + // memcmp overlaps begining + #[allow(clippy::manual_memcpy)] + for i in 0..500 { + buf[i] = too_early(8)[i]; } - 1 => { - // memcmp overlaps begining - #[allow(clippy::manual_memcpy)] - for i in 0..12 { - buf[i] = too_early(9)[i]; - } - sol_memcmp(&buf, too_early(9), 12); + sol_memcmp(too_early(8), &buf, 500); + } + 1 => { + // memcmp overlaps begining + #[allow(clippy::manual_memcpy)] + for i in 0..12 { + buf[i] = too_early(9)[i]; } - 2 => { - // memcmp overlaps begining - #[allow(clippy::manual_memcpy)] - for i in 0..3 { - buf[i] = too_early(2)[i]; - } - // memset overlaps begin of account area - sol_memset(too_early(2), 3, 3); - sol_memcpy(too_early(2), &buf, 3); - } - 3 => { - // memcpy src overlaps begin of account - sol_memcpy(&mut buf, too_early(3), 10); - } - 4 => { - // memmov src overlaps begin of account - sol_memmove(buf.as_mut_ptr(), too_early(3).as_ptr(), 10); - } - 5 => { - // memcpy dst overlaps begin of account - sol_memcpy(too_early(3), &buf, 10); - } - 6 => { - // memmov dst overlaps begin of account - sol_memmove(too_early(3).as_mut_ptr(), buf.as_ptr(), 10); - } - 7 => { - // memmove dst overlaps begin of account, reverse order - sol_memmove(too_early(0).as_mut_ptr(), too_early(3).as_ptr(), 10); - } - 8 => { - // memcmp overlaps end - sol_memcmp(&buf, &data[data_len.saturating_sub(8)..], 16); - } - 9 => { - // memcmp overlaps end - sol_memcmp(&data[data_len.saturating_sub(7)..], &buf, 15); - } - 10 => { - // memset overlaps end of account - sol_memset(&mut data[data_len.saturating_sub(2)..], 0, 3); - } - 11 => { - // memcpy src overlaps end of account - sol_memcpy(&mut buf, &data[data_len.saturating_sub(3)..], 10); + sol_memcmp(&buf, too_early(9), 12); + } + 2 => { + // memcmp overlaps begining + #[allow(clippy::manual_memcpy)] + for i in 0..3 { + buf[i] = too_early(2)[i]; } - 12 => { - // memmov src overlaps end of account + + // memset overlaps begin of account area + sol_memset(too_early(2), 3, 3); + sol_memcpy(too_early(2), &buf, 3); + } + 3 => { + // memcpy src overlaps begin of account + sol_memcpy(&mut buf, too_early(3), 10); + } + 4 => { + // memmov src overlaps begin of account + unsafe { sol_memmove(buf.as_mut_ptr(), too_early(3).as_ptr(), 10) }; + } + 5 => { + // memcpy dst overlaps begin of account + sol_memcpy(too_early(3), &buf, 10); + } + 6 => { + // memmov dst overlaps begin of account + unsafe { sol_memmove(too_early(3).as_mut_ptr(), buf.as_ptr(), 10) }; + } + 7 => { + // memmove dst overlaps begin of account, reverse order + unsafe { sol_memmove(too_early(0).as_mut_ptr(), too_early(3).as_ptr(), 10) }; + } + 8 => { + // memcmp overlaps end + sol_memcmp(&buf, &data[data_len.saturating_sub(8)..], 16); + } + 9 => { + // memcmp overlaps end + sol_memcmp(&data[data_len.saturating_sub(7)..], &buf, 15); + } + 10 => { + // memset overlaps end of account + sol_memset(&mut data[data_len.saturating_sub(2)..], 0, 3); + } + 11 => { + // memcpy src overlaps end of account + sol_memcpy(&mut buf, &data[data_len.saturating_sub(3)..], 10); + } + 12 => { + // memmov src overlaps end of account + unsafe { sol_memmove( buf.as_mut_ptr(), data[data_len.saturating_sub(3)..].as_ptr(), 10, - ); - } - 13 => { - // memcpy dst overlaps end of account - sol_memcpy(&mut data[data_len.saturating_sub(3)..], &buf, 10); - } - 14 => { - // memmov dst overlaps end of account + ) + }; + } + 13 => { + // memcpy dst overlaps end of account + sol_memcpy(&mut data[data_len.saturating_sub(3)..], &buf, 10); + } + 14 => { + // memmov dst overlaps end of account + unsafe { sol_memmove( data[data_len.saturating_sub(3)..].as_mut_ptr(), buf.as_ptr(), 10, - ); - } - 15 => { - // memmove dst overlaps end of account, reverse order + ) + }; + } + 15 => { + // memmove dst overlaps end of account, reverse order + unsafe { sol_memmove( data[data_len..].as_mut_ptr(), data[data_len.saturating_sub(3)..].as_mut_ptr(), 10, - ); - } - _ => {} + ) + }; } + _ => {} } Ok(()) diff --git a/programs/sbf/rust/account_mem_deprecated/src/lib.rs b/programs/sbf/rust/account_mem_deprecated/src/lib.rs index 7719cf949b64ca..4a95e6b8202618 100644 --- a/programs/sbf/rust/account_mem_deprecated/src/lib.rs +++ b/programs/sbf/rust/account_mem_deprecated/src/lib.rs @@ -27,96 +27,100 @@ pub fn process_instruction( unsafe { std::slice::from_raw_parts_mut(data, data_len.wrapping_add(100)) } }; - unsafe { - match instruction_data[0] { - 0 => { - // memcmp overlaps begining - #[allow(clippy::manual_memcpy)] - for i in 0..90 { - buf[i] = too_early(8)[i]; - } - - sol_memcmp(too_early(8), &buf, 90); + match instruction_data[0] { + 0 => { + // memcmp overlaps begining + #[allow(clippy::manual_memcpy)] + for i in 0..90 { + buf[i] = too_early(8)[i]; } - 1 => { - // memcmp overlaps begining - #[allow(clippy::manual_memcpy)] - for i in 0..12 { - buf[i] = too_early(9)[i]; - } - sol_memcmp(&buf, too_early(9), 12); - } - 2 => { - // memset overlaps begin of account area - sol_memset(too_early(2), 3, 3); - } - 3 => { - // memcpy src overlaps begin of account - sol_memcpy(&mut buf, too_early(3), 10); - } - 4 => { - // memmov src overlaps begin of account - sol_memmove(buf.as_mut_ptr(), too_early(3).as_ptr(), 10); - } - 5 => { - // memcpy dst overlaps begin of account - sol_memcpy(too_early(3), &buf, 10); - } - 6 => { - // memmov dst overlaps begin of account - sol_memmove(too_early(3).as_mut_ptr(), buf.as_ptr(), 10); - } - 7 => { - // memmove dst overlaps begin of account, reverse order - sol_memmove(too_early(0).as_mut_ptr(), too_early(3).as_ptr(), 10); - } - 8 => { - // memcmp overlaps end - sol_memcmp(&buf, &data[data_len.saturating_sub(8)..], 16); - } - 9 => { - // memcmp overlaps end - sol_memcmp(&data[data_len.saturating_sub(7)..], &buf, 15); - } - 10 => { - // memset overlaps end of account - sol_memset(&mut data[data_len.saturating_sub(2)..], 0, 3); - } - 11 => { - // memcpy src overlaps end of account - sol_memcpy(&mut buf, &data[data_len.saturating_sub(3)..], 10); + sol_memcmp(too_early(8), &buf, 90); + } + 1 => { + // memcmp overlaps begining + #[allow(clippy::manual_memcpy)] + for i in 0..12 { + buf[i] = too_early(9)[i]; } - 12 => { - // memmov src overlaps end of account + + sol_memcmp(&buf, too_early(9), 12); + } + 2 => { + // memset overlaps begin of account area + sol_memset(too_early(2), 3, 3); + } + 3 => { + // memcpy src overlaps begin of account + sol_memcpy(&mut buf, too_early(3), 10); + } + 4 => { + // memmov src overlaps begin of account + unsafe { sol_memmove(buf.as_mut_ptr(), too_early(3).as_ptr(), 10) }; + } + 5 => { + // memcpy dst overlaps begin of account + sol_memcpy(too_early(3), &buf, 10); + } + 6 => { + // memmov dst overlaps begin of account + unsafe { sol_memmove(too_early(3).as_mut_ptr(), buf.as_ptr(), 10) }; + } + 7 => { + // memmove dst overlaps begin of account, reverse order + unsafe { sol_memmove(too_early(0).as_mut_ptr(), too_early(3).as_ptr(), 10) }; + } + 8 => { + // memcmp overlaps end + sol_memcmp(&buf, &data[data_len.saturating_sub(8)..], 16); + } + 9 => { + // memcmp overlaps end + sol_memcmp(&data[data_len.saturating_sub(7)..], &buf, 15); + } + 10 => { + // memset overlaps end of account + sol_memset(&mut data[data_len.saturating_sub(2)..], 0, 3); + } + 11 => { + // memcpy src overlaps end of account + sol_memcpy(&mut buf, &data[data_len.saturating_sub(3)..], 10); + } + 12 => { + // memmov src overlaps end of account + unsafe { sol_memmove( buf.as_mut_ptr(), data[data_len.saturating_sub(3)..].as_ptr(), 10, - ); - } - 13 => { - // memcpy dst overlaps end of account - sol_memcpy(&mut data[data_len.saturating_sub(3)..], &buf, 10); - } - 14 => { - // memmov dst overlaps end of account + ) + }; + } + 13 => { + // memcpy dst overlaps end of account + sol_memcpy(&mut data[data_len.saturating_sub(3)..], &buf, 10); + } + 14 => { + // memmov dst overlaps end of account + unsafe { sol_memmove( data[data_len.saturating_sub(3)..].as_mut_ptr(), buf.as_ptr(), 10, - ); - } - 15 => { - // memmove dst overlaps end of account, reverse order + ) + }; + } + 15 => { + // memmove dst overlaps end of account, reverse order + unsafe { sol_memmove( data[data_len..].as_mut_ptr(), data[data_len.saturating_sub(3)..].as_mut_ptr(), 10, - ); - } - _ => {} + ) + }; } + _ => {} } Ok(()) diff --git a/programs/sbf/rust/caller_access/src/lib.rs b/programs/sbf/rust/caller_access/src/lib.rs index 0cd5363d7a721a..69cee1fd8c570d 100644 --- a/programs/sbf/rust/caller_access/src/lib.rs +++ b/programs/sbf/rust/caller_access/src/lib.rs @@ -20,7 +20,8 @@ fn process_instruction( let mut lamports = accounts[0].lamports(); let owner = &accounts[0].owner; let mut data = accounts[0].try_borrow_mut_data()?; - let account = AccountInfo::new(&key, false, false, &mut lamports, &mut data, owner, true); + let account = + AccountInfo::new(&key, false, false, &mut lamports, &mut data, owner, true, 0); msg!("{:?} calling {:?}", program_id, key); invoke(&ix, &[account])?; } else { diff --git a/programs/sbf/rust/error_handling/src/lib.rs b/programs/sbf/rust/error_handling/src/lib.rs index b60fdf49973038..91ec09378ee3f6 100644 --- a/programs/sbf/rust/error_handling/src/lib.rs +++ b/programs/sbf/rust/error_handling/src/lib.rs @@ -23,7 +23,10 @@ impl From for ProgramError { } } impl ToStr for MyError { - fn to_str(&self) -> &'static str { + fn to_str(&self) -> &'static str + where + E: 'static + ToStr + TryFrom, + { match self { MyError::DefaultEnumStart => "Error: Default enum start", MyError::TheAnswer => "Error: The Answer", diff --git a/programs/sbf/rust/invoke/src/lib.rs b/programs/sbf/rust/invoke/src/lib.rs index 6b9414974df386..0949e58d0a0564 100644 --- a/programs/sbf/rust/invoke/src/lib.rs +++ b/programs/sbf/rust/invoke/src/lib.rs @@ -538,7 +538,7 @@ fn process_instruction<'a>( let data = unsafe { std::slice::from_raw_parts_mut(ptr, len) }; let mut lamports = accounts[FROM_INDEX].lamports(); let from_info = - AccountInfo::new(&pubkey, false, true, &mut lamports, data, &owner, false); + AccountInfo::new(&pubkey, false, true, &mut lamports, data, &owner, false, 0); let pubkey = *accounts[DERIVED_KEY1_INDEX].key; let owner = *accounts[DERIVED_KEY1_INDEX].owner; @@ -546,7 +546,7 @@ fn process_instruction<'a>( let data = unsafe { std::slice::from_raw_parts_mut(0x300007ff8 as *mut _, 0) }; let mut lamports = accounts[DERIVED_KEY1_INDEX].lamports(); let derived_info = - AccountInfo::new(&pubkey, false, true, &mut lamports, data, &owner, false); + AccountInfo::new(&pubkey, false, true, &mut lamports, data, &owner, false, 0); let pubkey = *accounts[SYSTEM_PROGRAM_INDEX].key; let owner = *accounts[SYSTEM_PROGRAM_INDEX].owner; @@ -555,7 +555,7 @@ fn process_instruction<'a>( let data = unsafe { std::slice::from_raw_parts_mut(ptr, len) }; let mut lamports = accounts[SYSTEM_PROGRAM_INDEX].lamports(); let system_info = - AccountInfo::new(&pubkey, false, false, &mut lamports, data, &owner, true); + AccountInfo::new(&pubkey, false, false, &mut lamports, data, &owner, true, 0); let instruction = system_instruction::create_account( accounts[FROM_INDEX].key, @@ -1379,7 +1379,7 @@ fn process_instruction<'a>( #[cfg(target_feature = "dynamic-frames")] // When we have dynamic frames, the stack grows from the higher addresses, so we // compare from zero until the beginning of a function frame. - unsafe { + { const ZEROED_BYTES_LENGTH: usize = (MAX_CALL_DEPTH - 2) * STACK_FRAME_SIZE; assert_eq!(sol_memcmp(stack, &ZEROS, ZEROED_BYTES_LENGTH), 0); stack[..ZEROED_BYTES_LENGTH].fill(42); diff --git a/programs/sbf/rust/invoked/src/lib.rs b/programs/sbf/rust/invoked/src/lib.rs index 1262ccc83a3e51..2d577803c9d153 100644 --- a/programs/sbf/rust/invoked/src/lib.rs +++ b/programs/sbf/rust/invoked/src/lib.rs @@ -47,6 +47,7 @@ fn process_instruction( assert_eq!(accounts[ARGUMENT_INDEX].data_len(), 100); assert!(accounts[ARGUMENT_INDEX].is_signer); assert!(accounts[ARGUMENT_INDEX].is_writable); + assert_eq!(accounts[ARGUMENT_INDEX].rent_epoch, u64::MAX); assert!(!accounts[ARGUMENT_INDEX].executable); { let data = accounts[ARGUMENT_INDEX].try_borrow_data()?; @@ -63,12 +64,14 @@ fn process_instruction( assert_eq!(accounts[INVOKED_ARGUMENT_INDEX].data_len(), 10); assert!(accounts[INVOKED_ARGUMENT_INDEX].is_signer); assert!(accounts[INVOKED_ARGUMENT_INDEX].is_writable); + assert_eq!(accounts[INVOKED_ARGUMENT_INDEX].rent_epoch, u64::MAX); assert!(!accounts[INVOKED_ARGUMENT_INDEX].executable); assert_eq!(accounts[INVOKED_PROGRAM_INDEX].key, program_id); assert_eq!(accounts[INVOKED_PROGRAM_INDEX].owner, &loader_v4::id()); assert!(!accounts[INVOKED_PROGRAM_INDEX].is_signer); assert!(!accounts[INVOKED_PROGRAM_INDEX].is_writable); + assert_eq!(accounts[INVOKED_PROGRAM_INDEX].rent_epoch, u64::MAX); assert!(accounts[INVOKED_PROGRAM_INDEX].executable); assert_eq!( @@ -91,13 +94,10 @@ fn process_instruction( accounts[INVOKED_PROGRAM_INDEX].is_writable, accounts[INVOKED_PROGRAM_DUP_INDEX].is_writable ); - #[allow(deprecated)] - { - assert_eq!( - accounts[INVOKED_PROGRAM_INDEX]._unused, - accounts[INVOKED_PROGRAM_DUP_INDEX]._unused - ); - } + assert_eq!( + accounts[INVOKED_PROGRAM_INDEX].rent_epoch, + accounts[INVOKED_PROGRAM_DUP_INDEX].rent_epoch + ); assert_eq!( accounts[INVOKED_PROGRAM_INDEX].executable, accounts[INVOKED_PROGRAM_DUP_INDEX].executable diff --git a/programs/sbf/rust/mem/src/lib.rs b/programs/sbf/rust/mem/src/lib.rs index 1c305469b4cf8a..0fb4aac820bd34 100644 --- a/programs/sbf/rust/mem/src/lib.rs +++ b/programs/sbf/rust/mem/src/lib.rs @@ -18,16 +18,16 @@ pub fn process_instruction( #[derive(Default)] struct MemOpSyscalls(); impl MemOps for MemOpSyscalls { - unsafe fn memcpy(&self, dst: &mut [u8], src: &[u8], n: usize) { + fn memcpy(&self, dst: &mut [u8], src: &[u8], n: usize) { sol_memcpy(dst, src, n) } unsafe fn memmove(&self, dst: *mut u8, src: *mut u8, n: usize) { sol_memmove(dst, src, n) } - unsafe fn memset(&self, s: &mut [u8], c: u8, n: usize) { + fn memset(&self, s: &mut [u8], c: u8, n: usize) { sol_memset(s, c, n) } - unsafe fn memcmp(&self, s1: &[u8], s2: &[u8], n: usize) -> i32 { + fn memcmp(&self, s1: &[u8], s2: &[u8], n: usize) -> i32 { sol_memcmp(s1, s2, n) } } diff --git a/programs/sbf/rust/mem_dep/src/lib.rs b/programs/sbf/rust/mem_dep/src/lib.rs index 09bee16265b789..42624569d3726b 100644 --- a/programs/sbf/rust/mem_dep/src/lib.rs +++ b/programs/sbf/rust/mem_dep/src/lib.rs @@ -1,45 +1,40 @@ //! Test mem functions pub trait MemOps { - /// # Safety - unsafe fn memcpy(&self, dst: &mut [u8], src: &[u8], n: usize); + fn memcpy(&self, dst: &mut [u8], src: &[u8], n: usize); /// # Safety unsafe fn memmove(&self, dst: *mut u8, src: *mut u8, n: usize); - /// # Safety - unsafe fn memset(&self, s: &mut [u8], c: u8, n: usize); - /// # Safety - unsafe fn memcmp(&self, s1: &[u8], s2: &[u8], n: usize) -> i32; + fn memset(&self, s: &mut [u8], c: u8, n: usize); + fn memcmp(&self, s1: &[u8], s2: &[u8], n: usize) -> i32; } pub fn run_mem_tests(mem_ops: T) { // memcpy - unsafe { - let src = &[1_u8; 18]; - let dst = &mut [0_u8; 1]; - mem_ops.memcpy(dst, src, 1); - assert_eq!(&src[..1], dst); - let dst = &mut [0_u8; 3]; - mem_ops.memcpy(dst, src, 3); - assert_eq!(&src[..3], dst); - let dst = &mut [0_u8; 8]; - mem_ops.memcpy(dst, src, 8); - assert_eq!(&src[..8], dst); - let dst = &mut [0_u8; 9]; - mem_ops.memcpy(dst, src, 9); - assert_eq!(&src[..9], dst); - let dst = &mut [0_u8; 16]; - mem_ops.memcpy(dst, src, 16); - assert_eq!(&src[..16], dst); - let dst = &mut [0_u8; 18]; - mem_ops.memcpy(dst, src, 18); - assert_eq!(&src[..18], dst); - let dst = &mut [0_u8; 18]; - mem_ops.memcpy(dst, &src[1..], 17); - assert_eq!(&src[1..], &dst[..17]); - let dst = &mut [0_u8; 18]; - mem_ops.memcpy(&mut dst[1..], &src[1..], 17); - assert_eq!(&src[1..], &dst[1..]); - } + let src = &[1_u8; 18]; + let dst = &mut [0_u8; 1]; + mem_ops.memcpy(dst, src, 1); + assert_eq!(&src[..1], dst); + let dst = &mut [0_u8; 3]; + mem_ops.memcpy(dst, src, 3); + assert_eq!(&src[..3], dst); + let dst = &mut [0_u8; 8]; + mem_ops.memcpy(dst, src, 8); + assert_eq!(&src[..8], dst); + let dst = &mut [0_u8; 9]; + mem_ops.memcpy(dst, src, 9); + assert_eq!(&src[..9], dst); + let dst = &mut [0_u8; 16]; + mem_ops.memcpy(dst, src, 16); + assert_eq!(&src[..16], dst); + let dst = &mut [0_u8; 18]; + mem_ops.memcpy(dst, src, 18); + assert_eq!(&src[..18], dst); + let dst = &mut [0_u8; 18]; + mem_ops.memcpy(dst, &src[1..], 17); + assert_eq!(&src[1..], &dst[..17]); + let dst = &mut [0_u8; 18]; + mem_ops.memcpy(&mut dst[1..], &src[1..], 17); + assert_eq!(&src[1..], &dst[1..]); // memmove unsafe { @@ -112,60 +107,56 @@ pub fn run_mem_tests(mem_ops: T) { } // memset - unsafe { - let exp = &[1_u8; 18]; - let buf = &mut [0_u8; 18]; - mem_ops.memset(&mut buf[0..], 1, 1); - assert_eq!(exp[..1], buf[..1]); - mem_ops.memset(&mut buf[0..], 1, 3); - assert_eq!(exp[..3], buf[..3]); - mem_ops.memset(&mut buf[0..], 1, 8); - assert_eq!(exp[..8], buf[..8]); - mem_ops.memset(&mut buf[0..], 1, 9); - assert_eq!(exp[..9], buf[..9]); - mem_ops.memset(&mut buf[0..], 1, 16); - assert_eq!(exp[..16], buf[..16]); - mem_ops.memset(&mut buf[0..], 1, 18); - assert_eq!(exp[..18], buf[..18]); - mem_ops.memset(&mut buf[1..], 1, 17); - assert_eq!(exp[1..18], buf[1..18]); - } + let exp = &[1_u8; 18]; + let buf = &mut [0_u8; 18]; + mem_ops.memset(&mut buf[0..], 1, 1); + assert_eq!(exp[..1], buf[..1]); + mem_ops.memset(&mut buf[0..], 1, 3); + assert_eq!(exp[..3], buf[..3]); + mem_ops.memset(&mut buf[0..], 1, 8); + assert_eq!(exp[..8], buf[..8]); + mem_ops.memset(&mut buf[0..], 1, 9); + assert_eq!(exp[..9], buf[..9]); + mem_ops.memset(&mut buf[0..], 1, 16); + assert_eq!(exp[..16], buf[..16]); + mem_ops.memset(&mut buf[0..], 1, 18); + assert_eq!(exp[..18], buf[..18]); + mem_ops.memset(&mut buf[1..], 1, 17); + assert_eq!(exp[1..18], buf[1..18]); // memcmp - unsafe { - assert_eq!(-1, mem_ops.memcmp(&[0_u8], &[1_u8], 1)); - assert_eq!(-1, mem_ops.memcmp(&[0_u8, 0, 0], &[0_u8, 0, 1], 3)); - assert_eq!( - 0, - mem_ops.memcmp( - &[0_u8, 0, 0, 0, 0, 0, 0, 0, 0], - &[0_u8, 0, 0, 0, 0, 0, 0, 0, 0], - 9 - ) - ); - assert_eq!( - -1, - mem_ops.memcmp( - &[0_u8, 0, 0, 0, 0, 0, 0, 0, 0], - &[0_u8, 0, 0, 0, 0, 0, 0, 0, 1], - 9 - ) - ); - assert_eq!( - -1, - mem_ops.memcmp( - &[0_u8, 0, 0, 0, 0, 0, 0, 0, 0, 0], - &[0_u8, 0, 0, 0, 0, 0, 0, 0, 0, 1], - 10 - ) - ); - assert_eq!(0, mem_ops.memcmp(&[0_u8; 8], &[0_u8; 8], 8)); - assert_eq!(-1, mem_ops.memcmp(&[0_u8; 8], &[1_u8; 8], 8)); - assert_eq!(-1, mem_ops.memcmp(&[0_u8; 16], &[1_u8; 16], 16)); - assert_eq!(-1, mem_ops.memcmp(&[0_u8; 18], &[1_u8; 18], 18)); - let one = &[0_u8; 18]; - let two = &[1_u8; 18]; - assert_eq!(-1, mem_ops.memcmp(&one[1..], &two[0..], 17)); - assert_eq!(-1, mem_ops.memcmp(&one[1..], &two[1..], 17)); - } + assert_eq!(-1, mem_ops.memcmp(&[0_u8], &[1_u8], 1)); + assert_eq!(-1, mem_ops.memcmp(&[0_u8, 0, 0], &[0_u8, 0, 1], 3)); + assert_eq!( + 0, + mem_ops.memcmp( + &[0_u8, 0, 0, 0, 0, 0, 0, 0, 0], + &[0_u8, 0, 0, 0, 0, 0, 0, 0, 0], + 9 + ) + ); + assert_eq!( + -1, + mem_ops.memcmp( + &[0_u8, 0, 0, 0, 0, 0, 0, 0, 0], + &[0_u8, 0, 0, 0, 0, 0, 0, 0, 1], + 9 + ) + ); + assert_eq!( + -1, + mem_ops.memcmp( + &[0_u8, 0, 0, 0, 0, 0, 0, 0, 0, 0], + &[0_u8, 0, 0, 0, 0, 0, 0, 0, 0, 1], + 10 + ) + ); + assert_eq!(0, mem_ops.memcmp(&[0_u8; 8], &[0_u8; 8], 8)); + assert_eq!(-1, mem_ops.memcmp(&[0_u8; 8], &[1_u8; 8], 8)); + assert_eq!(-1, mem_ops.memcmp(&[0_u8; 16], &[1_u8; 16], 16)); + assert_eq!(-1, mem_ops.memcmp(&[0_u8; 18], &[1_u8; 18], 18)); + let one = &[0_u8; 18]; + let two = &[1_u8; 18]; + assert_eq!(-1, mem_ops.memcmp(&one[1..], &two[0..], 17)); + assert_eq!(-1, mem_ops.memcmp(&one[1..], &two[1..], 17)); } diff --git a/programs/sbf/rust/membuiltins/src/lib.rs b/programs/sbf/rust/membuiltins/src/lib.rs index 037f85c2df859a..da41a6634673a4 100644 --- a/programs/sbf/rust/membuiltins/src/lib.rs +++ b/programs/sbf/rust/membuiltins/src/lib.rs @@ -14,7 +14,7 @@ pub extern "C" fn entrypoint(_input: *mut u8) -> u64 { #[derive(Default)] struct MemOpSyscalls(); impl MemOps for MemOpSyscalls { - unsafe fn memcpy(&self, dst: &mut [u8], src: &[u8], n: usize) { + fn memcpy(&self, dst: &mut [u8], src: &[u8], n: usize) { unsafe { compiler_builtins::mem::memcpy(dst.as_mut_ptr(), src.as_ptr(), n); } @@ -22,12 +22,12 @@ pub extern "C" fn entrypoint(_input: *mut u8) -> u64 { unsafe fn memmove(&self, dst: *mut u8, src: *mut u8, n: usize) { compiler_builtins::mem::memmove(dst, src, n); } - unsafe fn memset(&self, s: &mut [u8], c: u8, n: usize) { + fn memset(&self, s: &mut [u8], c: u8, n: usize) { unsafe { compiler_builtins::mem::memset(s.as_mut_ptr(), c as i32, n); } } - unsafe fn memcmp(&self, s1: &[u8], s2: &[u8], n: usize) -> i32 { + fn memcmp(&self, s1: &[u8], s2: &[u8], n: usize) -> i32 { unsafe { compiler_builtins::mem::memcmp(s1.as_ptr(), s2.as_ptr(), n) } } } diff --git a/programs/sbf/rust/secp256k1_recover/Cargo.toml b/programs/sbf/rust/secp256k1_recover/Cargo.toml index 8760d9739132b7..6615cfb4b290cb 100644 --- a/programs/sbf/rust/secp256k1_recover/Cargo.toml +++ b/programs/sbf/rust/secp256k1_recover/Cargo.toml @@ -13,9 +13,7 @@ crate-type = ["cdylib"] [dependencies] libsecp256k1 = { workspace = true } -sha3 = { workspace = true } -solana-hash = { workspace = true } -solana-keccak-hasher = { workspace = true, features = ["sha3"] } +solana-keccak-hasher = { workspace = true } solana-msg = { workspace = true } solana-program-entrypoint = { workspace = true } solana-secp256k1-recover = { workspace = true } diff --git a/programs/sbf/rust/secp256k1_recover/src/lib.rs b/programs/sbf/rust/secp256k1_recover/src/lib.rs index b7f65f0a08b4a7..1b749d5aef1565 100644 --- a/programs/sbf/rust/secp256k1_recover/src/lib.rs +++ b/programs/sbf/rust/secp256k1_recover/src/lib.rs @@ -37,14 +37,6 @@ fn test_secp256k1_recover() { /// secp256k1_recover allows malleable signatures fn test_secp256k1_recover_malleability() { let message = b"hello world"; - #[cfg(target_os = "solana")] - let message_hash = { - use sha3::Digest; - let mut hasher = sha3::Keccak256::default(); - hasher.update(message); - solana_hash::Hash::new_from_array(hasher.finalize().into()) - }; - #[cfg(not(target_os = "solana"))] let message_hash = { let mut hasher = solana_keccak_hasher::Hasher::default(); hasher.hash(message); @@ -78,15 +70,11 @@ fn test_secp256k1_recover_malleability() { let alt_recovery_id = alt_recovery_id.serialize(); let recovered_pubkey = - secp256k1_recover(message_hash.as_bytes(), recovery_id, &signature_bytes[..]).unwrap(); + secp256k1_recover(&message_hash.0, recovery_id, &signature_bytes[..]).unwrap(); assert_eq!(recovered_pubkey.to_bytes(), pubkey_bytes); - let alt_recovered_pubkey = secp256k1_recover( - message_hash.as_bytes(), - alt_recovery_id, - &alt_signature_bytes[..], - ) - .unwrap(); + let alt_recovered_pubkey = + secp256k1_recover(&message_hash.0, alt_recovery_id, &alt_signature_bytes[..]).unwrap(); assert_eq!(alt_recovered_pubkey.to_bytes(), pubkey_bytes); } diff --git a/programs/sbf/rust/sha/Cargo.toml b/programs/sbf/rust/sha/Cargo.toml index 94876f0aa9d959..16fd6658852c2f 100644 --- a/programs/sbf/rust/sha/Cargo.toml +++ b/programs/sbf/rust/sha/Cargo.toml @@ -13,14 +13,11 @@ crate-type = ["cdylib"] [dependencies] blake3 = { workspace = true } -sha2 = { workspace = true } -sha3 = { workspace = true } -solana-blake3-hasher = { workspace = true, features = ["blake3"] } -solana-hash = { workspace = true } -solana-keccak-hasher = { workspace = true, features = ["sha3"] } +solana-blake3-hasher = { workspace = true } +solana-keccak-hasher = { workspace = true } solana-msg = { workspace = true } solana-program-entrypoint = { workspace = true } -solana-sha256-hasher = { workspace = true, features = ["sha2"] } +solana-sha256-hasher = { workspace = true } [lints] workspace = true diff --git a/programs/sbf/rust/sha/src/lib.rs b/programs/sbf/rust/sha/src/lib.rs index d622ebd3c03852..3763969a13aa06 100644 --- a/programs/sbf/rust/sha/src/lib.rs +++ b/programs/sbf/rust/sha/src/lib.rs @@ -6,45 +6,19 @@ use { }; fn test_sha256_hasher() { - use solana_sha256_hasher::hashv; + use solana_sha256_hasher::{hashv, Hasher}; let vals = &["Gaggablaghblagh!".as_ref(), "flurbos".as_ref()]; - #[cfg(target_os = "solana")] - let hash = { - use sha2::Digest; - let mut hasher = sha2::Sha256::default(); - for val in vals { - hasher.update(val); - } - solana_hash::Hash::new_from_array(hasher.finalize().into()) - }; - #[cfg(not(target_os = "solana"))] - let hash = { - let mut hasher = solana_sha256_hasher::Hasher::default(); - hasher.hashv(vals); - hasher.result() - }; - assert_eq!(hashv(vals), hash); + let mut hasher = Hasher::default(); + hasher.hashv(vals); + assert_eq!(hashv(vals), hasher.result()); } fn test_keccak256_hasher() { - use solana_keccak_hasher::hashv; + use solana_keccak_hasher::{hashv, Hasher}; let vals = &["Gaggablaghblagh!".as_ref(), "flurbos".as_ref()]; - #[cfg(target_os = "solana")] - let hash = { - use sha3::Digest; - let mut hasher = sha3::Keccak256::default(); - for val in vals { - hasher.update(val); - } - solana_hash::Hash::new_from_array(hasher.finalize().into()) - }; - #[cfg(not(target_os = "solana"))] - let hash = { - let mut hasher = solana_keccak_hasher::Hasher::default(); - hasher.hashv(vals); - hasher.result() - }; - assert_eq!(hashv(vals), hash); + let mut hasher = Hasher::default(); + hasher.hashv(vals); + assert_eq!(hashv(vals), hasher.result()); } fn test_blake3_hasher() { @@ -53,7 +27,7 @@ fn test_blake3_hasher() { let v1: &[u8] = b"flurbos!"; let vals: &[&[u8]] = &[v0, v1]; let hash = blake3::hash(&[v0, v1].concat()); - assert_eq!(hashv(vals).as_bytes(), hash.as_bytes()); + assert_eq!(hashv(vals).0, *hash.as_bytes()); } #[no_mangle] diff --git a/programs/sbf/rust/simulation/src/lib.rs b/programs/sbf/rust/simulation/src/lib.rs index 259b5a08c6c7a6..8af47ee069d510 100644 --- a/programs/sbf/rust/simulation/src/lib.rs +++ b/programs/sbf/rust/simulation/src/lib.rs @@ -6,7 +6,7 @@ use { solana_msg::msg, solana_program_error::ProgramResult, solana_pubkey::{declare_id, Pubkey}, - solana_sysvar::{Sysvar, SysvarSerialize}, + solana_sysvar::Sysvar, std::convert::TryInto, }; diff --git a/programs/sbf/rust/sysvar/Cargo.toml b/programs/sbf/rust/sysvar/Cargo.toml index b95f11ffcd1e3b..f7c9b9cd384a6e 100644 --- a/programs/sbf/rust/sysvar/Cargo.toml +++ b/programs/sbf/rust/sysvar/Cargo.toml @@ -22,8 +22,7 @@ solana-program-entrypoint = { workspace = true } solana-program-error = { workspace = true } solana-pubkey = { workspace = true } solana-sdk-ids = { workspace = true } -solana-stake-interface = { workspace = true, features = ["sysvar"] } -solana-sysvar = { workspace = true, features = ["bincode"] } +solana-sysvar = { workspace = true } [lints] workspace = true diff --git a/programs/sbf/rust/sysvar/src/lib.rs b/programs/sbf/rust/sysvar/src/lib.rs index b9186a6ce8f193..9ed258ff7968e6 100644 --- a/programs/sbf/rust/sysvar/src/lib.rs +++ b/programs/sbf/rust/sysvar/src/lib.rs @@ -10,10 +10,6 @@ use { solana_program_error::{ProgramError, ProgramResult}, solana_pubkey::Pubkey, solana_sdk_ids::sysvar, - solana_stake_interface::{ - stake_history::{StakeHistory, StakeHistoryGetEntry}, - sysvar::stake_history::StakeHistorySysvar, - }, solana_sysvar::{ clock::Clock, epoch_rewards::EpochRewards, @@ -21,7 +17,8 @@ use { rent::Rent, slot_hashes::{PodSlotHashes, SlotHashes}, slot_history::SlotHistory, - Sysvar, SysvarSerialize, + stake_history::{StakeHistory, StakeHistoryGetEntry, StakeHistorySysvar}, + Sysvar, }, }; @@ -29,7 +26,7 @@ use { #[cfg(target_os = "solana")] fn sol_get_sysvar_handler(dst: &mut [u8], offset: u64, length: u64) -> Result<(), ProgramError> where - T: SysvarSerialize, + T: Sysvar, { let sysvar_id = &T::id() as *const _ as *const u8; let var_addr = dst as *mut _ as *mut u8; @@ -47,7 +44,7 @@ where // Double-helper arrangement is easier to write to a mutable slice. fn sol_get_sysvar() -> Result where - T: SysvarSerialize, + T: Sysvar, { #[cfg(target_os = "solana")] { diff --git a/programs/sbf/tests/programs.rs b/programs/sbf/tests/programs.rs index f7cb5ada7cec3e..a0998f3643f101 100644 --- a/programs/sbf/tests/programs.rs +++ b/programs/sbf/tests/programs.rs @@ -16,12 +16,12 @@ use { solana_account_info::MAX_PERMITTED_DATA_INCREASE, solana_client_traits::SyncClient, solana_clock::{UnixTimestamp, MAX_PROCESSING_AGE}, - solana_cluster_type::ClusterType, solana_compute_budget::compute_budget::ComputeBudget, solana_compute_budget_instruction::instructions_processor::process_compute_budget_instructions, solana_compute_budget_interface::ComputeBudgetInstruction, solana_fee_calculator::FeeRateGovernor, solana_fee_structure::{FeeBin, FeeBudgetLimits, FeeStructure}, + solana_genesis_config::ClusterType, solana_hash::Hash, solana_instruction::{error::InstructionError, AccountMeta, Instruction}, solana_keypair::Keypair, @@ -1445,15 +1445,15 @@ fn assert_instruction_count() { programs.extend_from_slice(&[ ("solana_sbf_rust_128bit", 801), ("solana_sbf_rust_alloc", 4983), - ("solana_sbf_rust_custom_heap", 339), + ("solana_sbf_rust_custom_heap", 303), ("solana_sbf_rust_dep_crate", 22), ("solana_sbf_rust_iter", 1414), ("solana_sbf_rust_many_args", 1287), - ("solana_sbf_rust_mem", 1322), + ("solana_sbf_rust_mem", 1297), ("solana_sbf_rust_membuiltins", 329), - ("solana_sbf_rust_noop", 334), + ("solana_sbf_rust_noop", 312), ("solana_sbf_rust_param_passing", 109), - ("solana_sbf_rust_rand", 312), + ("solana_sbf_rust_rand", 276), ("solana_sbf_rust_sanity", 17902), ("solana_sbf_rust_secp256k1_recover", 88670), ("solana_sbf_rust_sha", 22175), diff --git a/programs/sbf/tests/sysvar.rs b/programs/sbf/tests/sysvar.rs index bb95a08ca99390..484ecb489fd448 100644 --- a/programs/sbf/tests/sysvar.rs +++ b/programs/sbf/tests/sysvar.rs @@ -18,8 +18,10 @@ use { stake_history, }, solana_signer::Signer, - solana_stake_interface::stake_history::{StakeHistory, StakeHistoryEntry}, - solana_sysvar::epoch_rewards, + solana_sysvar::{ + epoch_rewards, + stake_history::{StakeHistory, StakeHistoryEntry}, + }, solana_transaction::Transaction, }; diff --git a/programs/stake-tests/tests/test_move_stake_and_lamports.rs b/programs/stake-tests/tests/test_move_stake_and_lamports.rs index 71f330c3c9dda4..7b268ea77e7241 100644 --- a/programs/stake-tests/tests/test_move_stake_and_lamports.rs +++ b/programs/stake-tests/tests/test_move_stake_and_lamports.rs @@ -18,11 +18,10 @@ use { self as stake, error::StakeError, instruction as ixn, program as stake_program, - stake_history::StakeHistory, state::{Authorized, Lockup, Meta, Stake, StakeStateV2}, }, solana_system_interface::{instruction as system_instruction, program as system_program}, - solana_sysvar::clock::Clock, + solana_sysvar::{clock::Clock, stake_history::StakeHistory}, solana_transaction::Transaction, solana_transaction_error::TransactionError, solana_vote_program::{ diff --git a/programs/stake/Cargo.toml b/programs/stake/Cargo.toml index 4a1ad7e6740b9b..7844b77966b906 100644 --- a/programs/stake/Cargo.toml +++ b/programs/stake/Cargo.toml @@ -23,7 +23,7 @@ log = { workspace = true } solana-account = { workspace = true } solana-bincode = { workspace = true } solana-clock = { workspace = true } -solana-config-interface = { workspace = true, features = ["bincode"] } +solana-config-program-client = { workspace = true, features = ["serde"] } solana-genesis-config = { workspace = true } solana-instruction = { workspace = true } solana-native-token = { workspace = true } diff --git a/programs/stake/benches/stake.rs b/programs/stake/benches/stake.rs index 5a03cb0d3e46d1..5479dafd9c07c0 100644 --- a/programs/stake/benches/stake.rs +++ b/programs/stake/benches/stake.rs @@ -15,14 +15,14 @@ use { LockupCheckedArgs, StakeInstruction, }, stake_flags::StakeFlags, - stake_history::StakeHistory, state::{Authorized, Lockup, StakeAuthorize, StakeStateV2}, }, solana_stake_program::{ stake_instruction, stake_state::{Delegation, Meta, Stake}, }, - solana_vote_interface::state::{VoteStateV3, VoteStateVersions}, + solana_sysvar::stake_history::StakeHistory, + solana_vote_interface::state::{VoteState, VoteStateVersions}, solana_vote_program::vote_state, std::sync::Arc, }; @@ -618,15 +618,15 @@ fn bench_deactivate_delinquent(c: &mut Criterion) { let mut test_setup = TestSetup::new(); // reference vote account has been consistently voting - let mut vote_state = VoteStateV3::default(); + let mut vote_state = VoteState::default(); for epoch in 0..=solana_stake_interface::MINIMUM_DELINQUENT_EPOCHS_FOR_DEACTIVATION { vote_state.increment_credits(epoch as Epoch, 1); } let reference_vote_address = Pubkey::new_unique(); let reference_vote_account = AccountSharedData::new_data_with_space( 1, - &VoteStateVersions::new_v3(vote_state), - VoteStateV3::size_of(), + &VoteStateVersions::new_current(vote_state), + VoteState::size_of(), &solana_sdk_ids::vote::id(), ) .unwrap(); @@ -639,7 +639,7 @@ fn bench_deactivate_delinquent(c: &mut Criterion) { Meta::default(), Stake { delegation: Delegation::new(&vote_address, 1, 1), - credits_observed: VoteStateV3::default().credits(), + credits_observed: VoteState::default().credits(), }, StakeFlags::empty(), ), diff --git a/programs/stake/src/config.rs b/programs/stake/src/config.rs index a5fcc50f52e079..b6b4e6d43d53cd 100644 --- a/programs/stake/src/config.rs +++ b/programs/stake/src/config.rs @@ -8,7 +8,7 @@ pub use solana_stake_interface::config::*; use { bincode::{deserialize, serialize}, solana_account::{Account, AccountSharedData, ReadableAccount, WritableAccount}, - solana_config_interface::state::{get_config_data, ConfigKeys}, + solana_config_program_client::{get_config_data, ConfigKeys}, solana_genesis_config::GenesisConfig, solana_pubkey::Pubkey, solana_transaction_context::BorrowedAccount, diff --git a/programs/stake/src/epoch_rewards.rs b/programs/stake/src/epoch_rewards.rs index 468cfc3f24ddb5..958a59da350455 100644 --- a/programs/stake/src/epoch_rewards.rs +++ b/programs/stake/src/epoch_rewards.rs @@ -5,7 +5,7 @@ use { solana_sdk_ids::sysvar, solana_sysvar::{ epoch_rewards::{self, EpochRewards}, - SysvarSerialize, + Sysvar, }, }; diff --git a/programs/stake/src/stake_instruction.rs b/programs/stake/src/stake_instruction.rs index 91108865672368..29cb511a1151b6 100644 --- a/programs/stake/src/stake_instruction.rs +++ b/programs/stake/src/stake_instruction.rs @@ -401,12 +401,14 @@ mod tests { LockupArgs, }, stake_flags::StakeFlags, - stake_history::{StakeHistory, StakeHistoryEntry}, state::{warmup_cooldown_rate, Authorized, Lockup, StakeAuthorize}, MINIMUM_DELINQUENT_EPOCHS_FOR_DEACTIVATION, }, - solana_sysvar::rewards::Rewards, - solana_vote_interface::state::{VoteStateV3, VoteStateVersions}, + solana_sysvar::{ + rewards::Rewards, + stake_history::{StakeHistory, StakeHistoryEntry}, + }, + solana_vote_interface::state::{VoteState, VoteStateVersions}, solana_vote_program::vote_state, std::{collections::HashSet, str::FromStr, sync::Arc}, test_case::test_case, @@ -2001,7 +2003,7 @@ mod tests { let vote_address_2 = solana_pubkey::new_rand(); let mut vote_account_2 = vote_state::create_account(&vote_address_2, &solana_pubkey::new_rand(), 0, 100); - vote_account_2.set_state(&VoteStateV3::default()).unwrap(); + vote_account_2.set_state(&VoteState::default()).unwrap(); #[allow(deprecated)] let mut transaction_accounts = vec![ (stake_address, stake_account), @@ -2181,7 +2183,7 @@ mod tests { #[test_case(feature_set_no_minimum_delegation(); "no_min_delegation")] #[test_case(feature_set_all_enabled(); "all_enabled")] fn test_stake_delegate(feature_set: Arc) { - let mut vote_state = VoteStateV3::default(); + let mut vote_state = VoteState::default(); for i in 0..1000 { vote_state::process_slot_vote_unchecked(&mut vote_state, i); } @@ -2193,10 +2195,10 @@ mod tests { let mut vote_account_2 = vote_state::create_account(&vote_address_2, &solana_pubkey::new_rand(), 0, 100); vote_account - .set_state(&VoteStateVersions::new_v3(vote_state.clone())) + .set_state(&VoteStateVersions::new_current(vote_state.clone())) .unwrap(); vote_account_2 - .set_state(&VoteStateVersions::new_v3(vote_state)) + .set_state(&VoteStateVersions::new_current(vote_state)) .unwrap(); let minimum_delegation = crate::get_minimum_delegation( feature_set @@ -2793,7 +2795,7 @@ mod tests { let mut vote_account = vote_state::create_account(&vote_address, &solana_pubkey::new_rand(), 0, 100); vote_account - .set_state(&VoteStateVersions::new_v3(VoteStateV3::default())) + .set_state(&VoteStateVersions::new_current(VoteState::default())) .unwrap(); #[allow(deprecated)] let mut transaction_accounts = vec![ @@ -3089,7 +3091,7 @@ mod tests { let mut vote_account = vote_state::create_account(&vote_address, &solana_pubkey::new_rand(), 0, 100); vote_account - .set_state(&VoteStateVersions::new_v3(VoteStateV3::default())) + .set_state(&VoteStateVersions::new_current(VoteState::default())) .unwrap(); let mut clock = Clock { epoch: 16, @@ -3447,7 +3449,7 @@ mod tests { let mut vote_account = vote_state::create_account(&vote_address, &solana_pubkey::new_rand(), 0, 100); vote_account - .set_state(&VoteStateVersions::new_v3(VoteStateV3::default())) + .set_state(&VoteStateVersions::new_current(VoteState::default())) .unwrap(); #[allow(deprecated)] let mut transaction_accounts = vec![ @@ -3582,7 +3584,7 @@ mod tests { let mut vote_account = vote_state::create_account(&vote_address, &solana_pubkey::new_rand(), 0, 100); vote_account - .set_state(&VoteStateVersions::new_v3(VoteStateV3::default())) + .set_state(&VoteStateVersions::new_current(VoteState::default())) .unwrap(); let instruction_data = serialize(&StakeInstruction::SetLockup(LockupArgs { unix_timestamp: Some(1), @@ -7082,7 +7084,7 @@ mod tests { new_stake( 1, /* stake */ &vote_address, - &VoteStateV3::default(), + &VoteState::default(), 1, /* activation_epoch */ ), StakeFlags::empty(), @@ -7098,16 +7100,16 @@ mod tests { let mut vote_account = AccountSharedData::new_data_with_space( 1, /* lamports */ - &VoteStateVersions::new_v3(VoteStateV3::default()), - VoteStateV3::size_of(), + &VoteStateVersions::new_current(VoteState::default()), + VoteState::size_of(), &solana_sdk_ids::vote::id(), ) .unwrap(); let mut reference_vote_account = AccountSharedData::new_data_with_space( 1, /* lamports */ - &VoteStateVersions::new_v3(VoteStateV3::default()), - VoteStateV3::size_of(), + &VoteStateVersions::new_current(VoteState::default()), + VoteState::size_of(), &solana_sdk_ids::vote::id(), ) .unwrap(); @@ -7172,12 +7174,12 @@ mod tests { // `reference_vote_account` has not consistently voted for at least // `MINIMUM_DELINQUENT_EPOCHS_FOR_DEACTIVATION`. // Instruction will fail - let mut reference_vote_state = VoteStateV3::default(); + let mut reference_vote_state = VoteState::default(); for epoch in 0..MINIMUM_DELINQUENT_EPOCHS_FOR_DEACTIVATION / 2 { reference_vote_state.increment_credits(epoch as Epoch, 1); } reference_vote_account - .serialize_data(&VoteStateVersions::new_v3(reference_vote_state)) + .serialize_data(&VoteStateVersions::new_current(reference_vote_state)) .unwrap(); process_instruction_deactivate_delinquent( @@ -7191,7 +7193,7 @@ mod tests { // `reference_vote_account` has not consistently voted for the last // `MINIMUM_DELINQUENT_EPOCHS_FOR_DEACTIVATION`. // Instruction will fail - let mut reference_vote_state = VoteStateV3::default(); + let mut reference_vote_state = VoteState::default(); for epoch in 0..=current_epoch { reference_vote_state.increment_credits(epoch, 1); } @@ -7207,7 +7209,7 @@ mod tests { current_epoch - 1 ); reference_vote_account - .serialize_data(&VoteStateVersions::new_v3(reference_vote_state)) + .serialize_data(&VoteStateVersions::new_current(reference_vote_state)) .unwrap(); process_instruction_deactivate_delinquent( @@ -7220,12 +7222,12 @@ mod tests { // `reference_vote_account` has consistently voted and `vote_account` has never voted. // Instruction will succeed - let mut reference_vote_state = VoteStateV3::default(); + let mut reference_vote_state = VoteState::default(); for epoch in 0..=current_epoch { reference_vote_state.increment_credits(epoch, 1); } reference_vote_account - .serialize_data(&VoteStateVersions::new_v3(reference_vote_state)) + .serialize_data(&VoteStateVersions::new_current(reference_vote_state)) .unwrap(); let post_stake_account = &process_instruction_deactivate_delinquent( @@ -7248,12 +7250,12 @@ mod tests { // last `MINIMUM_DELINQUENT_EPOCHS_FOR_DEACTIVATION`. // Instruction will succeed - let mut vote_state = VoteStateV3::default(); + let mut vote_state = VoteState::default(); for epoch in 0..MINIMUM_DELINQUENT_EPOCHS_FOR_DEACTIVATION / 2 { vote_state.increment_credits(epoch as Epoch, 1); } vote_account - .serialize_data(&VoteStateVersions::new_v3(vote_state)) + .serialize_data(&VoteStateVersions::new_current(vote_state)) .unwrap(); let post_stake_account = &process_instruction_deactivate_delinquent( @@ -7285,7 +7287,7 @@ mod tests { new_stake( 1, /* stake */ &unrelated_vote_address, - &VoteStateV3::default(), + &VoteState::default(), 1, /* activation_epoch */ ), StakeFlags::empty(), @@ -7303,13 +7305,13 @@ mod tests { // `reference_vote_account` has consistently voted and `vote_account` voted once // `MINIMUM_DELINQUENT_EPOCHS_FOR_DEACTIVATION` ago. // Instruction will succeed - let mut vote_state = VoteStateV3::default(); + let mut vote_state = VoteState::default(); vote_state.increment_credits( current_epoch - MINIMUM_DELINQUENT_EPOCHS_FOR_DEACTIVATION as Epoch, 1, ); vote_account - .serialize_data(&VoteStateVersions::new_v3(vote_state)) + .serialize_data(&VoteStateVersions::new_current(vote_state)) .unwrap(); process_instruction_deactivate_delinquent( &stake_address, @@ -7322,13 +7324,13 @@ mod tests { // `reference_vote_account` has consistently voted and `vote_account` voted once // `MINIMUM_DELINQUENT_EPOCHS_FOR_DEACTIVATION` - 1 epochs ago // Instruction will fail - let mut vote_state = VoteStateV3::default(); + let mut vote_state = VoteState::default(); vote_state.increment_credits( current_epoch - (MINIMUM_DELINQUENT_EPOCHS_FOR_DEACTIVATION - 1) as Epoch, 1, ); vote_account - .serialize_data(&VoteStateVersions::new_v3(vote_state)) + .serialize_data(&VoteStateVersions::new_current(vote_state)) .unwrap(); process_instruction_deactivate_delinquent( &stake_address, diff --git a/programs/stake/src/stake_state.rs b/programs/stake/src/stake_state.rs index e17a6633c5aaca..ad0bb4f2ea147c 100644 --- a/programs/stake/src/stake_state.rs +++ b/programs/stake/src/stake_state.rs @@ -20,14 +20,14 @@ use { error::StakeError, instruction::LockupArgs, stake_flags::StakeFlags, - stake_history::{StakeHistory, StakeHistoryEntry}, tools::{acceptable_reference_epoch_credits, eligible_for_deactivate_delinquent}, }, solana_svm_log_collector::ic_msg, + solana_sysvar::stake_history::{StakeHistory, StakeHistoryEntry}, solana_transaction_context::{ BorrowedAccount, IndexOfAccount, InstructionContext, TransactionContext, }, - solana_vote_interface::state::{VoteStateV3, VoteStateVersions}, + solana_vote_interface::state::{VoteState, VoteStateVersions}, std::{collections::HashSet, convert::TryFrom}, }; @@ -89,7 +89,7 @@ fn redelegate_stake( stake: &mut Stake, stake_lamports: u64, voter_pubkey: &Pubkey, - vote_state: &VoteStateV3, + vote_state: &VoteState, clock: &Clock, stake_history: &StakeHistory, ) -> Result<(), StakeError> { @@ -204,7 +204,7 @@ fn move_stake_or_lamports_shared_checks( pub(crate) fn new_stake( stake: u64, voter_pubkey: &Pubkey, - vote_state: &VoteStateV3, + vote_state: &VoteState, activation_epoch: Epoch, ) -> Stake { Stake { @@ -292,12 +292,11 @@ pub fn authorize_with_seed( instruction_context .get_index_of_instruction_account_in_transaction(authority_base_index)?, )?; - // The conversion from `PubkeyError` to `InstructionError` through - // num-traits is incorrect, but it's the existing behavior. - signers.insert( - Pubkey::create_with_seed(base_pubkey, authority_seed, authority_owner) - .map_err(|e| e as u64)?, - ); + signers.insert(Pubkey::create_with_seed( + base_pubkey, + authority_seed, + authority_owner, + )?); } authorize( stake_account, @@ -339,7 +338,7 @@ pub fn delegate( let stake = new_stake( stake_amount, &vote_pubkey, - &vote_state?.convert_to_v3(), + &vote_state?.convert_to_current(), clock.epoch, ); stake_account.set_state(&StakeStateV2::Stake(meta, stake, StakeFlags::empty())) @@ -352,7 +351,7 @@ pub fn delegate( &mut stake, stake_amount, &vote_pubkey, - &vote_state?.convert_to_v3(), + &vote_state?.convert_to_current(), clock, stake_history, )?; @@ -918,7 +917,7 @@ pub(crate) fn deactivate_delinquent( } let delinquent_vote_state = delinquent_vote_account .get_state::()? - .convert_to_v3(); + .convert_to_current(); let reference_vote_account = instruction_context .try_borrow_instruction_account(transaction_context, reference_vote_account_index)?; @@ -927,7 +926,7 @@ pub(crate) fn deactivate_delinquent( } let reference_vote_state = reference_vote_account .get_state::()? - .convert_to_v3(); + .convert_to_current(); if !acceptable_reference_epoch_credits(&reference_vote_state.epoch_credits, current_epoch) { return Err(StakeError::InsufficientReferenceVotes.into()); @@ -1421,7 +1420,7 @@ fn do_create_account( ) -> AccountSharedData { let mut stake_account = AccountSharedData::new(lamports, StakeStateV2::size_of(), &id()); - let vote_state = VoteStateV3::deserialize(vote_account.data()).expect("vote_state"); + let vote_state = VoteState::deserialize(vote_account.data()).expect("vote_state"); let rent_exempt_reserve = rent.minimum_balance(stake_account.data().len()); diff --git a/programs/system/src/system_processor.rs b/programs/system/src/system_processor.rs index f5937780092688..a636f45b0adfc3 100644 --- a/programs/system/src/system_processor.rs +++ b/programs/system/src/system_processor.rs @@ -45,10 +45,7 @@ impl Address { invoke_context: &InvokeContext, ) -> Result { let base = if let Some((base, seed, owner)) = with_seed { - // The conversion from `PubkeyError` to `InstructionError` through - // num-traits is incorrect, but it's the existing behavior. - let address_with_seed = - Pubkey::create_with_seed(base, seed, owner).map_err(|e| e as u64)?; + let address_with_seed = Pubkey::create_with_seed(base, seed, owner)?; // re-derive the address, must match the supplied address if *address != address_with_seed { ic_msg!( @@ -267,8 +264,6 @@ fn transfer_with_seed( ); return Err(InstructionError::MissingRequiredSignature); } - // The conversion from `PubkeyError` to `InstructionError` through - // num-traits is incorrect, but it's the existing behavior. let address_from_seed = Pubkey::create_with_seed( transaction_context.get_key_of_account_at_index( instruction_context @@ -276,8 +271,7 @@ fn transfer_with_seed( )?, from_seed, from_owner, - ) - .map_err(|e| e as u64)?; + )?; let from_key = transaction_context.get_key_of_account_at_index( instruction_context.get_index_of_instruction_account_in_transaction(from_account_index)?, diff --git a/programs/vote/benches/process_vote.rs b/programs/vote/benches/process_vote.rs index 0ce1ae92effccb..9c7430c0eaf784 100644 --- a/programs/vote/benches/process_vote.rs +++ b/programs/vote/benches/process_vote.rs @@ -18,7 +18,7 @@ use { solana_vote_program::{ vote_instruction::VoteInstruction, vote_state::{ - TowerSync, Vote, VoteInit, VoteStateUpdate, VoteStateV3, VoteStateVersions, + TowerSync, Vote, VoteInit, VoteState, VoteStateUpdate, VoteStateVersions, MAX_LOCKOUT_HISTORY, }, }, @@ -39,7 +39,7 @@ fn create_accounts() -> (Slot, SlotHashes, Vec, Vec (Slot, SlotHashes, Vec, Vec = vec![0; VoteStateV3::size_of()]; - let versioned = VoteStateVersions::new_v3(vote_state); - VoteStateV3::serialize(&versioned, &mut vote_account_data).unwrap(); + let mut vote_account_data: Vec = vec![0; VoteState::size_of()]; + let versioned = VoteStateVersions::new_current(vote_state); + VoteState::serialize(&versioned, &mut vote_account_data).unwrap(); Account { lamports: 1, diff --git a/programs/vote/benches/vote_instructions.rs b/programs/vote/benches/vote_instructions.rs index 9836d114ed42d8..cce42489c44b1f 100644 --- a/programs/vote/benches/vote_instructions.rs +++ b/programs/vote/benches/vote_instructions.rs @@ -20,8 +20,8 @@ use { vote_processor::Entrypoint, vote_state::{ create_account, create_account_with_authorized, TowerSync, Vote, VoteAuthorize, - VoteAuthorizeCheckedWithSeedArgs, VoteAuthorizeWithSeedArgs, VoteInit, VoteStateUpdate, - VoteStateV3, VoteStateVersions, MAX_LOCKOUT_HISTORY, + VoteAuthorizeCheckedWithSeedArgs, VoteAuthorizeWithSeedArgs, VoteInit, VoteState, + VoteStateUpdate, VoteStateVersions, MAX_LOCKOUT_HISTORY, }, }, }; @@ -48,7 +48,7 @@ fn create_accounts() -> (Slot, SlotHashes, Vec, Vec (Slot, SlotHashes, Vec, Vec = vec![0; VoteStateV3::size_of()]; - let versioned = VoteStateVersions::new_v3(vote_state); - VoteStateV3::serialize(&versioned, &mut vote_account_data).unwrap(); + let mut vote_account_data: Vec = vec![0; VoteState::size_of()]; + let versioned = VoteStateVersions::new_current(vote_state); + VoteState::serialize(&versioned, &mut vote_account_data).unwrap(); Account { lamports: 1, @@ -124,7 +124,7 @@ fn create_accounts() -> (Slot, SlotHashes, Vec, Vec (Pubkey, AccountSharedData) { let rent = Rent::default(); - let balance = VoteStateV3::get_rent_exempt_reserve(&rent); + let balance = VoteState::get_rent_exempt_reserve(&rent); let vote_pubkey = solana_pubkey::new_rand(); ( vote_pubkey, @@ -256,7 +256,7 @@ struct BenchInitializeAccount { impl BenchInitializeAccount { fn new() -> Self { let vote_pubkey = solana_pubkey::new_rand(); - let vote_account = AccountSharedData::new(100, VoteStateV3::size_of(), &id()); + let vote_account = AccountSharedData::new(100, VoteState::size_of(), &id()); let node_pubkey = solana_pubkey::new_rand(); let node_account = AccountSharedData::default(); let instruction_data = serialize(&VoteInstruction::InitializeAccount(VoteInit { @@ -574,7 +574,7 @@ impl BenchAuthorizeChecked { fn new() -> Self { let vote_pubkey = Pubkey::new_unique(); let new_authorized_pubkey = Pubkey::new_unique(); - let vote_account = AccountSharedData::new(100, VoteStateV3::size_of(), &id()); + let vote_account = AccountSharedData::new(100, VoteState::size_of(), &id()); let clock_address = sysvar::clock::id(); let clock_account = account::create_account_shared_data_for_test(&Clock::default()); let default_authorized_pubkey = Pubkey::default(); diff --git a/programs/vote/src/vote_processor.rs b/programs/vote/src/vote_processor.rs index 38ad5e53685e48..6922e744ce32c9 100644 --- a/programs/vote/src/vote_processor.rs +++ b/programs/vote/src/vote_processor.rs @@ -31,16 +31,11 @@ fn process_authorize_with_seed_instruction( let base_pubkey = transaction_context.get_key_of_account_at_index( instruction_context.get_index_of_instruction_account_in_transaction(2)?, )?; - // The conversion from `PubkeyError` to `InstructionError` through - // num-traits is incorrect, but it's the existing behavior. - expected_authority_keys.insert( - Pubkey::create_with_seed( - base_pubkey, - current_authority_derived_key_seed, - current_authority_derived_key_owner, - ) - .map_err(|e| e as u64)?, - ); + expected_authority_keys.insert(Pubkey::create_with_seed( + base_pubkey, + current_authority_derived_key_seed, + current_authority_derived_key_owner, + )?); }; vote_state::authorize( vote_account, @@ -234,8 +229,7 @@ mod tests { }, vote_state::{ self, Lockout, TowerSync, Vote, VoteAuthorize, VoteAuthorizeCheckedWithSeedArgs, - VoteAuthorizeWithSeedArgs, VoteInit, VoteStateUpdate, VoteStateV3, - VoteStateVersions, + VoteAuthorizeWithSeedArgs, VoteInit, VoteState, VoteStateUpdate, VoteStateVersions, }, }, bincode::serialize, @@ -353,7 +347,7 @@ mod tests { fn create_test_account() -> (Pubkey, AccountSharedData) { let rent = Rent::default(); - let balance = VoteStateV3::get_rent_exempt_reserve(&rent); + let balance = VoteState::get_rent_exempt_reserve(&rent); let vote_pubkey = solana_pubkey::new_rand(); ( vote_pubkey, @@ -440,7 +434,7 @@ mod tests { let lamports = vote_account.lamports(); let mut vote_account_with_epoch_credits = AccountSharedData::new(lamports, vote_account_space, &id()); - let versioned = VoteStateVersions::new_v3(vote_state); + let versioned = VoteStateVersions::new_current(vote_state); vote_state::to(&versioned, &mut vote_account_with_epoch_credits); (vote_pubkey, vote_account_with_epoch_credits) @@ -486,7 +480,7 @@ mod tests { #[test] fn test_initialize_vote_account() { let vote_pubkey = solana_pubkey::new_rand(); - let vote_account = AccountSharedData::new(100, VoteStateV3::size_of(), &id()); + let vote_account = AccountSharedData::new(100, VoteState::size_of(), &id()); let node_pubkey = solana_pubkey::new_rand(); let node_account = AccountSharedData::default(); let instruction_data = serialize(&VoteInstruction::InitializeAccount(VoteInit { @@ -551,7 +545,7 @@ mod tests { vec![ ( vote_pubkey, - AccountSharedData::new(100, 2 * VoteStateV3::size_of(), &id()), + AccountSharedData::new(100, 2 * VoteState::size_of(), &id()), ), (sysvar::rent::id(), create_default_rent_account()), (sysvar::clock::id(), create_default_clock_account()), @@ -614,9 +608,9 @@ mod tests { Err(InstructionError::MissingRequiredSignature), ); instruction_accounts[1].is_signer = true; - let vote_state: VoteStateV3 = StateMut::::state(&accounts[0]) + let vote_state: VoteState = StateMut::::state(&accounts[0]) .unwrap() - .convert_to_v3(); + .convert_to_current(); assert_ne!(vote_state.node_pubkey, node_pubkey); // should fail, authorized_withdrawer didn't sign the transaction @@ -628,9 +622,9 @@ mod tests { Err(InstructionError::MissingRequiredSignature), ); instruction_accounts[2].is_signer = true; - let vote_state: VoteStateV3 = StateMut::::state(&accounts[0]) + let vote_state: VoteState = StateMut::::state(&accounts[0]) .unwrap() - .convert_to_v3(); + .convert_to_current(); assert_ne!(vote_state.node_pubkey, node_pubkey); // should pass @@ -640,9 +634,9 @@ mod tests { instruction_accounts, Ok(()), ); - let vote_state: VoteStateV3 = StateMut::::state(&accounts[0]) + let vote_state: VoteState = StateMut::::state(&accounts[0]) .unwrap() - .convert_to_v3(); + .convert_to_current(); assert_eq!(vote_state.node_pubkey, node_pubkey); } @@ -684,9 +678,9 @@ mod tests { instruction_accounts.clone(), Ok(()), ); - let vote_state: VoteStateV3 = StateMut::::state(&accounts[0]) + let vote_state: VoteState = StateMut::::state(&accounts[0]) .unwrap() - .convert_to_v3(); + .convert_to_current(); assert_eq!(vote_state.commission, u8::MAX); // should pass @@ -696,9 +690,9 @@ mod tests { instruction_accounts.clone(), Ok(()), ); - let vote_state: VoteStateV3 = StateMut::::state(&accounts[0]) + let vote_state: VoteState = StateMut::::state(&accounts[0]) .unwrap() - .convert_to_v3(); + .convert_to_current(); assert_eq!(vote_state.commission, 42); // should fail, authorized_withdrawer didn't sign the transaction @@ -709,9 +703,9 @@ mod tests { instruction_accounts, Err(InstructionError::MissingRequiredSignature), ); - let vote_state: VoteStateV3 = StateMut::::state(&accounts[0]) + let vote_state: VoteState = StateMut::::state(&accounts[0]) .unwrap() - .convert_to_v3(); + .convert_to_current(); assert_eq!(vote_state.commission, 0); } @@ -776,9 +770,9 @@ mod tests { }, ); if is_tower_sync { - let vote_state: VoteStateV3 = StateMut::::state(&accounts[0]) + let vote_state: VoteState = StateMut::::state(&accounts[0]) .unwrap() - .convert_to_v3(); + .convert_to_current(); assert_eq!( vote_state.votes, vec![vote_state::LandedVote::from(Lockout::new( @@ -829,7 +823,7 @@ mod tests { transaction_accounts[1] = (sysvar::slot_hashes::id(), slot_hashes_account.clone()); // should fail, uninitialized - let vote_account = AccountSharedData::new(100, VoteStateV3::size_of(), &id()); + let vote_account = AccountSharedData::new(100, VoteState::size_of(), &id()); transaction_accounts[0] = (vote_pubkey, vote_account); process_instruction( &instruction_data, @@ -1971,7 +1965,7 @@ mod tests { ); // Test with new_authorized_pubkey signer - let vote_account = AccountSharedData::new(100, VoteStateV3::size_of(), &id()); + let vote_account = AccountSharedData::new(100, VoteState::size_of(), &id()); let clock_address = sysvar::clock::id(); let clock_account = account::create_account_shared_data_for_test(&Clock::default()); let default_authorized_pubkey = Pubkey::default(); diff --git a/programs/vote/src/vote_state/mod.rs b/programs/vote/src/vote_state/mod.rs index 8a801716810801..e138c5a0aca00b 100644 --- a/programs/vote/src/vote_state/mod.rs +++ b/programs/vote/src/vote_state/mod.rs @@ -22,20 +22,20 @@ use { }; // utility function, used by Stakes, tests -pub fn from(account: &T) -> Option { - VoteStateV3::deserialize(account.data()).ok() +pub fn from(account: &T) -> Option { + VoteState::deserialize(account.data()).ok() } // utility function, used by Stakes, tests pub fn to(versioned: &VoteStateVersions, account: &mut T) -> Option<()> { - VoteStateV3::serialize(versioned, account.data_as_mut_slice()).ok() + VoteState::serialize(versioned, account.data_as_mut_slice()).ok() } -// Updates the vote account state with a new VoteStateV3 instance. This is required temporarily during the +// Updates the vote account state with a new VoteState instance. This is required temporarily during the // upgrade of vote account state from V1_14_11 to Current. fn set_vote_account_state( vote_account: &mut BorrowedAccount, - vote_state: VoteStateV3, + vote_state: VoteState, ) -> Result<(), InstructionError> { // If the account is not large enough to store the vote state, then attempt a realloc to make it large enough. // The realloc can only proceed if the vote account has balance sufficient for rent exemption at the new size. @@ -53,14 +53,14 @@ fn set_vote_account_state( ))); } // Vote account is large enough to store the newest version of vote state - vote_account.set_state(&VoteStateVersions::new_v3(vote_state)) + vote_account.set_state(&VoteStateVersions::new_current(vote_state)) } /// Checks the proposed vote state with the current and /// slot hashes, making adjustments to the root / filtering /// votes as needed. fn check_and_filter_proposed_vote_state( - vote_state: &VoteStateV3, + vote_state: &VoteState, proposed_lockouts: &mut VecDeque, proposed_root: &mut Option, proposed_hash: Hash, @@ -304,7 +304,7 @@ fn check_and_filter_proposed_vote_state( } fn check_slots_are_valid( - vote_state: &VoteStateV3, + vote_state: &VoteState, vote_slots: &[Slot], vote_hash: &Hash, slot_hashes: &[(Slot, Hash)], @@ -427,7 +427,7 @@ fn check_slots_are_valid( // have to have at least one other slot on top of it, even if the first 30 votes were all // popped off. pub fn process_new_vote_state( - vote_state: &mut VoteStateV3, + vote_state: &mut VoteState, mut new_state: VecDeque, new_root: Option, timestamp: Option, @@ -587,7 +587,7 @@ pub fn process_new_vote_state( // have had their latency initialized to 0 by the above loop. Those will now be updated to their actual latency. for new_vote in new_state.iter_mut() { if new_vote.latency == 0 { - new_vote.latency = VoteStateV3::compute_vote_latency(new_vote.slot(), current_slot); + new_vote.latency = VoteState::compute_vote_latency(new_vote.slot(), current_slot); } } @@ -608,7 +608,7 @@ pub fn process_new_vote_state( } pub fn process_vote_unfiltered( - vote_state: &mut VoteStateV3, + vote_state: &mut VoteState, vote_slots: &[Slot], vote: &Vote, slot_hashes: &[SlotHash], @@ -623,7 +623,7 @@ pub fn process_vote_unfiltered( } pub fn process_vote( - vote_state: &mut VoteStateV3, + vote_state: &mut VoteState, vote: &Vote, slot_hashes: &[SlotHash], epoch: Epoch, @@ -653,7 +653,7 @@ pub fn process_vote( } /// "unchecked" functions used by tests and Tower -pub fn process_vote_unchecked(vote_state: &mut VoteStateV3, vote: Vote) -> Result<(), VoteError> { +pub fn process_vote_unchecked(vote_state: &mut VoteState, vote: Vote) -> Result<(), VoteError> { if vote.slots.is_empty() { return Err(VoteError::EmptySlots); } @@ -669,13 +669,13 @@ pub fn process_vote_unchecked(vote_state: &mut VoteStateV3, vote: Vote) -> Resul } #[cfg(test)] -pub fn process_slot_votes_unchecked(vote_state: &mut VoteStateV3, slots: &[Slot]) { +pub fn process_slot_votes_unchecked(vote_state: &mut VoteState, slots: &[Slot]) { for slot in slots { process_slot_vote_unchecked(vote_state, *slot); } } -pub fn process_slot_vote_unchecked(vote_state: &mut VoteStateV3, slot: Slot) { +pub fn process_slot_vote_unchecked(vote_state: &mut VoteState, slot: Slot) { let _ = process_vote_unchecked(vote_state, Vote::new(vec![slot], Hash::default())); } @@ -689,9 +689,9 @@ pub fn authorize( signers: &HashSet, clock: &Clock, ) -> Result<(), InstructionError> { - let mut vote_state: VoteStateV3 = vote_account + let mut vote_state: VoteState = vote_account .get_state::()? - .convert_to_v3(); + .convert_to_current(); match vote_authorize { VoteAuthorize::Voter => { @@ -731,9 +731,9 @@ pub fn update_validator_identity( node_pubkey: &Pubkey, signers: &HashSet, ) -> Result<(), InstructionError> { - let mut vote_state: VoteStateV3 = vote_account + let mut vote_state: VoteState = vote_account .get_state::()? - .convert_to_v3(); + .convert_to_current(); // current authorized withdrawer must say "yay" verify_authorized_signer(&vote_state.authorized_withdrawer, signers)?; @@ -756,7 +756,7 @@ pub fn update_commission( ) -> Result<(), InstructionError> { let vote_state_result = vote_account .get_state::() - .map(|vote_state| vote_state.convert_to_v3()); + .map(|vote_state| vote_state.convert_to_current()); let enforce_commission_update_rule = if let Ok(decoded_vote_state) = &vote_state_result { is_commission_increase(decoded_vote_state, commission) } else { @@ -778,7 +778,7 @@ pub fn update_commission( } /// Given a proposed new commission, returns true if this would be a commission increase, false otherwise -pub fn is_commission_increase(vote_state: &VoteStateV3, commission: u8) -> bool { +pub fn is_commission_increase(vote_state: &VoteState, commission: u8) -> bool { commission > vote_state.commission } @@ -822,9 +822,9 @@ pub fn withdraw( ) -> Result<(), InstructionError> { let mut vote_account = instruction_context .try_borrow_instruction_account(transaction_context, vote_account_index)?; - let vote_state: VoteStateV3 = vote_account + let vote_state: VoteState = vote_account .get_state::()? - .convert_to_v3(); + .convert_to_current(); verify_authorized_signer(&vote_state.authorized_withdrawer, signers)?; @@ -850,7 +850,7 @@ pub fn withdraw( return Err(VoteError::ActiveVoteAccountClose.into()); } else { // Deinitialize upon zero-balance - set_vote_account_state(&mut vote_account, VoteStateV3::default())?; + set_vote_account_state(&mut vote_account, VoteState::default())?; } } else { let min_rent_exempt_balance = rent_sysvar.minimum_balance(vote_account.get_data().len()); @@ -888,21 +888,21 @@ pub fn initialize_account( // node must agree to accept this vote account verify_authorized_signer(&vote_init.node_pubkey, signers)?; - set_vote_account_state(vote_account, VoteStateV3::new(vote_init, clock)) + set_vote_account_state(vote_account, VoteState::new(vote_init, clock)) } fn verify_and_get_vote_state( vote_account: &BorrowedAccount, clock: &Clock, signers: &HashSet, -) -> Result { +) -> Result { let versioned = vote_account.get_state::()?; if versioned.is_uninitialized() { return Err(InstructionError::UninitializedAccount); } - let mut vote_state = versioned.convert_to_v3(); + let mut vote_state = versioned.convert_to_current(); let authorized_voter = vote_state.get_and_update_authorized_voter(clock.epoch)?; verify_authorized_signer(&authorized_voter, signers)?; @@ -948,7 +948,7 @@ pub fn process_vote_state_update( } pub fn do_process_vote_state_update( - vote_state: &mut VoteStateV3, + vote_state: &mut VoteState, slot_hashes: &[SlotHash], epoch: u64, slot: u64, @@ -994,7 +994,7 @@ pub fn process_tower_sync( } fn do_process_tower_sync( - vote_state: &mut VoteStateV3, + vote_state: &mut VoteState, slot_hashes: &[SlotHash], epoch: u64, slot: u64, @@ -1032,9 +1032,9 @@ pub fn create_account_with_authorized( commission: u8, lamports: u64, ) -> AccountSharedData { - let mut vote_account = AccountSharedData::new(lamports, VoteStateV3::size_of(), &id()); + let mut vote_account = AccountSharedData::new(lamports, VoteState::size_of(), &id()); - let vote_state = VoteStateV3::new( + let vote_state = VoteState::new( &VoteInit { node_pubkey: *node_pubkey, authorized_voter: *authorized_voter, @@ -1044,8 +1044,8 @@ pub fn create_account_with_authorized( &Clock::default(), ); - VoteStateV3::serialize( - &VoteStateVersions::V3(Box::new(vote_state)), + VoteState::serialize( + &VoteStateVersions::Current(Box::new(vote_state)), vote_account.data_as_mut_slice(), ) .unwrap(); @@ -1079,8 +1079,8 @@ mod tests { const MAX_RECENT_VOTES: usize = 16; - fn vote_state_new_for_test(auth_pubkey: &Pubkey) -> VoteStateV3 { - VoteStateV3::new( + fn vote_state_new_for_test(auth_pubkey: &Pubkey) -> VoteState { + VoteState::new( &VoteInit { node_pubkey: solana_pubkey::new_rand(), authorized_voter: *auth_pubkey, @@ -1093,7 +1093,7 @@ mod tests { fn create_test_account() -> (Pubkey, RefCell) { let rent = Rent::default(); - let balance = VoteStateV3::get_rent_exempt_reserve(&rent); + let balance = VoteState::get_rent_exempt_reserve(&rent); let vote_pubkey = solana_pubkey::new_rand(); ( vote_pubkey, @@ -1112,7 +1112,7 @@ mod tests { // required lamports for rent exempt minimum at that size let node_pubkey = solana_pubkey::new_rand(); let withdrawer_pubkey = solana_pubkey::new_rand(); - let mut vote_state = VoteStateV3::new( + let mut vote_state = VoteState::new( &VoteInit { node_pubkey, authorized_voter: withdrawer_pubkey, @@ -1186,7 +1186,7 @@ mod tests { assert_matches!(vote_state_version, VoteStateVersions::V1_14_11(_)); // Convert the vote state to current as would occur during vote instructions - let converted_vote_state = vote_state_version.convert_to_v3(); + let converted_vote_state = vote_state_version.convert_to_current(); // Check to make sure that the vote_state is unchanged assert!(vote_state == converted_vote_state); @@ -1203,7 +1203,7 @@ mod tests { assert_matches!(vote_state_version, VoteStateVersions::V1_14_11(_)); // Convert the vote state to current as would occur during vote instructions - let converted_vote_state = vote_state_version.convert_to_v3(); + let converted_vote_state = vote_state_version.convert_to_current(); // Check to make sure that the vote_state is unchanged assert_eq!(vote_state, converted_vote_state); @@ -1220,7 +1220,7 @@ mod tests { assert_matches!(vote_state_version, VoteStateVersions::V1_14_11(_)); // Convert the vote state to current as would occur during vote instructions - let converted_vote_state = vote_state_version.convert_to_v3(); + let converted_vote_state = vote_state_version.convert_to_current(); // Check to make sure that the vote_state is unchanged assert_eq!(vote_state, converted_vote_state); @@ -1230,7 +1230,7 @@ mod tests { // Test that when the feature is enabled, if the vote account does have sufficient lamports, the // new vote state is written out assert_eq!( - borrowed_account.set_lamports(rent.minimum_balance(VoteStateV3::size_of()),), + borrowed_account.set_lamports(rent.minimum_balance(VoteState::size_of()),), Ok(()) ); assert_eq!( @@ -1238,10 +1238,10 @@ mod tests { Ok(()) ); let vote_state_version = borrowed_account.get_state::().unwrap(); - assert_matches!(vote_state_version, VoteStateVersions::V3(_)); + assert_matches!(vote_state_version, VoteStateVersions::Current(_)); // Convert the vote state to current as would occur during vote instructions - let converted_vote_state = vote_state_version.convert_to_v3(); + let converted_vote_state = vote_state_version.convert_to_current(); // Check to make sure that the vote_state is unchanged assert_eq!(vote_state, converted_vote_state); @@ -1251,10 +1251,10 @@ mod tests { fn test_vote_lockout() { let (_vote_pubkey, vote_account) = create_test_account(); - let mut vote_state: VoteStateV3 = + let mut vote_state: VoteState = StateMut::::state(&*vote_account.borrow()) .unwrap() - .convert_to_v3(); + .convert_to_current(); for i in 0..(MAX_LOCKOUT_HISTORY + 1) { process_slot_vote_unchecked(&mut vote_state, (INITIAL_LOCKOUT * i) as u64); @@ -1290,7 +1290,7 @@ mod tests { let node_pubkey = Pubkey::new_unique(); let withdrawer_pubkey = Pubkey::new_unique(); let clock = Clock::default(); - let vote_state = VoteStateV3::new( + let vote_state = VoteState::new( &VoteInit { node_pubkey, authorized_voter: withdrawer_pubkey, @@ -1301,7 +1301,7 @@ mod tests { ); let serialized = - bincode::serialize(&VoteStateVersions::V3(Box::new(vote_state.clone()))).unwrap(); + bincode::serialize(&VoteStateVersions::Current(Box::new(vote_state.clone()))).unwrap(); let serialized_len = serialized.len(); let rent = Rent::default(); let lamports = rent.minimum_balance(serialized_len); @@ -1351,7 +1351,7 @@ mod tests { borrowed_account .get_state::() .unwrap() - .convert_to_v3() + .convert_to_current() .commission, 10 ); @@ -1369,7 +1369,7 @@ mod tests { borrowed_account .get_state::() .unwrap() - .convert_to_v3() + .convert_to_current() .commission, 11 ); @@ -1389,7 +1389,7 @@ mod tests { borrowed_account .get_state::() .unwrap() - .convert_to_v3() + .convert_to_current() .commission, 11 ); @@ -1409,7 +1409,7 @@ mod tests { borrowed_account .get_state::() .unwrap() - .convert_to_v3() + .convert_to_current() .commission, 10 ); @@ -1418,7 +1418,7 @@ mod tests { borrowed_account .get_state::() .unwrap() - .convert_to_v3() + .convert_to_current() .commission, 10 ); @@ -1437,7 +1437,7 @@ mod tests { borrowed_account .get_state::() .unwrap() - .convert_to_v3() + .convert_to_current() .commission, 9 ); @@ -1549,7 +1549,7 @@ mod tests { assert!(vote_state.nth_recent_lockout(MAX_LOCKOUT_HISTORY).is_none()); } - fn check_lockouts(vote_state: &VoteStateV3) { + fn check_lockouts(vote_state: &VoteState) { for (i, vote) in vote_state.votes.iter().enumerate() { let num_votes = vote_state .votes @@ -1563,7 +1563,7 @@ mod tests { } } - fn recent_votes(vote_state: &VoteStateV3) -> Vec { + fn recent_votes(vote_state: &VoteState) -> Vec { let start = vote_state.votes.len().saturating_sub(MAX_RECENT_VOTES); (start..vote_state.votes.len()) .map(|i| { @@ -1605,7 +1605,7 @@ mod tests { #[test] fn test_process_vote_skips_old_vote() { - let mut vote_state = VoteStateV3::default(); + let mut vote_state = VoteState::default(); let vote = Vote::new(vec![0], Hash::default()); let slot_hashes: Vec<_> = vec![(0, vote.hash)]; @@ -1623,7 +1623,7 @@ mod tests { #[test] fn test_check_slots_are_valid_vote_empty_slot_hashes() { - let vote_state = VoteStateV3::default(); + let vote_state = VoteState::default(); let vote = Vote::new(vec![0], Hash::default()); assert_eq!( @@ -1634,7 +1634,7 @@ mod tests { #[test] fn test_check_slots_are_valid_new_vote() { - let vote_state = VoteStateV3::default(); + let vote_state = VoteState::default(); let vote = Vote::new(vec![0], Hash::default()); let slot_hashes: Vec<_> = vec![(*vote.slots.last().unwrap(), vote.hash)]; @@ -1646,7 +1646,7 @@ mod tests { #[test] fn test_check_slots_are_valid_bad_hash() { - let vote_state = VoteStateV3::default(); + let vote_state = VoteState::default(); let vote = Vote::new(vec![0], Hash::default()); let slot_hashes: Vec<_> = vec![(*vote.slots.last().unwrap(), hash(vote.hash.as_ref()))]; @@ -1658,7 +1658,7 @@ mod tests { #[test] fn test_check_slots_are_valid_bad_slot() { - let vote_state = VoteStateV3::default(); + let vote_state = VoteState::default(); let vote = Vote::new(vec![1], Hash::default()); let slot_hashes: Vec<_> = vec![(0, vote.hash)]; @@ -1670,7 +1670,7 @@ mod tests { #[test] fn test_check_slots_are_valid_duplicate_vote() { - let mut vote_state = VoteStateV3::default(); + let mut vote_state = VoteState::default(); let vote = Vote::new(vec![0], Hash::default()); let slot_hashes: Vec<_> = vec![(*vote.slots.last().unwrap(), vote.hash)]; @@ -1686,7 +1686,7 @@ mod tests { #[test] fn test_check_slots_are_valid_next_vote() { - let mut vote_state = VoteStateV3::default(); + let mut vote_state = VoteState::default(); let vote = Vote::new(vec![0], Hash::default()); let slot_hashes: Vec<_> = vec![(*vote.slots.last().unwrap(), vote.hash)]; @@ -1705,7 +1705,7 @@ mod tests { #[test] fn test_check_slots_are_valid_next_vote_only() { - let mut vote_state = VoteStateV3::default(); + let mut vote_state = VoteState::default(); let vote = Vote::new(vec![0], Hash::default()); let slot_hashes: Vec<_> = vec![(*vote.slots.last().unwrap(), vote.hash)]; @@ -1723,7 +1723,7 @@ mod tests { } #[test] fn test_process_vote_empty_slots() { - let mut vote_state = VoteStateV3::default(); + let mut vote_state = VoteState::default(); let vote = Vote::new(vec![], Hash::default()); assert_eq!( @@ -1733,7 +1733,7 @@ mod tests { } pub fn process_new_vote_state_from_lockouts( - vote_state: &mut VoteStateV3, + vote_state: &mut VoteState, new_state: VecDeque, new_root: Option, timestamp: Option, @@ -1752,8 +1752,8 @@ mod tests { // Test vote credit updates after "one credit per slot" feature is enabled #[test] fn test_vote_state_update_increment_credits() { - // Create a new VoteStateV3 - let mut vote_state = VoteStateV3::new(&VoteInit::default(), &Clock::default()); + // Create a new Votestate + let mut vote_state = VoteState::new(&VoteInit::default(), &Clock::default()); // Test data: a sequence of groups of votes to simulate having been cast, after each group a vote // state update is compared to "normal" vote processing to ensure that credits are earned equally @@ -1998,10 +1998,10 @@ mod tests { // For each vote group, process all vote groups leading up to it and it itself, and ensure that the number of // credits earned is correct for both regular votes and vote state updates for i in 0..test_vote_groups.len() { - // Create a new VoteStateV3 for vote transaction - let mut vote_state_1 = VoteStateV3::new(&VoteInit::default(), &Clock::default()); - // Create a new VoteStateV3 for vote state update transaction - let mut vote_state_2 = VoteStateV3::new(&VoteInit::default(), &Clock::default()); + // Create a new VoteState for vote transaction + let mut vote_state_1 = VoteState::new(&VoteInit::default(), &Clock::default()); + // Create a new VoteState for vote state update transaction + let mut vote_state_2 = VoteState::new(&VoteInit::default(), &Clock::default()); test_vote_groups.iter().take(i + 1).for_each(|vote_group| { let vote = Vote { slots: vote_group.0.clone(), //vote_group.0 is the set of slots to cast votes on @@ -2124,7 +2124,7 @@ mod tests { ]; // Initial vote state - let mut vote_state = VoteStateV3::new(&VoteInit::default(), &Clock::default()); + let mut vote_state = VoteState::new(&VoteInit::default(), &Clock::default()); // Process the vote state updates in sequence and ensure that the credits earned after each is processed is // correct @@ -2158,7 +2158,7 @@ mod tests { #[test] fn test_process_new_vote_too_many_votes() { - let mut vote_state1 = VoteStateV3::default(); + let mut vote_state1 = VoteState::default(); let bad_votes: VecDeque = (0..=MAX_LOCKOUT_HISTORY) .map(|slot| { Lockout::new_with_confirmation_count( @@ -2183,7 +2183,7 @@ mod tests { #[test] fn test_process_new_vote_state_root_rollback() { - let mut vote_state1 = VoteStateV3::default(); + let mut vote_state1 = VoteState::default(); for i in 0..MAX_LOCKOUT_HISTORY + 2 { process_slot_vote_unchecked(&mut vote_state1, i as Slot); } @@ -2227,7 +2227,7 @@ mod tests { #[test] fn test_process_new_vote_state_zero_confirmations() { - let mut vote_state1 = VoteStateV3::default(); + let mut vote_state1 = VoteState::default(); let current_epoch = vote_state1.current_epoch(); let bad_votes: VecDeque = vec![ @@ -2267,7 +2267,7 @@ mod tests { #[test] fn test_process_new_vote_state_confirmations_too_large() { - let mut vote_state1 = VoteStateV3::default(); + let mut vote_state1 = VoteState::default(); let current_epoch = vote_state1.current_epoch(); let good_votes: VecDeque = vec![Lockout::new_with_confirmation_count( @@ -2286,7 +2286,7 @@ mod tests { ) .unwrap(); - let mut vote_state1 = VoteStateV3::default(); + let mut vote_state1 = VoteState::default(); let bad_votes: VecDeque = vec![Lockout::new_with_confirmation_count( 0, MAX_LOCKOUT_HISTORY as u32 + 1, @@ -2307,7 +2307,7 @@ mod tests { #[test] fn test_process_new_vote_state_slot_smaller_than_root() { - let mut vote_state1 = VoteStateV3::default(); + let mut vote_state1 = VoteState::default(); let current_epoch = vote_state1.current_epoch(); let root_slot = 5; @@ -2348,7 +2348,7 @@ mod tests { #[test] fn test_process_new_vote_state_slots_not_ordered() { - let mut vote_state1 = VoteStateV3::default(); + let mut vote_state1 = VoteState::default(); let current_epoch = vote_state1.current_epoch(); let bad_votes: VecDeque = vec![ @@ -2388,7 +2388,7 @@ mod tests { #[test] fn test_process_new_vote_state_confirmations_not_ordered() { - let mut vote_state1 = VoteStateV3::default(); + let mut vote_state1 = VoteState::default(); let current_epoch = vote_state1.current_epoch(); let bad_votes: VecDeque = vec![ @@ -2428,7 +2428,7 @@ mod tests { #[test] fn test_process_new_vote_state_new_vote_state_lockout_mismatch() { - let mut vote_state1 = VoteStateV3::default(); + let mut vote_state1 = VoteState::default(); let current_epoch = vote_state1.current_epoch(); let bad_votes: VecDeque = vec![ @@ -2453,7 +2453,7 @@ mod tests { #[test] fn test_process_new_vote_state_confirmation_rollback() { - let mut vote_state1 = VoteStateV3::default(); + let mut vote_state1 = VoteState::default(); let current_epoch = vote_state1.current_epoch(); let votes: VecDeque = vec![ Lockout::new_with_confirmation_count(0, 4), @@ -2488,7 +2488,7 @@ mod tests { #[test] fn test_process_new_vote_state_root_progress() { - let mut vote_state1 = VoteStateV3::default(); + let mut vote_state1 = VoteState::default(); for i in 0..MAX_LOCKOUT_HISTORY { process_slot_vote_unchecked(&mut vote_state1, i as u64); } @@ -2540,7 +2540,7 @@ mod tests { // will immediately pop off 2. // Construct on-chain vote state - let mut vote_state1 = VoteStateV3::default(); + let mut vote_state1 = VoteState::default(); process_slot_votes_unchecked(&mut vote_state1, &[1, 2, 5]); assert_eq!( vote_state1 @@ -2552,7 +2552,7 @@ mod tests { ); // Construct local tower state - let mut vote_state2 = VoteStateV3::default(); + let mut vote_state2 = VoteState::default(); process_slot_votes_unchecked(&mut vote_state2, &[1, 2, 3, 5, 7]); assert_eq!( vote_state2 @@ -2580,7 +2580,7 @@ mod tests { #[test] fn test_process_new_vote_state_lockout_violation() { // Construct on-chain vote state - let mut vote_state1 = VoteStateV3::default(); + let mut vote_state1 = VoteState::default(); process_slot_votes_unchecked(&mut vote_state1, &[1, 2, 4, 5]); assert_eq!( vote_state1 @@ -2593,7 +2593,7 @@ mod tests { // Construct conflicting tower state. Vote 4 is missing, // but 5 should not have popped off vote 4. - let mut vote_state2 = VoteStateV3::default(); + let mut vote_state2 = VoteState::default(); process_slot_votes_unchecked(&mut vote_state2, &[1, 2, 3, 5, 7]); assert_eq!( vote_state2 @@ -2621,7 +2621,7 @@ mod tests { #[test] fn test_process_new_vote_state_lockout_violation2() { // Construct on-chain vote state - let mut vote_state1 = VoteStateV3::default(); + let mut vote_state1 = VoteState::default(); process_slot_votes_unchecked(&mut vote_state1, &[1, 2, 5, 6, 7]); assert_eq!( vote_state1 @@ -2634,7 +2634,7 @@ mod tests { // Construct a new vote state. Violates on-chain state because 8 // should not have popped off 7 - let mut vote_state2 = VoteStateV3::default(); + let mut vote_state2 = VoteState::default(); process_slot_votes_unchecked(&mut vote_state2, &[1, 2, 3, 5, 6, 8]); assert_eq!( vote_state2 @@ -2663,7 +2663,7 @@ mod tests { #[test] fn test_process_new_vote_state_expired_ancestor_not_removed() { // Construct on-chain vote state - let mut vote_state1 = VoteStateV3::default(); + let mut vote_state1 = VoteState::default(); process_slot_votes_unchecked(&mut vote_state1, &[1, 2, 3, 9]); assert_eq!( vote_state1 @@ -2707,7 +2707,7 @@ mod tests { #[test] fn test_process_new_vote_current_state_contains_bigger_slots() { - let mut vote_state1 = VoteStateV3::default(); + let mut vote_state1 = VoteState::default(); process_slot_votes_unchecked(&mut vote_state1, &[6, 7, 8]); assert_eq!( vote_state1 @@ -2762,7 +2762,7 @@ mod tests { #[test] fn test_filter_old_votes() { - let mut vote_state = VoteStateV3::default(); + let mut vote_state = VoteState::default(); let old_vote_slot = 1; let vote = Vote::new(vec![old_vote_slot], Hash::default()); @@ -2803,8 +2803,8 @@ mod tests { .collect() } - fn build_vote_state(vote_slots: Vec, slot_hashes: &[(Slot, Hash)]) -> VoteStateV3 { - let mut vote_state = VoteStateV3::default(); + fn build_vote_state(vote_slots: Vec, slot_hashes: &[(Slot, Hash)]) -> VoteState { + let mut vote_state = VoteState::default(); if !vote_slots.is_empty() { let vote_hash = slot_hashes @@ -3480,7 +3480,7 @@ mod tests { ] ); - // Because 6 from the original VoteStateV3 + // Because 6 from the original VoteState // should not have been popped off in the proposed state, // we should get a lockout conflict assert_eq!( diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 72ed58bedd0ebc..0dc51423011fed 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -46,7 +46,6 @@ soketto = { workspace = true } solana-account = { workspace = true } solana-account-decoder = { workspace = true } solana-accounts-db = { workspace = true } -solana-cli-output = { workspace = true } solana-client = { workspace = true } solana-clock = { workspace = true } solana-commitment-config = { workspace = true } @@ -107,7 +106,6 @@ tokio-util = { workspace = true, features = ["codec", "compat"] } agave-reserved-account-keys = { workspace = true } serial_test = { workspace = true } solana-address-lookup-table-interface = { workspace = true } -solana-cluster-type = { workspace = true } solana-compute-budget-interface = { workspace = true } solana-fee-calculator = { workspace = true } solana-fee-structure = { workspace = true } diff --git a/rpc/src/rpc.rs b/rpc/src/rpc.rs index b4d40b05e52adf..9c543002e315f2 100644 --- a/rpc/src/rpc.rs +++ b/rpc/src/rpc.rs @@ -4546,7 +4546,7 @@ pub mod tests { EncodedConfirmedBlock, EncodedTransaction, EncodedTransactionWithStatusMeta, TransactionDetails, }, - solana_vote_interface::state::VoteStateV3, + solana_vote_interface::state::VoteState, solana_vote_program::{ vote_instruction, vote_state::{self, TowerSync, VoteInit, VoteStateVersions, MAX_LOCKOUT_HISTORY}, @@ -5006,10 +5006,10 @@ pub mod tests { bank } - fn store_vote_account(&self, vote_pubkey: &Pubkey, vote_state: VoteStateV3) { + fn store_vote_account(&self, vote_pubkey: &Pubkey, vote_state: VoteState) { let bank = self.working_bank(); - let versioned = VoteStateVersions::new_v3(vote_state); - let space = VoteStateV3::size_of(); + let versioned = VoteStateVersions::new_current(vote_state); + let space = VoteState::size_of(); let balance = bank.get_minimum_balance_for_rent_exemption(space); let mut vote_account = AccountSharedData::new(balance, space, &solana_vote_program::id()); @@ -7571,7 +7571,7 @@ pub mod tests { // Create a vote account with no stake. let alice_vote_keypair = Keypair::new(); - let alice_vote_state = VoteStateV3::new( + let alice_vote_state = VoteState::new( &VoteInit { node_pubkey: mint_keypair.pubkey(), authorized_voter: alice_vote_keypair.pubkey(), diff --git a/rpc/src/rpc_service.rs b/rpc/src/rpc_service.rs index 40a3fd0b559f2b..62e4742ee7cfca 100644 --- a/rpc/src/rpc_service.rs +++ b/rpc/src/rpc_service.rs @@ -16,7 +16,6 @@ use { RequestMiddlewareAction, ServerBuilder, }, regex::Regex, - solana_cli_output::display::build_balance_message, solana_client::connection_cache::{ConnectionCache, Protocol}, solana_genesis_config::DEFAULT_GENESIS_DOWNLOAD_PATH, solana_gossip::cluster_info::ClusterInfo, @@ -28,6 +27,7 @@ use { leader_schedule_cache::LeaderScheduleCache, }, solana_metrics::inc_new_counter_info, + solana_native_token::lamports_to_sol, solana_perf::thread::renice_this_thread, solana_poh::poh_recorder::PohRecorder, solana_quic_definitions::NotifyKeyUpdate, @@ -434,14 +434,14 @@ async fn handle_rest(bank_forks: &Arc>, path: &str) -> Option< let bank = bank_forks.read().unwrap().root_bank(); let supply_result = calculate_circulating_supply_async(&bank).await; match supply_result { - Ok(supply) => Some(build_balance_message(supply, false, false)), + Ok(supply) => Some(format!("{}", lamports_to_sol(supply))), Err(_) => None, } } "/v0/total-supply" => { let bank = bank_forks.read().unwrap().root_bank(); let total_supply = bank.capitalization(); - Some(build_balance_message(total_supply, false, false)) + Some(format!("{}", lamports_to_sol(total_supply))) } _ => None, } @@ -956,8 +956,7 @@ mod tests { use { super::*, crate::rpc::{create_validator_exit, tests::new_test_cluster_info}, - solana_cluster_type::ClusterType, - solana_genesis_config::DEFAULT_GENESIS_ARCHIVE, + solana_genesis_config::{ClusterType, DEFAULT_GENESIS_ARCHIVE}, solana_ledger::{ genesis_utils::{create_genesis_config, GenesisConfigInfo}, get_tmp_ledger_path_auto_delete, diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 3870638df03f52..894c89b67d3db5 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -34,7 +34,6 @@ frozen-abi = [ "solana-hard-forks/frozen-abi", "solana-inflation/frozen-abi", "solana-instruction/frozen-abi", - "solana-instruction-error/frozen-abi", "solana-perf/frozen-abi", "solana-program-runtime/frozen-abi", "solana-rent/frozen-abi", @@ -95,7 +94,6 @@ solana-bucket-map = { workspace = true } solana-builtins = { workspace = true } solana-client-traits = { workspace = true } solana-clock = { workspace = true } -solana-cluster-type = { workspace = true } solana-commitment-config = { workspace = true } solana-compute-budget = { workspace = true } solana-compute-budget-instruction = { workspace = true } @@ -106,7 +104,7 @@ solana-ed25519-program = { workspace = true } solana-epoch-info = { workspace = true } solana-epoch-rewards-hasher = { workspace = true } solana-epoch-schedule = { workspace = true } -solana-feature-gate-interface = { workspace = true, features = ["bincode"] } +solana-feature-gate-interface = { workspace = true } solana-fee = { workspace = true } solana-fee-calculator = { workspace = true } solana-fee-structure = { workspace = true, features = ["serde"] } @@ -191,7 +189,6 @@ rand0-7 = { package = "rand", version = "0.7" } rand_chacha = { workspace = true } solana-accounts-db = { workspace = true, features = ["dev-context-only-utils"] } solana-builtins = { workspace = true, features = ["dev-context-only-utils"] } -solana-instruction-error = { workspace = true } solana-logger = { workspace = true } # See order-crates-for-publishing.py for using this unusual `path = "."` solana-runtime = { path = ".", features = ["dev-context-only-utils"] } @@ -199,9 +196,7 @@ solana-runtime-transaction = { workspace = true, features = [ "dev-context-only-utils", ] } solana-sdk-ids = { workspace = true } -solana-secp256k1-program = { workspace = true, features = ["bincode"] } solana-signature = { workspace = true, features = ["std"] } -solana-stake-interface = { workspace = true, features = ["sysvar"] } solana-svm = { workspace = true, features = ["dev-context-only-utils"] } solana-transaction-context = { workspace = true, features = [ "dev-context-only-utils", diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index f2951a402b067c..94cfee41ba0202 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -89,7 +89,6 @@ use { BankId, Epoch, Slot, SlotIndex, UnixTimestamp, INITIAL_RENT_EPOCH, MAX_PROCESSING_AGE, MAX_TRANSACTION_FORWARDING_DELAY, }, - solana_cluster_type::ClusterType, solana_compute_budget::compute_budget::ComputeBudget, solana_compute_budget_instruction::instructions_processor::process_compute_budget_instructions, solana_cost_model::{block_cost_limits::simd_0286_block_limits, cost_tracker::CostTracker}, @@ -99,7 +98,7 @@ use { solana_fee::FeeFeatures, solana_fee_calculator::FeeRateGovernor, solana_fee_structure::{FeeBudgetLimits, FeeDetails, FeeStructure}, - solana_genesis_config::GenesisConfig, + solana_genesis_config::{ClusterType, GenesisConfig}, solana_hard_forks::HardForks, solana_hash::Hash, solana_inflation::Inflation, @@ -123,9 +122,7 @@ use { solana_signature::Signature, solana_slot_hashes::SlotHashes, solana_slot_history::{Check, SlotHistory}, - solana_stake_interface::{ - stake_history::StakeHistory, state::Delegation, sysvar::stake_history, - }, + solana_stake_interface::state::Delegation, solana_svm::{ account_loader::LoadedTransaction, account_overrides::AccountOverrides, @@ -149,7 +146,7 @@ use { solana_svm_timings::{ExecuteTimingType, ExecuteTimings}, solana_svm_transaction::svm_message::SVMMessage, solana_system_transaction as system_transaction, - solana_sysvar::{self as sysvar, last_restart_slot::LastRestartSlot, SysvarSerialize}, + solana_sysvar::{self as sysvar, last_restart_slot::LastRestartSlot, Sysvar}, solana_sysvar_id::SysvarId, solana_time_utils::years_as_slots, solana_transaction::{ @@ -218,7 +215,7 @@ pub const MAX_LEADER_SCHEDULE_STAKES: Epoch = 5; pub type BankStatusCache = StatusCache>; #[cfg_attr( feature = "frozen-abi", - frozen_abi(digest = "2mR2EKFguLhheKtDzbFxoQonSmUtM9svd8kkgeKpe2vu") + frozen_abi(digest = "5dfDCRGWPV7thfoZtLpTJAV8cC93vQUXgTm6BnrfeUsN") )] pub type BankSlotDelta = SlotDelta>; @@ -2132,7 +2129,7 @@ impl Bank { pub fn set_sysvar_for_tests(&self, sysvar: &T) where - T: SysvarSerialize + SysvarId, + T: Sysvar + SysvarId, { self.update_sysvar_account(&T::id(), |account| { create_account( @@ -2241,8 +2238,8 @@ impl Bank { return; } // if I'm the first Bank in an epoch, ensure stake_history is updated - self.update_sysvar_account(&stake_history::id(), |account| { - create_account::( + self.update_sysvar_account(&sysvar::stake_history::id(), |account| { + create_account::( self.stakes_cache.stakes().history(), self.inherit_specially_retained_account_fields(account), ) @@ -5320,9 +5317,9 @@ impl Bank { // Update activation slot of features in `new_feature_activations` for feature_id in new_feature_activations.iter() { if let Some(mut account) = self.get_account_with_fixed_root(feature_id) { - if let Some(mut feature) = feature::state::from_account(&account) { + if let Some(mut feature) = feature::from_account(&account) { feature.activated_at = Some(self.slot()); - if feature::state::to_account(&feature, &mut account).is_some() { + if feature::to_account(&feature, &mut account).is_some() { self.store_account(feature_id, &account); } info!("Feature {} activated at slot {}", feature_id, self.slot()); @@ -5396,7 +5393,7 @@ impl Bank { for feature_id in self.feature_set.inactive() { let mut activated = None; if let Some(account) = self.get_account_with_fixed_root(feature_id) { - if let Some(feature) = feature::state::from_account(&account) { + if let Some(feature) = feature::from_account(&account) { match feature.activated_at { None if include_pending => { // Feature activation is pending @@ -6080,7 +6077,7 @@ pub mod test_utils { let mut vote_account = bank.get_account(vote_pubkey).unwrap_or_default(); let mut vote_state = vote_state::from(&vote_account).unwrap_or_default(); vote_state.last_timestamp = timestamp; - let versioned = VoteStateVersions::new_v3(vote_state); + let versioned = VoteStateVersions::new_current(vote_state); vote_state::to(&versioned, &mut vote_account).unwrap(); bank.store_account(vote_pubkey, &vote_account); } diff --git a/runtime/src/bank/address_lookup_table.rs b/runtime/src/bank/address_lookup_table.rs index a6cbb52c297ca2..fc2613977999ec 100644 --- a/runtime/src/bank/address_lookup_table.rs +++ b/runtime/src/bank/address_lookup_table.rs @@ -4,10 +4,9 @@ use { solana_clock::Slot, solana_message::{ v0::{LoadedAddresses, MessageAddressTableLookup}, - AddressLoader, + AddressLoader, AddressLoaderError, }, solana_svm_transaction::message_address_table_lookup::SVMMessageAddressTableLookup, - solana_transaction_error::AddressLoaderError, }; fn into_address_loader_error(err: AddressLookupError) -> AddressLoaderError { diff --git a/runtime/src/bank/partitioned_epoch_rewards/calculation.rs b/runtime/src/bank/partitioned_epoch_rewards/calculation.rs index 5344abf5d67184..02e8c74973faf8 100644 --- a/runtime/src/bank/partitioned_epoch_rewards/calculation.rs +++ b/runtime/src/bank/partitioned_epoch_rewards/calculation.rs @@ -584,10 +584,10 @@ mod tests { }, rayon::ThreadPoolBuilder, solana_account::{accounts_equal, state_traits::StateMut, ReadableAccount}, - solana_native_token::LAMPORTS_PER_SOL, + solana_native_token::{sol_to_lamports, LAMPORTS_PER_SOL}, solana_reward_info::RewardType, solana_stake_interface::state::{Delegation, StakeStateV2}, - solana_vote_interface::state::VoteStateV3, + solana_vote_interface::state::VoteState, std::sync::{Arc, RwLockReadGuard}, }; @@ -742,7 +742,7 @@ mod tests { solana_logger::setup(); // bank with no rewards to distribute - let (genesis_config, _mint_keypair) = create_genesis_config(LAMPORTS_PER_SOL); + let (genesis_config, _mint_keypair) = create_genesis_config(sol_to_lamports(1.0)); let bank = Bank::new_for_tests(&genesis_config); let thread_pool = ThreadPoolBuilder::new().num_threads(1).build().unwrap(); @@ -804,7 +804,7 @@ mod tests { .load_slow_with_fixed_root(&bank.ancestors, vote_pubkey) .unwrap() .0; - let vote_state = VoteStateV3::deserialize(vote_account.data()).unwrap(); + let vote_state = VoteState::deserialize(vote_account.data()).unwrap(); assert_eq!( vote_rewards_accounts.accounts_with_rewards.len(), diff --git a/runtime/src/bank/partitioned_epoch_rewards/mod.rs b/runtime/src/bank/partitioned_epoch_rewards/mod.rs index f3f5ff23d34776..c81ac1c91cb91b 100644 --- a/runtime/src/bank/partitioned_epoch_rewards/mod.rs +++ b/runtime/src/bank/partitioned_epoch_rewards/mod.rs @@ -501,10 +501,10 @@ mod tests { if let Some(v) = vote_state.as_mut() { vote_state::process_slot_vote_unchecked(v, i as u64) } - let versioned = VoteStateVersions::V3(Box::new(vote_state.take().unwrap())); + let versioned = VoteStateVersions::Current(Box::new(vote_state.take().unwrap())); vote_state::to(&versioned, &mut vote_account).unwrap(); match versioned { - VoteStateVersions::V3(v) => { + VoteStateVersions::Current(v) => { vote_state = Some(*v); } _ => panic!("Has to be of type Current"), diff --git a/runtime/src/bank/serde_snapshot.rs b/runtime/src/bank/serde_snapshot.rs index b47d5299a1387c..76875c4822057d 100644 --- a/runtime/src/bank/serde_snapshot.rs +++ b/runtime/src/bank/serde_snapshot.rs @@ -352,7 +352,7 @@ mod tests { #[cfg_attr( feature = "frozen-abi", derive(AbiExample), - frozen_abi(digest = "4zSePLuo5DnagjcFySpN2xSmQ1JqYmbQm59vfjS7qKpc") + frozen_abi(digest = "A1MwPVjhDGFcajPV44UFRrkuJ7mR4rw4DykCcEqKk1hy") )] #[derive(Serialize)] pub struct BankAbiTestWrapper { diff --git a/runtime/src/bank/tests.rs b/runtime/src/bank/tests.rs index cb37504654f5f0..ab41df47fba6d0 100644 --- a/runtime/src/bank/tests.rs +++ b/runtime/src/bank/tests.rs @@ -46,7 +46,6 @@ use { BankId, Epoch, Slot, UnixTimestamp, DEFAULT_TICKS_PER_SLOT, INITIAL_RENT_EPOCH, MAX_PROCESSING_AGE, MAX_RECENT_BLOCKHASHES, }, - solana_cluster_type::ClusterType, solana_compute_budget::{ compute_budget::ComputeBudget, compute_budget_limits::ComputeBudgetLimits, }, @@ -59,7 +58,7 @@ use { solana_feature_gate_interface::{self as feature, Feature}, solana_fee_calculator::FeeRateGovernor, solana_fee_structure::FeeStructure, - solana_genesis_config::GenesisConfig, + solana_genesis_config::{ClusterType, GenesisConfig}, solana_hash::Hash, solana_instruction::{error::InstructionError, AccountMeta, Instruction}, solana_keypair::{keypair_from_seed, Keypair}, @@ -71,7 +70,7 @@ use { solana_message::{ compiled_instruction::CompiledInstruction, Message, MessageHeader, SanitizedMessage, }, - solana_native_token::LAMPORTS_PER_SOL, + solana_native_token::{sol_to_lamports, LAMPORTS_PER_SOL}, solana_nonce::{self as nonce, state::DurableNonce}, solana_packet::PACKET_DATA_SIZE, solana_poh_config::PohConfig, @@ -117,7 +116,7 @@ use { solana_vote_program::{ vote_instruction, vote_state::{ - self, create_account_with_authorized, BlockTimestamp, VoteInit, VoteStateV3, + self, create_account_with_authorized, BlockTimestamp, VoteInit, VoteState, VoteStateVersions, MAX_LOCKOUT_HISTORY, }, }, @@ -629,7 +628,7 @@ impl Bank { // in practice. let account = self.get_account_with_fixed_root(vote_pubkey)?; if account.owner() == &solana_vote_program - && VoteStateV3::deserialize(account.data()).is_ok() + && VoteState::deserialize(account.data()).is_ok() { vote_accounts_cache_miss_count.fetch_add(1, Relaxed); } @@ -731,11 +730,11 @@ where if let Some(v) = vote_state.as_mut() { vote_state::process_slot_vote_unchecked(v, i as u64) } - let versioned = VoteStateVersions::V3(Box::new(vote_state.take().unwrap())); + let versioned = VoteStateVersions::Current(Box::new(vote_state.take().unwrap())); vote_state::to(&versioned, &mut vote_account).unwrap(); bank0.store_account_and_update_capitalization(&vote_id, &vote_account); match versioned { - VoteStateVersions::V3(v) => { + VoteStateVersions::Current(v) => { vote_state = Some(*v); } _ => panic!("Has to be of type Current"), @@ -881,11 +880,11 @@ fn do_test_bank_update_rewards_determinism() -> u64 { if let Some(v) = vote_state.as_mut() { vote_state::process_slot_vote_unchecked(v, i as u64) } - let versioned = VoteStateVersions::V3(Box::new(vote_state.take().unwrap())); + let versioned = VoteStateVersions::Current(Box::new(vote_state.take().unwrap())); vote_state::to(&versioned, &mut vote_account).unwrap(); bank.store_account_and_update_capitalization(&vote_id, &vote_account); match versioned { - VoteStateVersions::V3(v) => { + VoteStateVersions::Current(v) => { vote_state = Some(*v); } _ => panic!("Has to be of type Current"), @@ -959,7 +958,7 @@ fn test_purge_empty_accounts() { // so we have to stop at various points and restart to actively test. for pass in 0..3 { solana_logger::setup(); - let (genesis_config, mint_keypair) = create_genesis_config_no_tx_fee(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config_no_tx_fee(sol_to_lamports(1.)); let amount = genesis_config.rent.minimum_balance(0); let (mut bank, bank_forks) = Bank::new_for_tests(&genesis_config).wrap_with_bank_forks_for_tests(); @@ -1051,7 +1050,7 @@ fn test_purge_empty_accounts() { #[test] fn test_two_payments_to_one_party() { - let (genesis_config, mint_keypair) = create_genesis_config(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1.)); let pubkey = solana_pubkey::new_rand(); let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let amount = genesis_config.rent.minimum_balance(0); @@ -1068,7 +1067,7 @@ fn test_two_payments_to_one_party() { #[test] fn test_one_source_two_tx_one_batch() { - let (genesis_config, mint_keypair) = create_genesis_config_no_tx_fee(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config_no_tx_fee(sol_to_lamports(1.)); let key1 = solana_pubkey::new_rand(); let key2 = solana_pubkey::new_rand(); let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); @@ -1085,7 +1084,7 @@ fn test_one_source_two_tx_one_batch() { assert_eq!(res[1], Err(TransactionError::AccountInUse)); assert_eq!( bank.get_balance(&mint_keypair.pubkey()), - LAMPORTS_PER_SOL - amount + sol_to_lamports(1.) - amount ); assert_eq!(bank.get_balance(&key1), amount); assert_eq!(bank.get_balance(&key2), 0); @@ -1097,7 +1096,7 @@ fn test_one_source_two_tx_one_batch() { #[test] fn test_one_tx_two_out_atomic_fail() { - let amount = LAMPORTS_PER_SOL; + let amount = sol_to_lamports(1.); let (genesis_config, mint_keypair) = create_genesis_config_no_tx_fee_no_rent(amount); let key1 = solana_pubkey::new_rand(); let key2 = solana_pubkey::new_rand(); @@ -1119,7 +1118,7 @@ fn test_one_tx_two_out_atomic_fail() { #[test] fn test_one_tx_two_out_atomic_pass() { - let (genesis_config, mint_keypair) = create_genesis_config_no_tx_fee(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config_no_tx_fee(sol_to_lamports(1.)); let key1 = solana_pubkey::new_rand(); let key2 = solana_pubkey::new_rand(); let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); @@ -1133,7 +1132,7 @@ fn test_one_tx_two_out_atomic_pass() { bank.process_transaction(&tx).unwrap(); assert_eq!( bank.get_balance(&mint_keypair.pubkey()), - LAMPORTS_PER_SOL - (2 * amount) + sol_to_lamports(1.) - (2 * amount) ); assert_eq!(bank.get_balance(&key1), amount); assert_eq!(bank.get_balance(&key2), amount); @@ -1189,7 +1188,7 @@ fn test_account_not_found() { #[test] fn test_insufficient_funds() { - let mint_amount = LAMPORTS_PER_SOL; + let mint_amount = sol_to_lamports(1.); let (genesis_config, mint_keypair) = create_genesis_config_no_tx_fee(mint_amount); let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let pubkey = solana_pubkey::new_rand(); @@ -1217,7 +1216,7 @@ fn test_insufficient_funds() { #[test] fn test_executed_transaction_count_post_bank_transaction_count_fix() { - let mint_amount = LAMPORTS_PER_SOL; + let mint_amount = sol_to_lamports(1.); let (genesis_config, mint_keypair) = create_genesis_config(mint_amount); let (bank, bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let pubkey = solana_pubkey::new_rand(); @@ -1261,7 +1260,7 @@ fn test_executed_transaction_count_post_bank_transaction_count_fix() { #[test] fn test_transfer_to_newb() { solana_logger::setup(); - let (genesis_config, mint_keypair) = create_genesis_config(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1.)); let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let amount = genesis_config.rent.minimum_balance(0); let pubkey = solana_pubkey::new_rand(); @@ -1272,7 +1271,7 @@ fn test_transfer_to_newb() { #[test] fn test_transfer_to_sysvar() { solana_logger::setup(); - let (genesis_config, mint_keypair) = create_genesis_config(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1.)); let (bank, bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let amount = genesis_config.rent.minimum_balance(0); @@ -1697,19 +1696,19 @@ fn test_bank_blockhash_compute_unit_fee_structure() { #[test] fn test_debits_before_credits() { let (genesis_config, mint_keypair) = - create_genesis_config_no_tx_fee_no_rent(2 * LAMPORTS_PER_SOL); + create_genesis_config_no_tx_fee_no_rent(sol_to_lamports(2.)); let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let keypair = Keypair::new(); let tx0 = system_transaction::transfer( &keypair, &mint_keypair.pubkey(), - LAMPORTS_PER_SOL, + sol_to_lamports(1.), genesis_config.hash(), ); let tx1 = system_transaction::transfer( &mint_keypair, &keypair.pubkey(), - 2 * LAMPORTS_PER_SOL, + sol_to_lamports(2.), genesis_config.hash(), ); let txs = vec![tx0, tx1]; @@ -1829,7 +1828,7 @@ fn test_readonly_accounts(relax_intrabatch_account_locks: bool) { #[test] fn test_interleaving_locks() { - let (genesis_config, mint_keypair) = create_genesis_config(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1.)); let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let alice = Keypair::new(); let bob = Keypair::new(); @@ -2043,7 +2042,7 @@ fn test_bank_invalid_account_index() { #[test] fn test_bank_pay_to_self() { - let (genesis_config, mint_keypair) = create_genesis_config_no_tx_fee(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config_no_tx_fee(sol_to_lamports(1.)); let key1 = Keypair::new(); let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let amount = genesis_config.rent.minimum_balance(0); @@ -2084,7 +2083,7 @@ fn test_bank_parents() { /// Verifies that transactions are dropped if they have already been processed #[test] fn test_tx_already_processed() { - let (genesis_config, mint_keypair) = create_genesis_config(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1.)); let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let key1 = Keypair::new(); @@ -2118,7 +2117,7 @@ fn test_tx_already_processed() { /// Verifies that last ids and status cache are correctly referenced from parent #[test] fn test_bank_parent_already_processed() { - let (genesis_config, mint_keypair) = create_genesis_config(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1.)); let key1 = Keypair::new(); let (parent, bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let amount = genesis_config.rent.minimum_balance(0); @@ -2136,7 +2135,7 @@ fn test_bank_parent_already_processed() { /// Verifies that last ids and accounts are correctly referenced from parent #[test] fn test_bank_parent_account_spend() { - let (genesis_config, mint_keypair) = create_genesis_config_no_tx_fee(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config_no_tx_fee(sol_to_lamports(1.0)); let key1 = Keypair::new(); let key2 = Keypair::new(); let (parent, bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); @@ -2153,7 +2152,8 @@ fn test_bank_parent_account_spend() { #[test] fn test_bank_hash_internal_state() { - let (genesis_config, mint_keypair) = create_genesis_config_no_tx_fee_no_rent(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = + create_genesis_config_no_tx_fee_no_rent(sol_to_lamports(1.)); let (bank0, _bank_forks0) = Bank::new_with_bank_forks_for_tests(&genesis_config); let (bank1, bank_forks1) = Bank::new_with_bank_forks_for_tests(&genesis_config); @@ -2187,7 +2187,7 @@ fn test_bank_hash_internal_state() { fn test_bank_hash_internal_state_verify() { for pass in 0..4 { let (genesis_config, mint_keypair) = - create_genesis_config_no_tx_fee_no_rent(LAMPORTS_PER_SOL); + create_genesis_config_no_tx_fee_no_rent(sol_to_lamports(1.)); let (bank0, bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let amount = genesis_config.rent.minimum_balance(0); @@ -2273,7 +2273,7 @@ fn test_verify_hash_unfrozen() { fn test_verify_snapshot_bank() { solana_logger::setup(); let pubkey = solana_pubkey::new_rand(); - let (genesis_config, mint_keypair) = create_genesis_config(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1.)); let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); bank.transfer( genesis_config.rent.minimum_balance(0), @@ -2294,7 +2294,7 @@ fn test_verify_snapshot_bank() { #[test] fn test_bank_hash_same_transactions_different_fork() { solana_logger::setup(); - let (genesis_config, mint_keypair) = create_genesis_config(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1.)); let (bank0, bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); bank0.freeze(); @@ -2339,7 +2339,7 @@ fn test_hash_internal_state_genesis() { // of hash_internal_state #[test] fn test_hash_internal_state_order() { - let (genesis_config, mint_keypair) = create_genesis_config(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1.)); let amount = genesis_config.rent.minimum_balance(0); let (bank0, _bank_forks0) = Bank::new_with_bank_forks_for_tests(&genesis_config); let (bank1, _bank_forks1) = Bank::new_with_bank_forks_for_tests(&genesis_config); @@ -2358,7 +2358,7 @@ fn test_hash_internal_state_order() { #[test] fn test_hash_internal_state_error() { solana_logger::setup(); - let (genesis_config, mint_keypair) = create_genesis_config(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1.)); let amount = genesis_config.rent.minimum_balance(0); let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let key0 = solana_pubkey::new_rand(); @@ -2367,7 +2367,7 @@ fn test_hash_internal_state_error() { // Transfer will error but still take a fee assert!(bank - .transfer(LAMPORTS_PER_SOL, &mint_keypair, &key0) + .transfer(sol_to_lamports(1.), &mint_keypair, &key0) .is_err()); assert_ne!(orig, bank.hash_internal_state()); @@ -2399,7 +2399,7 @@ fn test_bank_hash_internal_state_squash() { #[test] fn test_bank_squash() { solana_logger::setup(); - let (genesis_config, mint_keypair) = create_genesis_config_no_tx_fee(2 * LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config_no_tx_fee(sol_to_lamports(2.)); let key1 = Keypair::new(); let key2 = Keypair::new(); let (parent, bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); @@ -2470,7 +2470,7 @@ fn test_bank_squash() { #[test] fn test_bank_get_account_in_parent_after_squash() { - let (genesis_config, mint_keypair) = create_genesis_config(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1.)); let (parent, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let amount = genesis_config.rent.minimum_balance(0); @@ -2488,7 +2488,7 @@ fn test_bank_get_account_in_parent_after_squash() { #[test] fn test_bank_get_account_in_parent_after_squash2() { solana_logger::setup(); - let (genesis_config, mint_keypair) = create_genesis_config(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1.)); let (bank0, bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let amount = genesis_config.rent.minimum_balance(0); @@ -2571,7 +2571,7 @@ fn test_bank_get_account_in_parent_after_squash2() { fn test_bank_get_account_modified_since_parent_with_fixed_root() { let pubkey = solana_pubkey::new_rand(); - let (genesis_config, mint_keypair) = create_genesis_config(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1.)); let amount = genesis_config.rent.minimum_balance(0); let (bank1, bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); bank1.transfer(amount, &mint_keypair, &pubkey).unwrap(); @@ -2907,7 +2907,7 @@ fn test_bank_get_slots_in_epoch() { #[test] fn test_is_delta_true() { - let (genesis_config, mint_keypair) = create_genesis_config(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1.0)); let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let key1 = Keypair::new(); let tx_transfer_mint_to_1 = system_transaction::transfer( @@ -2931,7 +2931,7 @@ fn test_is_delta_true() { #[test] fn test_is_empty() { - let (genesis_config, mint_keypair) = create_genesis_config(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1.0)); let (bank0, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let key1 = Keypair::new(); @@ -2951,7 +2951,7 @@ fn test_is_empty() { #[test] fn test_bank_inherit_tx_count() { - let (genesis_config, mint_keypair) = create_genesis_config(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1.0)); let (bank0, bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); // Bank 1 @@ -3102,7 +3102,7 @@ fn test_bank_cloned_stake_delegations() { let (vote_balance, stake_balance) = { let rent = &bank.rent_collector().rent; - let vote_rent_exempt_reserve = rent.minimum_balance(VoteStateV3::size_of()); + let vote_rent_exempt_reserve = rent.minimum_balance(VoteState::size_of()); let stake_rent_exempt_reserve = rent.minimum_balance(StakeStateV2::size_of()); let minimum_delegation = solana_stake_program::get_minimum_delegation( bank.feature_set @@ -4700,7 +4700,7 @@ fn test_transaction_with_duplicate_accounts_in_instruction() { let from_pubkey = solana_pubkey::new_rand(); let to_pubkey = solana_pubkey::new_rand(); let dup_pubkey = from_pubkey; - let from_account = AccountSharedData::new(100 * LAMPORTS_PER_SOL, 1, &mock_program_id); + let from_account = AccountSharedData::new(sol_to_lamports(100.), 1, &mock_program_id); let to_account = AccountSharedData::new(0, 1, &mock_program_id); bank.store_account(&from_pubkey, &from_account); bank.store_account(&to_pubkey, &to_account); @@ -4711,7 +4711,7 @@ fn test_transaction_with_duplicate_accounts_in_instruction() { AccountMeta::new(dup_pubkey, false), ]; let instruction = - Instruction::new_with_bincode(mock_program_id, &(10 * LAMPORTS_PER_SOL), account_metas); + Instruction::new_with_bincode(mock_program_id, &sol_to_lamports(10.), account_metas); let tx = Transaction::new_signed_with_payer( &[instruction], Some(&mint_keypair.pubkey()), @@ -4721,8 +4721,8 @@ fn test_transaction_with_duplicate_accounts_in_instruction() { let result = bank.process_transaction(&tx); assert_eq!(result, Ok(())); - assert_eq!(bank.get_balance(&from_pubkey), 80 * LAMPORTS_PER_SOL); - assert_eq!(bank.get_balance(&to_pubkey), 20 * LAMPORTS_PER_SOL); + assert_eq!(bank.get_balance(&from_pubkey), sol_to_lamports(80.)); + assert_eq!(bank.get_balance(&to_pubkey), sol_to_lamports(20.)); } #[test] @@ -8427,11 +8427,11 @@ fn test_get_largest_accounts() { .iter() .cloned() .zip(vec![ - 2 * LAMPORTS_PER_SOL, - 3 * LAMPORTS_PER_SOL, - 3 * LAMPORTS_PER_SOL, - 4 * LAMPORTS_PER_SOL, - 5 * LAMPORTS_PER_SOL, + sol_to_lamports(2.0), + sol_to_lamports(3.0), + sol_to_lamports(3.0), + sol_to_lamports(4.0), + sol_to_lamports(5.0), ]) .collect(); @@ -8457,17 +8457,17 @@ fn test_get_largest_accounts() { assert_eq!( bank.get_largest_accounts(1, &pubkeys_hashset, AccountAddressFilter::Include, false) .unwrap(), - vec![(pubkeys[4], 5 * LAMPORTS_PER_SOL)] + vec![(pubkeys[4], sol_to_lamports(5.0))] ); assert_eq!( bank.get_largest_accounts(1, &HashSet::new(), AccountAddressFilter::Exclude, false) .unwrap(), - vec![(pubkeys[4], 5 * LAMPORTS_PER_SOL)] + vec![(pubkeys[4], sol_to_lamports(5.0))] ); assert_eq!( bank.get_largest_accounts(1, &exclude4, AccountAddressFilter::Exclude, false) .unwrap(), - vec![(pubkeys[3], 4 * LAMPORTS_PER_SOL)] + vec![(pubkeys[3], sol_to_lamports(4.0))] ); // Return all added accounts @@ -8627,7 +8627,7 @@ fn do_test_clean_dropped_unrooted_banks(freeze_bank1: FreezeBank1) { //! 4. A key with zero lamports is in both an unrooted _and_ rooted bank (key5) //! - In this case, key5's ref-count should be decremented correctly - let (genesis_config, mint_keypair) = create_genesis_config(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1.)); let (bank0, bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let amount = genesis_config.rent.minimum_balance(0); @@ -9506,7 +9506,7 @@ fn test_invalid_rent_state_changes_existing_accounts() { mut genesis_config, mint_keypair, .. - } = create_genesis_config_with_leader(100 * LAMPORTS_PER_SOL, &Pubkey::new_unique(), 42); + } = create_genesis_config_with_leader(sol_to_lamports(100.), &Pubkey::new_unique(), 42); genesis_config.rent = Rent::default(); let mock_program_id = Pubkey::new_unique(); @@ -9614,7 +9614,7 @@ fn test_invalid_rent_state_changes_new_accounts() { mut genesis_config, mint_keypair, .. - } = create_genesis_config_with_leader(100 * LAMPORTS_PER_SOL, &Pubkey::new_unique(), 42); + } = create_genesis_config_with_leader(sol_to_lamports(100.), &Pubkey::new_unique(), 42); genesis_config.rent = Rent::default(); let mock_program_id = Pubkey::new_unique(); @@ -9668,7 +9668,7 @@ fn test_drained_created_account() { mut genesis_config, mint_keypair, .. - } = create_genesis_config_with_leader(100 * LAMPORTS_PER_SOL, &Pubkey::new_unique(), 42); + } = create_genesis_config_with_leader(sol_to_lamports(100.), &Pubkey::new_unique(), 42); genesis_config.rent = Rent::default(); activate_all_features(&mut genesis_config); @@ -9758,11 +9758,11 @@ fn test_rent_state_changes_sysvars() { mut genesis_config, mint_keypair, .. - } = create_genesis_config_with_leader(100 * LAMPORTS_PER_SOL, &Pubkey::new_unique(), 42); + } = create_genesis_config_with_leader(sol_to_lamports(100.), &Pubkey::new_unique(), 42); genesis_config.rent = Rent::default(); let validator_pubkey = solana_pubkey::new_rand(); - let validator_stake_lamports = LAMPORTS_PER_SOL; + let validator_stake_lamports = sol_to_lamports(1.); let validator_staking_keypair = Keypair::new(); let validator_voting_keypair = Keypair::new(); @@ -9820,7 +9820,7 @@ fn test_invalid_rent_state_changes_fee_payer() { mut genesis_config, mint_keypair, .. - } = create_genesis_config_with_leader(100 * LAMPORTS_PER_SOL, &Pubkey::new_unique(), 42); + } = create_genesis_config_with_leader(sol_to_lamports(100.), &Pubkey::new_unique(), 42); genesis_config.rent = Rent::default(); genesis_config.fee_rate_governor = FeeRateGovernor::new( solana_fee_calculator::DEFAULT_TARGET_LAMPORTS_PER_SIGNATURE, @@ -9863,7 +9863,7 @@ fn test_invalid_rent_state_changes_fee_payer() { &[system_instruction::transfer( &rent_exempt_fee_payer.pubkey(), &recipient, - LAMPORTS_PER_SOL, + sol_to_lamports(1.), )], Some(&rent_exempt_fee_payer.pubkey()), &recent_blockhash, @@ -10066,7 +10066,7 @@ fn test_rent_state_incinerator() { mut genesis_config, mint_keypair, .. - } = create_genesis_config_with_leader(100 * LAMPORTS_PER_SOL, &Pubkey::new_unique(), 42); + } = create_genesis_config_with_leader(sol_to_lamports(100.), &Pubkey::new_unique(), 42); genesis_config.rent = Rent::default(); let rent_exempt_minimum = genesis_config.rent.minimum_balance(0); @@ -11026,7 +11026,7 @@ fn test_squash_timing_add_assign() { #[test] fn test_system_instruction_allocate() { - let (genesis_config, mint_keypair) = create_genesis_config_no_tx_fee(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config_no_tx_fee(sol_to_lamports(1.0)); let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let bank_client = BankClient::new_shared(bank); let data_len = 2; @@ -11079,7 +11079,7 @@ where let program = Pubkey::new_unique(); let collector = Pubkey::new_unique(); - let mint_lamports = LAMPORTS_PER_SOL; + let mint_lamports = sol_to_lamports(1.0); let len1 = 123; let len2 = 456; @@ -11172,7 +11172,7 @@ fn test_create_zero_lamport_without_clean() { #[test] fn test_system_instruction_assign_with_seed() { - let (genesis_config, mint_keypair) = create_genesis_config_no_tx_fee(LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config_no_tx_fee(sol_to_lamports(1.0)); let (bank, _bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); let bank_client = BankClient::new_shared(bank); @@ -11207,7 +11207,7 @@ fn test_system_instruction_assign_with_seed() { #[test] fn test_system_instruction_unsigned_transaction() { - let (genesis_config, alice_keypair) = create_genesis_config_no_tx_fee(LAMPORTS_PER_SOL); + let (genesis_config, alice_keypair) = create_genesis_config_no_tx_fee(sol_to_lamports(1.0)); let alice_pubkey = alice_keypair.pubkey(); let mallory_keypair = Keypair::new(); let mallory_pubkey = mallory_keypair.pubkey(); @@ -11240,7 +11240,7 @@ fn test_system_instruction_unsigned_transaction() { ); assert_eq!( bank_client.get_balance(&alice_pubkey).unwrap(), - LAMPORTS_PER_SOL - amount + sol_to_lamports(1.0) - amount ); assert_eq!(bank_client.get_balance(&mallory_pubkey).unwrap(), amount); } diff --git a/runtime/src/bank_client.rs b/runtime/src/bank_client.rs index 24fd38a783893f..0deee1ef4e4024 100644 --- a/runtime/src/bank_client.rs +++ b/runtime/src/bank_client.rs @@ -13,7 +13,8 @@ use { solana_signature::Signature, solana_signer::{signers::Signers, Signer}, solana_system_interface::instruction as system_instruction, - solana_sysvar::SysvarSerialize, + solana_sysvar::Sysvar, + solana_sysvar_id::SysvarId, solana_transaction::{versioned::VersionedTransaction, Transaction}, solana_transaction_error::{TransportError, TransportResult as Result}, std::{ @@ -271,7 +272,7 @@ impl BankClient { Self::new_shared(Arc::new(bank)) } - pub fn set_sysvar_for_tests(&self, sysvar: &T) { + pub fn set_sysvar_for_tests(&self, sysvar: &T) { self.bank.set_sysvar_for_tests(sysvar); } @@ -305,12 +306,12 @@ impl BankClient { mod tests { use { super::*, solana_genesis_config::create_genesis_config, solana_instruction::AccountMeta, - solana_native_token::LAMPORTS_PER_SOL, + solana_native_token::sol_to_lamports, }; #[test] fn test_bank_client_new_with_keypairs() { - let (genesis_config, john_doe_keypair) = create_genesis_config(LAMPORTS_PER_SOL); + let (genesis_config, john_doe_keypair) = create_genesis_config(sol_to_lamports(1.0)); let john_pubkey = john_doe_keypair.pubkey(); let jane_doe_keypair = Keypair::new(); let jane_pubkey = jane_doe_keypair.pubkey(); diff --git a/runtime/src/genesis_utils.rs b/runtime/src/genesis_utils.rs index a8d46a899f8e54..0b26104332793a 100644 --- a/runtime/src/genesis_utils.rs +++ b/runtime/src/genesis_utils.rs @@ -2,12 +2,11 @@ use { agave_feature_set::{FeatureSet, FEATURE_NAMES}, log::*, solana_account::{Account, AccountSharedData}, - solana_cluster_type::ClusterType, solana_feature_gate_interface::{self as feature, Feature}, solana_fee_calculator::FeeRateGovernor, - solana_genesis_config::GenesisConfig, + solana_genesis_config::{ClusterType, GenesisConfig}, solana_keypair::Keypair, - solana_native_token::LAMPORTS_PER_SOL, + solana_native_token::sol_to_lamports, solana_pubkey::Pubkey, solana_rent::Rent, solana_seed_derivable::SeedDerivable, @@ -309,7 +308,7 @@ pub fn create_genesis_config_with_leader_ex_no_features( let native_mint_account = solana_account::AccountSharedData::from(Account { owner: spl_generic_token::token::id(), data: spl_generic_token::token::native_mint::ACCOUNT_DATA.to_vec(), - lamports: LAMPORTS_PER_SOL, + lamports: sol_to_lamports(1.), executable: false, rent_epoch: 1, }); diff --git a/runtime/src/inflation_rewards/mod.rs b/runtime/src/inflation_rewards/mod.rs index dfdb422c668e13..348b7cf2fbaf35 100644 --- a/runtime/src/inflation_rewards/mod.rs +++ b/runtime/src/inflation_rewards/mod.rs @@ -7,8 +7,9 @@ use { }, solana_clock::Epoch, solana_instruction::error::InstructionError, - solana_stake_interface::{error::StakeError, stake_history::StakeHistory}, + solana_stake_interface::error::StakeError, solana_stake_program::stake_state::{Stake, StakeStateV2}, + solana_sysvar::stake_history::StakeHistory, solana_vote::vote_state_view::VoteStateView, }; @@ -254,7 +255,7 @@ fn commission_split(commission: u8, on: u64) -> (u64, u64, bool) { #[cfg(test)] mod tests { use { - self::points::null_tracer, super::*, solana_native_token::LAMPORTS_PER_SOL, + self::points::null_tracer, super::*, solana_native_token::sol_to_lamports, solana_pubkey::Pubkey, solana_stake_interface::state::Delegation, solana_vote_program::vote_state::VoteStateV3, test_case::test_case, }; @@ -675,7 +676,7 @@ mod tests { // bootstrap means fully-vested stake at epoch 0 with // 10_000_000 SOL is a big but not unreasaonable stake let stake = new_stake( - 10_000_000 * LAMPORTS_PER_SOL, + sol_to_lamports(10_000_000f64), &Pubkey::default(), &vote_state, u64::MAX, diff --git a/runtime/src/inflation_rewards/points.rs b/runtime/src/inflation_rewards/points.rs index d4bb93f122f157..05a03b0ffd341d 100644 --- a/runtime/src/inflation_rewards/points.rs +++ b/runtime/src/inflation_rewards/points.rs @@ -4,10 +4,8 @@ use { solana_clock::Epoch, solana_instruction::error::InstructionError, solana_pubkey::Pubkey, - solana_stake_interface::{ - stake_history::StakeHistory, - state::{Delegation, Stake, StakeStateV2}, - }, + solana_stake_program::stake_state::{Delegation, Stake, StakeStateV2}, + solana_sysvar::stake_history::StakeHistory, solana_vote::vote_state_view::VoteStateView, std::cmp::Ordering, }; @@ -209,7 +207,7 @@ pub(crate) fn calculate_stake_points_and_credits( #[cfg(test)] mod tests { use { - super::*, solana_native_token::LAMPORTS_PER_SOL, + super::*, solana_native_token::sol_to_lamports, solana_vote_program::vote_state::VoteStateV3, }; @@ -232,7 +230,7 @@ mod tests { // bootstrap means fully-vested stake at epoch 0 with // 10_000_000 SOL is a big but not unreasonable stake let stake = new_stake( - 10_000_000 * LAMPORTS_PER_SOL, + sol_to_lamports(10_000_000f64), &Pubkey::default(), &vote_state, u64::MAX, diff --git a/runtime/src/non_circulating_supply.rs b/runtime/src/non_circulating_supply.rs index c6c71ca4d48a6e..b931dc51fa0ffb 100644 --- a/runtime/src/non_circulating_supply.rs +++ b/runtime/src/non_circulating_supply.rs @@ -218,9 +218,8 @@ mod tests { super::*, crate::genesis_utils::genesis_sysvar_and_builtin_program_lamports, solana_account::{Account, AccountSharedData}, - solana_cluster_type::ClusterType, solana_epoch_schedule::EpochSchedule, - solana_genesis_config::GenesisConfig, + solana_genesis_config::{ClusterType, GenesisConfig}, solana_stake_interface::state::{Authorized, Lockup, Meta}, std::{collections::BTreeMap, sync::Arc}, }; diff --git a/runtime/src/snapshot_bank_utils.rs b/runtime/src/snapshot_bank_utils.rs index 31b4865f31ac87..4b92f9335c9641 100644 --- a/runtime/src/snapshot_bank_utils.rs +++ b/runtime/src/snapshot_bank_utils.rs @@ -895,7 +895,7 @@ mod tests { solana_accounts_db::accounts_db::ACCOUNTS_DB_CONFIG_FOR_TESTING, solana_genesis_config::create_genesis_config, solana_keypair::Keypair, - solana_native_token::LAMPORTS_PER_SOL, + solana_native_token::{sol_to_lamports, LAMPORTS_PER_SOL}, solana_signer::Signer, solana_system_transaction as system_transaction, solana_transaction::sanitized::SanitizedTransaction, @@ -1019,16 +1019,16 @@ mod tests { let key3 = Keypair::new(); // Create a few accounts - let (genesis_config, mint_keypair) = create_genesis_config(1_000_000 * LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1_000_000.)); let (bank0, bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); bank0 - .transfer(LAMPORTS_PER_SOL, &mint_keypair, &key1.pubkey()) + .transfer(sol_to_lamports(1.), &mint_keypair, &key1.pubkey()) .unwrap(); bank0 - .transfer(2 * LAMPORTS_PER_SOL, &mint_keypair, &key2.pubkey()) + .transfer(sol_to_lamports(2.), &mint_keypair, &key2.pubkey()) .unwrap(); bank0 - .transfer(3 * LAMPORTS_PER_SOL, &mint_keypair, &key3.pubkey()) + .transfer(sol_to_lamports(3.), &mint_keypair, &key3.pubkey()) .unwrap(); bank0.fill_bank_with_ticks_for_tests(); @@ -1064,7 +1064,7 @@ mod tests { let bank1 = new_bank_from_parent_with_bank_forks(bank_forks.as_ref(), bank0, &collector, slot); bank1 - .transfer(LAMPORTS_PER_SOL, &key3, &key1.pubkey()) + .transfer(sol_to_lamports(1.), &key3, &key1.pubkey()) .unwrap(); bank1.fill_bank_with_ticks_for_tests(); @@ -1121,16 +1121,16 @@ mod tests { let key4 = Keypair::new(); let key5 = Keypair::new(); - let (genesis_config, mint_keypair) = create_genesis_config(1_000_000 * LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1_000_000.)); let (bank0, bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); bank0 - .transfer(LAMPORTS_PER_SOL, &mint_keypair, &key1.pubkey()) + .transfer(sol_to_lamports(1.), &mint_keypair, &key1.pubkey()) .unwrap(); bank0 - .transfer(2 * LAMPORTS_PER_SOL, &mint_keypair, &key2.pubkey()) + .transfer(sol_to_lamports(2.), &mint_keypair, &key2.pubkey()) .unwrap(); bank0 - .transfer(3 * LAMPORTS_PER_SOL, &mint_keypair, &key3.pubkey()) + .transfer(sol_to_lamports(3.), &mint_keypair, &key3.pubkey()) .unwrap(); bank0.fill_bank_with_ticks_for_tests(); @@ -1138,13 +1138,13 @@ mod tests { let bank1 = new_bank_from_parent_with_bank_forks(bank_forks.as_ref(), bank0, &collector, slot); bank1 - .transfer(3 * LAMPORTS_PER_SOL, &mint_keypair, &key3.pubkey()) + .transfer(sol_to_lamports(3.), &mint_keypair, &key3.pubkey()) .unwrap(); bank1 - .transfer(4 * LAMPORTS_PER_SOL, &mint_keypair, &key4.pubkey()) + .transfer(sol_to_lamports(4.), &mint_keypair, &key4.pubkey()) .unwrap(); bank1 - .transfer(5 * LAMPORTS_PER_SOL, &mint_keypair, &key5.pubkey()) + .transfer(sol_to_lamports(5.), &mint_keypair, &key5.pubkey()) .unwrap(); bank1.fill_bank_with_ticks_for_tests(); @@ -1152,7 +1152,7 @@ mod tests { let bank2 = new_bank_from_parent_with_bank_forks(bank_forks.as_ref(), bank1, &collector, slot); bank2 - .transfer(LAMPORTS_PER_SOL, &mint_keypair, &key1.pubkey()) + .transfer(sol_to_lamports(1.), &mint_keypair, &key1.pubkey()) .unwrap(); bank2.fill_bank_with_ticks_for_tests(); @@ -1160,7 +1160,7 @@ mod tests { let bank3 = new_bank_from_parent_with_bank_forks(bank_forks.as_ref(), bank2, &collector, slot); bank3 - .transfer(LAMPORTS_PER_SOL, &mint_keypair, &key1.pubkey()) + .transfer(sol_to_lamports(1.), &mint_keypair, &key1.pubkey()) .unwrap(); bank3.fill_bank_with_ticks_for_tests(); @@ -1168,7 +1168,7 @@ mod tests { let bank4 = new_bank_from_parent_with_bank_forks(bank_forks.as_ref(), bank3, &collector, slot); bank4 - .transfer(LAMPORTS_PER_SOL, &mint_keypair, &key1.pubkey()) + .transfer(sol_to_lamports(1.), &mint_keypair, &key1.pubkey()) .unwrap(); bank4.fill_bank_with_ticks_for_tests(); @@ -1228,16 +1228,16 @@ mod tests { let key4 = Keypair::new(); let key5 = Keypair::new(); - let (genesis_config, mint_keypair) = create_genesis_config(1_000_000 * LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1_000_000.)); let (bank0, bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); bank0 - .transfer(LAMPORTS_PER_SOL, &mint_keypair, &key1.pubkey()) + .transfer(sol_to_lamports(1.), &mint_keypair, &key1.pubkey()) .unwrap(); bank0 - .transfer(2 * LAMPORTS_PER_SOL, &mint_keypair, &key2.pubkey()) + .transfer(sol_to_lamports(2.), &mint_keypair, &key2.pubkey()) .unwrap(); bank0 - .transfer(3 * LAMPORTS_PER_SOL, &mint_keypair, &key3.pubkey()) + .transfer(sol_to_lamports(3.), &mint_keypair, &key3.pubkey()) .unwrap(); bank0.fill_bank_with_ticks_for_tests(); @@ -1245,13 +1245,13 @@ mod tests { let bank1 = new_bank_from_parent_with_bank_forks(bank_forks.as_ref(), bank0, &collector, slot); bank1 - .transfer(3 * LAMPORTS_PER_SOL, &mint_keypair, &key3.pubkey()) + .transfer(sol_to_lamports(3.), &mint_keypair, &key3.pubkey()) .unwrap(); bank1 - .transfer(4 * LAMPORTS_PER_SOL, &mint_keypair, &key4.pubkey()) + .transfer(sol_to_lamports(4.), &mint_keypair, &key4.pubkey()) .unwrap(); bank1 - .transfer(5 * LAMPORTS_PER_SOL, &mint_keypair, &key5.pubkey()) + .transfer(sol_to_lamports(5.), &mint_keypair, &key5.pubkey()) .unwrap(); bank1.fill_bank_with_ticks_for_tests(); @@ -1276,7 +1276,7 @@ mod tests { let bank2 = new_bank_from_parent_with_bank_forks(bank_forks.as_ref(), bank1, &collector, slot); bank2 - .transfer(LAMPORTS_PER_SOL, &mint_keypair, &key1.pubkey()) + .transfer(sol_to_lamports(1.), &mint_keypair, &key1.pubkey()) .unwrap(); bank2.fill_bank_with_ticks_for_tests(); @@ -1284,7 +1284,7 @@ mod tests { let bank3 = new_bank_from_parent_with_bank_forks(bank_forks.as_ref(), bank2, &collector, slot); bank3 - .transfer(LAMPORTS_PER_SOL, &mint_keypair, &key1.pubkey()) + .transfer(sol_to_lamports(1.), &mint_keypair, &key1.pubkey()) .unwrap(); bank3.fill_bank_with_ticks_for_tests(); @@ -1292,7 +1292,7 @@ mod tests { let bank4 = new_bank_from_parent_with_bank_forks(bank_forks.as_ref(), bank3, &collector, slot); bank4 - .transfer(LAMPORTS_PER_SOL, &mint_keypair, &key1.pubkey()) + .transfer(sol_to_lamports(1.), &mint_keypair, &key1.pubkey()) .unwrap(); bank4.fill_bank_with_ticks_for_tests(); @@ -1337,16 +1337,16 @@ mod tests { let key2 = Keypair::new(); let key3 = Keypair::new(); - let (genesis_config, mint_keypair) = create_genesis_config(1_000_000 * LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1_000_000.)); let (bank0, bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); bank0 - .transfer(LAMPORTS_PER_SOL, &mint_keypair, &key1.pubkey()) + .transfer(sol_to_lamports(1.), &mint_keypair, &key1.pubkey()) .unwrap(); bank0 - .transfer(2 * LAMPORTS_PER_SOL, &mint_keypair, &key2.pubkey()) + .transfer(sol_to_lamports(2.), &mint_keypair, &key2.pubkey()) .unwrap(); bank0 - .transfer(3 * LAMPORTS_PER_SOL, &mint_keypair, &key3.pubkey()) + .transfer(sol_to_lamports(3.), &mint_keypair, &key3.pubkey()) .unwrap(); bank0.fill_bank_with_ticks_for_tests(); @@ -1354,13 +1354,13 @@ mod tests { let bank1 = new_bank_from_parent_with_bank_forks(bank_forks.as_ref(), bank0, &collector, slot); bank1 - .transfer(LAMPORTS_PER_SOL, &mint_keypair, &key1.pubkey()) + .transfer(sol_to_lamports(1.), &mint_keypair, &key1.pubkey()) .unwrap(); bank1 - .transfer(2 * LAMPORTS_PER_SOL, &mint_keypair, &key2.pubkey()) + .transfer(sol_to_lamports(2.), &mint_keypair, &key2.pubkey()) .unwrap(); bank1 - .transfer(3 * LAMPORTS_PER_SOL, &mint_keypair, &key3.pubkey()) + .transfer(sol_to_lamports(3.), &mint_keypair, &key3.pubkey()) .unwrap(); bank1.fill_bank_with_ticks_for_tests(); @@ -1385,7 +1385,7 @@ mod tests { let bank2 = new_bank_from_parent_with_bank_forks(bank_forks.as_ref(), bank1, &collector, slot); bank2 - .transfer(LAMPORTS_PER_SOL, &mint_keypair, &key1.pubkey()) + .transfer(sol_to_lamports(1.), &mint_keypair, &key1.pubkey()) .unwrap(); bank2.fill_bank_with_ticks_for_tests(); @@ -1393,7 +1393,7 @@ mod tests { let bank3 = new_bank_from_parent_with_bank_forks(bank_forks.as_ref(), bank2, &collector, slot); bank3 - .transfer(2 * LAMPORTS_PER_SOL, &mint_keypair, &key2.pubkey()) + .transfer(sol_to_lamports(2.), &mint_keypair, &key2.pubkey()) .unwrap(); bank3.fill_bank_with_ticks_for_tests(); @@ -1401,7 +1401,7 @@ mod tests { let bank4 = new_bank_from_parent_with_bank_forks(bank_forks.as_ref(), bank3, &collector, slot); bank4 - .transfer(3 * LAMPORTS_PER_SOL, &mint_keypair, &key3.pubkey()) + .transfer(sol_to_lamports(3.), &mint_keypair, &key3.pubkey()) .unwrap(); bank4.fill_bank_with_ticks_for_tests(); @@ -1472,12 +1472,11 @@ mod tests { let incremental_snapshot_archives_dir = tempfile::TempDir::new().unwrap(); let snapshot_archive_format = SnapshotConfig::default().archive_format; - let (mut genesis_config, mint_keypair) = - create_genesis_config(1_000_000 * LAMPORTS_PER_SOL); + let (mut genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1_000_000.)); // test expects 0 transaction fee genesis_config.fee_rate_governor = solana_fee_calculator::FeeRateGovernor::new(0, 0); - let lamports_to_transfer = 123_456 * LAMPORTS_PER_SOL; + let lamports_to_transfer = sol_to_lamports(123_456.); let (bank0, bank_forks) = Bank::new_with_paths_for_tests( &genesis_config, Arc::::default(), @@ -1642,7 +1641,7 @@ mod tests { let collector = Pubkey::new_unique(); let key1 = Keypair::new(); - let (genesis_config, mint_keypair) = create_genesis_config(1_000_000 * LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1_000_000.)); let (bank0, bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); bank0.fill_bank_with_ticks_for_tests(); @@ -1669,7 +1668,7 @@ mod tests { let bank2 = new_bank_from_parent_with_bank_forks(bank_forks.as_ref(), bank1, &collector, slot); bank2 - .transfer(LAMPORTS_PER_SOL, &mint_keypair, &key1.pubkey()) + .transfer(sol_to_lamports(1.), &mint_keypair, &key1.pubkey()) .unwrap(); bank2.fill_bank_with_ticks_for_tests(); @@ -1893,9 +1892,9 @@ mod tests { let full_snapshot_archives_dir = tempfile::TempDir::new().unwrap(); let snapshot_archive_format = SnapshotConfig::default().archive_format; - let (genesis_config, mint_keypair) = create_genesis_config(1_000_000 * LAMPORTS_PER_SOL); + let (genesis_config, mint_keypair) = create_genesis_config(sol_to_lamports(1_000_000.)); - let lamports_to_transfer = 123_456 * LAMPORTS_PER_SOL; + let lamports_to_transfer = sol_to_lamports(123_456.); let bank_test_config = BankTestConfig { accounts_db_config: AccountsDbConfig { storage_access, diff --git a/runtime/src/stake_history.rs b/runtime/src/stake_history.rs index 5a035b68e6ad97..5ca9bad3d9bfeb 100644 --- a/runtime/src/stake_history.rs +++ b/runtime/src/stake_history.rs @@ -1,9 +1,9 @@ //! This module implements clone-on-write semantics for the SDK's `StakeHistory` to reduce //! unnecessary cloning of the underlying vector. -pub use solana_stake_interface::stake_history::StakeHistoryGetEntry; +pub use solana_sysvar::stake_history::StakeHistoryGetEntry; use { solana_clock::Epoch, - solana_stake_interface::stake_history::{self, StakeHistoryEntry}, + solana_sysvar::stake_history::{self, StakeHistoryEntry}, std::{ ops::{Deref, DerefMut}, sync::Arc, @@ -39,7 +39,7 @@ impl StakeHistoryGetEntry for StakeHistory { #[cfg(test)] mod tests { - use {super::*, solana_stake_interface::stake_history::StakeHistoryEntry}; + use {super::*, solana_sysvar::stake_history::StakeHistoryEntry}; fn rand_stake_history_entry() -> StakeHistoryEntry { StakeHistoryEntry { diff --git a/runtime/src/stake_weighted_timestamp.rs b/runtime/src/stake_weighted_timestamp.rs index 7353300ab314b9..796eb306545fa5 100644 --- a/runtime/src/stake_weighted_timestamp.rs +++ b/runtime/src/stake_weighted_timestamp.rs @@ -102,7 +102,7 @@ where #[cfg(test)] pub mod tests { - use {super::*, solana_account::Account, solana_native_token::LAMPORTS_PER_SOL}; + use {super::*, solana_account::Account, solana_native_token::sol_to_lamports}; #[test] fn test_calculate_stake_weighted_timestamp_uses_median() { @@ -120,30 +120,30 @@ pub mod tests { let stakes: HashMap = [ ( pubkey0, - (LAMPORTS_PER_SOL, Account::new(1, 0, &Pubkey::default())), + (sol_to_lamports(1.0), Account::new(1, 0, &Pubkey::default())), ), ( pubkey1, - (LAMPORTS_PER_SOL, Account::new(1, 0, &Pubkey::default())), + (sol_to_lamports(1.0), Account::new(1, 0, &Pubkey::default())), ), ( pubkey2, ( - 1_000_000 * LAMPORTS_PER_SOL, + sol_to_lamports(1_000_000.0), Account::new(1, 0, &Pubkey::default()), ), ), ( pubkey3, ( - 1_000_000 * LAMPORTS_PER_SOL, + sol_to_lamports(1_000_000.0), Account::new(1, 0, &Pubkey::default()), ), ), ( pubkey4, ( - 1_000_000 * LAMPORTS_PER_SOL, + sol_to_lamports(1_000_000.0), Account::new(1, 0, &Pubkey::default()), ), ), @@ -228,21 +228,21 @@ pub mod tests { ( pubkey0, ( - 1_000_000 * LAMPORTS_PER_SOL, // 1/3 stake + sol_to_lamports(1_000_000.0), // 1/3 stake Account::new(1, 0, &Pubkey::default()), ), ), ( pubkey1, ( - 1_000_000 * LAMPORTS_PER_SOL, + sol_to_lamports(1_000_000.0), Account::new(1, 0, &Pubkey::default()), ), ), ( pubkey2, ( - 1_000_000 * LAMPORTS_PER_SOL, + sol_to_lamports(1_000_000.0), Account::new(1, 0, &Pubkey::default()), ), ), @@ -276,14 +276,14 @@ pub mod tests { ( pubkey0, ( - 1_000_001 * LAMPORTS_PER_SOL, // 1/3 stake + sol_to_lamports(1_000_001.0), // 1/3 stake Account::new(1, 0, &Pubkey::default()), ), ), ( pubkey1, ( - 1_000_000 * LAMPORTS_PER_SOL, + sol_to_lamports(1_000_000.0), Account::new(1, 0, &Pubkey::default()), ), ), @@ -332,21 +332,21 @@ pub mod tests { ( pubkey0, ( - 1_000_000 * LAMPORTS_PER_SOL, + sol_to_lamports(1_000_000.0), Account::new(1, 0, &Pubkey::default()), ), ), ( pubkey1, ( - 1_000_000 * LAMPORTS_PER_SOL, + sol_to_lamports(1_000_000.0), Account::new(1, 0, &Pubkey::default()), ), ), ( pubkey2, ( - 1_000_000 * LAMPORTS_PER_SOL, + sol_to_lamports(1_000_000.0), Account::new(1, 0, &Pubkey::default()), ), ), @@ -473,21 +473,21 @@ pub mod tests { ( pubkey0, ( - 1_000_000 * LAMPORTS_PER_SOL, + sol_to_lamports(1_000_000.0), Account::new(1, 0, &Pubkey::default()), ), ), ( pubkey1, ( - 1_000_000 * LAMPORTS_PER_SOL, + sol_to_lamports(1_000_000.0), Account::new(1, 0, &Pubkey::default()), ), ), ( pubkey2, ( - 1_000_000 * LAMPORTS_PER_SOL, + sol_to_lamports(1_000_000.0), Account::new(1, 0, &Pubkey::default()), ), ), @@ -609,21 +609,21 @@ pub mod tests { ( pubkey0, ( - 1_000_000 * LAMPORTS_PER_SOL, + sol_to_lamports(1_000_000.0), Account::new(1, 0, &Pubkey::default()), ), ), ( pubkey1, ( - 1_000_000 * LAMPORTS_PER_SOL, + sol_to_lamports(1_000_000.0), Account::new(1, 0, &Pubkey::default()), ), ), ( pubkey2, ( - 1_000_000 * LAMPORTS_PER_SOL, + sol_to_lamports(1_000_000.0), Account::new(1, 0, &Pubkey::default()), ), ), @@ -747,21 +747,21 @@ pub mod tests { ( pubkey0, ( - 1_000_000 * LAMPORTS_PER_SOL, + sol_to_lamports(1_000_000.0), Account::new(1, 0, &Pubkey::default()), ), ), ( pubkey1, ( - 1_000_000 * LAMPORTS_PER_SOL, + sol_to_lamports(1_000_000.0), Account::new(1, 0, &Pubkey::default()), ), ), ( pubkey2, ( - 1_000_000 * LAMPORTS_PER_SOL, + sol_to_lamports(1_000_000.0), Account::new(1, 0, &Pubkey::default()), ), ), diff --git a/runtime/src/stakes.rs b/runtime/src/stakes.rs index 3253dbe6aecd85..8caf572ae7007c 100644 --- a/runtime/src/stakes.rs +++ b/runtime/src/stakes.rs @@ -519,7 +519,7 @@ pub(crate) mod tests { solana_rent::Rent, solana_stake_interface as stake, solana_stake_program::stake_state, - solana_vote_interface::state::{VoteStateV3, VoteStateVersions}, + solana_vote_interface::state::{VoteState, VoteStateVersions}, solana_vote_program::vote_state, }; @@ -696,8 +696,8 @@ pub(crate) mod tests { } // Vote account uninitialized - let default_vote_state = VoteStateV3::default(); - let versioned = VoteStateVersions::new_v3(default_vote_state); + let default_vote_state = VoteState::default(); + let versioned = VoteStateVersions::new_current(default_vote_state); vote_state::to(&versioned, &mut vote_account).unwrap(); stakes_cache.check_and_store(&vote_pubkey, &vote_account, None); diff --git a/runtime/tests/stake.rs b/runtime/tests/stake.rs index 47fb9e371bc6ab..44179f86489730 100755 --- a/runtime/tests/stake.rs +++ b/runtime/tests/stake.rs @@ -18,11 +18,10 @@ use { solana_signer::Signer, solana_stake_interface::{ self as stake, instruction as stake_instruction, - stake_history::StakeHistory, state::{Authorized, Lockup, StakeStateV2}, - sysvar, }, solana_stake_program::stake_state, + solana_sysvar::{self as sysvar, stake_history::StakeHistory}, solana_vote_program::{ vote_instruction, vote_state::{TowerSync, VoteInit, VoteStateV3, VoteStateVersions, MAX_LOCKOUT_HISTORY}, @@ -424,7 +423,7 @@ fn test_stake_account_lifetime() { let account = bank.get_account(&vote_pubkey).expect("account not found"); let vote_state: VoteStateV3 = StateMut::::state(&account) .expect("couldn't unpack account data") - .convert_to_v3(); + .convert_to_current(); // 1 less vote, as the first vote should have cleared the lockout assert_eq!(vote_state.votes.len(), 31); diff --git a/stake-accounts/Cargo.toml b/stake-accounts/Cargo.toml index 458d2c9dbe8a16..799db6536de53e 100644 --- a/stake-accounts/Cargo.toml +++ b/stake-accounts/Cargo.toml @@ -17,7 +17,6 @@ clap = { workspace = true } solana-account = { workspace = true } solana-clap-utils = { workspace = true } solana-cli-config = { workspace = true } -solana-cli-output = { workspace = true } solana-clock = { workspace = true } solana-commitment-config = { workspace = true } solana-fee-calculator = { workspace = true } diff --git a/stake-accounts/src/arg_parser.rs b/stake-accounts/src/arg_parser.rs index 6c96a3011c5f71..173006c0e60ec2 100644 --- a/stake-accounts/src/arg_parser.rs +++ b/stake-accounts/src/arg_parser.rs @@ -11,7 +11,7 @@ use { input_validators::{is_amount, is_rfc3339_datetime, is_valid_pubkey, is_valid_signer}, }, solana_cli_config::CONFIG_FILE, - solana_native_token::sol_str_to_lamports, + solana_native_token::sol_to_lamports, std::{ffi::OsString, process::exit}, }; @@ -298,10 +298,7 @@ fn parse_new_args(matches: &ArgMatches<'_>) -> NewArgs { NewArgs { fee_payer: value_t_or_exit!(matches, "fee_payer", String), funding_keypair: value_t_or_exit!(matches, "funding_keypair", String), - lamports: matches - .value_of("amount") - .and_then(sol_str_to_lamports) - .unwrap(), + lamports: sol_to_lamports(value_t_or_exit!(matches, "amount", f64)), base_keypair: value_t_or_exit!(matches, "base_keypair", String), stake_authority: value_t_or_exit!(matches, "stake_authority", String), withdraw_authority: value_t_or_exit!(matches, "withdraw_authority", String), diff --git a/stake-accounts/src/main.rs b/stake-accounts/src/main.rs index cee727d93cc89f..f3c3461fa7e9f1 100644 --- a/stake-accounts/src/main.rs +++ b/stake-accounts/src/main.rs @@ -11,9 +11,9 @@ use { }, }, solana_cli_config::Config, - solana_cli_output::display::build_balance_message, solana_commitment_config::CommitmentConfig, solana_message::Message, + solana_native_token::lamports_to_sol, solana_pubkey::Pubkey, solana_rpc_client::rpc_client::RpcClient, solana_rpc_client_api::client_error::Error as ClientError, @@ -270,7 +270,7 @@ fn main() -> Result<(), Box> { ); let balances = get_balances(&client, addresses)?; let lamports: u64 = balances.into_iter().map(|(_, bal)| bal).sum(); - let sol = build_balance_message(lamports, false, false); + let sol = lamports_to_sol(lamports); println!("{sol} SOL"); } Command::Authorize(args) => { diff --git a/storage-proto/src/convert.rs b/storage-proto/src/convert.rs index c641e860efde14..7d5fd96d589ffc 100644 --- a/storage-proto/src/convert.rs +++ b/storage-proto/src/convert.rs @@ -793,7 +793,7 @@ impl TryFrom for TransactionError { 41 => InstructionError::ProgramFailedToCompile, 42 => InstructionError::Immutable, 43 => InstructionError::IncorrectAuthority, - 44 => InstructionError::BorshIoError, + 44 => InstructionError::BorshIoError(String::new()), 45 => InstructionError::AccountNotRentExempt, 46 => InstructionError::InvalidAccountOwner, 47 => InstructionError::ArithmeticOverflow, @@ -1131,7 +1131,7 @@ impl From for tx_by_addr::TransactionError { InstructionError::IncorrectAuthority => { tx_by_addr::InstructionErrorType::IncorrectAuthority } - InstructionError::BorshIoError => { + InstructionError::BorshIoError(_) => { tx_by_addr::InstructionErrorType::BorshIoError } InstructionError::AccountNotRentExempt => { diff --git a/svm-transaction/Cargo.toml b/svm-transaction/Cargo.toml index 629b788584b185..dc689d97c28877 100644 --- a/svm-transaction/Cargo.toml +++ b/svm-transaction/Cargo.toml @@ -20,6 +20,6 @@ solana-transaction = { workspace = true } [dev-dependencies] solana-message = { workspace = true, features = ["bincode"] } solana-nonce = { workspace = true } -solana-system-interface = { workspace = true, features = ["bincode"] } +solana-system-interface = { workspace = true } static_assertions = { workspace = true } test-case = { workspace = true } diff --git a/svm/Cargo.toml b/svm/Cargo.toml index 7cc7346fb1d3e5..637d6e42f9fd4a 100644 --- a/svm/Cargo.toml +++ b/svm/Cargo.toml @@ -105,7 +105,7 @@ solana-program-runtime = { workspace = true, features = ["dev-context-only-utils solana-pubkey = { workspace = true, features = ["rand"] } solana-rent = { workspace = true } solana-sbpf = { workspace = true } -solana-secp256k1-program = { workspace = true, features = ["bincode"] } +solana-secp256k1-program = { workspace = true } solana-secp256r1-program = { workspace = true, features = ["openssl-vendored"] } solana-signature = { workspace = true, features = ["rand"] } solana-signer = { workspace = true } diff --git a/svm/src/account_loader.rs b/svm/src/account_loader.rs index 0e7836e63debd3..15e6b7121a4af1 100644 --- a/svm/src/account_loader.rs +++ b/svm/src/account_loader.rs @@ -829,7 +829,7 @@ mod tests { v0::{LoadedAddresses, LoadedMessage}, LegacyMessage, Message, MessageHeader, SanitizedMessage, }, - solana_native_token::LAMPORTS_PER_SOL, + solana_native_token::{sol_to_lamports, LAMPORTS_PER_SOL}, solana_nonce::{self as nonce, versions::Versions as NonceVersions}, solana_program_runtime::execution_budget::{ DEFAULT_INSTRUCTION_COMPUTE_UNIT_LIMIT, MAX_LOADED_ACCOUNTS_DATA_SIZE_BYTES, @@ -2112,7 +2112,12 @@ mod tests { .insert(recipient, AccountSharedData::default()); let mut account_loader = (&bank).into(); - let tx = transfer(&mint_keypair, &recipient, LAMPORTS_PER_SOL, last_block_hash); + let tx = transfer( + &mint_keypair, + &recipient, + sol_to_lamports(1.), + last_block_hash, + ); let num_accounts = tx.message().account_keys.len(); let sanitized_tx = SanitizedTransaction::from_transaction_for_tests(tx); let mut error_metrics = TransactionErrorMetrics::default(); diff --git a/syscalls/Cargo.toml b/syscalls/Cargo.toml index 47fb5bd003aebf..b432bd968c2ec6 100644 --- a/syscalls/Cargo.toml +++ b/syscalls/Cargo.toml @@ -29,14 +29,14 @@ num-traits = { workspace = true } solana-account = { workspace = true } solana-account-info = { workspace = true } solana-big-mod-exp = { workspace = true } -solana-blake3-hasher = { workspace = true, features = ["blake3"] } +solana-blake3-hasher = { workspace = true } solana-bn254 = { workspace = true } solana-clock = { workspace = true } solana-cpi = { workspace = true } solana-curve25519 = { workspace = true } solana-hash = { workspace = true } solana-instruction = { workspace = true } -solana-keccak-hasher = { workspace = true, features = ["sha3"] } +solana-keccak-hasher = { workspace = true } solana-loader-v3-interface = { workspace = true, features = ["serde"] } solana-poseidon = { workspace = true } solana-program-entrypoint = { workspace = true } @@ -47,7 +47,6 @@ solana-sdk-ids = { workspace = true } solana-secp256k1-recover = { workspace = true } solana-sha256-hasher = { workspace = true } solana-stable-layout = { workspace = true } -solana-stake-interface = { workspace = true } solana-svm-callback = { workspace = true } solana-svm-feature-set = { workspace = true } solana-svm-log-collector = { workspace = true } diff --git a/syscalls/src/cpi.rs b/syscalls/src/cpi.rs index a7bda40f107a61..d25b617a94ff0d 100644 --- a/syscalls/src/cpi.rs +++ b/syscalls/src/cpi.rs @@ -1293,6 +1293,7 @@ mod tests { super::*, assert_matches::assert_matches, solana_account::{Account, AccountSharedData, ReadableAccount}, + solana_clock::Epoch, solana_instruction::Instruction, solana_program_runtime::{ invoke_context::{BpfAllocator, SerializedAccountMetadata, SyscallContext}, @@ -2190,7 +2191,7 @@ mod tests { data: &'a [u8], owner: Pubkey, executable: bool, - _unused: u64, + rent_epoch: Epoch, } impl MockAccountInfo<'_> { @@ -2203,7 +2204,7 @@ mod tests { data: account.data(), owner: *account.owner(), executable: account.executable(), - _unused: account.rent_epoch(), + rent_epoch: account.rent_epoch(), } } @@ -2224,8 +2225,6 @@ mod tests { let data_cell_addr = owner_addr + mem::size_of::(); let data_addr = data_cell_addr + mem::size_of::>>(); - #[allow(deprecated)] - #[allow(clippy::used_underscore_binding)] let info = AccountInfo { key: unsafe { (key_addr as *const Pubkey).as_ref() }.unwrap(), is_signer: self.is_signer, @@ -2238,7 +2237,7 @@ mod tests { }, owner: unsafe { (owner_addr as *const Pubkey).as_ref() }.unwrap(), executable: self.executable, - _unused: self._unused, + rent_epoch: self.rent_epoch, }; unsafe { diff --git a/syscalls/src/lib.rs b/syscalls/src/lib.rs index ce0dd3e33efc27..11fc4c736cc9a4 100644 --- a/syscalls/src/lib.rs +++ b/syscalls/src/lib.rs @@ -48,7 +48,8 @@ use { solana_svm_log_collector::{ic_logger_msg, ic_msg}, solana_svm_timings::ExecuteTimings, solana_svm_type_overrides::sync::Arc, - solana_sysvar::SysvarSerialize, + solana_sysvar::Sysvar, + solana_sysvar_id::SysvarId, solana_transaction_context::IndexOfAccount, std::{ alloc::Layout, @@ -2184,8 +2185,7 @@ mod tests { solana_sha256_hasher::hashv, solana_slot_hashes::{self as slot_hashes, SlotHashes}, solana_stable_layout::stable_instruction::StableInstruction, - solana_stake_interface::stake_history::{self, StakeHistory, StakeHistoryEntry}, - solana_sysvar_id::SysvarId, + solana_sysvar::stake_history::{self, StakeHistory, StakeHistoryEntry}, solana_transaction_context::InstructionAccount, std::{ hash::{DefaultHasher, Hash, Hasher}, diff --git a/syscalls/src/sysvar.rs b/syscalls/src/sysvar.rs index a692b881307510..06c9247a26db95 100644 --- a/syscalls/src/sysvar.rs +++ b/syscalls/src/sysvar.rs @@ -3,7 +3,7 @@ use { solana_program_runtime::execution_budget::SVMTransactionExecutionCost, }; -fn get_sysvar( +fn get_sysvar( sysvar: Result, InstructionError>, var_addr: u64, check_aligned: bool, diff --git a/test-validator/src/lib.rs b/test-validator/src/lib.rs index bbffe4a2fa525b..ea8b94e219536d 100644 --- a/test-validator/src/lib.rs +++ b/test-validator/src/lib.rs @@ -38,7 +38,7 @@ use { }, solana_loader_v3_interface::state::UpgradeableLoaderState, solana_message::Message, - solana_native_token::LAMPORTS_PER_SOL, + solana_native_token::sol_to_lamports, solana_net_utils::{find_available_ports_in_range, multihomed_sockets::BindIpAddrs, PortRange}, solana_pubkey::Pubkey, solana_rent::Rent, @@ -864,9 +864,9 @@ impl TestValidator { let validator_identity = Keypair::new(); let validator_vote_account = Keypair::new(); let validator_stake_account = Keypair::new(); - let validator_identity_lamports = 500 * LAMPORTS_PER_SOL; - let validator_stake_lamports = 1_000_000 * LAMPORTS_PER_SOL; - let mint_lamports = 500_000_000 * LAMPORTS_PER_SOL; + let validator_identity_lamports = sol_to_lamports(500.); + let validator_stake_lamports = sol_to_lamports(1_000_000.); + let mint_lamports = sol_to_lamports(500_000_000.); // Only activate features which are not explicitly deactivated. let mut feature_set = FeatureSet::default().inactive().clone(); diff --git a/tls-utils/src/tls_certificates.rs b/tls-utils/src/tls_certificates.rs index 4963003e40653f..76faf995e1c025 100644 --- a/tls-utils/src/tls_certificates.rs +++ b/tls-utils/src/tls_certificates.rs @@ -32,7 +32,7 @@ pub fn new_dummy_x509_certificate( ]; let key_pkcs8_der = { - let keypair_secret_bytes = keypair.secret_bytes(); + let keypair_secret_bytes = keypair.secret().as_bytes(); let keypair_secret_len = keypair_secret_bytes.len(); if keypair_secret_len != 32 { panic!("Unexpected secret key length!"); diff --git a/tokens/Cargo.toml b/tokens/Cargo.toml index d545ec026db2cc..02cb6e6c3fb847 100644 --- a/tokens/Cargo.toml +++ b/tokens/Cargo.toml @@ -23,7 +23,6 @@ serde_derive = { workspace = true } solana-account-decoder = { workspace = true } solana-clap-utils = { workspace = true } solana-cli-config = { workspace = true } -solana-cli-output = { workspace = true } solana-clock = { workspace = true } solana-commitment-config = { workspace = true } solana-hash = { workspace = true } @@ -44,7 +43,7 @@ solana-system-interface = { workspace = true } solana-transaction = { workspace = true } solana-transaction-status = { workspace = true } solana-version = { workspace = true } -spl-associated-token-account-interface = { version = "=2.0.0" } +spl-associated-token-account-interface = { version = "=1.0.0" } spl-token-interface = { workspace = true } tempfile = { workspace = true } thiserror = { workspace = true } diff --git a/tokens/src/arg_parser.rs b/tokens/src/arg_parser.rs index 839d4e5dd5fbc0..7542bb090b4d45 100644 --- a/tokens/src/arg_parser.rs +++ b/tokens/src/arg_parser.rs @@ -12,7 +12,7 @@ use { keypair::{pubkey_from_path, signer_from_path}, }, solana_cli_config::CONFIG_FILE, - solana_native_token::sol_str_to_lamports, + solana_native_token::sol_to_lamports, solana_remote_wallet::remote_wallet::maybe_wallet_manager, std::{error::Error, ffi::OsString, process::exit}, }; @@ -439,9 +439,7 @@ fn parse_distribute_tokens_args( fee_payer, stake_args: None, spl_token_args: None, - transfer_amount: matches - .value_of("transfer_amount") - .and_then(sol_str_to_lamports), + transfer_amount: value_of(matches, "transfer_amount").map(sol_to_lamports), }) } @@ -480,10 +478,7 @@ fn parse_create_stake_args( .transpose()?; let stake_args = StakeArgs { - unlocked_sol: matches - .value_of("unlocked_sol") - .and_then(sol_str_to_lamports) - .unwrap(), + unlocked_sol: sol_to_lamports(value_t_or_exit!(matches, "unlocked_sol", f64)), lockup_authority, sender_stake_args: None, }; @@ -567,10 +562,7 @@ fn parse_distribute_stake_args( rent_exempt_reserve: None, }; let stake_args = StakeArgs { - unlocked_sol: matches - .value_of("unlocked_sol") - .and_then(sol_str_to_lamports) - .unwrap(), + unlocked_sol: sol_to_lamports(value_t_or_exit!(matches, "unlocked_sol", f64)), lockup_authority: lockup_authority_address, sender_stake_args: Some(sender_stake_args), }; diff --git a/tokens/src/commands.rs b/tokens/src/commands.rs index 2926d28d8810f0..13ac1711b24c50 100644 --- a/tokens/src/commands.rs +++ b/tokens/src/commands.rs @@ -15,13 +15,12 @@ use { pickledb::PickleDb, serde::{Deserialize, Serialize}, solana_account_decoder::parse_token::real_number_string, - solana_cli_output::display::build_balance_message, solana_clock::Slot, solana_commitment_config::CommitmentConfig, solana_hash::Hash, solana_instruction::Instruction, solana_message::Message, - solana_native_token::sol_str_to_lamports, + solana_native_token::{lamports_to_sol, sol_to_lamports}, solana_program_error::ProgramError, solana_rpc_client::rpc_client::RpcClient, solana_rpc_client_api::{ @@ -139,8 +138,6 @@ pub enum Error { ProgramError(#[from] ProgramError), #[error("Exit signal received")] ExitSignal, - #[error("Bad input data for SOL value: {input}")] - BadInputNumberError { input: String }, } fn merge_allocations(allocations: &[TypedAllocation]) -> Vec { @@ -377,7 +374,7 @@ fn build_messages( println!( "{:<44} {:>24.9}", allocation.recipient, - build_balance_message(allocation.amount, false, false) + lamports_to_sol(allocation.amount) ); false }; @@ -534,7 +531,7 @@ fn read_allocations( // We only support SOL token in "require lockup" mode. rdr.deserialize() .map(|recipient| { - let (recipient, amount, lockup_date): (String, String, String) = recipient?; + let (recipient, amount, lockup_date): (String, f64, String) = recipient?; let recipient = Pubkey::from_str(&recipient).map_err(|err| Error::BadInputPubkeyError { input: recipient, @@ -554,8 +551,7 @@ fn read_allocations( }; Ok(TypedAllocation { recipient, - amount: sol_str_to_lamports(&amount) - .ok_or(Error::BadInputNumberError { input: amount })?, + amount: sol_to_lamports(amount), lockup_date, }) }) @@ -579,7 +575,7 @@ fn read_allocations( } else { rdr.deserialize() .map(|recipient| { - let (recipient, amount): (String, String) = recipient?; + let (recipient, amount): (String, f64) = recipient?; let recipient = Pubkey::from_str(&recipient).map_err(|err| Error::BadInputPubkeyError { input: recipient, @@ -587,8 +583,7 @@ fn read_allocations( })?; Ok(TypedAllocation { recipient, - amount: sol_str_to_lamports(&amount) - .ok_or(Error::BadInputNumberError { input: amount })?, + amount: sol_to_lamports(amount), lockup_date: None, }) }) @@ -852,28 +847,28 @@ fn check_payer_balances( if staker_balance < undistributed_tokens { return Err(Error::InsufficientFunds( vec![FundingSource::StakeAccount].into(), - build_balance_message(undistributed_tokens, false, false).to_string(), + lamports_to_sol(undistributed_tokens).to_string(), )); } if args.fee_payer.pubkey() == unlocked_sol_source { if fee_payer_balance < fees + total_unlocked_sol { return Err(Error::InsufficientFunds( vec![FundingSource::SystemAccount, FundingSource::FeePayer].into(), - build_balance_message(fees + total_unlocked_sol, false, false).to_string(), + lamports_to_sol(fees + total_unlocked_sol).to_string(), )); } } else { if fee_payer_balance < fees { return Err(Error::InsufficientFunds( vec![FundingSource::FeePayer].into(), - build_balance_message(fees, false, false).to_string(), + lamports_to_sol(fees).to_string(), )); } let unlocked_sol_balance = client.get_balance(&unlocked_sol_source)?; if unlocked_sol_balance < total_unlocked_sol { return Err(Error::InsufficientFunds( vec![FundingSource::SystemAccount].into(), - build_balance_message(total_unlocked_sol, false, false).to_string(), + lamports_to_sol(total_unlocked_sol).to_string(), )); } } @@ -881,21 +876,21 @@ fn check_payer_balances( if fee_payer_balance < fees + undistributed_tokens { return Err(Error::InsufficientFunds( vec![FundingSource::SystemAccount, FundingSource::FeePayer].into(), - build_balance_message(fees + undistributed_tokens, false, false).to_string(), + lamports_to_sol(fees + undistributed_tokens).to_string(), )); } } else { if fee_payer_balance < fees { return Err(Error::InsufficientFunds( vec![FundingSource::FeePayer].into(), - build_balance_message(fees, false, false).to_string(), + lamports_to_sol(fees).to_string(), )); } let sender_balance = client.get_balance(&distribution_source)?; if sender_balance < undistributed_tokens { return Err(Error::InsufficientFunds( vec![FundingSource::SystemAccount].into(), - build_balance_message(undistributed_tokens, false, false).to_string(), + lamports_to_sol(undistributed_tokens).to_string(), )); } } @@ -936,13 +931,14 @@ pub fn process_balances( print_token_balances(client, allocation, spl_token_args)?; } else { let address: Pubkey = allocation.recipient; - let expected = build_balance_message(allocation.amount, false, false); - let actual_amount = client.get_balance(&address).unwrap(); - let actual = build_balance_message(actual_amount, false, false); - let diff = build_balance_message(actual_amount - allocation.amount, false, false); + let expected = lamports_to_sol(allocation.amount); + let actual = lamports_to_sol(client.get_balance(&address).unwrap()); println!( "{:<44} {:>24.9} {:>24.9} {:>24.9}", - allocation.recipient, expected, actual, diff, + allocation.recipient, + expected, + actual, + actual - expected, ); } } @@ -972,7 +968,7 @@ pub fn test_process_distribute_tokens_with_client( let fee_payer = Keypair::new(); let transaction = transfer( client, - sol_str_to_lamports("1.0").unwrap(), + sol_to_lamports(1.0), &sender_keypair, &fee_payer.pubkey(), ) @@ -982,13 +978,13 @@ pub fn test_process_distribute_tokens_with_client( .unwrap(); assert_eq!( client.get_balance(&fee_payer.pubkey()).unwrap(), - sol_str_to_lamports("1.0").unwrap(), + sol_to_lamports(1.0), ); let expected_amount = if let Some(amount) = transfer_amount { amount } else { - sol_str_to_lamports("1000.0").unwrap() + sol_to_lamports(1000.0) }; let alice_pubkey = pubkey::new_rand(); let allocations_file = NamedTempFile::new().unwrap(); @@ -997,7 +993,7 @@ pub fn test_process_distribute_tokens_with_client( wtr.write_record(["recipient", "amount"]).unwrap(); wtr.write_record([ alice_pubkey.to_string(), - build_balance_message(expected_amount, false, false).to_string(), + lamports_to_sol(expected_amount).to_string(), ]) .unwrap(); wtr.flush().unwrap(); @@ -1055,7 +1051,7 @@ pub fn test_process_create_stake_with_client(client: &RpcClient, sender_keypair: let fee_payer = Keypair::new(); let transaction = transfer( client, - sol_str_to_lamports("1.0").unwrap(), + sol_to_lamports(1.0), &sender_keypair, &fee_payer.pubkey(), ) @@ -1079,7 +1075,7 @@ pub fn test_process_create_stake_with_client(client: &RpcClient, sender_keypair: &stake_account_address, &authorized, &lockup, - sol_str_to_lamports("3000.0").unwrap(), + sol_to_lamports(3000.0), ); let message = Message::new(&instructions, Some(&sender_keypair.pubkey())); let signers = [&sender_keypair, &stake_account_keypair]; @@ -1089,7 +1085,7 @@ pub fn test_process_create_stake_with_client(client: &RpcClient, sender_keypair: .send_and_confirm_transaction_with_spinner(&transaction) .unwrap(); - let expected_amount = sol_str_to_lamports("1000.0").unwrap(); + let expected_amount = sol_to_lamports(1000.0); let alice_pubkey = pubkey::new_rand(); let file = NamedTempFile::new().unwrap(); let input_csv = file.path().to_str().unwrap().to_string(); @@ -1098,7 +1094,7 @@ pub fn test_process_create_stake_with_client(client: &RpcClient, sender_keypair: .unwrap(); wtr.write_record([ alice_pubkey.to_string(), - build_balance_message(expected_amount, false, false).to_string(), + lamports_to_sol(expected_amount).to_string(), "".to_string(), ]) .unwrap(); @@ -1117,7 +1113,7 @@ pub fn test_process_create_stake_with_client(client: &RpcClient, sender_keypair: let stake_args = StakeArgs { lockup_authority: None, - unlocked_sol: sol_str_to_lamports("1.0").unwrap(), + unlocked_sol: sol_to_lamports(1.0), sender_stake_args: None, }; let args = DistributeTokensArgs { @@ -1142,12 +1138,12 @@ pub fn test_process_create_stake_with_client(client: &RpcClient, sender_keypair: assert_eq!( client.get_balance(&alice_pubkey).unwrap(), - sol_str_to_lamports("1.0").unwrap(), + sol_to_lamports(1.0), ); let new_stake_account_address = transaction_infos[0].new_stake_account_address.unwrap(); assert_eq!( client.get_balance(&new_stake_account_address).unwrap(), - expected_amount - sol_str_to_lamports("1.0").unwrap(), + expected_amount - sol_to_lamports(1.0), ); check_output_file(&output_path, &db::open_db(&transaction_db, true).unwrap()); @@ -1162,11 +1158,11 @@ pub fn test_process_create_stake_with_client(client: &RpcClient, sender_keypair: assert_eq!( client.get_balance(&alice_pubkey).unwrap(), - sol_str_to_lamports("1.0").unwrap(), + sol_to_lamports(1.0), ); assert_eq!( client.get_balance(&new_stake_account_address).unwrap(), - expected_amount - sol_str_to_lamports("1.0").unwrap(), + expected_amount - sol_to_lamports(1.0), ); check_output_file(&output_path, &db::open_db(&transaction_db, true).unwrap()); @@ -1177,7 +1173,7 @@ pub fn test_process_distribute_stake_with_client(client: &RpcClient, sender_keyp let fee_payer = Keypair::new(); let transaction = transfer( client, - sol_str_to_lamports("1.0").unwrap(), + sol_to_lamports(1.0), &sender_keypair, &fee_payer.pubkey(), ) @@ -1201,7 +1197,7 @@ pub fn test_process_distribute_stake_with_client(client: &RpcClient, sender_keyp &stake_account_address, &authorized, &lockup, - sol_str_to_lamports("3000.0").unwrap(), + sol_to_lamports(3000.0), ); let message = Message::new(&instructions, Some(&sender_keypair.pubkey())); let signers = [&sender_keypair, &stake_account_keypair]; @@ -1211,7 +1207,7 @@ pub fn test_process_distribute_stake_with_client(client: &RpcClient, sender_keyp .send_and_confirm_transaction_with_spinner(&transaction) .unwrap(); - let expected_amount = sol_str_to_lamports("1000.0").unwrap(); + let expected_amount = sol_to_lamports(1000.0); let alice_pubkey = pubkey::new_rand(); let file = NamedTempFile::new().unwrap(); let input_csv = file.path().to_str().unwrap().to_string(); @@ -1220,7 +1216,7 @@ pub fn test_process_distribute_stake_with_client(client: &RpcClient, sender_keyp .unwrap(); wtr.write_record([ alice_pubkey.to_string(), - build_balance_message(expected_amount, false, false).to_string(), + lamports_to_sol(expected_amount).to_string(), "".to_string(), ]) .unwrap(); @@ -1248,7 +1244,7 @@ pub fn test_process_distribute_stake_with_client(client: &RpcClient, sender_keyp rent_exempt_reserve: Some(rent_exempt_reserve), }; let stake_args = StakeArgs { - unlocked_sol: sol_str_to_lamports("1.0").unwrap(), + unlocked_sol: sol_to_lamports(1.0), lockup_authority: None, sender_stake_args: Some(sender_stake_args), }; @@ -1274,12 +1270,12 @@ pub fn test_process_distribute_stake_with_client(client: &RpcClient, sender_keyp assert_eq!( client.get_balance(&alice_pubkey).unwrap(), - sol_str_to_lamports("1.0").unwrap(), + sol_to_lamports(1.0), ); let new_stake_account_address = transaction_infos[0].new_stake_account_address.unwrap(); assert_eq!( client.get_balance(&new_stake_account_address).unwrap(), - expected_amount - sol_str_to_lamports("1.0").unwrap(), + expected_amount - sol_to_lamports(1.0), ); check_output_file(&output_path, &db::open_db(&transaction_db, true).unwrap()); @@ -1294,11 +1290,11 @@ pub fn test_process_distribute_stake_with_client(client: &RpcClient, sender_keyp assert_eq!( client.get_balance(&alice_pubkey).unwrap(), - sol_str_to_lamports("1.0").unwrap(), + sol_to_lamports(1.0), ); assert_eq!( client.get_balance(&new_stake_account_address).unwrap(), - expected_amount - sol_str_to_lamports("1.0").unwrap(), + expected_amount - sol_to_lamports(1.0), ); check_output_file(&output_path, &db::open_db(&transaction_db, true).unwrap()); @@ -1310,7 +1306,6 @@ mod tests { super::*, solana_instruction::AccountMeta, solana_keypair::{read_keypair_file, write_keypair_file}, - solana_native_token::LAMPORTS_PER_SOL, solana_signer::Signer, solana_stake_interface::instruction::StakeInstruction, solana_streamer::socket::SocketAddrSpace, @@ -1347,7 +1342,7 @@ mod tests { let url = test_validator.rpc_url(); let client = RpcClient::new_with_commitment(url, CommitmentConfig::processed()); - test_process_distribute_tokens_with_client(&client, alice, sol_str_to_lamports("1.5")); + test_process_distribute_tokens_with_client(&client, alice, Some(sol_to_lamports(1.5))); } fn simple_test_validator_no_fees(pubkey: Pubkey) -> TestValidator { @@ -1409,7 +1404,7 @@ mod tests { let allocation_sol = TypedAllocation { recipient: alice_pubkey, - amount: sol_str_to_lamports("42.0").unwrap(), + amount: sol_to_lamports(42.0), lockup_date: None, }; @@ -1443,12 +1438,12 @@ mod tests { let expected_allocations = vec![ TypedAllocation { recipient: pubkey0, - amount: sol_str_to_lamports("42.0").unwrap(), + amount: sol_to_lamports(42.0), lockup_date: None, }, TypedAllocation { recipient: pubkey1, - amount: sol_str_to_lamports("43.0").unwrap(), + amount: sol_to_lamports(43.0), lockup_date: None, }, ]; @@ -1601,7 +1596,7 @@ mod tests { ); let input_csv = file.path().to_str().unwrap().to_string(); let got = read_allocations(&input_csv, None, false, false); - assert!(matches!(got, Err(Error::BadInputNumberError { .. }))); + assert!(matches!(got, Err(Error::CsvError(..)))); // Bad value in 2nd column (with require lockup). let file = NamedTempFile::new().unwrap(); generate_csv_file( @@ -1618,7 +1613,7 @@ mod tests { ); let input_csv = file.path().to_str().unwrap().to_string(); let got = read_allocations(&input_csv, None, true, false); - assert!(matches!(got, Err(Error::BadInputNumberError { .. }))); + assert!(matches!(got, Err(Error::CsvError(..)))); // Bad value in 2nd column (with raw amount). let file = NamedTempFile::new().unwrap(); generate_csv_file( @@ -1672,7 +1667,7 @@ mod tests { wtr.serialize(pubkey2.to_string()).unwrap(); wtr.flush().unwrap(); - let amount = sol_str_to_lamports("1.5").unwrap(); + let amount = sol_to_lamports(1.5); let expected_allocations = vec![ TypedAllocation { @@ -1704,18 +1699,18 @@ mod tests { let mut allocations = vec![ TypedAllocation { recipient: alice, - amount: sol_str_to_lamports("1.0").unwrap(), + amount: sol_to_lamports(1.0), lockup_date: None, }, TypedAllocation { recipient: bob, - amount: sol_str_to_lamports("1.0").unwrap(), + amount: sol_to_lamports(1.0), lockup_date: None, }, ]; let transaction_infos = vec![TransactionInfo { recipient: bob, - amount: sol_str_to_lamports("1.0").unwrap(), + amount: sol_to_lamports(1.0), ..TransactionInfo::default() }]; apply_previous_transactions(&mut allocations, &transaction_infos); @@ -1734,12 +1729,12 @@ mod tests { let lockup1 = "9999-12-31T23:59:59Z".to_string(); let alice_alloc = TypedAllocation { recipient: alice_pubkey, - amount: sol_str_to_lamports("1.0").unwrap(), + amount: sol_to_lamports(1.0), lockup_date: None, }; let alice_alloc_lockup0 = TypedAllocation { recipient: alice_pubkey, - amount: sol_str_to_lamports("1.0").unwrap(), + amount: sol_to_lamports(1.0), lockup_date: lockup0.parse().ok(), }; let alice_info = TransactionInfo { @@ -1782,7 +1777,7 @@ mod tests { let lockup_date_str = "2021-01-07T00:00:00Z"; let allocation = TypedAllocation { recipient: Pubkey::default(), - amount: sol_str_to_lamports("1.002282880").unwrap(), + amount: sol_to_lamports(1.002_282_880), lockup_date: lockup_date_str.parse().ok(), }; let stake_account_address = pubkey::new_rand(); @@ -1798,7 +1793,7 @@ mod tests { }; let stake_args = StakeArgs { lockup_authority: Some(lockup_authority_address), - unlocked_sol: sol_str_to_lamports("1.0").unwrap(), + unlocked_sol: sol_to_lamports(1.0), sender_stake_args: Some(sender_stake_args), }; let args = DistributeTokensArgs { @@ -1877,13 +1872,13 @@ mod tests { let fees = client .get_fee_for_message(&one_signer_message(&client)) .unwrap(); - let fees_in_sol = fees as f64 / LAMPORTS_PER_SOL as f64; + let fees_in_sol = lamports_to_sol(fees); let allocation_amount = 1000.0; // Fully funded payer let (allocations, mut args) = initialize_check_payer_balances_inputs( - sol_str_to_lamports(&allocation_amount.to_string()).unwrap(), + sol_to_lamports(allocation_amount), &sender_keypair_file, &sender_keypair_file, None, @@ -1921,7 +1916,7 @@ mod tests { .unwrap(); let transaction = transfer( &client, - sol_str_to_lamports(&allocation_amount.to_string()).unwrap(), + sol_to_lamports(allocation_amount), &alice, &partially_funded_payer.pubkey(), ) @@ -1959,7 +1954,7 @@ mod tests { let fees = client .get_fee_for_message(&one_signer_message(&client)) .unwrap(); - let fees_in_sol = fees as f64 / LAMPORTS_PER_SOL as f64; + let fees_in_sol = lamports_to_sol(fees); let sender_keypair_file = tmp_file_path("keypair_file", &alice.pubkey()); write_keypair_file(&alice, &sender_keypair_file).unwrap(); @@ -1971,7 +1966,7 @@ mod tests { write_keypair_file(&funded_payer, &funded_payer_keypair_file).unwrap(); let transaction = transfer( &client, - sol_str_to_lamports(&allocation_amount.to_string()).unwrap(), + sol_to_lamports(allocation_amount), &alice, &funded_payer.pubkey(), ) @@ -1982,7 +1977,7 @@ mod tests { // Fully funded payers let (allocations, mut args) = initialize_check_payer_balances_inputs( - sol_str_to_lamports(&allocation_amount.to_string()).unwrap(), + sol_to_lamports(allocation_amount), &funded_payer_keypair_file, &sender_keypair_file, None, @@ -2084,7 +2079,7 @@ mod tests { let fees = client .get_fee_for_message(&one_signer_message(&client)) .unwrap(); - let fees_in_sol = fees as f64 / LAMPORTS_PER_SOL as f64; + let fees_in_sol = lamports_to_sol(fees); let sender_keypair_file = tmp_file_path("keypair_file", &alice.pubkey()); write_keypair_file(&alice, &sender_keypair_file).unwrap(); @@ -2092,15 +2087,15 @@ mod tests { let allocation_amount = 1000.0; let unlocked_sol = 1.0; let stake_args = initialize_stake_account( - sol_str_to_lamports(&allocation_amount.to_string()).unwrap(), - sol_str_to_lamports(&unlocked_sol.to_string()).unwrap(), + sol_to_lamports(allocation_amount), + sol_to_lamports(unlocked_sol), &alice, &client, ); // Fully funded payer & stake account let (allocations, mut args) = initialize_check_payer_balances_inputs( - sol_str_to_lamports(&allocation_amount.to_string()).unwrap(), + sol_to_lamports(allocation_amount), &sender_keypair_file, &sender_keypair_file, Some(stake_args), @@ -2111,7 +2106,7 @@ mod tests { let expensive_allocation_amount = 5000.0; let expensive_allocations = vec![TypedAllocation { recipient: pubkey::new_rand(), - amount: sol_str_to_lamports(&expensive_allocation_amount.to_string()).unwrap(), + amount: sol_to_lamports(expensive_allocation_amount), lockup_date: None, }]; let err_result = check_payer_balances( @@ -2162,7 +2157,7 @@ mod tests { .unwrap(); let transaction = transfer( &client, - sol_str_to_lamports(&unlocked_sol.to_string()).unwrap(), + sol_to_lamports(unlocked_sol), &alice, &partially_funded_payer.pubkey(), ) @@ -2200,7 +2195,7 @@ mod tests { let fees = client .get_fee_for_message(&one_signer_message(&client)) .unwrap(); - let fees_in_sol = fees as f64 / LAMPORTS_PER_SOL as f64; + let fees_in_sol = lamports_to_sol(fees); let sender_keypair_file = tmp_file_path("keypair_file", &alice.pubkey()); write_keypair_file(&alice, &sender_keypair_file).unwrap(); @@ -2208,8 +2203,8 @@ mod tests { let allocation_amount = 1000.0; let unlocked_sol = 1.0; let stake_args = initialize_stake_account( - sol_str_to_lamports(&allocation_amount.to_string()).unwrap(), - sol_str_to_lamports(&unlocked_sol.to_string()).unwrap(), + sol_to_lamports(allocation_amount), + sol_to_lamports(unlocked_sol), &alice, &client, ); @@ -2219,7 +2214,7 @@ mod tests { write_keypair_file(&funded_payer, &funded_payer_keypair_file).unwrap(); let transaction = transfer( &client, - sol_str_to_lamports(&unlocked_sol.to_string()).unwrap(), + sol_to_lamports(unlocked_sol), &alice, &funded_payer.pubkey(), ) @@ -2230,7 +2225,7 @@ mod tests { // Fully funded payers let (allocations, mut args) = initialize_check_payer_balances_inputs( - sol_str_to_lamports(&allocation_amount.to_string()).unwrap(), + sol_to_lamports(allocation_amount), &funded_payer_keypair_file, &sender_keypair_file, Some(stake_args), @@ -2283,7 +2278,7 @@ mod tests { let sender = Keypair::new(); let recipient = Pubkey::new_unique(); - let amount = sol_str_to_lamports("1.0").unwrap(); + let amount = sol_to_lamports(1.0); let last_valid_block_height = 222; let transaction = transfer(&client, amount, &sender, &recipient).unwrap(); @@ -2318,7 +2313,7 @@ mod tests { }; let allocation = TypedAllocation { recipient, - amount: sol_str_to_lamports("1.0").unwrap(), + amount: sol_to_lamports(1.0), lockup_date: None, }; @@ -2405,7 +2400,7 @@ mod tests { let sender = Keypair::new(); let recipient = Pubkey::new_unique(); - let amount = sol_str_to_lamports("1.0").unwrap(); + let amount = sol_to_lamports(1.0); let last_valid_block_height = 222; let transaction = transfer(&client, amount, &sender, &recipient).unwrap(); @@ -2440,7 +2435,7 @@ mod tests { }; let allocation = TypedAllocation { recipient, - amount: sol_str_to_lamports("1.0").unwrap(), + amount: sol_to_lamports(1.0), lockup_date: None, }; let message = transaction.message.clone(); @@ -2519,7 +2514,7 @@ mod tests { let fee_payer = Keypair::new(); let transaction = transfer( &client, - sol_str_to_lamports("1.0").unwrap(), + sol_to_lamports(1.0), &sender_keypair, &fee_payer.pubkey(), ) @@ -2539,7 +2534,7 @@ mod tests { let recipient = Pubkey::new_unique(); let allocation = TypedAllocation { recipient, - amount: sol_str_to_lamports("1.0").unwrap(), + amount: sol_to_lamports(1.0), lockup_date: None, }; // This is just dummy data; Args will not affect messages @@ -2578,7 +2573,7 @@ mod tests { let sender = Keypair::new(); let recipient = Pubkey::new_unique(); - let amount = sol_str_to_lamports("1.0").unwrap(); + let amount = sol_to_lamports(1.0); let last_valid_block_height = 222; let transaction = transfer(&client, amount, &sender, &recipient).unwrap(); @@ -2671,7 +2666,7 @@ mod tests { let sender = Keypair::new(); let recipient = Pubkey::new_unique(); - let amount = sol_str_to_lamports("1.0").unwrap(); + let amount = sol_to_lamports(1.0); let last_valid_block_height = 222; let transaction = transfer(&client, amount, &sender, &recipient).unwrap(); diff --git a/tokens/src/spl_token.rs b/tokens/src/spl_token.rs index 39539a19fae8e5..fc2af66cf4fc40 100644 --- a/tokens/src/spl_token.rs +++ b/tokens/src/spl_token.rs @@ -5,9 +5,9 @@ use { }, console::style, solana_account_decoder::parse_token::{real_number_string, real_number_string_trimmed}, - solana_cli_output::display::build_balance_message, solana_instruction::Instruction, solana_message::Message, + solana_native_token::lamports_to_sol, solana_program_pack::Pack, solana_rpc_client::rpc_client::RpcClient, spl_associated_token_account_interface::{ @@ -94,7 +94,7 @@ pub(crate) fn check_spl_token_balances( if fee_payer_balance < fees + account_creation_amount { return Err(Error::InsufficientFunds( vec![FundingSource::FeePayer].into(), - build_balance_message(fees + account_creation_amount, false, false).to_string(), + lamports_to_sol(fees + account_creation_amount).to_string(), )); } let source_token_account = client diff --git a/tokens/src/token_display.rs b/tokens/src/token_display.rs index 148a9792bfbd7a..590f6e1561fba5 100644 --- a/tokens/src/token_display.rs +++ b/tokens/src/token_display.rs @@ -1,6 +1,6 @@ use { solana_account_decoder::parse_token::real_number_string_trimmed, - solana_cli_output::display::build_balance_message, + solana_native_token::lamports_to_sol, std::{ fmt::{Debug, Display, Formatter, Result}, ops::Add, @@ -25,7 +25,7 @@ impl Token { fn write_with_symbol(&self, f: &mut Formatter) -> Result { match &self.token_type { TokenType::Sol => { - let amount = build_balance_message(self.amount, false, false); + let amount = lamports_to_sol(self.amount); write!(f, "{SOL_SYMBOL}{amount}") } TokenType::SplToken => { diff --git a/turbine/src/retransmit_stage.rs b/turbine/src/retransmit_stage.rs index d29f5208832b56..029361c23a075b 100644 --- a/turbine/src/retransmit_stage.rs +++ b/turbine/src/retransmit_stage.rs @@ -849,7 +849,7 @@ mod tests { bs58::decode(KEYPAIR) .into_vec() .as_deref() - .map(Keypair::try_from) + .map(Keypair::from_bytes) .unwrap() .unwrap() } diff --git a/validator/src/admin_rpc_service.rs b/validator/src/admin_rpc_service.rs index 03d401a98f5e34..f22f16bd89f000 100644 --- a/validator/src/admin_rpc_service.rs +++ b/validator/src/admin_rpc_service.rs @@ -476,7 +476,7 @@ impl AdminRpc for AdminRpcImpl { ) -> Result<()> { debug!("add_authorized_voter_from_bytes request received"); - let authorized_voter = Keypair::try_from(keypair.as_ref()).map_err(|err| { + let authorized_voter = Keypair::from_bytes(&keypair).map_err(|err| { jsonrpc_core::error::Error::invalid_params(format!( "Failed to read authorized voter keypair from provided byte array: {err}" )) @@ -516,7 +516,7 @@ impl AdminRpc for AdminRpcImpl { ) -> Result<()> { debug!("set_identity_from_bytes request received"); - let identity_keypair = Keypair::try_from(identity_keypair.as_ref()).map_err(|err| { + let identity_keypair = Keypair::from_bytes(&identity_keypair).map_err(|err| { jsonrpc_core::error::Error::invalid_params(format!( "Failed to read identity keypair from provided byte array: {err}" )) diff --git a/validator/src/bin/solana-test-validator.rs b/validator/src/bin/solana-test-validator.rs index 3eba7759ecac21..1b51eed38ae2af 100644 --- a/validator/src/bin/solana-test-validator.rs +++ b/validator/src/bin/solana-test-validator.rs @@ -20,7 +20,7 @@ use { solana_inflation::Inflation, solana_keypair::{read_keypair_file, write_keypair_file, Keypair}, solana_logger::redirect_stderr_to_file, - solana_native_token::sol_str_to_lamports, + solana_native_token::sol_to_lamports, solana_pubkey::Pubkey, solana_rent::Rent, solana_rpc::{ @@ -324,10 +324,7 @@ fn main() { None }; - let faucet_lamports = matches - .value_of("faucet_sol") - .and_then(sol_str_to_lamports) - .unwrap(); + let faucet_lamports = sol_to_lamports(value_of(&matches, "faucet_sol").unwrap()); let faucet_keypair_file = ledger_path.join("faucet-keypair.json"); if !faucet_keypair_file.exists() { write_keypair_file(&Keypair::new(), faucet_keypair_file.to_str().unwrap()).unwrap_or_else( @@ -354,12 +351,12 @@ fn main() { let faucet_pubkey = faucet_keypair.pubkey(); let faucet_time_slice_secs = value_t_or_exit!(matches, "faucet_time_slice_secs", u64); - let faucet_per_time_cap = matches - .value_of("faucet_per_time_sol_cap") - .and_then(sol_str_to_lamports); - let faucet_per_request_cap = matches - .value_of("faucet_per_request_sol_cap") - .and_then(sol_str_to_lamports); + let faucet_per_time_cap = value_t!(matches, "faucet_per_time_sol_cap", f64) + .ok() + .map(sol_to_lamports); + let faucet_per_request_cap = value_t!(matches, "faucet_per_request_sol_cap", f64) + .ok() + .map(sol_to_lamports); let (sender, receiver) = unbounded(); run_local_faucet_with_port( diff --git a/vote/benches/vote_account.rs b/vote/benches/vote_account.rs index 6e0d3e70d01d3d..014ef37f8cba94 100644 --- a/vote/benches/vote_account.rs +++ b/vote/benches/vote_account.rs @@ -4,13 +4,13 @@ use { solana_account::AccountSharedData, solana_pubkey::Pubkey, solana_vote::vote_account::VoteAccount, - solana_vote_interface::state::{VoteInit, VoteStateV3, VoteStateVersions}, + solana_vote_interface::state::{VoteInit, VoteState, VoteStateVersions}, }; fn new_rand_vote_account( rng: &mut R, node_pubkey: Option, -) -> (AccountSharedData, VoteStateV3) { +) -> (AccountSharedData, VoteState) { let vote_init = VoteInit { node_pubkey: node_pubkey.unwrap_or_else(Pubkey::new_unique), authorized_voter: Pubkey::new_unique(), @@ -24,11 +24,11 @@ fn new_rand_vote_account( leader_schedule_epoch: rng.gen(), unix_timestamp: rng.gen(), }; - let mut vote_state = VoteStateV3::new(&vote_init, &clock); + let mut vote_state = VoteState::new(&vote_init, &clock); vote_state.process_next_vote_slot(0, 0, 1); let account = AccountSharedData::new_data( rng.gen(), // lamports - &VoteStateVersions::new_v3(vote_state.clone()), + &VoteStateVersions::new_current(vote_state.clone()), &solana_sdk_ids::vote::id(), // owner ) .unwrap(); diff --git a/vote/src/vote_account.rs b/vote/src/vote_account.rs index 9c150c581108fe..55204a8ef3ce9f 100644 --- a/vote/src/vote_account.rs +++ b/vote/src/vote_account.rs @@ -96,7 +96,7 @@ impl VoteAccount { use { rand::Rng as _, solana_clock::Clock, - solana_vote_interface::state::{VoteInit, VoteStateV3, VoteStateVersions}, + solana_vote_interface::state::{VoteInit, VoteState, VoteStateVersions}, }; let mut rng = rand::thread_rng(); @@ -114,10 +114,10 @@ impl VoteAccount { leader_schedule_epoch: rng.gen(), unix_timestamp: rng.gen(), }; - let vote_state = VoteStateV3::new(&vote_init, &clock); + let vote_state = VoteState::new(&vote_init, &clock); let account = AccountSharedData::new_data( rng.gen(), // lamports - &VoteStateVersions::new_v3(vote_state.clone()), + &VoteStateVersions::new_current(vote_state.clone()), &solana_sdk_ids::vote::id(), // owner ) .unwrap(); @@ -453,7 +453,7 @@ mod tests { solana_account::WritableAccount, solana_clock::Clock, solana_pubkey::Pubkey, - solana_vote_interface::state::{VoteInit, VoteStateV3, VoteStateVersions}, + solana_vote_interface::state::{VoteInit, VoteState, VoteStateVersions}, std::iter::repeat_with, }; @@ -474,10 +474,10 @@ mod tests { leader_schedule_epoch: rng.gen(), unix_timestamp: rng.gen(), }; - let vote_state = VoteStateV3::new(&vote_init, &clock); + let vote_state = VoteState::new(&vote_init, &clock); AccountSharedData::new_data( rng.gen(), // lamports - &VoteStateVersions::new_v3(vote_state.clone()), + &VoteStateVersions::new_current(vote_state.clone()), &solana_sdk_ids::vote::id(), // owner ) .unwrap() diff --git a/vote/src/vote_state_view.rs b/vote/src/vote_state_view.rs index db4c05fdd61722..b4c6dc313a2a67 100644 --- a/vote/src/vote_state_view.rs +++ b/vote/src/vote_state_view.rs @@ -17,7 +17,7 @@ use { #[cfg(feature = "dev-context-only-utils")] use { bincode, - solana_vote_interface::state::{VoteStateV3, VoteStateVersions}, + solana_vote_interface::state::{VoteState, VoteStateVersions}, }; mod field_frames; @@ -154,9 +154,10 @@ impl VoteStateView { } #[cfg(feature = "dev-context-only-utils")] -impl From for VoteStateView { - fn from(vote_state: VoteStateV3) -> Self { - let vote_account_data = bincode::serialize(&VoteStateVersions::new_v3(vote_state)).unwrap(); +impl From for VoteStateView { + fn from(vote_state: VoteState) -> Self { + let vote_account_data = + bincode::serialize(&VoteStateVersions::new_current(vote_state)).unwrap(); VoteStateView::try_new(Arc::new(vote_account_data)).unwrap() } } @@ -230,15 +231,15 @@ mod tests { solana_vote_interface::{ authorized_voters::AuthorizedVoters, state::{ - vote_state_1_14_11::VoteState1_14_11, LandedVote, VoteInit, VoteStateV3, + vote_state_1_14_11::VoteState1_14_11, LandedVote, VoteInit, VoteState, VoteStateVersions, MAX_EPOCH_CREDITS_HISTORY, MAX_LOCKOUT_HISTORY, }, }, std::collections::VecDeque, }; - fn new_test_vote_state() -> VoteStateV3 { - let mut target_vote_state = VoteStateV3::new( + fn new_test_vote_state() -> VoteState { + let mut target_vote_state = VoteState::new( &VoteInit { node_pubkey: Pubkey::new_unique(), authorized_voter: Pubkey::new_unique(), @@ -276,7 +277,8 @@ mod tests { #[test] fn test_vote_state_view_v3() { let target_vote_state = new_test_vote_state(); - let target_vote_state_versions = VoteStateVersions::V3(Box::new(target_vote_state.clone())); + let target_vote_state_versions = + VoteStateVersions::Current(Box::new(target_vote_state.clone())); let vote_state_buf = bincode::serialize(&target_vote_state_versions).unwrap(); let vote_state_view = VoteStateView::try_new(Arc::new(vote_state_buf)).unwrap(); assert_eq_vote_state_v3(&vote_state_view, &target_vote_state); @@ -284,8 +286,9 @@ mod tests { #[test] fn test_vote_state_view_v3_default() { - let target_vote_state = VoteStateV3::default(); - let target_vote_state_versions = VoteStateVersions::V3(Box::new(target_vote_state.clone())); + let target_vote_state = VoteState::default(); + let target_vote_state_versions = + VoteStateVersions::Current(Box::new(target_vote_state.clone())); let vote_state_buf = bincode::serialize(&target_vote_state_versions).unwrap(); let vote_state_view = VoteStateView::try_new(Arc::new(vote_state_buf)).unwrap(); assert_eq_vote_state_v3(&vote_state_view, &target_vote_state); @@ -295,12 +298,12 @@ mod tests { fn test_vote_state_view_v3_arbitrary() { // variant // provide 4x the minimum struct size in bytes to ensure we typically touch every field - let struct_bytes_x4 = VoteStateV3::size_of() * 4; + let struct_bytes_x4 = VoteState::size_of() * 4; for _ in 0..100 { let raw_data: Vec = (0..struct_bytes_x4).map(|_| rand::random::()).collect(); let mut unstructured = Unstructured::new(&raw_data); - let mut target_vote_state = VoteStateV3::arbitrary(&mut unstructured).unwrap(); + let mut target_vote_state = VoteState::arbitrary(&mut unstructured).unwrap(); target_vote_state.votes.truncate(MAX_LOCKOUT_HISTORY); target_vote_state .epoch_credits @@ -310,7 +313,7 @@ mod tests { } let target_vote_state_versions = - VoteStateVersions::V3(Box::new(target_vote_state.clone())); + VoteStateVersions::Current(Box::new(target_vote_state.clone())); let vote_state_buf = bincode::serialize(&target_vote_state_versions).unwrap(); let vote_state_view = VoteStateView::try_new(Arc::new(vote_state_buf)).unwrap(); assert_eq_vote_state_v3(&vote_state_view, &target_vote_state); @@ -368,7 +371,7 @@ mod tests { } } - fn assert_eq_vote_state_v3(vote_state_view: &VoteStateView, vote_state: &VoteStateV3) { + fn assert_eq_vote_state_v3(vote_state_view: &VoteStateView, vote_state: &VoteState) { assert_eq!(vote_state_view.node_pubkey(), &vote_state.node_pubkey); assert_eq!(vote_state_view.commission(), vote_state.commission); let view_votes = vote_state_view.votes_iter().collect::>(); diff --git a/vote/src/vote_state_view/frame_v1_14_11.rs b/vote/src/vote_state_view/frame_v1_14_11.rs index eb64fb0cbb8411..d35b1b4260a169 100644 --- a/vote/src/vote_state_view/frame_v1_14_11.rs +++ b/vote/src/vote_state_view/frame_v1_14_11.rs @@ -100,7 +100,7 @@ mod tests { super::*, solana_clock::Clock, solana_vote_interface::state::{ - LandedVote, Lockout, VoteInit, VoteState1_14_11, VoteStateV3, VoteStateVersions, + LandedVote, Lockout, VoteInit, VoteState, VoteState1_14_11, VoteStateVersions, }, }; @@ -138,7 +138,7 @@ mod tests { #[test] fn test_try_new_simple() { - let mut target_vote_state = VoteStateV3::new(&VoteInit::default(), &Clock::default()); + let mut target_vote_state = VoteState::new(&VoteInit::default(), &Clock::default()); target_vote_state.root_slot = Some(42); target_vote_state.epoch_credits.push((1, 2, 3)); target_vote_state.votes.push_back(LandedVote { diff --git a/vote/src/vote_state_view/frame_v3.rs b/vote/src/vote_state_view/frame_v3.rs index b3313c84971f78..69fe1b434b9bed 100644 --- a/vote/src/vote_state_view/frame_v3.rs +++ b/vote/src/vote_state_view/frame_v3.rs @@ -101,14 +101,14 @@ mod tests { super::*, solana_clock::Clock, solana_vote_interface::state::{ - LandedVote, Lockout, VoteInit, VoteStateV3, VoteStateVersions, + LandedVote, Lockout, VoteInit, VoteState, VoteStateVersions, }, }; #[test] fn test_try_new_zeroed() { - let target_vote_state = VoteStateV3::default(); - let target_vote_state_versions = VoteStateVersions::V3(Box::new(target_vote_state)); + let target_vote_state = VoteState::default(); + let target_vote_state_versions = VoteStateVersions::Current(Box::new(target_vote_state)); let mut bytes = bincode::serialize(&target_vote_state_versions).unwrap(); for i in 0..bytes.len() { @@ -139,7 +139,7 @@ mod tests { #[test] fn test_try_new_simple() { - let mut target_vote_state = VoteStateV3::new(&VoteInit::default(), &Clock::default()); + let mut target_vote_state = VoteState::new(&VoteInit::default(), &Clock::default()); target_vote_state.root_slot = Some(42); target_vote_state.epoch_credits.push((1, 2, 3)); target_vote_state.votes.push_back(LandedVote { @@ -147,7 +147,7 @@ mod tests { lockout: Lockout::default(), }); - let target_vote_state_versions = VoteStateVersions::V3(Box::new(target_vote_state)); + let target_vote_state_versions = VoteStateVersions::Current(Box::new(target_vote_state)); let mut bytes = bincode::serialize(&target_vote_state_versions).unwrap(); for i in 0..bytes.len() { diff --git a/watchtower/Cargo.toml b/watchtower/Cargo.toml index 074e84902f9782..c67df045df1e19 100644 --- a/watchtower/Cargo.toml +++ b/watchtower/Cargo.toml @@ -19,12 +19,12 @@ log = { workspace = true } solana-clap-utils = { workspace = true } solana-cli-config = { workspace = true } solana-cli-output = { workspace = true } -solana-hash = "=3.0.0" +solana-hash = "=2.3.0" solana-logger = "=3.0.0" solana-metrics = { workspace = true } -solana-native-token = "=3.0.0" +solana-native-token = "=2.2.2" solana-notifier = { workspace = true } -solana-pubkey = { version = "=3.0.0", default-features = false } +solana-pubkey = { version = "=2.4.0", default-features = false } solana-rpc-client = { workspace = true } solana-rpc-client-api = { workspace = true } solana-version = { workspace = true } diff --git a/watchtower/src/main.rs b/watchtower/src/main.rs index 71dd315ec4cda0..fddde727433ed4 100644 --- a/watchtower/src/main.rs +++ b/watchtower/src/main.rs @@ -12,7 +12,7 @@ use { solana_cli_output::display::format_labeled_address, solana_hash::Hash, solana_metrics::{datapoint_error, datapoint_info}, - solana_native_token::{sol_str_to_lamports, Sol}, + solana_native_token::{sol_to_lamports, Sol}, solana_notifier::{NotificationType, Notifier}, solana_pubkey::Pubkey, solana_rpc_client::rpc_client::RpcClient, @@ -197,10 +197,11 @@ fn get_config() -> Config { let interval = Duration::from_secs(value_t_or_exit!(matches, "interval", u64)); let unhealthy_threshold = value_t_or_exit!(matches, "unhealthy_threshold", usize); - let minimum_validator_identity_balance = matches - .value_of("minimum_validator_identity_balance") - .and_then(sol_str_to_lamports) - .unwrap(); + let minimum_validator_identity_balance = sol_to_lamports(value_t_or_exit!( + matches, + "minimum_validator_identity_balance", + f64 + )); let json_rpc_urls = values_t!(matches, "json_rpc_urls", String).unwrap_or_else(|_| { vec![value_t!(matches, "json_rpc_url", String).unwrap_or_else(|_| config.json_rpc_url)] }); diff --git a/zk-keygen/Cargo.toml b/zk-keygen/Cargo.toml index b92335b6a35a68..1eb81240e44caa 100644 --- a/zk-keygen/Cargo.toml +++ b/zk-keygen/Cargo.toml @@ -28,10 +28,10 @@ clap = { version = "3.1.5", features = ["cargo", "derive"] } dirs-next = { workspace = true } solana-clap-v3-utils = { workspace = true, features = ["elgamal"] } solana-remote-wallet = { workspace = true, features = ["default"] } -solana-seed-derivable = "=3.0.0" -solana-signer = "=3.0.0" +solana-seed-derivable = "=2.2.1" +solana-signer = "=2.2.1" solana-version = { workspace = true } -solana-zk-sdk = { workspace = true } +solana-zk-token-sdk = { workspace = true } thiserror = { workspace = true } tiny-bip39 = { workspace = true } diff --git a/zk-keygen/src/main.rs b/zk-keygen/src/main.rs index 5781f3427407cb..e63522038b98b8 100644 --- a/zk-keygen/src/main.rs +++ b/zk-keygen/src/main.rs @@ -16,7 +16,7 @@ use { }, solana_seed_derivable::SeedDerivable, solana_signer::EncodableKey, - solana_zk_sdk::encryption::{auth_encryption::AeKey, elgamal::ElGamalKeypair}, + solana_zk_token_sdk::encryption::{auth_encryption::AeKey, elgamal::ElGamalKeypair}, std::{error, str::FromStr}, thiserror::Error, };