From 629c5b9d25e153140abb56bc74a76981034a5bf6 Mon Sep 17 00:00:00 2001 From: Hugo Trentesaux <hugo.trentesaux@lilo.org> Date: Mon, 29 Jan 2024 15:23:14 +0100 Subject: [PATCH] refac add_cert (nodes/rust/duniter-v2s!230) * review poka complete comment * review poka remove fixme tests * update metadata after rebase * I do not know why these tests did not run locally * update membership weights * fix benchmarks also with true runtime * fix tests * update runtime * update benchmarks * split add and renew cert remove issuer in add_cert and more refac the code compiles * clean up errors and mini refac --- Cargo.lock | 2 + docs/api/runtime-calls.md | 171 ++++++++------- docs/api/runtime-errors.md | 90 ++++---- end2end-tests/tests/common/cert.rs | 6 +- pallets/certification/Cargo.toml | 1 + pallets/certification/src/benchmarking.rs | 33 ++- pallets/certification/src/lib.rs | 182 ++++++++++------ pallets/certification/src/mock.rs | 2 +- pallets/certification/src/tests.rs | 30 +-- pallets/certification/src/weights.rs | 12 ++ pallets/duniter-account/src/lib.rs | 23 +- pallets/duniter-wot/src/mock.rs | 2 +- pallets/duniter-wot/src/tests.rs | 47 +++-- pallets/identity/Cargo.toml | 1 + pallets/identity/src/lib.rs | 30 ++- pallets/membership/src/lib.rs | 10 +- pallets/membership/src/weights.rs | 33 --- primitives/duniter/src/lib.rs | 16 ++ resources/metadata.scale | Bin 128711 -> 128583 bytes runtime/common/src/pallets_config.rs | 2 +- .../weights/frame_benchmarking_baseline.rs | 38 ++-- runtime/common/src/weights/frame_system.rs | 60 +++--- .../src/weights/pallet_authority_members.rs | 48 ++--- runtime/common/src/weights/pallet_balances.rs | 38 ++-- .../src/weights/pallet_certification.rs | 150 +++++++------ .../common/src/weights/pallet_collective.rs | 198 +++++++++--------- runtime/common/src/weights/pallet_distance.rs | 102 +++++---- .../src/weights/pallet_duniter_account.rs | 58 ++--- runtime/common/src/weights/pallet_identity.rs | 122 +++++------ .../common/src/weights/pallet_im_online.rs | 27 ++- .../common/src/weights/pallet_membership.rs | 128 ++--------- runtime/common/src/weights/pallet_multisig.rs | 86 ++++---- .../src/weights/pallet_oneshot_account.rs | 22 +- runtime/common/src/weights/pallet_preimage.rs | 70 +++---- .../src/weights/pallet_provide_randomness.rs | 42 ++-- runtime/common/src/weights/pallet_proxy.rs | 118 +++++------ runtime/common/src/weights/pallet_quota.rs | 44 ++-- .../common/src/weights/pallet_scheduler.rs | 96 ++++----- runtime/common/src/weights/pallet_session.rs | 30 +-- .../src/weights/pallet_smith_members.rs | 34 +-- .../common/src/weights/pallet_timestamp.rs | 24 +-- runtime/common/src/weights/pallet_treasury.rs | 57 +++-- .../src/weights/pallet_universal_dividend.rs | 39 ++-- .../src/weights/pallet_upgrade_origin.rs | 14 +- runtime/common/src/weights/pallet_utility.rs | 42 ++-- runtime/gdev/tests/fixme_tests.rs | 71 ------- runtime/gdev/tests/integration_tests.rs | 32 ++- 47 files changed, 1195 insertions(+), 1288 deletions(-) delete mode 100644 runtime/gdev/tests/fixme_tests.rs diff --git a/Cargo.lock b/Cargo.lock index d4e07f05f..27af27b79 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5971,6 +5971,7 @@ dependencies = [ name = "pallet-certification" version = "3.0.0" dependencies = [ + "duniter-primitives", "frame-benchmarking", "frame-support", "frame-system", @@ -6125,6 +6126,7 @@ dependencies = [ name = "pallet-identity" version = "3.0.0" dependencies = [ + "duniter-primitives", "frame-benchmarking", "frame-support", "frame-system", diff --git a/docs/api/runtime-calls.md b/docs/api/runtime-calls.md index 971f556b4..ef918bc7e 100644 --- a/docs/api/runtime-calls.md +++ b/docs/api/runtime-calls.md @@ -13,7 +13,7 @@ through on-chain governance mechanisms. ## User calls -There are **77** user calls from **21** pallets. +There are **78** user calls from **21** pallets. ### Account - 1 @@ -21,7 +21,7 @@ There are **77** user calls from **21** pallets. <details><summary><code>unlink_identity()</code></summary> -Taking 0.0076 % of a block. +Taking 0.0082 % of a block. ```rust ``` @@ -36,7 +36,7 @@ unlink the identity associated with the account <details><summary><code>schedule(when, maybe_periodic, priority, call)</code></summary> -Taking 0.0088 % of a block. +Taking 0.0098 % of a block. ```rust when: T::BlockNumber @@ -53,7 +53,7 @@ Anonymously schedule a task. <details><summary><code>cancel(when, index)</code></summary> -Taking 0.0118 % of a block. +Taking 0.0131 % of a block. ```rust when: T::BlockNumber @@ -68,7 +68,7 @@ Cancel an anonymously scheduled task. <details><summary><code>schedule_named(id, when, maybe_periodic, priority, call)</code></summary> -Taking 0.012 % of a block. +Taking 0.0131 % of a block. ```rust id: TaskName @@ -86,7 +86,7 @@ Schedule a named task. <details><summary><code>cancel_named(id)</code></summary> -Taking 0.0123 % of a block. +Taking 0.0137 % of a block. ```rust id: TaskName @@ -157,7 +157,7 @@ be reported. <details><summary><code>transfer_allow_death(dest, value)</code></summary> -Taking 0.0129 % of a block. +Taking 0.0152 % of a block. ```rust dest: AccountIdLookupOf<T> @@ -199,7 +199,7 @@ WARNING: This call is DEPRECATED! Use `force_set_balance` instead. <details><summary><code>transfer_keep_alive(dest, value)</code></summary> -Taking 0.0119 % of a block. +Taking 0.0168 % of a block. ```rust dest: AccountIdLookupOf<T> @@ -219,7 +219,7 @@ kill the origin account. <details><summary><code>transfer_all(dest, keep_alive)</code></summary> -Taking 0.0122 % of a block. +Taking 0.0142 % of a block. ```rust dest: AccountIdLookupOf<T> @@ -284,7 +284,7 @@ The dispatch origin for this call is `root`. <details><summary><code>create_oneshot_account(dest, value)</code></summary> -Taking 0.0084 % of a block. +Taking 0.0095 % of a block. ```rust dest: <T::Lookup as StaticLookup>::Source @@ -304,7 +304,7 @@ Origin account is kept alive. <details><summary><code>consume_oneshot_account(block_height, dest)</code></summary> -Taking 0.012 % of a block. +Taking 0.0134 % of a block. ```rust block_height: T::BlockNumber @@ -323,7 +323,7 @@ Consume a oneshot account and transfer its balance to an account <details><summary><code>consume_oneshot_account_with_remaining(block_height, dest, remaining_to, balance)</code></summary> -Taking 0.0155 % of a block. +Taking 0.0175 % of a block. ```rust block_height: T::BlockNumber @@ -351,7 +351,7 @@ and the remaining amount to another account. <details><summary><code>invite_smith(receiver)</code></summary> -Taking 0.0136 % of a block. +Taking 0.0153 % of a block. ```rust receiver: T::IdtyIndex @@ -365,7 +365,7 @@ Invite a WoT member to try becoming a Smith <details><summary><code>accept_invitation()</code></summary> -Taking 0.0085 % of a block. +Taking 0.0094 % of a block. ```rust ``` @@ -378,7 +378,7 @@ Accept an invitation (must have been invited first) <details><summary><code>certify_smith(receiver)</code></summary> -Taking 0.0126 % of a block. +Taking 0.0139 % of a block. ```rust receiver: T::IdtyIndex @@ -394,7 +394,7 @@ Certify an invited smith which can lead the certified to become a Smith <details><summary><code>go_offline()</code></summary> -Taking 0.0103 % of a block. +Taking 0.0117 % of a block. ```rust ``` @@ -407,7 +407,7 @@ ask to leave the set of validators two sessions after <details><summary><code>go_online()</code></summary> -Taking 0.0114 % of a block. +Taking 0.0138 % of a block. ```rust ``` @@ -420,7 +420,7 @@ ask to join the set of validators two sessions after <details><summary><code>set_session_keys(keys)</code></summary> -Taking 0.0142 % of a block. +Taking 0.0177 % of a block. ```rust keys: T::Keys @@ -434,7 +434,7 @@ declare new session keys to replace current ones <details><summary><code>remove_member_from_blacklist(member_id)</code></summary> -Taking 0.0079 % of a block. +Taking 0.0094 % of a block. ```rust member_id: T::MemberId @@ -491,7 +491,7 @@ The weight of this call is defined by the caller. <details><summary><code>note_preimage(bytes)</code></summary> -Taking 0.2804 % of a block. +Taking 0.5042 % of a block. ```rust bytes: Vec<u8> @@ -508,7 +508,7 @@ the preimage. Otherwise, a deposit is taken proportional to the size of the prei <details><summary><code>unnote_preimage(hash)</code></summary> -Taking 0.0119 % of a block. +Taking 0.0135 % of a block. ```rust hash: T::Hash @@ -527,7 +527,7 @@ If `len` is provided, then it will be a much cheaper operation. <details><summary><code>request_preimage(hash)</code></summary> -Taking 0.0085 % of a block. +Taking 0.0092 % of a block. ```rust hash: T::Hash @@ -544,7 +544,7 @@ a user may have paid, and take the control of the preimage out of their hands. <details><summary><code>unrequest_preimage(hash)</code></summary> -Taking 0.0112 % of a block. +Taking 0.0119 % of a block. ```rust hash: T::Hash @@ -562,7 +562,7 @@ NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. <details><summary><code>execute(proposal, length_bound)</code></summary> -Taking 0.0056 % of a block. +Taking 0.0061 % of a block. ```rust proposal: Box<<T as Config<I>>::Proposal> @@ -614,7 +614,7 @@ or put up for voting. <details><summary><code>vote(proposal, index, approve)</code></summary> -Taking 0.0088 % of a block. +Taking 0.0104 % of a block. ```rust proposal: T::Hash @@ -680,7 +680,7 @@ proposal. <details><summary><code>claim_uds()</code></summary> -Taking 0.0131 % of a block. +Taking 0.0146 % of a block. ```rust ``` @@ -693,7 +693,7 @@ Claim Universal Dividends <details><summary><code>transfer_ud(dest, value)</code></summary> -Taking 0.0134 % of a block. +Taking 0.0158 % of a block. ```rust dest: <T::Lookup as StaticLookup>::Source @@ -708,7 +708,7 @@ Transfer some liquid free balance to another account, in milliUD. <details><summary><code>transfer_ud_keep_alive(dest, value)</code></summary> -Taking 0.0125 % of a block. +Taking 0.0144 % of a block. ```rust dest: <T::Lookup as StaticLookup>::Source @@ -725,7 +725,7 @@ Transfer some liquid free balance to another account, in milliUD. <details><summary><code>create_identity(owner_key)</code></summary> -Taking 0.0439 % of a block. +Taking 0.0484 % of a block. ```rust owner_key: T::AccountId @@ -743,7 +743,7 @@ The origin must be allowed to create an identity. <details><summary><code>confirm_identity(idty_name)</code></summary> -Taking 0.0181 % of a block. +Taking 0.0204 % of a block. ```rust idty_name: IdtyName @@ -761,7 +761,7 @@ The identity must have been created using `create_identity` before it can be con <details><summary><code>change_owner_key(new_key, new_key_sig)</code></summary> -Taking 0.0238 % of a block. +Taking 0.0306 % of a block. ```rust new_key: T::AccountId @@ -782,7 +782,7 @@ The origin should be the old identity owner key. <details><summary><code>revoke_identity(idty_index, revocation_key, revocation_sig)</code></summary> -Taking 0.0227 % of a block. +Taking 0.0293 % of a block. ```rust idty_index: T::IdtyIndex @@ -805,7 +805,7 @@ Any signed origin can execute this call. <details><summary><code>fix_sufficients(owner_key, inc)</code></summary> -Taking 0.0077 % of a block. +Taking 0.0081 % of a block. ```rust owner_key: T::AccountId @@ -820,7 +820,7 @@ change sufficient ref count for given key <details><summary><code>link_account(account_id, payload_sig)</code></summary> -Taking 0.011 % of a block. +Taking 0.0135 % of a block. ```rust account_id: T::AccountId @@ -835,28 +835,37 @@ Link an account to an identity #### add_cert - 0 -<details><summary><code>add_cert(issuer, receiver)</code></summary> +<details><summary><code>add_cert(receiver)</code></summary> -Taking 0.019 % of a block. +Taking 0.0214 % of a block. ```rust -issuer: T::IdtyIndex receiver: T::IdtyIndex ``` </details> -Add a new certification or renew an existing one +Add a new certification. + +#### renew_cert - 3 + +<details><summary><code>renew_cert(receiver)</code></summary> -- `receiver`: the account receiving the certification from the origin +Taking 0.018 % of a block. + +```rust +receiver: T::IdtyIndex +``` +</details> -The origin must be allow to certify. + +Renew an existing certification. #### del_cert - 1 <details><summary><code>del_cert(issuer, receiver)</code></summary> -Taking 0.0153 % of a block. +Taking 0.0155 % of a block. ```rust issuer: T::IdtyIndex @@ -871,7 +880,7 @@ remove a certification (only root) <details><summary><code>remove_all_certs_received_by(idty_index)</code></summary> -Taking 3.5004 % of a block. +Taking 3.7485 % of a block. ```rust idty_index: T::IdtyIndex @@ -887,7 +896,7 @@ remove all certifications received by an identity (only root) <details><summary><code>request_distance_evaluation()</code></summary> -Taking 0.06 % of a block. +Taking 0.0194 % of a block. ```rust ``` @@ -902,7 +911,7 @@ negative evaluation will result in slash for caller <details><summary><code>request_distance_evaluation_for(target)</code></summary> -Taking 0.0805 % of a block. +Taking 0.0199 % of a block. ```rust target: T::IdtyIndex @@ -917,7 +926,7 @@ only possible for unvalidated identity <details><summary><code>update_evaluation(computation_result)</code></summary> -Taking 0.0914 % of a block. +Taking 0.0214 % of a block. ```rust computation_result: ComputationResult @@ -932,7 +941,7 @@ this is called internally by validators (= inherent) <details><summary><code>force_update_evaluation(evaluator, computation_result)</code></summary> -Taking 0.0759 % of a block. +Taking 0.014 % of a block. ```rust evaluator: <T as frame_system::Config>::AccountId @@ -947,7 +956,7 @@ Force push an evaluation result to the pool <details><summary><code>force_valid_distance_status(identity)</code></summary> -Taking 0.074 % of a block. +Taking 0.0173 % of a block. ```rust identity: <T as pallet_identity::Config>::IdtyIndex @@ -1034,7 +1043,7 @@ The dispatch origin for this call must be _Signed_. <details><summary><code>as_multi_threshold_1(other_signatories, call)</code></summary> -Taking 0.0049 % of a block. +Taking 0.0054 % of a block. ```rust other_signatories: Vec<T::AccountId> @@ -1163,7 +1172,7 @@ NOTE: If this is the final approval, you will want to use `as_multi` instead. <details><summary><code>cancel_as_multi(threshold, other_signatories, timepoint, call_hash)</code></summary> -Taking 0.0088 % of a block. +Taking 0.0103 % of a block. ```rust threshold: u16 @@ -1202,7 +1211,7 @@ transaction for this dispatch. <details><summary><code>request(randomness_type, salt)</code></summary> -Taking 0.0191 % of a block. +Taking 0.0224 % of a block. ```rust randomness_type: RandomnessType @@ -1219,7 +1228,7 @@ Request a randomness <details><summary><code>proxy(real, force_proxy_type, call)</code></summary> -Taking 0.0055 % of a block. +Taking 0.0064 % of a block. ```rust real: AccountIdLookupOf<T> @@ -1243,7 +1252,7 @@ Parameters: <details><summary><code>add_proxy(delegate, proxy_type, delay)</code></summary> -Taking 0.0085 % of a block. +Taking 0.0098 % of a block. ```rust delegate: AccountIdLookupOf<T> @@ -1267,7 +1276,7 @@ zero. <details><summary><code>remove_proxy(delegate, proxy_type, delay)</code></summary> -Taking 0.0085 % of a block. +Taking 0.0101 % of a block. ```rust delegate: AccountIdLookupOf<T> @@ -1289,7 +1298,7 @@ Parameters: <details><summary><code>remove_proxies()</code></summary> -Taking 0.0084 % of a block. +Taking 0.0098 % of a block. ```rust ``` @@ -1307,7 +1316,7 @@ the unreserved fees will be inaccessible. **All access to this account will be l <details><summary><code>create_pure(proxy_type, delay, index)</code></summary> -Taking 0.0085 % of a block. +Taking 0.0109 % of a block. ```rust proxy_type: T::ProxyType @@ -1340,7 +1349,7 @@ Fails if there are insufficient funds to pay for deposit. <details><summary><code>kill_pure(spawner, proxy_type, index, height, ext_index)</code></summary> -Taking 0.0084 % of a block. +Taking 0.0094 % of a block. ```rust spawner: AccountIdLookupOf<T> @@ -1373,7 +1382,7 @@ account whose `pure` call has corresponding parameters. <details><summary><code>announce(real, call_hash)</code></summary> -Taking 0.0123 % of a block. +Taking 0.0138 % of a block. ```rust real: AccountIdLookupOf<T> @@ -1402,7 +1411,7 @@ Parameters: <details><summary><code>remove_announcement(real, call_hash)</code></summary> -Taking 0.0116 % of a block. +Taking 0.0126 % of a block. ```rust real: AccountIdLookupOf<T> @@ -1426,7 +1435,7 @@ Parameters: <details><summary><code>reject_announcement(delegate, call_hash)</code></summary> -Taking 0.0116 % of a block. +Taking 0.0128 % of a block. ```rust delegate: AccountIdLookupOf<T> @@ -1450,7 +1459,7 @@ Parameters: <details><summary><code>proxy_announced(delegate, real, force_proxy_type, call)</code></summary> -Taking 0.0125 % of a block. +Taking 0.0155 % of a block. ```rust delegate: AccountIdLookupOf<T> @@ -1479,7 +1488,7 @@ Parameters: <details><summary><code>batch(calls)</code></summary> -Taking 0.1825 % of a block. +Taking 0.2737 % of a block. ```rust calls: Vec<<T as Config>::RuntimeCall> @@ -1510,7 +1519,7 @@ event is deposited. <details><summary><code>as_derivative(index, call)</code></summary> -Taking 0.0046 % of a block. +Taking 0.0049 % of a block. ```rust index: u16 @@ -1537,7 +1546,7 @@ The dispatch origin for this call must be _Signed_. <details><summary><code>batch_all(calls)</code></summary> -Taking 0.1899 % of a block. +Taking 0.2944 % of a block. ```rust calls: Vec<<T as Config>::RuntimeCall> @@ -1563,7 +1572,7 @@ includes bypassing `frame_system::Config::BaseCallFilter`). <details><summary><code>force_batch(calls)</code></summary> -Taking 0.1833 % of a block. +Taking 0.3113 % of a block. ```rust calls: Vec<<T as Config>::RuntimeCall> @@ -1611,7 +1620,7 @@ The dispatch origin for this call must be _Root_. <details><summary><code>propose_spend(value, beneficiary)</code></summary> -Taking 0.0111 % of a block. +Taking 0.0119 % of a block. ```rust value: BalanceOf<T, I> @@ -1653,7 +1662,7 @@ beneficiary. <details><summary><code>remove_approval(proposal_id)</code></summary> -Taking 0.0077 % of a block. +Taking 0.0079 % of a block. ```rust proposal_id: ProposalIndex @@ -1687,7 +1696,7 @@ There are **15** root calls from **8** pallets. <details><summary><code>set_heap_pages(pages)</code></summary> -Taking 0.0101 % of a block. +Taking 0.0105 % of a block. ```rust pages: u64 @@ -1735,7 +1744,7 @@ Set the new runtime code without doing any checks of the given `code`. <details><summary><code>set_storage(items)</code></summary> -Taking 2.6239 % of a block. +Taking 2.6599 % of a block. ```rust items: Vec<KeyValue> @@ -1749,7 +1758,7 @@ Set some items of storage. <details><summary><code>kill_storage(keys)</code></summary> -Taking 2.6145 % of a block. +Taking 2.6329 % of a block. ```rust keys: Vec<Key> @@ -1763,7 +1772,7 @@ Kill some items from storage. <details><summary><code>kill_prefix(prefix, subkeys)</code></summary> -Taking 3.0011 % of a block. +Taking 3.0283 % of a block. ```rust prefix: Key @@ -1802,7 +1811,7 @@ not been enacted yet. <details><summary><code>force_transfer(source, dest, value)</code></summary> -Taking 0.0157 % of a block. +Taking 0.0242 % of a block. ```rust source: AccountIdLookupOf<T> @@ -1819,7 +1828,7 @@ may be specified. <details><summary><code>force_unreserve(who, amount)</code></summary> -Taking 0.0081 % of a block. +Taking 0.0096 % of a block. ```rust who: AccountIdLookupOf<T> @@ -1838,7 +1847,7 @@ Can only be called by ROOT. <details><summary><code>remove_member(member_id)</code></summary> -Taking 0.0345 % of a block. +Taking 0.0366 % of a block. ```rust member_id: T::MemberId @@ -1882,7 +1891,7 @@ Only callable by root. <details><summary><code>set_members(new_members, prime, old_count)</code></summary> -Taking 0.0823 % of a block. +Taking 0.0868 % of a block. ```rust new_members: Vec<T::AccountId> @@ -1921,7 +1930,7 @@ with other logic managing the member set. <details><summary><code>disapprove_proposal(proposal_hash)</code></summary> -Taking 0.0134 % of a block. +Taking 0.014 % of a block. ```rust proposal_hash: T::Hash @@ -1946,7 +1955,7 @@ O(P) where P is the number of max proposals <details><summary><code>prune_item_identities_names(names)</code></summary> -Taking 2.6583 % of a block. +Taking 2.6984 % of a block. ```rust names: Vec<IdtyName> @@ -1962,7 +1971,7 @@ remove identity names from storage <details><summary><code>dispatch_as(as_origin, call)</code></summary> -Taking 0.0048 % of a block. +Taking 0.0059 % of a block. ```rust as_origin: Box<T::PalletsOrigin> @@ -1993,7 +2002,7 @@ There are **4** disabled calls from **2** pallets. <details><summary><code>remark(remark)</code></summary> -Taking 0.0544 % of a block. +Taking 0.0955 % of a block. ```rust remark: Vec<u8> @@ -2010,7 +2019,7 @@ Make some on-chain remark. <details><summary><code>remark_with_event(remark)</code></summary> -Taking 0.2043 % of a block. +Taking 0.3514 % of a block. ```rust remark: Vec<u8> @@ -2026,7 +2035,7 @@ Make some on-chain remark and emit event. <details><summary><code>set_keys(keys, proof)</code></summary> -Taking 0.0204 % of a block. +Taking 0.0212 % of a block. ```rust keys: T::Keys @@ -2049,7 +2058,7 @@ The dispatch origin of this function must be signed. <details><summary><code>purge_keys()</code></summary> -Taking 0.0185 % of a block. +Taking 0.0189 % of a block. ```rust ``` diff --git a/docs/api/runtime-errors.md b/docs/api/runtime-errors.md index 620c1674c..ba588dddc 100644 --- a/docs/api/runtime-errors.md +++ b/docs/api/runtime-errors.md @@ -1,6 +1,6 @@ # Runtime errors -There are **176** errors from **35** pallets. +There are **174** errors from **35** pallets. <ul> <li>System - 0 @@ -814,119 +814,105 @@ Identity already created. <li> <details> <summary> -<code>IdtyAlreadyValidated</code> - 2</summary> -Identity already validated. -</details> -</li> -<li> -<details> -<summary> -<code>IdtyIndexNotFound</code> - 3</summary> +<code>IdtyIndexNotFound</code> - 2</summary> Identity index not found. </details> </li> <li> <details> <summary> -<code>IdtyNameAlreadyExist</code> - 4</summary> +<code>IdtyNameAlreadyExist</code> - 3</summary> Identity name already exists. </details> </li> <li> <details> <summary> -<code>IdtyNameInvalid</code> - 5</summary> +<code>IdtyNameInvalid</code> - 4</summary> Invalid identity name. </details> </li> <li> <details> <summary> -<code>IdtyNotConfirmed</code> - 6</summary> -Identity not confirmed by its owner. -</details> -</li> -<li> -<details> -<summary> -<code>IdtyNotFound</code> - 7</summary> +<code>IdtyNotFound</code> - 5</summary> Identity not found. </details> </li> <li> <details> <summary> -<code>InvalidSignature</code> - 8</summary> +<code>InvalidSignature</code> - 6</summary> Invalid payload signature. </details> </li> <li> <details> <summary> -<code>InvalidRevocationKey</code> - 9</summary> +<code>InvalidRevocationKey</code> - 7</summary> Invalid revocation key. </details> </li> <li> <details> <summary> -<code>IssuerNotMember</code> - 10</summary> +<code>IssuerNotMember</code> - 8</summary> Issuer is not member and can not perform this action. </details> </li> <li> <details> <summary> -<code>NotRespectIdtyCreationPeriod</code> - 11</summary> +<code>NotRespectIdtyCreationPeriod</code> - 9</summary> Identity creation period is not respected. </details> </li> <li> <details> <summary> -<code>OwnerKeyAlreadyRecentlyChanged</code> - 12</summary> +<code>OwnerKeyAlreadyRecentlyChanged</code> - 10</summary> Owner key already changed recently. </details> </li> <li> <details> <summary> -<code>OwnerKeyAlreadyUsed</code> - 13</summary> +<code>OwnerKeyAlreadyUsed</code> - 11</summary> Owner key already used. </details> </li> <li> <details> <summary> -<code>ProhibitedToRevertToAnOldKey</code> - 14</summary> +<code>ProhibitedToRevertToAnOldKey</code> - 12</summary> Reverting to an old key is prohibited. </details> </li> <li> <details> <summary> -<code>AlreadyRevoked</code> - 15</summary> +<code>AlreadyRevoked</code> - 13</summary> Already revoked. </details> </li> <li> <details> <summary> -<code>CanNotRevokeUnconfirmed</code> - 16</summary> +<code>CanNotRevokeUnconfirmed</code> - 14</summary> Can not revoke identity that never was member. </details> </li> <li> <details> <summary> -<code>CanNotRevokeUnvalidated</code> - 17</summary> +<code>CanNotRevokeUnvalidated</code> - 15</summary> Can not revoke identity that never was member. </details> </li> <li> <details> <summary> -<code>AccountNotExist</code> - 18</summary> +<code>AccountNotExist</code> - 16</summary> Cannot link to an inexisting account. </details> </li> @@ -937,68 +923,68 @@ Cannot link to an inexisting account. <li> <details> <summary> -<code>IdtyIdNotFound</code> - 0</summary> -Identity ID not found. +<code>MembershipNotFound</code> - 0</summary> +Membership not found, can not renew. </details> </li> <li> <details> <summary> -<code>MembershipAlreadyAcquired</code> - 1</summary> -Membership already acquired. +<code>AlreadyMember</code> - 1</summary> +Already member, can not add membership. </details> </li> +</ul> +</li> +<li>Certification - 43 +<ul> <li> <details> <summary> -<code>MembershipNotFound</code> - 2</summary> -Membership not found. +<code>OriginMustHaveAnIdentity</code> - 0</summary> +Issuer of a certification must have an identity </details> </li> <li> <details> <summary> -<code>AlreadyMember</code> - 3</summary> -Already member, can not claim membership. +<code>CannotCertifySelf</code> - 1</summary> +Identity cannot certify itself. </details> </li> -</ul> -</li> -<li>Certification - 43 -<ul> <li> <details> <summary> -<code>CannotCertifySelf</code> - 0</summary> -Identity cannot certify itself. +<code>IssuedTooManyCert</code> - 2</summary> +Identity has already issued the maximum number of certifications. </details> </li> <li> <details> <summary> -<code>IssuedTooManyCert</code> - 1</summary> -Identity has already issued the maximum number of certifications. +<code>NotEnoughCertReceived</code> - 3</summary> +Insufficient certifications received. </details> </li> <li> <details> <summary> -<code>IssuerNotFound</code> - 2</summary> -Issuer not found. +<code>NotRespectCertPeriod</code> - 4</summary> +Identity has issued a certification too recently. </details> </li> <li> <details> <summary> -<code>NotEnoughCertReceived</code> - 3</summary> -Insufficient certifications received. +<code>CertAlreadyExists</code> - 5</summary> +Can not add an already-existing cert </details> </li> <li> <details> <summary> -<code>NotRespectCertPeriod</code> - 4</summary> -Identity has issued a certification too recently. +<code>CertDoesNotExist</code> - 6</summary> +Can not renew a non-existing cert </details> </li> </ul> diff --git a/end2end-tests/tests/common/cert.rs b/end2end-tests/tests/common/cert.rs index 0160b2b46..d1fba6417 100644 --- a/end2end-tests/tests/common/cert.rs +++ b/end2end-tests/tests/common/cert.rs @@ -25,7 +25,7 @@ pub async fn certify(client: &Client, from: AccountKeyring, to: AccountKeyring) let from = from.to_account_id(); let to = to.to_account_id(); - let issuer_index = client + let _issuer_index = client .storage() .at_latest() .await @@ -51,9 +51,7 @@ pub async fn certify(client: &Client, from: AccountKeyring, to: AccountKeyring) client .tx() .create_signed( - &gdev::tx() - .certification() - .add_cert(issuer_index, receiver_index), + &gdev::tx().certification().add_cert(receiver_index), &signer, BaseExtrinsicParamsBuilder::new(), ) diff --git a/pallets/certification/Cargo.toml b/pallets/certification/Cargo.toml index 99e36b512..d17ef7ee1 100644 --- a/pallets/certification/Cargo.toml +++ b/pallets/certification/Cargo.toml @@ -25,6 +25,7 @@ std = [ try-runtime = ['frame-support/try-runtime'] [dependencies] +duniter-primitives = { path = "../../primitives/duniter", default-features = false } # substrate scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } diff --git a/pallets/certification/src/benchmarking.rs b/pallets/certification/src/benchmarking.rs index add49d644..803903bc1 100644 --- a/pallets/certification/src/benchmarking.rs +++ b/pallets/certification/src/benchmarking.rs @@ -21,7 +21,6 @@ use super::*; use frame_benchmarking::benchmarks; use frame_benchmarking::Zero; use frame_system::RawOrigin; -use sp_runtime::traits::Convert; #[cfg(test)] use maplit::btreemap; @@ -51,27 +50,47 @@ benchmarks! { } add_cert { let issuer: T::IdtyIndex = 1.into(); - let caller: T::AccountId = T::OwnerKeyOf::convert(issuer).unwrap(); + let caller: T::AccountId = T::IdtyAttr::owner_key(issuer).unwrap(); let caller_origin: <T as frame_system::Config>::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); let receiver: T::IdtyIndex = 2.into(); Pallet::<T>::del_cert(RawOrigin::Root.into(), issuer, receiver)?; let issuer_cert: u32 = StorageIdtyCertMeta::<T>::get(issuer).issued_count; let receiver_cert: u32 = StorageIdtyCertMeta::<T>::get(receiver).received_count; frame_system::pallet::Pallet::<T>::set_block_number(T::CertPeriod::get()); - }: _<T::RuntimeOrigin>(caller_origin, issuer, receiver) + }: _<T::RuntimeOrigin>(caller_origin, receiver) verify { assert_has_event::<T>(Event::<T>::CertAdded{ issuer, receiver }.into()); } + + renew_cert { + let issuer: T::IdtyIndex = 1.into(); + let caller: T::AccountId = T::IdtyAttr::owner_key(issuer).unwrap(); + let caller_origin: <T as frame_system::Config>::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); + let receiver: T::IdtyIndex = 2.into(); + Pallet::<T>::del_cert(RawOrigin::Root.into(), issuer, receiver)?; + let issuer_cert: u32 = StorageIdtyCertMeta::<T>::get(issuer).issued_count; + let receiver_cert: u32 = StorageIdtyCertMeta::<T>::get(receiver).received_count; + frame_system::pallet::Pallet::<T>::set_block_number(T::CertPeriod::get()); + Pallet::<T>::add_cert(caller_origin.clone(), receiver)?; + frame_system::pallet::Pallet::<T>::set_block_number(T::CertPeriod::get() + T::CertPeriod::get()); + }: _<T::RuntimeOrigin>(caller_origin, receiver) + verify { + assert_has_event::<T>(Event::<T>::CertAdded{ issuer, receiver }.into()); + } + del_cert { let issuer: T::IdtyIndex = 1.into(); - let receiver: T::IdtyIndex = 0.into(); - Pallet::<T>::do_add_cert_checked(issuer, receiver, false)?; + let receiver: T::IdtyIndex = 2.into(); + // try to add cert if missing, else ignore + // this depends on initial data + let _ = Pallet::<T>::do_add_cert_checked(issuer, receiver, false); let receiver_cert: u32 = StorageIdtyCertMeta::<T>::get(receiver).received_count; let issuer_cert: u32 = StorageIdtyCertMeta::<T>::get(issuer).issued_count; }: _<T::RuntimeOrigin>(RawOrigin::Root.into(), issuer, receiver) verify { assert_has_event::<T>(Event::<T>::CertRemoved{ issuer, receiver, expiration: false }.into()); } + remove_all_certs_received_by { let receiver: T::IdtyIndex = 0.into(); let i in 2..1000 => add_certs::<T>(i, receiver)?; @@ -79,14 +98,18 @@ benchmarks! { verify { assert!(CertsByReceiver::<T>::get(receiver).is_empty() ); } + on_initialize { assert!(CertsRemovableOn::<T>::try_get(T::BlockNumber::zero()).is_err()); }: {Pallet::<T>::on_initialize(T::BlockNumber::zero());} + do_remove_cert_noop { }: {Pallet::<T>::do_remove_cert(100.into(), 101.into(), Some(T::BlockNumber::zero()));} + do_remove_cert { let issuer: T::IdtyIndex = 1.into(); let receiver: T::IdtyIndex = 0.into(); + Pallet::<T>::do_remove_cert(issuer, receiver, None); Pallet::<T>::do_add_cert_checked(issuer, receiver, false)?; let issuer_cert: u32 = StorageIdtyCertMeta::<T>::get(issuer).issued_count; let receiver_cert: u32 = StorageIdtyCertMeta::<T>::get(receiver).received_count; diff --git a/pallets/certification/src/lib.rs b/pallets/certification/src/lib.rs index f3cc3c0c4..6da865932 100644 --- a/pallets/certification/src/lib.rs +++ b/pallets/certification/src/lib.rs @@ -35,6 +35,7 @@ pub use weights::WeightInfo; use crate::traits::*; use codec::Codec; +use duniter_primitives::Idty; use frame_support::pallet_prelude::*; use frame_support::traits::StorageVersion; use sp_runtime::traits::AtLeast32BitUnsigned; @@ -44,7 +45,7 @@ use sp_std::{fmt::Debug, vec::Vec}; pub mod pallet { use super::*; use frame_system::pallet_prelude::*; - use sp_runtime::traits::{Convert, Saturating}; + use sp_runtime::traits::Saturating; use sp_std::collections::btree_map::BTreeMap; /// The current storage version. @@ -70,8 +71,8 @@ pub mod pallet { + MaybeSerializeDeserialize + Debug + MaxEncodedLen; - /// Something that give the owner key of an identity. - type OwnerKeyOf: Convert<Self::IdtyIndex, Option<Self::AccountId>>; + /// Something that gives the IdtyId of an AccountId and reverse + type IdtyAttr: duniter_primitives::Idty<Self::IdtyIndex, Self::AccountId>; /// Provide method to check that cert is allowed. type CheckCertAllowed: CheckCertAllowed<Self::IdtyIndex>; #[pallet::constant] @@ -244,16 +245,20 @@ pub mod pallet { #[pallet::error] pub enum Error<T> { + /// Issuer of a certification must have an identity + OriginMustHaveAnIdentity, /// Identity cannot certify itself. CannotCertifySelf, /// Identity has already issued the maximum number of certifications. IssuedTooManyCert, - /// Issuer not found. - IssuerNotFound, /// Insufficient certifications received. NotEnoughCertReceived, /// Identity has issued a certification too recently. NotRespectCertPeriod, + /// Can not add an already-existing cert + CertAlreadyExists, + /// Can not renew a non-existing cert + CertDoesNotExist, } #[pallet::hooks] @@ -267,29 +272,31 @@ pub mod pallet { #[pallet::call] impl<T: Config> Pallet<T> { - /// Add a new certification or renew an existing one - /// - /// - `receiver`: the account receiving the certification from the origin - /// - /// The origin must be allow to certify. + /// Add a new certification. #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::add_cert())] pub fn add_cert( origin: OriginFor<T>, - issuer: T::IdtyIndex, receiver: T::IdtyIndex, ) -> DispatchResultWithPostInfo { - let who = ensure_signed(origin)?; - - // Verify caller ownership - let issuer_owner_key = - T::OwnerKeyOf::convert(issuer).ok_or(Error::<T>::IssuerNotFound)?; - ensure!(issuer_owner_key == who, DispatchError::BadOrigin); - + let issuer = Self::origin_to_index(origin)?; let block_number = frame_system::pallet::Pallet::<T>::block_number(); Self::check_add_cert(issuer, receiver, block_number)?; - Self::do_add_cert(block_number, issuer, receiver); + Self::try_add_cert(block_number, issuer, receiver)?; + Ok(().into()) + } + /// Renew an existing certification. + #[pallet::call_index(3)] + #[pallet::weight(T::WeightInfo::renew_cert())] + pub fn renew_cert( + origin: OriginFor<T>, + receiver: T::IdtyIndex, + ) -> DispatchResultWithPostInfo { + let issuer = Self::origin_to_index(origin)?; + let block_number = frame_system::pallet::Pallet::<T>::block_number(); + Self::check_renew_cert(issuer, receiver, block_number)?; + Self::try_renew_cert(block_number, issuer, receiver)?; Ok(().into()) } @@ -324,7 +331,14 @@ pub mod pallet { // INTERNAL FUNCTIONS // impl<T: Config> Pallet<T> { + /// get issuer index from origin + pub fn origin_to_index(origin: OriginFor<T>) -> Result<T::IdtyIndex, DispatchError> { + let who = ensure_signed(origin)?; + T::IdtyAttr::idty_index(who).ok_or(Error::<T>::OriginMustHaveAnIdentity.into()) + } + /// add a certification without checks + // this is used on identity creation to add the first certification pub fn do_add_cert_checked( issuer: T::IdtyIndex, receiver: T::IdtyIndex, @@ -337,69 +351,93 @@ pub mod pallet { Self::check_add_cert_internal(issuer, receiver, block_number)?; }; - Self::do_add_cert(block_number, issuer, receiver); + Self::try_add_cert(block_number, issuer, receiver)?; Ok(().into()) } - /// perform cert addition or renewal - fn do_add_cert(block_number: T::BlockNumber, issuer: T::IdtyIndex, receiver: T::IdtyIndex) { + /// perform cert addition if not existing, else CertAlreadyExists + // must be transactional + fn try_add_cert( + block_number: T::BlockNumber, + issuer: T::IdtyIndex, + receiver: T::IdtyIndex, + ) -> DispatchResultWithPostInfo { // Write CertsRemovableOn let removable_on = block_number + T::ValidityPeriod::get(); <CertsRemovableOn<T>>::append(removable_on, (issuer, receiver)); // Write CertsByReceiver - let mut created = false; CertsByReceiver::<T>::mutate_exists(receiver, |maybe_issuers| { let issuers = maybe_issuers.get_or_insert(Vec::with_capacity(0)); - match issuers.binary_search_by(|(issuer_, _)| issuer_.cmp(&issuer)) { - // cert exists, must be renewed - Ok(index) => { - issuers[index] = (issuer, removable_on); - } - // cert does not exist, must be created - Err(index) => { - issuers.insert(index, (issuer, removable_on)); - created = true; - } + // cert does not exist, must be created + if let Err(index) = issuers.binary_search_by(|(issuer_, _)| issuer_.cmp(&issuer)) { + issuers.insert(index, (issuer, removable_on)); + Ok(()) + } else { + // cert exists, must be renewed instead + Err(Error::<T>::CertAlreadyExists) } - }); + })?; - if created { - // Write StorageIdtyCertMeta for issuer - let issuer_issued_count = - StorageIdtyCertMeta::<T>::mutate(issuer, |issuer_idty_cert_meta| { - issuer_idty_cert_meta.issued_count = - issuer_idty_cert_meta.issued_count.saturating_add(1); - issuer_idty_cert_meta.next_issuable_on = - block_number + T::CertPeriod::get(); - issuer_idty_cert_meta.issued_count - }); - - // Write StorageIdtyCertMeta for receiver - let receiver_received_count = - <StorageIdtyCertMeta<T>>::mutate_exists(receiver, |cert_meta_opt| { - let cert_meta = cert_meta_opt.get_or_insert(IdtyCertMeta::default()); - cert_meta.received_count = cert_meta.received_count.saturating_add(1); - cert_meta.received_count - }); - - // emit CertAdded event - Self::deposit_event(Event::CertAdded { issuer, receiver }); - T::OnNewcert::on_new_cert( - issuer, - issuer_issued_count, - receiver, - receiver_received_count, - ); - } else { - // Update next_issuable_on in StorageIdtyCertMeta for issuer + // Write StorageIdtyCertMeta for issuer + let issuer_issued_count = StorageIdtyCertMeta::<T>::mutate(issuer, |issuer_idty_cert_meta| { + issuer_idty_cert_meta.issued_count = + issuer_idty_cert_meta.issued_count.saturating_add(1); issuer_idty_cert_meta.next_issuable_on = block_number + T::CertPeriod::get(); + issuer_idty_cert_meta.issued_count }); - // emit CertRenewed event - Self::deposit_event(Event::CertRenewed { issuer, receiver }); - }; + + // Write StorageIdtyCertMeta for receiver + let receiver_received_count = + <StorageIdtyCertMeta<T>>::mutate_exists(receiver, |cert_meta_opt| { + let cert_meta = cert_meta_opt.get_or_insert(IdtyCertMeta::default()); + cert_meta.received_count = cert_meta.received_count.saturating_add(1); + cert_meta.received_count + }); + + // emit CertAdded event + Self::deposit_event(Event::CertAdded { issuer, receiver }); + T::OnNewcert::on_new_cert( + issuer, + issuer_issued_count, + receiver, + receiver_received_count, + ); + Ok(().into()) + } + + /// perform cert renewal if exisiting, else error with CertDoesNotExist + // must be used in transactional context + // (it can fail if certification does not exist after having modified state) + fn try_renew_cert( + block_number: T::BlockNumber, + issuer: T::IdtyIndex, + receiver: T::IdtyIndex, + ) -> DispatchResultWithPostInfo { + // Write CertsRemovableOn + let removable_on = block_number + T::ValidityPeriod::get(); + <CertsRemovableOn<T>>::append(removable_on, (issuer, receiver)); + // Write CertsByReceiver + CertsByReceiver::<T>::mutate_exists(receiver, |maybe_issuers| { + let issuers = maybe_issuers.get_or_insert(Vec::with_capacity(0)); + // cert exists, can be renewed + if let Ok(index) = issuers.binary_search_by(|(issuer_, _)| issuer_.cmp(&issuer)) { + issuers[index] = (issuer, removable_on); + Ok(()) + } else { + // cert does not exist, must be created + Err(Error::<T>::CertDoesNotExist) + } + })?; + // Update next_issuable_on in StorageIdtyCertMeta for issuer + StorageIdtyCertMeta::<T>::mutate(issuer, |issuer_idty_cert_meta| { + issuer_idty_cert_meta.next_issuable_on = block_number + T::CertPeriod::get(); + }); + // emit CertRenewed event + Self::deposit_event(Event::CertRenewed { issuer, receiver }); + Ok(().into()) } /// remove the certifications due to expire on the given block @@ -419,6 +457,7 @@ pub mod pallet { /// perform the certification removal /// if block number is given only remove cert if still set to expire at this block number + // this is used because cert expiry unscheduling is not done (#110) pub fn do_remove_cert( issuer: T::IdtyIndex, receiver: T::IdtyIndex, @@ -535,6 +574,17 @@ pub mod pallet { Ok(()) } + + /// check renew cert allowed + fn check_renew_cert( + issuer: T::IdtyIndex, + receiver: T::IdtyIndex, + block_number: T::BlockNumber, + ) -> DispatchResult { + Self::check_add_cert_internal(issuer, receiver, block_number)?; + T::CheckCertAllowed::check_cert_allowed(issuer, receiver)?; + Ok(()) + } } } diff --git a/pallets/certification/src/mock.rs b/pallets/certification/src/mock.rs index 6d730c280..514b25e9f 100644 --- a/pallets/certification/src/mock.rs +++ b/pallets/certification/src/mock.rs @@ -87,7 +87,7 @@ parameter_types! { impl pallet_certification::Config for Test { type CertPeriod = CertPeriod; type IdtyIndex = IdtyIndex; - type OwnerKeyOf = sp_runtime::traits::ConvertInto; + type IdtyAttr = (); type CheckCertAllowed = (); type MaxByIssuer = MaxByIssuer; type MinReceivedCertToBeAbleToIssueCert = MinReceivedCertToBeAbleToIssueCert; diff --git a/pallets/certification/src/tests.rs b/pallets/certification/src/tests.rs index c1abd06b9..0bde9557b 100644 --- a/pallets/certification/src/tests.rs +++ b/pallets/certification/src/tests.rs @@ -28,7 +28,7 @@ fn test_must_receive_cert_before_can_issue() { }) .execute_with(|| { assert_eq!( - DefaultCertification::add_cert(RuntimeOrigin::signed(0), 0, 1), + DefaultCertification::add_cert(RuntimeOrigin::signed(0), 1), Err(Error::<Test>::NotEnoughCertReceived.into()) ); }); @@ -49,7 +49,7 @@ fn test_cannot_certify_self() { run_to_block(2); assert_eq!( - DefaultCertification::add_cert(RuntimeOrigin::signed(0), 0, 0), + DefaultCertification::add_cert(RuntimeOrigin::signed(0), 0), Err(Error::<Test>::CannotCertifySelf.into()) ); }); @@ -151,26 +151,18 @@ fn test_cert_period() { } ); assert_eq!( - DefaultCertification::add_cert(RuntimeOrigin::signed(0), 0, 3), + DefaultCertification::add_cert(RuntimeOrigin::signed(0), 3), Err(Error::<Test>::NotRespectCertPeriod.into()) ); run_to_block(CertPeriod::get()); - assert_ok!(DefaultCertification::add_cert( - RuntimeOrigin::signed(0), - 0, - 3 - )); + assert_ok!(DefaultCertification::add_cert(RuntimeOrigin::signed(0), 3)); run_to_block(CertPeriod::get() + 1); assert_eq!( - DefaultCertification::add_cert(RuntimeOrigin::signed(0), 0, 4), + DefaultCertification::add_cert(RuntimeOrigin::signed(0), 4), Err(Error::<Test>::NotRespectCertPeriod.into()) ); run_to_block((2 * CertPeriod::get()) + 1); - assert_ok!(DefaultCertification::add_cert( - RuntimeOrigin::signed(0), - 0, - 4 - )); + assert_ok!(DefaultCertification::add_cert(RuntimeOrigin::signed(0), 4)); }); } @@ -236,7 +228,7 @@ fn test_cert_renewal() { // renew certification from bob to alice // this certification should expire 10 blocks later (at block 12) assert_eq!( - DefaultCertification::add_cert(RuntimeOrigin::signed(1), 1, 0), + DefaultCertification::renew_cert(RuntimeOrigin::signed(1), 0), Ok(().into()) ); System::assert_last_event(RuntimeEvent::DefaultCertification(Event::CertRenewed { @@ -278,7 +270,7 @@ fn test_cert_renewal_cert_delay() { run_to_block(2); // renew certification from bob to alice assert_eq!( - DefaultCertification::add_cert(RuntimeOrigin::signed(1), 1, 0), + DefaultCertification::renew_cert(RuntimeOrigin::signed(1), 0), Ok(().into()) ); System::assert_last_event(RuntimeEvent::DefaultCertification(Event::CertRenewed { @@ -289,7 +281,7 @@ fn test_cert_renewal_cert_delay() { run_to_block(3); // try to renew again assert_noop!( - DefaultCertification::add_cert(RuntimeOrigin::signed(1), 1, 0), + DefaultCertification::add_cert(RuntimeOrigin::signed(1), 0), Error::<Test>::NotRespectCertPeriod, ); // no renewal event should be emitted @@ -322,7 +314,7 @@ fn test_cert_renewal_expiration() { // renew certification from bob to alice // this certification should expire 10 blocks later (at block 12) assert_eq!( - DefaultCertification::add_cert(RuntimeOrigin::signed(1), 1, 0), + DefaultCertification::renew_cert(RuntimeOrigin::signed(1), 0), Ok(().into()) ); System::assert_last_event(RuntimeEvent::DefaultCertification(Event::CertRenewed { @@ -334,7 +326,7 @@ fn test_cert_renewal_expiration() { // renew certification from bob to alice again // this certification should expire 10 blocks later (at block 14) assert_eq!( - DefaultCertification::add_cert(RuntimeOrigin::signed(1), 1, 0), + DefaultCertification::renew_cert(RuntimeOrigin::signed(1), 0), Ok(().into()) ); System::assert_last_event(RuntimeEvent::DefaultCertification(Event::CertRenewed { diff --git a/pallets/certification/src/weights.rs b/pallets/certification/src/weights.rs index 1f5918b2a..08ba7b444 100644 --- a/pallets/certification/src/weights.rs +++ b/pallets/certification/src/weights.rs @@ -21,6 +21,7 @@ use frame_support::weights::{constants::RocksDbWeight, Weight}; /// Weight functions needed for pallet_universal_dividend. pub trait WeightInfo { fn add_cert() -> Weight; + fn renew_cert() -> Weight; fn del_cert() -> Weight; fn remove_all_certs_received_by(i: u32) -> Weight; fn on_initialize() -> Weight; @@ -41,6 +42,17 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + // Storage: Identity Identities (r:2 w:0) + // Storage: Cert StorageIdtyCertMeta (r:2 w:2) + // Storage: Parameters ParametersStorage (r:1 w:0) + // Storage: Cert CertsRemovableOn (r:1 w:1) + // Storage: Cert CertsByReceiver (r:1 w:1) + fn renew_cert() -> Weight { + // Minimum execution time: 259_247 nanoseconds. + Weight::from_parts(269_348_000 as u64, 0) + .saturating_add(RocksDbWeight::get().reads(7 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } // Storage: Cert CertsByReceiver (r:1 w:1) // Storage: Cert StorageIdtyCertMeta (r:2 w:2) // Storage: Parameters ParametersStorage (r:1 w:0) diff --git a/pallets/duniter-account/src/lib.rs b/pallets/duniter-account/src/lib.rs index 7184febf0..21b72affa 100644 --- a/pallets/duniter-account/src/lib.rs +++ b/pallets/duniter-account/src/lib.rs @@ -218,16 +218,7 @@ pub mod pallet { } /// link account to identity - pub fn do_link_identity( - account_id: &T::AccountId, - idty_id: IdtyIdOf<T>, - ) -> Result<(), DispatchError> { - // Check that account exist - ensure!( - (frame_system::Account::<T>::get(account_id).providers >= 1) - || (frame_system::Account::<T>::get(account_id).sufficients >= 1), - pallet_identity::Error::<T>::AccountNotExist - ); + pub fn do_link_identity(account_id: &T::AccountId, idty_id: IdtyIdOf<T>) { // no-op if identity does not change if frame_system::Account::<T>::get(account_id).data.linked_idty != Some(idty_id) { frame_system::Account::<T>::mutate(account_id, |account| { @@ -237,8 +228,7 @@ pub mod pallet { identity: idty_id, }); }) - } - Ok(()) + }; } } @@ -332,7 +322,14 @@ where T: Config, { fn link_identity(account_id: &T::AccountId, idty_id: IdtyIdOf<T>) -> Result<(), DispatchError> { - Self::do_link_identity(account_id, idty_id) + // Check that account exist + ensure!( + (frame_system::Account::<T>::get(account_id).providers >= 1) + || (frame_system::Account::<T>::get(account_id).sufficients >= 1), + pallet_identity::Error::<T>::AccountNotExist + ); + Self::do_link_identity(account_id, idty_id); + Ok(()) } } diff --git a/pallets/duniter-wot/src/mock.rs b/pallets/duniter-wot/src/mock.rs index 3ecb6c233..7d2c1f27e 100644 --- a/pallets/duniter-wot/src/mock.rs +++ b/pallets/duniter-wot/src/mock.rs @@ -166,7 +166,7 @@ parameter_types! { impl pallet_certification::Config for Test { type CertPeriod = CertPeriod; type IdtyIndex = IdtyIndex; - type OwnerKeyOf = Identity; + type IdtyAttr = Identity; type CheckCertAllowed = DuniterWot; type MaxByIssuer = MaxByIssuer; type MinReceivedCertToBeAbleToIssueCert = MinReceivedCertToBeAbleToIssueCert; diff --git a/pallets/duniter-wot/src/tests.rs b/pallets/duniter-wot/src/tests.rs index f1718d140..515827526 100644 --- a/pallets/duniter-wot/src/tests.rs +++ b/pallets/duniter-wot/src/tests.rs @@ -115,7 +115,7 @@ fn test_new_idty_validation() { // Bob should be able to certify Ferdie run_to_block(4); - assert_ok!(Cert::add_cert(RuntimeOrigin::signed(2), 2, 6)); + assert_ok!(Cert::add_cert(RuntimeOrigin::signed(2), 6)); System::assert_has_event(RuntimeEvent::Cert(pallet_certification::Event::CertAdded { issuer: 2, receiver: 6, @@ -248,8 +248,8 @@ fn test_idty_membership_expire() { run_to_block(5); // renew certifications so that Alice can still issue cert at block 22 - assert_ok!(Cert::add_cert(RuntimeOrigin::signed(2), 2, 1)); - assert_ok!(Cert::add_cert(RuntimeOrigin::signed(3), 3, 1)); + assert_ok!(Cert::renew_cert(RuntimeOrigin::signed(2), 1)); + assert_ok!(Cert::renew_cert(RuntimeOrigin::signed(3), 1)); // Charlie's membership should expire at block #8 run_to_block(8); @@ -297,7 +297,7 @@ fn test_idty_membership_expire() { ); // Alice can't certify revoked identity assert_noop!( - Cert::add_cert(RuntimeOrigin::signed(1), 1, 3), + Cert::add_cert(RuntimeOrigin::signed(1), 3), pallet_duniter_wot::Error::<Test>::TargetStatusInvalid ); @@ -310,7 +310,7 @@ fn test_idty_membership_expire() { )); // Alice can't certify removed identity assert_noop!( - Cert::add_cert(RuntimeOrigin::signed(1), 1, 3), + Cert::add_cert(RuntimeOrigin::signed(1), 3), pallet_duniter_wot::Error::<Test>::IdtyNotFound ); }); @@ -347,13 +347,13 @@ fn test_certification_expire() { // cert Bob → Alice not renewed // --- BLOCK 2 --- run_to_block(2); - assert_ok!(Cert::add_cert(RuntimeOrigin::signed(1), 1, 2)); - assert_ok!(Cert::add_cert(RuntimeOrigin::signed(2), 2, 3)); - assert_ok!(Cert::add_cert(RuntimeOrigin::signed(3), 3, 1)); + assert_ok!(Cert::renew_cert(RuntimeOrigin::signed(1), 2)); + assert_ok!(Cert::renew_cert(RuntimeOrigin::signed(2), 3)); + assert_ok!(Cert::renew_cert(RuntimeOrigin::signed(3), 1)); // --- BLOCK 4 --- run_to_block(4); - assert_ok!(Cert::add_cert(RuntimeOrigin::signed(1), 1, 3)); - assert_ok!(Cert::add_cert(RuntimeOrigin::signed(3), 3, 2)); + assert_ok!(Cert::renew_cert(RuntimeOrigin::signed(1), 3)); + assert_ok!(Cert::renew_cert(RuntimeOrigin::signed(3), 2)); // --- BLOCK 7 --- run_to_block(7); assert_ok!(Membership::try_renew_membership(1)); @@ -425,16 +425,16 @@ fn test_cert_can_not_be_issued() { // cert Bob → Alice not renewed // --- BLOCK 2 --- run_to_block(2); - assert_ok!(Cert::add_cert(RuntimeOrigin::signed(1), 1, 2)); // +20 - assert_ok!(Cert::add_cert(RuntimeOrigin::signed(2), 2, 3)); // +20 - assert_ok!(Cert::add_cert(RuntimeOrigin::signed(3), 3, 4)); // +20 - assert_ok!(Cert::add_cert(RuntimeOrigin::signed(4), 4, 1)); // +20 - // --- BLOCK 4 --- + assert_ok!(Cert::renew_cert(RuntimeOrigin::signed(1), 2)); // +20 + assert_ok!(Cert::renew_cert(RuntimeOrigin::signed(2), 3)); // +20 + assert_ok!(Cert::renew_cert(RuntimeOrigin::signed(3), 4)); // +20 + assert_ok!(Cert::renew_cert(RuntimeOrigin::signed(4), 1)); // +20 + // --- BLOCK 4 --- run_to_block(4); - assert_ok!(Cert::add_cert(RuntimeOrigin::signed(2), 2, 4)); // +20 - assert_ok!(Cert::add_cert(RuntimeOrigin::signed(3), 3, 2)); // +20 - assert_ok!(Cert::add_cert(RuntimeOrigin::signed(4), 4, 3)); // +20 - // --- BLOCK 7 --- + assert_ok!(Cert::renew_cert(RuntimeOrigin::signed(2), 4)); // +20 + assert_ok!(Cert::renew_cert(RuntimeOrigin::signed(3), 2)); // +20 + assert_ok!(Cert::renew_cert(RuntimeOrigin::signed(4), 3)); // +20 + // --- BLOCK 7 --- run_to_block(7); assert_ok!(Membership::try_renew_membership(1)); // + 8 assert_ok!(Membership::try_renew_membership(2)); // + 8 @@ -468,10 +468,11 @@ fn test_cert_can_not_be_issued() { run_to_block(21); // println!("{:?}", System::events()); // Charlie certifies Alice so she again has enough certs - assert_ok!(Cert::add_cert(RuntimeOrigin::signed(3), 3, 1)); - assert_ok!(Cert::add_cert(RuntimeOrigin::signed(4), 4, 1)); // renew - // Alice did not claim membership, she is not member - // but her cert delay has been reset (→ 23) + assert_ok!(Cert::add_cert(RuntimeOrigin::signed(3), 1)); + assert_ok!(Cert::renew_cert(RuntimeOrigin::signed(4), 1)); + // renew + // Alice did not claim membership, she is not member + // but her cert delay has been reset (→ 23) assert_eq!(Membership::membership(1), None); // run_to_block(23); diff --git a/pallets/identity/Cargo.toml b/pallets/identity/Cargo.toml index a34f6f5c8..156fa8e8a 100644 --- a/pallets/identity/Cargo.toml +++ b/pallets/identity/Cargo.toml @@ -28,6 +28,7 @@ try-runtime = ['frame-support/try-runtime'] targets = ['x86_64-unknown-linux-gnu'] [dependencies] +duniter-primitives = { path = "../../primitives/duniter", default-features = false } # crates.io codec = { package = 'parity-scale-codec', version = "3.1.5", features = ['derive'], default-features = false } diff --git a/pallets/identity/src/lib.rs b/pallets/identity/src/lib.rs index dbe7167c5..2063481cd 100644 --- a/pallets/identity/src/lib.rs +++ b/pallets/identity/src/lib.rs @@ -480,12 +480,12 @@ pub mod pallet { let idty_value = Identities::<T>::get(idty_index).ok_or(Error::<T>::IdtyNotFound)?; match idty_value.status { - IdtyStatus::Unconfirmed => return Err(Error::<T>::CanNotRevokeUnconfirmed.into()), - IdtyStatus::Unvalidated => return Err(Error::<T>::CanNotRevokeUnvalidated.into()), - IdtyStatus::Member => (), - IdtyStatus::NotMember => (), - IdtyStatus::Revoked => return Err(Error::<T>::AlreadyRevoked.into()), - }; + IdtyStatus::Unconfirmed => Err(Error::<T>::CanNotRevokeUnconfirmed), + IdtyStatus::Unvalidated => Err(Error::<T>::CanNotRevokeUnvalidated), + IdtyStatus::Member => Ok(()), + IdtyStatus::NotMember => Ok(()), + IdtyStatus::Revoked => Err(Error::<T>::AlreadyRevoked), + }?; ensure!( if let Some((ref old_owner_key, last_change)) = idty_value.old_owner_key { @@ -595,16 +595,12 @@ pub mod pallet { IdtyAlreadyConfirmed, /// Identity already created. IdtyAlreadyCreated, - /// Identity already validated. - IdtyAlreadyValidated, /// Identity index not found. IdtyIndexNotFound, /// Identity name already exists. IdtyNameAlreadyExist, /// Invalid identity name. IdtyNameInvalid, - /// Identity not confirmed by its owner. - IdtyNotConfirmed, /// Identity not found. IdtyNotFound, /// Invalid payload signature. @@ -647,9 +643,12 @@ pub mod pallet { if let Some(mut idty_value) = Identities::<T>::get(idty_index) { Self::unschedule_identity_change(idty_index, idty_value.next_scheduled); idty_value.next_scheduled = T::BlockNumber::zero(); + if idty_value.status == IdtyStatus::Unvalidated { + // only submit event first time, after that, only membership events are relevant + Self::deposit_event(Event::IdtyValidated { idty_index }); + }; idty_value.status = IdtyStatus::Member; <Identities<T>>::insert(idty_index, idty_value); - Self::deposit_event(Event::IdtyValidated { idty_index }); } // else should not happen } @@ -852,6 +851,15 @@ impl<T: Config> sp_runtime::traits::Convert<T::IdtyIndex, Option<T::AccountId>> Identities::<T>::get(idty_index).map(|idty_val| idty_val.owner_key) } } +// implement Idty trait +impl<T: Config> duniter_primitives::Idty<T::IdtyIndex, T::AccountId> for Pallet<T> { + fn idty_index(owner_key: T::AccountId) -> Option<T::IdtyIndex> { + IdentityIndexOf::<T>::get(owner_key) + } + fn owner_key(idty_index: T::IdtyIndex) -> Option<T::AccountId> { + Identities::<T>::get(idty_index).map(|idty_val| idty_val.owner_key) + } +} // implement StoredMap trait for this pallet impl<T> frame_support::traits::StoredMap<T::AccountId, T::IdtyData> for Pallet<T> diff --git a/pallets/membership/src/lib.rs b/pallets/membership/src/lib.rs index c23c07a86..16d30e968 100644 --- a/pallets/membership/src/lib.rs +++ b/pallets/membership/src/lib.rs @@ -175,13 +175,9 @@ pub mod pallet { #[pallet::error] pub enum Error<T> { - /// Identity ID not found. - IdtyIdNotFound, - /// Membership already acquired. - MembershipAlreadyAcquired, - /// Membership not found. + /// Membership not found, can not renew. MembershipNotFound, - /// Already member, can not claim membership. + /// Already member, can not add membership. AlreadyMember, } @@ -245,7 +241,7 @@ pub mod pallet { let membership_data = Membership::<T>::get(idty_id).ok_or(Error::<T>::MembershipNotFound)?; - // enough certifications and distance rule for example + // enough certifications T::CheckMembershipOpAllowed::check_renew_membership(idty_id)?; Ok(membership_data) } diff --git a/pallets/membership/src/weights.rs b/pallets/membership/src/weights.rs index e244e83b7..e8024faf0 100644 --- a/pallets/membership/src/weights.rs +++ b/pallets/membership/src/weights.rs @@ -20,45 +20,12 @@ use frame_support::weights::{constants::RocksDbWeight, Weight}; /// Weight functions needed for pallet_universal_dividend. pub trait WeightInfo { - fn claim_membership() -> Weight; - fn renew_membership() -> Weight; - fn revoke_membership() -> Weight; fn on_initialize() -> Weight; fn expire_memberships(_i: u32) -> Weight; } // Insecure weights implementation, use it for tests only! impl WeightInfo for () { - fn claim_membership() -> Weight { - // Proof Size summary in bytes: - // Measured: `1272` - // Estimated: `4737` - // Minimum execution time: 1_213_348_000 picoseconds. - Weight::from_parts(1_439_442_000, 0) - .saturating_add(Weight::from_parts(0, 4737)) - .saturating_add(RocksDbWeight::get().reads(10)) - .saturating_add(RocksDbWeight::get().writes(4)) - } - fn renew_membership() -> Weight { - // Proof Size summary in bytes: - // Measured: `988` - // Estimated: `6928` - // Minimum execution time: 714_537_000 picoseconds. - Weight::from_parts(862_085_000, 0) - .saturating_add(Weight::from_parts(0, 6928)) - .saturating_add(RocksDbWeight::get().reads(7)) - .saturating_add(RocksDbWeight::get().writes(3)) - } - fn revoke_membership() -> Weight { - // Proof Size summary in bytes: - // Measured: `703` - // Estimated: `6643` - // Minimum execution time: 847_926_000 picoseconds. - Weight::from_parts(1_282_028_000, 0) - .saturating_add(Weight::from_parts(0, 6643)) - .saturating_add(RocksDbWeight::get().reads(8)) - .saturating_add(RocksDbWeight::get().writes(5)) - } fn on_initialize() -> Weight { // Proof Size summary in bytes: // Measured: `0` diff --git a/primitives/duniter/src/lib.rs b/primitives/duniter/src/lib.rs index e077fa5d8..e70509771 100644 --- a/primitives/duniter/src/lib.rs +++ b/primitives/duniter/src/lib.rs @@ -28,6 +28,22 @@ pub fn validate_idty_name(idty_name: &[u8]) -> bool { .all(|c| c.is_ascii_alphanumeric() || *c == b'-' || *c == b'_') } +/// trait used to go from index to owner key and reverse +pub trait Idty<IdtyIndex, AccountId> { + fn owner_key(index: IdtyIndex) -> Option<AccountId>; + fn idty_index(owner_key: AccountId) -> Option<IdtyIndex>; +} + +// mock implementation for any type +impl<T> Idty<T, T> for () { + fn owner_key(t: T) -> Option<T> { + Some(t) + } + fn idty_index(t: T) -> Option<T> { + Some(t) + } +} + #[cfg(test)] mod tests { use super::*; diff --git a/resources/metadata.scale b/resources/metadata.scale index ec4593b3867538d339e681f0f8c0013569459624..c4eca41e6ceadbd432352ebe02627014d155b358 100644 GIT binary patch delta 605 zcmY*X&ubGw7~R)QlP0ycg;FHuFnDOiA0bLX5h^WN#ehmtdQ!4G&CKdTGb_6r+MHTJ z1aE;JzDvPtdlN+BLC^gYdhp`GLk|`I058sLV?$0e^X9$z-uJ#a`dv6WEquxyPtI^5 zrPoq%%Jx1klouW5uS&@U*J_JfI1Iv;NW(~1ug1!NL++Iv+kIvsE;Lu$VUmXW)u`t4 z&*R#AxHQ{@oO2s8?KZSj+fSqPVbsym8Kdt_+(M52G*JU1?%~pO&GODE<FxBx5qUcB za2o~s;o%x4DDPt(MSAJuF-mmk;~pmImybKRKox<zn4)!o>$pg71sa&POO5^t%wncL zwSf|LCLTRe?F|(tufsRz<s8-<qFhHQ53JK0yk(lS$1H^E(&}ccgzTPi9kBfYz}wlI zL%xZ3fY~}#_64P4u~_dU{nHl8K!r}0Q7M0GBuPibJPJ(qBe~Pceaz3fb)il9dNz^n zbF~>bpvwwN7^5|1BL1rIVaK)i11AscL=tD5^^7#LZmpQDIJ16pWMnH==|(CsNn}bV b&))qPW<A?K5$RFYu$we$^B4WK09(C(1rW$U delta 731 zcmY*X&ubGw7~QYg8f~k#(iXgZ=t1zul9qt6r-m%j#rgxRB7(_Ic4nJ_>`a_Y+U}_r z@t~JL4g;S30|XDbNcEPhxBLfs(f`5S%_ga*f%m@m-uFIc^rtxbTl`WOFRmb=bkHAH zPObGHRZ5YdV8<9RrFqB$qPY|(6)Kj(L?AoiUCqTIO2MoRxQD)C0pmwZ`8%jv3`r2k zp3sRRh11Ct{ogQDGRk17_#qco|DZM4{<*n~TIQ4S*N@}Ud)PPM-T>Wu=20D2+lmny zza(u=iDuMVu-hJGLUSD>nUHuiWgR!wc!IK%CsIF5R-#tHl<Tkswh8M{B8&DbPh|7R zr#6B_%-KzqiKr$;$W@diU9kJJBq22hQwEzca@|FFESPdixp0zJG-q|V1sBb)I&8xw zbG-q#Vad1+cmd1iQv>#4#r$r-4qP@je7Fx+%xfPiaMcWaxC5)^yAK|$rBBH`Ag~74 zhK~p=!Rcxx>qckAtfb1cg6CqoVwg5|=wlW&nd-K9CqG{`c-!MD=>&FXPR{N}a@yIO zle3rw`yfSkCx+)@%DMSOV-@VrIe<}?e;0$~>tvT}6CMrEnoxp`b+<-D0@kw67C&e0 o(6Y=^3S|KEj)Hr$;&r<{rp_(kPLO%F8BzFP6oJlgD}>GdKgu`zDF6Tf diff --git a/runtime/common/src/pallets_config.rs b/runtime/common/src/pallets_config.rs index 481df2b27..7e6c19e2c 100644 --- a/runtime/common/src/pallets_config.rs +++ b/runtime/common/src/pallets_config.rs @@ -497,7 +497,7 @@ macro_rules! pallets_config { impl pallet_certification::Config for Runtime { type CertPeriod = CertPeriod; type IdtyIndex = IdtyIndex; - type OwnerKeyOf = Identity; + type IdtyAttr = Identity; type CheckCertAllowed = Wot; type MaxByIssuer = MaxByIssuer; type MinReceivedCertToBeAbleToIssueCert = MinReceivedCertToBeAbleToIssueCert; diff --git a/runtime/common/src/weights/frame_benchmarking_baseline.rs b/runtime/common/src/weights/frame_benchmarking_baseline.rs index 963c97ee3..16f7bbd00 100644 --- a/runtime/common/src/weights/frame_benchmarking_baseline.rs +++ b/runtime/common/src/weights/frame_benchmarking_baseline.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `frame_benchmarking::baseline` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -53,8 +53,8 @@ impl<T: frame_system::Config> frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 117_000 picoseconds. - Weight::from_parts(150_959, 0) + // Minimum execution time: 346_000 picoseconds. + Weight::from_parts(459_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -62,8 +62,8 @@ impl<T: frame_system::Config> frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 117_000 picoseconds. - Weight::from_parts(148_790, 0) + // Minimum execution time: 664_000 picoseconds. + Weight::from_parts(855_500, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -71,8 +71,8 @@ impl<T: frame_system::Config> frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 119_000 picoseconds. - Weight::from_parts(152_613, 0) + // Minimum execution time: 656_000 picoseconds. + Weight::from_parts(808_500, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -80,16 +80,16 @@ impl<T: frame_system::Config> frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 118_000 picoseconds. - Weight::from_parts(152_186, 0) + // Minimum execution time: 392_000 picoseconds. + Weight::from_parts(772_500, 0) .saturating_add(Weight::from_parts(0, 0)) } fn hashing() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 20_552_684_000 picoseconds. - Weight::from_parts(20_609_799_000, 0) + // Minimum execution time: 26_700_103_000 picoseconds. + Weight::from_parts(30_137_103_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 100]`. @@ -97,10 +97,10 @@ impl<T: frame_system::Config> frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 125_000 picoseconds. - Weight::from_parts(13_894_679, 0) + // Minimum execution time: 397_000 picoseconds. + Weight::from_parts(458_500, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 80_824 - .saturating_add(Weight::from_parts(37_048_624, 0).saturating_mul(i.into())) + // Standard Error: 76_937 + .saturating_add(Weight::from_parts(51_487_440, 0).saturating_mul(i.into())) } } diff --git a/runtime/common/src/weights/frame_system.rs b/runtime/common/src/weights/frame_system.rs index 293af4ef6..d445a4911 100644 --- a/runtime/common/src/weights/frame_system.rs +++ b/runtime/common/src/weights/frame_system.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -53,22 +53,22 @@ impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_559_000 picoseconds. - Weight::from_parts(1_341_791, 0) + // Minimum execution time: 3_973_000 picoseconds. + Weight::from_parts(4_641_500, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 0 - .saturating_add(Weight::from_parts(254, 0).saturating_mul(b.into())) + // Standard Error: 48 + .saturating_add(Weight::from_parts(462, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_556_000 picoseconds. - Weight::from_parts(5_902_000, 0) + // Minimum execution time: 17_566_000 picoseconds. + Weight::from_parts(18_023_500, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 0 - .saturating_add(Weight::from_parts(1_015, 0).saturating_mul(b.into())) + // Standard Error: 145 + .saturating_add(Weight::from_parts(1_760, 0).saturating_mul(b.into())) } /// Storage: System Digest (r:1 w:1) /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) @@ -78,8 +78,8 @@ impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(3_415_000, 0) + // Minimum execution time: 8_515_000 picoseconds. + Weight::from_parts(10_663_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -91,11 +91,11 @@ impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_572_000 picoseconds. - Weight::from_parts(1_639_000, 0) + // Minimum execution time: 4_293_000 picoseconds. + Weight::from_parts(5_218_500, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 513 - .saturating_add(Weight::from_parts(662_956, 0).saturating_mul(i.into())) + // Standard Error: 61_139 + .saturating_add(Weight::from_parts(1_380_876, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: Skipped Metadata (r:0 w:0) @@ -105,11 +105,11 @@ impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_521_000 picoseconds. - Weight::from_parts(1_640_000, 0) + // Minimum execution time: 4_015_000 picoseconds. + Weight::from_parts(4_990_500, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 536 - .saturating_add(Weight::from_parts(474_634, 0).saturating_mul(i.into())) + // Standard Error: 7_147 + .saturating_add(Weight::from_parts(841_068, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: Skipped Metadata (r:0 w:0) @@ -117,13 +117,13 @@ impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[0, 1000]`. fn kill_prefix(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `77 + p * (69 ±0)` - // Estimated: `76 + p * (70 ±0)` - // Minimum execution time: 2_737_000 picoseconds. - Weight::from_parts(2_998_000, 0) - .saturating_add(Weight::from_parts(0, 76)) - // Standard Error: 769 - .saturating_add(Weight::from_parts(888_196, 0).saturating_mul(p.into())) + // Measured: `39 + p * (69 ±0)` + // Estimated: `39 + p * (70 ±0)` + // Minimum execution time: 6_924_000 picoseconds. + Weight::from_parts(8_369_000, 0) + .saturating_add(Weight::from_parts(0, 39)) + // Standard Error: 16_662 + .saturating_add(Weight::from_parts(1_427_230, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) diff --git a/runtime/common/src/weights/pallet_authority_members.rs b/runtime/common/src/weights/pallet_authority_members.rs index 44f60de82..505b818d8 100644 --- a/runtime/common/src/weights/pallet_authority_members.rs +++ b/runtime/common/src/weights/pallet_authority_members.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_authority_members` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -64,8 +64,8 @@ impl<T: frame_system::Config> pallet_authority_members::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `717` // Estimated: `4182` - // Minimum execution time: 21_181_000 picoseconds. - Weight::from_parts(21_855_000, 0) + // Minimum execution time: 45_399_000 picoseconds. + Weight::from_parts(49_182_000, 0) .saturating_add(Weight::from_parts(0, 4182)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(1)) @@ -88,11 +88,11 @@ impl<T: frame_system::Config> pallet_authority_members::WeightInfo for WeightInf /// Proof Skipped: AuthorityMembers OnlineAuthorities (max_values: Some(1), max_size: None, mode: Measured) fn go_online() -> Weight { // Proof Size summary in bytes: - // Measured: `1107` - // Estimated: `4572` - // Minimum execution time: 28_682_000 picoseconds. - Weight::from_parts(29_510_000, 0) - .saturating_add(Weight::from_parts(0, 4572)) + // Measured: `1108` + // Estimated: `4573` + // Minimum execution time: 59_314_000 picoseconds. + Weight::from_parts(76_647_000, 0) + .saturating_add(Weight::from_parts(0, 4573)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -110,11 +110,11 @@ impl<T: frame_system::Config> pallet_authority_members::WeightInfo for WeightInf /// Proof Skipped: AuthorityMembers Members (max_values: None, max_size: None, mode: Measured) fn set_session_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `1511` - // Estimated: `12401` - // Minimum execution time: 32_698_000 picoseconds. - Weight::from_parts(33_404_000, 0) - .saturating_add(Weight::from_parts(0, 12401)) + // Measured: `1512` + // Estimated: `12402` + // Minimum execution time: 67_522_000 picoseconds. + Weight::from_parts(102_647_000, 0) + .saturating_add(Weight::from_parts(0, 12402)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -134,11 +134,11 @@ impl<T: frame_system::Config> pallet_authority_members::WeightInfo for WeightInf /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn remove_member() -> Weight { // Proof Size summary in bytes: - // Measured: `749` - // Estimated: `4214` - // Minimum execution time: 37_871_000 picoseconds. - Weight::from_parts(39_629_000, 0) - .saturating_add(Weight::from_parts(0, 4214)) + // Measured: `750` + // Estimated: `4215` + // Minimum execution time: 76_516_000 picoseconds. + Weight::from_parts(81_201_000, 0) + .saturating_add(Weight::from_parts(0, 4215)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(10)) } @@ -148,8 +148,8 @@ impl<T: frame_system::Config> pallet_authority_members::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `199` // Estimated: `1684` - // Minimum execution time: 10_337_000 picoseconds. - Weight::from_parts(10_781_000, 0) + // Minimum execution time: 29_964_000 picoseconds. + Weight::from_parts(39_785_000, 0) .saturating_add(Weight::from_parts(0, 1684)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/common/src/weights/pallet_balances.rs b/runtime/common/src/weights/pallet_balances.rs index f204c5c8b..d274a3ebd 100644 --- a/runtime/common/src/weights/pallet_balances.rs +++ b/runtime/common/src/weights/pallet_balances.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -56,8 +56,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3591` - // Minimum execution time: 55_874_000 picoseconds. - Weight::from_parts(57_542_000, 0) + // Minimum execution time: 103_052_000 picoseconds. + Weight::from_parts(104_632_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -70,8 +70,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3591` - // Minimum execution time: 37_453_000 picoseconds. - Weight::from_parts(38_344_000, 0) + // Minimum execution time: 133_263_000 picoseconds. + Weight::from_parts(136_924_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -82,8 +82,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `101` // Estimated: `3591` - // Minimum execution time: 12_364_000 picoseconds. - Weight::from_parts(12_798_000, 0) + // Minimum execution time: 27_197_000 picoseconds. + Weight::from_parts(30_641_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -94,8 +94,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `101` // Estimated: `3591` - // Minimum execution time: 18_009_000 picoseconds. - Weight::from_parts(18_456_000, 0) + // Minimum execution time: 38_585_000 picoseconds. + Weight::from_parts(42_563_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -108,8 +108,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `64` // Estimated: `6192` - // Minimum execution time: 54_616_000 picoseconds. - Weight::from_parts(55_527_000, 0) + // Minimum execution time: 105_518_000 picoseconds. + Weight::from_parts(226_206_000, 0) .saturating_add(Weight::from_parts(0, 6192)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) @@ -122,8 +122,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3591` - // Minimum execution time: 43_969_000 picoseconds. - Weight::from_parts(44_675_000, 0) + // Minimum execution time: 81_086_000 picoseconds. + Weight::from_parts(84_267_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -134,8 +134,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `101` // Estimated: `3591` - // Minimum execution time: 14_381_000 picoseconds. - Weight::from_parts(15_124_000, 0) + // Minimum execution time: 41_380_000 picoseconds. + Weight::from_parts(44_612_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/common/src/weights/pallet_certification.rs b/runtime/common/src/weights/pallet_certification.rs index 4252be460..467920334 100644 --- a/runtime/common/src/weights/pallet_certification.rs +++ b/runtime/common/src/weights/pallet_certification.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_certification` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -48,48 +48,70 @@ use core::marker::PhantomData; /// Weight functions for `pallet_certification`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_certification::WeightInfo for WeightInfo<T> { + /// Storage: Identity IdentityIndexOf (r:1 w:0) + /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) + /// Storage: Certification StorageIdtyCertMeta (r:2 w:2) + /// Proof Skipped: Certification StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) + /// Storage: Parameters ParametersStorage (r:1 w:0) + /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) /// Storage: Identity Identities (r:2 w:0) /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) - /// Storage: Cert StorageIdtyCertMeta (r:2 w:2) - /// Proof Skipped: Cert StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) + /// Storage: Certification CertsRemovableOn (r:1 w:1) + /// Proof Skipped: Certification CertsRemovableOn (max_values: None, max_size: None, mode: Measured) + /// Storage: Certification CertsByReceiver (r:1 w:1) + /// Proof Skipped: Certification CertsByReceiver (max_values: None, max_size: None, mode: Measured) + fn add_cert() -> Weight { + // Proof Size summary in bytes: + // Measured: `923` + // Estimated: `6863` + // Minimum execution time: 65_778_000 picoseconds. + Weight::from_parts(72_978_000, 0) + .saturating_add(Weight::from_parts(0, 6863)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: Identity IdentityIndexOf (r:1 w:0) + /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) + /// Storage: Certification StorageIdtyCertMeta (r:1 w:1) + /// Proof Skipped: Certification StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) /// Storage: Parameters ParametersStorage (r:1 w:0) /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Cert CertsRemovableOn (r:1 w:1) - /// Proof Skipped: Cert CertsRemovableOn (max_values: None, max_size: None, mode: Measured) - /// Storage: Cert CertsByReceiver (r:1 w:1) - /// Proof Skipped: Cert CertsByReceiver (max_values: None, max_size: None, mode: Measured) - fn add_cert() -> Weight { + /// Storage: Identity Identities (r:2 w:0) + /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) + /// Storage: Certification CertsRemovableOn (r:1 w:1) + /// Proof Skipped: Certification CertsRemovableOn (max_values: None, max_size: None, mode: Measured) + /// Storage: Certification CertsByReceiver (r:1 w:1) + /// Proof Skipped: Certification CertsByReceiver (max_values: None, max_size: None, mode: Measured) + fn renew_cert() -> Weight { // Proof Size summary in bytes: - // Measured: `818` - // Estimated: `6758` - // Minimum execution time: 31_981_000 picoseconds. - Weight::from_parts(32_790_000, 0) - .saturating_add(Weight::from_parts(0, 6758)) + // Measured: `947` + // Estimated: `6887` + // Minimum execution time: 61_109_000 picoseconds. + Weight::from_parts(64_931_000, 0) + .saturating_add(Weight::from_parts(0, 6887)) .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Cert CertsByReceiver (r:1 w:1) - /// Proof Skipped: Cert CertsByReceiver (max_values: None, max_size: None, mode: Measured) - /// Storage: Cert StorageIdtyCertMeta (r:2 w:2) - /// Proof Skipped: Cert StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) + /// Storage: Certification CertsByReceiver (r:1 w:1) + /// Proof Skipped: Certification CertsByReceiver (max_values: None, max_size: None, mode: Measured) + /// Storage: Certification StorageIdtyCertMeta (r:2 w:2) + /// Proof Skipped: Certification StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) /// Storage: Parameters ParametersStorage (r:1 w:0) /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Membership Membership (r:1 w:0) - /// Proof Skipped: Membership Membership (max_values: None, max_size: None, mode: Measured) fn del_cert() -> Weight { // Proof Size summary in bytes: - // Measured: `701` - // Estimated: `6641` - // Minimum execution time: 24_063_000 picoseconds. - Weight::from_parts(25_566_000, 0) - .saturating_add(Weight::from_parts(0, 6641)) - .saturating_add(T::DbWeight::get().reads(5)) + // Measured: `444` + // Estimated: `6384` + // Minimum execution time: 35_139_000 picoseconds. + Weight::from_parts(37_463_000, 0) + .saturating_add(Weight::from_parts(0, 6384)) + .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Cert CertsByReceiver (r:1 w:1) - /// Proof Skipped: Cert CertsByReceiver (max_values: None, max_size: None, mode: Measured) - /// Storage: Cert StorageIdtyCertMeta (r:1000 w:1000) - /// Proof Skipped: Cert StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) + /// Storage: Certification CertsByReceiver (r:1 w:1) + /// Proof Skipped: Certification CertsByReceiver (max_values: None, max_size: None, mode: Measured) + /// Storage: Certification StorageIdtyCertMeta (r:1000 w:1000) + /// Proof Skipped: Certification StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) /// Storage: Parameters ParametersStorage (r:1 w:0) /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) /// Storage: Membership Membership (r:1 w:0) @@ -97,57 +119,57 @@ impl<T: frame_system::Config> pallet_certification::WeightInfo for WeightInfo<T> /// The range of component `i` is `[2, 1000]`. fn remove_all_certs_received_by(i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `587 + i * (35 ±0)` - // Estimated: `4058 + i * (2511 ±0)` - // Minimum execution time: 25_001_000 picoseconds. - Weight::from_parts(26_485_000, 0) - .saturating_add(Weight::from_parts(0, 4058)) - // Standard Error: 40_688 - .saturating_add(Weight::from_parts(10_777_344, 0).saturating_mul(i.into())) + // Measured: `588 + i * (35 ±0)` + // Estimated: `4054 + i * (2511 ±0)` + // Minimum execution time: 44_709_000 picoseconds. + Weight::from_parts(15_690_704, 0) + .saturating_add(Weight::from_parts(0, 4054)) + // Standard Error: 20_451 + .saturating_add(Weight::from_parts(15_749_397, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) .saturating_add(Weight::from_parts(0, 2511).saturating_mul(i.into())) } - /// Storage: Cert CertsRemovableOn (r:1 w:0) - /// Proof Skipped: Cert CertsRemovableOn (max_values: None, max_size: None, mode: Measured) + /// Storage: Certification CertsRemovableOn (r:1 w:0) + /// Proof Skipped: Certification CertsRemovableOn (max_values: None, max_size: None, mode: Measured) fn on_initialize() -> Weight { // Proof Size summary in bytes: - // Measured: `181` - // Estimated: `3646` - // Minimum execution time: 3_994_000 picoseconds. - Weight::from_parts(4_240_000, 0) - .saturating_add(Weight::from_parts(0, 3646)) + // Measured: `139` + // Estimated: `3604` + // Minimum execution time: 4_352_000 picoseconds. + Weight::from_parts(7_580_000, 0) + .saturating_add(Weight::from_parts(0, 3604)) .saturating_add(T::DbWeight::get().reads(1)) } - /// Storage: Cert CertsByReceiver (r:1 w:1) - /// Proof Skipped: Cert CertsByReceiver (max_values: None, max_size: None, mode: Measured) + /// Storage: Certification CertsByReceiver (r:1 w:1) + /// Proof Skipped: Certification CertsByReceiver (max_values: None, max_size: None, mode: Measured) fn do_remove_cert_noop() -> Weight { // Proof Size summary in bytes: - // Measured: `279` - // Estimated: `3744` - // Minimum execution time: 5_177_000 picoseconds. - Weight::from_parts(5_393_000, 0) - .saturating_add(Weight::from_parts(0, 3744)) + // Measured: `237` + // Estimated: `3702` + // Minimum execution time: 7_868_000 picoseconds. + Weight::from_parts(11_220_000, 0) + .saturating_add(Weight::from_parts(0, 3702)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Cert CertsByReceiver (r:1 w:1) - /// Proof Skipped: Cert CertsByReceiver (max_values: None, max_size: None, mode: Measured) - /// Storage: Cert StorageIdtyCertMeta (r:2 w:2) - /// Proof Skipped: Cert StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) + /// Storage: Certification CertsByReceiver (r:1 w:1) + /// Proof Skipped: Certification CertsByReceiver (max_values: None, max_size: None, mode: Measured) + /// Storage: Certification StorageIdtyCertMeta (r:2 w:2) + /// Proof Skipped: Certification StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) /// Storage: Parameters ParametersStorage (r:1 w:0) /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) /// Storage: Membership Membership (r:1 w:0) /// Proof Skipped: Membership Membership (max_values: None, max_size: None, mode: Measured) fn do_remove_cert() -> Weight { // Proof Size summary in bytes: - // Measured: `701` - // Estimated: `6641` - // Minimum execution time: 23_029_000 picoseconds. - Weight::from_parts(23_456_000, 0) - .saturating_add(Weight::from_parts(0, 6641)) + // Measured: `660` + // Estimated: `6600` + // Minimum execution time: 33_665_000 picoseconds. + Weight::from_parts(38_208_000, 0) + .saturating_add(Weight::from_parts(0, 6600)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } diff --git a/runtime/common/src/weights/pallet_collective.rs b/runtime/common/src/weights/pallet_collective.rs index 5ff320591..cf7b510b8 100644 --- a/runtime/common/src/weights/pallet_collective.rs +++ b/runtime/common/src/weights/pallet_collective.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -61,21 +61,21 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[0, 20]`. fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + m * (672 ±0) + p * (3191 ±0)` - // Estimated: `10019 + m * (416 ±4) + p * (4183 ±23)` - // Minimum execution time: 12_902_000 picoseconds. - Weight::from_parts(13_127_000, 0) - .saturating_add(Weight::from_parts(0, 10019)) - // Standard Error: 12_687 - .saturating_add(Weight::from_parts(953_319, 0).saturating_mul(m.into())) - // Standard Error: 62_719 - .saturating_add(Weight::from_parts(7_492_910, 0).saturating_mul(p.into())) + // Measured: `0 + m * (671 ±0) + p * (3196 ±0)` + // Estimated: `1514 + m * (9624 ±90) + p * (1918 ±452)` + // Minimum execution time: 23_422_000 picoseconds. + Weight::from_parts(23_422_000, 0) + .saturating_add(Weight::from_parts(0, 1514)) + // Standard Error: 409_364 + .saturating_add(Weight::from_parts(1_681_286, 0).saturating_mul(m.into())) + // Standard Error: 2_046_823 + .saturating_add(Weight::from_parts(7_823_957, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 416).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 4183).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 9624).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 1918).saturating_mul(p.into())) } /// Storage: TechnicalCommittee Members (r:1 w:0) /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) @@ -83,15 +83,15 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { /// The range of component `m` is `[1, 100]`. fn execute(b: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `32 + m * (32 ±0)` - // Estimated: `1518 + m * (32 ±0)` - // Minimum execution time: 11_896_000 picoseconds. - Weight::from_parts(8_817_972, 0) - .saturating_add(Weight::from_parts(0, 1518)) - // Standard Error: 209 - .saturating_add(Weight::from_parts(4_102, 0).saturating_mul(b.into())) - // Standard Error: 2_158 - .saturating_add(Weight::from_parts(30_007, 0).saturating_mul(m.into())) + // Measured: `31 + m * (32 ±0)` + // Estimated: `1517 + m * (32 ±0)` + // Minimum execution time: 22_528_000 picoseconds. + Weight::from_parts(21_965_656, 0) + .saturating_add(Weight::from_parts(0, 1517)) + // Standard Error: 1_391 + .saturating_add(Weight::from_parts(1_492, 0).saturating_mul(b.into())) + // Standard Error: 14_365 + .saturating_add(Weight::from_parts(19_858, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } @@ -101,15 +101,17 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { /// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[1, 100]`. - fn propose_execute(_b: u32, m: u32, ) -> Weight { + fn propose_execute(b: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `32 + m * (32 ±0)` - // Estimated: `3498 + m * (32 ±0)` - // Minimum execution time: 14_141_000 picoseconds. - Weight::from_parts(17_666_898, 0) - .saturating_add(Weight::from_parts(0, 3498)) - // Standard Error: 2_979 - .saturating_add(Weight::from_parts(21_157, 0).saturating_mul(m.into())) + // Measured: `31 + m * (32 ±0)` + // Estimated: `3497 + m * (32 ±0)` + // Minimum execution time: 26_296_000 picoseconds. + Weight::from_parts(24_449_661, 0) + .saturating_add(Weight::from_parts(0, 3497)) + // Standard Error: 1_225 + .saturating_add(Weight::from_parts(2_808, 0).saturating_mul(b.into())) + // Standard Error: 12_650 + .saturating_add(Weight::from_parts(49_722, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } @@ -126,23 +128,21 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[2, 100]`. /// The range of component `p` is `[1, 20]`. - fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { + fn propose_proposed(_b: u32, m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `24 + m * (32 ±0) + p * (55 ±0)` - // Estimated: `3461 + m * (32 ±0) + p * (54 ±0)` - // Minimum execution time: 20_027_000 picoseconds. - Weight::from_parts(20_370_128, 0) - .saturating_add(Weight::from_parts(0, 3461)) - // Standard Error: 157 - .saturating_add(Weight::from_parts(2_048, 0).saturating_mul(b.into())) - // Standard Error: 1_648 - .saturating_add(Weight::from_parts(17_889, 0).saturating_mul(m.into())) - // Standard Error: 8_236 - .saturating_add(Weight::from_parts(251_951, 0).saturating_mul(p.into())) + // Measured: `0 + m * (32 ±0) + p * (58 ±0)` + // Estimated: `3413 + m * (32 ±0) + p * (58 ±0)` + // Minimum execution time: 35_130_000 picoseconds. + Weight::from_parts(71_833_850, 0) + .saturating_add(Weight::from_parts(0, 3413)) + // Standard Error: 168_522 + .saturating_add(Weight::from_parts(30_556, 0).saturating_mul(m.into())) + // Standard Error: 869_222 + .saturating_add(Weight::from_parts(454_105, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 54).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 58).saturating_mul(p.into())) } /// Storage: TechnicalCommittee Members (r:1 w:0) /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) @@ -151,13 +151,11 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { /// The range of component `m` is `[5, 100]`. fn vote(m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `573 + m * (64 ±0)` - // Estimated: `4037 + m * (64 ±0)` - // Minimum execution time: 16_836_000 picoseconds. - Weight::from_parts(18_427_678, 0) - .saturating_add(Weight::from_parts(0, 4037)) - // Standard Error: 1_421 - .saturating_add(Weight::from_parts(27_925, 0).saturating_mul(m.into())) + // Measured: `572 + m * (64 ±0)` + // Estimated: `4038 + m * (64 ±0)` + // Minimum execution time: 30_355_000 picoseconds. + Weight::from_parts(53_128_131, 0) + .saturating_add(Weight::from_parts(0, 4038)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) @@ -174,15 +172,13 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[1, 20]`. fn close_early_disapproved(m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `117 + m * (64 ±0) + p * (55 ±0)` - // Estimated: `3591 + m * (64 ±0) + p * (55 ±0)` - // Minimum execution time: 21_901_000 picoseconds. - Weight::from_parts(21_879_805, 0) - .saturating_add(Weight::from_parts(0, 3591)) - // Standard Error: 1_141 - .saturating_add(Weight::from_parts(29_689, 0).saturating_mul(m.into())) - // Standard Error: 5_634 - .saturating_add(Weight::from_parts(192_469, 0).saturating_mul(p.into())) + // Measured: `127 + m * (64 ±0) + p * (55 ±0)` + // Estimated: `3593 + m * (64 ±0) + p * (55 ±0)` + // Minimum execution time: 37_074_000 picoseconds. + Weight::from_parts(87_124_277, 0) + .saturating_add(Weight::from_parts(0, 3593)) + // Standard Error: 2_039_774 + .saturating_add(Weight::from_parts(170_868, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) @@ -201,22 +197,20 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[1, 20]`. fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `62 + b * (1 ±0) + m * (64 ±0) + p * (78 ±0)` - // Estimated: `3619 + b * (1 ±0) + m * (63 ±0) + p * (74 ±0)` - // Minimum execution time: 30_737_000 picoseconds. - Weight::from_parts(32_095_841, 0) - .saturating_add(Weight::from_parts(0, 3619)) - // Standard Error: 151 - .saturating_add(Weight::from_parts(1_138, 0).saturating_mul(b.into())) - // Standard Error: 1_604 - .saturating_add(Weight::from_parts(14_534, 0).saturating_mul(m.into())) - // Standard Error: 7_913 - .saturating_add(Weight::from_parts(287_322, 0).saturating_mul(p.into())) + // Measured: `50 + b * (1 ±0) + m * (64 ±0) + p * (78 ±0)` + // Estimated: `3516 + b * (1 ±0) + m * (64 ±0) + p * (79 ±0)` + // Minimum execution time: 51_993_000 picoseconds. + Weight::from_parts(48_872_547, 0) + .saturating_add(Weight::from_parts(0, 3516)) + // Standard Error: 88_708 + .saturating_add(Weight::from_parts(79_471, 0).saturating_mul(m.into())) + // Standard Error: 448_213 + .saturating_add(Weight::from_parts(1_142_776, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 63).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 74).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 79).saturating_mul(p.into())) } /// Storage: TechnicalCommittee Voting (r:1 w:1) /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) @@ -232,15 +226,15 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[1, 20]`. fn close_disapproved(m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `137 + m * (64 ±0) + p * (55 ±0)` - // Estimated: `3611 + m * (64 ±0) + p * (55 ±0)` - // Minimum execution time: 24_004_000 picoseconds. - Weight::from_parts(22_361_319, 0) - .saturating_add(Weight::from_parts(0, 3611)) - // Standard Error: 1_020 - .saturating_add(Weight::from_parts(34_806, 0).saturating_mul(m.into())) - // Standard Error: 5_037 - .saturating_add(Weight::from_parts(271_932, 0).saturating_mul(p.into())) + // Measured: `147 + m * (64 ±0) + p * (55 ±0)` + // Estimated: `3613 + m * (64 ±0) + p * (55 ±0)` + // Minimum execution time: 40_212_000 picoseconds. + Weight::from_parts(38_638_717, 0) + .saturating_add(Weight::from_parts(0, 3613)) + // Standard Error: 11_146 + .saturating_add(Weight::from_parts(18_281, 0).saturating_mul(m.into())) + // Standard Error: 56_317 + .saturating_add(Weight::from_parts(250_157, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) @@ -261,22 +255,18 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[1, 20]`. fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `82 + b * (1 ±0) + m * (64 ±0) + p * (78 ±0)` - // Estimated: `3639 + b * (1 ±0) + m * (63 ±0) + p * (74 ±0)` - // Minimum execution time: 33_250_000 picoseconds. - Weight::from_parts(33_613_119, 0) - .saturating_add(Weight::from_parts(0, 3639)) - // Standard Error: 147 - .saturating_add(Weight::from_parts(1_141, 0).saturating_mul(b.into())) - // Standard Error: 1_563 - .saturating_add(Weight::from_parts(21_793, 0).saturating_mul(m.into())) - // Standard Error: 7_712 - .saturating_add(Weight::from_parts(287_193, 0).saturating_mul(p.into())) + // Measured: `70 + b * (1 ±0) + m * (64 ±0) + p * (78 ±0)` + // Estimated: `3536 + b * (1 ±0) + m * (64 ±0) + p * (79 ±0)` + // Minimum execution time: 56_237_000 picoseconds. + Weight::from_parts(97_149_848, 0) + .saturating_add(Weight::from_parts(0, 3536)) + // Standard Error: 16_748 + .saturating_add(Weight::from_parts(1_216, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 63).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 74).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 79).saturating_mul(p.into())) } /// Storage: TechnicalCommittee Proposals (r:1 w:1) /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) @@ -287,13 +277,13 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[1, 20]`. fn disapprove_proposal(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `189 + p * (32 ±0)` - // Estimated: `1674 + p * (32 ±0)` - // Minimum execution time: 11_883_000 picoseconds. - Weight::from_parts(13_256_929, 0) - .saturating_add(Weight::from_parts(0, 1674)) - // Standard Error: 2_679 - .saturating_add(Weight::from_parts(170_072, 0).saturating_mul(p.into())) + // Measured: `187 + p * (32 ±0)` + // Estimated: `1673 + p * (32 ±0)` + // Minimum execution time: 24_197_000 picoseconds. + Weight::from_parts(25_080_789, 0) + .saturating_add(Weight::from_parts(0, 1673)) + // Standard Error: 115_740 + .saturating_add(Weight::from_parts(144_210, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) diff --git a/runtime/common/src/weights/pallet_distance.rs b/runtime/common/src/weights/pallet_distance.rs index c1c3c8c55..52551ece6 100644 --- a/runtime/common/src/weights/pallet_distance.rs +++ b/runtime/common/src/weights/pallet_distance.rs @@ -17,19 +17,19 @@ //! Autogenerated weights for `pallet_distance` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-20, STEPS: `8`, REPEAT: `4`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// ./target/debug/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=8 -// --repeat=4 -// --pallet=pallet-distance +// --steps=2 +// --repeat=2 +// --pallet=* // --extrinsic=* // --execution=wasm // --wasm-execution=compiled @@ -50,14 +50,16 @@ pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_distance::WeightInfo for WeightInfo<T> { /// Storage: Identity IdentityIndexOf (r:1 w:0) /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) + /// Storage: Identity Identities (r:1 w:0) + /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) /// Storage: Distance PendingEvaluationRequest (r:1 w:1) /// Proof Skipped: Distance PendingEvaluationRequest (max_values: None, max_size: None, mode: Measured) - /// Storage: Distance ValidEvaluationResult (r:1 w:0) - /// Proof Skipped: Distance ValidEvaluationResult (max_values: None, max_size: None, mode: Measured) - /// Storage: Cert StorageIdtyCertMeta (r:1 w:0) - /// Proof Skipped: Cert StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) + /// Storage: Membership Membership (r:1 w:0) + /// Proof Skipped: Membership Membership (max_values: None, max_size: None, mode: Measured) /// Storage: Parameters ParametersStorage (r:1 w:0) /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Certification StorageIdtyCertMeta (r:1 w:0) + /// Proof Skipped: Certification StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) /// Storage: Session CurrentIndex (r:1 w:0) /// Proof Skipped: Session CurrentIndex (max_values: Some(1), max_size: None, mode: Measured) /// Storage: Distance EvaluationPool2 (r:1 w:1) @@ -66,12 +68,12 @@ impl<T: frame_system::Config> pallet_distance::WeightInfo for WeightInfo<T> { /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) fn request_distance_evaluation() -> Weight { // Proof Size summary in bytes: - // Measured: `1280` - // Estimated: `4745` - // Minimum execution time: 876_053_000 picoseconds. - Weight::from_parts(898_445_000, 0) - .saturating_add(Weight::from_parts(0, 4745)) - .saturating_add(T::DbWeight::get().reads(8)) + // Measured: `1597` + // Estimated: `5062` + // Minimum execution time: 73_986_000 picoseconds. + Weight::from_parts(77_918_000, 0) + .saturating_add(Weight::from_parts(0, 5062)) + .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: Identity IdentityIndexOf (r:1 w:0) @@ -80,12 +82,12 @@ impl<T: frame_system::Config> pallet_distance::WeightInfo for WeightInfo<T> { /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) /// Storage: Distance PendingEvaluationRequest (r:1 w:1) /// Proof Skipped: Distance PendingEvaluationRequest (max_values: None, max_size: None, mode: Measured) - /// Storage: Distance ValidEvaluationResult (r:1 w:0) - /// Proof Skipped: Distance ValidEvaluationResult (max_values: None, max_size: None, mode: Measured) - /// Storage: Cert StorageIdtyCertMeta (r:1 w:0) - /// Proof Skipped: Cert StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) + /// Storage: Membership Membership (r:1 w:0) + /// Proof Skipped: Membership Membership (max_values: None, max_size: None, mode: Measured) /// Storage: Parameters ParametersStorage (r:1 w:0) /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Certification StorageIdtyCertMeta (r:1 w:0) + /// Proof Skipped: Certification StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) /// Storage: Session CurrentIndex (r:1 w:0) /// Proof Skipped: Session CurrentIndex (max_values: Some(1), max_size: None, mode: Measured) /// Storage: Distance EvaluationPool2 (r:1 w:1) @@ -94,11 +96,11 @@ impl<T: frame_system::Config> pallet_distance::WeightInfo for WeightInfo<T> { /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) fn request_distance_evaluation_for() -> Weight { // Proof Size summary in bytes: - // Measured: `1485` - // Estimated: `7425` - // Minimum execution time: 1_118_982_000 picoseconds. - Weight::from_parts(1_292_782_000, 0) - .saturating_add(Weight::from_parts(0, 7425)) + // Measured: `1626` + // Estimated: `7566` + // Minimum execution time: 76_351_000 picoseconds. + Weight::from_parts(79_888_000, 0) + .saturating_add(Weight::from_parts(0, 7566)) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -117,13 +119,13 @@ impl<T: frame_system::Config> pallet_distance::WeightInfo for WeightInfo<T> { /// The range of component `i` is `[1, 600]`. fn update_evaluation(i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `773 + i * (10 ±0)` - // Estimated: `2256 + i * (10 ±0)` - // Minimum execution time: 463_878_000 picoseconds. - Weight::from_parts(743_823_548, 0) - .saturating_add(Weight::from_parts(0, 2256)) - // Standard Error: 292_144 - .saturating_add(Weight::from_parts(1_326_639, 0).saturating_mul(i.into())) + // Measured: `768 + i * (10 ±0)` + // Estimated: `2254 + i * (10 ±0)` + // Minimum execution time: 29_515_000 picoseconds. + Weight::from_parts(38_570_252, 0) + .saturating_add(Weight::from_parts(0, 2254)) + // Standard Error: 19_866 + .saturating_add(Weight::from_parts(169_747, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(i.into())) @@ -135,21 +137,17 @@ impl<T: frame_system::Config> pallet_distance::WeightInfo for WeightInfo<T> { /// The range of component `i` is `[1, 600]`. fn force_update_evaluation(i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `612 + i * (10 ±0)` - // Estimated: `2095 + i * (10 ±0)` - // Minimum execution time: 208_812_000 picoseconds. - Weight::from_parts(257_150_521, 0) - .saturating_add(Weight::from_parts(0, 2095)) - // Standard Error: 53_366 - .saturating_add(Weight::from_parts(1_841_329, 0).saturating_mul(i.into())) + // Measured: `606 + i * (10 ±0)` + // Estimated: `2092 + i * (10 ±0)` + // Minimum execution time: 15_384_000 picoseconds. + Weight::from_parts(16_168_381, 0) + .saturating_add(Weight::from_parts(0, 2092)) + // Standard Error: 11_822 + .saturating_add(Weight::from_parts(182_118, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(i.into())) } - /// Storage: Session CurrentIndex (r:1 w:0) - /// Proof Skipped: Session CurrentIndex (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Distance ValidEvaluationExpireOn (r:1 w:1) - /// Proof Skipped: Distance ValidEvaluationExpireOn (max_values: None, max_size: None, mode: Measured) /// Storage: Identity Identities (r:1 w:0) /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) /// Storage: Membership Membership (r:1 w:1) @@ -158,17 +156,15 @@ impl<T: frame_system::Config> pallet_distance::WeightInfo for WeightInfo<T> { /// Proof Skipped: Membership MembershipsExpireOn (max_values: None, max_size: None, mode: Measured) /// Storage: Parameters ParametersStorage (r:1 w:0) /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Distance ValidEvaluationResult (r:0 w:1) - /// Proof Skipped: Distance ValidEvaluationResult (max_values: None, max_size: None, mode: Measured) fn force_valid_distance_status() -> Weight { // Proof Size summary in bytes: - // Measured: `1181` - // Estimated: `7121` - // Minimum execution time: 873_892_000 picoseconds. - Weight::from_parts(1_081_510_000, 0) - .saturating_add(Weight::from_parts(0, 7121)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(5)) + // Measured: `576` + // Estimated: `6516` + // Minimum execution time: 62_190_000 picoseconds. + Weight::from_parts(64_633_000, 0) + .saturating_add(Weight::from_parts(0, 6516)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: Distance DidUpdate (r:1 w:1) /// Proof Skipped: Distance DidUpdate (max_values: Some(1), max_size: None, mode: Measured) @@ -176,8 +172,8 @@ impl<T: frame_system::Config> pallet_distance::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `170` // Estimated: `1655` - // Minimum execution time: 93_595_000 picoseconds. - Weight::from_parts(109_467_000, 0) + // Minimum execution time: 8_402_000 picoseconds. + Weight::from_parts(9_335_000, 0) .saturating_add(Weight::from_parts(0, 1655)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/common/src/weights/pallet_duniter_account.rs b/runtime/common/src/weights/pallet_duniter_account.rs index 4b0bc7d38..6a911afdf 100644 --- a/runtime/common/src/weights/pallet_duniter_account.rs +++ b/runtime/common/src/weights/pallet_duniter_account.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_duniter_account` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -54,8 +54,8 @@ impl<T: frame_system::Config> pallet_duniter_account::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `0` // Estimated: `3591` - // Minimum execution time: 3_390_000 picoseconds. - Weight::from_parts(3_644_000, 0) + // Minimum execution time: 10_296_000 picoseconds. + Weight::from_parts(15_289_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -80,16 +80,16 @@ impl<T: frame_system::Config> pallet_duniter_account::WeightInfo for WeightInfo< fn on_initialize_sufficient(i: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `42 + i * (309 ±0)` - // Estimated: `3507 + i * (1908 ±0)` - // Minimum execution time: 2_538_000 picoseconds. - Weight::from_parts(2_921_636, 0) - .saturating_add(Weight::from_parts(0, 3507)) - // Standard Error: 23_209 - .saturating_add(Weight::from_parts(17_412_363, 0).saturating_mul(i.into())) + // Estimated: `3816 + i * (309 ±0)` + // Minimum execution time: 10_313_000 picoseconds. + Weight::from_parts(10_674_000, 0) + .saturating_add(Weight::from_parts(0, 3816)) + // Standard Error: 2_538_302 + .saturating_add(Weight::from_parts(27_819_500, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes((6_u64).saturating_mul(i.into()))) - .saturating_add(Weight::from_parts(0, 1908).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(0, 309).saturating_mul(i.into())) } /// Storage: Account PendingNewAccounts (r:1 w:1) /// Proof Skipped: Account PendingNewAccounts (max_values: None, max_size: None, mode: Measured) @@ -111,16 +111,16 @@ impl<T: frame_system::Config> pallet_duniter_account::WeightInfo for WeightInfo< fn on_initialize_with_balance(i: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `42 + i * (309 ±0)` - // Estimated: `3507 + i * (1908 ±0)` - // Minimum execution time: 2_592_000 picoseconds. - Weight::from_parts(2_922_189, 0) - .saturating_add(Weight::from_parts(0, 3507)) - // Standard Error: 29_198 - .saturating_add(Weight::from_parts(40_273_310, 0).saturating_mul(i.into())) + // Estimated: `3816 + i * (309 ±0)` + // Minimum execution time: 6_629_000 picoseconds. + Weight::from_parts(7_761_500, 0) + .saturating_add(Weight::from_parts(0, 3816)) + // Standard Error: 3_335_635 + .saturating_add(Weight::from_parts(69_367_000, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes((6_u64).saturating_mul(i.into()))) - .saturating_add(Weight::from_parts(0, 1908).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(0, 309).saturating_mul(i.into())) } /// Storage: Account PendingNewAccounts (r:1 w:1) /// Proof Skipped: Account PendingNewAccounts (max_values: None, max_size: None, mode: Measured) @@ -129,11 +129,11 @@ impl<T: frame_system::Config> pallet_duniter_account::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `42 + i * (74 ±0)` // Estimated: `3507 + i * (74 ±0)` - // Minimum execution time: 2_541_000 picoseconds. - Weight::from_parts(2_804_765, 0) + // Minimum execution time: 6_699_000 picoseconds. + Weight::from_parts(7_645_000, 0) .saturating_add(Weight::from_parts(0, 3507)) - // Standard Error: 17_736 - .saturating_add(Weight::from_parts(8_896_434, 0).saturating_mul(i.into())) + // Standard Error: 10_642_627 + .saturating_add(Weight::from_parts(25_816_500, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) .saturating_add(Weight::from_parts(0, 74).saturating_mul(i.into())) @@ -144,8 +144,8 @@ impl<T: frame_system::Config> pallet_duniter_account::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `116` // Estimated: `3581` - // Minimum execution time: 10_150_000 picoseconds. - Weight::from_parts(10_585_000, 0) + // Minimum execution time: 20_089_000 picoseconds. + Weight::from_parts(21_261_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -156,8 +156,8 @@ impl<T: frame_system::Config> pallet_duniter_account::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 2_170_000 picoseconds. - Weight::from_parts(2_331_000, 0) + // Minimum execution time: 4_511_000 picoseconds. + Weight::from_parts(4_829_000, 0) .saturating_add(Weight::from_parts(0, 3507)) .saturating_add(T::DbWeight::get().reads(1)) } diff --git a/runtime/common/src/weights/pallet_identity.rs b/runtime/common/src/weights/pallet_identity.rs index 16189190a..448e28da1 100644 --- a/runtime/common/src/weights/pallet_identity.rs +++ b/runtime/common/src/weights/pallet_identity.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_identity` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -52,8 +52,8 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) /// Storage: Identity Identities (r:2 w:2) /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) - /// Storage: Cert StorageIdtyCertMeta (r:2 w:2) - /// Proof Skipped: Cert StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) + /// Storage: Certification StorageIdtyCertMeta (r:2 w:2) + /// Proof Skipped: Certification StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) /// Storage: Parameters ParametersStorage (r:1 w:0) /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) /// Storage: System Account (r:1 w:1) @@ -64,19 +64,19 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { /// Proof Skipped: Identity IdentityChangeSchedule (max_values: None, max_size: None, mode: Measured) /// Storage: Identity CounterForIdentities (r:1 w:1) /// Proof: Identity CounterForIdentities (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Cert CertsRemovableOn (r:1 w:1) - /// Proof Skipped: Cert CertsRemovableOn (max_values: None, max_size: None, mode: Measured) - /// Storage: Cert CertsByReceiver (r:1 w:1) - /// Proof Skipped: Cert CertsByReceiver (max_values: None, max_size: None, mode: Measured) + /// Storage: Certification CertsRemovableOn (r:1 w:1) + /// Proof Skipped: Certification CertsRemovableOn (max_values: None, max_size: None, mode: Measured) + /// Storage: Certification CertsByReceiver (r:1 w:1) + /// Proof Skipped: Certification CertsByReceiver (max_values: None, max_size: None, mode: Measured) /// Storage: Quota IdtyQuota (r:0 w:1) /// Proof: Quota IdtyQuota (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) fn create_identity() -> Weight { // Proof Size summary in bytes: - // Measured: `961` - // Estimated: `6901` - // Minimum execution time: 70_549_000 picoseconds. - Weight::from_parts(72_921_000, 0) - .saturating_add(Weight::from_parts(0, 6901)) + // Measured: `921` + // Estimated: `6861` + // Minimum execution time: 132_024_000 picoseconds. + Weight::from_parts(163_110_000, 0) + .saturating_add(Weight::from_parts(0, 6861)) .saturating_add(T::DbWeight::get().reads(13)) .saturating_add(T::DbWeight::get().writes(12)) } @@ -92,8 +92,8 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `661` // Estimated: `6601` - // Minimum execution time: 27_794_000 picoseconds. - Weight::from_parts(28_779_000, 0) + // Minimum execution time: 54_645_000 picoseconds. + Weight::from_parts(75_103_000, 0) .saturating_add(Weight::from_parts(0, 6601)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -108,11 +108,11 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) fn change_owner_key() -> Weight { // Proof Size summary in bytes: - // Measured: `690` - // Estimated: `6630` - // Minimum execution time: 82_416_000 picoseconds. - Weight::from_parts(84_057_000, 0) - .saturating_add(Weight::from_parts(0, 6630)) + // Measured: `714` + // Estimated: `6654` + // Minimum execution time: 178_066_000 picoseconds. + Weight::from_parts(219_916_000, 0) + .saturating_add(Weight::from_parts(0, 6654)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -130,24 +130,24 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `631` // Estimated: `6571` - // Minimum execution time: 68_774_000 picoseconds. - Weight::from_parts(69_972_000, 0) + // Minimum execution time: 158_320_000 picoseconds. + Weight::from_parts(202_029_000, 0) .saturating_add(Weight::from_parts(0, 6571)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: Identity IdentitiesNames (r:0 w:998) + /// Storage: Identity IdentitiesNames (r:0 w:999) /// Proof Skipped: Identity IdentitiesNames (max_values: None, max_size: None, mode: Measured) /// The range of component `i` is `[1, 1000]`. fn prune_item_identities_names(i: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_811_000 picoseconds. - Weight::from_parts(1_950_000, 0) + // Minimum execution time: 8_266_000 picoseconds. + Weight::from_parts(15_371_520, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_030 - .saturating_add(Weight::from_parts(1_351_984, 0).saturating_mul(i.into())) + // Standard Error: 38_204 + .saturating_add(Weight::from_parts(2_138_979, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: System Account (r:1 w:1) @@ -156,8 +156,8 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `67` // Estimated: `3591` - // Minimum execution time: 6_511_000 picoseconds. - Weight::from_parts(6_991_000, 0) + // Minimum execution time: 13_275_000 picoseconds. + Weight::from_parts(14_053_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -172,8 +172,8 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `371` // Estimated: `3836` - // Minimum execution time: 55_780_000 picoseconds. - Weight::from_parts(57_903_000, 0) + // Minimum execution time: 103_563_000 picoseconds. + Weight::from_parts(107_316_000, 0) .saturating_add(Weight::from_parts(0, 3836)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -182,8 +182,8 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 128_000 picoseconds. - Weight::from_parts(148_000, 0) + // Minimum execution time: 286_000 picoseconds. + Weight::from_parts(492_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: Identity Identities (r:1 w:0) @@ -192,8 +192,8 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `269` // Estimated: `3734` - // Minimum execution time: 4_299_000 picoseconds. - Weight::from_parts(4_466_000, 0) + // Minimum execution time: 8_267_000 picoseconds. + Weight::from_parts(8_928_000, 0) .saturating_add(Weight::from_parts(0, 3734)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -229,11 +229,11 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn do_revoke_identity() -> Weight { // Proof Size summary in bytes: - // Measured: `1539` - // Estimated: `9954` - // Minimum execution time: 86_893_000 picoseconds. - Weight::from_parts(89_617_000, 0) - .saturating_add(Weight::from_parts(0, 9954)) + // Measured: `1540` + // Estimated: `9955` + // Minimum execution time: 146_876_000 picoseconds. + Weight::from_parts(158_403_000, 0) + .saturating_add(Weight::from_parts(0, 9955)) .saturating_add(T::DbWeight::get().reads(16)) .saturating_add(T::DbWeight::get().writes(19)) } @@ -243,8 +243,8 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `269` // Estimated: `3734` - // Minimum execution time: 4_166_000 picoseconds. - Weight::from_parts(4_435_000, 0) + // Minimum execution time: 7_847_000 picoseconds. + Weight::from_parts(8_887_000, 0) .saturating_add(Weight::from_parts(0, 3734)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -280,11 +280,11 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn do_remove_identity() -> Weight { // Proof Size summary in bytes: - // Measured: `1446` - // Estimated: `9861` - // Minimum execution time: 96_928_000 picoseconds. - Weight::from_parts(99_588_000, 0) - .saturating_add(Weight::from_parts(0, 9861)) + // Measured: `1447` + // Estimated: `9862` + // Minimum execution time: 163_144_000 picoseconds. + Weight::from_parts(223_357_000, 0) + .saturating_add(Weight::from_parts(0, 9862)) .saturating_add(T::DbWeight::get().reads(15)) .saturating_add(T::DbWeight::get().writes(21)) } @@ -294,8 +294,8 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `108` // Estimated: `3573` - // Minimum execution time: 2_232_000 picoseconds. - Weight::from_parts(2_383_000, 0) + // Minimum execution time: 4_257_000 picoseconds. + Weight::from_parts(4_848_000, 0) .saturating_add(Weight::from_parts(0, 3573)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -307,8 +307,8 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `292` // Estimated: `3757` - // Minimum execution time: 6_383_000 picoseconds. - Weight::from_parts(6_735_000, 0) + // Minimum execution time: 13_902_000 picoseconds. + Weight::from_parts(29_881_000, 0) .saturating_add(Weight::from_parts(0, 3757)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -323,19 +323,19 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) /// Storage: Membership Membership (r:1 w:1) /// Proof Skipped: Membership Membership (max_values: None, max_size: None, mode: Measured) - /// Storage: Cert CertsByReceiver (r:1 w:0) - /// Proof Skipped: Cert CertsByReceiver (max_values: None, max_size: None, mode: Measured) + /// Storage: Certification CertsByReceiver (r:1 w:0) + /// Proof Skipped: Certification CertsByReceiver (max_values: None, max_size: None, mode: Measured) /// Storage: Identity IdentityIndexOf (r:0 w:1) /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) /// Storage: Quota IdtyQuota (r:0 w:1) /// Proof: Quota IdtyQuota (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) fn prune_identities_err() -> Weight { // Proof Size summary in bytes: - // Measured: `795` - // Estimated: `4260` - // Minimum execution time: 36_427_000 picoseconds. - Weight::from_parts(38_481_000, 0) - .saturating_add(Weight::from_parts(0, 4260)) + // Measured: `753` + // Estimated: `4218` + // Minimum execution time: 71_875_000 picoseconds. + Weight::from_parts(84_556_000, 0) + .saturating_add(Weight::from_parts(0, 4218)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(7)) } diff --git a/runtime/common/src/weights/pallet_im_online.rs b/runtime/common/src/weights/pallet_im_online.rs index e8d3be5c5..be113f033 100644 --- a/runtime/common/src/weights/pallet_im_online.rs +++ b/runtime/common/src/weights/pallet_im_online.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_im_online` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -64,18 +64,15 @@ impl<T: frame_system::Config> pallet_im_online::WeightInfo for WeightInfo<T> { /// The range of component `e` is `[1, 100]`. fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `603 + k * (32 ±0)` - // Estimated: `10024497 + e * (35 ±0) + k * (32 ±0)` - // Minimum execution time: 90_994_000 picoseconds. - Weight::from_parts(81_184_429, 0) + // Measured: `601 + k * (32 ±0)` + // Estimated: `10024497 + k * (32 ±0)` + // Minimum execution time: 133_175_000 picoseconds. + Weight::from_parts(151_343_214, 0) .saturating_add(Weight::from_parts(0, 10024497)) - // Standard Error: 981 - .saturating_add(Weight::from_parts(24_987, 0).saturating_mul(k.into())) - // Standard Error: 9_890 - .saturating_add(Weight::from_parts(313_213, 0).saturating_mul(e.into())) - .saturating_add(T::DbWeight::get().reads(5)) + // Standard Error: 409_251 + .saturating_add(Weight::from_parts(588_858, 0).saturating_mul(e.into())) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 35).saturating_mul(e.into())) .saturating_add(Weight::from_parts(0, 32).saturating_mul(k.into())) } } diff --git a/runtime/common/src/weights/pallet_membership.rs b/runtime/common/src/weights/pallet_membership.rs index 13a754597..d7bba69b0 100644 --- a/runtime/common/src/weights/pallet_membership.rs +++ b/runtime/common/src/weights/pallet_membership.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_membership` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -48,102 +48,12 @@ use core::marker::PhantomData; /// Weight functions for `pallet_membership`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_membership::WeightInfo for WeightInfo<T> { - /// Storage: Identity IdentityIndexOf (r:1 w:0) - /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Cert StorageIdtyCertMeta (r:1 w:0) - /// Proof Skipped: Cert StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) - /// Storage: Parameters ParametersStorage (r:1 w:0) - /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Distance IdentityDistanceStatus (r:1 w:0) - /// Proof Skipped: Distance IdentityDistanceStatus (max_values: None, max_size: None, mode: Measured) - /// Storage: Membership Membership (r:1 w:1) - /// Proof Skipped: Membership Membership (max_values: None, max_size: None, mode: Measured) - /// Storage: Membership CounterForMembership (r:1 w:1) - /// Proof: Membership CounterForMembership (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Membership MembershipsExpireOn (r:1 w:1) - /// Proof Skipped: Membership MembershipsExpireOn (max_values: None, max_size: None, mode: Measured) - /// Storage: Identity Identities (r:1 w:1) - /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) - /// Storage: UniversalDividend CurrentUdIndex (r:1 w:0) - /// Proof: UniversalDividend CurrentUdIndex (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - /// Storage: Identity IdentityChangeSchedule (r:1 w:0) - /// Proof Skipped: Identity IdentityChangeSchedule (max_values: None, max_size: None, mode: Measured) - fn claim_membership() -> Weight { - // Proof Size summary in bytes: - // Measured: `1251` - // Estimated: `4716` - // Minimum execution time: 54_473_000 picoseconds. - Weight::from_parts(56_761_000, 0) - .saturating_add(Weight::from_parts(0, 4716)) - .saturating_add(T::DbWeight::get().reads(10)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: Identity IdentityIndexOf (r:1 w:0) - /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Membership Membership (r:1 w:1) - /// Proof Skipped: Membership Membership (max_values: None, max_size: None, mode: Measured) - /// Storage: Identity Identities (r:1 w:0) - /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) - /// Storage: Distance IdentityDistanceStatus (r:1 w:0) - /// Proof Skipped: Distance IdentityDistanceStatus (max_values: None, max_size: None, mode: Measured) - /// Storage: Membership MembershipsExpireOn (r:2 w:2) - /// Proof Skipped: Membership MembershipsExpireOn (max_values: None, max_size: None, mode: Measured) - /// Storage: Parameters ParametersStorage (r:1 w:0) - /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) - fn renew_membership() -> Weight { - // Proof Size summary in bytes: - // Measured: `967` - // Estimated: `6907` - // Minimum execution time: 32_278_000 picoseconds. - Weight::from_parts(33_783_000, 0) - .saturating_add(Weight::from_parts(0, 6907)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Identity IdentityIndexOf (r:1 w:0) - /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Membership Membership (r:1 w:1) - /// Proof Skipped: Membership Membership (max_values: None, max_size: None, mode: Measured) - /// Storage: Membership CounterForMembership (r:1 w:1) - /// Proof: Membership CounterForMembership (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Membership MembershipsExpireOn (r:1 w:1) - /// Proof Skipped: Membership MembershipsExpireOn (max_values: None, max_size: None, mode: Measured) - /// Storage: Identity Identities (r:1 w:1) - /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) - /// Storage: UniversalDividend CurrentUdIndex (r:1 w:0) - /// Proof: UniversalDividend CurrentUdIndex (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - /// Storage: SmithMembers Smiths (r:3 w:3) - /// Proof Skipped: SmithMembers Smiths (max_values: None, max_size: None, mode: Measured) - /// Storage: AuthorityMembers Members (r:1 w:1) - /// Proof Skipped: AuthorityMembers Members (max_values: None, max_size: None, mode: Measured) - /// Storage: AuthorityMembers OnlineAuthorities (r:1 w:1) - /// Proof Skipped: AuthorityMembers OnlineAuthorities (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: AuthorityMembers IncomingAuthorities (r:1 w:1) - /// Proof Skipped: AuthorityMembers IncomingAuthorities (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Session NextKeys (r:1 w:1) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) - /// Storage: Identity IdentityChangeSchedule (r:2 w:1) - /// Proof Skipped: Identity IdentityChangeSchedule (max_values: None, max_size: None, mode: Measured) - /// Storage: Session KeyOwner (r:0 w:4) - /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) - fn revoke_membership() -> Weight { - // Proof Size summary in bytes: - // Measured: `1647` - // Estimated: `10062` - // Minimum execution time: 82_810_000 picoseconds. - Weight::from_parts(86_447_000, 0) - .saturating_add(Weight::from_parts(0, 10062)) - .saturating_add(T::DbWeight::get().reads(16)) - .saturating_add(T::DbWeight::get().writes(17)) - } fn on_initialize() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 125_000 picoseconds. - Weight::from_parts(155_000, 0) + // Minimum execution time: 378_000 picoseconds. + Weight::from_parts(511_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: Membership MembershipsExpireOn (r:2 w:2) @@ -177,17 +87,17 @@ impl<T: frame_system::Config> pallet_membership::WeightInfo for WeightInfo<T> { /// The range of component `i` is `[0, 3]`. fn expire_memberships(i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `138 + i * (813 ±0)` - // Estimated: `9694 + i * (2720 ±46)` - // Minimum execution time: 4_624_000 picoseconds. - Weight::from_parts(10_695_038, 0) - .saturating_add(Weight::from_parts(0, 9694)) - // Standard Error: 405_934 - .saturating_add(Weight::from_parts(66_220_541, 0).saturating_mul(i.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().reads((10_u64).saturating_mul(i.into()))) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(T::DbWeight::get().writes((13_u64).saturating_mul(i.into()))) - .saturating_add(Weight::from_parts(0, 2720).saturating_mul(i.into())) + // Measured: `138 + i * (639 ±0)` + // Estimated: `10471 + i * (1464 ±0)` + // Minimum execution time: 12_285_000 picoseconds. + Weight::from_parts(14_483_500, 0) + .saturating_add(Weight::from_parts(0, 10471)) + // Standard Error: 8_003_454 + .saturating_add(Weight::from_parts(122_359_333, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads((9_u64).saturating_mul(i.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((12_u64).saturating_mul(i.into()))) + .saturating_add(Weight::from_parts(0, 1464).saturating_mul(i.into())) } } diff --git a/runtime/common/src/weights/pallet_multisig.rs b/runtime/common/src/weights/pallet_multisig.rs index c17b1a0c4..365ea7dde 100644 --- a/runtime/common/src/weights/pallet_multisig.rs +++ b/runtime/common/src/weights/pallet_multisig.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -53,11 +53,11 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_056_000 picoseconds. - Weight::from_parts(5_644_464, 0) + // Minimum execution time: 9_294_000 picoseconds. + Weight::from_parts(17_767_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2 - .saturating_add(Weight::from_parts(319, 0).saturating_mul(z.into())) + // Standard Error: 947 + .saturating_add(Weight::from_parts(221, 0).saturating_mul(z.into())) } /// Storage: Multisig Multisigs (r:1 w:1) /// Proof: Multisig Multisigs (max_values: None, max_size: Some(457), added: 2932, mode: MaxEncodedLen) @@ -65,15 +65,15 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> { /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `126 + s * (5 ±0)` + // Measured: `134 + s * (4 ±0)` // Estimated: `3922` - // Minimum execution time: 26_421_000 picoseconds. - Weight::from_parts(26_520_982, 0) + // Minimum execution time: 43_829_000 picoseconds. + Weight::from_parts(22_076_250, 0) .saturating_add(Weight::from_parts(0, 3922)) - // Standard Error: 6_950 - .saturating_add(Weight::from_parts(144_934, 0).saturating_mul(s.into())) - // Standard Error: 5 - .saturating_add(Weight::from_parts(1_048, 0).saturating_mul(z.into())) + // Standard Error: 650_697 + .saturating_add(Weight::from_parts(2_451_125, 0).saturating_mul(s.into())) + // Standard Error: 520 + .saturating_add(Weight::from_parts(3_350, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -85,13 +85,13 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `240` // Estimated: `3922` - // Minimum execution time: 16_507_000 picoseconds. - Weight::from_parts(15_704_876, 0) + // Minimum execution time: 27_439_000 picoseconds. + Weight::from_parts(23_259_571, 0) .saturating_add(Weight::from_parts(0, 3922)) - // Standard Error: 4_404 - .saturating_add(Weight::from_parts(144_220, 0).saturating_mul(s.into())) - // Standard Error: 3 - .saturating_add(Weight::from_parts(1_053, 0).saturating_mul(z.into())) + // Standard Error: 477_625 + .saturating_add(Weight::from_parts(598_142, 0).saturating_mul(s.into())) + // Standard Error: 334 + .saturating_add(Weight::from_parts(1_942, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -103,15 +103,15 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> { /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `260 + s * (37 ±0)` + // Measured: `268 + s * (36 ±0)` // Estimated: `3922` - // Minimum execution time: 29_296_000 picoseconds. - Weight::from_parts(29_056_377, 0) + // Minimum execution time: 54_255_000 picoseconds. + Weight::from_parts(50_336_875, 0) .saturating_add(Weight::from_parts(0, 3922)) - // Standard Error: 7_069 - .saturating_add(Weight::from_parts(191_560, 0).saturating_mul(s.into())) - // Standard Error: 6 - .saturating_add(Weight::from_parts(1_055, 0).saturating_mul(z.into())) + // Standard Error: 202_613 + .saturating_add(Weight::from_parts(484_062, 0).saturating_mul(s.into())) + // Standard Error: 162 + .saturating_add(Weight::from_parts(996, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -120,13 +120,13 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> { /// The range of component `s` is `[2, 10]`. fn approve_as_multi_create(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `131 + s * (5 ±0)` + // Measured: `134 + s * (4 ±0)` // Estimated: `3922` - // Minimum execution time: 24_475_000 picoseconds. - Weight::from_parts(25_989_669, 0) + // Minimum execution time: 41_585_000 picoseconds. + Weight::from_parts(43_152_750, 0) .saturating_add(Weight::from_parts(0, 3922)) - // Standard Error: 11_138 - .saturating_add(Weight::from_parts(107_936, 0).saturating_mul(s.into())) + // Standard Error: 282_586 + .saturating_add(Weight::from_parts(53_625, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -137,26 +137,24 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `240` // Estimated: `3922` - // Minimum execution time: 13_931_000 picoseconds. - Weight::from_parts(14_642_004, 0) + // Minimum execution time: 24_560_000 picoseconds. + Weight::from_parts(20_280_625, 0) .saturating_add(Weight::from_parts(0, 3922)) - // Standard Error: 4_290 - .saturating_add(Weight::from_parts(168_058, 0).saturating_mul(s.into())) + // Standard Error: 125_216 + .saturating_add(Weight::from_parts(2_519_937, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: Multisig Multisigs (r:1 w:1) /// Proof: Multisig Multisigs (max_values: None, max_size: Some(457), added: 2932, mode: MaxEncodedLen) /// The range of component `s` is `[2, 10]`. - fn cancel_as_multi(s: u32, ) -> Weight { + fn cancel_as_multi(_s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `329 + s * (5 ±0)` + // Measured: `332 + s * (4 ±0)` // Estimated: `3922` - // Minimum execution time: 25_240_000 picoseconds. - Weight::from_parts(26_028_150, 0) + // Minimum execution time: 43_044_000 picoseconds. + Weight::from_parts(58_535_000, 0) .saturating_add(Weight::from_parts(0, 3922)) - // Standard Error: 5_956 - .saturating_add(Weight::from_parts(189_014, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/common/src/weights/pallet_oneshot_account.rs b/runtime/common/src/weights/pallet_oneshot_account.rs index 042ae758b..1139d09b9 100644 --- a/runtime/common/src/weights/pallet_oneshot_account.rs +++ b/runtime/common/src/weights/pallet_oneshot_account.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_oneshot_account` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -54,8 +54,8 @@ impl<T: frame_system::Config> pallet_oneshot_account::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 19_845_000 picoseconds. - Weight::from_parts(21_003_000, 0) + // Minimum execution time: 40_392_000 picoseconds. + Weight::from_parts(41_299_000, 0) .saturating_add(Weight::from_parts(0, 3507)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -70,8 +70,8 @@ impl<T: frame_system::Config> pallet_oneshot_account::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `242` // Estimated: `3707` - // Minimum execution time: 25_052_000 picoseconds. - Weight::from_parts(25_901_000, 0) + // Minimum execution time: 50_349_000 picoseconds. + Weight::from_parts(53_834_000, 0) .saturating_add(Weight::from_parts(0, 3707)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -86,8 +86,8 @@ impl<T: frame_system::Config> pallet_oneshot_account::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `306` // Estimated: `6192` - // Minimum execution time: 35_971_000 picoseconds. - Weight::from_parts(36_685_000, 0) + // Minimum execution time: 71_084_000 picoseconds. + Weight::from_parts(76_511_000, 0) .saturating_add(Weight::from_parts(0, 6192)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/runtime/common/src/weights/pallet_preimage.rs b/runtime/common/src/weights/pallet_preimage.rs index c5430a227..b789f054a 100644 --- a/runtime/common/src/weights/pallet_preimage.rs +++ b/runtime/common/src/weights/pallet_preimage.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_preimage` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -57,11 +57,11 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `104` // Estimated: `3548` - // Minimum execution time: 22_524_000 picoseconds. - Weight::from_parts(23_048_000, 0) + // Minimum execution time: 38_160_000 picoseconds. + Weight::from_parts(39_633_500, 0) .saturating_add(Weight::from_parts(0, 3548)) - // Standard Error: 1 - .saturating_add(Weight::from_parts(1_284, 0).saturating_mul(s.into())) + // Standard Error: 65 + .saturating_add(Weight::from_parts(2_347, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -74,11 +74,11 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3548` - // Minimum execution time: 13_218_000 picoseconds. - Weight::from_parts(13_666_000, 0) + // Minimum execution time: 25_789_000 picoseconds. + Weight::from_parts(51_365_500, 0) .saturating_add(Weight::from_parts(0, 3548)) - // Standard Error: 1 - .saturating_add(Weight::from_parts(1_283, 0).saturating_mul(s.into())) + // Standard Error: 59 + .saturating_add(Weight::from_parts(2_238, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -91,11 +91,11 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3548` - // Minimum execution time: 12_330_000 picoseconds. - Weight::from_parts(12_559_000, 0) + // Minimum execution time: 24_406_000 picoseconds. + Weight::from_parts(25_614_000, 0) .saturating_add(Weight::from_parts(0, 3548)) - // Standard Error: 1 - .saturating_add(Weight::from_parts(1_282, 0).saturating_mul(s.into())) + // Standard Error: 17 + .saturating_add(Weight::from_parts(2_811, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -107,8 +107,8 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `242` // Estimated: `3548` - // Minimum execution time: 37_006_000 picoseconds. - Weight::from_parts(39_180_000, 0) + // Minimum execution time: 60_607_000 picoseconds. + Weight::from_parts(70_545_000, 0) .saturating_add(Weight::from_parts(0, 3548)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -121,8 +121,8 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3548` - // Minimum execution time: 23_783_000 picoseconds. - Weight::from_parts(25_184_000, 0) + // Minimum execution time: 38_868_000 picoseconds. + Weight::from_parts(46_917_000, 0) .saturating_add(Weight::from_parts(0, 3548)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -133,8 +133,8 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `180` // Estimated: `3548` - // Minimum execution time: 20_838_000 picoseconds. - Weight::from_parts(22_760_000, 0) + // Minimum execution time: 30_541_000 picoseconds. + Weight::from_parts(37_066_000, 0) .saturating_add(Weight::from_parts(0, 3548)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -145,8 +145,8 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3548` - // Minimum execution time: 12_267_000 picoseconds. - Weight::from_parts(13_971_000, 0) + // Minimum execution time: 30_620_000 picoseconds. + Weight::from_parts(44_732_000, 0) .saturating_add(Weight::from_parts(0, 3548)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -157,8 +157,8 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3548` - // Minimum execution time: 9_167_000 picoseconds. - Weight::from_parts(10_284_000, 0) + // Minimum execution time: 32_593_000 picoseconds. + Weight::from_parts(48_836_000, 0) .saturating_add(Weight::from_parts(0, 3548)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -169,8 +169,8 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3548` - // Minimum execution time: 6_531_000 picoseconds. - Weight::from_parts(7_327_000, 0) + // Minimum execution time: 18_050_000 picoseconds. + Weight::from_parts(20_396_000, 0) .saturating_add(Weight::from_parts(0, 3548)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -183,8 +183,8 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3548` - // Minimum execution time: 22_599_000 picoseconds. - Weight::from_parts(23_941_000, 0) + // Minimum execution time: 34_145_000 picoseconds. + Weight::from_parts(38_096_000, 0) .saturating_add(Weight::from_parts(0, 3548)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -195,8 +195,8 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3548` - // Minimum execution time: 6_732_000 picoseconds. - Weight::from_parts(7_433_000, 0) + // Minimum execution time: 11_945_000 picoseconds. + Weight::from_parts(15_583_000, 0) .saturating_add(Weight::from_parts(0, 3548)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -207,8 +207,8 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3548` - // Minimum execution time: 6_543_000 picoseconds. - Weight::from_parts(7_065_000, 0) + // Minimum execution time: 16_740_000 picoseconds. + Weight::from_parts(19_662_000, 0) .saturating_add(Weight::from_parts(0, 3548)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/common/src/weights/pallet_provide_randomness.rs b/runtime/common/src/weights/pallet_provide_randomness.rs index d946aa15f..05a0b44f7 100644 --- a/runtime/common/src/weights/pallet_provide_randomness.rs +++ b/runtime/common/src/weights/pallet_provide_randomness.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_provide_randomness` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -64,8 +64,8 @@ impl<T: frame_system::Config> pallet_provide_randomness::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `235` // Estimated: `3700` - // Minimum execution time: 40_833_000 picoseconds. - Weight::from_parts(42_469_000, 0) + // Minimum execution time: 80_561_000 picoseconds. + Weight::from_parts(108_149_000, 0) .saturating_add(Weight::from_parts(0, 3700)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) @@ -85,13 +85,13 @@ impl<T: frame_system::Config> pallet_provide_randomness::WeightInfo for WeightIn /// The range of component `i` is `[1, 100]`. fn on_initialize(i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `383 + i * (59 ±0)` - // Estimated: `1869 + i * (2535 ±0)` - // Minimum execution time: 21_932_000 picoseconds. - Weight::from_parts(23_109_832, 0) - .saturating_add(Weight::from_parts(0, 1869)) - // Standard Error: 43_078 - .saturating_add(Weight::from_parts(8_992_389, 0).saturating_mul(i.into())) + // Measured: `375 + i * (59 ±0)` + // Estimated: `1860 + i * (2535 ±0)` + // Minimum execution time: 43_649_000 picoseconds. + Weight::from_parts(27_155_939, 0) + .saturating_add(Weight::from_parts(0, 1860)) + // Standard Error: 194_874 + .saturating_add(Weight::from_parts(16_862_060, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -119,13 +119,13 @@ impl<T: frame_system::Config> pallet_provide_randomness::WeightInfo for WeightIn /// The range of component `i` is `[1, 100]`. fn on_initialize_epoch(i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `393 + i * (59 ±0)` - // Estimated: `3859 + i * (2535 ±0)` - // Minimum execution time: 23_432_000 picoseconds. - Weight::from_parts(15_220_509, 0) - .saturating_add(Weight::from_parts(0, 3859)) - // Standard Error: 25_456 - .saturating_add(Weight::from_parts(9_233_304, 0).saturating_mul(i.into())) + // Measured: `385 + i * (59 ±0)` + // Estimated: `3850 + i * (2535 ±0)` + // Minimum execution time: 53_551_000 picoseconds. + Weight::from_parts(57_278_090, 0) + .saturating_add(Weight::from_parts(0, 3850)) + // Standard Error: 3_676_910 + .saturating_add(Weight::from_parts(19_046_909, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/runtime/common/src/weights/pallet_proxy.rs b/runtime/common/src/weights/pallet_proxy.rs index 26c3a13b3..e2de5c02f 100644 --- a/runtime/common/src/weights/pallet_proxy.rs +++ b/runtime/common/src/weights/pallet_proxy.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -53,13 +53,13 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[1, 31]`. fn proxy(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `157 + p * (37 ±0)` + // Measured: `155 + p * (37 ±0)` // Estimated: `4698` - // Minimum execution time: 12_728_000 picoseconds. - Weight::from_parts(13_637_861, 0) + // Minimum execution time: 25_631_000 picoseconds. + Weight::from_parts(26_675_316, 0) .saturating_add(Weight::from_parts(0, 4698)) - // Standard Error: 1_579 - .saturating_add(Weight::from_parts(31_925, 0).saturating_mul(p.into())) + // Standard Error: 114_144 + .saturating_add(Weight::from_parts(191_683, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: Proxy Proxies (r:1 w:0) @@ -72,15 +72,15 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[1, 31]`. fn proxy_announced(a: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `400 + a * (68 ±0) + p * (37 ±0)` + // Measured: `437 + a * (68 ±0) + p * (35 ±0)` // Estimated: `5690` - // Minimum execution time: 29_520_000 picoseconds. - Weight::from_parts(30_632_848, 0) + // Minimum execution time: 52_992_000 picoseconds. + Weight::from_parts(11_730_200, 0) .saturating_add(Weight::from_parts(0, 5690)) - // Standard Error: 2_268 - .saturating_add(Weight::from_parts(139_408, 0).saturating_mul(a.into())) - // Standard Error: 2_343 - .saturating_add(Weight::from_parts(22_833, 0).saturating_mul(p.into())) + // Standard Error: 592_609 + .saturating_add(Weight::from_parts(1_318_258, 0).saturating_mul(a.into())) + // Standard Error: 612_363 + .saturating_add(Weight::from_parts(1_363_300, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -90,17 +90,13 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn remove_announcement(a: u32, p: u32, ) -> Weight { + fn remove_announcement(_a: u32, _p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `323 + a * (68 ±0)` + // Measured: `361 + a * (68 ±0)` // Estimated: `5690` - // Minimum execution time: 19_192_000 picoseconds. - Weight::from_parts(19_779_454, 0) + // Minimum execution time: 36_348_000 picoseconds. + Weight::from_parts(45_209_200, 0) .saturating_add(Weight::from_parts(0, 5690)) - // Standard Error: 1_652 - .saturating_add(Weight::from_parts(138_956, 0).saturating_mul(a.into())) - // Standard Error: 1_707 - .saturating_add(Weight::from_parts(7_087, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -112,15 +108,15 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[1, 31]`. fn reject_announcement(a: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `323 + a * (68 ±0)` + // Measured: `361 + a * (68 ±0)` // Estimated: `5690` - // Minimum execution time: 19_260_000 picoseconds. - Weight::from_parts(19_937_008, 0) + // Minimum execution time: 32_605_000 picoseconds. + Weight::from_parts(41_767_616, 0) .saturating_add(Weight::from_parts(0, 5690)) - // Standard Error: 1_517 - .saturating_add(Weight::from_parts(136_142, 0).saturating_mul(a.into())) - // Standard Error: 1_568 - .saturating_add(Weight::from_parts(2_860, 0).saturating_mul(p.into())) + // Standard Error: 337_979 + .saturating_add(Weight::from_parts(142_145, 0).saturating_mul(a.into())) + // Standard Error: 349_245 + .saturating_add(Weight::from_parts(115_883, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -132,32 +128,28 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn announce(a: u32, p: u32, ) -> Weight { + fn announce(a: u32, _p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `332 + a * (68 ±0) + p * (37 ±0)` + // Measured: `296 + a * (70 ±0) + p * (35 ±0)` // Estimated: `5690` - // Minimum execution time: 27_771_000 picoseconds. - Weight::from_parts(27_960_189, 0) + // Minimum execution time: 49_970_000 picoseconds. + Weight::from_parts(53_871_883, 0) .saturating_add(Weight::from_parts(0, 5690)) - // Standard Error: 1_963 - .saturating_add(Weight::from_parts(116_138, 0).saturating_mul(a.into())) - // Standard Error: 2_029 - .saturating_add(Weight::from_parts(26_682, 0).saturating_mul(p.into())) + // Standard Error: 146_491 + .saturating_add(Weight::from_parts(272_483, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: Proxy Proxies (r:1 w:1) /// Proof: Proxy Proxies (max_values: None, max_size: Some(1233), added: 3708, mode: MaxEncodedLen) /// The range of component `p` is `[1, 31]`. - fn add_proxy(p: u32, ) -> Weight { + fn add_proxy(_p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `157 + p * (37 ±0)` + // Measured: `155 + p * (37 ±0)` // Estimated: `4698` - // Minimum execution time: 19_516_000 picoseconds. - Weight::from_parts(20_590_034, 0) + // Minimum execution time: 40_566_000 picoseconds. + Weight::from_parts(47_260_300, 0) .saturating_add(Weight::from_parts(0, 4698)) - // Standard Error: 1_782 - .saturating_add(Weight::from_parts(35_557, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -166,28 +158,26 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[1, 31]`. fn remove_proxy(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `157 + p * (37 ±0)` + // Measured: `155 + p * (37 ±0)` // Estimated: `4698` - // Minimum execution time: 19_762_000 picoseconds. - Weight::from_parts(20_785_822, 0) + // Minimum execution time: 41_275_000 picoseconds. + Weight::from_parts(41_844_616, 0) .saturating_add(Weight::from_parts(0, 4698)) - // Standard Error: 2_086 - .saturating_add(Weight::from_parts(34_931, 0).saturating_mul(p.into())) + // Standard Error: 386_747 + .saturating_add(Weight::from_parts(409_883, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: Proxy Proxies (r:1 w:1) /// Proof: Proxy Proxies (max_values: None, max_size: Some(1233), added: 3708, mode: MaxEncodedLen) /// The range of component `p` is `[1, 31]`. - fn remove_proxies(p: u32, ) -> Weight { + fn remove_proxies(_p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `157 + p * (37 ±0)` + // Measured: `155 + p * (37 ±0)` // Estimated: `4698` - // Minimum execution time: 17_445_000 picoseconds. - Weight::from_parts(18_792_946, 0) + // Minimum execution time: 35_764_000 picoseconds. + Weight::from_parts(47_260_516, 0) .saturating_add(Weight::from_parts(0, 4698)) - // Standard Error: 2_122 - .saturating_add(Weight::from_parts(37_138, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -198,8 +188,8 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `177` // Estimated: `4698` - // Minimum execution time: 20_915_000 picoseconds. - Weight::from_parts(22_633_674, 0) + // Minimum execution time: 44_405_000 picoseconds. + Weight::from_parts(71_055_316, 0) .saturating_add(Weight::from_parts(0, 4698)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -207,15 +197,13 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { /// Storage: Proxy Proxies (r:1 w:1) /// Proof: Proxy Proxies (max_values: None, max_size: Some(1233), added: 3708, mode: MaxEncodedLen) /// The range of component `p` is `[0, 30]`. - fn kill_pure(p: u32, ) -> Weight { + fn kill_pure(_p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `194 + p * (37 ±0)` + // Measured: `193 + p * (37 ±0)` // Estimated: `4698` - // Minimum execution time: 18_603_000 picoseconds. - Weight::from_parts(19_682_210, 0) + // Minimum execution time: 36_924_000 picoseconds. + Weight::from_parts(39_701_000, 0) .saturating_add(Weight::from_parts(0, 4698)) - // Standard Error: 1_709 - .saturating_add(Weight::from_parts(25_176, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/common/src/weights/pallet_quota.rs b/runtime/common/src/weights/pallet_quota.rs index 00d38cf18..2dd5ae83a 100644 --- a/runtime/common/src/weights/pallet_quota.rs +++ b/runtime/common/src/weights/pallet_quota.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_quota` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -54,8 +54,8 @@ impl<T: frame_system::Config> pallet_quota::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `11288` // Estimated: `12751` - // Minimum execution time: 8_866_000 picoseconds. - Weight::from_parts(9_243_000, 0) + // Minimum execution time: 20_999_000 picoseconds. + Weight::from_parts(33_078_000, 0) .saturating_add(Weight::from_parts(0, 12751)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -66,8 +66,8 @@ impl<T: frame_system::Config> pallet_quota::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `139` // Estimated: `3489` - // Minimum execution time: 4_916_000 picoseconds. - Weight::from_parts(5_113_000, 0) + // Minimum execution time: 9_664_000 picoseconds. + Weight::from_parts(10_321_000, 0) .saturating_add(Weight::from_parts(0, 3489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -80,8 +80,8 @@ impl<T: frame_system::Config> pallet_quota::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `139` // Estimated: `3591` - // Minimum execution time: 26_293_000 picoseconds. - Weight::from_parts(26_760_000, 0) + // Minimum execution time: 47_064_000 picoseconds. + Weight::from_parts(48_828_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -94,8 +94,8 @@ impl<T: frame_system::Config> pallet_quota::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `139` // Estimated: `3591` - // Minimum execution time: 26_253_000 picoseconds. - Weight::from_parts(26_944_000, 0) + // Minimum execution time: 46_343_000 picoseconds. + Weight::from_parts(71_066_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -106,8 +106,8 @@ impl<T: frame_system::Config> pallet_quota::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `43` // Estimated: `12751` - // Minimum execution time: 2_439_000 picoseconds. - Weight::from_parts(2_507_000, 0) + // Minimum execution time: 5_297_000 picoseconds. + Weight::from_parts(5_802_000, 0) .saturating_add(Weight::from_parts(0, 12751)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -121,13 +121,13 @@ impl<T: frame_system::Config> pallet_quota::WeightInfo for WeightInfo<T> { /// The range of component `i` is `[1, 256]`. fn on_process_refund_queue_elements(i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `164 + i * (44 ±0)` - // Estimated: `3628 + i * (44 ±0)` - // Minimum execution time: 29_238_000 picoseconds. - Weight::from_parts(43_929_651, 0) - .saturating_add(Weight::from_parts(0, 3628)) - // Standard Error: 4_101 - .saturating_add(Weight::from_parts(1_693_708, 0).saturating_mul(i.into())) + // Measured: `161 + i * (44 ±0)` + // Estimated: `3627 + i * (44 ±0)` + // Minimum execution time: 54_337_000 picoseconds. + Weight::from_parts(57_391_466, 0) + .saturating_add(Weight::from_parts(0, 3627)) + // Standard Error: 30_722 + .saturating_add(Weight::from_parts(2_727_533, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 44).saturating_mul(i.into())) diff --git a/runtime/common/src/weights/pallet_scheduler.rs b/runtime/common/src/weights/pallet_scheduler.rs index a90ebcf05..c792e151f 100644 --- a/runtime/common/src/weights/pallet_scheduler.rs +++ b/runtime/common/src/weights/pallet_scheduler.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -54,8 +54,8 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `30` // Estimated: `1489` - // Minimum execution time: 2_891_000 picoseconds. - Weight::from_parts(3_018_000, 0) + // Minimum execution time: 5_917_000 picoseconds. + Weight::from_parts(6_875_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -65,13 +65,13 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { /// The range of component `s` is `[0, 50]`. fn service_agenda_base(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `77 + s * (177 ±0)` + // Measured: `3 + s * (178 ±0)` // Estimated: `13928` - // Minimum execution time: 2_610_000 picoseconds. - Weight::from_parts(5_853_996, 0) + // Minimum execution time: 5_375_000 picoseconds. + Weight::from_parts(5_869_000, 0) .saturating_add(Weight::from_parts(0, 13928)) - // Standard Error: 1_809 - .saturating_add(Weight::from_parts(292_328, 0).saturating_mul(s.into())) + // Standard Error: 735_416 + .saturating_add(Weight::from_parts(1_431_610, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -79,8 +79,8 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_762_000 picoseconds. - Weight::from_parts(3_959_000, 0) + // Minimum execution time: 8_667_000 picoseconds. + Weight::from_parts(10_122_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: Preimage PreimageFor (r:1 w:1) @@ -90,13 +90,13 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { /// The range of component `s` is `[128, 4194304]`. fn service_task_fetched(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `179 + s * (1 ±0)` - // Estimated: `3644 + s * (1 ±0)` - // Minimum execution time: 16_132_000 picoseconds. - Weight::from_parts(16_389_000, 0) - .saturating_add(Weight::from_parts(0, 3644)) - // Standard Error: 5 - .saturating_add(Weight::from_parts(948, 0).saturating_mul(s.into())) + // Measured: `172 + s * (1 ±0)` + // Estimated: `3638 + s * (1 ±0)` + // Minimum execution time: 30_949_000 picoseconds. + Weight::from_parts(31_708_943, 0) + .saturating_add(Weight::from_parts(0, 3638)) + // Standard Error: 88 + .saturating_add(Weight::from_parts(2_164, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into())) @@ -107,8 +107,8 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_937_000 picoseconds. - Weight::from_parts(5_273_000, 0) + // Minimum execution time: 11_569_000 picoseconds. + Weight::from_parts(13_496_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -116,24 +116,24 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_653_000 picoseconds. - Weight::from_parts(3_995_000, 0) + // Minimum execution time: 8_803_000 picoseconds. + Weight::from_parts(10_347_000, 0) .saturating_add(Weight::from_parts(0, 0)) } fn execute_dispatch_signed() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_551_000 picoseconds. - Weight::from_parts(1_662_000, 0) + // Minimum execution time: 5_067_000 picoseconds. + Weight::from_parts(6_483_000, 0) .saturating_add(Weight::from_parts(0, 0)) } fn execute_dispatch_unsigned() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_567_000 picoseconds. - Weight::from_parts(1_777_000, 0) + // Minimum execution time: 4_837_000 picoseconds. + Weight::from_parts(6_432_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: Scheduler Agenda (r:1 w:1) @@ -141,13 +141,13 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { /// The range of component `s` is `[0, 49]`. fn schedule(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `77 + s * (177 ±0)` + // Measured: `3 + s * (178 ±0)` // Estimated: `13928` - // Minimum execution time: 9_220_000 picoseconds. - Weight::from_parts(12_600_434, 0) + // Minimum execution time: 19_912_000 picoseconds. + Weight::from_parts(21_702_500, 0) .saturating_add(Weight::from_parts(0, 13928)) - // Standard Error: 1_880 - .saturating_add(Weight::from_parts(308_121, 0).saturating_mul(s.into())) + // Standard Error: 44_424 + .saturating_add(Weight::from_parts(559_500, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -160,11 +160,11 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `77 + s * (177 ±0)` // Estimated: `13928` - // Minimum execution time: 12_859_000 picoseconds. - Weight::from_parts(13_421_155, 0) + // Minimum execution time: 24_537_000 picoseconds. + Weight::from_parts(24_737_234, 0) .saturating_add(Weight::from_parts(0, 13928)) - // Standard Error: 1_257 - .saturating_add(Weight::from_parts(461_381, 0).saturating_mul(s.into())) + // Standard Error: 23_186 + .saturating_add(Weight::from_parts(754_765, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -175,13 +175,13 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { /// The range of component `s` is `[0, 49]`. fn schedule_named(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `254 + s * (185 ±0)` + // Measured: `3 + s * (191 ±0)` // Estimated: `13928` - // Minimum execution time: 11_480_000 picoseconds. - Weight::from_parts(16_188_420, 0) + // Minimum execution time: 22_267_000 picoseconds. + Weight::from_parts(23_915_000, 0) .saturating_add(Weight::from_parts(0, 13928)) - // Standard Error: 2_689 - .saturating_add(Weight::from_parts(329_679, 0).saturating_mul(s.into())) + // Standard Error: 40_796 + .saturating_add(Weight::from_parts(637_887, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -192,13 +192,13 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { /// The range of component `s` is `[1, 50]`. fn cancel_named(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `280 + s * (185 ±0)` + // Measured: `101 + s * (188 ±0)` // Estimated: `13928` - // Minimum execution time: 14_857_000 picoseconds. - Weight::from_parts(15_863_631, 0) + // Minimum execution time: 26_099_000 picoseconds. + Weight::from_parts(26_618_969, 0) .saturating_add(Weight::from_parts(0, 13928)) - // Standard Error: 2_114 - .saturating_add(Weight::from_parts(483_128, 0).saturating_mul(s.into())) + // Standard Error: 30_479 + .saturating_add(Weight::from_parts(813_030, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/common/src/weights/pallet_session.rs b/runtime/common/src/weights/pallet_session.rs index 21f423020..4138b5b10 100644 --- a/runtime/common/src/weights/pallet_session.rs +++ b/runtime/common/src/weights/pallet_session.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -54,11 +54,11 @@ impl<T: frame_system::Config> pallet_session::WeightInfo for WeightInfo<T> { /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn set_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `722` - // Estimated: `11612` - // Minimum execution time: 23_858_000 picoseconds. - Weight::from_parts(24_487_000, 0) - .saturating_add(Weight::from_parts(0, 11612)) + // Measured: `723` + // Estimated: `11613` + // Minimum execution time: 37_945_000 picoseconds. + Weight::from_parts(40_868_000, 0) + .saturating_add(Weight::from_parts(0, 11613)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -68,11 +68,11 @@ impl<T: frame_system::Config> pallet_session::WeightInfo for WeightInfo<T> { /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn purge_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `411` - // Estimated: `3876` - // Minimum execution time: 14_302_000 picoseconds. - Weight::from_parts(15_421_000, 0) - .saturating_add(Weight::from_parts(0, 3876)) + // Measured: `412` + // Estimated: `3877` + // Minimum execution time: 22_999_000 picoseconds. + Weight::from_parts(23_845_000, 0) + .saturating_add(Weight::from_parts(0, 3877)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(5)) } diff --git a/runtime/common/src/weights/pallet_smith_members.rs b/runtime/common/src/weights/pallet_smith_members.rs index dac33fd74..b27fda004 100644 --- a/runtime/common/src/weights/pallet_smith_members.rs +++ b/runtime/common/src/weights/pallet_smith_members.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_smith_members` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -62,11 +62,11 @@ impl<T: frame_system::Config> pallet_smith_members::WeightInfo for WeightInfo<T> /// Proof Skipped: SmithMembers ExpiresOn (max_values: None, max_size: None, mode: Measured) fn invite_smith() -> Weight { // Proof Size summary in bytes: - // Measured: `731` - // Estimated: `6671` - // Minimum execution time: 26_669_000 picoseconds. - Weight::from_parts(27_834_000, 0) - .saturating_add(Weight::from_parts(0, 6671)) + // Measured: `732` + // Estimated: `6672` + // Minimum execution time: 61_398_000 picoseconds. + Weight::from_parts(63_088_000, 0) + .saturating_add(Weight::from_parts(0, 6672)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -78,8 +78,8 @@ impl<T: frame_system::Config> pallet_smith_members::WeightInfo for WeightInfo<T> // Proof Size summary in bytes: // Measured: `463` // Estimated: `3928` - // Minimum execution time: 14_692_000 picoseconds. - Weight::from_parts(15_306_000, 0) + // Minimum execution time: 31_273_000 picoseconds. + Weight::from_parts(32_005_000, 0) .saturating_add(Weight::from_parts(0, 3928)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -94,11 +94,11 @@ impl<T: frame_system::Config> pallet_smith_members::WeightInfo for WeightInfo<T> /// Proof Skipped: SmithMembers CurrentSession (max_values: Some(1), max_size: None, mode: Measured) fn certify_smith() -> Weight { // Proof Size summary in bytes: - // Measured: `576` - // Estimated: `6516` - // Minimum execution time: 22_975_000 picoseconds. - Weight::from_parts(23_677_000, 0) - .saturating_add(Weight::from_parts(0, 6516)) + // Measured: `577` + // Estimated: `6517` + // Minimum execution time: 47_601_000 picoseconds. + Weight::from_parts(48_286_000, 0) + .saturating_add(Weight::from_parts(0, 6517)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/common/src/weights/pallet_timestamp.rs b/runtime/common/src/weights/pallet_timestamp.rs index 428a4194f..f7376fb79 100644 --- a/runtime/common/src/weights/pallet_timestamp.rs +++ b/runtime/common/src/weights/pallet_timestamp.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -58,11 +58,11 @@ impl<T: frame_system::Config> pallet_timestamp::WeightInfo for WeightInfo<T> { /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) fn set() -> Weight { // Proof Size summary in bytes: - // Measured: `378` - // Estimated: `1863` - // Minimum execution time: 12_847_000 picoseconds. - Weight::from_parts(13_431_000, 0) - .saturating_add(Weight::from_parts(0, 1863)) + // Measured: `379` + // Estimated: `1864` + // Minimum execution time: 23_818_000 picoseconds. + Weight::from_parts(29_069_000, 0) + .saturating_add(Weight::from_parts(0, 1864)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -70,8 +70,8 @@ impl<T: frame_system::Config> pallet_timestamp::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `57` // Estimated: `0` - // Minimum execution time: 2_746_000 picoseconds. - Weight::from_parts(2_902_000, 0) + // Minimum execution time: 5_122_000 picoseconds. + Weight::from_parts(8_269_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/runtime/common/src/weights/pallet_treasury.rs b/runtime/common/src/weights/pallet_treasury.rs index d9358efce..977455753 100644 --- a/runtime/common/src/weights/pallet_treasury.rs +++ b/runtime/common/src/weights/pallet_treasury.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_treasury` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -52,8 +52,8 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 174_000 picoseconds. - Weight::from_parts(195_000, 0) + // Minimum execution time: 377_000 picoseconds. + Weight::from_parts(557_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: Treasury ProposalCount (r:1 w:1) @@ -62,10 +62,10 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { /// Proof: Treasury Proposals (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) fn propose_spend() -> Weight { // Proof Size summary in bytes: - // Measured: `104` + // Measured: `68` // Estimated: `1489` - // Minimum execution time: 21_044_000 picoseconds. - Weight::from_parts(21_732_000, 0) + // Minimum execution time: 35_505_000 picoseconds. + Weight::from_parts(38_046_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -76,10 +76,10 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) fn reject_proposal() -> Weight { // Proof Size summary in bytes: - // Measured: `246` + // Measured: `210` // Estimated: `3591` - // Minimum execution time: 31_073_000 picoseconds. - Weight::from_parts(31_829_000, 0) + // Minimum execution time: 50_438_000 picoseconds. + Weight::from_parts(77_399_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -91,13 +91,13 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[0, 99]`. fn approve_proposal(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `470 + p * (8 ±0)` + // Measured: `97 + p * (11 ±0)` // Estimated: `3557` - // Minimum execution time: 7_556_000 picoseconds. - Weight::from_parts(10_709_136, 0) + // Minimum execution time: 12_736_000 picoseconds. + Weight::from_parts(13_685_500, 0) .saturating_add(Weight::from_parts(0, 3557)) - // Standard Error: 1_003 - .saturating_add(Weight::from_parts(44_363, 0).saturating_mul(p.into())) + // Standard Error: 9_954 + .saturating_add(Weight::from_parts(55_005, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -105,10 +105,10 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) fn remove_approval() -> Weight { // Proof Size summary in bytes: - // Measured: `127` + // Measured: `90` // Estimated: `1887` - // Minimum execution time: 5_306_000 picoseconds. - Weight::from_parts(5_499_000, 0) + // Minimum execution time: 9_504_000 picoseconds. + Weight::from_parts(10_584_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -128,17 +128,16 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[0, 100]`. fn on_initialize_proposals(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + p * (195 ±0)` - // Estimated: `1887 + p * (5202 ±0)` - // Minimum execution time: 17_801_000 picoseconds. - Weight::from_parts(28_192_286, 0) - .saturating_add(Weight::from_parts(0, 1887)) - // Standard Error: 46_758 - .saturating_add(Weight::from_parts(32_560_787, 0).saturating_mul(p.into())) + // Measured: `6 + p * (194 ±0)` + // Estimated: `521190` + // Minimum execution time: 36_855_000 picoseconds. + Weight::from_parts(46_349_000, 0) + .saturating_add(Weight::from_parts(0, 521190)) + // Standard Error: 393_829 + .saturating_add(Weight::from_parts(47_248_945, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 5202).saturating_mul(p.into())) } } diff --git a/runtime/common/src/weights/pallet_universal_dividend.rs b/runtime/common/src/weights/pallet_universal_dividend.rs index 880fdb324..e1672e02e 100644 --- a/runtime/common/src/weights/pallet_universal_dividend.rs +++ b/runtime/common/src/weights/pallet_universal_dividend.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_universal_dividend` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -63,11 +63,11 @@ impl<T: frame_system::Config> pallet_universal_dividend::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `644` // Estimated: `4109` - // Minimum execution time: 29_405_000 picoseconds. - Weight::from_parts(30_738_460, 0) + // Minimum execution time: 57_414_000 picoseconds. + Weight::from_parts(60_597_685, 0) .saturating_add(Weight::from_parts(0, 4109)) - // Standard Error: 1_980 - .saturating_add(Weight::from_parts(17_883, 0).saturating_mul(i.into())) + // Standard Error: 32_554 + .saturating_add(Weight::from_parts(9_814, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -81,8 +81,8 @@ impl<T: frame_system::Config> pallet_universal_dividend::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `93` // Estimated: `3591` - // Minimum execution time: 60_882_000 picoseconds. - Weight::from_parts(61_667_000, 0) + // Minimum execution time: 105_908_000 picoseconds. + Weight::from_parts(109_471_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -97,8 +97,8 @@ impl<T: frame_system::Config> pallet_universal_dividend::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `93` // Estimated: `3591` - // Minimum execution time: 41_137_000 picoseconds. - Weight::from_parts(43_394_000, 0) + // Minimum execution time: 72_735_000 picoseconds. + Weight::from_parts(80_307_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -112,14 +112,13 @@ impl<T: frame_system::Config> pallet_universal_dividend::WeightInfo for WeightIn /// The range of component `i` is `[0, 160]`. fn on_removed_member(i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `215` + // Measured: `114` // Estimated: `3591` - // Minimum execution time: 3_796_000 picoseconds. - Weight::from_parts(19_953_042, 0) + // Minimum execution time: 7_661_000 picoseconds. + Weight::from_parts(8_259_500, 0) .saturating_add(Weight::from_parts(0, 3591)) - // Standard Error: 2_277 - .saturating_add(Weight::from_parts(11_222, 0).saturating_mul(i.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) + // Standard Error: 8_272 + .saturating_add(Weight::from_parts(206_050, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().reads(1)) } } diff --git a/runtime/common/src/weights/pallet_upgrade_origin.rs b/runtime/common/src/weights/pallet_upgrade_origin.rs index a9cb90c0b..6333adfe7 100644 --- a/runtime/common/src/weights/pallet_upgrade_origin.rs +++ b/runtime/common/src/weights/pallet_upgrade_origin.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_upgrade_origin` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -52,8 +52,8 @@ impl<T: frame_system::Config> pallet_upgrade_origin::WeightInfo for WeightInfo<T // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_176_000 picoseconds. - Weight::from_parts(6_617_000, 0) + // Minimum execution time: 17_982_000 picoseconds. + Weight::from_parts(28_253_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/runtime/common/src/weights/pallet_utility.rs b/runtime/common/src/weights/pallet_utility.rs index 9b49bbca5..73d4cb17a 100644 --- a/runtime/common/src/weights/pallet_utility.rs +++ b/runtime/common/src/weights/pallet_utility.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/duniter +// ./target/release/duniter // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=2 +// --repeat=2 // --pallet=* // --extrinsic=* // --execution=wasm @@ -53,18 +53,18 @@ impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_974_000 picoseconds. - Weight::from_parts(9_808_055, 0) + // Minimum execution time: 10_177_000 picoseconds. + Weight::from_parts(11_674_500, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_382 - .saturating_add(Weight::from_parts(3_551_851, 0).saturating_mul(c.into())) + // Standard Error: 27_396 + .saturating_add(Weight::from_parts(5_373_642, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_991_000 picoseconds. - Weight::from_parts(3_209_000, 0) + // Minimum execution time: 7_509_000 picoseconds. + Weight::from_parts(9_706_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -72,18 +72,18 @@ impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_945_000 picoseconds. - Weight::from_parts(8_576_607, 0) + // Minimum execution time: 10_566_000 picoseconds. + Weight::from_parts(11_745_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_454 - .saturating_add(Weight::from_parts(3_700_906, 0).saturating_mul(c.into())) + // Standard Error: 186_645 + .saturating_add(Weight::from_parts(5_786_628, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_354_000 picoseconds. - Weight::from_parts(6_688_000, 0) + // Minimum execution time: 20_582_000 picoseconds. + Weight::from_parts(29_829_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -91,10 +91,10 @@ impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_086_000 picoseconds. - Weight::from_parts(8_627_700, 0) + // Minimum execution time: 10_326_000 picoseconds. + Weight::from_parts(13_269_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_133 - .saturating_add(Weight::from_parts(3_568_588, 0).saturating_mul(c.into())) + // Standard Error: 721_799 + .saturating_add(Weight::from_parts(6_123_784, 0).saturating_mul(c.into())) } } diff --git a/runtime/gdev/tests/fixme_tests.rs b/runtime/gdev/tests/fixme_tests.rs deleted file mode 100644 index 17c622110..000000000 --- a/runtime/gdev/tests/fixme_tests.rs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2021 Axiom-Team -// -// This file is part of Duniter-v2S. -// -// Duniter-v2S is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, version 3 of the License. -// -// Duniter-v2S is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with Duniter-v2S. If not, see <https://www.gnu.org/licenses/>. - -// these integration tests show current behavior that is counter-intuitive or outside specs -// they should failed after the related issue is fixed - -mod common; - -use common::*; -// use frame_support::assert_ok; -use frame_support::assert_noop; -use gdev_runtime::*; -use pallet_membership::MembershipRemovalReason; -use sp_keyring::AccountKeyring; - -/// issue #136 -/// a smith should not be able to add a smith cert to an -/// identity who has no smith membership or pending membership -#[test] -fn can_add_smith_cert_without_pending_membership_or_membership() { - // this is fixed because membership request has been removed -} - -/// issue #136 -/// an identity should not be able to add cert -/// when its membership is suspended -#[test] -fn can_still_issue_cert_when_membership_lost() { - ExtBuilder::new(1, 3, 4).build().execute_with(|| { - run_to_block(1); - - // expire Bob membership - Membership::do_remove_membership(2, MembershipRemovalReason::System); - System::assert_has_event(RuntimeEvent::Membership( - pallet_membership::Event::MembershipRemoved { - member: 2, - reason: MembershipRemovalReason::System, - }, - )); - - // fixed :) - assert_noop!( - Certification::add_cert( - frame_system::RawOrigin::Signed(AccountKeyring::Bob.to_account_id()).into(), - 2, // Bob - 3, // Charlie - ), - pallet_duniter_wot::Error::<gdev_runtime::Runtime>::IssuerNotMember - ); - // // not anymore - // System::assert_has_event(RuntimeEvent::Cert( - // pallet_certification::Event::CertRenewed { - // issuer: 2, - // receiver: 3, - // }, - // )); - }); -} diff --git a/runtime/gdev/tests/integration_tests.rs b/runtime/gdev/tests/integration_tests.rs index 82e8bf5ed..10efd23dc 100644 --- a/runtime/gdev/tests/integration_tests.rs +++ b/runtime/gdev/tests/integration_tests.rs @@ -337,12 +337,10 @@ fn test_validate_identity_when_claim() { // eve gets certified by bob and charlie assert_ok!(Certification::add_cert( frame_system::RawOrigin::Signed(AccountKeyring::Bob.to_account_id()).into(), - 2, 5 )); assert_ok!(Certification::add_cert( frame_system::RawOrigin::Signed(AccountKeyring::Charlie.to_account_id()).into(), - 3, 5 )); @@ -435,12 +433,10 @@ fn test_identity_creation_workflow() { // eve gets certified by bob and charlie assert_ok!(Certification::add_cert( frame_system::RawOrigin::Signed(AccountKeyring::Bob.to_account_id()).into(), - 2, 5 )); assert_ok!(Certification::add_cert( frame_system::RawOrigin::Signed(AccountKeyring::Charlie.to_account_id()).into(), - 3, 5 )); // charlie also request distance evaluation for eve @@ -519,6 +515,32 @@ fn test_identity_creation_workflow() { }); } +/// an identity should not be able to add cert +/// when its membership is suspended +#[test] +fn test_can_not_issue_cert_when_membership_lost() { + ExtBuilder::new(1, 3, 4).build().execute_with(|| { + run_to_block(1); + // expire Bob membership + Membership::do_remove_membership(2, MembershipRemovalReason::System); + System::assert_has_event(RuntimeEvent::Membership( + pallet_membership::Event::MembershipRemoved { + member: 2, + reason: MembershipRemovalReason::System, + }, + )); + + // Bob can not issue a certification + assert_noop!( + Certification::add_cert( + frame_system::RawOrigin::Signed(AccountKeyring::Bob.to_account_id()).into(), + 3, + ), + pallet_duniter_wot::Error::<gdev_runtime::Runtime>::IssuerNotMember + ); + }); +} + /// test membership expiry #[test] fn test_membership_expiry() { @@ -1192,7 +1214,6 @@ fn test_validate_new_idty_after_few_uds() { run_to_block(23); assert_ok!(Certification::add_cert( frame_system::RawOrigin::Signed(AccountKeyring::Bob.to_account_id()).into(), - 2, 5, )); // valid distance status should trigger identity validation @@ -1252,7 +1273,6 @@ fn test_claim_memberhsip_after_few_uds() { run_to_block(23); assert_ok!(Certification::add_cert( frame_system::RawOrigin::Signed(AccountKeyring::Bob.to_account_id()).into(), - 2, 5, )); -- GitLab