Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Audit fixes for election/staking decoupling part 2 #8167

Merged
merged 79 commits into from
Mar 16, 2021

Conversation

kianenigma
Copy link
Contributor

@kianenigma kianenigma commented Feb 21, 2021

Audit fixes for #7909

Mitigates https://github.com/paritytech/srlabs_findings/issues/59 and partially enhances https://github.com/paritytech/srlabs_findings/issues/57. fixes #8246

polkadot companion: paritytech/polkadot#2622

  • operations from ElectionDataProvider now return some accurate weight. This does not yet fix the underlying issue, but is a step in the right direction. A separate PR is needed to hopefully remove the need to iterate over the slashing spans.
  • ensures that if the number of voters and targets are more than what we desire, the data provider returns an error, so in such cases we fallback to the onchain election. This prevents biased solutions to be created.

kianenigma and others added 30 commits January 15, 2021 13:19
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
…om:paritytech/substrate into kiz-election-provider-2-two-phase-unsigned
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
…om:paritytech/substrate into kiz-election-provider-2-two-phase-unsigned
…/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs
…om:paritytech/substrate into kiz-election-provider-2-two-phase-unsigned
@kianenigma
Copy link
Contributor Author

/benchmark runtime pallet pallet_staking

@kianenigma
Copy link
Contributor Author

/benchmark runtime pallet pallet_election_provider_multi_phase

@parity-benchapp
Copy link

parity-benchapp bot commented Mar 14, 2021

Finished benchmark for branch: kiz-election-provider-2-audit

Benchmark: Benchmark Runtime Pallet

cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs

Results

Pallet: "pallet_election_provider_multi_phase", Extrinsic: "on_initialize_nothing", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 22.83
µs

Reads = 7
Writes = 0
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 22.83
µs

Reads = 7
Writes = 0
Pallet: "pallet_election_provider_multi_phase", Extrinsic: "on_initialize_open_signed", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 106.9
µs

Reads = 8
Writes = 4
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 106.9
µs

Reads = 8
Writes = 4
Pallet: "pallet_election_provider_multi_phase", Extrinsic: "on_initialize_open_unsigned_with_snapshot", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 106.4
µs

Reads = 8
Writes = 4
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 106.4
µs

Reads = 8
Writes = 4
Pallet: "pallet_election_provider_multi_phase", Extrinsic: "on_initialize_open_unsigned_without_snapshot", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 21.27
µs

Reads = 1
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 21.27
µs

Reads = 1
Writes = 1
Pallet: "pallet_election_provider_multi_phase", Extrinsic: "elect_queued", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 7274
µs

Reads = 2
Writes = 6
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 7274
µs

Reads = 2
Writes = 6
Pallet: "pallet_election_provider_multi_phase", Extrinsic: "submit_unsigned", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 0
+ v 3.982
+ t 0.299
+ a 12.54
+ d 7.197
µs

Reads = 6 + (0 * v) + (0 * t) + (0 * a) + (0 * d)
Writes = 1 + (0 * v) + (0 * t) + (0 * a) + (0 * d)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
v t a d mean µs sigma µs %
4000 1600 3000 800 55670 119.1 0.2%
4040 1600 3000 800 55860 101 0.1%
4080 1600 3000 800 56080 86.47 0.1%
4120 1600 3000 800 56290 99.54 0.1%
4160 1600 3000 800 56550 116.8 0.2%
4200 1600 3000 800 56500 138.3 0.2%
4240 1600 3000 800 56610 92.85 0.1%
4280 1600 3000 800 56870 105.3 0.1%
4320 1600 3000 800 56920 93.43 0.1%
4360 1600 3000 800 57130 53.86 0.0%
4400 1600 3000 800 57270 83.96 0.1%
4440 1600 3000 800 57460 98.52 0.1%
4480 1600 3000 800 57610 73.68 0.1%
4520 1600 3000 800 57690 115.6 0.2%
4560 1600 3000 800 57880 87.46 0.1%
4600 1600 3000 800 58110 82.95 0.1%
4640 1600 3000 800 58160 103.8 0.1%
4680 1600 3000 800 58370 135.8 0.2%
4720 1600 3000 800 58510 117.4 0.2%
4760 1600 3000 800 58690 109.7 0.1%
4800 1600 3000 800 58710 81.16 0.1%
4840 1600 3000 800 58900 110.1 0.1%
4880 1600 3000 800 59140 80.4 0.1%
4920 1600 3000 800 59330 92.62 0.1%
4960 1600 3000 800 59370 95.08 0.1%
5000 1600 3000 800 59570 55.46 0.0%
5040 1600 3000 800 59750 125.6 0.2%
5080 1600 3000 800 59960 101.1 0.1%
5120 1600 3000 800 60020 98.91 0.1%
5160 1600 3000 800 60280 63.9 0.1%
5200 1600 3000 800 60380 105.7 0.1%
5240 1600 3000 800 60550 71.72 0.1%
5280 1600 3000 800 60670 120.3 0.1%
5320 1600 3000 800 60860 141.9 0.2%
5360 1600 3000 800 61030 43.32 0.0%
5400 1600 3000 800 61270 112.2 0.1%
5440 1600 3000 800 61460 148.2 0.2%
5480 1600 3000 800 61650 50.51 0.0%
5520 1600 3000 800 61710 103.3 0.1%
5560 1600 3000 800 61880 93.07 0.1%
5600 1600 3000 800 61980 89.89 0.1%
5640 1600 3000 800 62220 77.92 0.1%
5680 1600 3000 800 62300 78.95 0.1%
5720 1600 3000 800 62530 131.4 0.2%
5760 1600 3000 800 62620 90.8 0.1%
5800 1600 3000 800 62710 100.8 0.1%
5840 1600 3000 800 62950 110.5 0.1%
5880 1600 3000 800 63140 137.4 0.2%
5920 1600 3000 800 63270 144.2 0.2%
5960 1600 3000 800 63420 162.3 0.2%
6000 1000 3000 800 63710 70.27 0.1%
6000 1012 3000 800 63580 123.7 0.1%
6000 1024 3000 800 63620 77.37 0.1%
6000 1036 3000 800 63580 87.22 0.1%
6000 1048 3000 800 63580 105.9 0.1%
6000 1060 3000 800 63600 122.4 0.1%
6000 1072 3000 800 63660 64.15 0.1%
6000 1084 3000 800 63640 88.85 0.1%
6000 1096 3000 800 63650 116.1 0.1%
6000 1108 3000 800 63510 93.87 0.1%
6000 1120 3000 800 63580 162.8 0.2%
6000 1132 3000 800 63600 111.8 0.1%
6000 1144 3000 800 63720 84.63 0.1%
6000 1156 3000 800 63630 108 0.1%
6000 1168 3000 800 63620 73.63 0.1%
6000 1180 3000 800 63500 56.49 0.0%
6000 1192 3000 800 63500 67.94 0.1%
6000 1204 3000 800 63640 64.34 0.1%
6000 1216 3000 800 63710 139.7 0.2%
6000 1228 3000 800 63580 67.23 0.1%
6000 1240 3000 800 63610 120.2 0.1%
6000 1252 3000 800 63610 72.3 0.1%
6000 1264 3000 800 63660 90.47 0.1%
6000 1276 3000 800 63780 136 0.2%
6000 1288 3000 800 63550 92.18 0.1%
6000 1300 3000 800 63650 120.8 0.1%
6000 1312 3000 800 63620 127.9 0.2%
6000 1324 3000 800 63690 98.09 0.1%
6000 1336 3000 800 63690 113.2 0.1%
6000 1348 3000 800 63540 79.28 0.1%
6000 1360 3000 800 63700 76.75 0.1%
6000 1372 3000 800 63610 80.51 0.1%
6000 1384 3000 800 63620 83.72 0.1%
6000 1396 3000 800 63720 105.8 0.1%
6000 1408 3000 800 63850 106.5 0.1%
6000 1420 3000 800 63680 117.4 0.1%
6000 1432 3000 800 63720 108.8 0.1%
6000 1444 3000 800 63650 48.95 0.0%
6000 1456 3000 800 63640 129.9 0.2%
6000 1468 3000 800 63620 103 0.1%
6000 1480 3000 800 63540 61.91 0.0%
6000 1492 3000 800 63700 73.41 0.1%
6000 1504 3000 800 63720 122.9 0.1%
6000 1516 3000 800 63680 76.55 0.1%
6000 1528 3000 800 63850 150.2 0.2%
6000 1540 3000 800 63630 132.3 0.2%
6000 1552 3000 800 63740 49.45 0.0%
6000 1564 3000 800 63750 88.04 0.1%
6000 1576 3000 800 63700 115.6 0.1%
6000 1588 3000 800 63740 122.6 0.1%
6000 1600 1000 800 37770 75.34 0.1%
6000 1600 1040 800 38280 69.43 0.1%
6000 1600 1080 800 38720 72.8 0.1%
6000 1600 1120 800 39130 58.59 0.1%
6000 1600 1160 800 39650 57.88 0.1%
6000 1600 1200 800 40140 61.14 0.1%
6000 1600 1240 800 40540 101.7 0.2%
6000 1600 1280 800 41020 39.21 0.0%
6000 1600 1320 800 41470 43.7 0.1%
6000 1600 1360 800 41980 45.81 0.1%
6000 1600 1400 800 43340 83.16 0.1%
6000 1600 1440 800 43820 84.81 0.1%
6000 1600 1480 800 44350 67.36 0.1%
6000 1600 1520 800 44800 75.42 0.1%
6000 1600 1560 800 45310 74.73 0.1%
6000 1600 1600 800 45820 58.19 0.1%
6000 1600 1640 800 46330 72.67 0.1%
6000 1600 1680 800 46790 46.5 0.0%
6000 1600 1720 800 47310 75.2 0.1%
6000 1600 1760 800 47800 73.01 0.1%
6000 1600 1800 800 48170 43.09 0.0%
6000 1600 1840 800 48730 71.64 0.1%
6000 1600 1880 800 49170 80.76 0.1%
6000 1600 1920 800 49720 80.36 0.1%
6000 1600 1960 800 50130 86.11 0.1%
6000 1600 2000 800 50660 64.64 0.1%
6000 1600 2040 800 51120 101.3 0.1%
6000 1600 2080 800 51730 52.73 0.1%
6000 1600 2120 800 52130 83.9 0.1%
6000 1600 2160 800 52480 49.96 0.0%
6000 1600 2200 800 52970 80.59 0.1%
6000 1600 2240 800 53330 108.7 0.2%
6000 1600 2280 800 53790 30.3 0.0%
6000 1600 2320 800 54220 122.9 0.2%
6000 1600 2360 800 54730 51.9 0.0%
6000 1600 2400 800 55220 63.08 0.1%
6000 1600 2440 800 55640 70.43 0.1%
6000 1600 2480 800 55990 84.55 0.1%
6000 1600 2520 800 56410 72.86 0.1%
6000 1600 2560 800 56990 96.86 0.1%
6000 1600 2600 800 57400 47.96 0.0%
6000 1600 2640 800 57750 77.39 0.1%
6000 1600 2680 800 58390 52.38 0.0%
6000 1600 2720 800 58710 98.4 0.1%
6000 1600 2760 800 59910 963.7 1.6%
6000 1600 2800 800 59810 100.8 0.1%
6000 1600 2840 800 60110 36.41 0.0%
6000 1600 2880 800 62370 64.2 0.1%
6000 1600 2920 800 62920 56.06 0.0%
6000 1600 2960 800 63360 77.91 0.1%
6000 1600 3000 400 61500 100.2 0.1%
6000 1600 3000 408 61240 83.98 0.1%
6000 1600 3000 416 61260 109.1 0.1%
6000 1600 3000 424 61250 77.35 0.1%
6000 1600 3000 432 61450 50.81 0.0%
6000 1600 3000 440 61460 68.27 0.1%
6000 1600 3000 448 61560 72.88 0.1%
6000 1600 3000 456 61710 69.37 0.1%
6000 1600 3000 464 61890 111.5 0.1%
6000 1600 3000 472 61760 99.26 0.1%
6000 1600 3000 480 61920 76.89 0.1%
6000 1600 3000 488 62030 81.17 0.1%
6000 1600 3000 496 62140 58.78 0.0%
6000 1600 3000 504 62260 72.21 0.1%
6000 1600 3000 512 62390 38.37 0.0%
6000 1600 3000 520 62500 85.52 0.1%
6000 1600 3000 528 62530 60.47 0.0%
6000 1600 3000 536 62560 76.18 0.1%
6000 1600 3000 544 62740 77.36 0.1%
6000 1600 3000 552 62730 87.01 0.1%
6000 1600 3000 560 62900 96.53 0.1%
6000 1600 3000 568 62950 90.31 0.1%
6000 1600 3000 576 63050 74.11 0.1%
6000 1600 3000 584 63110 80.22 0.1%
6000 1600 3000 592 63280 113.1 0.1%
6000 1600 3000 600 63220 57.37 0.0%
6000 1600 3000 608 63440 72.95 0.1%
6000 1600 3000 616 63410 74.4 0.1%
6000 1600 3000 624 63460 100.8 0.1%
6000 1600 3000 632 63470 115.3 0.1%
6000 1600 3000 640 63640 27.23 0.0%
6000 1600 3000 648 63620 74.44 0.1%
6000 1600 3000 656 63650 69.33 0.1%
6000 1600 3000 664 63680 79.2 0.1%
6000 1600 3000 672 63840 70.02 0.1%
6000 1600 3000 680 63770 57.22 0.0%
6000 1600 3000 688 63870 51.57 0.0%
6000 1600 3000 696 63890 86.7 0.1%
6000 1600 3000 704 63870 74.42 0.1%
6000 1600 3000 712 63720 90.31 0.1%
6000 1600 3000 720 63910 102 0.1%
6000 1600 3000 728 63810 76.62 0.1%
6000 1600 3000 736 63910 85.26 0.1%
6000 1600 3000 744 63940 90.15 0.1%
6000 1600 3000 752 63850 47.4 0.0%
6000 1600 3000 760 63900 86.16 0.1%
6000 1600 3000 768 63830 102.8 0.1%
6000 1600 3000 776 63820 69.84 0.1%
6000 1600 3000 784 63970 76.42 0.1%
6000 1600 3000 792 63980 91.43 0.1%
6000 1600 3000 800 63870 94.38 0.1%

Quality and confidence:
param error
v 0.019
t 0.066
a 0.019
d 0.099

Model:
Time ~= 0
+ v 4.017
+ t 0.13
+ a 13.05
+ d 4.558
µs

Reads = 6 + (0 * v) + (0 * t) + (0 * a) + (0 * d)
Writes = 1 + (0 * v) + (0 * t) + (0 * a) + (0 * d)
Pallet: "pallet_election_provider_multi_phase", Extrinsic: "feasibility_check", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 0
+ v 3.98
+ t 0.369
+ a 9.772
+ d 5.857
µs

Reads = 3 + (0 * v) + (0 * t) + (0 * a) + (0 * d)
Writes = 0 + (0 * v) + (0 * t) + (0 * a) + (0 * d)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
v t a d mean µs sigma µs %
4000 1600 3000 800 45990 33.97 0.0%
4040 1600 3000 800 46130 59.11 0.1%
4080 1600 3000 800 46290 84.72 0.1%
4120 1600 3000 800 46420 55.53 0.1%
4160 1600 3000 800 46590 44.09 0.0%
4200 1600 3000 800 46720 66.48 0.1%
4240 1600 3000 800 46950 32.62 0.0%
4280 1600 3000 800 47100 63.25 0.1%
4320 1600 3000 800 47220 52.11 0.1%
4360 1600 3000 800 47310 35.33 0.0%
4400 1600 3000 800 47570 46.66 0.0%
4440 1600 3000 800 47740 54.79 0.1%
4480 1600 3000 800 47840 58.31 0.1%
4520 1600 3000 800 48000 91.54 0.1%
4560 1600 3000 800 48330 89.1 0.1%
4600 1600 3000 800 48250 63.98 0.1%
4640 1600 3000 800 48410 30.57 0.0%
4680 1600 3000 800 48550 71.12 0.1%
4720 1600 3000 800 48830 52.03 0.1%
4760 1600 3000 800 48990 35.34 0.0%
4800 1600 3000 800 49130 33.23 0.0%
4840 1600 3000 800 49210 55.96 0.1%
4880 1600 3000 800 49500 80.93 0.1%
4920 1600 3000 800 49620 55.32 0.1%
4960 1600 3000 800 49710 39.65 0.0%
5000 1600 3000 800 49900 60.66 0.1%
5040 1600 3000 800 50060 73.61 0.1%
5080 1600 3000 800 50160 70.22 0.1%
5120 1600 3000 800 50350 57.87 0.1%
5160 1600 3000 800 50560 67.28 0.1%
5200 1600 3000 800 50630 117.3 0.2%
5240 1600 3000 800 50780 62.85 0.1%
5280 1600 3000 800 51010 65.81 0.1%
5320 1600 3000 800 51210 70.55 0.1%
5360 1600 3000 800 51250 50.43 0.0%
5400 1600 3000 800 51500 41.18 0.0%
5440 1600 3000 800 51690 53.02 0.1%
5480 1600 3000 800 51850 71.3 0.1%
5520 1600 3000 800 51990 66.57 0.1%
5560 1600 3000 800 52070 61.8 0.1%
5600 1600 3000 800 52240 57.5 0.1%
5640 1600 3000 800 52440 76.47 0.1%
5680 1600 3000 800 52600 48.33 0.0%
5720 1600 3000 800 52750 66.6 0.1%
5760 1600 3000 800 52950 109.6 0.2%
5800 1600 3000 800 53140 23.66 0.0%
5840 1600 3000 800 53210 74.99 0.1%
5880 1600 3000 800 53400 47.16 0.0%
5920 1600 3000 800 53420 101.4 0.1%
5960 1600 3000 800 53720 65.76 0.1%
6000 1000 3000 800 53790 66.52 0.1%
6000 1012 3000 800 53700 51.96 0.0%
6000 1024 3000 800 53850 100.1 0.1%
6000 1036 3000 800 53770 66.82 0.1%
6000 1048 3000 800 53780 86.49 0.1%
6000 1060 3000 800 53870 107.8 0.2%
6000 1072 3000 800 53780 90.26 0.1%
6000 1084 3000 800 53850 108.9 0.2%
6000 1096 3000 800 53800 89.15 0.1%
6000 1108 3000 800 53840 96.45 0.1%
6000 1120 3000 800 54060 178.8 0.3%
6000 1132 3000 800 53890 106.4 0.1%
6000 1144 3000 800 53860 86.92 0.1%
6000 1156 3000 800 53870 55.14 0.1%
6000 1168 3000 800 53750 103.2 0.1%
6000 1180 3000 800 53820 41.17 0.0%
6000 1192 3000 800 53730 92.59 0.1%
6000 1204 3000 800 53930 103.8 0.1%
6000 1216 3000 800 53880 92.24 0.1%
6000 1228 3000 800 53920 78.71 0.1%
6000 1240 3000 800 53770 56.22 0.1%
6000 1252 3000 800 53870 61.41 0.1%
6000 1264 3000 800 53980 50.01 0.0%
6000 1276 3000 800 53940 76.45 0.1%
6000 1288 3000 800 53930 81.28 0.1%
6000 1300 3000 800 53770 72.26 0.1%
6000 1312 3000 800 53870 105.5 0.1%
6000 1324 3000 800 53930 60.84 0.1%
6000 1336 3000 800 53920 54.9 0.1%
6000 1348 3000 800 53870 67.34 0.1%
6000 1360 3000 800 53880 55.4 0.1%
6000 1372 3000 800 53820 67.89 0.1%
6000 1384 3000 800 53800 99.68 0.1%
6000 1396 3000 800 53920 90.38 0.1%
6000 1408 3000 800 53980 86.15 0.1%
6000 1420 3000 800 53750 110.1 0.2%
6000 1432 3000 800 53780 30.86 0.0%
6000 1444 3000 800 53890 73.21 0.1%
6000 1456 3000 800 53890 56.62 0.1%
6000 1468 3000 800 53970 50.97 0.0%
6000 1480 3000 800 53860 98.96 0.1%
6000 1492 3000 800 53890 77.8 0.1%
6000 1504 3000 800 53950 96.3 0.1%
6000 1516 3000 800 53910 84.52 0.1%
6000 1528 3000 800 53940 70.37 0.1%
6000 1540 3000 800 53870 114.3 0.2%
6000 1552 3000 800 53990 100.3 0.1%
6000 1564 3000 800 54150 46.42 0.0%
6000 1576 3000 800 54000 86.6 0.1%
6000 1588 3000 800 54130 64.83 0.1%
6000 1600 1000 800 34400 97.72 0.2%
6000 1600 1040 800 34850 82.03 0.2%
6000 1600 1080 800 35220 92.87 0.2%
6000 1600 1120 800 35690 64.52 0.1%
6000 1600 1160 800 36040 68.55 0.1%
6000 1600 1200 800 36360 61.92 0.1%
6000 1600 1240 800 36830 83.45 0.2%
6000 1600 1280 800 37240 47.84 0.1%
6000 1600 1320 800 37510 124 0.3%
6000 1600 1360 800 37910 89.98 0.2%
6000 1600 1400 800 38170 65.93 0.1%
6000 1600 1440 800 38760 137.8 0.3%
6000 1600 1480 800 39150 71.58 0.1%
6000 1600 1520 800 39670 54.32 0.1%
6000 1600 1560 800 40100 81.13 0.2%
6000 1600 1600 800 40470 109.7 0.2%
6000 1600 1640 800 41090 68.73 0.1%
6000 1600 1680 800 41300 68.42 0.1%
6000 1600 1720 800 41720 79.26 0.1%
6000 1600 1760 800 42170 68.34 0.1%
6000 1600 1800 800 42610 78.06 0.1%
6000 1600 1840 800 43050 72.65 0.1%
6000 1600 1880 800 43420 65.47 0.1%
6000 1600 1920 800 43890 36.24 0.0%
6000 1600 1960 800 44200 118.1 0.2%
6000 1600 2000 800 44610 84.48 0.1%
6000 1600 2040 800 44940 87.29 0.1%
6000 1600 2080 800 45410 83.96 0.1%
6000 1600 2120 800 45810 99.86 0.2%
6000 1600 2160 800 46050 93.7 0.2%
6000 1600 2200 800 46490 74.14 0.1%
6000 1600 2240 800 46910 63.87 0.1%
6000 1600 2280 800 47170 80.9 0.1%
6000 1600 2320 800 47540 80.18 0.1%
6000 1600 2360 800 47950 101.5 0.2%
6000 1600 2400 800 48370 57.45 0.1%
6000 1600 2440 800 48650 59.98 0.1%
6000 1600 2480 800 48990 91.5 0.1%
6000 1600 2520 800 49360 71.96 0.1%
6000 1600 2560 800 49690 76.65 0.1%
6000 1600 2600 800 50150 110.4 0.2%
6000 1600 2640 800 50480 83.53 0.1%
6000 1600 2680 800 50870 71.99 0.1%
6000 1600 2720 800 51280 50.88 0.0%
6000 1600 2760 800 51600 100.2 0.1%
6000 1600 2800 800 51960 64.82 0.1%
6000 1600 2840 800 52450 52.3 0.0%
6000 1600 2880 800 52800 123.6 0.2%
6000 1600 2920 800 53300 104.4 0.1%
6000 1600 2960 800 53690 70.11 0.1%
6000 1600 3000 400 52170 73.55 0.1%
6000 1600 3000 408 52090 75.92 0.1%
6000 1600 3000 416 52040 37.03 0.0%
6000 1600 3000 424 52180 94.03 0.1%
6000 1600 3000 432 52190 57.57 0.1%
6000 1600 3000 440 52120 80.2 0.1%
6000 1600 3000 448 52330 68.07 0.1%
6000 1600 3000 456 52370 104 0.1%
6000 1600 3000 464 52520 90.8 0.1%
6000 1600 3000 472 52390 104.3 0.1%
6000 1600 3000 480 52650 111.5 0.2%
6000 1600 3000 488 52580 108.2 0.2%
6000 1600 3000 496 52690 108.4 0.2%
6000 1600 3000 504 52880 53.75 0.1%
6000 1600 3000 512 52990 62.34 0.1%
6000 1600 3000 520 53040 87.87 0.1%
6000 1600 3000 528 53190 90.5 0.1%
6000 1600 3000 536 53170 79.91 0.1%
6000 1600 3000 544 53280 91.67 0.1%
6000 1600 3000 552 53300 95.88 0.1%
6000 1600 3000 560 53400 97.16 0.1%
6000 1600 3000 568 53570 51.37 0.0%
6000 1600 3000 576 53630 73.65 0.1%
6000 1600 3000 584 53710 67.71 0.1%
6000 1600 3000 592 53780 96.53 0.1%
6000 1600 3000 600 53740 96.6 0.1%
6000 1600 3000 608 53850 75.46 0.1%
6000 1600 3000 616 53960 112 0.2%
6000 1600 3000 624 53980 65.64 0.1%
6000 1600 3000 632 54010 79.87 0.1%
6000 1600 3000 640 54120 66.7 0.1%
6000 1600 3000 648 54030 61.16 0.1%
6000 1600 3000 656 54070 75.11 0.1%
6000 1600 3000 664 54150 84.81 0.1%
6000 1600 3000 672 54220 130.9 0.2%
6000 1600 3000 680 54190 69.19 0.1%
6000 1600 3000 688 54240 78.45 0.1%
6000 1600 3000 696 54170 76.19 0.1%
6000 1600 3000 704 54300 44.79 0.0%
6000 1600 3000 712 54270 51.53 0.0%
6000 1600 3000 720 54260 101.9 0.1%
6000 1600 3000 728 54220 75.86 0.1%
6000 1600 3000 736 54060 39.54 0.0%
6000 1600 3000 744 54290 81.08 0.1%
6000 1600 3000 752 54080 91.77 0.1%
6000 1600 3000 760 54160 87.52 0.1%
6000 1600 3000 768 54170 75.9 0.1%
6000 1600 3000 776 54130 72.7 0.1%
6000 1600 3000 784 54320 68.03 0.1%
6000 1600 3000 792 54200 65.23 0.1%
6000 1600 3000 800 54080 80.75 0.1%

Quality and confidence:
param error
v 0.012
t 0.04
a 0.012
d 0.061

Model:
Time ~= 0
+ v 4.186
+ t 0.803
+ a 9.806
+ d 4.156
µs

Reads = 3 + (0 * v) + (0 * t) + (0 * a) + (0 * d)
Writes = 0 + (0 * v) + (0 * t) + (0 * a) + (0 * d)

…/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs
@parity-benchapp
Copy link

parity-benchapp bot commented Mar 14, 2021

Finished benchmark for branch: kiz-election-provider-2-audit

Benchmark: Benchmark Runtime Pallet

cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs

Results

Pallet: "pallet_staking", Extrinsic: "bond", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 80.31
µs

Reads = 5
Writes = 4
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 80.31
µs

Reads = 5
Writes = 4
Pallet: "pallet_staking", Extrinsic: "bond_extra", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 64.49
µs

Reads = 4
Writes = 2
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 64.49
µs

Reads = 4
Writes = 2
Pallet: "pallet_staking", Extrinsic: "unbond", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 59.67
µs

Reads = 5
Writes = 3
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 59.67
µs

Reads = 5
Writes = 3
Pallet: "pallet_staking", Extrinsic: "withdraw_unbonded_update", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 60.89
+ s 0.042
µs

Reads = 5 + (0 * s)
Writes = 3 + (0 * s)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
s mean µs sigma µs %
0 59.07 0.092 0.1%
2 59.46 0.145 0.2%
4 60.27 0.059 0.0%
6 60.33 0.121 0.2%
8 60.59 0.083 0.1%
10 60.42 0.211 0.3%
12 61 0.123 0.2%
14 61.38 0.156 0.2%
16 61.45 0.079 0.1%
18 61.7 0.197 0.3%
20 61.92 0.381 0.6%
22 61.91 0.175 0.2%
24 62.21 0.146 0.2%
26 62.6 0.165 0.2%
28 62.44 0.171 0.2%
30 62.81 0.148 0.2%
32 62.96 0.096 0.1%
34 63.38 0.156 0.2%
36 63.39 0.093 0.1%
38 63.93 0.184 0.2%
40 63.52 0.172 0.2%
42 64.03 0.15 0.2%
44 63.91 0.142 0.2%
46 64.03 0.242 0.3%
48 64.35 0.141 0.2%
50 63.71 0.487 0.7%
52 64.11 0.631 0.9%
54 64.44 0.337 0.5%
56 64.9 0.104 0.1%
58 64.83 0.208 0.3%
60 63.75 0.938 1.4%
62 65.2 0.597 0.9%
64 62.74 0.206 0.3%
66 62.69 0.139 0.2%
68 63.04 0.256 0.4%
70 63.23 0.192 0.3%
72 62.79 0.574 0.9%
74 63.23 0.115 0.1%
76 63.15 0.083 0.1%
78 63.08 0.187 0.2%
80 65.44 1.159 1.7%
82 65.03 1.119 1.7%
84 65.9 0.767 1.1%
86 63.76 0.99 1.5%
88 64.37 1.062 1.6%
90 65.84 0.659 1.0%
92 65.46 1.405 2.1%
94 64.13 0.203 0.3%
96 62.6 0.691 1.1%
98 62.63 0.639 1.0%
100 64.07 0.173 0.2%

Quality and confidence:
param error
s 0.001

Model:
Time ~= 61.07
+ s 0.04
µs

Reads = 5 + (0 * s)
Writes = 3 + (0 * s)
Pallet: "pallet_staking", Extrinsic: "withdraw_unbonded_kill", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 95.28
+ s 2.755
µs

Reads = 7 + (0 * s)
Writes = 8 + (1 * s)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
s mean µs sigma µs %
0 89.58 0.167 0.1%
2 99.83 0.134 0.1%
4 105.7 0.238 0.2%
6 110.9 0.246 0.2%
8 116.5 0.25 0.2%
10 122.3 0.263 0.2%
12 128.4 0.198 0.1%
14 133.4 0.295 0.2%
16 139.1 0.303 0.2%
18 144.6 0.202 0.1%
20 150 0.182 0.1%
22 155.2 0.247 0.1%
24 162.3 0.149 0.0%
26 168.2 0.366 0.2%
28 173.3 0.462 0.2%
30 178.7 0.425 0.2%
32 183.6 0.248 0.1%
34 189.2 0.369 0.1%
36 195.7 0.271 0.1%
38 200 0.446 0.2%
40 206 0.251 0.1%
42 213 0.332 0.1%
44 217.9 1.206 0.5%
46 222.9 0.194 0.0%
48 228.8 0.447 0.1%
50 233.4 0.377 0.1%
52 239.6 0.469 0.1%
54 244.2 0.395 0.1%
56 250.1 0.593 0.2%
58 254.3 0.648 0.2%
60 260.6 0.504 0.1%
62 266.4 0.459 0.1%
64 272.2 0.483 0.1%
66 277.2 0.468 0.1%
68 282.3 0.637 0.2%
70 286 0.204 0.0%
72 292.2 0.421 0.1%
74 297.7 0.524 0.1%
76 303.7 0.695 0.2%
78 307.9 0.682 0.2%
80 315.3 0.42 0.1%
82 321.4 0.789 0.2%
84 326.2 0.632 0.1%
86 331.7 0.556 0.1%
88 338.1 1.07 0.3%
90 340.4 1.31 0.3%
92 348.4 1.396 0.4%
94 354.8 0.973 0.2%
96 358 1.636 0.4%
98 364.6 2.401 0.6%
100 372 0.624 0.1%

Quality and confidence:
param error
s 0.002

Model:
Time ~= 95.12
+ s 2.755
µs

Reads = 7 + (0 * s)
Writes = 8 + (1 * s)
Pallet: "pallet_staking", Extrinsic: "validate", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 20.6
µs

Reads = 2
Writes = 2
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 20.6
µs

Reads = 2
Writes = 2
Pallet: "pallet_staking", Extrinsic: "kick", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 32.63
+ k 18.82
µs

Reads = 2 + (1 * k)
Writes = 0 + (1 * k)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
k mean µs sigma µs %
1 51.95 0.12 0.2%
3 90.04 1.918 2.1%
5 120.6 0.282 0.2%
7 164.3 5.315 3.2%
9 192.7 0.372 0.1%
11 236.1 1.612 0.6%
13 271.3 0.6 0.2%
15 307.2 2.49 0.8%
17 344.9 2.294 0.6%
19 395.7 2.503 0.6%
21 426.7 5.941 1.3%
23 468.4 4.511 0.9%
25 513.2 4.262 0.8%
27 538.6 0.554 0.1%
29 575.2 1.235 0.2%
31 615 1.198 0.1%
33 660.8 6.817 1.0%
35 703.2 1.455 0.2%
37 748.9 6.524 0.8%
39 776.9 5.194 0.6%
41 804.9 6.66 0.8%
43 841.2 10.55 1.2%
45 871 2.089 0.2%
47 909.7 3.099 0.3%
49 972.5 4.98 0.5%
51 984.1 9.815 0.9%
53 1033 8.952 0.8%
55 1060 4.174 0.3%
57 1105 3.764 0.3%
59 1147 3.57 0.3%
61 1179 10.04 0.8%
63 1229 7.634 0.6%
65 1272 5.436 0.4%
67 1317 6.829 0.5%
69 1340 7.116 0.5%
71 1367 8.424 0.6%
73 1405 9.336 0.6%
75 1442 8.121 0.5%
77 1484 6.373 0.4%
79 1511 8.737 0.5%
81 1556 10 0.6%
83 1605 7.28 0.4%
85 1634 8.914 0.5%
87 1687 10.32 0.6%
89 1707 3.391 0.1%
91 1754 8.716 0.4%
93 1787 9.97 0.5%
95 1808 16.13 0.8%
97 1847 10.33 0.5%
99 1884 10.32 0.5%
101 1932 10.8 0.5%
103 1961 9.53 0.4%
105 2013 9.899 0.4%
107 2056 8.646 0.4%
109 2089 6.21 0.2%
111 2120 11.48 0.5%
113 2160 4.613 0.2%
115 2206 8.895 0.4%
117 2225 4.821 0.2%
119 2284 12.25 0.5%
121 2300 8.336 0.3%
123 2348 8.805 0.3%
125 2378 10.52 0.4%
127 2429 13.67 0.5%

Quality and confidence:
param error
k 0.011

Model:
Time ~= 33.36
+ k 18.83
µs

Reads = 2 + (1 * k)
Writes = 0 + (1 * k)
Pallet: "pallet_staking", Extrinsic: "nominate", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 33.67
+ n 5.581
µs

Reads = 4 + (1 * n)
Writes = 2 + (0 * n)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
n mean µs sigma µs %
1 36.79 0.097 0.2%
2 44.22 0.135 0.3%
3 50.84 0.193 0.3%
4 57.06 0.2 0.3%
5 63.35 0.162 0.2%
6 69.23 0.225 0.3%
7 75.2 0.156 0.2%
8 76.49 0.158 0.2%
9 83 0.179 0.2%
10 89.76 0.178 0.1%
11 95.08 0.26 0.2%
12 100.2 0.372 0.3%
13 106 0.28 0.2%
14 110.9 0.247 0.2%
15 117.6 0.112 0.0%
16 122.7 0.311 0.2%

Quality and confidence:
param error
n 0.022

Model:
Time ~= 33.88
+ n 5.562
µs

Reads = 4 + (1 * n)
Writes = 2 + (0 * n)
Pallet: "pallet_staking", Extrinsic: "chill", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 19.74
µs

Reads = 2
Writes = 2
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 19.74
µs

Reads = 2
Writes = 2
Pallet: "pallet_staking", Extrinsic: "set_payee", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 13.67
µs

Reads = 1
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 13.67
µs

Reads = 1
Writes = 1
Pallet: "pallet_staking", Extrinsic: "set_controller", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 29.69
µs

Reads = 3
Writes = 3
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 29.69
µs

Reads = 3
Writes = 3
Pallet: "pallet_staking", Extrinsic: "set_validator_count", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 2.375
µs

Reads = 0
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 2.375
µs

Reads = 0
Writes = 1
Pallet: "pallet_staking", Extrinsic: "force_no_eras", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 2.601
µs

Reads = 0
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 2.601
µs

Reads = 0
Writes = 1
Pallet: "pallet_staking", Extrinsic: "force_new_era", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 2.605
µs

Reads = 0
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 2.605
µs

Reads = 0
Writes = 1
Pallet: "pallet_staking", Extrinsic: "force_new_era_always", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 2.584
µs

Reads = 0
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 2.584
µs

Reads = 0
Writes = 1
Pallet: "pallet_staking", Extrinsic: "set_invulnerables", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 2.732
+ v 0.034
µs

Reads = 0 + (0 * v)
Writes = 1 + (0 * v)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
v mean µs sigma µs %
0 2.583 0.012 0.4%
20 3.465 0.018 0.5%
40 4.261 0.018 0.4%
60 4.942 0.033 0.6%
80 5.584 0.045 0.8%
100 6.256 0.027 0.4%
120 6.977 0.017 0.2%
140 7.734 0.021 0.2%
160 8.322 0.056 0.6%
180 8.998 0.027 0.3%
200 9.734 0.016 0.1%
220 10.37 0.027 0.2%
240 11.08 0.02 0.1%
260 11.66 0.022 0.1%
280 12.49 0.042 0.3%
300 13.12 0.03 0.2%
320 13.76 0.032 0.2%
340 14.54 0.029 0.1%
360 15.11 0.038 0.2%
380 15.83 0.028 0.1%
400 16.64 0.021 0.1%
420 17.38 0.066 0.3%
440 18.25 0.027 0.1%
460 18.66 0.025 0.1%
480 19.55 0.034 0.1%
500 20.14 0.026 0.1%
520 20.75 0.027 0.1%
540 21.41 0.045 0.2%
560 22.14 0.02 0.0%
580 22.86 0.018 0.0%
600 23.48 0.022 0.0%
620 24.21 0.034 0.1%
640 24.94 0.043 0.1%
660 26.27 0.041 0.1%
680 27 0.028 0.1%
700 27.68 0.038 0.1%
720 28.29 0.041 0.1%
740 29 0.036 0.1%
760 29.71 0.035 0.1%
780 29.74 0.018 0.0%
800 30.53 0.03 0.0%
820 31.22 0.036 0.1%
840 31.86 0.023 0.0%
860 32.56 0.027 0.0%
880 33.25 0.019 0.0%
900 34 0.049 0.1%
920 34.71 0.03 0.0%
940 35.56 0.028 0.0%
960 36.25 0.037 0.1%
980 37.02 0.031 0.0%
1000 37.67 0.038 0.1%

Quality and confidence:
param error
v 0

Model:
Time ~= 2.725
+ v 0.035
µs

Reads = 0 + (0 * v)
Writes = 1 + (0 * v)
Pallet: "pallet_staking", Extrinsic: "force_unstake", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 63.91
+ s 2.833
µs

Reads = 4 + (0 * s)
Writes = 8 + (1 * s)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
s mean µs sigma µs %
0 59.63 0.095 0.1%
2 69.22 0.086 0.1%
4 75.54 0.142 0.1%
6 81.03 0.134 0.1%
8 86.59 0.163 0.1%
10 92.09 0.082 0.0%
12 97.86 0.192 0.1%
14 103.7 0.177 0.1%
16 109.6 0.168 0.1%
18 115.2 0.311 0.2%
20 120.7 0.139 0.1%
22 126.6 0.265 0.2%
24 132.7 0.179 0.1%
26 138.3 0.284 0.2%
28 143.4 0.14 0.0%
30 148.9 0.18 0.1%
32 154.2 0.182 0.1%
34 159.8 0.168 0.1%
36 164.9 0.333 0.2%
38 170.6 0.43 0.2%
40 176.4 0.428 0.2%
42 182.6 0.225 0.1%
44 187.5 0.404 0.2%
46 192.9 0.31 0.1%
48 199.4 0.546 0.2%
50 202.9 0.595 0.2%
52 208.7 0.388 0.1%
54 214.9 0.449 0.2%
56 220.9 0.82 0.3%
58 226 0.421 0.1%
60 234.8 6.695 2.8%
62 259.2 24.98 9.6%
64 242.5 0.512 0.2%
66 248.1 0.592 0.2%
68 257.1 1.621 0.6%
70 264.9 0.601 0.2%
72 269.2 0.196 0.0%
74 277 0.864 0.3%
76 283.6 2.665 0.9%
78 288.8 2.151 0.7%
80 292.8 1.131 0.3%
82 298.2 1.089 0.3%
84 301.8 4.246 1.4%
86 307.6 0.665 0.2%
88 314.3 4.865 1.5%
90 313.7 3.269 1.0%
92 323.3 4.374 1.3%
94 326.1 0.9 0.2%
96 337.9 0.469 0.1%
98 345.2 1.459 0.4%
100 342.2 0.819 0.2%

Quality and confidence:
param error
s 0.007

Model:
Time ~= 63.55
+ s 2.844
µs

Reads = 4 + (0 * s)
Writes = 8 + (1 * s)
Pallet: "pallet_staking", Extrinsic: "cancel_deferred_slash", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 6684
+ s 34.76
µs

Reads = 1 + (0 * s)
Writes = 1 + (0 * s)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
s mean µs sigma µs %
1 416.3 0.183 0.0%
20 1720 13.36 0.7%
39 2989 14.87 0.4%
58 4246 9.588 0.2%
77 5458 0.988 0.0%
96 6655 12.42 0.1%
115 7822 13.96 0.1%
134 8990 14.25 0.1%
153 10080 13.54 0.1%
172 11190 14.37 0.1%
191 12270 11.89 0.0%
210 13310 8.528 0.0%
229 14340 12.21 0.0%
248 15320 17.69 0.1%
267 16310 16.17 0.0%
286 17240 25.47 0.1%
305 18180 16.19 0.0%
324 19130 88.38 0.4%
343 19930 24.18 0.1%
362 20800 14.35 0.0%
381 21610 14.16 0.0%
400 22410 21.65 0.0%
419 23180 11.5 0.0%
438 23940 23.91 0.0%
457 24650 9.541 0.0%
476 25350 14.57 0.0%
495 26340 91.17 0.3%
514 26700 21.5 0.0%
533 27320 39.68 0.1%
552 27910 12.23 0.0%
571 28510 30.17 0.1%
590 29020 15.77 0.0%
609 29550 15.63 0.0%
628 30030 18.22 0.0%
647 30510 23.32 0.0%
666 30940 25.27 0.0%
685 31370 19.75 0.0%
704 31790 29.42 0.0%
723 32170 30.08 0.0%
742 32520 25.76 0.0%
761 32830 16.93 0.0%
780 33130 14.68 0.0%
799 33400 24.07 0.0%
818 33670 22.04 0.0%
837 33880 18.95 0.0%
856 34080 18.08 0.0%
875 34300 30.27 0.0%
894 34400 29.92 0.0%
913 34560 31.3 0.0%
932 34630 16.97 0.0%
951 34700 30.55 0.0%
970 34770 23.29 0.0%
989 34790 18.56 0.0%

Quality and confidence:
param error
s 0.391

Model:
Time ~= 5905
+ s 34.78
µs

Reads = 1 + (0 * s)
Writes = 1 + (0 * s)
Pallet: "pallet_staking", Extrinsic: "payout_stakers_dead_controller", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 141.1
+ n 52.53
µs

Reads = 11 + (3 * n)
Writes = 2 + (1 * n)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
n mean µs sigma µs %
1 172 0.322 0.1%
6 437.7 1.198 0.2%
11 705.3 2.29 0.3%
16 973 8.3 0.8%
21 1242 3.023 0.2%
26 1516 12.32 0.8%
31 1762 9.953 0.5%
36 2049 12.81 0.6%
41 2311 12.23 0.5%
46 2552 13.45 0.5%
51 2840 7.687 0.2%
56 3079 14.45 0.4%
61 3328 10.68 0.3%
66 3591 10.26 0.2%
71 3890 9.282 0.2%
76 4130 11.29 0.2%
81 4414 8.087 0.1%
86 4731 21.02 0.4%
91 4933 8.433 0.1%
96 5193 12.78 0.2%
101 5454 15.12 0.2%
106 5695 7.281 0.1%
111 5960 14.73 0.2%
116 6194 20.49 0.3%
121 6473 11.14 0.1%
126 6755 13.12 0.1%
131 6983 20.01 0.2%
136 7299 11.68 0.1%
141 7502 10.03 0.1%
146 7826 11.79 0.1%
151 8105 19.41 0.2%
156 8348 18.23 0.2%
161 8631 12.75 0.1%
166 8882 7.515 0.0%
171 9131 12.95 0.1%
176 9400 13.67 0.1%
181 9655 19.98 0.2%
186 9924 24.61 0.2%
191 10180 22.06 0.2%
196 10460 15.54 0.1%
201 10830 57.47 0.5%
206 10950 18.58 0.1%
211 11230 17.19 0.1%
216 11510 18.01 0.1%
221 11740 25.24 0.2%
226 12000 21.35 0.1%
231 12270 21.13 0.1%
236 12470 20.12 0.1%
241 12880 57.59 0.4%
246 13030 41.99 0.3%
251 13300 23.96 0.1%
256 13500 24.84 0.1%

Quality and confidence:
param error
n 0.022

Model:
Time ~= 142.2
+ n 52.54
µs

Reads = 11 + (3 * n)
Writes = 2 + (1 * n)
Pallet: "pallet_staking", Extrinsic: "payout_stakers_alive_staked", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 175.3
+ n 66.78
µs

Reads = 12 + (5 * n)
Writes = 3 + (3 * n)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
n mean µs sigma µs %
1 215.1 0.48 0.2%
6 557.5 1.232 0.2%
11 891.4 1.303 0.1%
16 1235 1.765 0.1%
21 1584 10.18 0.6%
26 1914 11.55 0.6%
31 2246 13.54 0.6%
36 2590 11.04 0.4%
41 2892 10.22 0.3%
46 3242 7.482 0.2%
51 3598 9.92 0.2%
56 3921 10.64 0.2%
61 4235 7.508 0.1%
66 4584 11.08 0.2%
71 4922 8.446 0.1%
76 5254 20.58 0.3%
81 5590 11.78 0.2%
86 5933 10.82 0.1%
91 6242 9.741 0.1%
96 6591 9.956 0.1%
101 6987 24.81 0.3%
106 7237 10.93 0.1%
111 7641 17.99 0.2%
116 7969 12.37 0.1%
121 8271 8.401 0.1%
126 8602 11.4 0.1%
131 8942 13.81 0.1%
136 9258 24.08 0.2%
141 9664 57.01 0.5%
146 9917 18.66 0.1%
151 10240 15.52 0.1%
156 10580 19.52 0.1%
161 10880 20.49 0.1%
166 11250 20.84 0.1%
171 11510 10.92 0.0%
176 12010 14.56 0.1%
181 12310 23.41 0.1%
186 12640 19.83 0.1%
191 12920 13.46 0.1%
196 13230 19.2 0.1%
201 13620 13.51 0.0%
206 14020 16.23 0.1%
211 14260 26.66 0.1%
216 14560 20.21 0.1%
221 14890 24.71 0.1%
226 15230 36.69 0.2%
231 15560 48.09 0.3%
236 15880 14.97 0.0%
241 16330 24.99 0.1%
246 16550 15.17 0.0%
251 16940 29.59 0.1%
256 17250 26.58 0.1%

Quality and confidence:
param error
n 0.023

Model:
Time ~= 180.1
+ n 66.76
µs

Reads = 12 + (5 * n)
Writes = 3 + (3 * n)
Pallet: "pallet_staking", Extrinsic: "rebond", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 41.45
+ l 0.094
µs

Reads = 4 + (0 * l)
Writes = 3 + (0 * l)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
l mean µs sigma µs %
1 41.49 0.127 0.3%
2 41.32 0.088 0.2%
3 41.31 0.062 0.1%
4 41.46 0.092 0.2%
5 41.58 0.074 0.1%
6 41.81 0.144 0.3%
7 41.73 0.063 0.1%
8 41.75 0.084 0.2%
9 46.32 1.968 4.2%
10 50.14 4.612 9.1%
11 47.45 3.335 7.0%
12 43.63 0.077 0.1%
13 42.72 0.062 0.1%
14 44.37 3.925 8.8%
15 43.47 0.128 0.2%
16 43.15 0.286 0.6%
17 43.22 0.153 0.3%
18 43.27 0.192 0.4%
19 43.21 0.118 0.2%
20 43.44 0.083 0.1%
21 43.81 0.362 0.8%
22 43.41 0.09 0.2%
23 43.74 0.252 0.5%
24 43.59 0.141 0.3%
25 43.7 0.055 0.1%
26 43.65 0.188 0.4%
27 44.28 0.195 0.4%
28 43.65 0.121 0.2%
29 44.59 0.094 0.2%
30 44.56 0.078 0.1%
31 44.51 0.134 0.3%
32 43.71 0.139 0.3%

Quality and confidence:
param error
l 0.012

Model:
Time ~= 42.57
+ l 0.06
µs

Reads = 4 + (0 * l)
Writes = 3 + (0 * l)
Pallet: "pallet_staking", Extrinsic: "set_history_depth", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 0
+ e 33.17
µs

Reads = 2 + (0 * e)
Writes = 4 + (7 * e)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
e mean µs sigma µs %
1 41.16 0.102 0.2%
2 68.01 0.151 0.2%
3 92.16 0.128 0.1%
4 123.5 0.428 0.3%
5 144.7 0.625 0.4%
6 171 1.557 0.9%
7 197.4 1.529 0.7%
8 222.1 2.091 0.9%
9 247.9 2.062 0.8%
10 276.7 1.547 0.5%
11 300.1 1.999 0.6%
12 329.9 2.412 0.7%
13 361.2 2.2 0.6%
14 387.8 0.679 0.1%
15 406.5 0.476 0.1%
16 434.9 0.312 0.0%
17 464.3 0.872 0.1%
18 493.4 1.329 0.2%
19 520.5 1.232 0.2%
20 546 0.783 0.1%
21 581.6 0.582 0.1%
22 608.7 0.83 0.1%
23 640.9 1.863 0.2%
24 665.6 1.214 0.1%
25 697.9 1.465 0.2%
26 723.5 0.774 0.1%
27 758.3 2.001 0.2%
28 787.7 2.228 0.2%
29 819.7 2.897 0.3%
30 844.6 1.109 0.1%
31 883.9 1.155 0.1%
32 907.7 1.791 0.1%
33 942.9 2.852 0.3%
34 967.9 1.836 0.1%
35 995.1 2.647 0.2%
36 1048 12.09 1.1%
37 1060 1.226 0.1%
38 1084 3.768 0.3%
39 1114 3.65 0.3%
40 1140 3.314 0.2%
41 1178 6.879 0.5%
42 1200 3.267 0.2%
43 1232 1.698 0.1%
44 1276 7.266 0.5%
45 1318 6.35 0.4%
46 1353 12.75 0.9%
47 1390 11.02 0.7%
48 1410 3.206 0.2%
49 1436 2.396 0.1%
50 1470 3.395 0.2%
51 1505 9.172 0.6%
52 1541 2.584 0.1%
53 1580 13.13 0.8%
54 1617 3.317 0.2%
55 1637 2.42 0.1%
56 1679 8.51 0.5%
57 1720 11.12 0.6%
58 1749 6.944 0.3%
59 1787 4.058 0.2%
60 1819 10.92 0.6%
61 1839 10.95 0.5%
62 1895 11.24 0.5%
63 1916 7.588 0.3%
64 1973 9.283 0.4%
65 2006 6.371 0.3%
66 2016 10.17 0.5%
67 2065 11.26 0.5%
68 2108 11.7 0.5%
69 2137 6.945 0.3%
70 2171 12.68 0.5%
71 2200 10.44 0.4%
72 2240 9.104 0.4%
73 2270 12.43 0.5%
74 2310 9.744 0.4%
75 2353 12.24 0.5%
76 2396 7.686 0.3%
77 2440 9.171 0.3%
78 2470 13.07 0.5%
79 2502 11.15 0.4%
80 2543 9.747 0.3%
81 2586 12.37 0.4%
82 2597 11.69 0.4%
83 2673 6.467 0.2%
84 2707 10.87 0.4%
85 2771 9.766 0.3%
86 2786 15.4 0.5%
87 2855 8.217 0.2%
88 2833 5.948 0.2%
89 2895 5.988 0.2%
90 2955 6.586 0.2%
91 2947 7.064 0.2%
92 3022 9.391 0.3%
93 3048 9.206 0.3%
94 3126 8.75 0.2%
95 3144 10.62 0.3%
96 3191 6.01 0.1%
97 3212 10.62 0.3%
98 3285 8.377 0.2%
99 3290 8.19 0.2%
100 3333 11.58 0.3%

Quality and confidence:
param error
e 0.068

Model:
Time ~= 0
+ e 33.36
µs

Reads = 2 + (0 * e)
Writes = 4 + (7 * e)
Pallet: "pallet_staking", Extrinsic: "reap_stash", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 68.4
+ s 2.77
µs

Reads = 4 + (0 * s)
Writes = 8 + (1 * s)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
s mean µs sigma µs %
1 70.83 0.101 0.1%
2 72.39 0.062 0.0%
3 75.37 0.149 0.1%
4 78.85 0.095 0.1%
5 81.68 0.096 0.1%
6 84.19 0.073 0.0%
7 86.8 0.093 0.1%
8 90 0.176 0.1%
9 92.74 0.077 0.0%
10 95.3 0.197 0.2%
11 98.34 0.212 0.2%
12 101.3 0.166 0.1%
13 104.4 0.293 0.2%
14 107 0.18 0.1%
15 109.6 0.184 0.1%
16 112.7 0.143 0.1%
17 115.3 0.264 0.2%
18 119 0.717 0.6%
19 121 0.228 0.1%
20 123.4 0.159 0.1%
21 127.3 0.254 0.1%
22 129.5 0.197 0.1%
23 132.4 0.236 0.1%
24 135.6 0.226 0.1%
25 138.6 0.281 0.2%
26 141.4 0.258 0.1%
27 144 0.25 0.1%
28 146.7 0.317 0.2%
29 149.5 0.295 0.1%
30 151.8 0.38 0.2%
31 154.6 0.205 0.1%
32 157.5 0.336 0.2%
33 162.3 1.072 0.6%
34 162.6 0.257 0.1%
35 165.4 0.307 0.1%
36 168.3 0.276 0.1%
37 170.7 0.202 0.1%
38 173.8 0.228 0.1%
39 177.1 0.381 0.2%
40 179.9 0.27 0.1%
41 182.8 0.287 0.1%
42 185.5 0.33 0.1%
43 188.1 0.204 0.1%
44 191.1 0.322 0.1%
45 194 0.334 0.1%
46 196.4 0.304 0.1%
47 199 0.159 0.0%
48 202.6 0.261 0.1%
49 204.5 0.243 0.1%
50 206.1 0.246 0.1%
51 209.4 0.557 0.2%
52 212.3 0.592 0.2%
53 215.6 0.567 0.2%
54 217.6 0.491 0.2%
55 221.3 0.285 0.1%
56 223.7 0.5 0.2%
57 226.8 0.332 0.1%
58 229.1 0.652 0.2%
59 232.1 0.45 0.1%
60 234.1 0.718 0.3%
61 237.7 0.444 0.1%
62 240.6 0.571 0.2%
63 243.5 0.363 0.1%
64 244.9 0.161 0.0%
65 248.3 0.405 0.1%
66 251.4 0.552 0.2%
67 253.7 0.393 0.1%
68 256.4 0.195 0.0%
69 259.1 0.631 0.2%
70 262.4 0.497 0.1%
71 264.8 0.261 0.0%
72 266.8 0.493 0.1%
73 269.9 0.348 0.1%
74 273.3 0.558 0.2%
75 276.2 0.4 0.1%
76 278.9 0.839 0.3%
77 283 1.659 0.5%
78 285.7 1.351 0.4%
79 286.8 0.604 0.2%
80 289.1 0.677 0.2%
81 292.5 1.752 0.5%
82 294.7 0.352 0.1%
83 298.1 0.521 0.1%
84 301.3 2.086 0.6%
85 303 0.324 0.1%
86 305.4 1.005 0.3%
87 308.7 0.36 0.1%
88 310.8 0.512 0.1%
89 314.2 0.7 0.2%
90 316 0.515 0.1%
91 319.2 0.891 0.2%
92 324.2 0.699 0.2%
93 326.2 0.39 0.1%
94 328.4 0.798 0.2%
95 329.8 0.254 0.0%
96 334.7 0.591 0.1%
97 337.2 0.667 0.1%
98 340.2 0.208 0.0%
99 344.4 1.342 0.3%
100 346.8 1.947 0.5%

Quality and confidence:
param error
s 0.001

Model:
Time ~= 68.47
+ s 2.77
µs

Reads = 4 + (0 * s)
Writes = 8 + (1 * s)
Pallet: "pallet_staking", Extrinsic: "new_era", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 0
+ v 571
+ n 83.64
µs

Reads = 9 + (4 * v) + (3 * n)
Writes = 13 + (3 * v) + (0 * n)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
v n mean µs sigma µs %
1 100 3781 14.74 0.3%
2 100 4387 12.54 0.2%
3 100 4865 8.549 0.1%
4 100 5360 9.962 0.1%
5 100 5972 13.21 0.2%
6 100 6490 7.572 0.1%
7 100 7079 18.11 0.2%
8 100 7619 9.837 0.1%
9 100 8360 24.8 0.2%
10 1 727.9 1.331 0.1%
10 2 821.7 1.177 0.1%
10 3 903.5 3.956 0.4%
10 4 992.2 10.76 1.0%
10 5 1066 1.668 0.1%
10 6 1143 1.14 0.0%
10 7 1235 3.318 0.2%
10 8 1325 1.528 0.1%
10 9 1405 3.992 0.2%
10 10 1496 11.5 0.7%
10 11 1581 12.67 0.8%
10 12 1660 8.127 0.4%
10 13 1745 2.526 0.1%
10 14 1830 8.774 0.4%
10 15 1904 9.397 0.4%
10 16 2001 10.17 0.5%
10 17 2090 14.09 0.6%
10 18 2154 7.417 0.3%
10 19 2254 10.19 0.4%
10 20 2351 4.826 0.2%
10 21 2399 11.45 0.4%
10 22 2497 10.28 0.4%
10 23 2568 10.76 0.4%
10 24 2648 11.1 0.4%
10 25 2738 11.65 0.4%
10 26 2859 10.92 0.3%
10 27 2933 12.85 0.4%
10 28 3002 12.08 0.4%
10 29 3087 9.151 0.2%
10 30 3168 9.754 0.3%
10 31 3257 10.52 0.3%
10 32 3345 15.06 0.4%
10 33 3439 9.413 0.2%
10 34 3494 14.93 0.4%
10 35 3595 10.23 0.2%
10 36 3693 20.11 0.5%
10 37 3824 4.522 0.1%
10 38 3851 14.89 0.3%
10 39 3919 10.16 0.2%
10 40 3993 10.36 0.2%
10 41 4087 6.329 0.1%
10 42 4158 7.124 0.1%
10 43 4249 9.185 0.2%
10 44 4355 6.772 0.1%
10 45 4417 7.567 0.1%
10 46 4488 11.25 0.2%
10 47 4557 4.057 0.0%
10 48 4634 4.584 0.0%
10 49 4721 5.203 0.1%
10 50 4817 9.574 0.1%
10 51 4924 6.116 0.1%
10 52 4990 11.74 0.2%
10 53 5117 11.28 0.2%
10 54 5191 10.7 0.2%
10 55 5263 12.26 0.2%
10 56 5339 10 0.1%
10 57 5440 11.48 0.2%
10 58 5532 6.715 0.1%
10 59 5611 14.05 0.2%
10 60 5701 12.51 0.2%
10 61 5756 8.791 0.1%
10 62 5845 7.466 0.1%
10 63 6001 13 0.2%
10 64 6032 9.016 0.1%
10 65 6125 5.45 0.0%
10 66 6210 19.34 0.3%
10 67 6280 14.48 0.2%
10 68 6359 11.4 0.1%
10 69 6450 8.225 0.1%
10 70 6539 10.76 0.1%
10 71 6617 7.101 0.1%
10 72 6719 11.27 0.1%
10 73 6785 10.89 0.1%
10 74 6874 12.39 0.1%
10 75 6944 9.512 0.1%
10 76 7055 8.321 0.1%
10 77 7096 7.295 0.1%
10 78 7184 8.298 0.1%
10 79 7261 6.934 0.0%
10 80 7372 11.78 0.1%
10 81 7448 7.84 0.1%
10 82 7523 13.16 0.1%
10 83 7608 12.36 0.1%
10 84 7719 9.377 0.1%
10 85 7761 12.17 0.1%
10 86 7865 11.35 0.1%
10 87 7946 11.21 0.1%
10 88 8024 12.49 0.1%
10 89 8121 10.54 0.1%
10 90 8197 10.69 0.1%
10 91 8268 9.408 0.1%
10 92 8373 13.4 0.1%
10 93 8433 4.728 0.0%
10 94 8529 15.87 0.1%
10 95 8588 14.21 0.1%
10 96 8657 10.64 0.1%
10 97 8735 10.15 0.1%
10 98 8807 10.53 0.1%
10 99 8874 16.74 0.1%
10 100 8942 13.4 0.1%

Quality and confidence:
param error
v 0.903
n 0.045

Model:
Time ~= 0
+ v 594.1
+ n 83.37
µs

Reads = 9 + (4 * v) + (3 * n)
Writes = 13 + (3 * v) + (0 * n)
Pallet: "pallet_staking", Extrinsic: "submit_solution_better", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 0
+ v 1.208
+ n 0.772
+ a 75.2
+ w 8.844
µs

Reads = 6 + (0 * v) + (0 * n) + (4 * a) + (1 * w)
Writes = 2 + (0 * v) + (0 * n) + (0 * a) + (0 * w)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
v n a w mean µs sigma µs %
200 1000 400 100 30960 61.79 0.1%
204 1000 400 100 30840 67.94 0.2%
208 1000 400 100 30950 54.21 0.1%
212 1000 400 100 31000 56.65 0.1%
216 1000 400 100 31110 59.9 0.1%
220 1000 400 100 31070 38.98 0.1%
224 1000 400 100 30870 53.45 0.1%
228 1000 400 100 31090 40.5 0.1%
232 1000 400 100 31030 55.36 0.1%
236 1000 400 100 30990 36.77 0.1%
240 1000 400 100 31050 70.87 0.2%
244 1000 400 100 31190 29.75 0.0%
248 1000 400 100 30990 36.21 0.1%
252 1000 400 100 31240 46.28 0.1%
256 1000 400 100 31230 40.6 0.1%
260 1000 400 100 31030 51.78 0.1%
264 1000 400 100 30890 44.44 0.1%
268 1000 400 100 31090 40.58 0.1%
272 1000 400 100 30940 36.39 0.1%
276 1000 400 100 30920 53.5 0.1%
280 1000 400 100 31000 42.4 0.1%
284 1000 400 100 31170 39 0.1%
288 1000 400 100 31000 35.93 0.1%
292 1000 400 100 31090 27.69 0.0%
296 1000 400 100 31110 42.25 0.1%
300 1000 400 100 31040 58.1 0.1%
304 1000 400 100 30970 59.64 0.1%
308 1000 400 100 31140 49.67 0.1%
312 1000 400 100 31100 43.31 0.1%
316 1000 400 100 31130 36.63 0.1%
320 1000 400 100 31130 60.14 0.1%
324 1000 400 100 31210 59.48 0.1%
328 1000 400 100 31270 52.35 0.1%
332 1000 400 100 31010 34.88 0.1%
336 1000 400 100 31170 70.06 0.2%
340 1000 400 100 31210 50.78 0.1%
344 1000 400 100 31010 71.13 0.2%
348 1000 400 100 31120 67.85 0.2%
352 1000 400 100 31120 38.73 0.1%
356 1000 400 100 31090 54.3 0.1%
360 1000 400 100 31170 38.37 0.1%
364 1000 400 100 31040 62.45 0.2%
368 1000 400 100 31170 43.48 0.1%
372 1000 400 100 31140 35.96 0.1%
376 1000 400 100 30900 52.15 0.1%
380 1000 400 100 31260 44.74 0.1%
384 1000 400 100 31040 53.72 0.1%
388 1000 400 100 31180 38.88 0.1%
392 1000 400 100 31200 68.04 0.2%
396 1000 400 100 31200 77.42 0.2%
400 500 400 100 30860 33.82 0.1%
400 510 400 100 30730 53.67 0.1%
400 520 400 100 31010 48.8 0.1%
400 530 400 100 30980 44.83 0.1%
400 540 400 100 30980 46.2 0.1%
400 550 400 100 30980 24.69 0.0%
400 560 400 100 30950 39.08 0.1%
400 570 400 100 31030 25.79 0.0%
400 580 400 100 30840 57.32 0.1%
400 590 400 100 30900 45 0.1%
400 600 400 100 30760 52.44 0.1%
400 610 400 100 30970 61.72 0.1%
400 620 400 100 31010 48.2 0.1%
400 630 400 100 31060 54.99 0.1%
400 640 400 100 30930 140.4 0.4%
400 650 400 100 30990 55.69 0.1%
400 660 400 100 30840 30.51 0.0%
400 670 400 100 31100 28.96 0.0%
400 680 400 100 30870 31.96 0.1%
400 690 400 100 31080 50.76 0.1%
400 700 400 100 31050 21.55 0.0%
400 710 400 100 31130 68.44 0.2%
400 720 400 100 31090 70.55 0.2%
400 730 400 100 31010 51.26 0.1%
400 740 400 100 30950 44.07 0.1%
400 750 400 100 31180 61.56 0.1%
400 760 400 100 30970 84.97 0.2%
400 770 400 100 31030 65.4 0.2%
400 780 400 100 30950 50.07 0.1%
400 790 400 100 31150 42.51 0.1%
400 800 400 100 30950 39.8 0.1%
400 810 400 100 31060 40.59 0.1%
400 820 400 100 31220 36.57 0.1%
400 830 400 100 31090 61.48 0.1%
400 840 400 100 31040 24.38 0.0%
400 850 400 100 30970 45.38 0.1%
400 860 400 100 31270 59.38 0.1%
400 870 400 100 31280 48.23 0.1%
400 880 400 100 31170 46.91 0.1%
400 890 400 100 31150 56.36 0.1%
400 900 400 100 31190 45.89 0.1%
400 910 400 100 31200 36.92 0.1%
400 920 400 100 31370 40.97 0.1%
400 930 400 100 31070 76.57 0.2%
400 940 400 100 31290 61.65 0.1%
400 950 400 100 31270 35.3 0.1%
400 960 400 100 31130 42.56 0.1%
400 970 400 100 30930 44.64 0.1%
400 980 400 100 31130 28.31 0.0%
400 990 400 100 31210 62.69 0.2%
400 1000 200 100 16180 50.66 0.3%
400 1000 204 100 16470 39.97 0.2%
400 1000 208 100 16800 21.21 0.1%
400 1000 212 100 17160 29.48 0.1%
400 1000 216 100 17480 24.41 0.1%
400 1000 220 100 17770 44.89 0.2%
400 1000 224 100 18070 36.23 0.2%
400 1000 228 100 18380 27.49 0.1%
400 1000 232 100 18710 33.77 0.1%
400 1000 236 100 19010 29.38 0.1%
400 1000 240 100 19300 50.19 0.2%
400 1000 244 100 19610 50.33 0.2%
400 1000 248 100 19890 38.37 0.1%
400 1000 252 100 20140 29.97 0.1%
400 1000 256 100 20500 46.75 0.2%
400 1000 260 100 20840 41.42 0.1%
400 1000 264 100 21100 38.48 0.1%
400 1000 268 100 21390 26.22 0.1%
400 1000 272 100 21720 40.95 0.1%
400 1000 276 100 22000 29.64 0.1%
400 1000 280 100 22250 28.82 0.1%
400 1000 284 100 22600 46.26 0.2%
400 1000 288 100 22850 39.96 0.1%
400 1000 292 100 23220 62.83 0.2%
400 1000 296 100 23550 52.69 0.2%
400 1000 300 100 23750 42.88 0.1%
400 1000 304 100 24090 46.19 0.1%
400 1000 308 100 24410 55.22 0.2%
400 1000 312 100 24680 52.08 0.2%
400 1000 316 100 24980 41.03 0.1%
400 1000 320 100 25270 61.32 0.2%
400 1000 324 100 25570 49.82 0.1%
400 1000 328 100 25910 35.88 0.1%
400 1000 332 100 26140 51.68 0.1%
400 1000 336 100 26420 53.63 0.2%
400 1000 340 100 26780 54.81 0.2%
400 1000 344 100 27110 41.57 0.1%
400 1000 348 100 27380 50.95 0.1%
400 1000 352 100 27630 39.66 0.1%
400 1000 356 100 27980 71.5 0.2%
400 1000 360 100 28240 49.41 0.1%
400 1000 364 100 28550 57.9 0.2%
400 1000 368 100 28870 40.11 0.1%
400 1000 372 100 29140 31.03 0.1%
400 1000 376 100 29440 64.53 0.2%
400 1000 380 100 29780 64.68 0.2%
400 1000 384 100 30060 29.3 0.0%
400 1000 388 100 30410 41.58 0.1%
400 1000 392 100 30760 72.73 0.2%
400 1000 396 100 31030 44.3 0.1%
400 1000 400 16 30410 60.75 0.1%
400 1000 400 17 30550 50.46 0.1%
400 1000 400 18 30610 117.5 0.3%
400 1000 400 19 30490 29.34 0.0%
400 1000 400 20 30640 66.19 0.2%
400 1000 400 21 30780 40.09 0.1%
400 1000 400 22 30760 82.86 0.2%
400 1000 400 23 30840 52.9 0.1%
400 1000 400 24 30790 50.05 0.1%
400 1000 400 25 30670 38.61 0.1%
400 1000 400 26 30450 62.96 0.2%
400 1000 400 27 30430 53.55 0.1%
400 1000 400 28 30640 20.98 0.0%
400 1000 400 29 30420 33.81 0.1%
400 1000 400 30 30660 73.36 0.2%
400 1000 400 31 30620 35.82 0.1%
400 1000 400 32 30580 59.34 0.1%
400 1000 400 33 30550 32.55 0.1%
400 1000 400 34 30590 42.05 0.1%
400 1000 400 35 30800 34.02 0.1%
400 1000 400 36 30610 53.34 0.1%
400 1000 400 37 30770 33.49 0.1%
400 1000 400 38 30830 49.37 0.1%
400 1000 400 39 30860 51.1 0.1%
400 1000 400 40 30670 55.15 0.1%
400 1000 400 41 30800 56.71 0.1%
400 1000 400 42 30930 39.81 0.1%
400 1000 400 43 30830 44.05 0.1%
400 1000 400 44 30870 48.62 0.1%
400 1000 400 45 30890 72.25 0.2%
400 1000 400 46 30930 50.19 0.1%
400 1000 400 47 30870 58.42 0.1%
400 1000 400 48 30790 74.34 0.2%
400 1000 400 49 30950 57.85 0.1%
400 1000 400 50 30870 37.38 0.1%
400 1000 400 51 30790 54.59 0.1%
400 1000 400 52 30870 66.95 0.2%
400 1000 400 53 30860 47.81 0.1%
400 1000 400 54 30950 57.4 0.1%
400 1000 400 55 30830 46.67 0.1%
400 1000 400 56 30850 53.19 0.1%
400 1000 400 57 30840 46.27 0.1%
400 1000 400 58 30890 67.69 0.2%
400 1000 400 59 30820 41.21 0.1%
400 1000 400 60 30980 31.34 0.1%
400 1000 400 61 30910 43.91 0.1%
400 1000 400 62 30970 45.12 0.1%
400 1000 400 63 31050 18.78 0.0%
400 1000 400 64 30850 55.68 0.1%
400 1000 400 65 30950 54.08 0.1%
400 1000 400 66 30940 51.99 0.1%
400 1000 400 67 31100 28.41 0.0%
400 1000 400 68 30840 43.26 0.1%
400 1000 400 69 30880 39.19 0.1%
400 1000 400 70 30950 48.25 0.1%
400 1000 400 71 30900 35.15 0.1%
400 1000 400 72 30920 56.97 0.1%
400 1000 400 73 30930 39.17 0.1%
400 1000 400 74 30980 46.37 0.1%
400 1000 400 75 31160 60 0.1%
400 1000 400 76 31080 48.66 0.1%
400 1000 400 77 31160 61.92 0.1%
400 1000 400 78 31170 45.48 0.1%
400 1000 400 79 31180 58.16 0.1%
400 1000 400 80 31210 65.99 0.2%
400 1000 400 81 31220 62.2 0.1%
400 1000 400 82 31070 54.98 0.1%
400 1000 400 83 31170 40.22 0.1%
400 1000 400 84 31270 45.33 0.1%
400 1000 400 85 31310 44.08 0.1%
400 1000 400 86 31180 37.16 0.1%
400 1000 400 87 31150 54.21 0.1%
400 1000 400 88 31260 53.31 0.1%
400 1000 400 89 31420 67.2 0.2%
400 1000 400 90 31180 60.7 0.1%
400 1000 400 91 31210 55.79 0.1%
400 1000 400 92 31210 62.83 0.2%
400 1000 400 93 31120 70.62 0.2%
400 1000 400 94 31220 38.87 0.1%
400 1000 400 95 30980 51.47 0.1%
400 1000 400 96 31160 53.05 0.1%
400 1000 400 97 31250 70.08 0.2%
400 1000 400 98 31200 43.24 0.1%
400 1000 400 99 31130 55 0.1%
400 1000 400 100 31360 52.16 0.1%

Quality and confidence:
param error
v 0.052
n 0.02
a 0.052
w 0.108

Model:
Time ~= 0
+ v 1.46
+ n 0.754
+ a 74.79
+ w 8.108
µs

Reads = 6 + (0 * v) + (0 * n) + (4 * a) + (1 * w)
Writes = 2 + (0 * v) + (0 * n) + (0 * a) + (0 * w)
Pallet: "pallet_staking", Extrinsic: "get_npos_voters", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 0
+ v 29.23
+ n 67.04
+ s 31.75
µs

Reads = 2 + (4 * v) + (3 * n) + (0 * s)
Writes = 0 + (0 * v) + (0 * n) + (0 * s)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
v n s mean µs sigma µs %
200 400 20 32080 60.97 0.1%
204 400 20 31980 47.03 0.1%
208 400 20 31910 63.32 0.1%
212 400 20 32270 61.05 0.1%
216 400 20 32370 79.78 0.2%
220 400 20 32550 93.1 0.2%
224 400 20 32780 53.47 0.1%
228 400 20 32910 31.45 0.0%
232 400 20 32820 54.18 0.1%
236 400 20 32880 78.6 0.2%
240 400 20 32810 78.63 0.2%
244 400 20 32970 45.23 0.1%
248 400 20 33230 62.2 0.1%
252 400 20 33180 55.61 0.1%
256 400 20 33340 40.79 0.1%
260 400 20 33770 64.16 0.1%
264 400 20 33830 89.33 0.2%
268 400 20 33770 58.27 0.1%
272 400 20 33850 63.73 0.1%
276 400 20 33970 102.6 0.3%
280 400 20 34000 55.77 0.1%
284 400 20 34480 28.38 0.0%
288 400 20 34530 98.06 0.2%
292 400 20 34590 93.9 0.2%
296 400 20 34660 121.3 0.3%
300 400 20 34640 61.5 0.1%
304 400 20 34830 73.56 0.2%
308 400 20 34890 153.5 0.4%
312 400 20 34950 73.24 0.2%
316 400 20 35240 69.59 0.1%
320 400 20 35590 73.95 0.2%
324 400 20 35620 95.95 0.2%
328 400 20 35790 77.39 0.2%
332 400 20 35910 59.27 0.1%
336 400 20 35590 122.3 0.3%
340 400 20 35860 65.37 0.1%
344 400 20 36110 82.08 0.2%
348 400 20 36100 67.38 0.1%
352 400 20 36400 82.65 0.2%
356 400 20 36600 56.98 0.1%
360 400 20 36510 171.6 0.4%
364 400 20 36560 117.9 0.3%
368 400 20 36710 68.61 0.1%
372 400 20 36660 69.75 0.1%
376 400 20 36920 104.3 0.2%
380 400 20 36880 133.5 0.3%
384 400 20 37350 104.5 0.2%
388 400 20 37420 40.68 0.1%
392 400 20 37440 97.09 0.2%
396 400 20 37560 128.1 0.3%
400 200 20 24390 39.29 0.1%
400 204 20 24760 40.4 0.1%
400 208 20 25080 117.5 0.4%
400 212 20 25180 68.77 0.2%
400 216 20 25150 29.29 0.1%
400 220 20 25750 47.37 0.1%
400 224 20 25690 55.45 0.2%
400 228 20 26290 92.24 0.3%
400 232 20 26680 62.85 0.2%
400 236 20 26520 67.78 0.2%
400 240 20 26760 114.9 0.4%
400 244 20 27440 53.56 0.1%
400 248 20 27450 138 0.5%
400 252 20 27990 83.22 0.2%
400 256 20 28000 44.32 0.1%
400 260 20 28390 46.85 0.1%
400 264 20 28500 112.7 0.3%
400 268 20 28960 70.16 0.2%
400 272 20 29210 93.46 0.3%
400 276 20 29320 65.5 0.2%
400 280 20 29740 120.7 0.4%
400 284 20 29870 107.6 0.3%
400 288 20 30350 47.54 0.1%
400 292 20 30230 65.79 0.2%
400 296 20 30810 70.07 0.2%
400 300 20 30920 69.68 0.2%
400 304 20 31560 69.51 0.2%
400 308 20 31710 50.66 0.1%
400 312 20 31800 68.34 0.2%
400 316 20 32180 57.94 0.1%
400 320 20 32410 26.6 0.0%
400 324 20 32500 90.22 0.2%
400 328 20 32780 111.5 0.3%
400 332 20 33230 53.88 0.1%
400 336 20 33620 92.42 0.2%
400 340 20 33490 57.94 0.1%
400 344 20 34100 67.78 0.1%
400 348 20 34170 110.3 0.3%
400 352 20 34620 58.39 0.1%
400 356 20 34670 106.2 0.3%
400 360 20 35020 95.56 0.2%
400 364 20 35130 67.82 0.1%
400 368 20 35570 55.77 0.1%
400 372 20 36080 72.61 0.2%
400 376 20 35930 94.26 0.2%
400 380 20 36640 109.2 0.2%
400 384 20 36420 99.5 0.2%
400 388 20 36770 79.45 0.2%
400 392 20 37070 100.3 0.2%
400 396 20 37640 48.68 0.1%
400 400 1 37350 108.7 0.2%
400 400 2 37210 56.28 0.1%
400 400 3 37460 112.8 0.3%
400 400 4 37400 62.82 0.1%
400 400 5 37070 76.01 0.2%
400 400 6 37310 55.26 0.1%
400 400 7 37550 54.89 0.1%
400 400 8 37510 94.67 0.2%
400 400 9 37330 83.55 0.2%
400 400 10 37470 81.24 0.2%
400 400 11 37400 55.19 0.1%
400 400 12 37770 67.48 0.1%
400 400 13 37680 87.52 0.2%
400 400 14 37560 136 0.3%
400 400 15 37590 73.47 0.1%
400 400 16 37560 69.17 0.1%
400 400 17 37740 102.8 0.2%
400 400 18 37890 63.58 0.1%
400 400 19 37650 144.9 0.3%
400 400 20 37880 76.53 0.2%

Quality and confidence:
param error
v 0.094
n 0.094
s 1.283

Model:
Time ~= 0
+ v 29.32
+ n 66.88
+ s 22.99
µs

Reads = 2 + (4 * v) + (3 * n) + (0 * s)
Writes = 0 + (0 * v) + (0 * n) + (0 * s)
Pallet: "pallet_staking", Extrinsic: "get_npos_targets", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 0
+ v 10.96
µs

Reads = 1 + (1 * v)
Writes = 0 + (0 * v)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
v mean µs sigma µs %
200 2085 15.1 0.7%
204 2181 17.58 0.8%
208 2250 15.38 0.6%
212 2288 16.11 0.7%
216 2337 10.69 0.4%
220 2386 13.9 0.5%
224 2393 15.99 0.6%
228 2462 14.12 0.5%
232 2509 17.27 0.6%
236 2563 18.48 0.7%
240 2592 18.61 0.7%
244 2637 14.69 0.5%
248 2628 10.49 0.3%
252 2725 16.15 0.5%
256 2756 19.86 0.7%
260 2846 16.12 0.5%
264 2851 9.869 0.3%
268 2896 13.91 0.4%
272 2989 15.99 0.5%
276 2958 18.28 0.6%
280 2998 12.37 0.4%
284 3122 18.92 0.6%
288 3087 12.26 0.3%
292 3164 12.41 0.3%
296 3195 19.21 0.6%
300 3267 26.75 0.8%
304 3297 20.32 0.6%
308 3343 19.44 0.5%
312 3325 14.55 0.4%
316 3444 23.38 0.6%
320 3413 14.29 0.4%
324 3479 19.7 0.5%
328 3596 17.17 0.4%
332 3571 23.11 0.6%
336 3651 23.44 0.6%
340 3746 20.47 0.5%
344 3672 10.91 0.2%
348 3778 13.97 0.3%
352 3856 26.77 0.6%
356 3845 13.23 0.3%
360 3880 12.92 0.3%
364 3946 15.99 0.4%
368 4007 28.7 0.7%
372 4047 24.13 0.5%
376 4108 27.82 0.6%
380 4139 19.53 0.4%
384 4180 20.43 0.4%
388 4160 15.15 0.3%
392 4203 21.88 0.5%
396 4288 15.8 0.3%
400 4380 38.15 0.8%

Quality and confidence:
param error
v 0.026

Model:
Time ~= 0
+ v 10.97
µs

Reads = 1 + (1 * v)
Writes = 0 + (0 * v)

…/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
Copy link
Contributor

@gui1117 gui1117 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me,

It is a bit unfortunate we iterate 2 times on nominators but I see why it is like this.

frame/staking/src/lib.rs Show resolved Hide resolved
@kianenigma
Copy link
Contributor Author

kianenigma commented Mar 15, 2021

I will mark this as nice-to-have-audit, as it is the direct feedback of the audit team as well, and the fact that the PR barely changes any loigc, just adds better weight logic. But I expect this to be audited next to #8113 as well.

@thiolliere @coriolinus can you please approve the companion as well?

Comment on lines +3359 to +3360
// cached. This is okay for the case of `Ok(_)`, but bad for `Err(_)`, as the trait does not
// report weight in failures.
Copy link
Member

@shawntabrizi shawntabrizi Mar 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why cant it report some partial weight?

Not returning weight in error kind of seems like the exact kind of scenario which is vulnerable to attack.

If err, we should assume worst case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now this is not a user-triggered event, so it won't be a serious damage. Rest assured, I've documented this flaw and it will be treated:

Screenshot 2021-03-16 at 07 13 29

(Once this line of work is done I will convert all these notes to issues)

Copy link
Member

@shawntabrizi shawntabrizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks okay to me. There are so many logical paths this code can go down, it is not very great for weights tbh

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
@kianenigma
Copy link
Contributor Author

looks okay to me. There are so many logical paths this code can go down, it is not very great for weights tbh

This pallet is quite a weight-hell.

@gavofyork gavofyork merged commit 8a4aeba into master Mar 16, 2021
@gavofyork gavofyork deleted the kiz-election-provider-2-audit branch March 16, 2021 11:44
hirschenberger pushed a commit to hirschenberger/substrate that referenced this pull request Apr 14, 2021
* Base features and traits.

* pallet and unsigned phase

* Undo bad formattings.

* some formatting cleanup.

* Small self-cleanup.

* Make it all build

* self-review

* Some doc tests.

* Some changes from other PR

* Fix session test

* Update Cargo.lock

* Update frame/election-provider-multi-phase/src/lib.rs

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>

* Some review comments

* Rename + make encode/decode

* Do an assert as well, just in case.

* Fix build

* Update frame/election-provider-multi-phase/src/unsigned.rs

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>

* Las comment

* fix staking fuzzer.

* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* Add one last layer of feasibility check as well.

* Last fixes to benchmarks

* Some more docs.

* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* Some nits

* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* Fix doc

* Mkae ci green

* Audit fixes for election-provider: part 2 signed phase.

* Fix weight

* Some grumbles.

* Try and weigh to get_npos_voters

* Fix build

* Fix line width

* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* Fix tests.

* Fix build

* Reorg some stuff

* More reorg.

* Reorg done.

* Fix build

* Another rename

* Fix build

* Update frame/election-provider-multi-phase/src/mock.rs

Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>

* nit

* better doc

* Line width

* Fix build

* Self-review

* Self-review

* Fix wan

* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* fix build and review comments.

* Update frame/election-provider-multi-phase/src/lib.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* add comment

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Move ElectionProvider traits to /frame
6 participants