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: add tips pallet #352

Merged
merged 9 commits into from
Apr 19, 2022
Merged

feat: add tips pallet #352

merged 9 commits into from
Apr 19, 2022

Conversation

wischli
Copy link
Contributor

@wischli wischli commented Apr 6, 2022

fixes KILTProtocol/ticket#1829

  • Adds tips pallet to peregrine and spiritnet runtime
  • Bootstraps initial tips members as Council

Todo

  • Run benchmarks

Checklist:

  • I have verified that the code works
    • No panics! (checked arithmetic ops, no indexing array[3] use get(3), ...)
  • I have verified that the code is easy to understand
  • I have left the code in a better state
  • I have documented the changes (where applicable)

@wischli wischli requested review from weichweich, ntn-x2 and trusch April 6, 2022 14:02
@wischli wischli added the ✨ new feature feature: new feature label Apr 6, 2022
@wischli wischli self-assigned this Apr 6, 2022
use super::*;

parameter_types! {
pub const DataDepositPerByte: Balance = deposit(0, 1);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In Polkadot, this is set to 1 cent. However, I wanted to align with our other deposits.

Copy link
Contributor

Choose a reason for hiding this comment

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

We already have a constant ByteDeposit. Maybe we use this across all pallets that require a byte deposit? I'm not sure if there are cases where we want to have different byte deposits for different pallets.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 96bb827

pub const MaximumReasonLength: u32 = 16384;
pub const TipCountdown: BlockNumber = DAYS;
pub const TipFindersFee: Percent = Percent::from_percent(20);
pub const TipReportDepositBase: Balance = deposit(1, 1);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In Polkadot, this is set to 1 Dollar. However, I wanted to align with our other deposits.


parameter_types! {
pub const DataDepositPerByte: Balance = deposit(0, 1);
pub const MaximumReasonLength: u32 = 16384;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is naively taken from Kusama configuration, I could not find any information where this value comes from unfortunately.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we were told once that there is a threshold up to which a storage entry size doesn't influence the weights. If this threshold is passed, the storage needs to be taken into account when doing benchmarks. Maybe the value is related to that?

@KILTprotocol KILTprotocol deleted a comment from kilt-command-bot bot Apr 6, 2022
@wischli
Copy link
Contributor Author

wischli commented Apr 6, 2022

/bench runtime spiritnet-runtime pallet-tips

@kilt-command-bot
Copy link

Starting benchmark for branch: wf-add-tips-pallet (vs develop)

Toolchain:
nightly-2021-07-06-x86_64-unknown-linux-gnu (default)
rustc 1.55.0-nightly (952fdf2a1 2021-07-05)

Comment will be updated.

@KILTprotocol KILTprotocol deleted a comment from kilt-command-bot bot Apr 6, 2022
@KILTprotocol KILTprotocol deleted a comment from kilt-command-bot bot Apr 6, 2022
@wischli
Copy link
Contributor Author

wischli commented Apr 6, 2022

/bench runtime spiritnet-runtime pallet-tips

@kilt-command-bot
Copy link

ERROR: Failed to query the currently active Rust toolchain

@wischli
Copy link
Contributor Author

wischli commented Apr 6, 2022

/bench runtime spiritnet-runtime pallet-tips

@kilt-command-bot
Copy link

kilt-command-bot bot commented Apr 6, 2022

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

Results
info: syncing channel updates for 'nightly-2022-01-08-x86_64-unknown-linux-gnu'
info: latest update on 2022-01-08, rust version 1.59.0-nightly (e012a191d 2022-01-06)
info: downloading component 'rust-std' for 'wasm32-unknown-unknown'
info: installing component 'rust-std' for 'wasm32-unknown-unknown'
2022-04-06 17:52:13 panicked at 'not implemented', /home/benchbot/bench-bot/git/mashnet-node/runtimes/spiritnet/src/lib.rs:495:9    
Error: Input("Error executing and verifying runtime benchmark: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\nWASM backtrace:\n\n    0: 0x3a747 - <unknown>!rust_begin_unwind\n    1: 0x3c05 - <unknown>!core::panicking::panic_fmt::hfd5bd9576e9fcc2c\n    2: 0x3bd0 - <unknown>!core::panicking::panic::h1c132af1d687b58b\n    3: 0x7701c - <unknown>!<spiritnet_runtime::CouncilProvider as frame_support::traits::members::SortedMembers<<<sp_runtime::MultiSignature as sp_runtime::traits::Verify>::Signer as sp_runtime::traits::IdentifyAccount>::AccountId>>::add::h117ef9839060756d\n    4: 0x1c5841 - <unknown>!pallet_tips::benchmarking::setup_tip::h76cc8868c694d50f\n    5: 0x1cb09d - <unknown>!<pallet_tips::benchmarking::SelectedBenchmark as frame_benchmarking::utils::BenchmarkingSetup<T>>::instance::hc2c6e2e9ad9744b3\n    6: 0x260b90 - <unknown>!pallet_tips::benchmarking::<impl frame_benchmarking::utils::Benchmarking for pallet_tips::pallet::Pallet<T>>::run_benchmark::h79733ae35a22e173\n    7: 0x88cc0 - <unknown>!<spiritnet_runtime::Runtime as frame_benchmarking::utils::runtime_decl_for_Benchmark::Benchmark<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64,sp_runtime::traits::BlakeTwo256>,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic<sp_runtime::multiaddress::MultiAddress<<<sp_runtime::MultiSignature as sp_runtime::traits::Verify>::Signer as sp_runtime::traits::IdentifyAccount>::AccountId,()>,spiritnet_runtime::Call,sp_runtime::MultiSignature,(frame_system::extensions::check_spec_version::CheckSpecVersion<spiritnet_runtime::Runtime>,frame_system::extensions::check_tx_version::CheckTxVersion<spiritnet_runtime::Runtime>,frame_system::extensions::check_genesis::CheckGenesis<spiritnet_runtime::Runtime>,frame_system::extensions::check_mortality::CheckMortality<spiritnet_runtime::Runtime>,frame_system::extensions::check_nonce::CheckNonce<spiritnet_runtime::Runtime>,frame_system::extensions::check_weight::CheckWeight<spiritnet_runtime::Runtime>,pallet_transaction_payment::ChargeTransactionPayment<spiritnet_runtime::Runtime>)>>>>::dispatch_benchmark::h48f3bf2ab015531d\n    8: 0x1ef8da - <unknown>!Benchmark_dispatch_benchmark\n")

ERROR: Unable to commit file ./runtimes/spiritnet/src/weights/pallet_tips.rs

Copy link
Contributor

@weichweich weichweich left a comment

Choose a reason for hiding this comment

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

LGTM I got two minor comments.

@@ -868,6 +905,9 @@ construct_runtime! {
// Preimage registrar
Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 44,

// Tips module.
Copy link
Contributor

Choose a reason for hiding this comment

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

The comment doesn't really explain more than the code already shows. Maybe we can add a one sentence description?

Suggested change
// Tips module.
// Tips module to reward contributions to the ecosystem with small amount of KILTs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 31eaad3. I was wondering whether we rather want to add the tips pallet to the Governance block though. One argument against this would be to leave space for Governance 2.0.

Comment on lines 478 to 481
pub struct CouncilProvider;
impl frame_support::traits::SortedMembers<AccountId> for CouncilProvider {
fn contains(who: &AccountId) -> bool {
Council::is_member(who)
Copy link
Contributor

Choose a reason for hiding this comment

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

Forgot to attach this to the review. 🙄

I had the crazy idea that this could be generic and be part of the runtime common. But i'm not sure if that's possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

That would be the technical committee now. Right? Council would be one of the two pallet_membership instances?

Copy link
Contributor

Choose a reason for hiding this comment

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

ah no! pallet_collective are the Council and Technical committe. pallet_membership is only technical committteee

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I think we eventually want to have the Council here as originally proposed by me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok I am finally happy with my changes from 31eaad3. I introduced a new instance of the membership pallet such that the Tippers are not tied to either the Council or the Technical Committee.

@wischli
Copy link
Contributor Author

wischli commented Apr 7, 2022

/bench runtime spiritnet-runtime pallet-tips

Comment on lines +487 to +488
type MembershipInitialized = ();
type MembershipChanged = ();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These two receivers can be kept empty for Tippers IMO as we don't need to handle membership change anywhere else in contrast to the Technical Committee which also needs to apply it to the collective pallet.

@ggera
Copy link
Member

ggera commented Apr 7, 2022

/bench runtime spiritnet-runtime pallet-tips

@kilt-command-bot
Copy link

kilt-command-bot bot commented Apr 7, 2022

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

Toolchain: nightly-2022-01-08-x86_64-unknown-linux-gnu (default)
rustc 1.59.0-nightly (e012a191d 2022-01-06)

Results
Pallet: "pallet_tips", Extrinsic: "report_awesome", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Tips Reasons (r:1 w:1)
Storage: Tips Tips (r:1 w:1)

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

Model:
Time ~=       40
    + r    0.001
              µs

Reads = 2 + (0 * r)
Writes = 2 + (0 * r)

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

Data points distribution:
    r   mean µs  sigma µs       %
    0     38.33     0.217    0.5%
  327     39.22     0.158    0.4%
  654        40     0.157    0.3%
  981     41.39     0.168    0.4%
 1308     42.45     0.164    0.3%
 1635     43.33     0.205    0.4%
 1962     43.44     0.179    0.4%
 2289     44.46     0.209    0.4%
 2616     44.41     0.256    0.5%
 2943     45.63     0.142    0.3%
 3270     46.15     0.177    0.3%
 3597     46.95     0.396    0.8%
 3924     47.75     0.352    0.7%
 4251     48.63     0.262    0.5%
 4578     49.52     0.209    0.4%
 4905     49.62     0.197    0.3%
 5232     50.24     0.292    0.5%
 5559     51.07     0.179    0.3%
 5886     50.55     0.139    0.2%
 6213     51.81     0.222    0.4%
 6540     52.56     0.254    0.4%
 6867     53.15     0.171    0.3%
 7194     52.35     0.151    0.2%
 7521     54.31     0.162    0.2%
 7848     55.46     0.367    0.6%
 8175     55.39     0.231    0.4%
 8502     54.84     0.261    0.4%
 8829     56.57     0.175    0.3%
 9156     56.32     0.275    0.4%
 9483     57.99     0.256    0.4%
 9810     59.44     0.148    0.2%
10137     58.96     0.237    0.4%
10464     59.68     0.165    0.2%
10791     59.65     0.195    0.3%
11118     60.88     0.171    0.2%
11445     59.96      0.32    0.5%
11772     62.13     0.185    0.2%
12099     62.94      0.18    0.2%
12426     64.21     0.319    0.4%
12753     64.11     0.153    0.2%
13080     64.67     0.254    0.3%
13407     64.67     0.332    0.5%
13734     66.36     0.271    0.4%
14061     66.93     0.202    0.3%
14388     65.93     0.421    0.6%
14715     66.41     0.164    0.2%
15042     68.54     0.288    0.4%
15369     69.31     0.238    0.3%
15696     69.57     0.219    0.3%
16023     69.98     0.509    0.7%
16350     68.99     0.233    0.3%

Quality and confidence:
param     error
r             0

Model:
Time ~=    39.84
    + r    0.002
              µs

Reads = 2 + (0 * r)
Writes = 2 + (0 * r)

Pallet: "pallet_tips", Extrinsic: "retract_tip", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Tips Tips (r:1 w:1)
Storage: Tips Reasons (r:0 w:1)

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

Model:
Time ~=    37.33
              µs

Reads = 1
Writes = 2

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

Model:
Time ~=    37.33
              µs

Reads = 1
Writes = 2

Pallet: "pallet_tips", Extrinsic: "tip_new", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: TipsMembership Members (r:1 w:0)
Storage: Tips Reasons (r:1 w:1)
Storage: Tips Tips (r:0 w:1)

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

Model:
Time ~=    25.96
    + r    0.001
    + t    0.095
              µs

Reads = 2 + (0 * r) + (0 * t)
Writes = 2 + (0 * r) + (0 * t)

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

Data points distribution:
    r     t   mean µs  sigma µs       %
    0   100     34.67     0.104    0.2%
  327   100     35.59     0.095    0.2%
  654   100     36.49     0.188    0.5%
  981   100     37.09     0.275    0.7%
 1308   100     37.88     0.141    0.3%
 1635   100     38.56      0.18    0.4%
 1962   100     39.09     0.138    0.3%
 2289   100     39.51     0.089    0.2%
 2616   100     40.37     0.218    0.5%
 2943   100     40.73     0.141    0.3%
 3270   100     41.53     0.293    0.7%
 3597   100     41.94     0.153    0.3%
 3924   100     42.64     0.159    0.3%
 4251   100      43.4     0.188    0.4%
 4578   100     43.57     0.123    0.2%
 4905   100      44.7     0.177    0.3%
 5232   100     46.53     1.454    3.1%
 5559   100     45.79     0.232    0.5%
 5886   100     46.16     0.202    0.4%
 6213   100     46.73     0.147    0.3%
 6540   100     47.49     0.097    0.2%
 6867   100     48.16     0.183    0.3%
 7194   100     48.73     0.211    0.4%
 7521   100     49.45      0.25    0.5%
 7848   100     49.83     0.115    0.2%
 8175   100     50.08      0.25    0.4%
 8502   100     50.83     0.094    0.1%
 8829   100     51.66     0.149    0.2%
 9156   100     52.03     0.137    0.2%
 9483   100     53.03     0.197    0.3%
 9810   100     53.07     0.106    0.1%
10137   100     54.04     0.195    0.3%
10464   100     54.61     0.173    0.3%
10791   100     55.07     0.197    0.3%
11118   100     55.75     0.205    0.3%
11445   100     56.47     0.177    0.3%
11772   100     56.66     0.168    0.2%
12099   100     57.07     0.172    0.3%
12426   100     58.05     0.158    0.2%
12753   100     58.68     0.091    0.1%
13080   100     59.29     0.105    0.1%
13407   100     59.82     0.158    0.2%
13734   100      60.2     0.084    0.1%
14061   100     60.73     0.247    0.4%
14388   100     61.56     0.219    0.3%
14715   100     61.96     0.132    0.2%
15042   100        63     0.197    0.3%
15369   100      63.5     0.176    0.2%
15696   100     63.86     0.218    0.3%
16023   100     65.24     0.471    0.7%
16350   100     65.02     0.215    0.3%
16384     1      52.2     0.162    0.3%
16384     2     53.57      0.14    0.2%
16384     3     53.48     0.149    0.2%
16384     4     53.72     0.103    0.1%
16384     5     52.72     0.284    0.5%
16384     6     53.77     0.143    0.2%
16384     7     53.27     0.116    0.2%
16384     8     54.82     0.146    0.2%
16384     9     54.57     0.175    0.3%
16384    10     54.88     0.105    0.1%
16384    11     53.93     0.197    0.3%
16384    12     54.77     0.344    0.6%
16384    13      54.6     0.182    0.3%
16384    14     55.84     0.216    0.3%
16384    15     54.29     0.203    0.3%
16384    16     54.28     0.171    0.3%
16384    17     55.44     0.664    1.1%
16384    18     54.48      0.09    0.1%
16384    19     54.61     0.525    0.9%
16384    20     54.41     0.283    0.5%
16384    21     56.19     0.181    0.3%
16384    22     54.81      0.12    0.2%
16384    23     55.28     0.155    0.2%
16384    24     54.86     0.156    0.2%
16384    25      55.9     0.482    0.8%
16384    26     55.24     0.148    0.2%
16384    27     54.76     0.161    0.2%
16384    28     54.67      0.11    0.2%
16384    29     55.29     0.124    0.2%
16384    30     55.53     0.228    0.4%
16384    31     55.69     0.563    1.0%
16384    32      56.5     0.675    1.1%
16384    33     56.89     0.595    1.0%
16384    34      56.8     0.219    0.3%
16384    35     56.75     0.159    0.2%
16384    36     57.38     0.139    0.2%
16384    37     57.11     0.159    0.2%
16384    38     57.99     0.171    0.2%
16384    39     57.72     0.187    0.3%
16384    40     57.26     0.187    0.3%
16384    41     57.24     0.189    0.3%
16384    42     58.59     0.382    0.6%
16384    43     57.51     0.178    0.3%
16384    44     57.39     0.262    0.4%
16384    45     58.09     0.184    0.3%
16384    46     58.28     0.157    0.2%
16384    47     57.83      0.21    0.3%
16384    48     57.71     0.173    0.2%
16384    49     57.86     0.232    0.4%
16384    50     58.17     0.346    0.5%
16384    51     58.24     0.136    0.2%
16384    52     57.96      0.12    0.2%
16384    53     58.39      0.17    0.2%
16384    54      59.1     0.193    0.3%
16384    55     58.54     0.217    0.3%
16384    56     58.69      0.13    0.2%
16384    57     58.88     0.169    0.2%
16384    58     59.02     0.234    0.3%
16384    59     58.67     0.117    0.1%
16384    60     59.27     0.193    0.3%
16384    61      58.9     0.235    0.3%
16384    62     59.51      0.21    0.3%
16384    63     59.62     0.116    0.1%
16384    64     60.04     0.155    0.2%
16384    65     59.72     0.181    0.3%
16384    66     59.98     0.178    0.2%
16384    67     60.21     0.287    0.4%
16384    68     59.65     0.164    0.2%
16384    69     59.77     0.132    0.2%
16384    70     60.18     0.152    0.2%
16384    71     60.15     0.119    0.1%
16384    72     60.23     0.172    0.2%
16384    73     60.32     0.219    0.3%
16384    74     60.45     0.214    0.3%
16384    75     60.37      0.15    0.2%
16384    76     60.44     0.299    0.4%
16384    77     60.65     0.107    0.1%
16384    78     62.28     0.103    0.1%
16384    79     60.88     0.254    0.4%
16384    80     60.75     0.167    0.2%
16384    81     62.65     0.165    0.2%
16384    82     63.22     0.248    0.3%
16384    83     60.84     0.212    0.3%
16384    84     61.24      0.16    0.2%
16384    85     60.95     0.147    0.2%
16384    86     61.51     0.181    0.2%
16384    87     61.18     0.094    0.1%
16384    88     61.41     0.234    0.3%
16384    89     61.27     0.186    0.3%
16384    90     61.86     0.211    0.3%
16384    91     62.08     0.219    0.3%
16384    92     61.76     0.232    0.3%
16384    93      61.6      0.25    0.4%
16384    94     62.09     0.149    0.2%
16384    95     62.22     0.228    0.3%
16384    96        62     0.178    0.2%
16384    97     62.13     0.134    0.2%
16384    98     62.06     0.216    0.3%
16384    99     62.03     0.108    0.1%
16384   100     62.44     0.169    0.2%

Quality and confidence:
param     error
r             0
t             0

Model:
Time ~=    25.36
    + r    0.002
    + t    0.109
              µs

Reads = 2 + (0 * r) + (0 * t)
Writes = 2 + (0 * r) + (0 * t)

Pallet: "pallet_tips", Extrinsic: "tip", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: TipsMembership Members (r:1 w:0)
Storage: Tips Tips (r:1 w:1)

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

Model:
Time ~=    15.91
    + t    0.448
              µs

Reads = 2 + (0 * t)
Writes = 1 + (0 * t)

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

Data points distribution:
    t   mean µs  sigma µs       %
    1     14.93      0.07    0.4%
    2     15.36     0.063    0.4%
    3      16.5     0.066    0.3%
    4     16.94     0.083    0.4%
    5     17.64     0.084    0.4%
    6     17.73     0.102    0.5%
    7     18.39     0.061    0.3%
    8     19.01     0.103    0.5%
    9     19.62     0.075    0.3%
   10     19.69     0.062    0.3%
   11     20.64     0.102    0.4%
   12     20.85     0.224    1.0%
   13      21.4     0.075    0.3%
   14     21.96      0.13    0.5%
   15     22.02     0.159    0.7%
   16      22.2     0.067    0.3%
   17     22.59     0.059    0.2%
   18     23.08     0.076    0.3%
   19     24.76     0.046    0.1%
   20     25.11     0.135    0.5%
   21     25.45     0.062    0.2%
   22      26.1     0.126    0.4%
   23     26.25     0.106    0.4%
   24      26.7     0.059    0.2%
   25     27.02     0.084    0.3%
   26     27.41     0.097    0.3%
   27     27.96     0.141    0.5%
   28     28.13     0.097    0.3%
   29     28.64     0.078    0.2%
   30     29.15     0.103    0.3%
   31     29.41     0.114    0.3%
   32     30.03     0.142    0.4%
   33     31.73     0.119    0.3%
   34     32.25     0.096    0.2%
   35     32.67     0.111    0.3%
   36     32.85     0.137    0.4%
   37     33.45     0.176    0.5%
   38     33.78     0.167    0.4%
   39     34.07     0.097    0.2%
   40     34.54     0.148    0.4%
   41     35.41     0.109    0.3%
   42     35.74      0.07    0.1%
   43      36.3     0.136    0.3%
   44     36.59      0.07    0.1%
   45     37.11     0.105    0.2%
   46      37.6     0.188    0.4%
   47      37.9     0.153    0.4%
   48     38.19      0.21    0.5%
   49     38.49     0.145    0.3%
   50     39.19     0.119    0.3%
   51     39.43     0.184    0.4%
   52     39.69     0.147    0.3%
   53     40.28     0.097    0.2%
   54     40.87      0.14    0.3%
   55     41.14     0.102    0.2%
   56     41.56     0.207    0.4%
   57     41.93     0.105    0.2%
   58     42.53     0.121    0.2%
   59     42.83     0.075    0.1%
   60     43.15     0.167    0.3%
   61     43.42      0.14    0.3%
   62     44.04     0.126    0.2%
   63     44.47     0.133    0.2%
   64     45.01     0.151    0.3%
   65     45.34     0.166    0.3%
   66      45.5      0.13    0.2%
   67     49.58     0.071    0.1%
   68     46.39     0.204    0.4%
   69     46.78     0.189    0.4%
   70     47.37     0.181    0.3%
   71     47.72     0.204    0.4%
   72     48.03     0.171    0.3%
   73     48.35     0.115    0.2%
   74     48.88     0.106    0.2%
   75     49.02     0.121    0.2%
   76     49.73     0.134    0.2%
   77     50.14      0.22    0.4%
   78     50.66     0.128    0.2%
   79      50.9     0.098    0.1%
   80     51.55     0.193    0.3%
   81     51.71     0.171    0.3%
   82     51.98     0.142    0.2%
   83     53.17     0.122    0.2%
   84      53.7     0.097    0.1%
   85     53.93     0.077    0.1%
   86     54.28     0.191    0.3%
   87     54.71     0.151    0.2%
   88     55.32     0.169    0.3%
   89     55.73     0.153    0.2%
   90     55.93     0.129    0.2%
   91     56.59      0.13    0.2%
   92     56.89      0.12    0.2%
   93     57.33     0.195    0.3%
   94     57.75     0.102    0.1%
   95     58.07     0.166    0.2%
   96     58.49       0.1    0.1%
   97     58.63     0.131    0.2%
   98     59.28     0.119    0.2%
   99     59.57     0.099    0.1%
  100     59.95     0.236    0.3%

Quality and confidence:
param     error
t             0

Model:
Time ~=    15.88
    + t     0.45
              µs

Reads = 2 + (0 * t)
Writes = 1 + (0 * t)

Pallet: "pallet_tips", Extrinsic: "close_tip", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Tips Tips (r:1 w:1)
Storage: TipsMembership Members (r:1 w:0)
Storage: System Account (r:2 w:2)
Storage: Tips Reasons (r:0 w:1)

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

Model:
Time ~=    64.27
    + t    0.282
              µs

Reads = 4 + (0 * t)
Writes = 4 + (0 * t)

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

Data points distribution:
    t   mean µs  sigma µs       %
    1     63.15     0.117    0.1%
    2     64.23     0.105    0.1%
    3     63.53     0.843    1.3%
    4     66.04     0.187    0.2%
    5     63.75     0.145    0.2%
    6     65.18     0.184    0.2%
    7     66.59     0.179    0.2%
    8     65.98     0.155    0.2%
    9     65.92     0.114    0.1%
   10      65.2     0.132    0.2%
   11      66.3      0.12    0.1%
   12     66.47     0.223    0.3%
   13     67.06     0.154    0.2%
   14      66.4     0.114    0.1%
   15      67.6     0.237    0.3%
   16     69.16     0.883    1.2%
   17     67.63     0.188    0.2%
   18     68.63     0.169    0.2%
   19     69.22     0.211    0.3%
   20      69.3      0.22    0.3%
   21     70.49     0.193    0.2%
   22     70.56     0.201    0.2%
   23      70.8     0.194    0.2%
   24     71.04     0.238    0.3%
   25     71.72     0.194    0.2%
   26     71.33     0.175    0.2%
   27     70.86     0.196    0.2%
   28      71.7     0.158    0.2%
   29     72.04     0.243    0.3%
   30     72.46     0.251    0.3%
   31      73.1     0.331    0.4%
   32      73.2     0.154    0.2%
   33     74.35     0.348    0.4%
   34     75.29     0.237    0.3%
   35     75.31     0.219    0.2%
   36     75.82     0.271    0.3%
   37     75.52     0.157    0.2%
   38     76.45     0.315    0.4%
   39     76.32     0.124    0.1%
   40     76.51      0.38    0.4%
   41     77.49     0.206    0.2%
   42     76.41     0.281    0.3%
   43     76.54     0.372    0.4%
   44     77.86     0.241    0.3%
   45     77.66     0.169    0.2%
   46     78.24     0.243    0.3%
   47     77.85      0.34    0.4%
   48     78.13     0.275    0.3%
   49      78.5     0.151    0.1%
   50     78.48     0.221    0.2%
   51      79.3     0.149    0.1%
   52     78.55     0.217    0.2%
   53     79.95     0.332    0.4%
   54     80.32     0.176    0.2%
   55      80.2     0.244    0.3%
   56     80.59     0.215    0.2%
   57     80.81     0.244    0.3%
   58     80.89      0.29    0.3%
   59     81.48     0.182    0.2%
   60     81.84     0.156    0.1%
   61     81.96     0.188    0.2%
   62     81.62      0.28    0.3%
   63     82.54      0.23    0.2%
   64     83.25      0.23    0.2%
   65     82.77     0.214    0.2%
   66     83.54     0.258    0.3%
   67     83.35     0.109    0.1%
   68     83.94     0.565    0.6%
   69     84.49     0.362    0.4%
   70     84.13     0.245    0.2%
   71     84.22     0.184    0.2%
   72     84.75     0.336    0.3%
   73     85.06     0.112    0.1%
   74     84.67     0.179    0.2%
   75     85.28     0.187    0.2%
   76     86.21     0.237    0.2%
   77     85.79     0.341    0.3%
   78     85.94     0.234    0.2%
   79     86.18     0.168    0.1%
   80     87.12     0.255    0.2%
   81     86.04      0.26    0.3%
   82     87.87     0.194    0.2%
   83     87.67     0.196    0.2%
   84     87.67     0.134    0.1%
   85      88.1     0.216    0.2%
   86     87.87     0.189    0.2%
   87     88.75     0.097    0.1%
   88     88.34     0.217    0.2%
   89     89.29     0.254    0.2%
   90      89.4     0.288    0.3%
   91     88.56     0.272    0.3%
   92     89.98     0.289    0.3%
   93      90.1     0.191    0.2%
   94     89.78      0.19    0.2%
   95     89.05     0.085    0.0%
   96     90.35     0.223    0.2%
   97     90.57     0.142    0.1%
   98     91.49     0.338    0.3%
   99     90.89     0.424    0.4%
  100     91.28     0.291    0.3%

Quality and confidence:
param     error
t             0

Model:
Time ~=    64.13
    + t    0.283
              µs

Reads = 4 + (0 * t)
Writes = 4 + (0 * t)

Pallet: "pallet_tips", Extrinsic: "slash_tip", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Tips Tips (r:1 w:1)
Storage: Tips Reasons (r:0 w:1)

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

Model:
Time ~=     22.1
    + t    0.006
              µs

Reads = 1 + (0 * t)
Writes = 2 + (0 * t)

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

Data points distribution:
    t   mean µs  sigma µs       %
    1     21.42     0.087    0.4%
    2      21.9     0.077    0.3%
    3     21.69     0.063    0.2%
    4        22     0.041    0.1%
    5     22.18     0.091    0.4%
    6     21.67     0.055    0.2%
    7     22.64     0.113    0.4%
    8     21.66     0.067    0.3%
    9      22.1     0.101    0.4%
   10     21.93      0.09    0.4%
   11     22.33     0.061    0.2%
   12     22.63     0.097    0.4%
   13     22.52     0.087    0.3%
   14     21.94     0.192    0.8%
   15     22.33     0.075    0.3%
   16     22.52     0.174    0.7%
   17     22.44     0.081    0.3%
   18     22.32     0.244    1.0%
   19     21.78     0.061    0.2%
   20     22.69     0.141    0.6%
   21     22.47     0.114    0.5%
   22     22.78     0.077    0.3%
   23     22.29     0.079    0.3%
   24     21.86     0.071    0.3%
   25     22.27     0.058    0.2%
   26     22.11      0.08    0.3%
   27     22.57     0.182    0.8%
   28     22.36     0.157    0.7%
   29     22.08     0.085    0.3%
   30     22.85     0.137    0.5%
   31     22.25     0.075    0.3%
   32     22.13     0.077    0.3%
   33     22.41     0.098    0.4%
   34     22.19     0.077    0.3%
   35     22.82     0.122    0.5%
   36     22.48     0.115    0.5%
   37     22.24     0.197    0.8%
   38     22.02     0.095    0.4%
   39     22.35     0.143    0.6%
   40     22.56     0.099    0.4%
   41     22.73     0.144    0.6%
   42     22.33     0.091    0.4%
   43     21.99     0.075    0.3%
   44     22.82     0.138    0.6%
   45     22.39     0.061    0.2%
   46     21.92     0.095    0.4%
   47     22.09     0.089    0.4%
   48     22.28     0.079    0.3%
   49     22.34     0.081    0.3%
   50     22.68     0.101    0.4%
   51     22.15     0.164    0.7%
   52     22.21     0.128    0.5%
   53     22.33     0.109    0.4%
   54     22.44     0.062    0.2%
   55      22.6     0.115    0.5%
   56     22.51     0.079    0.3%
   57      22.4     0.129    0.5%
   58     22.95     0.079    0.3%
   59     22.67     0.064    0.2%
   60     22.67     0.097    0.4%
   61     22.26     0.064    0.2%
   62     22.46     0.098    0.4%
   63     22.85      0.11    0.4%
   64     22.34     0.069    0.3%
   65     22.62     0.086    0.3%
   66     22.73     0.092    0.4%
   67     22.48     0.096    0.4%
   68     22.44     0.075    0.3%
   69     22.32      0.05    0.2%
   70     22.53     0.146    0.6%
   71     22.43     0.115    0.5%
   72     22.47     0.071    0.3%
   73      22.4     0.118    0.5%
   74     22.17     0.123    0.5%
   75     22.48     0.109    0.4%
   76     22.41     0.072    0.3%
   77     22.95     0.077    0.3%
   78     22.37     0.048    0.2%
   79     22.42     0.081    0.3%
   80     22.71     0.116    0.5%
   81     22.67     0.099    0.4%
   82     22.75     0.177    0.7%
   83     22.54     0.105    0.4%
   84     22.86     0.125    0.5%
   85      22.3     0.213    0.9%
   86     22.25     0.133    0.5%
   87     22.65     0.157    0.6%
   88     22.82     0.127    0.5%
   89     22.28     0.111    0.4%
   90     22.41     0.209    0.9%
   91     22.82       0.2    0.8%
   92     22.77     0.124    0.5%
   93     22.67     0.082    0.3%
   94     22.73     0.129    0.5%
   95     22.71     0.121    0.5%
   96     22.67     0.094    0.4%
   97     22.91     0.064    0.2%
   98      22.9     0.092    0.4%
   99     22.51     0.204    0.9%
  100     22.93     0.079    0.3%

Quality and confidence:
param     error
t             0

Model:
Time ~=     22.1
    + t    0.006
              µs

Reads = 1 + (0 * t)
Writes = 2 + (0 * t)


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

wischli commented Apr 7, 2022

/bench runtime peregrine pallet-tips

@kilt-command-bot
Copy link

kilt-command-bot bot commented Apr 7, 2022

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

Toolchain: nightly-2022-01-08-x86_64-unknown-linux-gnu (directory override for '/home/benchbot/bench-bot/git/mashnet-node')
rustc 1.59.0-nightly (e012a191d 2022-01-06)

Results
Pallet: "pallet_tips", Extrinsic: "report_awesome", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Tips Reasons (r:1 w:1)
Storage: Tips Tips (r:1 w:1)

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

Model:
Time ~=    40.56
    + r    0.001
              µs

Reads = 2 + (0 * r)
Writes = 2 + (0 * r)

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

Data points distribution:
    r   mean µs  sigma µs       %
    0     38.92     0.149    0.3%
  327     40.47     0.175    0.4%
  654     41.08     0.378    0.9%
  981     41.33     0.699    1.6%
 1308     43.13     0.294    0.6%
 1635     42.49     0.336    0.7%
 1962     43.91     0.147    0.3%
 2289     44.72     0.162    0.3%
 2616     45.84     0.183    0.3%
 2943     46.54     0.162    0.3%
 3270     47.13     0.277    0.5%
 3597     47.47     0.131    0.2%
 3924     48.05     0.233    0.4%
 4251     48.58     0.214    0.4%
 4578     49.63     0.173    0.3%
 4905     49.11     0.248    0.5%
 5232     51.02     0.299    0.5%
 5559      49.9     0.383    0.7%
 5886     51.42     0.449    0.8%
 6213     52.61      0.19    0.3%
 6540      53.4     0.235    0.4%
 6867      54.3     0.242    0.4%
 7194     53.79     0.276    0.5%
 7521     54.02     0.163    0.3%
 7848     55.74     0.232    0.4%
 8175     56.43     0.256    0.4%
 8502     55.54     0.216    0.3%
 8829     57.56     0.198    0.3%
 9156     58.05     0.184    0.3%
 9483     57.58     0.116    0.2%
 9810     59.41     0.149    0.2%
10137     60.42     0.172    0.2%
10464     60.15      0.12    0.1%
10791     59.67     0.337    0.5%
11118     61.75     0.251    0.4%
11445      62.1     0.208    0.3%
11772     62.78     0.266    0.4%
12099     62.74     0.374    0.5%
12426     64.28     0.178    0.2%
12753     64.58     0.291    0.4%
13080        64     0.311    0.4%
13407     65.95     0.141    0.2%
13734     65.42     0.262    0.4%
14061     67.24     0.162    0.2%
14388     68.04      0.17    0.2%
14715     68.34     0.142    0.2%
15042     68.48     0.317    0.4%
15369     68.13     0.145    0.2%
15696     69.86     0.256    0.3%
16023     71.01     0.263    0.3%
16350     71.14      0.29    0.4%

Quality and confidence:
param     error
r             0

Model:
Time ~=    40.32
    + r    0.002
              µs

Reads = 2 + (0 * r)
Writes = 2 + (0 * r)

Pallet: "pallet_tips", Extrinsic: "retract_tip", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Tips Tips (r:1 w:1)
Storage: Tips Reasons (r:0 w:1)

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

Model:
Time ~=     36.9
              µs

Reads = 1
Writes = 2

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

Model:
Time ~=     36.9
              µs

Reads = 1
Writes = 2

Pallet: "pallet_tips", Extrinsic: "tip_new", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: TipsMembership Members (r:1 w:0)
Storage: Tips Reasons (r:1 w:1)
Storage: Tips Tips (r:0 w:1)

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

Model:
Time ~=    27.09
    + r    0.001
    + t    0.086
              µs

Reads = 2 + (0 * r) + (0 * t)
Writes = 2 + (0 * r) + (0 * t)

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

Data points distribution:
    r     t   mean µs  sigma µs       %
    0   100     34.88     0.144    0.4%
  327   100     35.98     0.188    0.5%
  654   100     36.75     0.196    0.5%
  981   100     37.39     0.119    0.3%
 1308   100     38.16     0.191    0.5%
 1635   100     39.23     0.253    0.6%
 1962   100     39.44     0.227    0.5%
 2289   100     40.12     0.198    0.4%
 2616   100     40.71     0.187    0.4%
 2943   100     41.14       0.1    0.2%
 3270   100     41.47     0.122    0.2%
 3597   100      42.4     0.187    0.4%
 3924   100     42.96     0.243    0.5%
 4251   100     43.67     0.108    0.2%
 4578   100     43.79     0.224    0.5%
 4905   100     44.66      0.18    0.4%
 5232   100     45.25     0.137    0.3%
 5559   100     45.92     0.224    0.4%
 5886   100     46.42      0.14    0.3%
 6213   100     46.98     0.196    0.4%
 6540   100     47.53     0.199    0.4%
 6867   100     48.11     0.251    0.5%
 7194   100     48.84     0.304    0.6%
 7521   100     49.19     0.193    0.3%
 7848   100     49.92     0.261    0.5%
 8175   100      50.3     0.219    0.4%
 8502   100     50.93     0.104    0.2%
 8829   100     51.63     0.147    0.2%
 9156   100      52.1      0.17    0.3%
 9483   100     52.69     0.153    0.2%
 9810   100     53.32     0.264    0.4%
10137   100     54.07      0.16    0.2%
10464   100     54.72     0.216    0.3%
10791   100      55.2     0.184    0.3%
11118   100     55.31     0.189    0.3%
11445   100     56.31      0.14    0.2%
11772   100     56.74     0.201    0.3%
12099   100     57.69     0.158    0.2%
12426   100     58.36      0.16    0.2%
12753   100     58.75      0.28    0.4%
13080   100     59.14     0.262    0.4%
13407   100      59.6     0.118    0.1%
13734   100     60.82     0.301    0.4%
14061   100     61.31     0.196    0.3%
14388   100     62.07     0.194    0.3%
14715   100      62.1     0.131    0.2%
15042   100     62.71     0.154    0.2%
15369   100     63.48     0.197    0.3%
15696   100     64.04     0.172    0.2%
16023   100     64.88     0.118    0.1%
16350   100     65.34     0.176    0.2%
16384     1     52.68     0.092    0.1%
16384     2     53.65     0.172    0.3%
16384     3     54.05       0.2    0.3%
16384     4     54.18     0.214    0.3%
16384     5     54.56     0.145    0.2%
16384     6     52.97      0.11    0.2%
16384     7     54.68     0.161    0.2%
16384     8     53.44     0.237    0.4%
16384     9     55.14     0.178    0.3%
16384    10     54.36      0.22    0.4%
16384    11     55.09     0.212    0.3%
16384    12      55.1     0.168    0.3%
16384    13     54.99     0.226    0.4%
16384    14     54.21     0.124    0.2%
16384    15     55.77     0.165    0.2%
16384    16     54.17     0.117    0.2%
16384    17     55.38     0.314    0.5%
16384    18      55.3     0.172    0.3%
16384    19     55.73     0.183    0.3%
16384    20     56.64     0.261    0.4%
16384    21     55.26     0.567    1.0%
16384    22     56.36      0.13    0.2%
16384    23     56.38      0.18    0.3%
16384    24     55.22     0.262    0.4%
16384    25     55.71     0.158    0.2%
16384    26     56.11     0.086    0.1%
16384    27     55.77     0.405    0.7%
16384    28     55.44     0.181    0.3%
16384    29     56.92     0.223    0.3%
16384    30     55.54     0.198    0.3%
16384    31     56.51     0.278    0.4%
16384    32     57.48     0.145    0.2%
16384    33     57.86     0.128    0.2%
16384    34     58.36      0.21    0.3%
16384    35     56.62     0.165    0.2%
16384    36     58.02     0.517    0.8%
16384    37     56.78     0.407    0.7%
16384    38     57.13     0.129    0.2%
16384    39     57.12     0.172    0.3%
16384    40     58.22     0.582    0.9%
16384    41     57.72     0.183    0.3%
16384    42     57.63     0.122    0.2%
16384    43     57.34     0.163    0.2%
16384    44     57.71     0.176    0.3%
16384    45     57.73     0.176    0.3%
16384    46     57.83     0.163    0.2%
16384    47        58     0.184    0.3%
16384    48     58.56     0.121    0.2%
16384    49     58.46     0.152    0.2%
16384    50     58.18     0.202    0.3%
16384    51     57.99     0.264    0.4%
16384    52     58.37     0.147    0.2%
16384    53     58.52     0.205    0.3%
16384    54     58.66      0.13    0.2%
16384    55     58.45      0.15    0.2%
16384    56     59.27     0.145    0.2%
16384    57     59.25     0.283    0.4%
16384    58     58.88     0.138    0.2%
16384    59     58.98     0.149    0.2%
16384    60     58.88     0.145    0.2%
16384    61     59.12     0.101    0.1%
16384    62     59.38     0.155    0.2%
16384    63     59.85     0.143    0.2%
16384    64     59.85     0.183    0.3%
16384    65     59.27      0.12    0.2%
16384    66     59.25      0.14    0.2%
16384    67     59.95     0.185    0.3%
16384    68     60.72     0.274    0.4%
16384    69     59.58     0.138    0.2%
16384    70     60.18     0.148    0.2%
16384    71     60.17     0.154    0.2%
16384    72     59.62     0.206    0.3%
16384    73     59.92     0.128    0.2%
16384    74     60.15     0.238    0.3%
16384    75     60.22      0.23    0.3%
16384    76     60.34     0.209    0.3%
16384    77     60.55      0.16    0.2%
16384    78     60.58     0.178    0.2%
16384    79     60.73     0.166    0.2%
16384    80     60.67     0.203    0.3%
16384    81     60.85     0.265    0.4%
16384    82     60.52     0.191    0.3%
16384    83     60.95     0.168    0.2%
16384    84     60.99     0.201    0.3%
16384    85     61.65     0.082    0.1%
16384    86     61.36     0.114    0.1%
16384    87     61.66     0.136    0.2%
16384    88     61.56     0.088    0.1%
16384    89     60.99     0.187    0.3%
16384    90     61.67     0.202    0.3%
16384    91     61.53     0.194    0.3%
16384    92      61.6     0.155    0.2%
16384    93     62.05     0.304    0.4%
16384    94     61.97     0.171    0.2%
16384    95     61.78     0.158    0.2%
16384    96     62.24     0.189    0.3%
16384    97     62.48     0.168    0.2%
16384    98     62.34      0.17    0.2%
16384    99      62.3     0.114    0.1%
16384   100     62.57     0.282    0.4%

Quality and confidence:
param     error
r             0
t             0

Model:
Time ~=    26.41
    + r    0.002
    + t    0.102
              µs

Reads = 2 + (0 * r) + (0 * t)
Writes = 2 + (0 * r) + (0 * t)

Pallet: "pallet_tips", Extrinsic: "tip", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: TipsMembership Members (r:1 w:0)
Storage: Tips Tips (r:1 w:1)

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

Model:
Time ~=     15.6
    + t    0.456
              µs

Reads = 2 + (0 * t)
Writes = 1 + (0 * t)

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

Data points distribution:
    t   mean µs  sigma µs       %
    1      14.5     0.059    0.4%
    2     15.11     0.076    0.5%
    3     16.16     0.042    0.2%
    4     16.72     0.105    0.6%
    5     17.17     0.098    0.5%
    6      17.8     0.067    0.3%
    7     18.15     0.071    0.3%
    8     18.81     0.119    0.6%
    9     19.49     0.149    0.7%
   10     19.88      0.12    0.6%
   11     20.12     0.218    1.0%
   12     20.26     0.059    0.2%
   13     21.31     0.171    0.8%
   14     21.71      0.09    0.4%
   15      22.1     0.092    0.4%
   16     22.02     0.191    0.8%
   17     22.47     0.098    0.4%
   18     22.76     0.061    0.2%
   19     24.45     0.134    0.5%
   20     24.99     0.085    0.3%
   21     25.23     0.065    0.2%
   22     25.67     0.113    0.4%
   23     26.27     0.102    0.3%
   24     26.57     0.106    0.3%
   25     26.73     0.113    0.4%
   26     27.55     0.058    0.2%
   27     27.84     0.163    0.5%
   28     28.08     0.106    0.3%
   29     28.64     0.122    0.4%
   30      29.3     0.092    0.3%
   31     29.56     0.152    0.5%
   32     29.83     0.083    0.2%
   33     31.52     0.162    0.5%
   34     31.82     0.126    0.3%
   35     32.27     0.148    0.4%
   36     32.72     0.186    0.5%
   37     33.21     0.148    0.4%
   38     33.54     0.133    0.3%
   39     33.83     0.105    0.3%
   40     34.28      0.21    0.6%
   41     35.32     0.112    0.3%
   42     35.66     0.055    0.1%
   43     36.26     0.101    0.2%
   44     36.51     0.175    0.4%
   45     36.96     0.274    0.7%
   46     37.38     0.208    0.5%
   47     37.74     0.088    0.2%
   48     38.21     0.129    0.3%
   49     38.85     0.104    0.2%
   50     39.06     0.099    0.2%
   51     39.53      0.19    0.4%
   52     39.87     0.145    0.3%
   53     40.33     0.131    0.3%
   54     40.59      0.17    0.4%
   55     41.24     0.157    0.3%
   56     41.44     0.128    0.3%
   57        42     0.117    0.2%
   58     42.59     0.111    0.2%
   59     42.89     0.219    0.5%
   60      43.4     0.129    0.2%
   61     43.77     0.148    0.3%
   62     44.17     0.146    0.3%
   63      44.4     0.136    0.3%
   64     45.11     0.146    0.3%
   65     45.37     0.193    0.4%
   66     45.77       0.2    0.4%
   67     46.28     0.127    0.2%
   68     46.46     0.242    0.5%
   69     46.92     0.096    0.2%
   70     47.37     0.183    0.3%
   71     47.52     0.182    0.3%
   72     48.29     0.156    0.3%
   73     48.28     0.223    0.4%
   74     49.39     0.245    0.4%
   75     49.56     0.192    0.3%
   76     49.99     0.116    0.2%
   77     50.37     0.201    0.3%
   78     51.47     0.238    0.4%
   79        51     0.156    0.3%
   80     51.68      0.17    0.3%
   81     51.85      0.12    0.2%
   82     52.32     0.116    0.2%
   83     53.37     0.129    0.2%
   84     54.12     0.127    0.2%
   85     54.52     0.104    0.1%
   86     54.82     0.172    0.3%
   87     55.17      0.13    0.2%
   88     55.88     0.168    0.3%
   89     55.91     0.228    0.4%
   90     56.74     0.135    0.2%
   91     56.84     0.225    0.3%
   92      57.4     0.153    0.2%
   93     57.95     0.135    0.2%
   94     58.13     0.151    0.2%
   95     58.36     0.146    0.2%
   96     58.72     0.128    0.2%
   97     59.04     0.225    0.3%
   98     59.66     0.135    0.2%
   99     60.31      0.31    0.5%
  100     60.47     0.176    0.2%

Quality and confidence:
param     error
t             0

Model:
Time ~=    15.51
    + t    0.457
              µs

Reads = 2 + (0 * t)
Writes = 1 + (0 * t)

Pallet: "pallet_tips", Extrinsic: "close_tip", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Tips Tips (r:1 w:1)
Storage: TipsMembership Members (r:1 w:0)
Storage: System Account (r:2 w:2)
Storage: Tips Reasons (r:0 w:1)

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

Model:
Time ~=     64.5
    + t    0.299
              µs

Reads = 4 + (0 * t)
Writes = 4 + (0 * t)

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

Data points distribution:
    t   mean µs  sigma µs       %
    1     63.38     0.115    0.1%
    2     64.02     0.126    0.1%
    3     64.59     0.138    0.2%
    4     64.75     0.172    0.2%
    5     64.32     0.172    0.2%
    6     65.68     0.065    0.0%
    7     65.26     0.149    0.2%
    8      66.2      0.17    0.2%
    9     66.77     0.134    0.2%
   10     66.23     0.154    0.2%
   11     67.79     0.601    0.8%
   12     67.03     0.198    0.2%
   13     67.89     0.184    0.2%
   14     68.37     0.129    0.1%
   15     68.34     0.187    0.2%
   16     68.77     0.173    0.2%
   17     68.16     0.237    0.3%
   18     69.03     0.128    0.1%
   19     69.27     0.135    0.1%
   20     70.01     0.108    0.1%
   21     70.67     0.194    0.2%
   22     71.36      0.23    0.3%
   23     71.96     0.153    0.2%
   24     71.56     0.168    0.2%
   25     72.24      0.19    0.2%
   26     72.13     0.128    0.1%
   27     72.64     0.296    0.4%
   28     72.73     0.111    0.1%
   29      73.1      0.21    0.2%
   30     73.35     0.153    0.2%
   31     73.94     0.239    0.3%
   32     74.73     0.134    0.1%
   33     75.84     0.138    0.1%
   34     75.72     0.225    0.2%
   35     76.28     0.202    0.2%
   36     76.64     0.246    0.3%
   37     75.68     0.144    0.1%
   38     76.63     0.197    0.2%
   39     77.55     0.268    0.3%
   40     77.45     0.189    0.2%
   41     78.47     0.128    0.1%
   42     77.77     0.244    0.3%
   43     78.06     0.182    0.2%
   44      78.5     0.159    0.2%
   45     78.54     0.228    0.2%
   46     79.02     0.288    0.3%
   47     78.64     0.265    0.3%
   48     79.56     0.146    0.1%
   49     79.36     0.294    0.3%
   50     79.89     0.143    0.1%
   51     80.51     0.191    0.2%
   52     80.16     0.239    0.2%
   53     80.85     0.246    0.3%
   54      81.7     0.428    0.5%
   55     81.88     0.269    0.3%
   56     81.79      0.23    0.2%
   57     82.18     0.121    0.1%
   58     82.24     0.286    0.3%
   59     83.08     0.242    0.2%
   60     83.03     0.224    0.2%
   61     83.47     0.267    0.3%
   62     82.73     0.174    0.2%
   63     83.91     0.208    0.2%
   64     84.56     0.305    0.3%
   65     84.41     0.232    0.2%
   66     85.04     0.184    0.2%
   67      84.8     0.275    0.3%
   68     84.99     0.141    0.1%
   69      84.8     0.165    0.1%
   70      85.3     0.109    0.1%
   71     85.88     0.247    0.2%
   72     85.96     0.365    0.4%
   73     86.36     0.253    0.2%
   74      86.4     0.176    0.2%
   75     87.11     0.212    0.2%
   76     88.01     0.199    0.2%
   77     86.66     0.147    0.1%
   78     87.99     0.228    0.2%
   79     87.51     0.176    0.2%
   80     88.59     0.225    0.2%
   81     87.84     0.215    0.2%
   82     88.86       0.2    0.2%
   83     89.53      0.12    0.1%
   84     89.08     0.206    0.2%
   85     89.56     0.278    0.3%
   86     89.73     0.218    0.2%
   87      89.7      0.25    0.2%
   88     90.37     0.279    0.3%
   89     90.91     0.232    0.2%
   90     91.34     0.142    0.1%
   91     91.37     0.162    0.1%
   92     91.67     0.197    0.2%
   93     91.88     0.181    0.1%
   94     91.78     0.353    0.3%
   95     91.51     0.209    0.2%
   96     92.77      0.21    0.2%
   97     93.13     0.187    0.2%
   98     93.12     0.192    0.2%
   99     92.65     0.178    0.1%
  100     93.24     0.298    0.3%

Quality and confidence:
param     error
t             0

Model:
Time ~=    64.42
    + t      0.3
              µs

Reads = 4 + (0 * t)
Writes = 4 + (0 * t)

Pallet: "pallet_tips", Extrinsic: "slash_tip", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Tips Tips (r:1 w:1)
Storage: Tips Reasons (r:0 w:1)

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

Model:
Time ~=    22.31
    + t    0.005
              µs

Reads = 1 + (0 * t)
Writes = 2 + (0 * t)

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

Data points distribution:
    t   mean µs  sigma µs       %
    1     21.64     0.096    0.4%
    2     22.06     0.148    0.6%
    3     22.25     0.047    0.2%
    4     21.69     0.093    0.4%
    5     22.13     0.142    0.6%
    6      22.4     0.074    0.3%
    7     22.23     0.153    0.6%
    8     22.34     0.126    0.5%
    9     22.65     0.094    0.4%
   10     22.21     0.178    0.8%
   11     22.33     0.096    0.4%
   12     22.77     0.123    0.5%
   13     22.57     0.086    0.3%
   14     21.79     0.063    0.2%
   15     22.57     0.115    0.5%
   16     22.32     0.095    0.4%
   17     22.69     0.078    0.3%
   18     22.64     0.083    0.3%
   19     22.93     0.124    0.5%
   20     22.67       0.1    0.4%
   21     22.28     0.243    1.0%
   22     22.08     0.043    0.1%
   23     22.72     0.141    0.6%
   24     22.17      0.21    0.9%
   25     22.11     0.133    0.6%
   26     22.28     0.124    0.5%
   27     23.04     0.086    0.3%
   28     22.62     0.117    0.5%
   29     22.74      0.19    0.8%
   30     22.74      0.14    0.6%
   31     22.39     0.135    0.6%
   32     22.59     0.123    0.5%
   33     22.23     0.064    0.2%
   34     22.82      0.25    1.0%
   35     22.45     0.246    1.0%
   36     22.55     0.287    1.2%
   37     22.49     0.085    0.3%
   38     22.59     0.102    0.4%
   39     22.51     0.112    0.4%
   40     22.49     0.081    0.3%
   41     22.68     0.185    0.8%
   42     22.36     0.099    0.4%
   43     22.61     0.112    0.4%
   44     22.64     0.056    0.2%
   45     22.54     0.169    0.7%
   46     22.49     0.115    0.5%
   47     22.63     0.103    0.4%
   48     22.66       0.1    0.4%
   49     22.37     0.131    0.5%
   50     22.79      0.08    0.3%
   51     22.64     0.176    0.7%
   52     22.72     0.101    0.4%
   53     22.73     0.135    0.5%
   54     22.45     0.098    0.4%
   55     22.68     0.074    0.3%
   56      22.6     0.132    0.5%
   57      22.6     0.126    0.5%
   58     22.69     0.114    0.5%
   59     22.75     0.073    0.3%
   60     22.85     0.082    0.3%
   61     22.69     0.098    0.4%
   62     22.77     0.129    0.5%
   63     22.68     0.152    0.6%
   64      22.4     0.111    0.4%
   65     22.47     0.102    0.4%
   66     22.44     0.121    0.5%
   67     22.79     0.123    0.5%
   68     22.72     0.208    0.9%
   69     22.86     0.136    0.5%
   70     22.93     0.123    0.5%
   71     22.76     0.137    0.6%
   72     22.91     0.138    0.6%
   73     22.82     0.084    0.3%
   74      22.8     0.137    0.6%
   75     22.54     0.106    0.4%
   76     22.89      0.15    0.6%
   77     22.44     0.181    0.8%
   78     22.83      0.09    0.3%
   79      22.8     0.128    0.5%
   80     23.06     0.094    0.4%
   81     22.44     0.135    0.6%
   82     22.64     0.119    0.5%
   83     22.87     0.157    0.6%
   84      22.7     0.125    0.5%
   85     22.82     0.127    0.5%
   86     22.55      0.15    0.6%
   87     22.74     0.134    0.5%
   88     22.78     0.152    0.6%
   89     22.68     0.157    0.6%
   90      22.9     0.148    0.6%
   91     22.89     0.111    0.4%
   92     22.86     0.107    0.4%
   93     22.79     0.173    0.7%
   94     22.88     0.193    0.8%
   95     22.79     0.155    0.6%
   96     23.02       0.1    0.4%
   97     22.83      0.06    0.2%
   98     23.03     0.059    0.2%
   99     22.65     0.139    0.6%
  100      22.8     0.124    0.5%

Quality and confidence:
param     error
t             0

Model:
Time ~=    22.29
    + t    0.006
              µs

Reads = 1 + (0 * t)
Writes = 2 + (0 * t)


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

@ntn-x2 ntn-x2 left a comment

Choose a reason for hiding this comment

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

I had just a few nit picks, otherwise it looks good 👍

runtimes/common/src/lib.rs Outdated Show resolved Hide resolved
runtimes/common/src/lib.rs Outdated Show resolved Hide resolved
@ntn-x2 ntn-x2 self-requested a review April 19, 2022 08:11
Copy link
Member

@ntn-x2 ntn-x2 left a comment

Choose a reason for hiding this comment

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

👍

@wischli wischli enabled auto-merge (squash) April 19, 2022 08:16
@wischli wischli merged commit 9d318ee into develop Apr 19, 2022
@wischli wischli deleted the wf-add-tips-pallet branch April 19, 2022 08:49
ntn-x2 pushed a commit that referenced this pull request Jun 23, 2022
* feat: add tips pallet

* fix: benchmarks

* refactor: move provider to common

* feat: add tips membership pallet

* cargo run --quiet --release -p kilt-parachain --features=runtime-benchmarks -- benchmark --chain=spiritnet-dev --steps=50 --repeat=20 --pallet=pallet-tips --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/spiritnet/src/weights/pallet_tips.rs --template=.maintain/runtime-weight-template.hbs

* cargo run --quiet --release -p kilt-parachain --features=runtime-benchmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet-tips --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/peregrine/src/weights/pallet_tips.rs --template=.maintain/runtime-weight-template.hbs

* refactor: apply suggestions from @ntn-x2

Co-authored-by: kiltbot <>
(cherry picked from commit 9d318ee)
ntn-x2 added a commit that referenced this pull request Jun 24, 2022
* Adds two more relaychain bootnodes for staging environment  (#334)

* chore: reset peregrine stg (#335)

* ci: use custom ci image (#336)

* Optimizes docker layer (#337)

* fix: add did lookup pallet to DID authorization logic + reverse lookup index (#343)

* chore: update toolchain version to nightly 1.59 (#339)

* feat: proxy type for disableling deposit claiming (#341)

* fix: rococo protocol id (#369)

* feat: generic access control (#316)

* Updates toolchain version (#345)

* refactor: enforce no runtime in pallet (#349)

* fix: features (#353)

* feat: add tips pallet (#352)

* feat: upgrade to Polkadot v0.9.19 (#357)

* chore: upgrade and clean up (#360)

* Adds the new rococo chainspec (#363)

* feat: add launch pallet removal migration (#359)

* refactor: update rilt para id from 2015 to 2108 (#364)

* fix: rilt para id (#365)

* feat: upgrade to Polkadot v0.9.23 (#366)

* use ci-linx:production base image (#368)

* feat: upgrade to Polkadot v0.9.24 (#370)

* fix: fix CI builders compilation errors and pin to a specific hash (#372)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ new feature feature: new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants