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

Assets: Remove zombies, introduce approvals #8220

Merged
merged 66 commits into from
Mar 9, 2021
Merged

Conversation

gavofyork
Copy link
Member

@gavofyork gavofyork commented Feb 27, 2021

Removed the concept of zombies; assets may be self-sufficient (in which case their min-balance actually provides enough value lockup to allow for the storage) or otherwise all non-zero account balances must have a consumer reference (so the account must have some primary balance ED or other provider reference).

Also added the concept of approvals; these work in a similar way to ERC-20 style approvals and allow for an asset owner to distribute assets without needing to pre-fund each account with an existential deposit. A deposit (in the primary token) must be made for each asset distributed, but that may be retracted at any time and the deposit freed.

Also adds transfer_keep_alive, which has a similiar purpose to its namesake in Balances pallet.

TODO:

  • Tests
  • Benchmarks/weights
  • Document new dispatches
  • Document changes

Includes #8221

@gavofyork gavofyork added A0-please_review Pull request needs code review. B7-runtimenoteworthy C1-low PR touches the given topic and has a low impact on builders. D9-needsaudit 👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited labels Feb 27, 2021
@gavofyork gavofyork changed the title Assets: Remove zombies, introduce approvals & self-sufficient assets Assets: Remove zombies, introduce approvals Feb 27, 2021
@gavofyork gavofyork closed this Feb 28, 2021
@gavofyork gavofyork reopened this Feb 28, 2021
@gavofyork
Copy link
Member Author

@shawntabrizi should be good to go.

@parity-benchapp
Copy link

parity-benchapp bot commented Mar 8, 2021

Finished benchmark for branch: gav-assets-approve-api

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_assets --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs

Results

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

-- Extrinsic Time --

Model:
Time ~= 48.51
µs

Reads = 1
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 48.51
µs

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

-- Extrinsic Time --

Model:
Time ~= 24.46
µs

Reads = 1
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 24.46
µs

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

-- Extrinsic Time --

Model:
Time ~= 0
+ c 24.91
+ s 31.05
+ a 0.968
µs

Reads = 4 + (2 * c) + (2 * s) + (0 * a)
Writes = 2 + (2 * c) + (2 * s) + (1 * a)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
c s a mean µs sigma µs %
0 5000 500 143300 327.4 0.2%
100 5000 500 143200 197 0.1%
200 5000 500 147600 148.6 0.1%
300 5000 500 147800 241.2 0.1%
400 5000 500 152400 477.5 0.3%
500 5000 500 151000 127 0.0%
600 5000 500 157700 348 0.2%
700 5000 500 158900 293 0.1%
800 5000 500 160800 331.6 0.2%
900 5000 500 164200 269.8 0.1%
1000 5000 500 166000 438.9 0.2%
1100 5000 500 169300 246 0.1%
1200 5000 500 169100 152.5 0.0%
1300 5000 500 174100 355.8 0.2%
1400 5000 500 174000 677.6 0.3%
1500 5000 500 177700 465 0.2%
1600 5000 500 181600 406.4 0.2%
1700 5000 500 180500 270.3 0.1%
1800 5000 500 184500 515.7 0.2%
1900 5000 500 188000 263.2 0.1%
2000 5000 500 189400 384 0.2%
2100 5000 500 192900 522.1 0.2%
2200 5000 500 195800 373 0.1%
2300 5000 500 201400 433.2 0.2%
2400 5000 500 203900 346 0.1%
2500 5000 500 202900 338.6 0.1%
2600 5000 500 208100 259 0.1%
2700 5000 500 210700 379.9 0.1%
2800 5000 500 209200 266.4 0.1%
2900 5000 500 214400 436.6 0.2%
3000 5000 500 216600 653.7 0.3%
3100 5000 500 217400 347.1 0.1%
3200 5000 500 223000 447.2 0.2%
3300 5000 500 226000 720 0.3%
3400 5000 500 225100 712.1 0.3%
3500 5000 500 229900 605.7 0.2%
3600 5000 500 232700 702.9 0.3%
3700 5000 500 235300 204.5 0.0%
3800 5000 500 238000 382.9 0.1%
3900 5000 500 238600 459.8 0.1%
4000 5000 500 243000 406.1 0.1%
4100 5000 500 244200 534.7 0.2%
4200 5000 500 244900 446.5 0.1%
4300 5000 500 248900 593.1 0.2%
4400 5000 500 247500 820.6 0.3%
4500 5000 500 250700 827.1 0.3%
4600 5000 500 257300 499.1 0.1%
4700 5000 500 258100 444.2 0.1%
4800 5000 500 259500 354.6 0.1%
4900 5000 500 261600 539.7 0.2%
5000 0 500 110800 228.6 0.2%
5000 100 500 113600 284.2 0.2%
5000 200 500 118800 474.3 0.3%
5000 300 500 120000 294.8 0.2%
5000 400 500 124000 507.3 0.4%
5000 500 500 127300 204.9 0.1%
5000 600 500 129300 288.8 0.2%
5000 700 500 132200 285.7 0.2%
5000 800 500 133600 505.8 0.3%
5000 900 500 138300 210.8 0.1%
5000 1000 500 142400 182.3 0.1%
5000 1100 500 144500 416.6 0.2%
5000 1200 500 148000 205.5 0.1%
5000 1300 500 149100 293.5 0.1%
5000 1400 500 153800 390.3 0.2%
5000 1500 500 157700 324.7 0.2%
5000 1600 500 157100 325.3 0.2%
5000 1700 500 163600 294 0.1%
5000 1800 500 163400 175 0.1%
5000 1900 500 169600 358.7 0.2%
5000 2000 500 172200 595.6 0.3%
5000 2100 500 171500 338.9 0.1%
5000 2200 500 177100 302 0.1%
5000 2300 500 181200 370.3 0.2%
5000 2400 500 186500 273.5 0.1%
5000 2500 500 189000 272.9 0.1%
5000 2600 500 190400 773.1 0.4%
5000 2700 500 195000 684.4 0.3%
5000 2800 500 198200 496.4 0.2%
5000 2900 500 199800 288.3 0.1%
5000 3000 500 205000 295.3 0.1%
5000 3100 500 208000 326.2 0.1%
5000 3200 500 211000 273.2 0.1%
5000 3300 500 214800 359.5 0.1%
5000 3400 500 218100 213.5 0.0%
5000 3500 500 221000 540.7 0.2%
5000 3600 500 222200 425.1 0.1%
5000 3700 500 227500 398.7 0.1%
5000 3800 500 230500 540.2 0.2%
5000 3900 500 232400 692.3 0.2%
5000 4000 500 232100 442.4 0.1%
5000 4100 500 237700 308.9 0.1%
5000 4200 500 242400 519.6 0.2%
5000 4300 500 244000 403.1 0.1%
5000 4400 500 248300 331.5 0.1%
5000 4500 500 251200 440.7 0.1%
5000 4600 500 253100 419.8 0.1%
5000 4700 500 252100 294.7 0.1%
5000 4800 500 259000 370 0.1%
5000 4900 500 255500 415.5 0.1%
5000 5000 0 264300 404.8 0.1%
5000 5000 10 265400 343 0.1%
5000 5000 20 263900 844.5 0.3%
5000 5000 30 261100 457.2 0.1%
5000 5000 40 264200 457.1 0.1%
5000 5000 50 264200 674.6 0.2%
5000 5000 60 264300 753.8 0.2%
5000 5000 70 263000 524.7 0.1%
5000 5000 80 263700 432.9 0.1%
5000 5000 90 264100 544.1 0.2%
5000 5000 100 265900 376.9 0.1%
5000 5000 110 264800 666.7 0.2%
5000 5000 120 260600 498.7 0.1%
5000 5000 130 266300 579.3 0.2%
5000 5000 140 263500 287 0.1%
5000 5000 150 265100 618.6 0.2%
5000 5000 160 261600 262 0.1%
5000 5000 170 265200 569.6 0.2%
5000 5000 180 266200 704.4 0.2%
5000 5000 190 267000 573.7 0.2%
5000 5000 200 263100 498.8 0.1%
5000 5000 210 264800 425.8 0.1%
5000 5000 220 266500 630.6 0.2%
5000 5000 230 264100 548.1 0.2%
5000 5000 240 265200 417.7 0.1%
5000 5000 250 262900 345.5 0.1%
5000 5000 260 259900 909.6 0.3%
5000 5000 270 266200 286.2 0.1%
5000 5000 280 261700 482.5 0.1%
5000 5000 290 262100 465.7 0.1%
5000 5000 300 263000 692.8 0.2%
5000 5000 310 265200 534.9 0.2%
5000 5000 320 261400 807.5 0.3%
5000 5000 330 261100 438.7 0.1%
5000 5000 340 258900 303.4 0.1%
5000 5000 350 261700 584.4 0.2%
5000 5000 360 266000 572.5 0.2%
5000 5000 370 264900 360.7 0.1%
5000 5000 380 259200 773.2 0.2%
5000 5000 390 265600 523.9 0.1%
5000 5000 400 264900 421.1 0.1%
5000 5000 410 261500 721.6 0.2%
5000 5000 420 264700 539.5 0.2%
5000 5000 430 261700 806.4 0.3%
5000 5000 440 267500 568.3 0.2%
5000 5000 450 264300 785 0.2%
5000 5000 460 265500 578.5 0.2%
5000 5000 470 261800 738.2 0.2%
5000 5000 480 265300 355.7 0.1%
5000 5000 490 265000 436.9 0.1%
5000 5000 500 265800 491.7 0.1%

Quality and confidence:
param error
c 0.041
s 0.041
a 0.416

Model:
Time ~= 0
+ c 24.65
+ s 30.83
+ a 3.333
µs

Reads = 4 + (2 * c) + (2 * s) + (0 * a)
Writes = 2 + (2 * c) + (2 * s) + (1 * a)
Pallet: "pallet_assets", Extrinsic: "mint", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 46.91
µs

Reads = 2
Writes = 2
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 46.91
µs

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

-- Extrinsic Time --

Model:
Time ~= 47.04
µs

Reads = 2
Writes = 2
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 47.04
µs

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

-- Extrinsic Time --

Model:
Time ~= 71.53
µs

Reads = 4
Writes = 4
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 71.53
µs

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

-- Extrinsic Time --

Model:
Time ~= 71.71
µs

Reads = 4
Writes = 4
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 71.71
µs

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

-- Extrinsic Time --

Model:
Time ~= 34.81
µs

Reads = 2
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 34.81
µs

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

-- Extrinsic Time --

Model:
Time ~= 34.89
µs

Reads = 2
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 34.89
µs

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

-- Extrinsic Time --

Model:
Time ~= 24.65
µs

Reads = 1
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 24.65
µs

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

-- Extrinsic Time --

Model:
Time ~= 24.86
µs

Reads = 1
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 24.86
µs

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

-- Extrinsic Time --

Model:
Time ~= 28.42
µs

Reads = 2
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 28.42
µs

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

-- Extrinsic Time --

Model:
Time ~= 25.37
µs

Reads = 1
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 25.37
µs

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

-- Extrinsic Time --

Model:
Time ~= 53.86
+ n 0.002
+ s 0.005
µs

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

-- Extrinsic Time --

Data points distribution:
n s mean µs sigma µs %
0 50 53.88 0.134 0.2%
1 50 54.19 0.158 0.2%
2 50 54 0.146 0.2%
3 50 54.41 0.085 0.1%
4 50 54.06 0.123 0.2%
5 50 54.29 0.116 0.2%
6 50 54.09 0.083 0.1%
7 50 53.92 0.119 0.2%
8 50 54.66 0.11 0.2%
9 50 54.71 0.34 0.6%
10 50 54.22 0.144 0.2%
11 50 53.98 0.089 0.1%
12 50 54.02 0.151 0.2%
13 50 54.36 0.147 0.2%
14 50 53.84 0.153 0.2%
15 50 54.22 0.089 0.1%
16 50 54.01 0.135 0.2%
17 50 54.08 0.105 0.1%
18 50 54.29 0.131 0.2%
19 50 54.15 0.132 0.2%
20 50 53.98 0.072 0.1%
21 50 54.42 0.131 0.2%
22 50 54.13 0.096 0.1%
23 50 54.01 0.046 0.0%
24 50 54.22 0.086 0.1%
25 50 54.16 0.058 0.1%
26 50 53.94 0.079 0.1%
27 50 54.42 0.166 0.3%
28 50 54.27 0.111 0.2%
29 50 54.23 0.074 0.1%
30 50 54.43 0.134 0.2%
31 50 54.14 0.072 0.1%
32 50 54.3 0.123 0.2%
33 50 54.24 0.076 0.1%
34 50 54.07 0.059 0.1%
35 50 54.43 0.141 0.2%
36 50 54.19 0.129 0.2%
37 50 54.44 0.139 0.2%
38 50 54.45 0.085 0.1%
39 50 54.5 0.064 0.1%
40 50 54.25 0.076 0.1%
41 50 54.43 0.087 0.1%
42 50 54.44 0.159 0.2%
43 50 54.24 0.134 0.2%
44 50 54.39 0.175 0.3%
45 50 54.32 0.13 0.2%
46 50 54.12 0.083 0.1%
47 50 54.3 0.11 0.2%
48 50 54.01 0.098 0.1%
49 50 54.12 0.18 0.3%
50 0 53.43 0.171 0.3%
50 1 53.68 0.087 0.1%
50 2 53.78 0.065 0.1%
50 3 53.97 0.113 0.2%
50 4 53.81 0.106 0.1%
50 5 54.24 0.182 0.3%
50 6 53.86 0.077 0.1%
50 7 53.88 0.097 0.1%
50 8 53.75 0.092 0.1%
50 9 53.68 0.091 0.1%
50 10 53.98 0.1 0.1%
50 11 53.75 0.119 0.2%
50 12 54.2 0.21 0.3%
50 13 53.78 0.092 0.1%
50 14 53.98 0.125 0.2%
50 15 53.82 0.107 0.1%
50 16 54.19 0.16 0.2%
50 17 53.79 0.127 0.2%
50 18 53.97 0.089 0.1%
50 19 53.66 0.099 0.1%
50 20 54.09 0.105 0.1%
50 21 53.8 0.073 0.1%
50 22 54.01 0.104 0.1%
50 23 54.11 0.134 0.2%
50 24 53.99 0.086 0.1%
50 25 54.1 0.114 0.2%
50 26 54.11 0.135 0.2%
50 27 53.93 0.066 0.1%
50 28 54.28 0.111 0.2%
50 29 53.96 0.15 0.2%
50 30 53.84 0.122 0.2%
50 31 53.81 0.063 0.1%
50 32 53.94 0.134 0.2%
50 33 54.04 0.065 0.1%
50 34 53.92 0.141 0.2%
50 35 54.11 0.112 0.2%
50 36 54.01 0.173 0.3%
50 37 54.03 0.096 0.1%
50 38 53.87 0.087 0.1%
50 39 53.93 0.136 0.2%
50 40 53.92 0.123 0.2%
50 41 53.84 0.119 0.2%
50 42 54.22 0.059 0.1%
50 43 53.94 0.096 0.1%
50 44 54.29 0.182 0.3%
50 45 53.9 0.08 0.1%
50 46 54.19 0.154 0.2%
50 47 54.01 0.141 0.2%
50 48 54.14 0.097 0.1%
50 49 54.07 0.068 0.1%
50 50 54.05 0.087 0.1%

Quality and confidence:
param error
n 0
s 0

Model:
Time ~= 53.78
+ n 0
+ s 0.008
µs

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

-- Extrinsic Time --

Model:
Time ~= 52.2
µs

Reads = 2
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 52.2
µs

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

-- Extrinsic Time --

Model:
Time ~= 27.23
+ n 0.003
+ s 0.005
µs

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

-- Extrinsic Time --

Data points distribution:
n s mean µs sigma µs %
0 50 27.03 0.112 0.4%
1 50 27.26 0.052 0.1%
2 50 27.39 0.076 0.2%
3 50 27.28 0.108 0.3%
4 50 27.43 0.061 0.2%
5 50 27.53 0.144 0.5%
6 50 27.41 0.068 0.2%
7 50 27.52 0.072 0.2%
8 50 27.77 0.097 0.3%
9 50 27.77 0.069 0.2%
10 50 27.48 0.069 0.2%
11 50 27.53 0.049 0.1%
12 50 27.68 0.066 0.2%
13 50 27.64 0.068 0.2%
14 50 27.55 0.042 0.1%
15 50 27.5 0.087 0.3%
16 50 27.63 0.068 0.2%
17 50 27.57 0.035 0.1%
18 50 27.56 0.077 0.2%
19 50 27.49 0.075 0.2%
20 50 27.49 0.057 0.2%
21 50 27.67 0.066 0.2%
22 50 27.6 0.092 0.3%
23 50 27.6 0.071 0.2%
24 50 27.59 0.06 0.2%
25 50 27.67 0.09 0.3%
26 50 27.63 0.063 0.2%
27 50 27.58 0.052 0.1%
28 50 27.64 0.078 0.2%
29 50 27.62 0.061 0.2%
30 50 27.63 0.103 0.3%
31 50 27.54 0.09 0.3%
32 50 27.56 0.071 0.2%
33 50 27.65 0.076 0.2%
34 50 27.61 0.069 0.2%
35 50 27.69 0.08 0.2%
36 50 27.78 0.052 0.1%
37 50 27.79 0.089 0.3%
38 50 27.62 0.104 0.3%
39 50 27.7 0.086 0.3%
40 50 27.81 0.117 0.4%
41 50 27.67 0.115 0.4%
42 50 27.8 0.098 0.3%
43 50 27.84 0.071 0.2%
44 50 27.76 0.081 0.2%
45 50 27.74 0.063 0.2%
46 50 27.35 0.077 0.2%
47 50 27.45 0.075 0.2%
48 50 27.37 0.061 0.2%
49 50 27.41 0.069 0.2%
50 0 26.87 0.049 0.1%
50 1 27.23 0.069 0.2%
50 2 27.23 0.098 0.3%
50 3 27.32 0.06 0.2%
50 4 27.25 0.116 0.4%
50 5 27.34 0.104 0.3%
50 6 27.32 0.157 0.5%
50 7 27.26 0.055 0.2%
50 8 27.35 0.064 0.2%
50 9 27.32 0.092 0.3%
50 10 27.46 0.096 0.3%
50 11 27.4 0.068 0.2%
50 12 27.32 0.091 0.3%
50 13 27.38 0.023 0.0%
50 14 27.2 0.059 0.2%
50 15 27.38 0.077 0.2%
50 16 27.36 0.057 0.2%
50 17 27.55 0.117 0.4%
50 18 27.33 0.055 0.2%
50 19 27.54 0.087 0.3%
50 20 27.44 0.099 0.3%
50 21 27.39 0.087 0.3%
50 22 27.4 0.135 0.4%
50 23 27.41 0.123 0.4%
50 24 27.29 0.08 0.2%
50 25 27.45 0.055 0.2%
50 26 27.3 0.078 0.2%
50 27 27.44 0.11 0.4%
50 28 27.4 0.062 0.2%
50 29 27.31 0.03 0.1%
50 30 27.47 0.092 0.3%
50 31 27.34 0.049 0.1%
50 32 27.45 0.069 0.2%
50 33 27.43 0.049 0.1%
50 34 27.28 0.098 0.3%
50 35 27.53 0.137 0.4%
50 36 27.38 0.05 0.1%
50 37 27.56 0.046 0.1%
50 38 27.51 0.043 0.1%
50 39 27.45 0.056 0.2%
50 40 27.38 0.053 0.1%
50 41 27.45 0.071 0.2%
50 42 27.37 0.04 0.1%
50 43 27.44 0.106 0.3%
50 44 27.48 0.092 0.3%
50 45 27.52 0.044 0.1%
50 46 27.43 0.075 0.2%
50 47 27.44 0.06 0.2%
50 48 27.61 0.095 0.3%
50 49 27.63 0.075 0.2%
50 50 27.52 0.061 0.2%

Quality and confidence:
param error
n 0
s 0

Model:
Time ~= 27.12
+ n 0.002
+ s 0.008
µs

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

-- Extrinsic Time --

Model:
Time ~= 52.37
µs

Reads = 2
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 52.37
µs

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

-- Extrinsic Time --

Model:
Time ~= 23.83
µs

Reads = 1
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 23.83
µs

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

-- Extrinsic Time --

Model:
Time ~= 48.43
µs

Reads = 1
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 48.43
µs

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

-- Extrinsic Time --

Model:
Time ~= 91.81
µs

Reads = 5
Writes = 5
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 91.81
µs

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

-- Extrinsic Time --

Model:
Time ~= 49.21
µs

Reads = 1
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 49.21
µs

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

-- Extrinsic Time --

Model:
Time ~= 56.05
µs

Reads = 2
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 56.05
µs

Reads = 2
Writes = 1

…/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_assets --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn transfer() -> Weight {
(42_211_000 as Weight)
(71_531_000 as Weight)
Copy link
Member Author

Choose a reason for hiding this comment

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

This still doesn't look good. Increase of 75% in time to execute...

Copy link
Member Author

@gavofyork gavofyork Mar 8, 2021

Choose a reason for hiding this comment

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

As far as I can tell, it's down to the fact that the new code always bumps reference in the system account, whereas the old code didn't need to if it was a zombie (which is the case with the old benchmarking). odd that reading a storage item and bumping a reference would cost so much.

Copy link
Member Author

Choose a reason for hiding this comment

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

Introduced transfer_keep_alive which should have a lower weight since it will never result in the source account getting killed.

.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn burn() -> Weight {
(29_245_000 as Weight)
(47_042_000 as Weight)
Copy link
Member Author

Choose a reason for hiding this comment

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

suspicious.

}
fn mint() -> Weight {
(32_995_000 as Weight)
(46_912_000 as Weight)
Copy link
Member Author

Choose a reason for hiding this comment

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

suspicious

@gavofyork
Copy link
Member Author

/benchmark runtime pallet pallet_assets

@parity-benchapp
Copy link

parity-benchapp bot commented Mar 8, 2021

Finished benchmark for branch: gav-assets-approve-api

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_assets --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs

Results

Compiling node-runtime v2.0.1 (/home/shawntabrizi/bench-bot/git/substrate/bin/node/runtime)
Compiling pallet-assets v3.0.0 (/home/shawntabrizi/bench-bot/git/substrate/frame/assets)
Compiling node-cli v2.0.0 (/home/shawntabrizi/bench-bot/git/substrate/bin/node/cli)
error[E0599]: no function or associated item named force_destroy found for associated type <T as pallet::Config>::WeightInfo in the current scope
--> frame/assets/src/lib.rs:553:35
|
553 | #[pallet::weight(T::WeightInfo::force_destroy(
| ^^^^^^^^^^^^^ function or associated item not found in <T as pallet::Config>::WeightInfo

error[E0308]: mismatched types
--> frame/assets/src/lib.rs:430:12
|
430 | #[pallet::call]
| ^^^^ expected trait ClassifyDispatch, found trait WeighData
|
= note: expected reference &dyn ClassifyDispatch<(&<T as pallet::Config>::AssetId, &DestroyWitness)>
found reference &dyn WeighData<(&<T as pallet::Config>::AssetId, &DestroyWitness)>

error[E0308]: mismatched types
--> frame/assets/src/lib.rs:430:12
|
430 | #[pallet::call]
| ^^^^ expected trait PaysFee, found trait WeighData
|
= note: expected reference &dyn PaysFee<(&<T as pallet::Config>::AssetId, &DestroyWitness)>
found reference &dyn WeighData<(&<T as pallet::Config>::AssetId, &DestroyWitness)>

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0308, E0599.
For more information about an error, try rustc --explain E0308.
error: could not compile pallet-assets

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

@gavofyork
Copy link
Member Author

/benchmark runtime pallet pallet_assets

@parity-benchapp
Copy link

parity-benchapp bot commented Mar 8, 2021

Finished benchmark for branch: gav-assets-approve-api

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_assets --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs

Results

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

-- Extrinsic Time --

Model:
Time ~= 48.3
µs

Reads = 1
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 48.3
µs

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

-- Extrinsic Time --

Model:
Time ~= 23.82
µs

Reads = 1
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 23.82
µs

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

-- Extrinsic Time --

Model:
Time ~= 0
+ c 24.48
+ s 30.63
+ a 0
µs

Reads = 4 + (2 * c) + (2 * s) + (0 * a)
Writes = 2 + (2 * c) + (2 * s) + (1 * a)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
c s a mean µs sigma µs %
0 5000 500 141000 275.2 0.1%
100 5000 500 144900 425.8 0.2%
200 5000 500 146900 261.2 0.1%
300 5000 500 148800 521.8 0.3%
400 5000 500 151200 398.2 0.2%
500 5000 500 150900 177 0.1%
600 5000 500 153800 358.3 0.2%
700 5000 500 158800 247.7 0.1%
800 5000 500 159700 302 0.1%
900 5000 500 161400 280.2 0.1%
1000 5000 500 165100 255.5 0.1%
1100 5000 500 166100 282.4 0.1%
1200 5000 500 170800 370 0.2%
1300 5000 500 171800 509.2 0.2%
1400 5000 500 173500 333.4 0.1%
1500 5000 500 178000 332.9 0.1%
1600 5000 500 180600 351.3 0.1%
1700 5000 500 179800 271 0.1%
1800 5000 500 184900 400.1 0.2%
1900 5000 500 187000 322.3 0.1%
2000 5000 500 187700 622.1 0.3%
2100 5000 500 191600 299 0.1%
2200 5000 500 195400 405.9 0.2%
2300 5000 500 196800 243.5 0.1%
2400 5000 500 200800 620.6 0.3%
2500 5000 500 202400 753.3 0.3%
2600 5000 500 206600 468.6 0.2%
2700 5000 500 209300 299.9 0.1%
2800 5000 500 210000 91.37 0.0%
2900 5000 500 211500 468.4 0.2%
3000 5000 500 214800 369.8 0.1%
3100 5000 500 218200 693.4 0.3%
3200 5000 500 221100 514.7 0.2%
3300 5000 500 221200 564.1 0.2%
3400 5000 500 225700 820.2 0.3%
3500 5000 500 228200 393.3 0.1%
3600 5000 500 230300 399.2 0.1%
3700 5000 500 227500 249.3 0.1%
3800 5000 500 232500 572.2 0.2%
3900 5000 500 237400 453.9 0.1%
4000 5000 500 240500 357.8 0.1%
4100 5000 500 240600 1023 0.4%
4200 5000 500 243700 513.5 0.2%
4300 5000 500 245900 577.2 0.2%
4400 5000 500 249900 466.9 0.1%
4500 5000 500 251800 587.1 0.2%
4600 5000 500 253400 539.3 0.2%
4700 5000 500 251100 402.1 0.1%
4800 5000 500 257900 643.9 0.2%
4900 5000 500 259300 524.6 0.2%
5000 0 500 108500 342.4 0.3%
5000 100 500 113600 311.9 0.2%
5000 200 500 116700 225.3 0.1%
5000 300 500 119800 336.7 0.2%
5000 400 500 120500 202.8 0.1%
5000 500 500 125200 319.6 0.2%
5000 600 500 127300 241 0.1%
5000 700 500 130800 199.1 0.1%
5000 800 500 134600 155.5 0.1%
5000 900 500 136600 401.5 0.2%
5000 1000 500 139000 553.4 0.3%
5000 1100 500 143600 200.8 0.1%
5000 1200 500 146200 351.5 0.2%
5000 1300 500 148600 328.6 0.2%
5000 1400 500 152000 203.3 0.1%
5000 1500 500 154600 242 0.1%
5000 1600 500 158200 241.4 0.1%
5000 1700 500 160700 332.5 0.2%
5000 1800 500 163900 295.4 0.1%
5000 1900 500 166900 196.2 0.1%
5000 2000 500 171500 334.7 0.1%
5000 2100 500 173000 207.7 0.1%
5000 2200 500 179000 181.8 0.1%
5000 2300 500 182000 220.2 0.1%
5000 2400 500 184400 400.5 0.2%
5000 2500 500 188400 160.6 0.0%
5000 2600 500 190800 462.6 0.2%
5000 2700 500 192700 406.8 0.2%
5000 2800 500 196800 191.3 0.0%
5000 2900 500 197400 398.4 0.2%
5000 3000 500 204800 334.4 0.1%
5000 3100 500 205300 427.9 0.2%
5000 3200 500 208100 281.7 0.1%
5000 3300 500 210700 677.4 0.3%
5000 3400 500 214500 447.2 0.2%
5000 3500 500 219400 293.6 0.1%
5000 3600 500 220800 229.9 0.1%
5000 3700 500 222300 758.5 0.3%
5000 3800 500 229000 320.8 0.1%
5000 3900 500 230300 464.7 0.2%
5000 4000 500 228400 285.1 0.1%
5000 4100 500 236800 514.3 0.2%
5000 4200 500 240100 432.7 0.1%
5000 4300 500 242200 545.6 0.2%
5000 4400 500 241600 511.8 0.2%
5000 4500 500 247100 462.7 0.1%
5000 4600 500 247900 682.3 0.2%
5000 4700 500 251400 843.3 0.3%
5000 4800 500 256100 728.1 0.2%
5000 4900 500 257700 533.6 0.2%
5000 5000 0 260600 653.8 0.2%
5000 5000 10 263800 572.3 0.2%
5000 5000 20 261100 495 0.1%
5000 5000 30 262800 536.3 0.2%
5000 5000 40 262200 596.2 0.2%
5000 5000 50 261000 546.9 0.2%
5000 5000 60 261800 464.2 0.1%
5000 5000 70 259300 883.6 0.3%
5000 5000 80 262300 637.3 0.2%
5000 5000 90 257100 389.4 0.1%
5000 5000 100 263800 730.8 0.2%
5000 5000 110 261500 784.3 0.2%
5000 5000 120 261500 487.3 0.1%
5000 5000 130 263400 618.4 0.2%
5000 5000 140 262900 509.3 0.1%
5000 5000 150 264000 440.8 0.1%
5000 5000 160 259300 672.1 0.2%
5000 5000 170 261900 386.2 0.1%
5000 5000 180 263100 550.4 0.2%
5000 5000 190 259800 463.3 0.1%
5000 5000 200 259500 737.3 0.2%
5000 5000 210 263500 774.5 0.2%
5000 5000 220 263200 586.9 0.2%
5000 5000 230 261500 336.5 0.1%
5000 5000 240 263200 493.3 0.1%
5000 5000 250 262700 594.3 0.2%
5000 5000 260 260400 537.6 0.2%
5000 5000 270 262800 480.9 0.1%
5000 5000 280 260000 521.3 0.2%
5000 5000 290 257800 816.8 0.3%
5000 5000 300 262500 528.3 0.2%
5000 5000 310 260100 890.1 0.3%
5000 5000 320 263800 649.6 0.2%
5000 5000 330 258000 415 0.1%
5000 5000 340 257400 461.8 0.1%
5000 5000 350 261900 586.1 0.2%
5000 5000 360 264500 531.1 0.2%
5000 5000 370 263000 503.9 0.1%
5000 5000 380 257700 728.9 0.2%
5000 5000 390 260100 321.5 0.1%
5000 5000 400 262100 389.7 0.1%
5000 5000 410 259800 446 0.1%
5000 5000 420 263300 420.7 0.1%
5000 5000 430 263400 342.2 0.1%
5000 5000 440 265000 599.2 0.2%
5000 5000 450 258200 523.7 0.2%
5000 5000 460 260900 835.5 0.3%
5000 5000 470 263200 681.3 0.2%
5000 5000 480 258900 536.7 0.2%
5000 5000 490 260000 455.9 0.1%
5000 5000 500 262400 485.6 0.1%

Quality and confidence:
param error
c 0.038
s 0.038
a 0.383

Model:
Time ~= 0
+ c 24.23
+ s 30.46
+ a 2.343
µs

Reads = 4 + (2 * c) + (2 * s) + (0 * a)
Writes = 2 + (2 * c) + (2 * s) + (1 * a)
Pallet: "pallet_assets", Extrinsic: "mint", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 46.43
µs

Reads = 2
Writes = 2
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 46.43
µs

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

-- Extrinsic Time --

Model:
Time ~= 46
µs

Reads = 2
Writes = 2
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 46
µs

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

-- Extrinsic Time --

Model:
Time ~= 70.79
µs

Reads = 4
Writes = 4
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 70.79
µs

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

-- Extrinsic Time --

Model:
Time ~= 57.45
µs

Reads = 4
Writes = 4
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 57.45
µs

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

-- Extrinsic Time --

Model:
Time ~= 70.96
µs

Reads = 4
Writes = 4
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 70.96
µs

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

-- Extrinsic Time --

Model:
Time ~= 34.29
µs

Reads = 2
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 34.29
µs

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

-- Extrinsic Time --

Model:
Time ~= 34.41
µs

Reads = 2
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 34.41
µs

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

-- Extrinsic Time --

Model:
Time ~= 24.37
µs

Reads = 1
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 24.37
µs

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

-- Extrinsic Time --

Model:
Time ~= 24.09
µs

Reads = 1
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 24.09
µs

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

-- Extrinsic Time --

Model:
Time ~= 28.56
µs

Reads = 2
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 28.56
µs

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

-- Extrinsic Time --

Model:
Time ~= 25.29
µs

Reads = 1
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 25.29
µs

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

-- Extrinsic Time --

Model:
Time ~= 53.46
+ n 0
+ s 0.005
µs

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

-- Extrinsic Time --

Data points distribution:
n s mean µs sigma µs %
0 50 53.29 0.178 0.3%
1 50 53.55 0.075 0.1%
2 50 53.72 0.104 0.1%
3 50 53.61 0.11 0.2%
4 50 53.93 0.044 0.0%
5 50 53.65 0.11 0.2%
6 50 53.49 0.124 0.2%
7 50 54 0.109 0.2%
8 50 53.79 0.114 0.2%
9 50 54.08 0.074 0.1%
10 50 53.75 0.118 0.2%
11 50 53.8 0.101 0.1%
12 50 53.55 0.092 0.1%
13 50 53.69 0.076 0.1%
14 50 53.65 0.109 0.2%
15 50 53.92 0.075 0.1%
16 50 53.71 0.154 0.2%
17 50 53.95 0.099 0.1%
18 50 53.69 0.095 0.1%
19 50 53.8 0.066 0.1%
20 50 53.61 0.093 0.1%
21 50 53.94 0.084 0.1%
22 50 53.7 0.134 0.2%
23 50 53.51 0.097 0.1%
24 50 53.85 0.073 0.1%
25 50 53.78 0.138 0.2%
26 50 53.6 0.172 0.3%
27 50 53.67 0.067 0.1%
28 50 53.42 0.068 0.1%
29 50 53.54 0.051 0.0%
30 50 53.84 0.135 0.2%
31 50 53.66 0.088 0.1%
32 50 53.7 0.16 0.2%
33 50 53.54 0.112 0.2%
34 50 53.75 0.118 0.2%
35 50 53.74 0.096 0.1%
36 50 53.77 0.079 0.1%
37 50 53.73 0.055 0.1%
38 50 53.75 0.064 0.1%
39 50 53.65 0.118 0.2%
40 50 53.96 0.088 0.1%
41 50 53.71 0.15 0.2%
42 50 53.81 0.144 0.2%
43 50 53.48 0.067 0.1%
44 50 53.86 0.109 0.2%
45 50 53.73 0.115 0.2%
46 50 53.57 0.084 0.1%
47 50 53.45 0.092 0.1%
48 50 53.69 0.129 0.2%
49 50 53.59 0.141 0.2%
50 0 52.58 0.079 0.1%
50 1 53.17 0.088 0.1%
50 2 53.37 0.078 0.1%
50 3 53.36 0.082 0.1%
50 4 53.3 0.091 0.1%
50 5 53.29 0.078 0.1%
50 6 53.32 0.168 0.3%
50 7 53.39 0.097 0.1%
50 8 53.46 0.112 0.2%
50 9 53.46 0.087 0.1%
50 10 53.5 0.11 0.2%
50 11 53.4 0.077 0.1%
50 12 53.2 0.148 0.2%
50 13 53.46 0.171 0.3%
50 14 53.22 0.124 0.2%
50 15 53.44 0.055 0.1%
50 16 53.29 0.1 0.1%
50 17 53.28 0.181 0.3%
50 18 53.32 0.137 0.2%
50 19 53.29 0.177 0.3%
50 20 53.29 0.07 0.1%
50 21 53.14 0.083 0.1%
50 22 53.31 0.109 0.2%
50 23 53.33 0.1 0.1%
50 24 53.32 0.08 0.1%
50 25 53.31 0.104 0.1%
50 26 53.43 0.215 0.4%
50 27 53.45 0.124 0.2%
50 28 53.46 0.109 0.2%
50 29 53.21 0.104 0.1%
50 30 53.43 0.18 0.3%
50 31 53.51 0.113 0.2%
50 32 53.35 0.142 0.2%
50 33 53.43 0.101 0.1%
50 34 53.27 0.09 0.1%
50 35 53.59 0.108 0.2%
50 36 53.3 0.074 0.1%
50 37 53.31 0.085 0.1%
50 38 53.7 0.113 0.2%
50 39 53.53 0.109 0.2%
50 40 53.43 0.192 0.3%
50 41 53.32 0.087 0.1%
50 42 53.83 0.108 0.2%
50 43 53.36 0.114 0.2%
50 44 53.58 0.051 0.0%
50 45 53.52 0.062 0.1%
50 46 53.48 0.125 0.2%
50 47 53.51 0.164 0.3%
50 48 53.48 0.125 0.2%
50 49 53.45 0.162 0.3%
50 50 53.51 0.116 0.2%

Quality and confidence:
param error
n 0
s 0

Model:
Time ~= 53.36
+ n 0
+ s 0.008
µs

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

-- Extrinsic Time --

Model:
Time ~= 51.72
µs

Reads = 2
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 51.72
µs

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

-- Extrinsic Time --

Model:
Time ~= 27.19
+ n 0
+ s 0.002
µs

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

-- Extrinsic Time --

Data points distribution:
n s mean µs sigma µs %
0 50 26.91 0.076 0.2%
1 50 27.34 0.076 0.2%
2 50 27.22 0.052 0.1%
3 50 27.26 0.055 0.2%
4 50 27.32 0.078 0.2%
5 50 27.37 0.154 0.5%
6 50 27.34 0.043 0.1%
7 50 27.34 0.091 0.3%
8 50 27.64 0.099 0.3%
9 50 27.57 0.099 0.3%
10 50 27.28 0.106 0.3%
11 50 27.34 0.114 0.4%
12 50 27.31 0.08 0.2%
13 50 27.37 0.074 0.2%
14 50 27.41 0.096 0.3%
15 50 27.26 0.055 0.2%
16 50 27.26 0.06 0.2%
17 50 27.43 0.057 0.2%
18 50 27.22 0.066 0.2%
19 50 27.29 0.075 0.2%
20 50 27.44 0.064 0.2%
21 50 27.33 0.065 0.2%
22 50 27.35 0.066 0.2%
23 50 27.29 0.072 0.2%
24 50 27.35 0.064 0.2%
25 50 27.39 0.046 0.1%
26 50 27.37 0.084 0.3%
27 50 27.25 0.111 0.4%
28 50 27.38 0.074 0.2%
29 50 27.3 0.07 0.2%
30 50 27.38 0.061 0.2%
31 50 27.49 0.084 0.3%
32 50 27.39 0.038 0.1%
33 50 27.39 0.127 0.4%
34 50 27.36 0.1 0.3%
35 50 27.37 0.045 0.1%
36 50 27.38 0.04 0.1%
37 50 27.44 0.124 0.4%
38 50 27.3 0.05 0.1%
39 50 27.26 0.037 0.1%
40 50 27.33 0.089 0.3%
41 50 27.42 0.071 0.2%
42 50 27.43 0.071 0.2%
43 50 27.51 0.074 0.2%
44 50 27.39 0.088 0.3%
45 50 27.4 0.067 0.2%
46 50 27.15 0.061 0.2%
47 50 27.3 0.096 0.3%
48 50 27.24 0.037 0.1%
49 50 27.27 0.056 0.2%
50 0 27.28 0.092 0.3%
50 1 27.16 0.192 0.7%
50 2 27.08 0.083 0.3%
50 3 27.08 0.102 0.3%
50 4 27.01 0.071 0.2%
50 5 27.11 0.061 0.2%
50 6 27.05 0.051 0.1%
50 7 27.03 0.031 0.1%
50 8 27.19 0.06 0.2%
50 9 27.12 0.054 0.1%
50 10 27.11 0.06 0.2%
50 11 27.06 0.072 0.2%
50 12 27.09 0.109 0.4%
50 13 26.93 0.053 0.1%
50 14 27.03 0.03 0.1%
50 15 26.94 0.045 0.1%
50 16 26.92 0.095 0.3%
50 17 27.07 0.088 0.3%
50 18 27.17 0.111 0.4%
50 19 27.12 0.066 0.2%
50 20 27.17 0.061 0.2%
50 21 27.05 0.064 0.2%
50 22 27.08 0.052 0.1%
50 23 26.92 0.061 0.2%
50 24 27.01 0.081 0.2%
50 25 27.12 0.09 0.3%
50 26 27.07 0.079 0.2%
50 27 27.16 0.071 0.2%
50 28 27.02 0.052 0.1%
50 29 27.02 0.068 0.2%
50 30 27.12 0.061 0.2%
50 31 27.04 0.041 0.1%
50 32 27.09 0.07 0.2%
50 33 27.15 0.065 0.2%
50 34 27.09 0.069 0.2%
50 35 27.12 0.077 0.2%
50 36 27.1 0.075 0.2%
50 37 27.21 0.117 0.4%
50 38 27.18 0.087 0.3%
50 39 27.24 0.055 0.2%
50 40 27.22 0.067 0.2%
50 41 27.1 0.052 0.1%
50 42 27.2 0.067 0.2%
50 43 27.18 0.061 0.2%
50 44 27.24 0.074 0.2%
50 45 27.16 0.082 0.3%
50 46 27.08 0.073 0.2%
50 47 27.15 0.05 0.1%
50 48 27.2 0.097 0.3%
50 49 27.06 0.071 0.2%
50 50 27.33 0.101 0.3%

Quality and confidence:
param error
n 0
s 0

Model:
Time ~= 27.11
+ n 0
+ s 0.005
µs

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

-- Extrinsic Time --

Model:
Time ~= 51.59
µs

Reads = 2
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 51.59
µs

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

-- Extrinsic Time --

Model:
Time ~= 23.36
µs

Reads = 1
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 23.36
µs

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

-- Extrinsic Time --

Model:
Time ~= 47.9
µs

Reads = 1
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 47.9
µs

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

-- Extrinsic Time --

Model:
Time ~= 90.33
µs

Reads = 5
Writes = 5
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 90.33
µs

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

-- Extrinsic Time --

Model:
Time ~= 48.59
µs

Reads = 1
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 48.59
µs

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

-- Extrinsic Time --

Model:
Time ~= 54.87
µs

Reads = 2
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 54.87
µs

Reads = 2
Writes = 1

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

bot merge

@ghost
Copy link

ghost commented Mar 9, 2021

Trying merge.

@ghost
Copy link

ghost commented Mar 9, 2021

Merge failed: "At least 2 approving reviews are required by reviewers with write access."

@gavofyork gavofyork merged commit 641aa72 into master Mar 9, 2021
@gavofyork gavofyork deleted the gav-assets-approve-api branch March 9, 2021 12:38
@gui1117 gui1117 added D1-audited 👍 PR contains changes to fund-managing logic that has been properly reviewed and externally audited and removed D9-needsaudit 👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited labels Apr 12, 2021
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. C1-low PR touches the given topic and has a low impact on builders. D1-audited 👍 PR contains changes to fund-managing logic that has been properly reviewed and externally audited
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants