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

contracts: is_contract(address) and caller_is_origin() are added to API #10789

Merged
merged 24 commits into from
Feb 4, 2022

Conversation

agryaznov
Copy link
Contributor

@agryaznov agryaznov commented Feb 3, 2022

This PR implements #9064 by adding the following functions to contracts API:

fn is_contract(address: &AccountId) -> bool;
fn caller_is_origin() -> bool;

please see the origin issue for details.

--
kusama address: CuS4xkzdiwshFM1onVoaUijW53cyYDyHSVFtpudmxvNx2VC

@agryaznov agryaznov requested a review from athei as a code owner February 3, 2022 11:24
@cla-bot-2021
Copy link

cla-bot-2021 bot commented Feb 3, 2022

User @agryaznov, please sign the CLA here.

Copy link
Member

@athei athei left a comment

Choose a reason for hiding this comment

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

This very good already. My comments are mostly smallish things.

The exec tests you added are fine. However, we have no test that uses the actual wasm interface. It seems redundant in this case because the function is so simple. I want to stay rigorous here, though. You could either add a wasm test in wasm/mod.rs or a stand alone test in test.rs. The former might be easier. There are plenty of examples in that file.

frame/contracts/src/exec.rs Outdated Show resolved Hide resolved
frame/contracts/src/exec.rs Outdated Show resolved Hide resolved
frame/contracts/src/exec.rs Outdated Show resolved Hide resolved
frame/contracts/src/benchmarking/mod.rs Outdated Show resolved Hide resolved
frame/contracts/src/benchmarking/mod.rs Outdated Show resolved Hide resolved
frame/contracts/src/wasm/runtime.rs Outdated Show resolved Hide resolved
frame/contracts/src/wasm/runtime.rs Outdated Show resolved Hide resolved
frame/contracts/src/benchmarking/mod.rs Outdated Show resolved Hide resolved
frame/contracts/src/exec.rs Outdated Show resolved Hide resolved
frame/contracts/src/exec.rs Outdated Show resolved Hide resolved
@athei athei 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. D2-notlive 💤 PR contains changes in a runtime directory that is not deployed to a chain that requires an audit. labels Feb 3, 2022
frame/contracts/src/benchmarking/mod.rs Outdated Show resolved Hide resolved
frame/contracts/src/benchmarking/mod.rs Outdated Show resolved Hide resolved
frame/contracts/src/exec.rs Outdated Show resolved Hide resolved
@agryaznov
Copy link
Contributor Author

@athei thanks a lot for your feedback and corrections! I've added wasm tests for both functions.

@agryaznov agryaznov requested a review from athei February 3, 2022 19:18
Copy link
Contributor

@HCastano HCastano left a comment

Choose a reason for hiding this comment

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

Two small things, but looks good 👍

frame/contracts/src/exec.rs Outdated Show resolved Hide resolved
frame/contracts/src/wasm/runtime.rs Outdated Show resolved Hide resolved
@HCastano
Copy link
Contributor

HCastano commented Feb 3, 2022

@agryaznov it looks like the CI is complaining about some dead code warnings, can you fix them?

Copy link
Member

@athei athei left a comment

Choose a reason for hiding this comment

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

I am not sure what is wrong with CI. Just merge in master and see if that helps.

frame/contracts/src/wasm/mod.rs Outdated Show resolved Hide resolved
frame/contracts/src/wasm/mod.rs Outdated Show resolved Hide resolved
frame/contracts/src/wasm/mod.rs Outdated Show resolved Hide resolved
@agryaznov
Copy link
Contributor Author

I am not sure what is wrong with CI. Just merge in master and see if that helps.

oops, I made a rebase instead, and it brought a lot of new guys to the discussion. sorry for that

@ggwpez
Copy link
Member

ggwpez commented Feb 4, 2022

We could try bot rebase to see if that fixes it.
Wont work on private branch.

@athei
Copy link
Member

athei commented Feb 4, 2022

/benchmark runtime pallet pallet_contracts

@parity-benchapp
Copy link

parity-benchapp bot commented Feb 4, 2022

Error running benchmark: 9064_issue

stdoutremote: Repository not found. fatal: repository 'https://github.com/agryaznov/substrate.git/' not found

@athei
Copy link
Member

athei commented Feb 4, 2022

Error running benchmark: 9064_issue
stdout
remote: Repository not found. fatal: repository 'https://github.com/agryaznov/substrate.git/' not found

I think the issue is that you called the clone of your substrate repo polkadot.

@athei
Copy link
Member

athei commented Feb 4, 2022

/benchmark runtime pallet pallet_contracts

@athei
Copy link
Member

athei commented Feb 4, 2022

Bot is busy. Might some time until it starts.

@agryaznov
Copy link
Contributor Author

I renamed the fork repo to substrate, we'll see if it helps once bot come to it

@parity-benchapp
Copy link

parity-benchapp bot commented Feb 4, 2022

Benchmark Runtime Pallet for branch "9064_issue" with command cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs

Toolchain: stable-x86_64-unknown-linux-gnu (default)
rustc 1.57.0 (f1edd0429 2021-11-29)

Results
Pallet: "pallet_contracts", Extrinsic: "on_initialize", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Contracts DeletionQueue (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=     1.64
              µs

Reads = 1
Writes = 0

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=     1.64
              µs

Reads = 1
Writes = 0

Pallet: "pallet_contracts", Extrinsic: "on_initialize_per_trie_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Skipped Metadata (r:0 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    6.578
    + k    0.748
              µs

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

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    k   mean µs  sigma µs       %
    0        10     0.064    0.6%
   20     26.44     0.185    0.6%
   40     40.23     0.357    0.8%
   60     54.12     0.249    0.4%
   80      65.1     0.236    0.3%
  100     77.93      0.37    0.4%
  120     91.89     0.265    0.2%
  140     107.9     0.671    0.6%
  160     121.7     0.424    0.3%
  180     139.1     0.313    0.2%
  200     152.3     0.326    0.2%
  220     167.3     0.263    0.1%
  240     184.2     0.787    0.4%
  260     197.6     0.715    0.3%
  280     212.8     1.142    0.5%
  300     226.8      0.93    0.4%
  320     243.3     0.526    0.2%
  340     259.5     0.895    0.3%
  360     275.3     0.833    0.3%
  380     293.1     1.038    0.3%
  400     309.7     1.172    0.3%
  420     323.6       0.8    0.2%
  440     338.6     0.791    0.2%
  460     352.7      1.39    0.3%
  480     369.2     1.615    0.4%
  500     383.9      0.99    0.2%
  520     397.6     1.286    0.3%
  540     412.3     1.082    0.2%
  560     428.6     1.638    0.3%
  580     442.3      2.04    0.4%
  600     457.2     1.171    0.2%
  620     471.1     2.443    0.5%
  640     484.3     1.478    0.3%
  660     500.5     2.445    0.4%
  680     515.3     0.947    0.1%
  700     531.2     1.904    0.3%
  720     549.1     8.016    1.4%
  740     560.8     2.671    0.4%
  760     573.6      1.01    0.1%
  780     588.4       1.8    0.3%
  800       606     2.635    0.4%
  820     618.8     1.462    0.2%
  840     644.9     8.536    1.3%
  860     652.5      4.63    0.7%
  880     663.1     1.966    0.2%
  900     684.8     8.886    1.2%
  920     695.7     4.936    0.7%
  940     702.3     1.391    0.1%
  960     722.6     3.871    0.5%
  980     734.3     2.169    0.2%
 1000     754.9     9.496    1.2%
 1020     763.3      2.28    0.2%

Quality and confidence:
param     error
k             0

Model:
Time ~=    6.385
    + k    0.748
              µs

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

Pallet: "pallet_contracts", Extrinsic: "on_initialize_per_queue_item", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Contracts DeletionQueue (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    2.992
    + q    2.273
              µs

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

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    q   mean µs  sigma µs       %
    0     1.581     0.014    0.8%
   20     55.94     0.487    0.8%
   40     100.5     0.576    0.5%
   60     144.3     0.521    0.3%
   80     189.5     0.955    0.5%
  100     233.7     1.302    0.5%
  120     284.2     2.399    0.8%
  140     323.6      3.47    1.0%
  160     369.1      4.06    1.0%
  180     410.6     3.055    0.7%
  200     451.5     2.336    0.5%
  220     487.4     4.433    0.9%
  240     555.3     3.508    0.6%
  260     603.4     4.818    0.7%
  280     643.5     5.824    0.9%
  300     663.4     7.871    1.1%
  320     737.9     5.586    0.7%
  340     780.4     5.913    0.7%
  360     808.8     8.969    1.1%
  380     856.2     12.54    1.4%
  400     917.9      7.84    0.8%
  420     902.8     10.39    1.1%
  440     983.2     12.64    1.2%
  460      1033     9.194    0.8%
  480      1053     8.065    0.7%
  500      1131     15.26    1.3%
  520      1170     11.33    0.9%
  540      1170     6.417    0.5%
  560      1233      14.2    1.1%
  580      1282     12.14    0.9%
  600      1354     10.04    0.7%
  620      1417     18.96    1.3%
  640      1441     14.09    0.9%
  660      1516     17.02    1.1%
  680      1480     14.22    0.9%
  700      1581     16.94    1.0%
  720      1560     25.93    1.6%
  740      1697     23.11    1.3%
  760      1700     14.79    0.8%
  780      1723     10.64    0.6%
  800      1829     8.153    0.4%
  820      1874     17.94    0.9%
  840      1911     13.19    0.6%
  860      1978     9.103    0.4%
  880      1965     14.68    0.7%
  900      2126      17.6    0.8%
  920      2080     27.53    1.3%
  940      2193     14.46    0.6%
  960      2243     22.81    1.0%
  980      2312     37.53    1.6%
 1000      2364     30.71    1.2%
 1020      2420     27.77    1.1%

Quality and confidence:
param     error
q         0.005

Model:
Time ~=        0
    + q    2.304
              µs

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

Pallet: "pallet_contracts", Extrinsic: "reinstrument", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Contracts PristineCode (r:1 w:0)
Storage: Contracts CodeStorage (r:0 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    27.19
    + c     65.8
              µs

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

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    c   mean µs  sigma µs       %
    0     26.51     0.526    1.9%
    2     161.6     0.742    0.4%
    4     295.7     1.222    0.4%
    6     416.6     1.576    0.3%
    8     550.7     0.867    0.1%
   10       682     9.278    1.3%
   12     815.8     13.88    1.7%
   14     956.2     10.46    1.0%
   16      1076      9.64    0.8%
   18      1213     12.42    1.0%
   20      1333     11.18    0.8%
   22      1472     12.48    0.8%
   24      1591     15.63    0.9%
   26      1755     10.75    0.6%
   28      1894     4.099    0.2%
   30      2000     14.06    0.7%
   32      2122     12.67    0.5%
   34      2264      11.7    0.5%
   36      2387     18.71    0.7%
   38      2527     11.17    0.4%
   40      2662     9.499    0.3%
   42      2777     8.244    0.2%
   44      2894     15.98    0.5%
   46      3024     8.258    0.2%
   48      3164     14.27    0.4%
   50      3329     16.73    0.5%
   52      3475     7.584    0.2%
   54      3630     21.38    0.5%
   56      3732     14.32    0.3%
   58      3849      10.7    0.2%
   60      3980     12.28    0.3%
   62      4105     10.38    0.2%
   64      4217     9.657    0.2%
   66      4378     11.98    0.2%
   68      4509     11.29    0.2%
   70      4629     8.719    0.1%
   72      4767     14.44    0.3%
   74      4880     14.74    0.3%
   76      5012     16.45    0.3%
   78      5127     18.36    0.3%
   80      5232     14.44    0.2%
   82      5432     13.64    0.2%
   84      5567     41.08    0.7%
   86      5665     9.308    0.1%
   88      5759     20.95    0.3%
   90      5897     8.696    0.1%
   92      6021     18.71    0.3%
   94      6142     16.16    0.2%
   96      6252     10.17    0.1%
   98      6531     18.84    0.2%
  100      6654      11.1    0.1%
  102      6769     18.46    0.2%
  104      6893     18.45    0.2%
  106      7055     18.59    0.2%
  108      7160      11.7    0.1%
  110      7295     29.52    0.4%
  112      7427     14.85    0.1%
  114      7547     12.73    0.1%
  116      7675     19.98    0.2%
  118      7804     31.04    0.3%
  120      7942     14.39    0.1%
  122      8073     15.07    0.1%
  124      8168     21.08    0.2%
  126      8326     30.67    0.3%
  128      8435     23.15    0.2%

Quality and confidence:
param     error
c         0.033

Model:
Time ~=    22.92
    + c    65.85
              µs

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

Pallet: "pallet_contracts", Extrinsic: "call_with_code_kb", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)
Storage: System Account (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    222.1
    + c    61.26
              µs

Reads = 4 + (0 * c)
Writes = 2 + (0 * c)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    c   mean µs  sigma µs       %
    0       232     2.488    1.0%
    2     349.7     0.238    0.0%
    4       473     2.825    0.5%
    6     594.1     11.48    1.9%
    8     722.2     11.98    1.6%
   10     838.3     9.631    1.1%
   12     951.4     13.67    1.4%
   14      1096     12.53    1.1%
   16      1203     11.24    0.9%
   18      1325     8.819    0.6%
   20      1442     14.21    0.9%
   22      1552     10.56    0.6%
   24      1668     17.42    1.0%
   26      1838     14.07    0.7%
   28      1939     12.24    0.6%
   30      2081     18.01    0.8%
   32      2176      10.9    0.5%
   34      2304     10.18    0.4%
   36      2405     16.59    0.6%
   38      2521     18.43    0.7%
   40      2645     18.98    0.7%
   42      2754     19.99    0.7%
   44      2890     13.39    0.4%
   46      3009      12.9    0.4%
   48      3099     6.368    0.2%
   50      3341     16.85    0.5%
   52      3427     13.16    0.3%
   54      3568     12.24    0.3%
   56      3666     13.09    0.3%
   58      3776     15.13    0.4%
   60      3895     19.62    0.5%
   62      4013     19.46    0.4%
   64      4126      14.2    0.3%
   66      4258     20.51    0.4%
   68      4355     19.59    0.4%
   70      4475     12.76    0.2%
   72      4598     25.24    0.5%
   74      4710     15.09    0.3%
   76      4848      33.1    0.6%
   78      4922     10.17    0.2%
   80      5041      17.9    0.3%
   82      5164      21.3    0.4%
   84      5293     19.09    0.3%
   86      5406     17.24    0.3%
   88      5555     15.94    0.2%
   90      5662     22.79    0.4%
   92      5749     14.38    0.2%
   94      5853     17.66    0.3%
   96      5973      30.9    0.5%
   98      6311     14.87    0.2%
  100      6443     17.58    0.2%
  102      6539     19.25    0.2%
  104      6671     18.99    0.2%
  106      6775     17.53    0.2%
  108      6889     16.12    0.2%
  110      7023     20.74    0.2%
  112      7110     16.61    0.2%
  114      7232     19.01    0.2%
  116      7362     17.69    0.2%
  118      7474     15.17    0.2%
  120      7586     10.68    0.1%
  122      7711     14.33    0.1%
  124      7882      45.3    0.5%
  126      7955     13.06    0.1%
  128      8023     26.76    0.3%

Quality and confidence:
param     error
c         0.053

Model:
Time ~=    209.5
    + c    61.34
              µs

Reads = 4 + (0 * c)
Writes = 2 + (0 * c)

Pallet: "pallet_contracts", Extrinsic: "instantiate_with_code", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Contracts CodeStorage (r:1 w:1)
Storage: Contracts AccountCounter (r:1 w:1)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Timestamp Now (r:1 w:0)
Storage: System Account (r:1 w:1)
Storage: Contracts PristineCode (r:0 w:1)
Storage: Contracts OwnerInfoOf (r:0 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    250.3
    + c    151.5
    + s    1.761
              µs

Reads = 5 + (0 * c) + (0 * s)
Writes = 6 + (0 * c) + (0 * s)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    c     s   mean µs  sigma µs       %
    0  1024      2071     12.73    0.6%
    1  1024      2240     4.627    0.2%
    2  1024      2367     16.66    0.7%
    3  1024      2373      14.8    0.6%
    4  1024      2686     21.66    0.8%
    5  1024      2837      6.04    0.2%
    6  1024      2819     8.765    0.3%
    7  1024      3150     17.49    0.5%
    8  1024      3290     15.34    0.4%
    9  1024      3272     16.58    0.5%
   10  1024      3591     9.396    0.2%
   11  1024      3725     19.43    0.5%
   12  1024      3707     13.66    0.3%
   13  1024      4054     11.02    0.2%
   14  1024      4185      14.9    0.3%
   15  1024      4171     18.58    0.4%
   16  1024      4480     19.07    0.4%
   17  1024      4657     12.99    0.2%
   18  1024      4662     17.75    0.3%
   19  1024      4944     15.08    0.3%
   20  1024      5110     18.21    0.3%
   21  1024      5092     11.34    0.2%
   22  1024      5400     11.35    0.2%
   23  1024      5543     13.66    0.2%
   24  1024      5520     20.37    0.3%
   25  1024      5903     30.45    0.5%
   26  1024      6024     16.01    0.2%
   27  1024      6017     16.99    0.2%
   28  1024      6309      16.4    0.2%
   29  1024      6475     20.23    0.3%
   30  1024      6445     13.87    0.2%
   31  1024      6755     21.14    0.3%
   32  1024      6881     14.31    0.2%
   33  1024      7081     36.15    0.5%
   34  1024      7272     18.89    0.2%
   35  1024      7412     24.32    0.3%
   36  1024      7413     27.68    0.3%
   37  1024      7717     19.27    0.2%
   38  1024      7898     42.95    0.5%
   39  1024      7878     43.96    0.5%
   40  1024      8148     24.72    0.3%
   41  1024      8291     29.15    0.3%
   42  1024      8269     33.71    0.4%
   43  1024      8566     10.07    0.1%
   44  1024      8758      41.4    0.4%
   45  1024      8723     24.68    0.2%
   46  1024      9027     20.38    0.2%
   47  1024      9144     26.73    0.2%
   48  1024      9189     44.71    0.4%
   49  1024      9562     25.18    0.2%
   50  1024      9707      41.7    0.4%
   51  1024      9698     31.11    0.3%
   52  1024      9980     30.36    0.3%
   53  1024     10130     42.65    0.4%
   54  1024     10100     21.59    0.2%
   55  1024     10410     25.06    0.2%
   56  1024     10560     33.15    0.3%
   57  1024     10550     24.57    0.2%
   58  1024     10860     33.47    0.3%
   59  1024     10980     20.18    0.1%
   60  1024     10980     29.79    0.2%
   61  1024     11280     25.17    0.2%
   62     0      9609     30.69    0.3%
   62    20      9649     38.93    0.4%
   62    40      9726     34.48    0.3%
   62    60      9756     35.61    0.3%
   62    80      9786     20.42    0.2%
   62   100      9835      35.6    0.3%
   62   120      9848     36.69    0.3%
   62   140      9902     30.01    0.3%
   62   160      9918     38.15    0.3%
   62   180      9955     26.35    0.2%
   62   200     10010     35.64    0.3%
   62   220     10030     22.48    0.2%
   62   240     10060     26.41    0.2%
   62   260     10120     26.16    0.2%
   62   280     10140     22.89    0.2%
   62   300     10170      28.6    0.2%
   62   320     10230     48.82    0.4%
   62   340     10240     18.06    0.1%
   62   360     10290     32.62    0.3%
   62   380     10340     34.24    0.3%
   62   400     10370     16.78    0.1%
   62   420     10380     19.29    0.1%
   62   440     10450     35.19    0.3%
   62   460     10450     32.13    0.3%
   62   480     10480     26.62    0.2%
   62   500     10560     22.85    0.2%
   62   520     10560     38.76    0.3%
   62   540     10610     41.08    0.3%
   62   560     10720     62.85    0.5%
   62   580     10690     20.53    0.1%
   62   600     10670     32.04    0.3%
   62   620     10730     27.45    0.2%
   62   640     10760     31.22    0.2%
   62   660     10800     37.85    0.3%
   62   680     10840     33.11    0.3%
   62   700     10880     36.96    0.3%
   62   720     10920     47.14    0.4%
   62   740     10940     51.16    0.4%
   62   760     10990     42.65    0.3%
   62   780     11010      38.1    0.3%
   62   800     11060     39.46    0.3%
   62   820     11100     38.05    0.3%
   62   840     11110     39.66    0.3%
   62   860     11170     28.93    0.2%
   62   880     11200     34.11    0.3%
   62   900     11210     26.59    0.2%
   62   920     11260     33.71    0.2%
   62   940     11270     36.02    0.3%
   62   960     11340     47.03    0.4%
   62   980     11350     32.02    0.2%
   62  1000     11390     42.09    0.3%
   62  1020     11450     26.66    0.2%
   62  1024     11460     43.12    0.3%

Quality and confidence:
param     error
c         0.119
s         0.007

Model:
Time ~=    240.3
    + c    151.8
    + s     1.74
              µs

Reads = 5 + (0 * c) + (0 * s)
Writes = 6 + (0 * c) + (0 * s)

Pallet: "pallet_contracts", Extrinsic: "instantiate", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Contracts CodeStorage (r:1 w:1)
Storage: Contracts AccountCounter (r:1 w:1)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Timestamp Now (r:1 w:0)
Storage: System Account (r:1 w:1)
Storage: Contracts OwnerInfoOf (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=      173
    + s    1.708
              µs

Reads = 6 + (0 * s)
Writes = 5 + (0 * s)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    s   mean µs  sigma µs       %
    0       172     1.751    1.0%
   20     205.2     0.419    0.2%
   40     240.6       0.7    0.2%
   60     275.2     0.921    0.3%
   80     309.2     1.298    0.4%
  100     343.6     1.419    0.4%
  120     377.9     1.054    0.2%
  140     413.7     3.029    0.7%
  160     451.6     11.24    2.4%
  180     483.7     9.504    1.9%
  200     514.2     3.322    0.6%
  220     552.6     10.87    1.9%
  240     581.7     3.645    0.6%
  260     621.9     12.17    1.9%
  280       648     0.867    0.1%
  300     689.6     8.736    1.2%
  320     731.2     8.921    1.2%
  340     761.4     13.07    1.7%
  360     797.6     11.12    1.3%
  380     845.1      14.5    1.7%
  400     867.8     11.65    1.3%
  420     894.1     14.69    1.6%
  440     935.7     15.48    1.6%
  460     967.8     13.36    1.3%
  480      1018     10.38    1.0%
  500      1044     14.27    1.3%
  520      1076     12.34    1.1%
  540      1099     12.88    1.1%
  560      1134     13.55    1.1%
  580      1171     14.64    1.2%
  600      1217     5.364    0.4%
  620      1237     16.44    1.3%
  640      1271     14.58    1.1%
  660      1298      10.8    0.8%
  680      1354     7.918    0.5%
  700      1378     12.88    0.9%
  720      1408     13.73    0.9%
  740      1451     14.61    1.0%
  760      1498     1.914    0.1%
  780      1520     15.19    0.9%
  800      1545      14.6    0.9%
  820      1590     14.06    0.8%
  840      1617     12.71    0.7%
  860      1660     15.12    0.9%
  880      1673     3.187    0.1%
  900      1729     12.52    0.7%
  920      1758     15.14    0.8%
  940      1784     14.01    0.7%
  960      1835     27.19    1.4%
  980      1875     5.542    0.2%
 1000      1901     16.78    0.8%
 1020      1960     20.08    1.0%

Quality and confidence:
param     error
s         0.002

Model:
Time ~=      172
    + s    1.729
              µs

Reads = 6 + (0 * s)
Writes = 5 + (0 * s)

Pallet: "pallet_contracts", Extrinsic: "call", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)
Storage: System Account (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    139.3
              µs

Reads = 4
Writes = 2

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    139.3
              µs

Reads = 4
Writes = 2

Pallet: "pallet_contracts", Extrinsic: "upload_code", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Contracts CodeStorage (r:1 w:1)
Storage: Contracts PristineCode (r:0 w:1)
Storage: Contracts OwnerInfoOf (r:0 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=     53.6
    + c    68.09
              µs

Reads = 1 + (0 * c)
Writes = 3 + (0 * c)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    c   mean µs  sigma µs       %
    0     50.43     0.806    1.5%
    1     122.2     0.528    0.4%
    2     191.7     1.341    0.6%
    3     256.2     5.042    1.9%
    4     322.6     1.126    0.3%
    5     390.9     5.173    1.3%
    6     456.5     4.338    0.9%
    7     528.2     1.025    0.1%
    8       598     6.783    1.1%
    9     665.7     10.15    1.5%
   10     727.8     9.206    1.2%
   11     789.8     0.867    0.1%
   12     857.1     4.334    0.5%
   13     951.6     16.98    1.7%
   14      1011     15.83    1.5%
   15      1079     13.78    1.2%
   16      1142     12.82    1.1%
   17      1213     14.17    1.1%
   18      1291      13.3    1.0%
   19      1355     14.72    1.0%
   20      1408     13.49    0.9%
   21      1479     13.44    0.9%
   22      1542      13.9    0.9%
   23      1608     13.16    0.8%
   24      1677     14.93    0.8%
   25      1775     14.19    0.7%
   26      1837     12.87    0.7%
   27      1903     11.98    0.6%
   28      1980     18.32    0.9%
   29      2042     8.947    0.4%
   30      2122     22.79    1.0%
   31      2171     8.063    0.3%
   32      2220     18.42    0.8%
   33      2315     9.682    0.4%
   34      2372     10.64    0.4%
   35      2446     8.435    0.3%
   36      2500     15.78    0.6%
   37      2576     15.85    0.6%
   38      2641     11.74    0.4%
   39      2705     9.726    0.3%
   40      2772     19.87    0.7%
   41      2837     6.692    0.2%
   42      2906     16.24    0.5%
   43      2945     11.01    0.3%
   44      3016     12.62    0.4%
   45      3075     13.98    0.4%
   46      3160     13.09    0.4%
   47      3209     12.92    0.4%
   48      3285     9.316    0.2%
   49      3433     21.85    0.6%
   50      3491     8.724    0.2%
   51      3562     8.952    0.2%
   52      3620     12.24    0.3%
   53      3683     10.89    0.2%
   54      3744     9.717    0.2%
   55      3815     15.51    0.4%
   56      3887     13.37    0.3%
   57      3962     19.16    0.4%
   58      4010      9.81    0.2%
   59      4087     13.39    0.3%
   60      4138     13.83    0.3%
   61      4216     16.89    0.4%
   62      4289     10.65    0.2%
   63      4336      8.74    0.2%
   64      4423     30.48    0.6%

Quality and confidence:
param     error
c         0.045

Model:
Time ~=    50.44
    + c    68.25
              µs

Reads = 1 + (0 * c)
Writes = 3 + (0 * c)

Pallet: "pallet_contracts", Extrinsic: "remove_code", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Contracts OwnerInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:0 w:1)
Storage: Contracts PristineCode (r:0 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    24.57
              µs

Reads = 1
Writes = 3

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    24.57
              µs

Reads = 1
Writes = 3

Pallet: "pallet_contracts", Extrinsic: "seal_caller", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:0)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    219.9
    + r     49.1
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    r   mean µs  sigma µs       %
    0       219      5.45    2.4%
    1     268.2     0.948    0.3%
    2     317.8     0.467    0.1%
    3     367.6     3.311    0.9%
    4     415.8     1.322    0.3%
    5     467.1     7.036    1.5%
    6     515.9     6.447    1.2%
    7     564.3     0.876    0.1%
    8     617.4      8.74    1.4%
    9     672.4     11.47    1.7%
   10       715     9.243    1.2%
   11     762.6     9.955    1.3%
   12     828.1     10.29    1.2%
   13     857.4     9.507    1.1%
   14     924.2      12.5    1.3%
   15     967.9     11.18    1.1%
   16      1028     9.814    0.9%
   17      1064     14.16    1.3%
   18      1110     15.29    1.3%
   19      1153     11.11    0.9%
   20      1199     9.265    0.7%

Quality and confidence:
param     error
r         0.128

Model:
Time ~=      220
    + r     49.6
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Pallet: "pallet_contracts", Extrinsic: "seal_is_contract", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:0)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    92.81
    + r    373.9
              µs

Reads = 4 + (100 * r)
Writes = 1 + (0 * r)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    r   mean µs  sigma µs       %
    0     220.9     9.402    4.2%
    1     542.6     11.55    2.1%
    2     870.1     3.106    0.3%
    3      1209     11.51    0.9%
    4      1549     12.52    0.8%
    5      1949     11.04    0.5%
    6      2268     14.45    0.6%
    7      2633     12.01    0.4%
    8      3039     14.22    0.4%
    9      3495     13.03    0.3%
   10      3802     18.82    0.4%
   11      4070     6.751    0.1%
   12      4593     20.43    0.4%
   13      4998     21.41    0.4%
   14      5275     21.49    0.4%
   15      5697     19.44    0.3%
   16      6068     20.81    0.3%
   17      6372      24.7    0.3%
   18      7004     44.52    0.6%
   19      7292     26.88    0.3%
   20      7676     57.71    0.7%

Quality and confidence:
param     error
r         0.896

Model:
Time ~=    84.13
    + r    375.5
              µs

Reads = 4 + (100 * r)
Writes = 1 + (0 * r)

Pallet: "pallet_contracts", Extrinsic: "seal_caller_is_origin", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:0)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    217.2
    + r    22.39
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    r   mean µs  sigma µs       %
    0     217.5     9.463    4.3%
    1     252.9     13.05    5.1%
    2     261.3     1.457    0.5%
    3     283.7     0.943    0.3%
    4     313.5     8.102    2.5%
    5     333.4     12.02    3.6%
    6     361.7     13.37    3.6%
    7     374.1     2.134    0.5%
    8     407.1     13.62    3.3%
    9     429.7     13.64    3.1%
   10     443.8     11.55    2.6%
   11     466.1     2.223    0.4%
   12     496.4     8.111    1.6%
   13     508.4     1.106    0.2%
   14     531.5      2.34    0.4%
   15     565.7     13.73    2.4%
   16     574.8     1.268    0.2%
   17     604.5     11.26    1.8%
   18     623.8     9.312    1.4%
   19     646.8     11.09    1.7%
   20       666     6.975    1.0%

Quality and confidence:
param     error
r         0.119

Model:
Time ~=    222.4
    + r    22.34
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Pallet: "pallet_contracts", Extrinsic: "seal_address", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:0)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    219.9
    + r    48.96
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    r   mean µs  sigma µs       %
    0     216.9     1.245    0.5%
    1       272     8.523    3.1%
    2     318.1      0.71    0.2%
    3     369.1     7.785    2.1%
    4     414.9      1.06    0.2%
    5     476.9     14.15    2.9%
    6     515.3     8.524    1.6%
    7     583.5        15    2.5%
    8       612     2.754    0.4%
    9     667.2     12.45    1.8%
   10     714.1     7.701    1.0%
   11     757.8     2.473    0.3%
   12     816.8     13.62    1.6%
   13     866.8     13.92    1.6%
   14     906.3     1.006    0.1%
   15     959.2     11.27    1.1%
   16      1014     15.14    1.4%
   17      1058     11.58    1.0%
   18      1112      13.5    1.2%
   19      1163     10.34    0.8%
   20      1208     12.53    1.0%

Quality and confidence:
param     error
r         0.131

Model:
Time ~=    221.4
    + r     49.4
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Pallet: "pallet_contracts", Extrinsic: "seal_gas_left", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:0)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    219.4
    + r     48.8
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    r   mean µs  sigma µs       %
    0     225.2     13.27    5.8%
    1     266.1     1.787    0.6%
    2     319.6     6.191    1.9%
    3     365.4     1.988    0.5%
    4     420.2     7.424    1.7%
    5     463.7     2.922    0.6%
    6     509.8     1.551    0.3%
    7     561.7     1.166    0.2%
    8       615     9.901    1.6%
    9     669.6     13.05    1.9%
   10     714.2     10.95    1.5%
   11     775.6     11.87    1.5%
   12     803.1     6.834    0.8%
   13     863.6     13.48    1.5%
   14     908.2     10.43    1.1%
   15     961.7      13.2    1.3%
   16      1014     13.71    1.3%
   17      1068     11.68    1.0%
   18      1109     12.18    1.0%
   19      1147     11.54    1.0%
   20      1194     10.53    0.8%

Quality and confidence:
param     error
r         0.132

Model:
Time ~=    220.9
    + r    49.23
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Pallet: "pallet_contracts", Extrinsic: "seal_balance", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:0)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    234.8
    + r    136.8
              µs

Reads = 5 + (0 * r)
Writes = 1 + (0 * r)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    r   mean µs  sigma µs       %
    0     219.1     2.678    1.2%
    1     368.9      13.2    3.5%
    2     502.1     9.349    1.8%
    3     638.9     11.13    1.7%
    4     780.4     13.93    1.7%
    5     919.6     12.81    1.3%
    6      1053     15.45    1.4%
    7      1202     13.03    1.0%
    8      1327     15.89    1.1%
    9      1458      10.2    0.7%
   10      1611     12.54    0.7%
   11      1735     14.07    0.8%
   12      1884     9.317    0.4%
   13      2015     20.15    0.9%
   14      2156     8.044    0.3%
   15      2289     8.366    0.3%
   16      2444      18.6    0.7%
   17      2559      14.3    0.5%
   18      2693     15.78    0.5%
   19      2838     9.105    0.3%
   20      2971     11.42    0.3%

Quality and confidence:
param     error
r         0.166

Model:
Time ~=    229.3
    + r    137.4
              µs

Reads = 5 + (0 * r)
Writes = 1 + (0 * r)

Pallet: "pallet_contracts", Extrinsic: "seal_value_transferred", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:0)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    219.7
    + r    48.86
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    r   mean µs  sigma µs       %
    0     219.9     8.654    3.9%
    1     273.7     10.52    3.8%
    2     317.4     1.058    0.3%
    3     365.7     1.792    0.4%
    4     415.7      0.96    0.2%
    5     464.6     4.825    1.0%
    6     522.5     13.02    2.4%
    7     562.2     1.305    0.2%
    8     616.6     11.94    1.9%
    9     663.5     9.247    1.3%
   10     709.4     8.517    1.2%
   11     765.9     14.74    1.9%
   12     819.9     12.92    1.5%
   13       861     10.57    1.2%
   14     907.3     8.401    0.9%
   15     961.8      12.7    1.3%
   16      1015     13.39    1.3%
   17      1056     12.03    1.1%
   18      1119     19.82    1.7%
   19      1159     13.41    1.1%
   20      1199     12.01    1.0%

Quality and confidence:
param     error
r         0.133

Model:
Time ~=    220.1
    + r    49.41
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Pallet: "pallet_contracts", Extrinsic: "seal_minimum_balance", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:0)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    221.8
    + r    48.47
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    r   mean µs  sigma µs       %
    0     216.5     0.755    0.3%
    1     276.2      13.2    4.7%
    2     317.4      2.47    0.7%
    3     370.2     10.49    2.8%
    4     425.8     12.34    2.8%
    5     475.9     11.93    2.5%
    6       525     13.34    2.5%
    7     566.1     8.043    1.4%
    8     624.4     12.76    2.0%
    9       670     14.94    2.2%
   10     714.1     14.24    1.9%
   11     763.8     11.96    1.5%
   12       820     11.36    1.3%
   13     861.9     14.34    1.6%
   14     917.2     12.95    1.4%
   15     960.1     13.89    1.4%
   16      1007     14.98    1.4%
   17      1052      13.4    1.2%
   18      1098     11.06    1.0%
   19      1142     7.559    0.6%
   20      1192     11.58    0.9%

Quality and confidence:
param     error
r         0.151

Model:
Time ~=    228.1
    + r     48.6
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Pallet: "pallet_contracts", Extrinsic: "seal_block_number", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:0)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    220.6
    + r    48.48
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    r   mean µs  sigma µs       %
    0     219.4     6.227    2.8%
    1     281.8     14.06    4.9%
    2     315.6     0.367    0.1%
    3     369.4     4.891    1.3%
    4     420.9      11.6    2.7%
    5     461.7       1.2    0.2%
    6     515.5     11.36    2.2%
    7     561.5     5.093    0.9%
    8       623     12.21    1.9%
    9     664.9     12.54    1.8%
   10     707.6     10.24    1.4%
   11     761.3     12.59    1.6%
   12     810.9     11.93    1.4%
   13       850     10.06    1.1%
   14       919      10.8    1.1%
   15     969.7     8.271    0.8%
   16      1017     3.165    0.3%
   17      1052     13.99    1.3%
   18      1099     13.27    1.2%
   19      1145     13.25    1.1%
   20      1191     13.23    1.1%

Quality and confidence:
param     error
r         0.142

Model:
Time ~=    223.8
    + r    48.84
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Pallet: "pallet_contracts", Extrinsic: "seal_now", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:0)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    220.4
    + r    48.54
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    r   mean µs  sigma µs       %
    0     215.1     0.172    0.0%
    1       268     1.213    0.4%
    2       322     8.338    2.5%
    3     381.4     13.62    3.5%
    4     413.5     0.923    0.2%
    5     467.5     8.656    1.8%
    6       531     14.35    2.7%
    7     582.4     13.02    2.2%
    8     611.3     7.442    1.2%
    9     669.6      13.2    1.9%
   10       717     12.58    1.7%
   11     766.1      13.2    1.7%
   12     808.6     13.38    1.6%
   13     854.3      12.6    1.4%
   14     906.7     11.37    1.2%
   15     950.7     8.785    0.9%
   16      1003     12.38    1.2%
   17      1054     12.61    1.1%
   18      1109     13.21    1.1%
   19      1161     8.715    0.7%
   20      1198     14.13    1.1%

Quality and confidence:
param     error
r         0.148

Model:
Time ~=    224.9
    + r     48.9
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Pallet: "pallet_contracts", Extrinsic: "seal_weight_to_fee", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:0)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)
Storage: TransactionPayment NextFeeMultiplier (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    228.7
    + r    120.8
              µs

Reads = 5 + (0 * r)
Writes = 1 + (0 * r)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    r   mean µs  sigma µs       %
    0     232.5     11.38    4.8%
    1     341.6     2.255    0.6%
    2     474.2     13.14    2.7%
    3     584.5     4.951    0.8%
    4       723     12.98    1.7%
    5     838.8     14.75    1.7%
    6     954.1     11.21    1.1%
    7      1064     0.723    0.0%
    8      1200     12.04    1.0%
    9      1318     12.83    0.9%
   10      1436     11.14    0.7%
   11      1560     17.31    1.1%
   12      1695     6.176    0.3%
   13      1795     11.68    0.6%
   14      1927     12.55    0.6%
   15      2034     10.83    0.5%
   16      2167     11.22    0.5%
   17      2288     8.908    0.3%
   18      2413     12.43    0.5%
   19      2534     9.657    0.3%
   20      2654     18.17    0.6%

Quality and confidence:
param     error
r         0.151

Model:
Time ~=    227.5
    + r    121.2
              µs

Reads = 5 + (0 * r)
Writes = 1 + (0 * r)

Pallet: "pallet_contracts", Extrinsic: "seal_gas", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:0)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    128.5
    + r     24.7
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    r   mean µs  sigma µs       %
    0     124.8     0.617    0.4%
    1     152.2     0.782    0.5%
    2     180.7     0.949    0.5%
    3     201.8     0.345    0.1%
    4     226.9     0.743    0.3%
    5     250.8     0.808    0.3%
    6     276.4     0.384    0.1%
    7     301.2     0.875    0.2%
    8     331.7     0.677    0.2%
    9     352.5     2.699    0.7%
   10     374.1     4.576    1.2%
   11     405.7     6.938    1.7%
   12     427.5     1.218    0.2%
   13     451.2      1.04    0.2%
   14       475     1.236    0.2%
   15     498.7     0.921    0.1%
   16     522.7     1.054    0.2%
   17     547.5     1.275    0.2%
   18     573.7     7.882    1.3%
   19     602.7     12.72    2.1%
   20     625.6     10.68    1.7%

Quality and confidence:
param     error
r         0.057

Model:
Time ~=    127.9
    + r    24.84
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Pallet: "pallet_contracts", Extrinsic: "seal_input", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:0)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    220.8
    + r    48.08
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    r   mean µs  sigma µs       %
    0     216.1     0.882    0.4%
    1     272.9     10.39    3.8%
    2     319.5     8.405    2.6%
    3     366.3     8.358    2.2%
    4     413.3     4.393    1.0%
    5     477.1     11.91    2.4%
    6     517.6      12.7    2.4%
    7     576.2     11.34    1.9%
    8     604.6     1.029    0.1%
    9     662.5     9.228    1.3%
   10     707.6     10.67    1.5%
   11     754.8     11.31    1.4%
   12     794.8     4.184    0.5%
   13     853.4     15.14    1.7%
   14     903.1      11.8    1.3%
   15     960.9     20.15    2.0%
   16     993.5     8.931    0.8%
   17      1043     11.73    1.1%
   18      1092     12.34    1.1%
   19      1142     13.16    1.1%
   20      1185      10.4    0.8%

Quality and confidence:
param     error
r         0.141

Model:
Time ~=    224.5
    + r    48.29
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Pallet: "pallet_contracts", Extrinsic: "seal_input_per_kb", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:0)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    296.6
    + n    11.88
              µs

Reads = 4 + (0 * n)
Writes = 1 + (0 * n)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    n   mean µs  sigma µs       %
    0     266.8     0.568    0.2%
   20     512.2     5.269    1.0%
   40     753.8     9.041    1.1%
   60      1007      11.1    1.1%
   80      1239     12.89    1.0%
  100      1490     8.642    0.5%
  120      1720     8.694    0.5%
  140      1965     10.21    0.5%
  160      2198     8.134    0.3%
  180      2454      14.2    0.5%
  200      2683     15.15    0.5%
  220      2917     10.56    0.3%
  240      3149     9.231    0.2%
  260      3388     13.41    0.3%
  280      3630     12.72    0.3%
  300      3855     6.252    0.1%
  320      4100     12.22    0.2%
  340      4337     12.64    0.2%
  360      4576     15.74    0.3%
  380      4810     15.58    0.3%
  400      5055     13.01    0.2%
  420      5301     14.94    0.2%
  440      5528     16.69    0.3%
  460      5761     16.08    0.2%
  480      6012     15.15    0.2%
  500      6240     24.88    0.3%
  520      6485     17.47    0.2%
  540      6700     25.89    0.3%
  560      6997     25.73    0.3%
  580      7175     20.03    0.2%
  600      7441     14.21    0.1%
  620      7669     28.58    0.3%
  640      7911      21.6    0.2%
  660      8151     30.11    0.3%
  680      8389     25.66    0.3%
  700      8607     19.07    0.2%
  720      8852     20.71    0.2%
  740      9093     23.05    0.2%
  760      9323     30.68    0.3%
  780      9564     30.57    0.3%
  800      9786     21.05    0.2%
  820     10060     43.57    0.4%
  840     10270      21.4    0.2%
  860     10520     25.36    0.2%
  880     10740     17.57    0.1%
  900     11010     34.53    0.3%
  920     11220     18.56    0.1%
  940     11480     21.43    0.1%
  960     11670     29.94    0.2%
  980     11920     33.67    0.2%
 1000     12160     15.87    0.1%
 1020     12390     37.65    0.3%

Quality and confidence:
param     error
n         0.003

Model:
Time ~=    296.9
    + n    11.88
              µs

Reads = 4 + (0 * n)
Writes = 1 + (0 * n)

Pallet: "pallet_contracts", Extrinsic: "seal_return", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:0)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    213.1
    + r    1.505
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    r   mean µs  sigma µs       %
    0     224.3     14.45    6.4%
    1     218.7     8.934    4.0%

Quality and confidence:
param     error
r         5.663

Model:
Time ~=    224.3
    + r        0
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Pallet: "pallet_contracts", Extrinsic: "seal_return_per_kb", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:0)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    214.4
    + n    0.199
              µs

Reads = 4 + (0 * n)
Writes = 1 + (0 * n)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    n   mean µs  sigma µs       %
    0     213.4      0.45    0.2%
   20     218.9     2.598    1.1%
   40       227     8.634    3.8%
   60     226.5     0.941    0.4%
   80     235.9     10.38    4.4%
  100     236.7     7.979    3.3%
  120     243.9     11.11    4.5%
  140     242.2     0.817    0.3%
  160     246.3     0.774    0.3%
  180     250.1     0.669    0.2%
  200     254.4     0.536    0.2%
  220     257.9     0.633    0.2%
  240     269.3     11.67    4.3%
  260     268.1     5.033    1.8%
  280     272.9     8.551    3.1%
  300     273.9     1.664    0.6%
  320       281     8.877    3.1%
  340     291.2     13.68    4.6%
  360     286.1     0.592    0.2%
  380     297.2     11.45    3.8%
  400     311.3     14.07    4.5%
  420     298.5     1.205    0.4%
  440     315.4     9.136    2.8%
  460     305.7     1.009    0.3%
  480     312.4     7.027    2.2%
  500       318     8.589    2.7%
  520     333.8     13.96    4.1%
  540       324     7.459    2.3%
  560     338.1     15.55    4.5%
  580     329.6     0.642    0.1%
  600     344.7     14.12    4.0%
  620       343     9.019    2.6%
  640     343.3     3.952    1.1%
  660     348.4     8.227    2.3%
  680     363.2     14.13    3.8%
  700     353.8     1.246    0.3%
  720     363.7     11.01    3.0%
  740       374     14.93    3.9%
  760     378.8     12.86    3.3%
  780     380.5      13.9    3.6%
  800     384.4     13.17    3.4%
  820     378.2     1.182    0.3%
  840     381.9     1.426    0.3%
  860     394.1     13.36    3.3%
  880     398.3     13.01    3.2%
  900     400.1     12.05    3.0%
  920     402.9     12.68    3.1%
  940     402.3     1.383    0.3%
  960     422.9     9.602    2.2%
  980       424     14.26    3.3%
 1000     417.4     8.285    1.9%
 1020       420     9.036    2.1%

Quality and confidence:
param     error
n         0.001

Model:
Time ~=    216.2
    + n    0.206
              µs

Reads = 4 + (0 * n)
Writes = 1 + (0 * n)

Pallet: "pallet_contracts", Extrinsic: "seal_terminate", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:0)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)
Storage: Contracts DeletionQueue (r:1 w:1)
Storage: Contracts OwnerInfoOf (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    217.2
    + r    51.27
              µs

Reads = 4 + (4 * r)
Writes = 1 + (5 * r)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    r   mean µs  sigma µs       %
    0     219.6     8.478    3.8%
    1     271.4     8.135    2.9%

Quality and confidence:
param     error
r         3.916

Model:
Time ~=    219.6
    + r    51.76
              µs

Reads = 4 + (4 * r)
Writes = 1 + (5 * r)

Pallet: "pallet_contracts", Extrinsic: "seal_random", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:0)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)
Storage: RandomnessCollectiveFlip RandomMaterial (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=      225
    + r    158.3
              µs

Reads = 5 + (0 * r)
Writes = 1 + (0 * r)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    r   mean µs  sigma µs       %
    0     228.1     12.53    5.4%
    1     381.5     5.856    1.5%
    2     536.8     5.386    1.0%
    3     700.4     13.01    1.8%
    4     853.9     11.18    1.3%
    5      1017     13.09    1.2%
    6      1176     14.79    1.2%
    7      1327     14.42    1.0%
    8      1495     9.271    0.6%
    9      1655     9.687    0.5%
   10      1803     12.92    0.7%
   11      1958     15.65    0.7%
   12      2125     10.44    0.4%
   13      2292     7.932    0.3%
   14      2434      17.3    0.7%
   15      2591     4.215    0.1%
   16      2747     14.39    0.5%
   17      2927     8.638    0.2%
   18      3083     5.182    0.1%
   19      3249     9.987    0.3%
   20      3403     15.78    0.4%

Quality and confidence:
param     error
r         0.154

Model:
Time ~=    221.4
    + r    158.7
              µs

Reads = 5 + (0 * r)
Writes = 1 + (0 * r)

Pallet: "pallet_contracts", Extrinsic: "seal_deposit_event", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:0)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    227.4
    + r    287.1
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    r   mean µs  sigma µs       %
    0     218.4     8.815    4.0%
    1     518.7     11.88    2.2%
    2       809      13.7    1.6%
    3      1094     10.96    1.0%
    4      1375     10.36    0.7%
    5      1675     13.57    0.8%
    6      1947     9.096    0.4%
    7      2224     12.71    0.5%
    8      2523     4.028    0.1%
    9      2829     17.61    0.6%
   10      3121     11.58    0.3%
   11      3373     9.014    0.2%
   12      3673     8.342    0.2%
   13      3957     14.03    0.3%
   14      4243     15.35    0.3%
   15      4529     11.81    0.2%
   16      4802     21.14    0.4%
   17      5129     18.26    0.3%
   18      5417      14.8    0.2%
   19      5670     14.07    0.2%
   20      5979     13.13    0.2%

Quality and confidence:
param     error
r         0.203

Model:
Time ~=    228.6
    + r    287.1
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Pallet: "pallet_contracts", Extrinsic: "seal_deposit_event_per_topic_and_kb", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:0)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)
Storage: System EventTopics (r:100 w:100)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    512.8
    + t    298.7
    + n    82.76
              µs

Reads = 4 + (100 * t) + (0 * n)
Writes = 1 + (100 * t) + (0 * n)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    t     n   mean µs  sigma µs       %
    0    16      1810     11.64    0.6%
    1    16      2153     11.68    0.5%
    2    16      2444     14.59    0.5%
    3    16      2751     9.228    0.3%
    4     0      1679     9.456    0.5%
    4     1      1807     18.24    1.0%
    4     2      1835      15.7    0.8%
    4     3      1922     12.39    0.6%
    4     4      2016     9.367    0.4%
    4     5      2112     11.04    0.5%
    4     6      2161     15.02    0.6%
    4     7      2212     17.08    0.7%
    4     8      2340     14.43    0.6%
    4     9      2403     6.954    0.2%
    4    10      2490     11.84    0.4%
    4    11      2555     14.98    0.5%
    4    12      2670     13.24    0.4%
    4    13      2761     9.215    0.3%
    4    14      2837     8.427    0.2%
    4    15      2943     14.76    0.5%
    4    16      3018     17.07    0.5%

Quality and confidence:
param     error
t         1.863
n         0.367

Model:
Time ~=      507
    + t    291.8
    + n    83.45
              µs

Reads = 4 + (100 * t) + (0 * n)
Writes = 1 + (100 * t) + (0 * n)

Pallet: "pallet_contracts", Extrinsic: "seal_debug_message", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:0)
Storage: Contracts ContractInfoOf (r:1 w:1)
Storage: Contracts CodeStorage (r:1 w:0)
Storage: Timestamp Now (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    134.8
    + r    41.37
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    r   mean µs  sigma µs       %
    0     131.7     0.488    0.3%
    1     176.9     1.017    0.5%
    2     218.6     1.387    0.6%
    3     260.6     1.549    0.5%
    4     299.5     0.958    0.3%
    5     339.7     0.897    0.2%
    6     384.2     1.498    0.3%
    7     424.4     1.606    0.3%
    8     468.3     8.785    1.8%
    9     509.7     5.023    0.9%
   10     543.5     0.802    0.1%
   11     592.4     3.024    0.5%
   12       639      10.2    1.5%
   13     673.6     1.987    0.2%
   14     718.6     7.848    1.0%
   15     753.4     2.058    0.2%
   16     819.4     7.381    0.9%
   17     836.9     2.108    0.2%
   18     884.3     7.646    0.8%
   19       928     14.21    1.5%
   20     962.2     8.253    0.8%

Quality and confidence:
param     error
r         0.087

Model:
Time ~=    133.5
    + r    41.71
              µs

Reads = 4 + (0 * r)
Writes = 1 + (0 * r)

Pallet: "pallet_contracts", Extrinsic: "seal_set_storage", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Skipped Metadata (r:0 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    56.11
    + r    404.3
              µs

Reads = 4 + (100 * r)
Writes = 1 + (100 * r)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    r   mean µs  sigma µs       %
    0     216.7     1.476    0.6%
    1     557.6     5.653    1.0%
    2       909     3.327    0.3%
    3      1298     10.28    0.7%
    4      1661     11.96    0.7%
    5      2055     12.95    0.6%
    6      2437     15.71    0.6%
    7      2810     14.53    0.5%
    8      3188     23.28    0.7%
    9      3676     10.77    0.2%
   10      4082     16.74    0.4%
   11      4467     27.39    0.6%
   12      4871     10.66    0.2%
   13      5266     19.13    0.3%
   14      5667     15.73    0.2%
   15      6101      31.2    0.5%
   16      6502     26.05    0.4%
   17      6951     41.67    0.5%
   18      7524     39.96    0.5%
   19      7936     33.49    0.4%
   20      8333     37.01    0.4%

Quality and confidence:
param     error
r         1.036

Model:
Time ~=    44.71
    + r    407.5
              µs

Reads = 4 + (100 * r)
Writes = 1 + (100 * r)

Pallet: "pallet_contracts", Extrinsic: "seal_set_storage_per_new_kb", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Skipped Metadata (r:0 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    609.7
    + n    28.57
              µs

Reads = 105 + (0 * n)
Writes = 103 + (0 * n)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    n   mean µs  sigma µs       %
    0     557.7     2.804    0.5%
    1     651.7     11.56    1.7%
    2     665.2      3.39    0.5%
    3     696.7     6.337    0.9%
    4     728.3     8.118    1.1%
    5     761.4     12.03    1.5%
    6     794.2     12.66    1.5%
    7     820.3     15.53    1.8%
    8     836.1     10.66    1.2%
    9     858.4     7.374    0.8%
   10     917.1     12.38    1.3%
   11     933.9     12.75    1.3%
   12       953      13.4    1.4%
   13       982     14.55    1.4%
   14      1033     3.775    0.3%
   15      1031     13.21    1.2%
   16      1044     6.188    0.5%

Quality and confidence:
param     error
n         0.315

Model:
Time ~=    606.1
    + n    29.13
              µs

Reads = 105 + (0 * n)
Writes = 103 + (0 * n)

Pallet: "pallet_contracts", Extrinsic: "seal_set_storage_per_old_kb", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Skipped Metadata (r:0 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    642.3
    + n    10.08
              µs

Reads = 105 + (0 * n)
Writes = 103 + (0 * n)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    n   mean µs  sigma µs       %
    0     587.5     9.822    1.6%
    1     648.8     11.36    1.7%
    2     669.1     2.543    0.3%
    3     680.4      4.47    0.6%
    4     691.2     8.485    1.2%
    5     699.9     10.18    1.4%
    6       710     11.82    1.6%
    7     714.6     9.616    1.3%
    8       728     11.92    1.6%
    9     724.8     7.721    1.0%
   10     735.8     11.13    1.5%
   11     750.5     7.836    1.0%
   12     740.2     2.134    0.2%
   13     771.5     12.45    1.6%
   14       776     2.574    0.3%
   15     803.3     11.47    1.4%
   16     811.9     13.37    1.6%

Quality and confidence:
param     error
n         0.281

Model:
Time ~=    634.3
    + n    10.74
              µs

Reads = 105 + (0 * n)
Writes = 103 + (0 * n)

Pallet: "pallet_contracts", Extrinsic: "seal_clear_storage", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Skipped Metadata (r:0 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    110.4
    + r      379
              µs

Reads = 5 + (100 * r)
Writes = 3 + (100 * r)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    r   mean µs  sigma µs       %
    0     219.7     7.993    3.6%
    1     563.6     8.112    1.4%
    2       906      12.2    1.3%
    3      1266     10.32    0.8%
    4      1603     12.44    0.7%
    5      1979     13.58    0.6%
    6      2342     13.65    0.5%
    7      2707     26.31    0.9%
    8      3052     26.36    0.8%
    9      3514     20.65    0.5%
   10      3837     14.66    0.3%
   11      4270     23.52    0.5%
   12      4646     12.04    0.2%
   13      5011     31.24    0.6%
   14      5399     26.39    0.4%
   15      5765     23.43    0.4%
   16      6124      27.5    0.4%
   17      6534      29.1    0.4%
   18      7075     29.97    0.4%
   19      7486     38.53    0.5%
   20      7906     24.87    0.3%

Quality and confidence:
param     error
r         0.924

Model:
Time ~=    89.75
    + r    382.5
              µs

Reads = 5 + (100 * r)
Writes = 3 + (100 * r)

Pallet: "pallet_contracts", Extrinsic: "seal_clear_storage_per_kb", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Skipped Metadata (r:0 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    620.8
    + n     9.98
              µs

Reads = 105 + (0 * n)
Writes = 103 + (0 * n)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    n   mean µs  sigma µs       %
    0     577.3     11.83    2.0%
    1     617.4     4.665    0.7%
    2     655.7     9.966    1.5%
    3     675.6     12.71    1.8%
    4     664.5     4.189    0.6%
    5     675.2     6.543    0.9%
    6     682.1     3.663    0.5%
    7     698.3     8.753    1.2%
    8     706.6     13.67    1.9%
    9     706.9     6.338    0.8%
   10     715.1     10.41    1.4%
   11       719     2.071    0.2%
   12     728.3     9.597    1.3%
   13       742     4.028    0.5%
   14     758.4     3.594    0.4%
   15     775.4     4.577    0.5%
   16     791.9     8.076    1.0%

Quality and confidence:
param     error
n          0.26

Model:
Time ~=    616.4
    + n    10.37
              µs

Reads = 105 + (0 * n)
Writes = 103 + (0 * n)

Pallet: "pallet_contracts", Extrinsic: "seal_get_storage", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Skipped Metadata (r:0 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    128.6
    + r    320.3
              µs

Reads = 4 + (100 * r)
Writes = 1 + (0 * r)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    r   mean µs  sigma µs       %
    0     218.5     1.089    0.4%
    1     499.5     4.193    0.8%
    2     791.1     8.959    1.1%
    3      1106     13.09    1.1%
    4      1395     5.195    0.3%
    5      1717     10.51    0.6%
    6      2025     14.83    0.7%
    7      2327     13.62    0.5%
    8      2624     12.97    0.4%
    9      2982     20.84    0.6%
   10      3281     16.88    0.5%
   11      3617     25.81    0.7%
   12      3939     25.04    0.6%
   13      4274     12.96    0.3%
   14      4577     19.52    0.4%
   15      4920      19.6    0.3%
   16      5242     30.61    0.5%
   17      5579      25.8    0.4%
   18      5978     26.72    0.4%
   19      6313     19.27    0.3%
   20      6661     34.39    0.5%

Quality and confidence:
param     error
r         0.633

Model:
Time ~=    116.3
    + r      322
              µs

Reads = 4 + (100 * r)
Writes = 1 + (0 * r)

Pallet: "pallet_contracts", Extrinsic: "seal_get_storage_per_kb", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Skipped Metadata (r:0 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    574.9
    + n    63.07
              µs

Reads = 104 + (0 * n)
Writes = 1 + (0 * n)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    n   mean µs  sigma µs       %
    0     512.1     13.86    2.7%
    1     619.5     9.833    1.5%
    2     713.9     1.885    0.2%
    3     773.6     9.857    1.2%
    4     839.2     7.983    0.9%
    5       893       5.1    0.5%
    6     960.9     10.25    1.0%
    7      1022     12.19    1.1%
    8      1079     10.12    0.9%
    9      1136     12.48    1.0%
   10      1189      7.93    0.6%
   11      1244     4.348    0.3%
   12      1300     8.303    0.6%
   13      1398     11.67    0.8%
   14      1448     10.34    0.7%
   15      1529     12.26    0.8%
   16      1599     11.25    0.7%

Quality and confidence:
param     error
n          0.34

Model:
Time ~=      563
    + n    63.88
              µs

Reads = 104 + (0 * n)
Writes = 1 + (0 * n)

Pallet: "pallet_contracts", Extrinsic: "seal_contains_storage", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Skipped Metadata (r:0 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    128.7
    + r    290.4
              µs

Reads = 4 + (100 * r)
Writes = 1 + (0 * r)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    r   mean µs  sigma µs       %
    0     216.8     1.053    0.4%
    1     471.6     11.07    2.3%
    2     737.7     12.41    1.6%
    3      1000     6.022    0.6%
    4      1276     5.239    0.4%
    5      1545      8.37    0.5%
    6      1832     11.23    0.6%
    7      2127     15.67    0.7%
    8      2372     15.55    0.6%
    9      2727     13.56    0.4%
   10      2988     15.36    0.5%
   11      3302     30.57    0.9%
   12      3597     19.26    0.5%
   13      3917     16.27    0.4%
   14      4171     25.63    0.6%
   15      4496      35.5    0.7%
   16      4752     38.63    0.8%
   17      5044      25.9    0.5%
   18      5442     26.35    0.4%
   19      5728     42.59    0.7%
   20      6024     27.47    0.4%

Quality and confidence:
param     error
r         0.595

Model:
Time ~=    118.8
    + r    291.8
              µs

Reads = 4 + (100 * r)
Writes = 1 + (0 * r)

Pallet: "pallet_contracts", Extrinsic: "seal_contains_storage_per_kb", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Skipped Metadata (r:0 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

<truncated>...

Parity Bot added 2 commits February 4, 2022 16:19
…--manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs
@athei
Copy link
Member

athei commented Feb 4, 2022

bot merge

@paritytech-processbot paritytech-processbot bot merged commit 7cb0e76 into paritytech:master Feb 4, 2022
@athei
Copy link
Member

athei commented Feb 4, 2022

/tip medium

@substrate-tip-bot
Copy link

Please fix the following problems before calling the tip bot again:

  • Contributor did not properly post their Polkadot or Kusama address. Make sure the pull request has: "{network} address: {address}".

@athei
Copy link
Member

athei commented Feb 6, 2022

/tip medium

@substrate-tip-bot
Copy link

A medium tip was successfully submitted for agryaznov (CuS4xkzdiwshFM1onVoaUijW53cyYDyHSVFtpudmxvNx2VC on kusama).

https://polkadot.js.org/apps/#/treasury/tips

grishasobol pushed a commit to gear-tech/substrate that referenced this pull request Mar 28, 2022
…to API (paritytech#10789)

* is_contract() and caller_is_origin() added to Ext API

* is_contract() exposed in wasm runtime.rs

* + test for is_contract()

* + seal_is_contract benchmark

* caller_is_origin() exposed to wasm/runtime.rs and covered by a test

* + seal_caller_is_origin benchmark

* Update frame/contracts/src/exec.rs

Co-authored-by: Alexander Theißen <[email protected]>

* Update frame/contracts/src/exec.rs

Co-authored-by: Alexander Theißen <[email protected]>

* Update frame/contracts/src/exec.rs

Co-authored-by: Alexander Theißen <[email protected]>

* Update frame/contracts/src/wasm/runtime.rs

Co-authored-by: Alexander Theißen <[email protected]>

* Update frame/contracts/src/wasm/runtime.rs

Co-authored-by: Alexander Theißen <[email protected]>

* Update frame/contracts/src/wasm/runtime.rs

Co-authored-by: Alexander Theißen <[email protected]>

* Update frame/contracts/src/exec.rs

Co-authored-by: Alexander Theißen <[email protected]>

* identation fix for benchmark macroses; test cosmetic improvement

* benchmark fix

* + is_contract() wasm test

* + caller_is_origin() wasm test

* Apply suggestions from code review

Co-authored-by: Alexander Theißen <[email protected]>

* is_contract() to borrow param instead of taking ownership

* phrasing improved

Co-authored-by: Hernando Castano <[email protected]>

* fixed wasm tests according to @athei feedback

* dead code warnings suppressed by unstable-interface attributes

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

Co-authored-by: Alexander Theißen <[email protected]>
Co-authored-by: Hernando Castano <[email protected]>
Co-authored-by: Parity Bot <[email protected]>
driemworks added a commit to ideal-lab5/substrate-offchain-ipfs that referenced this pull request May 9, 2022
* Make some UI test expectations crisper (#10791)

* Make some UI test expectations crisper

* Update frame/support/test/tests/construct_runtime_ui/undefined_genesis_config_part.rs

* Update UI test expectations

* Missing newlines

* More whitespace issues

* contracts: `is_contract(address)` and `caller_is_origin()` are added to API (#10789)

* is_contract() and caller_is_origin() added to Ext API

* is_contract() exposed in wasm runtime.rs

* + test for is_contract()

* + seal_is_contract benchmark

* caller_is_origin() exposed to wasm/runtime.rs and covered by a test

* + seal_caller_is_origin benchmark

* Update frame/contracts/src/exec.rs

Co-authored-by: Alexander Theißen <[email protected]>

* Update frame/contracts/src/exec.rs

Co-authored-by: Alexander Theißen <[email protected]>

* Update frame/contracts/src/exec.rs

Co-authored-by: Alexander Theißen <[email protected]>

* Update frame/contracts/src/wasm/runtime.rs

Co-authored-by: Alexander Theißen <[email protected]>

* Update frame/contracts/src/wasm/runtime.rs

Co-authored-by: Alexander Theißen <[email protected]>

* Update frame/contracts/src/wasm/runtime.rs

Co-authored-by: Alexander Theißen <[email protected]>

* Update frame/contracts/src/exec.rs

Co-authored-by: Alexander Theißen <[email protected]>

* identation fix for benchmark macroses; test cosmetic improvement

* benchmark fix

* + is_contract() wasm test

* + caller_is_origin() wasm test

* Apply suggestions from code review

Co-authored-by: Alexander Theißen <[email protected]>

* is_contract() to borrow param instead of taking ownership

* phrasing improved

Co-authored-by: Hernando Castano <[email protected]>

* fixed wasm tests according to @athei feedback

* dead code warnings suppressed by unstable-interface attributes

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

Co-authored-by: Alexander Theißen <[email protected]>
Co-authored-by: Hernando Castano <[email protected]>
Co-authored-by: Parity Bot <[email protected]>

* maybe_total_supply in pallet-assets (#10799)

* maybe_total_supply in pallet-assets

* Update frame/assets/src/functions.rs

Co-authored-by: Bastian Köcher <[email protected]>

* Referenda and Conviction Voting pallets (#10195)

* Initial draft of new referendum state machine.

* Docs

* Fixes

* Fixes

* Add conviction-voting pallet

* Basic build

* Building

* Some TODOs

* Tests building

* Add missing file

* Basic lifecycle test

* Add couple of tests

* Another test

* More tests

* Fixes

* Fixes

* Formatting

* Fixes

* Tests

* Fixes

* Fixes

* More tests

* Formatting

* First few benchmarks

* First few benchmarks

* Defered queue servicing

* More testing

* Benchmarks

* Fiddly benchmark

* Final nudge benchmarks

* Formatting

* Formatting

* Finished up benchmarks

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

* Events finished

* Missing file

* No GenesisConfig for Referenda

* Formatting

* Docs

* Docs

* Docs

* Per-class conviction voting

* New test & mock utils

* More tests

* Tests

* Tests finished 🎉

* Benchmarking stuff

* Fixes

* Test harness

* Test harness

* Benchmarks for Conviction=Voting

* Benchmarking pipeline complete

* Docs

* Formatting

* Remove unneeded warning

* Fix UI tests

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

* Docs

* Update frame/conviction-voting/src/vote.rs

Co-authored-by: Shawn Tabrizi <[email protected]>

* update sp-runtime version

* MEL Fixes for Referenda and Conviction Voting (#10725)

* free maxencodedlen

* more maxencodedlen

* more MEL

* more mel

* disable storage info

* More Referenda Patches (#10760)

* basic fixes

* fix benchmarking

* fix license

* prevent panic in curve math

* fmt

* bump crate versions

* Update mock.rs

Co-authored-by: Parity Bot <[email protected]>
Co-authored-by: Shawn Tabrizi <[email protected]>

* More efficient WASM instance memory decommit on macos (#10801)

* More efficient WASM instance memory decommit on macos

* Apply suggestions from code review

Co-authored-by: Alexander Theißen <[email protected]>

* Updated error message

Co-authored-by: Alexander Theißen <[email protected]>

* make inner field of IdentityFields pub (#10773)

* Corrected description of clear_attribute extrinsic (#10729)

* block validators after X sessions, update mock runtime for test

* sp-maybe-compressed-blob: reduce boilerplate code (#10814)

Signed-off-by: koushiro <[email protected]>

* `seal_delegate_call` api function (support for library contracts)  (#10617)

* seal_call_code implementation

- tests
- benchmark

* Addressing @xgreenx's comments

* Fix test-linux-stable-int

* Rename seal_call_code to seal_delegate_call

* Pass value unchanged into lib contract

* Address @athei's comments

- whitespace .wat issues
- wrong/missing .wat comments
- redundant .wat calls/declarations

- change order of functions (seal_delegate_call right after seal_call)
  in decls, tests, benchmark
- fix comments, move doc comments to enum variants
- remove unnecessary empty lines

- rename runtime cost DelegateCall to DelegateCallBase
- do not set CallFlags::ALLOW_REENTRY for delegate_call

* Do not pass CallFlags::ALLOWS_REENTRY for delegate_call

* Update comment for seal_delegate_call and CallFlags

* Addressing @athei's comments (minor)

* Allow reentry for a new frame after delegate_call (revert)

* Same seal_caller and seal_value_transferred for lib contract

- test
- refactor frame args due to review
- logic for seal_caller (please review)

* Put caller on frame for delegate_call, minor fixes

* Update comment for delegate_call

* Addressing @athei's comments

* Update weights generated by benchmark

* Improve comments

* Address @HCastano's comments

* Update weights, thanks @joao-paulo-parity

* Improve InvalidCallFlags error comment

* Add Storage Info to Various Pallets (#10810)

* atomic swap

* bounties

* bounties fmt

* gilt

* indices

* nicks

* randomness-collective-flip

* recovery

* reuse maxapprovals

* Update tests.rs

* Update frame/randomness-collective-flip/src/lib.rs

Co-authored-by: Oliver Tale-Yazdi <[email protected]>

* use the correct bound

* complete recovery

* use `bounded_vec` macro

* Update tests.rs

* transaction payment

* uniques

* mmr

* example offchain worker

* beefy-mmr

* Update frame/recovery/src/lib.rs

Co-authored-by: Oliver Tale-Yazdi <[email protected]>

* Use BoundedVec instead of a type-parameterized BoundedString

* cargo fmt

* Update frame/atomic-swap/src/lib.rs

* use config const

* Update lib.rs

* update mel_bound

* fmt

Co-authored-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: Keith Yeung <[email protected]>

* fixed regression in inline docs (#10819)

* try-runtime-cli: Add to docs (#10822)

* try-runtime-cli: Add to docs of pre/post hooks

* Add note about --ws-max-out-buffer-capacity 1000

* Bump serde from 1.0.132 to 1.0.136 (#10816)

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.132 to 1.0.136.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.132...v1.0.136)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* uodate tests, ipfs tests failing

* --dev implies --tmp (#10828)

* Add a new host function for reporting fatal errors; make WASM backtraces readable when printing out errors (#10741)

* Add a new host function for reporting fatal errors

* Fix one of the wasmtime executor tests

* Have `#[runtime_interface(wasm_only)]` actually mean WASM-only, and not no_std-only

* Print out errors through `Display` instead of `Debug`

* Switch one more trait to require `Error` for its error instead of only `Debug`

* Align to review comments

* specify ipfs version, update tests

* Add db params for export-state CLI command (#10830)

* update tests, cleanup

* Allow `SetBalance` to handle error when trying to kill acount with reference counter. (#10826)

* bug found

* fix logic

* a little simpler

* add test

* UncheckedExtrinsic: Harden decode and clarify `EXTRINSIC_FORMAT_VERSION` (#10829)

* UncheckedExtrinsic: Harden decode and clarify `EXTRINSIC_FORMAT_VERSION`

* Apply suggestions from code review

* fix typo

* pallet-staking: Add extrinsic `force_apply_min_commission` (#10786)

* pallet-staking: Add extrinsic `force_apply_min_commission`

* Add benchmarks

* cargo run --quiet --profile=production  --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

* Bound iteration by  max_validator_count

* cargo run --quiet --profile=production  --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

* Only apply to 1 validator

* Update doc comments

* Uncomment tests

* cargo run --quiet --profile=production  --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

* Accept signed origins

* cargo run --quiet --profile=production  --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

* Remove contains_key check

* Add test for try_mutate_exists

* Impove try_mutate_exists docs

* Delete redundant try_mutate_exists tests;

* Delete residual from removed test

* cargo run --quiet --profile=production  --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

* Return an error when the stash does not exist

* Update try_mutate_exist doc wording

* Update frame/staking/src/pallet/mod.rs

* Apply suggestions from code review

Co-authored-by: Parity Bot <[email protected]>
Co-authored-by: Shawn Tabrizi <[email protected]>

* Upgradable contracts using `set_code` function (#10690)

* poc logic

* set_code_hash impl, tests, benchmark

* Address @xgreenx's comments

* Move func defs closer to set_storage

* Check if code exists

- increment/decrement codehash refcount

* Document error for non-existing code hash

* Revert unrelated change

* Changes due to @athei's review

* Fix error handling

- comment errors: ReturnCodes
- update mock ext implementation
- return Error::CodeNotFound when no code for such hash

* Emit ContractCodeUpdated when setting new code_hash

* Address @athei's comments

* Move related defs to the bottom

* Minor comment update

Co-authored-by: Alexander Theißen <[email protected]>

* Improve docs

* Improve docs

* Update frame/contracts/src/wasm/runtime.rs

Co-authored-by: Alexander Theißen <[email protected]>

* Refactor set_code_hash test

* Minor change to benchmark

Co-authored-by: Alexander Theißen <[email protected]>

* Minor change to benchmark

Co-authored-by: Alexander Theißen <[email protected]>

* Minor comment refactor

Co-authored-by: Alexander Theißen <[email protected]>

* Address @HCastano's comments

* Update seal_set_code_hash comment

Co-authored-by: Hernando Castano <[email protected]>

* Move set_code_hash after delegate_call

* Move function to the bottom

* Moved and changed banchmark, added verify block

* Bring back previous benchmark

* Remove skip_meta for seal_set_code_hash

* Bring back skip_meta for seal_set_storage_per_new_kb

* Apply weights

Co-authored-by: Alexander Theißen <[email protected]>
Co-authored-by: Hernando Castano <[email protected]>

* Separate wasmi and wasmer sandbox implementations into their own modules (#10563)

* Moves wasmi specific `ImportResolver` and `MemoryTransfer` impls to submodule

* Splits context store environmental, moves impl `Externals` to wasmi backend

* Adds wasmer sandbox backend stub module

* Move sandbox impl code to backend specific modules

* Moves wasmi stuff

* Fixes value conversion

* Makes it all compile

* Remove `with_context_store`

* Moves `WasmerBackend` to the impl

* Reformat the source

* Moves wasmer MemoryWrapper

* Reformats the source

* Fixes mutability

* Moves backend impls to a submodule

* Fix visibility

* Reformat the source

* Feature gate wasmer backend module

* Moves wasmi memory allocation to backend module

* Rename WasmerBackend to Backend

* Refactor dispatch result decoding, get rid of Wasmi types in common sandbox code

* Reformat the source

* Remove redundant prefixes in backend functions

* Remove wasmer-sandbox from default features

* Post-review changes

* Add conversion soundness proof

* Remove redundant prefix

* Removes now redundant clone_inner

* Add `Error::SandboxBackend`, refactor invoke result

* Fix comments

* Rename `Error::SandboxBackend` to `Sandbox`

* Simplifies logic in `wasmer_backend::invoke`

* Fixes memory management

* Show Network ID when creating and inspecting (#10838)

Signed-off-by: Antonio Yang <[email protected]>

* Reduce overhead of generating network event metrics (#10839)

* Fix reentrancy of FrozenBalance::died hook (#10473)

* assets: execute `died` hook outside of mutate

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* assets: extend tests for `died` hook

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* assets: update doc of FrozenBalance::died

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* assets: review fixes

- fix cases where `died` should not have been called
- use `Option<DeadConsequence>` instead of `DeadConsequence`

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* assets: update comment in mock.rs

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* assets: return `Remove` in dead_account

The return value is ignored in the only case that it is produced
by a call, but having it this way makes it more understandable.

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* allow trailing comma (#10841)

* build-script-utils: allow reading the git commit hash from env var (#10845)

* build-script-utils: allow reading the git commit hash from env var

* build-script-utils: make the env var name substrate specific

* Don't create DB leaves when syncing historic blocks (#10844)

* Don't create DB leaves when syncing historic blocks

* Changed leaves check and added test

* fmt

* cleanup, use unsigned tx when appropriate

* add weights

* fix broken link (#10846)

* subkey: Support `--version` cli command (#10853)

* subkey: Support `--version` cli command

* FMT :facepalm:

* Remove `u32_trait` (#10850)

* Remove `u32_trait`

This trait only existed because there wasn't any const generic support at time of creation. However,
we now have support for it :)

* FMT

* wasm-builder: Support latest nightly (#10837)

* wasm-builder: Support latest nightly

With latest nightly, aka rust version 1.60+ namespaced features are added. This changes the handling
of optional dependencies. We currently have features that enable optional dependencies when `std` is
enabled. This was before no problem, but now the wasm-builder detects them as enabled. To support
the transition period until 1.60 is released as stable, this pr adds an heuristic to not enable these
optional crates in the wasm build when they are enabled in the `std` feature. This heuristic fails
when someones enables these optional dependencies from the outside as well as via the `std` feature,
however we hope that no one is doing this at the moment. When namespaced features are enabled, these
dependencies needs to be enabled using `dep:dependency-name` to solve this properly.

https://doc.rust-lang.org/cargo/reference/unstable.html#namespaced-features

* Remove accidentally added features

* update tests, remove unneeded params

* min authorities check before removal

* contracts: Fix `seal_call` weights (#10796)

* Fix call weights

* Fix instantiate benchmark

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

* Remove stale and superflous comments

* `decrement_refcount` should be infallible

* Don't hardcode increment_refcount, decrement_refcount

* Rename CopyIn/CopyOut

* Fix warning in tests

Co-authored-by: Parity Bot <[email protected]>

* Enable the `parking_lot` feature for `tokio` (#10855)

* [ci] fix publish-rustdocs (#10858)

* Fix beefy mock ecdsa keys (#10854)

Compressed ECDSA keys requires to have 0x02 or 0x03 as their first byte
in order to allow public key recovery.

Nevertheless the test was working because of the `unwrap_or_default()`
at the end of the conversion routine (i.e. the invalid keys were
converted to an empty vector).

* Mark sync_state_genSyncSpec JSON-RPC as safe (#10832)

* Mark sync_state_genSyncSpec JSON-RPC as safe

* Note that parameter is unused

* Ideally I'd wait for compilation to be finished before pushing, but it's really taking a long time

* Remove deny_unsafe parameter

* Remove unused dependency

* Reduce CPU overhead of gossip (#10859)

* sp-core-hashing: use the `digest::Digest` trait to handle the hashing function uniformly (#10835)

* sp-core-hashing: use sha3 instead of tiny-keccak

Signed-off-by: koushiro <[email protected]>

* use blake2 instead of blake2-rfc

Signed-off-by: koushiro <[email protected]>

* improve som hashing of sp-core and sp-api-proc-macro

Signed-off-by: koushiro <[email protected]>

* Some nits

Signed-off-by: koushiro <[email protected]>

* cargo fmt

Signed-off-by: koushiro <[email protected]>

* Use fully qualified sytnax for `retain_mut` (#10865)

* add llvm (#10864)

* refactor election score (#10834)

* refactor election score

* Test for ord

* remove reference

* vec -> slice

* change iter to iter_by_significance

* improve doc

* fix typo

* add explanation about [u128; 3]

* consolidate threshold and epsilon

* random fixes

* rename

* remove Into

* make iter_by_sig private

* remove vec

* Fix tests

* Measure per byte and not kb for certain benchmarks (#10863)

* Tidy Democracy (#10867)

* add test

* Assorted refactorings

* complete test

* saturating math

* final check

* use `default`

Co-authored-by: Gav Wood <[email protected]>

* cleanup storage maps, cleanup unused imports

* sc-executor: Improve logging (#10869)

Improves the logging by switching to `tracing` for a better log output. Besides that, it also adds a
trace for the function being executed.

* fix test issues

* Track allowed requests for state/warp sync (#10843)

* Track allowed requests for state/warp sync

* Added missing allowed_requests resets

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <[email protected]>

* fmt

Co-authored-by: Bastian Köcher <[email protected]>

* Slots: Ensure that a race betwen finalized and best number is taken care off (#10876)

* Remove old lock file (#10879)

* Further reduce the CPU overhead of networking metrics (#10875)

* Simplify `num_connected_peers`

* Track requested peer counts

* Revert "Track requested peer counts"

This reverts commit 9f1c8704353df6afc17ed7e9f4ab8d8e29466ae4.

* Remove `substrate_sub_libp2p_peerset_num_requested` metric

* Remove two unused functions that I forgot to get rid of in previous commit

* Introduce `BoundedVec::iter_mut` (#10884)

* Introduce iters into BoundedVec

* Fix

* Remove unneeded funcs

* Update frame/support/src/storage/bounded_vec.rs

* Update frame/support/src/storage/bounded_vec.rs

Co-authored-by: Bastian Köcher <[email protected]>

* Slots: Log total proposing duration as milliseconds (#10886)

Parachains have currently a total proposing time of 500ms, so it this
currently always prints `0`. While actually the value is not `0` ;)

* staking: Clarify reward calc docs (#10890)

* tracing: Adds `init_for_tests` (#10893)

This function is useful for tests. It will enable `TRACE` logging and also uses the libtest aware writer.

* make submissions pub (#10899)

* contracts: Allow stack height metering to be disabled (#10877)

* Allow stack height metering to be disabled

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

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

Co-authored-by: Parity Bot <[email protected]>

* Rename Uniques Error::Unknown to something more sensible (#10895)

* Rename Uniques Error::Unknown to something more sensible

* Typos

* Typos

* fmt

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix tests

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* fmt

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

Co-authored-by: Oliver Tale-Yazdi <[email protected]>

* state-machine: Move all functionality from trie backend to the essence (#10904)

* state-machine: Move all functionality from trie backend to the essence

This is required for some future changes of me and it also makes more sense to have all the
functionality inside the essence. Besides that it changes the child root cache to directly
cache the hash.

* Update primitives/state-machine/src/trie_backend_essence.rs

Co-authored-by: cheme <[email protected]>

* FMT

Co-authored-by: cheme <[email protected]>

* staking: Remove `SessionInterface` supertrait (#10901)

* consensus-slots: cleanup SlotDuration config (#10878)

* consensus-slots: cleanup the SlotDuration config

* fix tests

* address review comments

* add contracts pallet + rpc to runtime

* Replace libsecp256k1 with k256 in FRAME related code (#10883)

* Replace libsecp256k1 with k256 in beefy-mmr

* Port of FRAME `contracts` benchmarking from `libsecp256k1` to `k256`

* Newtype to allow `Pcg32` rng usage with `k256` in contracts benchmarks

* Use `sp-io::crypto` to generate dummy keys in `contracts` bechmarks

* More compact code

* Cargo fmt

* Build `sp-keystore` only for dev profile

* Move public key generation back to the `map`

* Clean obsolete BABE's weight data (#10748)

* Clean obsolete BABE weight data
* Take out test assertion from check closure
* Optimize metadata access using `HeaderMetadata` trait
* Apply suggestions from code review
* Introduce finalize and import pre-commit synchronous actions
* Do not hold locks between internal methods calls
* Remove unused generic bound
* Apply suggestions from code review
* Register BABE's pre-commit actions on `block_import` instead of `start_babe`
* PreCommit actions should be `Fn` instead of `FnMut`
* More robust safenet in case of malformed finality notifications

Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: André Silva <[email protected]>

* Factor DB weights out into their own files (#10908)

* Factor DB weights out into their own files

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Review fixes

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix CI

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Weights in own mod

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Get rid of unnecessary use of `async-std` in non-test code (#10891)

* No longer generate specs with consensus_engine field (#10346)

* No longer generate specs with consensus_engine field

* #[allow(unused)]

* Upgrading parity-scale-codec to v3 (#10825)

* Upgraded dependencies

* Adapting code to scale v3

* Empty commit to trigger CI

* Triggering CI

* Fixing UI test

* Remove superfluous dev-dep added by #9228

* Cryout for CI

* sc-cli: Fix bugs after switching to clap3 (#10920)

* sc-cli: Fix bugs after switching to clap3

Before switching to clap3 we support cli options like `--reserved-nodes A B` and after you needed to
pass `--reserved-nodes` cli option multiple times `--reserved-nodes A --reserved-nodes B`. This is
fixed by setting `multiple_occurrences(true)` option. This also done for all the other `Vec` cli
options in `sc-cli`. Besides that `--sync` wasn't supporting case insensitive parsing of the value.
This is now also supported. For both regressions a test is added. Besides that the pr removes all
the `rename_all = PascalCase` attributes, because they are not needed. All other `ArgEnum`s were
checked and all are already using `ignore_case(true)`.

* Bring back `PascalCase`, because otherwise it falls back to `kebab-case`...

* Storage benchmarking (#10897)

* WIP

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* WIP: DB benchmarking

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* WIP

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* WIP

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Simplify code

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Remove old files

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Remove old files

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Minimize changes

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add license

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Remove dependencies

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Extend template

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Linter

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Linter

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Beauty fixes

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Remove default

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add feature

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Remove seed

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* CI wakeup

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fmt

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Review fixes

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Adding doc

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Adding doc

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Improve template

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Do not expose columns

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix ColumnId

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Nicer template prints

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Cleanup

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix json path

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Simplify `bench_write` logic

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Invert tx before the second commit

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* add transfer assets extrinsic

* add chain ext

* Minor improvements to `bounded_vec` and `defensive`.  (#10873)

* Fix a few things in bounded_vec

* add test for try_extend

* Update frame/support/src/storage/bounded_vec.rs

Co-authored-by: Bastian Köcher <[email protected]>

* some review comments

* use swap

* remove clone

* use pop instead of truncate

* remove warn

* review comments

* Update frame/support/src/storage/bounded_vec.rs

Co-authored-by: Bastian Köcher <[email protected]>

* fix rustdoc

* fix links

* undo link

Co-authored-by: Bastian Köcher <[email protected]>

* Replace libsecp256k1 with secp256k1 (#10798)

* Replace libsecp256k1 with secp256k1

* Wipe ecdsa secret key from memory on drop

* Some comments for a known issue

* Safer core crypto primitives `from_slice` constructor

Previous version panics if slice lenght is not the expected one.

* Unit test fix

* Enable use of global secp256k1 context

* Better comments for ecdsa `Pair` drop

* Replace `libsecp256k1` with `seco256k1` in `beefy-mmr`

Used to convert ecdsa public key to ETH address

* Replace `libsecp256k1` with `secp256k1` in FRAME `contracts`benchmarks

* Temporary rollback of `beefy-mmr` to libsecp256k1

Check for detected build issues

* Cargo fmt

* Rollback of FRAME `contracts` benchmarks to `libsecp256k1`

* Rollback for unrelated changes

* Typo fix

* Add comments for deprecated `ecdsa_verify` and `secp256k1_ecdsa_recover`

* Integrate try-runtime into substrate node template (#10909)

* [10892-integrate-try-runtime-into-node-template] - Integrated try-runtime into node template

* [10892-integrate-try-runtime-into-node-template] Added match arms for try-runtime in command.rs

* [10892-integrate-try-runtime-into-node-template] Added match arms for try-runtime in command.rs

* Added feature flag for try-runtime in node-template/node and enabled try-runtime for node-template/runtime

* Added missing type annotations for try-runtime SubCommand in node-template

* Added missing type annotations for try-runtime SubCommand in node-template

* Implemented frame_try_runtime::TryRuntime<Block> for the node-template Runtime

* doc corrections (#10936)

* #10576: generic utility to unsubscribe from broadcast upon drop of the rx-side. (#10708)

* #10576: refactor `sc-utils::notification` and `sc-client-api::notifications`, so that they use common subscribe/unsubscribe routines

* Add some docs. Reorganise `sc-utils::notification`

* `sc-clent-api::notifications` and `sc-utils::notification` — ensure the SubscriptionGuard is dropped before the Rx-channel

* `sc-utils::pubsub::SubscriptionGuard` make it a bit more ergonomic.

Let the `Rx` to be put inside of the `SubscriptionGuard`, so that the latter shall guarantee the order:
- first unsubscribe;
- then drop the `Rx`.

* Being less zealous with splitting the modules into little pieces

* rework pubsub: the concrete usage should only define a good registry type

* sc-client-api::notifications: make it comply with the reworked pubsub

* cargo fmt

* make sc-client-api tests work

* Address the review notes

* cargo fmt

* Describe the behaviour of pubsub registry

* Doc-comments for module `sc-utils::pubsub`

* Fix: it used to send notifications regardless of the filter setup during subscription

* `sc-client-api::StorageNotifications` the API does not have to require mut-self-reference.

As a result `sc-service::Client` does not have to wrap its `storage_notifications` into a Mutex.

* cargo fmt

* Several changes addressing the notes by @bckhr.

- Remove the `impl Default for StorageNotifications<Block>`;
- no need for groupping the `remove_from` and `listen_from` into a separate `helpers` module;
- remove unnecessary import `use registry::SubscribeOp`.

* Add a doc-comment to the `sc-client::notifications::SubscribeOp`

* As per @bkchr note on the unproven assertion: behave gracefully upon receiving a duplicate subscription-ID.

* sc-utils::pubsub: log when a registry yields an ID that does point to an existing sink

* `sc-utils::notifications`: payload materialized lazily

* Update Cargo.lock (after adding `log` as a dependency to the `sc-utils`)

* `sc-client-api::notifications`: introduce a struct (instead of a type def) for the notification message

* Get rid of `sc-utils::pubsub::Channel` trait (instead just use the `sc-utils::mpsc`)

* The SubsID is no more generic: the fact it is a `Copy` is known — no need to pass it by ref

* sc-utils::pubsub internals do not have to be generic over the channel type

* Rename Hub::dispatch into Hub::send

* That method was unnecessary (`SubscriberSink::render_notification`)

* cargo fmt

* No need for a separate UnsubscribeGuard type

* Ditch the type-def of SubsID in the sc-utils::pubsub, instead — just use the crate::id_sequence::SeqID

* Return the <Registry as Dispatch>::Ret when sending an item

* Make the `Hub<M, R>::lock_registry(...)` method more ergonomic

* cargo doc links

* cargo doc links

* Use a simpler name for the type

* cargo doc links

* Derive `Default` rather than implement it

* Derive `Default` rather than implement it

* Remove an unnecessary usage of type_name

* Define a more cautious order between sinks.remove->registry.unsubscribe and registry.subscribe->sinks.insert

* Hub: lock_registry_for_tests->map_registry_for_tests — a safer choice for a public API

* Replace Mutex over the shared Registry with a ReentrableMutex+RefCell

* sc-utils::pubsub: add tests for a panicking registry

* Add the missing copyright headers

* Arc<Vec<_>> -> Arc<[_]>

* Bring back MaxNominations as a metadata constant (#10947)

* chain ext: parse params and call transfer func

* Bump futures from 0.3.16 to 0.3.19 (#10930)

Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.16 to 0.3.19.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.16...0.3.19)

---
updated-dependencies:
- dependency-name: futures
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Clean up extra_constant renaming. (#10935)

Co-authored-by: Xiankun Cheng <[email protected]>

* Bump smallvec from 1.7.0 to 1.8.0 (#10949)

Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.7.0...v1.8.0)

---
updated-dependencies:
- dependency-name: smallvec
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* new pallet: whitelist pallet (#10159)

* pallet whitelist

* refactor a bit

* fmt

* address audit

* improve tests

* return Ok + refund

* add test for dispatching failing

* add dispatch_whitelisted_call_with_preimage

* fmt

* better name

* Consume all data on decode

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add error docs

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Remove phantom data

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Use rust 2021

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Update crate features

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fmt

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Make compile

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

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

* Bump Preimage max size

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

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

* Fmt

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

Co-authored-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: Parity Bot <[email protected]>

* Release primitive crates (#10937)

* cargo set-version --bump major -p pallet-contracts-primitives

* cargo set-version --bump major -p sp-core

* cargo set-version --bump major -p sp-runtime-interface

* cargo set-version --bump major -p sp-wasm-interface

* cargo set-version --bump major -p sp-runtime

* cargo set-version --bump major -p sp-storage

* cargo set-version --bump major -p sp-rpc

* cargo set-version --bump major -p sp-io

* cargo set-version --bump major -p sp-trie

* cargo set-version -p sp-state-machine  -- 0.12.0

* cargo set-version -p sp-externalities  -- 0.12.0

* cargo set-version -p sp-keystore -- 0.12.0

* cargo set-version --bump major -p sp-keyring

* cargo set-version --bump major -p sp-version

* cargo set-version --bump major -p sp-tracing

* cargo set-version --bump major -p sp-application-crypto

* cargo set-version --bump major -p sp-arithmetic

* cargo unleash version bump-major -p sp-runtime-interface-proc-macro

* Add codec max-encoded-len feature to sp-arithmetic

* cargo unleash version bump-major -p sp-core-hashing-proc-macro

* Update new whitelist pallet to new primitive versions (#10953)

* sp-trie: Switch to thiserror and some other small cleanups (#10954)

* sp-trie: Switch to thiserror and some other small cleanups

* Add some extra method for converting a compact proof to a memory db

* Only maintain at most 1 `UnlockChunk` per era (#10670)

* Only maintain at most 1 `UnlockChunk` per era

* Bound `unlocking`

* Run cargo +nightly-2021-10-29 fmt

* Make benchmarks stuff compile

* Update frame/staking/src/lib.rs

Co-authored-by: Kian Paimani <[email protected]>

* Remove DerefMut; Implement neccesary methods directly

* Doc comments for new BoundedVec methods

* Fix benchmarks

* wip bonded_vec macro

* Correct rust doc

* Apply suggestions from code review

Co-authored-by: Kian Paimani <[email protected]>

* Update staking::Config impls

* Add MaxUnlockingChunks to more places

* Use defensive saturating add

* FMT

Co-authored-by: Kian Paimani <[email protected]>

* staking: Expose `MaxUnlockingChunks` in metadata as a const (#10958)

* Allow trailing commas for `bounded_vec!` (#10959)

* SimpleSlotWorker: Do not implement `SlotWorker` for all types implementing `SimpleSlotWorker` (#10934)

Because Rust currently doesn't support specialization, it prevents users from implementing
`SlotWorker` for their own types. This pr solves this by removing the generic implementation of
`SlotWorker` for `SimpleSlotWorker` and providing some wrapper type for that.

* Bump digest from 0.10.2 to 0.10.3 (#10960)

Bumps [digest](https://github.com/RustCrypto/traits) from 0.10.2 to 0.10.3.
- [Release notes](https://github.com/RustCrypto/traits/releases)
- [Commits](https://github.com/RustCrypto/traits/compare/digest-v0.10.2...digest-v0.10.3)

---
updated-dependencies:
- dependency-name: digest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump scale-info from 2.0.0 to 2.0.1 (#10965)

Bumps [scale-info](https://github.com/paritytech/scale-info) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/paritytech/scale-info/releases)
- [Changelog](https://github.com/paritytech/scale-info/blob/master/CHANGELOG.md)
- [Commits](https://github.com/paritytech/scale-info/commits)

---
updated-dependencies:
- dependency-name: scale-info
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add pr-custom-review config (#10968)

* Revise how staking configurations are set (#10955)

* Revise how staking configurations are set

fixes #10938

* Fix and add additional tests

* Format

* Formatting

* Add doc

Co-authored-by: Kian Paimani <[email protected]>

* Update frame/staking/src/tests.rs

Co-authored-by: Kian Paimani <[email protected]>

* Format

* Fix build

* Update weights.rs

* cargo run --quiet --profile=production  --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

Co-authored-by: Shawn Tabrizi <[email protected]>
Co-authored-by: Kian Paimani <[email protected]>
Co-authored-by: Parity Bot <[email protected]>

* Bump libc from 0.2.112 to 0.2.119 (#10967)

Bumps [libc](https://github.com/rust-lang/libc) from 0.2.112 to 0.2.119.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.112...0.2.119)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump parity-db from 0.3.5 to 0.3.8 (#10970)

Bumps [parity-db](https://github.com/paritytech/parity-db) from 0.3.5 to 0.3.8.
- [Release notes](https://github.com/paritytech/parity-db/releases)
- [Commits](https://github.com/paritytech/parity-db/commits/v0.3.8)

---
updated-dependencies:
- dependency-name: parity-db
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [EPM pallet]: remove `number of signed submissions` (#10945)

* [EPM pallet]: remove `number of signed submissions`

Closing #9229

* fix tests

* remove needless assert

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

* cargo fmt

Signed-off-by: Niklas <[email protected]>

* fix grumbles

* cargo run --quiet --profile=production  --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

* drop `num_signed_submissions` in WeightInfo too

* fix build

Co-authored-by: Parity Bot <[email protected]>

* Refactored block body database scheme (#10779)

* Refactored tx storage database scheme

* Bump parity-db

* fmt

* Fix handling invalid index size + test

* Removed superflous result

* Minor changes

* fmt

* Deprecate "paritydb-experimental" CLI in favour or "paritydb" (#10975)

* Deprecate paritydb-experimental

* Updated comment

* [contracts] Stabilize "seal0" `is_contract` and `caller_is_origin`  (#10971)

* stabilize `seal_is_contract`

* stabilize `seal_caller_is_origin`

* Trie version migration pallet  (#10073)

* starting

* Updated from other branch.

* setting flag

* flag in storage struct

* fix flagging to access and insert.

* added todo to fix

* also missing serialize meta to storage proof

* extract meta.

* Isolate old trie layout.

* failing test that requires storing in meta when old hash scheme is used.

* old hash compatibility

* Db migrate.

* runing tests with both states when interesting.

* fix chain spec test with serde default.

* export state (missing trie function).

* Pending using new branch, lacking genericity on layout resolution.

* extract and set global meta

* Update to branch 4

* fix iterator with root flag (no longer insert node).

* fix trie root hashing of root

* complete basic backend.

* Remove old_hash meta from proof that do not use inner_hashing.

* fix trie test for empty (force layout on empty deltas).

* Root update fix.

* debug on meta

* Use trie key iteration that do not include value in proofs.

* switch default test ext to use inner hash.

* small integration test, and fix tx cache mgmt in ext.
test  failing

* Proof scenario at state-machine level.

* trace for db upgrade

* try different param

* act more like iter_from.

* Bigger batches.

* Update trie dependency.

* drafting codec changes and refact

* before removing unused branch no value alt hashing.
more work todo rename all flag var to alt_hash, and remove extrinsic
replace by storage query at every storage_root call.

* alt hashing only for branch with value.

* fix trie tests

* Hash of value include the encoded size.

* removing fields(broken)

* fix trie_stream to also include value length in inner hash.

* triedbmut only using alt type if inner hashing.

* trie_stream to also only use alt hashing type when actually alt hashing.

* Refactor meta state, logic should work with change of trie treshold.

* Remove NoMeta variant.

* Remove state_hashed trigger specific functions.

* pending switching to using threshold, new storage root api does not
make much sense.

* refactoring to use state from backend (not possible payload changes).

* Applying from previous state

* Remove default from storage, genesis need a special build.

* rem empty space

* Catch problem: when using triedb with default: we should not revert
nodes: otherwhise thing as trie codec cannot decode-encode without
changing state.

* fix compilation

* Right logic to avoid switch on reencode when default layout.

* Clean up some todos

* remove trie meta from root upstream

* update upstream and fix benches.

* split some long lines.

* UPdate trie crate to work with new design.

* Finish update to refactored upstream.

* update to latest triedb changes.

* Clean up.

* fix executor test.

* rust fmt from master.

* rust format.

* rustfmt

* fix

* start host function driven versioning

* update state-machine part

* still need access to state version from runtime

* state hash in mem: wrong

* direction likely correct, but passing call to code exec for genesis
init seem awkward.

* state version serialize in runtime, wrong approach, just initialize it
with no threshold for core api < 4 seems more proper.

* stateversion from runtime version (core api >= 4).

* update trie, fix tests

* unused import

* clean some TODOs

* Require RuntimeVersionOf for executor

* use RuntimeVersionOf to resolve genesis state version.

* update runtime version test

* fix state-machine tests

* TODO

* Use runtime version from storage wasm with fast sync.

* rustfmt

* fmt

* fix test

* revert useless changes.

* clean some unused changes

* fmt

* removing useless trait function.

* remove remaining reference to state_hash

* fix some imports

* Follow chain state version management.

* trie update, fix and constant threshold for trie layouts.

* update deps

* Update to latest trie pr changes.

* fix benches

* Verify proof requires right layout.

* update trie_root

* Update trie deps to  latest

* Update to latest trie versioning

* Removing patch

* update lock

* extrinsic for sc-service-test using layout v0.

* Adding RuntimeVersionOf to CallExecutor works.

* fmt

* error when resolving version and no wasm in storage.

* use existing utils to instantiate runtime code.

* migration pallet

* Patch to delay runtime switch.

* Revert "Patch to delay runtime switch."

This reverts commit d35f273b7d67b1b85a9e72973cab13c5c156c1d3.

* fix test

* fix child migration calls.

* useless closure

* remove remaining state_hash variables.

* Fix and add more tests

* Remove outdated comment

* useless inner hash

* fmt

* remote tests

* finally ksm works

* batches are broken

* clean the benchmarks

* Apply suggestions from code review

Co-authored-by: Guillaume Thiolliere <[email protected]>

* Apply suggestions from code review

Co-authored-by: Guillaume Thiolliere <[email protected]>

* Update frame/state-trie-migration/src/lib.rs

Co-authored-by: Joshy Orndorff <[email protected]>

* Update frame/state-trie-migration/src/lib.rs

* brand new version

* fix build

* Update frame/state-trie-migration/src/lib.rs

Co-authored-by: Guillaume Thiolliere <[email protected]>

* Update frame/state-trie-migration/src/lib.rs

Co-authored-by: Guillaume Thiolliere <[email protected]>

* Update primitives/storage/src/lib.rs

Co-authored-by: cheme <[email protected]>

* Update frame/state-trie-migration/src/lib.rs

Co-authored-by: cheme <[email protected]>

* Update frame/state-trie-migration/src/lib.rs

Co-authored-by: cheme <[email protected]>

* fmt and opt-in feature to apply state change.

* feature gate core version, use new test feature for node and test node

* Use a 'State' api version instead of Core one.

* fix merge of test function

* use blake macro.

* Fix state api (require declaring the api in runtime).

* Opt out feature, fix macro for io to select a given version
instead of latest.

* run test nodes on new state.

* fix

* new test structure

* new testing stuff from emeric

* Add commit_all, still not working

* Fix all tests

* add comment

* we have PoV tracking baby

* document stuff, but proof size is still wrong

* FUCK YEAH

* a big batch of review comments

* add more tests

* tweak test

* update config

* some remote-ext stuff

* delete some of the old stuff

* sync more files with master to minimize the diff

* Fix all tests

* make signed migration a bit more relaxed

* add witness check to signed submissions

* allow custom migration to also go above limit

* Fix these pesky tests

* ==== removal of the unsigned stuff ====

* Make all tests work again

* separate the tests from the logic so it can be reused easier

* fix overall build

* Update frame/state-trie-migration/src/lib.rs

Co-authored-by: cheme <[email protected]>

* Update frame/state-trie-migration/src/lib.rs

Co-authored-by: cheme <[email protected]>

* Slightly better termination

* some final tweaks

* Fix tests

* Restrict access to signed migrations

* address most of the review comments

* fix defensive

* New simplified code

* Fix weights

* fmt

* Update frame/state-trie-migration/src/lib.rs

Co-authored-by: Bastian Köcher <[email protected]>

* make the tests correctly fail

* Fix build

* Fix build

* try and fix the benchmarks

* fix build

* Fix cargo file

* Fix runtime deposit

* make rustdoc happy

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

Co-authored-by: cheme <[email protected]>
Co-authored-by: Guillaume Thiolliere <[email protected]>
Co-authored-by: Joshy Orndorff <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: Parity Bot <[email protected]>

* BEEFY and GRANDPA protocol names should use full genesis hash (#10974)

std::fmt::Display shows formats as reduced hash (e.g. 0xb0a8…dafe)

Use hex::encode to format full hash.

Signed-off-by: acatangiu <[email protected]>

* Move weight constants to own mod (#10980)

* Move block+ext weights to own mod

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Unused import

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* add block usage logs to system pallet (#10940)

* add block usage logs to system pallet

* add Debug

* use % instead of default Debug impl

* change formatting

* revert

* update runtime storage, update chain extension

* cleanup chain ext

* Fix the undeterministic storage proof recorded for the same execution (#10915)

* Add a test case for the determinism of recorded proof

* Replace HashMap with BTreeMap for the actual proof records

* cargo +nightly fmt --all

* Store the trie nodes in BTreeSet for StorageProof

* Nit

* Revert the BTreeMap changes and sort when converting to storage proof

* Remove PartialEq from StorageProof

* Remove unnecessary change

* Add `compare` method to StorageProof

* FMT

* Dummy change to trigger CI

* Use `BTreeSet` for StorageProof and keep using `Vec` for CompactProof

* Update comment on `iter_nodes`

* Revert `PartialEq` removal

* create iris ledger pallet

* ledger funcs in chain ext

* rename Iris -> IrisAssets, update readmes

* Minor Uniques pallet improvements and XCM v3 preparations (#10896)

* Introduce Helper to Uniques for benchmark stuff

* Fixes

* Formatting

* Featuregate the Helper, include ContainsPair

* Introduce & use EnsureOriginWithArg

* Benchmarking

* Docs

* More ContainsBoth helpers

* Formatting

* Formatting

* Fixes

Co-authored-by: Shawn Tabrizi <[email protected]>

* election provider support: Update some test only types (#10983)

* Feedback from @XLC for Referenda Pallet (#10991)

* feedback from @xlc

* english

* fmt

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

Co-authored-by: Oliver Tale-Yazdi <[email protected]>

* Make bags-list generic over node value and instantiable (#10997)

* make instantiable

* update

* cargo fmt

* Clean up

* bags-list: Make it generic over node value

* Respond to some feedback

* Apply suggestions from code review

Co-authored-by: Kian Paimani <[email protected]>

* Add back default impl for weight update worst case

* Update to Score in more places'

* Use VoteWeight, not u64 to reduce test diff

* FMT

* FullCodec implies Codec

* formatting

* Fixup bags list remote test

Co-authored-by: doordashcon <[email protected]>
Co-authored-by: Doordashcon <[email protected]>
Co-authored-by: Kian Paimani <[email protected]>

* sc-finality-grandpa: use the #[from] attriute to remove boilerplate code (#11003)

Signed-off-by: koushiro <[email protected]>

* contracts: Add test to verify unique trie ids (#10914)

* Add test to verify unique trie ids

* Rename trie_seed to nonce

* Rename AccountCounter -> Nonce

* fmt

* sp-core: `full_crypto` doesn't imply `std` (#11006)

* sp-core: `full_crypto` doesn't imply `std`

This pr changes the feature set of `secp256k1` to not use `global-context` when only the
`full_crypto` is enabled. It will be slower when the `std` feature is not enabled as the context
always needs to be recreated, but that is fine.

* Update client/cli/src/arg_enums.rs

Co-authored-by: Davide Galassi <[email protected]>

Co-authored-by: Davide Galassi <[email protected]>

* Remove unused `parent_hash` in `OverlayedChanges::into_storage_changes` (#11011)

Ref https://github.com/paritytech/substrate/pull/10922#issuecomment-1064258443

CC @cheme

* iris ledger pallet -> transfer not yet functioning

* sp-api: Don't be dirty (#11015)

Ensure that the sp api macros don't use functions without providing the full path to the function.
This hygiene ensures that we don't actually try to call a method of an imported trait for example.

* unlock and transfer works

* Update clap to the latest version (#11017)

* Update clap to the latest version

Besides that it also removes some `structopt` leftovers from some docs.

* Fix compile errors

* More fixes

* Move scripts used in CI to the new location (#11008)

Move scripts used in CI to the new location - **./scripts/ci/**

* Move github scripts

* Move more files

* Move ci scripts and fix dependencies

* Update docs/node-template-release.md

Co-authored-by: João Paulo Silva de Souza <[email protected]>

* Remove Cargo.lock

* Apply suggestions from code review

Co-authored-by: Denis Pisarev <[email protected]>

* Make more paths uniform

Co-authored-by: João Paulo Silva de Souza <[email protected]>
Co-authored-by: Denis Pisarev <[email protected]>

* Move `sp-npos-elections-solution-type` to `frame-election-provider-support` (#11016)

* Move `sp-npos-elections-solution-type`
to `frame-election-provider-support`
First stab at it, will need to amend some more stuff

* Fixing tests

* Fixing tests

* Fixing cargo.toml for std configuration

* fmt

* Committing suggested changes
renaming, and re exporting macro.

* Removing unneeded imports

* shell.nix: Update to a newer nightly (#11028)

* update chain ext

* update naming, formatting, start tests

* Update lockfile (#11035)

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Additional `benchmark-storage` flags (#11004)

* Fix typos

* Enable overwriting handlebars template

* Optionally name json output or disable json altogether

* Don't write to json by default

* Include block id in handlebars output

* Include warmups for write benchmarks

* PR comments

* Drop unnecessary file extension

* Use more appropriate types

* Use more appropriate error message

* More use of more appropriate types

* Rework write benchmark warmups

* Run same benchmark for both read and write

* SharedData: Update locks to mention possible deadlocks (#11034)

* SharedData: Update locks to mention possible deadlocks

* Update `Cargo.lock`

* Stabilize `seal_delegate_call` (#11037)

* add tests

* re-enumerate chain ext func ids

* Bump names from 0.12.0 to 0.13.0 (#11047)

Bumps [names](https://github.com/fnichol/names) from 0.12.0 to 0.13.0.
- [Release notes](https://github.com/fnichol/names/releases)
- [Changelog](https://github.com/fnichol/names/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fnichol/names/compare/v0.12.0...v0.13.0)

---
updated-dependencies:
- dependency-name: names
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* State migration rpc (#10981)

* setting flag

* flag in storage struct

* fix flagging to access and insert.

* added todo to fix

* also missing serialize meta to storage proof

* extract meta.

* Isolate old trie layout.

* failing test that requires storing in meta when old hash scheme is used.

* old hash compatibility

* Db migrate.

* runing tests with both states when interesting.

* fix chain spec test with serde default.

* export state (missing trie function).

* Pending using new branch, lacking genericity on layout resolution.

* extract and set global meta

* Update to branch 4

* fix iterator with root flag (no longer insert node).

* fix trie root hashing of root

* complete basic backend.

* Remove old_hash meta from proof that do not use inner_hashing.

* fix trie test for empty (force layout on empty deltas).

* Root update fix.

* debug on meta

* Use trie key iteration that do not include value in proofs.

* switch default test ext to use inner hash.

* small integration test, and fix tx cache mgmt in ext.
test  failing

* Proof scenario at state-machine level.

* trace for db upgrade

* try different param

* act more like iter_from.

* Bigger batches.

* Update trie dependency.

* drafting codec changes and refact

* before removing unused branch no value alt hashing.
more work todo rename all flag var to alt_hash, and remove extrinsic
replace by storage query at every storage_root call.

* alt hashing only for branch with value.

* fix trie tests

* Hash of value include the encoded size.

* removing fields(broken)

* fix trie_stream to also include value length in inner hash.

* triedbmut only using alt type if inner hashing.

* trie_stream to also only use alt hashing type when actually alt hashing.

* Refactor meta state, logic should work with change of trie treshold.

* Remove NoMeta variant.

* Remove state_hashed trigger specific functions.

* pending switching to using threshold, new storage root api does not
make much sense.

* refactoring to use state from backend (not possible payload changes).

* Applying from previous state

* Remove default from storage, genesis need a special build.

* rem empty space

* Catch problem: when using triedb with default: we should not revert
nodes: otherwhise thing as trie codec cannot decode-encode without
changing state.

* fix compilation

* Right …
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
…to API (paritytech#10789)

* is_contract() and caller_is_origin() added to Ext API

* is_contract() exposed in wasm runtime.rs

* + test for is_contract()

* + seal_is_contract benchmark

* caller_is_origin() exposed to wasm/runtime.rs and covered by a test

* + seal_caller_is_origin benchmark

* Update frame/contracts/src/exec.rs

Co-authored-by: Alexander Theißen <[email protected]>

* Update frame/contracts/src/exec.rs

Co-authored-by: Alexander Theißen <[email protected]>

* Update frame/contracts/src/exec.rs

Co-authored-by: Alexander Theißen <[email protected]>

* Update frame/contracts/src/wasm/runtime.rs

Co-authored-by: Alexander Theißen <[email protected]>

* Update frame/contracts/src/wasm/runtime.rs

Co-authored-by: Alexander Theißen <[email protected]>

* Update frame/contracts/src/wasm/runtime.rs

Co-authored-by: Alexander Theißen <[email protected]>

* Update frame/contracts/src/exec.rs

Co-authored-by: Alexander Theißen <[email protected]>

* identation fix for benchmark macroses; test cosmetic improvement

* benchmark fix

* + is_contract() wasm test

* + caller_is_origin() wasm test

* Apply suggestions from code review

Co-authored-by: Alexander Theißen <[email protected]>

* is_contract() to borrow param instead of taking ownership

* phrasing improved

Co-authored-by: Hernando Castano <[email protected]>

* fixed wasm tests according to @athei feedback

* dead code warnings suppressed by unstable-interface attributes

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

Co-authored-by: Alexander Theißen <[email protected]>
Co-authored-by: Hernando Castano <[email protected]>
Co-authored-by: Parity Bot <[email protected]>
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. D2-notlive 💤 PR contains changes in a runtime directory that is not deployed to a chain that requires an audit.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Allow contracts to query whether an address is a contract
4 participants