Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: DID support for service endpoints #276

Merged
merged 50 commits into from
Oct 28, 2021

Conversation

ntn-x2
Copy link
Member

@ntn-x2 ntn-x2 commented Oct 22, 2021

fixes KILTProtocol/ticket#1621

This PR re-introduces service endpoints for DIDs. The following changes were made:

  • DidCreationDetails now contains an extra new_service_details field, which is a DidEndpointDetails.
  • The DidEndpointDetails struct contains the fields id, service_types and urls, respectively a vector of bytes and two vectors of vectors of bytes. All of them are bounded by parameters in the did pallet's Config trait.
  • The did pallet storage has two new elements:
    • ServiceEndpoints: a double map which maps from (did_identifier, service_id) to an instance of DidEndpointDetails
    • DidEndpointsCount: a map which maps from did_identifier to the number of services stored under that identifier. This is needed as a storage double map has no efficient way to count how many elements have been stored under a given prefix.
    • Monday task

How to test:

Run cargo test --all --all-features --all-targets as currently compiling/testing a single pallet is broken.

Custom types

I will open a types PR as soon as this PR is reviewed.

Checklist:

  • Implement features
  • Add/update tests
  • Update comments
  • Get review
  • Run benchmarks
  • Bump runtime version
  • Open types PR

@ntn-x2 ntn-x2 requested a review from weichweich October 22, 2021 15:21
Copy link
Contributor

@wischli wischli left a comment

Choose a reason for hiding this comment

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

LGTM!

@ntn-x2 ntn-x2 changed the title feat: DID support for service endpoints [DO NOT MERGE] feat: DID support for service endpoints Oct 25, 2021
@ntn-x2 ntn-x2 added the ✋on hold status: on hold label Oct 25, 2021
pallets/did/src/lib.rs Outdated Show resolved Hide resolved
pallets/did/src/lib.rs Show resolved Hide resolved
pallets/did/src/service_endpoints.rs Outdated Show resolved Hide resolved
pallets/did/src/service_endpoints.rs Outdated Show resolved Hide resolved
@ntn-x2
Copy link
Member Author

ntn-x2 commented Oct 27, 2021

/bench runtime spiritnet-runtime did

@kilt-command-bot
Copy link

kilt-command-bot bot commented Oct 27, 2021

Benchmark Runtime Pallet for branch "aa-new-did-service-endpoints" with command cargo run --quiet --release -p kilt-parachain --features=runtime-benchmarks -- benchmark --chain=spiritnet-dev --steps=50 --repeat=20 --pallet=did --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/spiritnet/src/weights/did.rs --template=.maintain/runtime-weight-template.hbs

Results
Pallet: "did", Extrinsic: "create_ed25519_keys", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:2 w:2)
Storage: Did DidBlacklist (r:1 w:0)
Storage: Did Did (r:1 w:1)
Storage: Did DidEndpointsCount (r:0 w:1)
Storage: Did ServiceEndpoints (r:0 w:25)

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

Model:
Time ~=    155.4
    + n    2.194
    + c    10.52
              µs

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

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

Data points distribution:
    n     c   mean µs  sigma µs       %
    1    25       421     0.411    0.0%
    2    25     423.3     0.423    0.0%
    3    25     425.8     0.339    0.0%
    4    25     426.7     0.565    0.1%
    5    25     428.8     0.375    0.0%
    6    25     430.1     0.641    0.1%
    7    25     433.5     0.341    0.0%
    8    25     435.4     0.428    0.0%
    9    25     438.2     0.667    0.1%
   10     1     188.4     0.443    0.2%
   10     2     199.2     0.422    0.2%
   10     3     210.7     0.351    0.1%
   10     4     220.9     0.249    0.1%
   10     5     231.4       0.5    0.2%
   10     6     241.4     0.522    0.2%
   10     7     251.9     0.329    0.1%
   10     8     264.7     0.128    0.0%
   10     9       275     0.346    0.1%
   10    10     284.7     0.277    0.0%
   10    11     294.8     0.282    0.0%
   10    12     304.9     0.438    0.1%
   10    13     315.7     0.343    0.1%
   10    14     325.3     0.362    0.1%
   10    15     335.4     0.429    0.1%
   10    16     345.3     0.324    0.0%
   10    17     355.5      0.32    0.0%
   10    18     371.1     0.561    0.1%
   10    19     379.7     0.537    0.1%
   10    20       390     0.388    0.0%
   10    21     400.5     0.345    0.0%
   10    22     410.4     0.556    0.1%
   10    23     420.5     0.385    0.0%
   10    24     431.2     0.308    0.0%
   10    25     441.9     0.822    0.1%

Quality and confidence:
param     error
n         0.029
c         0.009

Model:
Time ~=    155.2
    + n    2.379
    + c     10.5
              µs

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

Pallet: "did", Extrinsic: "create_sr25519_keys", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:2 w:2)
Storage: Did DidBlacklist (r:1 w:0)
Storage: Did Did (r:1 w:1)
Storage: Did DidEndpointsCount (r:0 w:1)
Storage: Did ServiceEndpoints (r:0 w:25)

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

Model:
Time ~=    158.7
    + n    2.197
    + c    10.87
              µs

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

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

Data points distribution:
    n     c   mean µs  sigma µs       %
    1    25     433.7     0.289    0.0%
    2    25     435.9     0.764    0.1%
    3    25     436.8     0.507    0.1%
    4    25     438.5     0.569    0.1%
    5    25     440.8     0.529    0.1%
    6    25     441.4     0.592    0.1%
    7    25     446.4     0.487    0.1%
    8    25     447.5     0.618    0.1%
    9    25     450.4     0.614    0.1%
   10     1     191.8     0.338    0.1%
   10     2     203.1     0.216    0.1%
   10     3     215.5      0.31    0.1%
   10     4     225.4     0.381    0.1%
   10     5     236.1     0.518    0.2%
   10     6     247.6     0.297    0.1%
   10     7     258.2     0.217    0.0%
   10     8       271     0.855    0.3%
   10     9     282.3     0.373    0.1%
   10    10     290.9      0.23    0.0%
   10    11     302.3     0.529    0.1%
   10    12     312.4     0.174    0.0%
   10    13     323.8     0.313    0.0%
   10    14     333.6     0.417    0.1%
   10    15     344.3     0.687    0.1%
   10    16     353.9     0.248    0.0%
   10    17     365.8     0.539    0.1%
   10    18     379.1     0.488    0.1%
   10    19     389.4      0.33    0.0%
   10    20     401.4     1.426    0.3%
   10    21     411.2     0.497    0.1%
   10    22     422.8     0.675    0.1%
   10    23     432.3      0.44    0.1%
   10    24       443     0.673    0.1%
   10    25     453.2     0.569    0.1%

Quality and confidence:
param     error
n         0.031
c         0.009

Model:
Time ~=    158.6
    + n    2.385
    + c    10.84
              µs

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

Pallet: "did", Extrinsic: "create_ecdsa_keys", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:2 w:2)
Storage: Did DidBlacklist (r:1 w:0)
Storage: Did Did (r:1 w:1)
Storage: Did DidEndpointsCount (r:0 w:1)
Storage: Did ServiceEndpoints (r:0 w:25)

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

Model:
Time ~=    272.9
    + n    2.248
    + c    10.35
              µs

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

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

Data points distribution:
    n     c   mean µs  sigma µs       %
    1    25     534.8     0.541    0.1%
    2    25     538.1      1.18    0.2%
    3    25     539.2     0.786    0.1%
    4    25     540.7     0.623    0.1%
    5    25       542     0.675    0.1%
    6    25     543.8     0.618    0.1%
    7    25     548.3     1.099    0.2%
    8    25       549      0.55    0.1%
    9    25     552.4     0.715    0.1%
   10     1     306.5     0.476    0.1%
   10     2     316.5     0.896    0.2%
   10     3     329.3     1.005    0.3%
   10     4     338.7     0.387    0.1%
   10     5       349     0.677    0.1%
   10     6     360.6     1.639    0.4%
   10     7       369     0.841    0.2%
   10     8       382     0.461    0.1%
   10     9       391     0.806    0.2%
   10    10     400.8     0.464    0.1%
   10    11     411.1     0.496    0.1%
   10    12       422      0.74    0.1%
   10    13     432.4     0.788    0.1%
   10    14     440.9     0.601    0.1%
   10    15     451.7     0.566    0.1%
   10    16     460.8     0.481    0.1%
   10    17     471.7     1.752    0.3%
   10    18     485.3     0.642    0.1%
   10    19     495.4     0.545    0.1%
   10    20     504.5     0.495    0.0%
   10    21     514.6     0.795    0.1%
   10    22     525.5     0.929    0.1%
   10    23     535.3       0.8    0.1%
   10    24       546     0.974    0.1%
   10    25     555.8     1.719    0.3%

Quality and confidence:
param     error
n         0.035
c         0.011

Model:
Time ~=    273.4
    + n    2.403
    + c    10.32
              µs

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

Pallet: "did", Extrinsic: "delete", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did DidEndpointsCount (r:1 w:1)
Storage: Did Did (r:1 w:1)
Storage: Did DidBlacklist (r:0 w:1)
Storage: Did ServiceEndpoints (r:0 w:1)

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

Model:
Time ~=    41.18
    + c    1.089
              µs

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

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

Data points distribution:
    c   mean µs  sigma µs       %
    1     41.29     0.158    0.3%
    2     43.83     0.243    0.5%
    3     44.65     0.196    0.4%
    4     45.59      0.13    0.2%
    5     46.25     0.293    0.6%
    6      46.9     0.267    0.5%
    7     47.87     0.275    0.5%
    8     50.02     0.348    0.6%
    9     50.59     0.242    0.4%
   10     52.74     0.205    0.3%
   11      53.8     0.217    0.4%
   12      54.5     0.292    0.5%
   13     55.35     0.215    0.3%
   14     56.79      0.35    0.6%
   15     57.27     0.441    0.7%
   16     58.42      0.42    0.7%
   17     59.35     0.486    0.8%
   18     61.14     0.369    0.6%
   19     62.06     0.196    0.3%
   20     62.46     0.314    0.5%
   21     64.41     0.352    0.5%
   22     65.31     0.142    0.2%
   23     66.49     0.196    0.2%
   24     66.92     0.153    0.2%
   25     67.73     0.224    0.3%

Quality and confidence:
param     error
c         0.004

Model:
Time ~=    41.04
    + c    1.095
              µs

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

Pallet: "did", Extrinsic: "reclaim_deposit", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)
Storage: Did DidEndpointsCount (r:1 w:1)
Storage: Did DidBlacklist (r:0 w:1)
Storage: Did ServiceEndpoints (r:0 w:1)

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

Model:
Time ~=     45.9
    + c    1.097
              µs

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

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

Data points distribution:
    c   mean µs  sigma µs       %
    1     46.05     0.231    0.5%
    2     48.55     0.368    0.7%
    3     49.41     0.231    0.4%
    4     50.18      0.23    0.4%
    5     50.84      0.27    0.5%
    6     51.61     0.315    0.6%
    7     52.99     0.254    0.4%
    8     54.73     0.278    0.5%
    9      55.9     0.214    0.3%
   10     57.71     0.274    0.4%
   11     58.83     0.331    0.5%
   12     59.68     0.268    0.4%
   13     60.77     0.436    0.7%
   14     61.63     0.316    0.5%
   15     62.47     0.301    0.4%
   16     62.77     0.283    0.4%
   17     64.25     0.241    0.3%
   18     65.74     0.367    0.5%
   19     66.94     0.416    0.6%
   20     67.56     0.253    0.3%
   21     68.81     0.295    0.4%
   22     69.92     0.262    0.3%
   23     71.39     0.416    0.5%
   24     72.17     0.317    0.4%
   25     72.68     0.213    0.2%

Quality and confidence:
param     error
c         0.005

Model:
Time ~=    45.85
    + c    1.099
              µs

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

Pallet: "did", Extrinsic: "submit_did_call_ed25519_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    86.44
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    86.44
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "submit_did_call_sr25519_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    89.53
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    89.53
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "submit_did_call_ecdsa_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    204.4
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    204.4
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "set_ed25519_authentication_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    48.15
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    48.15
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "set_sr25519_authentication_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    48.38
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    48.38
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "set_ecdsa_authentication_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    48.54
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    48.54
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "set_ed25519_delegation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    47.63
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    47.63
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "set_sr25519_delegation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    48.18
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    48.18
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "set_ecdsa_delegation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    48.04
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    48.04
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "remove_ed25519_delegation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    44.72
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    44.72
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "remove_sr25519_delegation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    44.74
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    44.74
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "remove_ecdsa_delegation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    44.47
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    44.47
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "set_ed25519_attestation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    48.24
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    48.24
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "set_sr25519_attestation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    48.13
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    48.13
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "set_ecdsa_attestation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    48.28
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    48.28
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "remove_ed25519_attestation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    44.76
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    44.76
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "remove_sr25519_attestation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    44.85
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    44.85
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "remove_ecdsa_attestation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    44.72
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    44.72
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "add_ed25519_key_agreement_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=       47
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=       47
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "add_sr25519_key_agreement_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    47.08
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    47.08
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "add_ecdsa_key_agreement_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    47.21
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    47.21
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "remove_ed25519_key_agreement_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    45.13
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    45.13
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "remove_sr25519_key_agreement_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    44.98
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    44.98
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "remove_ecdsa_key_agreement_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    44.92
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    44.92
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "add_service_endpoint", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:0)
Storage: Did DidEndpointsCount (r:1 w:1)
Storage: Did ServiceEndpoints (r:1 w:1)

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

Model:
Time ~=    43.39
              µs

Reads = 3
Writes = 2

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

Model:
Time ~=    43.39
              µs

Reads = 3
Writes = 2

Pallet: "did", Extrinsic: "remove_service_endpoint", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did ServiceEndpoints (r:1 w:1)
Storage: Did DidEndpointsCount (r:1 w:1)

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

Model:
Time ~=    34.93
              µs

Reads = 2
Writes = 2

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

Model:
Time ~=    34.93
              µs

Reads = 2
Writes = 2

Pallet: "did", Extrinsic: "signature_verification_sr25519", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:0)

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

Model:
Time ~=    37.68
    + l    0.003
              µs

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

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

Data points distribution:
    l   mean µs  sigma µs       %
    1      71.7     0.205    0.2%
104858     459.7     0.176    0.0%
209715     848.3      0.66    0.0%
314572      1235     1.011    0.0%
419429      1624     1.118    0.0%
524286      2012     1.156    0.0%
629143      2400     1.138    0.0%
734000      2789     0.963    0.0%
838857      3184     11.66    0.3%
943714      3568     10.92    0.3%
1048571      3954     11.09    0.2%
1153428      4343      10.7    0.2%
1258285      4730     10.21    0.2%
1363142      5112     0.818    0.0%
1467999      5508     11.57    0.2%
1572856      5889     1.902    0.0%
1677713      6285     11.95    0.1%
1782570      6674     13.28    0.1%
1887427      7071     9.346    0.1%
1992284      7448     11.32    0.1%
2097141      7846     12.44    0.1%
2201998      8230     12.62    0.1%
2306855      8618     11.51    0.1%
2411712      9019     11.81    0.1%
2516569      9396      11.4    0.1%
2621426      9783     11.02    0.1%
2726283     10170     7.692    0.0%
2831140     10560     9.393    0.0%
2935997     10970     11.31    0.1%
3040854     11370     10.27    0.0%
3145711     11750     9.306    0.0%
3250568     12140     8.689    0.0%
3355425     12530     7.094    0.0%
3460282     12930      11.1    0.0%
3565139     13330     9.829    0.0%
3669996     13720     11.49    0.0%
3774853     14120     12.78    0.0%
3879710     14520     9.648    0.0%
3984567     14900     11.54    0.0%
4089424     15310     15.16    0.0%
4194281     15720     9.544    0.0%
4299138     16110     11.14    0.0%
4403995     16500     9.488    0.0%
4508852     16890     19.76    0.1%
4613709     17300      7.23    0.0%
4718566     17700     14.41    0.0%
4823423     18080     12.61    0.0%
4928280     18480     14.35    0.0%
5033137     18880     14.18    0.0%
5137994     19290     13.48    0.0%
5242851     19690     5.247    0.0%

Quality and confidence:
param     error
l             0

Model:
Time ~=    25.59
    + l    0.004
              µs

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

Pallet: "did", Extrinsic: "signature_verification_ed25519", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:0)

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

Model:
Time ~=    29.81
    + l    0.002
              µs

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

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

Data points distribution:
    l   mean µs  sigma µs       %
    1     69.09     0.212    0.3%
104858     276.3     0.274    0.0%
209715     484.4     0.218    0.0%
314572     690.3     0.239    0.0%
419429     897.5     0.668    0.0%
524286      1109     8.345    0.7%
629143      1314     1.401    0.1%
734000      1520     1.157    0.0%
838857      1729      8.17    0.4%
943714      1933     1.454    0.0%
1048571      2138     1.341    0.0%
1153428      2348     2.544    0.1%
1258285      2553     0.581    0.0%
1363142      2761     1.357    0.0%
1467999      2969     3.548    0.1%
1572856      3174     0.293    0.0%
1677713      3385     8.101    0.2%
1782570      3597     10.77    0.2%
1887427      3801      7.89    0.2%
1992284      4020     12.44    0.3%
2097141      4224     12.98    0.3%
2201998      4424     2.231    0.0%
2306855      4640     12.33    0.2%
2411712      4847     12.27    0.2%
2516569      5050     1.486    0.0%
2621426      5265     11.41    0.2%
2726283      5477     11.86    0.2%
2831140      5682      5.44    0.0%
2935997      5891     8.959    0.1%
3040854      6111     12.68    0.2%
3145711      6333     10.44    0.1%
3250568      6550     9.746    0.1%
3355425      6763     12.04    0.1%
3460282      6969      4.45    0.0%
3565139      7186     9.151    0.1%
3669996      7420     3.815    0.0%
3774853      7616     8.285    0.1%
3879710      7822     3.683    0.0%
3984567      8040     8.846    0.1%
4089424      8265     10.23    0.1%
4194281      8477     12.14    0.1%
4299138      8688     9.571    0.1%
4403995      8911     13.95    0.1%
4508852      9122     9.532    0.1%
4613709      9340     11.04    0.1%
4718566      9548     9.875    0.1%
4823423      9770     14.82    0.1%
4928280      9989     10.75    0.1%
5033137     10210     12.94    0.1%
5137994     10430     11.59    0.1%
5242851     10640     12.58    0.1%

Quality and confidence:
param     error
l             0

Model:
Time ~=     21.3
    + l    0.002
              µs

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

Pallet: "did", Extrinsic: "signature_verification_ecdsa", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:0)

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

Model:
Time ~=    146.7
    + l    0.001
              µs

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

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

Data points distribution:
    l   mean µs  sigma µs       %
    1     187.2      0.55    0.2%
104858     296.6     0.464    0.1%
209715     408.6     0.339    0.0%
314572     517.6     0.639    0.1%
419429     627.7     0.626    0.0%
524286     738.1     0.832    0.1%
629143     846.8     0.549    0.0%
734000       957     1.291    0.1%
838857      1066       0.6    0.0%
943714      1175     0.698    0.0%
1048571      1286     0.832    0.0%
1153428      1396     1.562    0.1%
1258285      1505     0.844    0.0%
1363142      1622      8.59    0.5%
1467999      1737     13.51    0.7%
1572856      1838     1.256    0.0%
1677713      1966     11.58    0.5%
1782570      2060     1.974    0.0%
1887427      2170      1.47    0.0%
1992284      2282     0.854    0.0%
2097141      2395     7.113    0.2%
2201998      2503     1.593    0.0%
2306855      2618     8.602    0.3%
2411712      2724     1.847    0.0%
2516569      2836      2.09    0.0%
2621426      2948     2.109    0.0%
2726283      3063     1.911    0.0%
2831140      3176     1.319    0.0%
2935997      3303     10.44    0.3%
3040854      3406     2.261    0.0%
3145711      3535     2.186    0.0%
3250568      3649     3.953    0.1%
3355425      3773     10.92    0.2%
3460282      3886     9.657    0.2%
3565139      4010     11.12    0.2%
3669996      4120     7.294    0.1%
3774853      4246     9.755    0.2%
3879710      4363     13.12    0.3%
3984567      4467     4.917    0.1%
4089424      4588     3.799    0.0%
4194281      4706     2.614    0.0%
4299138      4830     11.11    0.2%
4403995      4944     6.672    0.1%
4508852      5059     4.022    0.0%
4613709      5189     8.573    0.1%
4718566      5302     5.497    0.1%
4823423      5431     12.79    0.2%
4928280      5545     11.14    0.2%
5033137      5661     6.851    0.1%
5137994      5791      9.42    0.1%
5242851      5905     9.706    0.1%

Quality and confidence:
param     error
l             0

Model:
Time ~=    138.6
    + l    0.001
              µs

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


@ntn-x2
Copy link
Member Author

ntn-x2 commented Oct 27, 2021

/bench runtime peregrine did

…hmarks -- benchmark --chain=spiritnet-dev --steps=50 --repeat=20 --pallet=did --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/spiritnet/src/weights/did.rs --template=.maintain/runtime-weight-template.hbs
@kilt-command-bot
Copy link

kilt-command-bot bot commented Oct 27, 2021

Benchmark Runtime Substrate Pallet for branch "aa-new-did-service-endpoints" with command cargo run --quiet --release -p kilt-parachain --features=runtime-benchmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=crowdloan --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/peregrine/src/weights/crowdloan.rs --template=.maintain/runtime-weight-template.hbs

Results
Pallet: "crowdloan", Extrinsic: "set_registrar_account", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: CrowdloanContributors RegistrarAccount (r:1 w:1)

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

Model:
Time ~=    20.51
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    20.51
              µs

Reads = 1
Writes = 1

Pallet: "crowdloan", Extrinsic: "set_contribution", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: CrowdloanContributors RegistrarAccount (r:1 w:0)
Storage: CrowdloanContributors Contributions (r:1 w:1)

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

Model:
Time ~=    23.13
              µs

Reads = 2
Writes = 1

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

Model:
Time ~=    23.13
              µs

Reads = 2
Writes = 1

Pallet: "crowdloan", Extrinsic: "remove_contribution", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: CrowdloanContributors RegistrarAccount (r:1 w:0)
Storage: CrowdloanContributors Contributions (r:1 w:1)

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

Model:
Time ~=    24.77
              µs

Reads = 2
Writes = 1

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

Model:
Time ~=    24.77
              µs

Reads = 2
Writes = 1


…hmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=crowdloan --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/peregrine/src/weights/crowdloan.rs --template=.maintain/runtime-weight-template.hbs
@kilt-command-bot
Copy link

kilt-command-bot bot commented Oct 27, 2021

Benchmark Runtime Substrate Pallet for branch "aa-new-did-service-endpoints" with command cargo run --quiet --release -p kilt-parachain --features=runtime-benchmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=did --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/peregrine/src/weights/did.rs --template=.maintain/runtime-weight-template.hbs

Results
Pallet: "did", Extrinsic: "create_ed25519_keys", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:2 w:2)
Storage: Did DidBlacklist (r:1 w:0)
Storage: Did Did (r:1 w:1)
Storage: Did DidEndpointsCount (r:0 w:1)
Storage: Did ServiceEndpoints (r:0 w:25)

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

Model:
Time ~=    155.5
    + n    2.226
    + c    10.18
              µs

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

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

Data points distribution:
    n     c   mean µs  sigma µs       %
    1    25     412.4     0.313    0.0%
    2    25     418.1      0.53    0.1%
    3    25       417     0.338    0.0%
    4    25     417.5     0.394    0.0%
    5    25     420.7     0.566    0.1%
    6    25       422     0.478    0.1%
    7    25     425.4     0.263    0.0%
    8    25     429.7     0.509    0.1%
    9    25     432.8     0.533    0.1%
   10     1     187.9     0.341    0.1%
   10     2     197.8      0.41    0.2%
   10     3     209.1     0.303    0.1%
   10     4     219.4     0.108    0.0%
   10     5     229.1     0.712    0.3%
   10     6     239.3      0.36    0.1%
   10     7     252.1     1.175    0.4%
   10     8     262.4     0.671    0.2%
   10     9     271.1     0.371    0.1%
   10    10       281     0.502    0.1%
   10    11     291.3     0.403    0.1%
   10    12     301.1     0.436    0.1%
   10    13     310.2      0.52    0.1%
   10    14     323.5     0.389    0.1%
   10    15     332.9     0.292    0.0%
   10    16     339.7     0.412    0.1%
   10    17     349.2     0.367    0.1%
   10    18     364.5     0.839    0.2%
   10    19     374.4     2.618    0.6%
   10    20     383.1     0.417    0.1%
   10    21     394.5     1.346    0.3%
   10    22       403     0.518    0.1%
   10    23     413.1     0.498    0.1%
   10    24     422.5     0.792    0.1%
   10    25       432     0.612    0.1%

Quality and confidence:
param     error
n          0.04
c         0.012

Model:
Time ~=    155.5
    + n     2.34
    + c    10.18
              µs

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

Pallet: "did", Extrinsic: "create_sr25519_keys", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:2 w:2)
Storage: Did DidBlacklist (r:1 w:0)
Storage: Did Did (r:1 w:1)
Storage: Did DidEndpointsCount (r:0 w:1)
Storage: Did ServiceEndpoints (r:0 w:25)

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

Model:
Time ~=    157.8
    + n    2.392
    + c    10.53
              µs

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

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

Data points distribution:
    n     c   mean µs  sigma µs       %
    1    25       425     1.106    0.2%
    2    25     426.2     0.865    0.2%
    3    25     427.8     0.201    0.0%
    4    25     430.5     0.688    0.1%
    5    25     431.8     0.616    0.1%
    6    25     433.7       0.4    0.0%
    7    25     438.3     1.025    0.2%
    8    25     442.4     0.564    0.1%
    9    25       443     0.906    0.2%
   10     1     191.9     0.306    0.1%
   10     2     203.3     0.426    0.2%
   10     3     214.6     0.359    0.1%
   10     4     224.6     0.293    0.1%
   10     5     235.4     1.486    0.6%
   10     6     245.1     0.349    0.1%
   10     7       256     0.382    0.1%
   10     8     267.9     0.373    0.1%
   10     9     278.3     0.363    0.1%
   10    10     288.1     0.389    0.1%
   10    11     298.3     0.398    0.1%
   10    12     308.4     0.381    0.1%
   10    13     318.8     0.533    0.1%
   10    14     329.9     0.273    0.0%
   10    15     341.5     0.451    0.1%
   10    16     349.9     0.456    0.1%
   10    17     360.1      0.48    0.1%
   10    18     372.2      0.55    0.1%
   10    19     383.8     0.436    0.1%
   10    20     392.8     0.285    0.0%
   10    21     404.9     0.562    0.1%
   10    22     415.3     0.292    0.0%
   10    23     424.5     0.369    0.0%
   10    24     434.3     1.258    0.2%
   10    25     445.2     0.719    0.1%

Quality and confidence:
param     error
n         0.027
c         0.008

Model:
Time ~=    157.8
    + n    2.477
    + c    10.52
              µs

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

Pallet: "did", Extrinsic: "create_ecdsa_keys", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:2 w:2)
Storage: Did DidBlacklist (r:1 w:0)
Storage: Did Did (r:1 w:1)
Storage: Did DidEndpointsCount (r:0 w:1)
Storage: Did ServiceEndpoints (r:0 w:25)

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

Model:
Time ~=    274.6
    + n    2.103
    + c       10
              µs

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

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

Data points distribution:
    n     c   mean µs  sigma µs       %
    1    25     525.9     0.664    0.1%
    2    25     529.7     0.885    0.1%
    3    25     531.1     0.647    0.1%
    4    25     532.8     0.796    0.1%
    5    25     535.9     0.689    0.1%
    6    25       537     0.424    0.0%
    7    25     539.8     1.114    0.2%
    8    25     541.8     0.746    0.1%
    9    25     543.2     0.927    0.1%
   10     1     306.2     0.617    0.2%
   10     2     322.2      11.2    3.4%
   10     3     326.7     0.582    0.1%
   10     4     336.6     0.513    0.1%
   10     5     347.7      1.19    0.3%
   10     6       357     0.419    0.1%
   10     7     367.4     0.817    0.2%
   10     8     379.5      0.79    0.2%
   10     9     387.9     0.634    0.1%
   10    10     396.8     0.744    0.1%
   10    11     407.6     0.869    0.2%
   10    12     416.7     0.563    0.1%
   10    13     426.2     0.529    0.1%
   10    14     439.1     0.705    0.1%
   10    15     446.9     0.917    0.2%
   10    16     456.2      0.67    0.1%
   10    17     467.7     0.643    0.1%
   10    18     481.2     1.066    0.2%
   10    19     489.5     1.323    0.2%
   10    20     498.9     0.661    0.1%
   10    21     508.8     0.705    0.1%
   10    22     517.5     1.082    0.2%
   10    23     527.1     0.787    0.1%
   10    24     536.3     0.727    0.1%
   10    25     545.7     0.896    0.1%

Quality and confidence:
param     error
n         0.062
c         0.019

Model:
Time ~=    275.1
    + n    2.307
    + c    9.953
              µs

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

Pallet: "did", Extrinsic: "delete", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did DidEndpointsCount (r:1 w:1)
Storage: Did Did (r:1 w:1)
Storage: Did DidBlacklist (r:0 w:1)
Storage: Did ServiceEndpoints (r:0 w:1)

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

Model:
Time ~=    40.97
    + c    1.037
              µs

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

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

Data points distribution:
    c   mean µs  sigma µs       %
    1     41.11     0.222    0.5%
    2     43.41     0.281    0.6%
    3     44.17     0.174    0.3%
    4     44.88     0.197    0.4%
    5     45.37     0.348    0.7%
    6     46.87     0.357    0.7%
    7     47.93     0.282    0.5%
    8      49.5     0.318    0.6%
    9     50.85     0.414    0.8%
   10     52.62     0.503    0.9%
   11     52.94     0.274    0.5%
   12     53.59     0.207    0.3%
   13     54.66     0.466    0.8%
   14     56.01     0.183    0.3%
   15     56.86     0.355    0.6%
   16     56.96     0.331    0.5%
   17     58.58     0.347    0.5%
   18     59.77      0.43    0.7%
   19     60.61     0.273    0.4%
   20     61.39     0.189    0.3%
   21     62.63     0.105    0.1%
   22        64      0.41    0.6%
   23     65.06     0.247    0.3%
   24     65.69     0.332    0.5%
   25     66.42     0.398    0.5%

Quality and confidence:
param     error
c         0.004

Model:
Time ~=    40.97
    + c    1.039
              µs

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

Pallet: "did", Extrinsic: "reclaim_deposit", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)
Storage: Did DidEndpointsCount (r:1 w:1)
Storage: Did DidBlacklist (r:0 w:1)
Storage: Did ServiceEndpoints (r:0 w:1)

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

Model:
Time ~=    45.64
    + c    1.035
              µs

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

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

Data points distribution:
    c   mean µs  sigma µs       %
    1     46.05     0.285    0.6%
    2     48.27     0.226    0.4%
    3     48.92     0.349    0.7%
    4      49.7     0.367    0.7%
    5     50.35     0.405    0.8%
    6      51.3     0.236    0.4%
    7     52.32     0.273    0.5%
    8     54.12     0.204    0.3%
    9     55.14     0.329    0.5%
   10     57.31      0.32    0.5%
   11     58.02     0.495    0.8%
   12     58.43     0.325    0.5%
   13     58.94     0.239    0.4%
   14     59.94     0.304    0.5%
   15     60.92     0.453    0.7%
   16      61.8     0.221    0.3%
   17     63.25     0.194    0.3%
   18      65.1     0.304    0.4%
   19     65.09     0.175    0.2%
   20     66.19     0.288    0.4%
   21     67.22      0.29    0.4%
   22     68.39     0.249    0.3%
   23     69.69     0.185    0.2%
   24     70.74     0.408    0.5%
   25     71.13      0.22    0.3%

Quality and confidence:
param     error
c         0.005

Model:
Time ~=    45.65
    + c    1.037
              µs

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

Pallet: "did", Extrinsic: "submit_did_call_ed25519_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    85.65
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    85.65
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "submit_did_call_sr25519_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    88.12
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    88.12
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "submit_did_call_ecdsa_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    203.2
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    203.2
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "set_ed25519_authentication_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    47.52
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    47.52
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "set_sr25519_authentication_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    47.13
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    47.13
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "set_ecdsa_authentication_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    47.44
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    47.44
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "set_ed25519_delegation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=     47.1
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=     47.1
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "set_sr25519_delegation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    47.15
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    47.15
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "set_ecdsa_delegation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    47.18
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    47.18
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "remove_ed25519_delegation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    43.34
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    43.34
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "remove_sr25519_delegation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    43.78
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    43.78
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "remove_ecdsa_delegation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    43.46
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    43.46
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "set_ed25519_attestation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=       47
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=       47
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "set_sr25519_attestation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    46.79
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    46.79
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "set_ecdsa_attestation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    46.65
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    46.65
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "remove_ed25519_attestation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=     43.2
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=     43.2
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "remove_sr25519_attestation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    43.33
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    43.33
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "remove_ecdsa_attestation_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    43.21
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    43.21
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "add_ed25519_key_agreement_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    45.67
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    45.67
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "add_sr25519_key_agreement_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    45.88
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    45.88
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "add_ecdsa_key_agreement_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    45.96
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    45.96
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "remove_ed25519_key_agreement_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=     43.7
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=     43.7
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "remove_sr25519_key_agreement_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    43.65
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    43.65
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "remove_ecdsa_key_agreement_key", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:1)

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

Model:
Time ~=    43.74
              µs

Reads = 1
Writes = 1

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

Model:
Time ~=    43.74
              µs

Reads = 1
Writes = 1

Pallet: "did", Extrinsic: "add_service_endpoint", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:0)
Storage: Did DidEndpointsCount (r:1 w:1)
Storage: Did ServiceEndpoints (r:1 w:1)

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

Model:
Time ~=    43.23
              µs

Reads = 3
Writes = 2

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

Model:
Time ~=    43.23
              µs

Reads = 3
Writes = 2

Pallet: "did", Extrinsic: "remove_service_endpoint", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did ServiceEndpoints (r:1 w:1)
Storage: Did DidEndpointsCount (r:1 w:1)

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

Model:
Time ~=    34.53
              µs

Reads = 2
Writes = 2

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

Model:
Time ~=    34.53
              µs

Reads = 2
Writes = 2

Pallet: "did", Extrinsic: "signature_verification_sr25519", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:0)

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

Model:
Time ~=    38.53
    + l    0.003
              µs

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

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

Data points distribution:
    l   mean µs  sigma µs       %
    1     70.89     0.188    0.2%
104858     458.6     0.232    0.0%
209715     846.6     0.463    0.0%
314572      1235     0.824    0.0%
419429      1623      1.44    0.0%
524286      2014     9.592    0.4%
629143      2399     1.364    0.0%
734000      2789     8.131    0.2%
838857      3173     0.546    0.0%
943714      3563     8.211    0.2%
1048571      3959     12.73    0.3%
1153428      4340     7.827    0.1%
1258285      4735      12.9    0.2%
1363142      5120     12.04    0.2%
1467999      5508     11.58    0.2%
1572856      5896     12.36    0.2%
1677713      6280     8.407    0.1%
1782570      6664     1.029    0.0%
1887427      7061     12.39    0.1%
1992284      7456     12.26    0.1%
2097141      7838     9.992    0.1%
2201998      8236     12.99    0.1%
2306855      8625     12.69    0.1%
2411712      9011     11.84    0.1%
2516569      9413     9.559    0.1%
2621426      9797     12.39    0.1%
2726283     10180      11.1    0.1%
2831140     10590     13.13    0.1%
2935997     10970     10.45    0.0%
3040854     11360     12.78    0.1%
3145711     11750     10.77    0.0%
3250568     12140      7.22    0.0%
3355425     12540     11.55    0.0%
3460282     12940     11.98    0.0%
3565139     13330     9.806    0.0%
3669996     13720     12.29    0.0%
3774853     14110     10.42    0.0%
3879710     14520     11.05    0.0%
3984567     14910     11.14    0.0%
4089424     15310      15.8    0.1%
4194281     15700      14.6    0.0%
4299138     16100     9.145    0.0%
4403995     16500     15.76    0.0%
4508852     16910      13.7    0.0%
4613709     17300     11.37    0.0%
4718566     17690     4.335    0.0%
4823423     18080     13.32    0.0%
4928280     18490     17.02    0.0%
5033137     18880      11.5    0.0%
5137994     19290     21.56    0.1%
5242851     19690     22.95    0.1%

Quality and confidence:
param     error
l             0

Model:
Time ~=    25.82
    + l    0.004
              µs

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

Pallet: "did", Extrinsic: "signature_verification_ed25519", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:0)

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

Model:
Time ~=    33.94
    + l    0.002
              µs

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

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

Data points distribution:
    l   mean µs  sigma µs       %
    1     67.86      0.15    0.2%
104858     275.6     0.203    0.0%
209715     482.9     0.311    0.0%
314572     690.6     1.373    0.1%
419429     897.8     0.701    0.0%
524286      1105     1.079    0.0%
629143      1311     0.912    0.0%
734000      1520     1.099    0.0%
838857      1729     11.85    0.6%
943714      1932     1.119    0.0%
1048571      2142     8.099    0.3%
1153428      2346     1.653    0.0%
1258285      2554     0.917    0.0%
1363142      2766     10.55    0.3%
1467999      2968     2.917    0.0%
1572856      3174     0.686    0.0%
1677713      3383     1.803    0.0%
1782570      3590     1.396    0.0%
1887427      3797     0.461    0.0%
1992284      4021     13.88    0.3%
2097141      4217     7.716    0.1%
2201998      4428     9.548    0.2%
2306855      4640     12.17    0.2%
2411712      4848     10.17    0.2%
2516569      5060     12.87    0.2%
2621426      5267      11.2    0.2%
2726283      5472     4.683    0.0%
2831140      5685     7.121    0.1%
2935997      5890     1.544    0.0%
3040854      6115     10.87    0.1%
3145711      6318     6.391    0.1%
3250568      6526     2.272    0.0%
3355425      6742     3.575    0.0%
3460282      6959     8.064    0.1%
3565139      7180     14.59    0.2%
3669996      7386     1.456    0.0%
3774853      7596     2.057    0.0%
3879710      7830     12.41    0.1%
3984567      8032     5.849    0.0%
4089424      8253     13.88    0.1%
4194281      8469     8.164    0.0%
4299138      8683     12.64    0.1%
4403995      8894      4.95    0.0%
4508852      9116     10.75    0.1%
4613709      9329     15.61    0.1%
4718566      9554     12.16    0.1%
4823423      9763     11.32    0.1%
4928280      9984     13.24    0.1%
5033137     10190     10.42    0.1%
5137994     10400     11.61    0.1%
5242851     10640     14.27    0.1%

Quality and confidence:
param     error
l             0

Model:
Time ~=     23.1
    + l    0.002
              µs

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

Pallet: "did", Extrinsic: "signature_verification_ecdsa", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Did Did (r:1 w:0)

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

Model:
Time ~=    150.1
    + l    0.001
              µs

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

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

Data points distribution:
    l   mean µs  sigma µs       %
    1     185.2     0.615    0.3%
104858     295.8     0.433    0.1%
209715     406.2      0.65    0.1%
314572     515.8     0.837    0.1%
419429     626.6     0.723    0.1%
524286     735.2     0.622    0.0%
629143     846.8     1.732    0.2%
734000     957.9         1    0.1%
838857      1068     1.098    0.1%
943714      1176     1.252    0.1%
1048571      1285     0.795    0.0%
1153428      1395      1.14    0.0%
1258285      1511     8.132    0.5%
1363142      1616     0.808    0.0%
1467999      1728     1.091    0.0%
1572856      1838     1.453    0.0%
1677713      1948      1.08    0.0%
1782570      2059     1.013    0.0%
1887427      2181     12.11    0.5%
1992284      2281     0.482    0.0%
2097141      2395     0.818    0.0%
2201998      2502     0.494    0.0%
2306855      2612     0.956    0.0%
2411712      2734     10.83    0.3%
2516569      2838      1.78    0.0%
2621426      2956     11.01    0.3%
2726283      3064       1.6    0.0%
2831140      3178     1.706    0.0%
2935997      3291     1.544    0.0%
3040854      3405     2.215    0.0%
3145711      3519     3.071    0.0%
3250568      3640     10.89    0.2%
3355425      3754      3.16    0.0%
3460282      3876     9.924    0.2%
3565139      3997     7.706    0.1%
3669996      4108     5.135    0.1%
3774853      4230     12.46    0.2%
3879710      4345     8.195    0.1%
3984567      4456     2.672    0.0%
4089424      4583     12.83    0.2%
4194281      4696     5.266    0.1%
4299138      4825     11.71    0.2%
4403995      4940     10.82    0.2%
4508852      5052     12.91    0.2%
4613709      5171     6.723    0.1%
4718566      5283     2.158    0.0%
4823423      5406     4.329    0.0%
4928280      5524     5.181    0.0%
5033137      5648     9.195    0.1%
5137994      5777     13.77    0.2%
5242851      5902     11.05    0.1%

Quality and confidence:
param     error
l             0

Model:
Time ~=    141.2
    + l    0.001
              µs

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


kiltbot and others added 3 commits October 27, 2021 16:16
…hmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=did --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/peregrine/src/weights/did.rs --template=.maintain/runtime-weight-template.hbs
…ime-benchmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=crowdloan --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/peregrine/src/weights/crowdloan.rs --template=.maintain/runtime-weight-template.hbs
@weichweich weichweich enabled auto-merge (squash) October 28, 2021 11:06
@weichweich weichweich removed the ✋on hold status: on hold label Oct 28, 2021
@weichweich weichweich changed the title [DO NOT MERGE] feat: DID support for service endpoints feat: DID support for service endpoints Oct 28, 2021
@weichweich weichweich disabled auto-merge October 28, 2021 11:32
@weichweich weichweich enabled auto-merge (squash) October 28, 2021 11:32
@weichweich weichweich merged commit 6ddf0f8 into develop Oct 28, 2021
@weichweich weichweich deleted the aa-new-did-service-endpoints branch October 28, 2021 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking JS Types This PR will break the JS types. 💛 medium priority: medium ✨ new feature feature: new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants