From 3dcd7d560ec3f69e88baefe6b767b93e270204fd Mon Sep 17 00:00:00 2001 From: Guillaume Thiolliere Date: Thu, 14 Nov 2024 11:27:00 +0900 Subject: [PATCH 1/6] Fix staking benchmark (#6463) Found by @ggwpez Fix staking benchmark, error was introduced when migrating to v2: https://github.com/paritytech/polkadot-sdk/pull/6025 --------- Co-authored-by: GitHub Action (cherry picked from commit a1af8ed63668fc4a553776e381a12d165e7462f8) --- prdoc/pr_6463.prdoc | 8 ++++++++ substrate/frame/staking/src/benchmarking.rs | 20 +++++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 prdoc/pr_6463.prdoc diff --git a/prdoc/pr_6463.prdoc b/prdoc/pr_6463.prdoc new file mode 100644 index 000000000000..9c4787540a49 --- /dev/null +++ b/prdoc/pr_6463.prdoc @@ -0,0 +1,8 @@ +title: Fix staking benchmark +doc: +- audience: Runtime Dev + description: 'Fix staking benchmark, error was introduced when migrating to v2: + https://github.com/paritytech/polkadot-sdk/pull/6025' +crates: +- name: pallet-staking + bump: patch diff --git a/substrate/frame/staking/src/benchmarking.rs b/substrate/frame/staking/src/benchmarking.rs index 96bd3860542f..905f830f91d7 100644 --- a/substrate/frame/staking/src/benchmarking.rs +++ b/substrate/frame/staking/src/benchmarking.rs @@ -975,20 +975,22 @@ mod benchmarks { ) -> Result<(), BenchmarkError> { // number of nominator intention. let n = MaxNominators::::get(); + create_validators_with_nominators_for_era::( + v, + n, + MaxNominationsOf::::get() as usize, + false, + None, + )?; + + let targets; #[block] { - create_validators_with_nominators_for_era::( - v, - n, - MaxNominationsOf::::get() as usize, - false, - None, - )?; + // default bounds are unbounded. + targets = >::get_npos_targets(DataProviderBounds::default()); } - // default bounds are unbounded. - let targets = >::get_npos_targets(DataProviderBounds::default()); assert_eq!(targets.len() as u32, v); Ok(()) From 090676f32bf9b571357cf4098c0428df9d08d593 Mon Sep 17 00:00:00 2001 From: gui Date: Thu, 14 Nov 2024 12:52:16 +0900 Subject: [PATCH 2/6] prdoc --- prdoc/{pr_6463.prdoc => pr_6475.prdoc} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename prdoc/{pr_6463.prdoc => pr_6475.prdoc} (100%) diff --git a/prdoc/pr_6463.prdoc b/prdoc/pr_6475.prdoc similarity index 100% rename from prdoc/pr_6463.prdoc rename to prdoc/pr_6475.prdoc From 6a7e71d29d10fc0b5b9f5e85c0325d0e92bd5c62 Mon Sep 17 00:00:00 2001 From: gui Date: Tue, 3 Dec 2024 13:32:45 +0900 Subject: [PATCH 3/6] trigger CI --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6c0dfbb2e7e4..a522d0923c9c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +
![SDK Logo](./docs/images/Polkadot_Logo_Horizontal_Pink_White.png#gh-dark-mode-only) From 1878a779279c051922d1bac600352b47c07ce80d Mon Sep 17 00:00:00 2001 From: gui Date: Tue, 3 Dec 2024 13:32:58 +0900 Subject: [PATCH 4/6] Revert "trigger CI" This reverts commit 6a7e71d29d10fc0b5b9f5e85c0325d0e92bd5c62. --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index a522d0923c9c..6c0dfbb2e7e4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ -
![SDK Logo](./docs/images/Polkadot_Logo_Horizontal_Pink_White.png#gh-dark-mode-only) From 64d1e327f2a1d2a6ae05b272a1c12601c5956e4a Mon Sep 17 00:00:00 2001 From: gui Date: Thu, 5 Dec 2024 08:54:34 +0900 Subject: [PATCH 5/6] disable 0017-sync-backing test --- .gitlab/pipeline/zombienet/polkadot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/pipeline/zombienet/polkadot.yml b/.gitlab/pipeline/zombienet/polkadot.yml index 3dab49a118e5..ec0034597c7c 100644 --- a/.gitlab/pipeline/zombienet/polkadot.yml +++ b/.gitlab/pipeline/zombienet/polkadot.yml @@ -233,7 +233,7 @@ zombienet-polkadot-functional-0015-coretime-shared-core: --local-dir="${LOCAL_DIR}/functional" --test="0016-approval-voting-parallel.zndsl" -zombienet-polkadot-functional-0017-sync-backing: +.zombienet-polkadot-functional-0017-sync-backing: extends: - .zombienet-polkadot-common script: From e4dad85a618376e485ac705305c4ff002029eb95 Mon Sep 17 00:00:00 2001 From: gui Date: Thu, 5 Dec 2024 08:57:14 +0900 Subject: [PATCH 6/6] disable test: zombienet-polkadot-elastic-scaling-0002-elastic-scaling-doesnt-break-parachains --- .gitlab/pipeline/zombienet/polkadot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/pipeline/zombienet/polkadot.yml b/.gitlab/pipeline/zombienet/polkadot.yml index ec0034597c7c..ac4bdac7ad15 100644 --- a/.gitlab/pipeline/zombienet/polkadot.yml +++ b/.gitlab/pipeline/zombienet/polkadot.yml @@ -179,7 +179,7 @@ zombienet-polkadot-elastic-scaling-0001-basic-3cores-6s-blocks: --local-dir="${LOCAL_DIR}/elastic_scaling" --test="0001-basic-3cores-6s-blocks.zndsl" -zombienet-polkadot-elastic-scaling-0002-elastic-scaling-doesnt-break-parachains: +.zombienet-polkadot-elastic-scaling-0002-elastic-scaling-doesnt-break-parachains: extends: - .zombienet-polkadot-common before_script: