From 5e8a0d4c6dcfe23ee1c488f142a9c02985794ea7 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Thu, 14 Apr 2022 15:54:38 +0200 Subject: [PATCH] banking-bench: Add and rearrange options - Add write-lock-contention option, replacing same_payer - write-lock-contention also has a same-batch-only value, where contention happens only inside batches, not between them - Rename num-threads to batches-per-iteration, which is closer to what it is actually doing. - Add num-banking-threads as a new option - Rename packets-per-chunk to packets-per-batch, because this is closer to what's happening; and it was previously confusing that num-chunks had little to do with packets-per-chunk. Example output for a iterations=100 and a permutation of inputs: contention,threads,batchsize,batchcount,tps none, 3,192, 4,65290.30 none, 4,192, 4,77358.06 none, 5,192, 4,86436.65 none, 3, 12,64,43944.57 none, 4, 12,64,65852.15 none, 5, 12,64,70674.37 same-batch-only,3,192, 4,3928.21 same-batch-only,4,192, 4,6460.15 same-batch-only,5,192, 4,7242.85 same-batch-only,3, 12,64,11377.58 same-batch-only,4, 12,64,19582.79 same-batch-only,5, 12,64,24648.45 full, 3,192, 4,3914.26 full, 4,192, 4,2102.99 full, 5,192, 4,3041.87 full, 3, 12,64,11316.17 full, 4, 12,64,2224.99 full, 5, 12,64,5240.32 (cherry picked from commit d2c6c04d3ea37b24d56ad8b3c2b839b92b6879f4) --- Cargo.lock | 478 +++++++++++++++++--------------------- banking-bench/Cargo.toml | 2 +- banking-bench/src/main.rs | 145 ++++++++---- core/src/banking_stage.rs | 2 +- 4 files changed, 315 insertions(+), 312 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0194eccb015a18..ff15e8ef3f7941 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -165,8 +165,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] @@ -176,8 +176,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] @@ -228,9 +228,9 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdc19781b16e32f8a7200368a336fa4509d4b72ef15dd4e41df5290855ee1e6" +checksum = "da31c0ed7b4690e2c78fe4b880d21cd7db04a346ebc658b4270251b695437f17" dependencies = [ "async-trait", "bytes", @@ -300,7 +300,7 @@ dependencies = [ "lazycell", "peeking_take_while", "proc-macro2 1.0.37", - "quote 1.0.10", + "quote 1.0.18", "regex", "rustc-hash", "shlex", @@ -416,7 +416,7 @@ dependencies = [ "borsh-schema-derive-internal", "proc-macro-crate 0.1.5", "proc-macro2 1.0.37", - "syn 1.0.91", + "syn 1.0.92", ] [[package]] @@ -426,8 +426,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] @@ -437,8 +437,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] @@ -512,8 +512,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "562e382481975bc61d11275ac5e62a19abd00b0547d99516a415336f183dcd0e" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] @@ -592,7 +592,7 @@ checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" dependencies = [ "camino", "cargo-platform", - "semver 1.0.7", + "semver 1.0.9", "serde", "serde_json", ] @@ -706,15 +706,9 @@ dependencies = [ [[package]] name = "clap" -<<<<<<< HEAD -version = "3.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c167e37342afc5f33fd87bbc870cedd020d2a6dffa05d45ccd9241fbdd146db" -======= -version = "3.1.8" +version = "3.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71c47df61d9e16dc010b55dba1952a57d8c215dbb533fd13cdd13369aac73b1c" ->>>>>>> 2c7699eb8 (banking-bench: Migrate to clap 3.1.8) +checksum = "85a35a599b11c089a7f49105658d089b8f2cf0882993c17daf6de15285c2c35d" dependencies = [ "atty", "bitflags", @@ -736,15 +730,15 @@ dependencies = [ "heck", "proc-macro-error", "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] name = "clap_lex" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "189ddd3b5d32a70b35e7686054371742a937b0d99128e76dde6340210e966669" +checksum = "a37c35f1112dad5e6e0b1adaff798507497a18fceeb30cceb3bae7d1427b9213" dependencies = [ "os_str_bytes", ] @@ -834,8 +828,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef196d5d972878a48da7decb7686eded338b4858fbabeed513d63a7c98b2b82d" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", - "unicode-xid 0.2.2", + "quote 1.0.18", + "unicode-xid 0.2.3", ] [[package]] @@ -932,10 +926,11 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "1145cf131a2c6ba0615079ab6a638f7e1973ac9c2634fcbeaaad6114246efe8c" dependencies = [ + "autocfg", "cfg-if 1.0.0", "crossbeam-utils", "lazy_static", @@ -1068,9 +1063,9 @@ checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "convert_case", "proc-macro2 1.0.37", - "quote 1.0.10", + "quote 1.0.18", "rustc_version 0.4.0", - "syn 1.0.91", + "syn 1.0.92", ] [[package]] @@ -1227,8 +1222,8 @@ checksum = "c07b7cc9cd8c08d10db74fca3b20949b9b6199725c04a0cce6d543496098fcac" dependencies = [ "enum-ordinalize", "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] @@ -1268,8 +1263,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c134c37760b27a871ba422106eedbb8247da973a09e82558bf26d619c882b159" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] @@ -1281,9 +1276,9 @@ dependencies = [ "num-bigint", "num-traits", "proc-macro2 1.0.37", - "quote 1.0.10", + "quote 1.0.18", "rustc_version 0.4.0", - "syn 1.0.91", + "syn 1.0.92", ] [[package]] @@ -1322,9 +1317,9 @@ dependencies = [ [[package]] name = "etcd-client" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4504e955d596cc27543aa77ecb075dec41c7b0c7749fe6b5536a82548f5073b1" +checksum = "c434d2800b273a506b82397aad2f20971636f65e47b27c027f77d498530c5954" dependencies = [ "http", "prost", @@ -1535,8 +1530,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] @@ -1834,9 +1829,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03" +checksum = "ff8670570af52249509a86f5e3e18a08c60b177071826898fde8997cf5f6bfbb" dependencies = [ "bytes", "fnv", @@ -1862,9 +1857,9 @@ checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" [[package]] name = "httparse" -version = "1.7.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6330e8a36bd8c859f3fa6d9382911fbb7147ec39807f63b923933a247240b9ba" +checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c" [[package]] name = "httpdate" @@ -1970,12 +1965,12 @@ checksum = "9007da9cacbd3e6343da136e98b0d2df013f553d35bdec8b518f07bea768e19c" [[package]] name = "im" -version = "15.0.0" +version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "111c1983f3c5bb72732df25cddacee9b546d08325fb584b5ebd38148be7b0246" +checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" dependencies = [ "bitmaps", - "rand_core 0.5.1", + "rand_core 0.6.3", "rand_xoshiro", "rayon", "serde", @@ -2145,8 +2140,8 @@ checksum = "5b939a78fa820cdfcb7ee7484466746a7377760970f6f9c6fe19f9edcc8a38d2" dependencies = [ "proc-macro-crate 0.1.5", "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] @@ -2243,9 +2238,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.124" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50" +checksum = "5916d2ae698f6de9bfb891ad7a8d65c09d232dc58cc4ac433c7da3b2fd84bc2b" [[package]] name = "libloading" @@ -2327,9 +2322,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f35facd4a5673cb5a48822be2be1d4236c1c99cb4113cab7061ac720d5bf859" +checksum = "92e7e15d7610cce1d9752e137625f14e61a28cd45929b6e12e47b50fe154ee2e" dependencies = [ "cc", "pkg-config", @@ -2344,24 +2339,25 @@ checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" [[package]] name = "linux-raw-sys" -version = "0.0.42" +version = "0.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5284f00d480e1c39af34e72f8ad60b94f47007e3481cd3b731c1d67190ddc7b7" +checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" [[package]] name = "lock_api" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b" +checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" dependencies = [ + "autocfg", "scopeguard", ] [[package]] name = "log" -version = "0.4.16" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ "cfg-if 1.0.0", ] @@ -2395,9 +2391,9 @@ checksum = "73cbba799671b762df5a175adf59ce145165747bb891505c43d09aefbbf38beb" [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" @@ -2503,8 +2499,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] @@ -2603,15 +2599,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] name = "num-integer" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ "autocfg", "num-traits", @@ -2653,8 +2649,8 @@ checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] @@ -2776,8 +2772,8 @@ dependencies = [ "Inflector", "proc-macro-error", "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] @@ -2812,7 +2808,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" dependencies = [ "lock_api", - "parking_lot_core 0.9.2", + "parking_lot_core 0.9.3", ] [[package]] @@ -2831,15 +2827,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "995f667a6c822200b0433ac218e05582f0e2efa1b922a3fd2fbaadc5f87bab37" +checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" dependencies = [ "cfg-if 1.0.0", "libc", "redox_syscall", "smallvec", - "windows-sys 0.34.0", + "windows-sys 0.36.1", ] [[package]] @@ -2915,8 +2911,8 @@ dependencies = [ "pest", "pest_meta", "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] @@ -2969,8 +2965,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] @@ -3066,7 +3062,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9e07e3a46d0771a8a06b5f4441527802830b43e679ba12f44960f48dd4c6803" dependencies = [ "proc-macro2 1.0.37", - "syn 1.0.91", + "syn 1.0.92", ] [[package]] @@ -3096,8 +3092,8 @@ checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", "version_check", ] @@ -3108,7 +3104,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", + "quote 1.0.18", "version_check", ] @@ -3133,7 +3129,7 @@ version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1" dependencies = [ - "unicode-xid 0.2.2", + "unicode-xid 0.2.3", ] [[package]] @@ -3197,8 +3193,8 @@ dependencies = [ "anyhow", "itertools", "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] @@ -3297,9 +3293,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.10" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" +checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" dependencies = [ "proc-macro2 1.0.37", ] @@ -3424,11 +3420,11 @@ dependencies = [ [[package]] name = "rand_xoshiro" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9fcdd2e881d02f1d9390ae47ad8e5696a9e4be7b547a1da2afbc61973217004" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" dependencies = [ - "rand_core 0.5.1", + "rand_core 0.6.3", ] [[package]] @@ -3465,16 +3461,12 @@ dependencies = [ name = "rbpf-cli" version = "1.10.12" dependencies = [ -<<<<<<< HEAD "bv", - "clap 3.1.12", + "clap 3.1.15", "gimli", "goblin 0.5.1", "itertools", "log", -======= - "clap 3.1.8", ->>>>>>> 2c7699eb8 (banking-bench: Migrate to clap 3.1.8) "serde", "serde_json", "solana-bpf-loader-program", @@ -3682,14 +3674,14 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.7", + "semver 1.0.9", ] [[package]] name = "rustix" -version = "0.34.4" +version = "0.34.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f5d1c6ed6d1c6915aa64749b809fc1bafff49d160f5d927463658093d7d62ab" +checksum = "f3e74b3f02f2b6eb33790923756784614f456de79d821d6b2670dc7d5fbea807" dependencies = [ "bitflags", "errno", @@ -3824,8 +3816,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aaaae8f38bb311444cfb7f1979af0bc9240d95795f75f9ceddf6a59b79ceffa0" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] @@ -3835,8 +3827,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdbda6ac5cd1321e724fa9cee216f3a61885889b896f073b8f82322789c5250e" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] @@ -3883,9 +3875,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d65bd28f48be7196d222d95b9243287f48d27aca604e08497513019ff0502cc4" +checksum = "8cb243bdfdb5936c8dc3c45762a19d12ab4550cdc753bc247637d4ec35a040fd" dependencies = [ "serde", ] @@ -3898,18 +3890,18 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.136" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" +checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" dependencies = [ "serde_derive", ] [[package]] name = "serde_bytes" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" +checksum = "212e73464ebcde48d723aa02eb270ba62eff38a9b732df31f33f1b4e145f3a54" dependencies = [ "serde", ] @@ -3926,20 +3918,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.136" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" +checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] name = "serde_json" -version = "1.0.79" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" +checksum = "f972498cf015f7c0746cac89ebe1d6ef10c293b94175a243a2d9442c163d9944" dependencies = [ "itoa 1.0.1", "ryu", @@ -3989,9 +3981,9 @@ checksum = "2881bccd7d60fb32dfa3d7b3136385312f8ad75e2674aab2852867a09790cae8" dependencies = [ "proc-macro-error", "proc-macro2 1.0.37", - "quote 1.0.10", + "quote 1.0.18", "rustversion", - "syn 1.0.91", + "syn 1.0.92", ] [[package]] @@ -4297,11 +4289,7 @@ dependencies = [ name = "solana-banking-bench" version = "1.10.12" dependencies = [ -<<<<<<< HEAD - "clap 2.34.0", -======= - "clap 3.1.8", ->>>>>>> 2c7699eb8 (banking-bench: Migrate to clap 3.1.8) + "clap 3.1.15", "crossbeam-channel", "log", "rand 0.7.3", @@ -4366,11 +4354,7 @@ dependencies = [ name = "solana-bench-streamer" version = "1.10.12" dependencies = [ -<<<<<<< HEAD "clap 2.34.0", -======= - "clap 3.1.8", ->>>>>>> 2c7699eb8 (banking-bench: Migrate to clap 3.1.8) "crossbeam-channel", "solana-net-utils", "solana-streamer", @@ -4467,11 +4451,7 @@ version = "1.10.12" dependencies = [ "bzip2", "cargo_metadata", -<<<<<<< HEAD - "clap 3.1.12", -======= - "clap 3.1.8", ->>>>>>> 2c7699eb8 (banking-bench: Migrate to clap 3.1.8) + "clap 3.1.15", "regex", "serial_test", "solana-download-utils", @@ -4484,11 +4464,7 @@ name = "solana-cargo-test-bpf" version = "1.10.12" dependencies = [ "cargo_metadata", -<<<<<<< HEAD - "clap 3.1.12", -======= - "clap 3.1.8", ->>>>>>> 2c7699eb8 (banking-bench: Migrate to clap 3.1.8) + "clap 3.1.15", ] [[package]] @@ -4525,7 +4501,7 @@ dependencies = [ "num-traits", "pretty-hex", "reqwest", - "semver 1.0.7", + "semver 1.0.9", "serde", "serde_derive", "serde_json", @@ -4580,7 +4556,7 @@ dependencies = [ "ed25519-dalek", "humantime", "indicatif", - "semver 1.0.7", + "semver 1.0.9", "serde", "serde_json", "solana-account-decoder", @@ -4622,7 +4598,7 @@ dependencies = [ "rayon", "reqwest", "rustls", - "semver 1.0.7", + "semver 1.0.9", "serde", "serde_derive", "serde_json", @@ -4764,11 +4740,7 @@ name = "solana-dos" version = "1.10.12" dependencies = [ "bincode", -<<<<<<< HEAD - "clap 3.1.12", -======= - "clap 3.1.8", ->>>>>>> 2c7699eb8 (banking-bench: Migrate to clap 3.1.8) + "clap 3.1.15", "log", "rand 0.7.3", "serde", @@ -4853,9 +4825,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "1.10.10" +version = "1.10.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7299c2ca50bd2d8a5b4a8043e4817892b5e700345234a31adc5b4c1208a32283" +checksum = "9688a711cb652ee3d34536ad8a3156c763474152dc89bc5e01deadcab3647564" dependencies = [ "bs58", "bv", @@ -4869,7 +4841,7 @@ dependencies = [ "serde_bytes", "serde_derive", "sha2 0.10.2", - "solana-frozen-abi-macro 1.10.10", + "solana-frozen-abi-macro 1.10.11", "thiserror", ] @@ -4896,14 +4868,14 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.10.10" +version = "1.10.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726d2fbe5b1b21cb8a81b8c3c1d1aca32bfcfd795f92536d8ff3e66e2e51df8" +checksum = "d47451a9d2fe137d0601b90194edb4a04498a488dcb201da052f02971179797c" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", + "quote 1.0.18", "rustc_version 0.4.0", - "syn 1.0.91", + "syn 1.0.92", ] [[package]] @@ -4911,9 +4883,9 @@ name = "solana-frozen-abi-macro" version = "1.10.12" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", + "quote 1.0.18", "rustc_version 0.4.0", - "syn 1.0.91", + "syn 1.0.92", ] [[package]] @@ -5039,7 +5011,7 @@ dependencies = [ "lazy_static", "nix 0.23.1", "reqwest", - "semver 1.0.7", + "semver 1.0.9", "serde", "serde_yaml", "solana-clap-utils", @@ -5197,11 +5169,7 @@ name = "solana-log-analyzer" version = "1.10.12" dependencies = [ "byte-unit", -<<<<<<< HEAD "clap 2.34.0", -======= - "clap 3.1.8", ->>>>>>> 2c7699eb8 (banking-bench: Migrate to clap 3.1.8) "serde", "serde_json", "solana-logger 1.10.12", @@ -5210,9 +5178,9 @@ dependencies = [ [[package]] name = "solana-logger" -version = "1.10.10" +version = "1.10.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6aeaa4145cc77bbfab151a233b14e611a82747fd2eee611a52e07f582544d6" +checksum = "a8e3d5d0c4b4618c595382d7bfc239f457c3afef9b0b5343907579d67b2e27f7" dependencies = [ "env_logger", "lazy_static", @@ -5278,11 +5246,7 @@ dependencies = [ name = "solana-net-shaper" version = "1.10.12" dependencies = [ -<<<<<<< HEAD "clap 2.34.0", -======= - "clap 3.1.8", ->>>>>>> 2c7699eb8 (banking-bench: Migrate to clap 3.1.8) "rand 0.7.3", "serde", "serde_json", @@ -5294,11 +5258,7 @@ name = "solana-net-utils" version = "1.10.12" dependencies = [ "bincode", -<<<<<<< HEAD "clap 2.34.0", -======= - "clap 3.1.8", ->>>>>>> 2c7699eb8 (banking-bench: Migrate to clap 3.1.8) "crossbeam-channel", "log", "nix 0.23.1", @@ -5375,11 +5335,7 @@ dependencies = [ name = "solana-poh-bench" version = "1.10.12" dependencies = [ -<<<<<<< HEAD "clap 2.34.0", -======= - "clap 3.1.8", ->>>>>>> 2c7699eb8 (banking-bench: Migrate to clap 3.1.8) "log", "rand 0.7.3", "rayon", @@ -5393,9 +5349,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.10.10" +version = "1.10.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6425f7248eb69806ae5e8c193a5b7dcfc764516d2f0d354cdf80bacaf422a188" +checksum = "916b4dd6b0ca292d2a26e49a783d64b8649bad689646830dabc7139a77181495" dependencies = [ "base64 0.13.0", "bincode", @@ -5426,9 +5382,9 @@ dependencies = [ "serde_derive", "sha2 0.10.2", "sha3 0.10.1", - "solana-frozen-abi 1.10.10", - "solana-frozen-abi-macro 1.10.10", - "solana-sdk-macro 1.10.10", + "solana-frozen-abi 1.10.11", + "solana-frozen-abi-macro 1.10.11", + "solana-sdk-macro 1.10.11", "thiserror", "wasm-bindgen", ] @@ -5543,7 +5499,7 @@ dependencies = [ "num-traits", "parking_lot 0.12.0", "qstring", - "semver 1.0.7", + "semver 1.0.9", "solana-sdk 1.10.12", "thiserror", "uriparse", @@ -5733,9 +5689,9 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.10.10" +version = "1.10.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5ad83e1a502a53512e0e077fbaa76bf73b19e8789dc014c940077506e8fb7ac" +checksum = "3da42809f01bbdc3101f62995e45306006af27d142b12ed7a5bee2427c625a7b" dependencies = [ "assert_matches", "base64 0.13.0", @@ -5772,11 +5728,11 @@ dependencies = [ "serde_json", "sha2 0.10.2", "sha3 0.10.1", - "solana-frozen-abi 1.10.10", - "solana-frozen-abi-macro 1.10.10", - "solana-logger 1.10.10", - "solana-program 1.10.10", - "solana-sdk-macro 1.10.10", + "solana-frozen-abi 1.10.11", + "solana-frozen-abi-macro 1.10.11", + "solana-logger 1.10.11", + "solana-program 1.10.11", + "solana-sdk-macro 1.10.11", "thiserror", "uriparse", "wasm-bindgen", @@ -5836,15 +5792,15 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.10.10" +version = "1.10.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0e117d4d001f4f3c1e568979da52d76a75d814344c1debf9febd10b5a571993" +checksum = "92fa5b549316755f8c51767d9a51b0f96a62ea79a055e689304e1fbc0591e514" dependencies = [ "bs58", "proc-macro2 1.0.37", - "quote 1.0.10", + "quote 1.0.18", "rustversion", - "syn 1.0.91", + "syn 1.0.92", ] [[package]] @@ -5853,9 +5809,9 @@ version = "1.10.12" dependencies = [ "bs58", "proc-macro2 1.0.37", - "quote 1.0.10", + "quote 1.0.18", "rustversion", - "syn 1.0.91", + "syn 1.0.92", ] [[package]] @@ -6255,8 +6211,8 @@ dependencies = [ "serde", "serde_json", "sha3 0.9.1", - "solana-program 1.10.10", - "solana-sdk 1.10.10", + "solana-program 1.10.11", + "solana-sdk 1.10.11", "subtle", "thiserror", "zeroize", @@ -6338,7 +6294,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b013067447a1396303ddfc294f36e3d260a32f8a16c501c295bcdc7de39b490" dependencies = [ "borsh", - "solana-program 1.10.10", + "solana-program 1.10.11", "spl-token", ] @@ -6348,7 +6304,7 @@ version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0dc6f70db6bacea7ff25870b016a65ba1d1b6013536f08e4fd79a8f9005325" dependencies = [ - "solana-program 1.10.10", + "solana-program 1.10.11", ] [[package]] @@ -6361,7 +6317,7 @@ dependencies = [ "num-derive", "num-traits", "num_enum", - "solana-program 1.10.10", + "solana-program 1.10.11", "thiserror", ] @@ -6376,7 +6332,7 @@ dependencies = [ "num-derive", "num-traits", "num_enum", - "solana-program 1.10.10", + "solana-program 1.10.11", "solana-zk-token-sdk 0.8.1", "spl-memo", "spl-token", @@ -6425,10 +6381,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", + "quote 1.0.18", "serde", "serde_derive", - "syn 1.0.91", + "syn 1.0.92", ] [[package]] @@ -6439,12 +6395,12 @@ checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" dependencies = [ "base-x", "proc-macro2 1.0.37", - "quote 1.0.10", + "quote 1.0.18", "serde", "serde_derive", "serde_json", "sha1", - "syn 1.0.91", + "syn 1.0.92", ] [[package]] @@ -6501,13 +6457,13 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.91" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b683b2b825c8eef438b77c36a06dc262294da3d5a5813fac20da149241dcd44d" +checksum = "7ff7c592601f11445996a06f8ad0c27f094a58857c2f89e97974ab9235b92c52" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", - "unicode-xid 0.2.2", + "quote 1.0.18", + "unicode-xid 0.2.3", ] [[package]] @@ -6523,9 +6479,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", - "unicode-xid 0.2.2", + "quote 1.0.18", + "syn 1.0.92", + "unicode-xid 0.2.3", ] [[package]] @@ -6607,8 +6563,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee42b4e559f17bce0385ebf511a7beb67d5cc33c12c96b7f4e9789919d9c10f" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] @@ -6667,22 +6623,22 @@ checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" [[package]] name = "thiserror" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] @@ -6774,9 +6730,9 @@ checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" dependencies = [ "proc-macro-hack", "proc-macro2 1.0.37", - "quote 1.0.10", + "quote 1.0.18", "standback", - "syn 1.0.91", + "syn 1.0.92", ] [[package]] @@ -6815,9 +6771,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.17.0" +version = "1.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2af73ac49756f3f7c01172e34a23e5d0216f6c32333757c2c61feb2bbff5a5ee" +checksum = "dce653fb475565de9f6fb0614b28bca8df2c430c0cf84bcd9c843f15de5414cc" dependencies = [ "bytes", "libc", @@ -6850,8 +6806,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] @@ -6993,15 +6949,15 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d17087af5c80e5d5fc8ba9878e60258065a0a757e35efe7a05b7904bece1943" +checksum = "c03447cdc9eaf8feffb6412dcb27baf2db11669a6c4789f29da799aabfb99547" dependencies = [ "prettyplease", "proc-macro2 1.0.37", "prost-build", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] @@ -7026,9 +6982,9 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79dd37121c38240c4b4fe6520332406218bbf876f2f690fe9e406020189366fd" +checksum = "e980386f06883cf4d0578d6c9178c81f68b45d77d00f2c2c1bc034b3439c2c56" dependencies = [ "bitflags", "bytes", @@ -7070,13 +7026,13 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e65ce065b4b5c53e73bb28912318cb8c9e9ad3921f1d669eb0e68b4c8143a2b" +checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", ] [[package]] @@ -7206,9 +7162,9 @@ checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" [[package]] name = "unicode-xid" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" [[package]] name = "universal-hash" @@ -7397,8 +7353,8 @@ dependencies = [ "lazy_static", "log", "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", "wasm-bindgen-shared", ] @@ -7420,7 +7376,7 @@ version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17cae7ff784d7e83a2fe7611cfe766ecf034111b49deb850a3dc7699c08251f5" dependencies = [ - "quote 1.0.10", + "quote 1.0.18", "wasm-bindgen-macro-support", ] @@ -7431,8 +7387,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -7541,15 +7497,15 @@ dependencies = [ [[package]] name = "windows-sys" -version = "0.34.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5acdd78cb4ba54c0045ac14f62d8f94a03d10047904ae2a40afa1e99d8f70825" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" dependencies = [ - "windows_aarch64_msvc 0.34.0", - "windows_i686_gnu 0.34.0", - "windows_i686_msvc 0.34.0", - "windows_x86_64_gnu 0.34.0", - "windows_x86_64_msvc 0.34.0", + "windows_aarch64_msvc 0.36.1", + "windows_i686_gnu 0.36.1", + "windows_i686_msvc 0.36.1", + "windows_x86_64_gnu 0.36.1", + "windows_x86_64_msvc 0.36.1", ] [[package]] @@ -7560,9 +7516,9 @@ checksum = "29277a4435d642f775f63c7d1faeb927adba532886ce0287bd985bffb16b6bca" [[package]] name = "windows_aarch64_msvc" -version = "0.34.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" [[package]] name = "windows_i686_gnu" @@ -7572,9 +7528,9 @@ checksum = "1145e1989da93956c68d1864f32fb97c8f561a8f89a5125f6a2b7ea75524e4b8" [[package]] name = "windows_i686_gnu" -version = "0.34.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" [[package]] name = "windows_i686_msvc" @@ -7584,9 +7540,9 @@ checksum = "d4a09e3a0d4753b73019db171c1339cd4362c8c44baf1bcea336235e955954a6" [[package]] name = "windows_i686_msvc" -version = "0.34.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" [[package]] name = "windows_x86_64_gnu" @@ -7596,9 +7552,9 @@ checksum = "8ca64fcb0220d58db4c119e050e7af03c69e6f4f415ef69ec1773d9aab422d5a" [[package]] name = "windows_x86_64_gnu" -version = "0.34.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" [[package]] name = "windows_x86_64_msvc" @@ -7608,9 +7564,9 @@ checksum = "08cabc9f0066848fef4bc6a1c1668e6efce38b661d2aeec75d18d8617eebb5f1" [[package]] name = "windows_x86_64_msvc" -version = "0.34.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" [[package]] name = "winreg" @@ -7664,8 +7620,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17" dependencies = [ "proc-macro2 1.0.37", - "quote 1.0.10", - "syn 1.0.91", + "quote 1.0.18", + "syn 1.0.92", "synstructure", ] diff --git a/banking-bench/Cargo.toml b/banking-bench/Cargo.toml index 8c0626f5b1f995..f441fa0047d8ce 100644 --- a/banking-bench/Cargo.toml +++ b/banking-bench/Cargo.toml @@ -9,7 +9,7 @@ homepage = "https://solana.com/" publish = false [dependencies] -clap = "3.1.8" +clap = { version = "3.1.8", features = ["derive"] } crossbeam-channel = "0.5" log = "0.4.14" rand = "0.7.0" diff --git a/banking-bench/src/main.rs b/banking-bench/src/main.rs index 0bd919312ffdd8..05621784804aca 100644 --- a/banking-bench/src/main.rs +++ b/banking-bench/src/main.rs @@ -1,6 +1,6 @@ #![allow(clippy::integer_arithmetic)] use { - clap::{crate_description, crate_name, Arg, Command}, + clap::{crate_description, crate_name, Arg, ArgEnum, Command}, crossbeam_channel::{unbounded, Receiver}, log::*, rand::{thread_rng, Rng}, @@ -66,23 +66,55 @@ fn check_txs( no_bank } +#[derive(ArgEnum, Clone, Copy, PartialEq)] +enum WriteLockContention { + /// No transactions lock the same accounts. + None, + /// Transactions don't lock the same account, unless they belong to the same batch. + SameBatchOnly, + /// All transactions write lock the same account. + Full, +} + +impl WriteLockContention { + fn possible_values<'a>() -> impl Iterator> { + Self::value_variants() + .iter() + .filter_map(|v| v.to_possible_value()) + } +} + +impl std::str::FromStr for WriteLockContention { + type Err = String; + fn from_str(input: &str) -> Result { + ArgEnum::from_str(input, false) + } +} + fn make_accounts_txs( total_num_transactions: usize, + packets_per_batch: usize, hash: Hash, - same_payer: bool, + contention: WriteLockContention, ) -> Vec { - let to_pubkey = solana_sdk::pubkey::new_rand(); + use solana_sdk::pubkey; + let to_pubkey = pubkey::new_rand(); + let chunk_pubkeys: Vec = (0..total_num_transactions / packets_per_batch) + .map(|_| pubkey::new_rand()) + .collect(); let payer_key = Keypair::new(); let dummy = system_transaction::transfer(&payer_key, &to_pubkey, 1, hash); (0..total_num_transactions) .into_par_iter() - .map(|_| { + .map(|i| { let mut new = dummy.clone(); let sig: Vec = (0..64).map(|_| thread_rng().gen::()).collect(); - if !same_payer { - new.message.account_keys[0] = solana_sdk::pubkey::new_rand(); - } - new.message.account_keys[1] = solana_sdk::pubkey::new_rand(); + new.message.account_keys[0] = pubkey::new_rand(); + new.message.account_keys[1] = match contention { + WriteLockContention::None => pubkey::new_rand(), + WriteLockContention::SameBatchOnly => chunk_pubkeys[i / packets_per_batch], + WriteLockContention::Full => to_pubkey, + }; new.signatures = vec![Signature::new(&sig[0..64])]; new }) @@ -91,13 +123,11 @@ fn make_accounts_txs( struct Config { packets_per_batch: usize, - chunk_len: usize, - num_threads: usize, } impl Config { fn get_transactions_index(&self, chunk_index: usize) -> usize { - chunk_index * (self.chunk_len / self.num_threads) * self.packets_per_batch + chunk_index * self.packets_per_batch } } @@ -120,11 +150,11 @@ fn main() { .help("Number of transaction chunks."), ) .arg( - Arg::new("packets_per_chunk") - .long("packets-per-chunk") + Arg::new("packets_per_batch") + .long("packets-per-batch") .takes_value(true) .value_name("SIZE") - .help("Packets per chunk"), + .help("Packets per batch"), ) .arg( Arg::new("skip_sanity") @@ -133,10 +163,11 @@ fn main() { .help("Skip transaction sanity execution"), ) .arg( - Arg::new("same_payer") - .long("same-payer") - .takes_value(false) - .help("Use the same payer for transfers"), + Arg::new("write_lock_contention") + .long("write-lock-contention") + .takes_value(true) + .possible_values(WriteLockContention::possible_values()) + .help("Accounts that test transactions write lock"), ) .arg( Arg::new("iterations") @@ -145,24 +176,36 @@ fn main() { .help("Number of iterations"), ) .arg( - Arg::new("num_threads") - .long("num-threads") + Arg::new("batches_per_iteration") + .long("batches-per-iteration") .takes_value(true) - .help("Number of iterations"), + .help("Number of batches to send in each iteration"), + ) + .arg( + Arg::new("num_banking_threads") + .long("num-banking-threads") + .takes_value(true) + .help("Number of threads to use in the banking stage"), ) .get_matches(); - let num_threads = matches - .value_of_t::("num_threads") - .unwrap_or(BankingStage::num_threads() as usize); + let num_banking_threads = matches + .value_of_t::("num_banking_threads") + .unwrap_or_else(|_| BankingStage::num_threads()); // a multiple of packet chunk duplicates to avoid races let num_chunks = matches.value_of_t::("num_chunks").unwrap_or(16); - let packets_per_chunk = matches - .value_of_t::("packets_per_chunk") + let packets_per_batch = matches + .value_of_t::("packets_per_batch") .unwrap_or(192); let iterations = matches.value_of_t::("iterations").unwrap_or(1000); + let batches_per_iteration = matches + .value_of_t::("batches_per_iteration") + .unwrap_or(BankingStage::num_threads() as usize); + let write_lock_contention = matches + .value_of_t::("write_lock_contention") + .unwrap_or(WriteLockContention::None); - let total_num_transactions = num_chunks * num_threads * packets_per_chunk; + let total_num_transactions = num_chunks * packets_per_batch * batches_per_iteration; let mint_total = 1_000_000_000_000; let GenesisConfigInfo { genesis_config, @@ -183,11 +226,17 @@ fn main() { .unwrap() .set_limits(std::u64::MAX, std::u64::MAX, std::u64::MAX); - info!("threads: {} txs: {}", num_threads, total_num_transactions); + info!( + "threads: {} txs: {}", + num_banking_threads, total_num_transactions + ); - let same_payer = matches.is_present("same_payer"); - let mut transactions = - make_accounts_txs(total_num_transactions, genesis_config.hash(), same_payer); + let mut transactions = make_accounts_txs( + total_num_transactions, + packets_per_batch, + genesis_config.hash(), + write_lock_contention, + ); // fund all the accounts transactions.iter().for_each(|tx| { @@ -212,16 +261,20 @@ fn main() { assert!(res.is_ok(), "sanity test transactions error: {:?}", res); }); bank.clear_signatures(); - //sanity check, make sure all the transactions can execute in parallel - let res = bank.process_transactions(transactions.iter()); - for r in res { - assert!(r.is_ok(), "sanity parallel execution error: {:?}", r); + if write_lock_contention == WriteLockContention::None { + //sanity check, make sure all the transactions can execute in parallel + let res = bank.process_transactions(transactions.iter()); + for r in res { + assert!(r.is_ok(), "sanity parallel execution error: {:?}", r); + } + bank.clear_signatures(); } - bank.clear_signatures(); } - let mut verified: Vec<_> = to_packet_batches(&transactions, packets_per_chunk); + let mut verified: Vec<_> = to_packet_batches(&transactions, packets_per_batch); + assert_eq!(verified.len(), num_chunks * batches_per_iteration); + let ledger_path = get_tmp_ledger_path!(); { let blockstore = Arc::new( @@ -240,19 +293,20 @@ fn main() { SocketAddrSpace::Unspecified, ); let cluster_info = Arc::new(cluster_info); - let banking_stage = BankingStage::new( + let banking_stage = BankingStage::new_num_threads( &cluster_info, &poh_recorder, verified_receiver, tpu_vote_receiver, vote_receiver, + num_banking_threads, None, replay_vote_sender, Arc::new(RwLock::new(CostModel::default())), ); poh_recorder.lock().unwrap().set_bank(&bank); - let chunk_len = verified.len() / num_chunks; + let chunk_len = batches_per_iteration; let mut start = 0; // This is so that the signal_receiver does not go out of scope after the closure. @@ -265,20 +319,13 @@ fn main() { let mut txs_processed = 0; let mut root = 1; let collector = solana_sdk::pubkey::new_rand(); - let config = Config { - packets_per_batch: packets_per_chunk, - chunk_len, - num_threads, - }; + let config = Config { packets_per_batch }; let mut total_sent = 0; for _ in 0..iterations { let now = Instant::now(); let mut sent = 0; - for (i, v) in verified[start..start + chunk_len] - .chunks(chunk_len / num_threads) - .enumerate() - { + for (i, v) in verified[start..start + chunk_len].chunks(1).enumerate() { let mut byte = 0; let index = config.get_transactions_index(start + i); if index < transactions.len() { @@ -386,7 +433,7 @@ fn main() { let sig: Vec = (0..64).map(|_| thread_rng().gen::()).collect(); tx.signatures[0] = Signature::new(&sig[0..64]); } - verified = to_packet_batches(&transactions.clone(), packets_per_chunk); + verified = to_packet_batches(&transactions.clone(), packets_per_batch); } start += chunk_len; diff --git a/core/src/banking_stage.rs b/core/src/banking_stage.rs index 7441e371a44745..2185a314d78e08 100644 --- a/core/src/banking_stage.rs +++ b/core/src/banking_stage.rs @@ -409,7 +409,7 @@ impl BankingStage { } #[allow(clippy::too_many_arguments)] - fn new_num_threads( + pub fn new_num_threads( cluster_info: &Arc, poh_recorder: &Arc>, verified_receiver: CrossbeamReceiver>,