diff --git a/.github/resources/frame-weight-template.hbs b/.github/resources/frame-weight-template.hbs index 720468548..3268d6061 100644 --- a/.github/resources/frame-weight-template.hbs +++ b/.github/resources/frame-weight-template.hbs @@ -48,64 +48,72 @@ pub trait WeightInfo { /// Weights for {{pallet}} using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl {{pallet}}::WeightInfo for SubstrateWeight { - {{#each benchmarks as |benchmark|}} - {{#each benchmark.comments as |comment|}} - // {{comment}} - {{/each}} - fn {{benchmark.name~}} - ( - {{~#each benchmark.components as |c| ~}} - {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} - ) -> Weight { - ({{underscore benchmark.base_weight}} as Weight) - {{#each benchmark.component_weight as |cw|}} - // Standard Error: {{underscore cw.error}} - .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)) - {{/each}} - {{#if (ne benchmark.base_reads "0")}} - .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight)) - {{/if}} - {{#each benchmark.component_reads as |cr|}} - .saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight))) - {{/each}} - {{#if (ne benchmark.base_writes "0")}} - .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight)) - {{/if}} - {{#each benchmark.component_writes as |cw|}} - .saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))) - {{/each}} - } - {{/each}} + {{#each benchmarks as |benchmark|}} + {{#each benchmark.comments as |comment|}} + // {{comment}} + {{/each}} + {{#each benchmark.component_ranges as |range|}} + /// The range of component `{{range.name}}` is `[{{range.min}}, {{range.max}}]`. + {{/each}} + fn {{benchmark.name~}} + ( + {{~#each benchmark.components as |c| ~}} + {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} + ) -> Weight { + // Minimum execution time: {{underscore benchmark.min_execution_time}} nanoseconds. + Weight::from_ref_time({{underscore benchmark.base_weight}}) + {{#each benchmark.component_weight as |cw|}} + // Standard Error: {{underscore cw.error}} + .saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into())) + {{/each}} + {{#if (ne benchmark.base_reads "0")}} + .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}})) + {{/if}} + {{#each benchmark.component_reads as |cr|}} + .saturating_add(T::DbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into()))) + {{/each}} + {{#if (ne benchmark.base_writes "0")}} + .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}})) + {{/if}} + {{#each benchmark.component_writes as |cw|}} + .saturating_add(T::DbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into()))) + {{/each}} + } + {{/each}} } // For backwards compatibility and tests impl WeightInfo for () { - {{#each benchmarks as |benchmark|}} - {{#each benchmark.comments as |comment|}} - // {{comment}} - {{/each}} - fn {{benchmark.name~}} - ( - {{~#each benchmark.components as |c| ~}} - {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} - ) -> Weight { - ({{underscore benchmark.base_weight}} as Weight) - {{#each benchmark.component_weight as |cw|}} - // Standard Error: {{underscore cw.error}} - .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)) - {{/each}} - {{#if (ne benchmark.base_reads "0")}} - .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as Weight)) - {{/if}} - {{#each benchmark.component_reads as |cr|}} - .saturating_add(RocksDbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight))) - {{/each}} - {{#if (ne benchmark.base_writes "0")}} - .saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as Weight)) - {{/if}} - {{#each benchmark.component_writes as |cw|}} - .saturating_add(RocksDbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))) - {{/each}} - } - {{/each}} + {{#each benchmarks as |benchmark|}} + {{#each benchmark.comments as |comment|}} + // {{comment}} + {{/each}} + {{#each benchmark.component_ranges as |range|}} + /// The range of component `{{range.name}}` is `[{{range.min}}, {{range.max}}]`. + {{/each}} + fn {{benchmark.name~}} + ( + {{~#each benchmark.components as |c| ~}} + {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} + ) -> Weight { + // Minimum execution time: {{underscore benchmark.min_execution_time}} nanoseconds. + Weight::from_ref_time({{underscore benchmark.base_weight}}) + {{#each benchmark.component_weight as |cw|}} + // Standard Error: {{underscore cw.error}} + .saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into())) + {{/each}} + {{#if (ne benchmark.base_reads "0")}} + .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}})) + {{/if}} + {{#each benchmark.component_reads as |cr|}} + .saturating_add(RocksDbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into()))) + {{/each}} + {{#if (ne benchmark.base_writes "0")}} + .saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}})) + {{/if}} + {{#each benchmark.component_writes as |cw|}} + .saturating_add(RocksDbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into()))) + {{/each}} + } + {{/each}} } diff --git a/.github/resources/xcm-weight-template.hbs b/.github/resources/xcm-weight-template.hbs index 88bceba4e..50c803ca8 100644 --- a/.github/resources/xcm-weight-template.hbs +++ b/.github/resources/xcm-weight-template.hbs @@ -45,22 +45,22 @@ impl WeightInfo { {{~#each benchmark.components as |c| ~}} {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} ) -> Weight { - ({{underscore benchmark.base_weight}} as Weight) + Weight::from_ref_time({{underscore benchmark.base_weight}}) {{#each benchmark.component_weight as |cw|}} // Standard Error: {{underscore cw.error}} - .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)) + .saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into())) {{/each}} {{#if (ne benchmark.base_reads "0")}} - .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight)) + .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}})) {{/if}} {{#each benchmark.component_reads as |cr|}} - .saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight))) + .saturating_add(T::DbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into()))) {{/each}} {{#if (ne benchmark.base_writes "0")}} - .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight)) + .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}})) {{/if}} {{#each benchmark.component_writes as |cw|}} - .saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))) + .saturating_add(T::DbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into()))) {{/each}} } {{/each}} diff --git a/.github/workflows/check_tests.yml b/.github/workflows/check_tests.yml index e27208436..2a6aef685 100644 --- a/.github/workflows/check_tests.yml +++ b/.github/workflows/check_tests.yml @@ -67,6 +67,9 @@ jobs: run: sccache --start-server - name: init run: | + sudo apt update + sudo apt install -y pkg-config libssl-dev protobuf-compiler + protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install stable @@ -189,6 +192,9 @@ jobs: run: sccache --start-server - name: init run: | + sudo apt update + sudo apt install -y pkg-config libssl-dev protobuf-compiler + protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install stable diff --git a/.github/workflows/integration_test_calamari.yml b/.github/workflows/integration_test_calamari.yml index eb043c25f..6740feea2 100644 --- a/.github/workflows/integration_test_calamari.yml +++ b/.github/workflows/integration_test_calamari.yml @@ -76,7 +76,8 @@ jobs: - name: init run: | sudo apt update - sudo apt install -y pkg-config libssl-dev yarn + sudo apt install -y pkg-config libssl-dev protobuf-compiler + protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install stable diff --git a/.github/workflows/integration_test_dolphin.yml b/.github/workflows/integration_test_dolphin.yml index 805bb260c..dda5dff1c 100644 --- a/.github/workflows/integration_test_dolphin.yml +++ b/.github/workflows/integration_test_dolphin.yml @@ -76,7 +76,8 @@ jobs: - name: init run: | sudo apt update - sudo apt install -y pkg-config libssl-dev + sudo apt install -y pkg-config libssl-dev protobuf-compiler + protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install stable diff --git a/.github/workflows/integration_test_manta.yml b/.github/workflows/integration_test_manta.yml index 9bf28f2a2..63723bc47 100644 --- a/.github/workflows/integration_test_manta.yml +++ b/.github/workflows/integration_test_manta.yml @@ -76,7 +76,8 @@ jobs: - name: init run: | sudo apt update - sudo apt install -y pkg-config libssl-dev yarn + sudo apt install -y pkg-config libssl-dev protobuf-compiler + protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install stable diff --git a/.github/workflows/metadata_diff.yml b/.github/workflows/metadata_diff.yml index 78642ad11..b56423590 100644 --- a/.github/workflows/metadata_diff.yml +++ b/.github/workflows/metadata_diff.yml @@ -71,6 +71,9 @@ jobs: run: sccache --start-server - name: init run: | + sudo apt update + sudo apt install -y pkg-config libssl-dev protobuf-compiler + protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install stable diff --git a/.github/workflows/publish_draft_releases.yml b/.github/workflows/publish_draft_releases.yml index 18968ed69..8c9d86d56 100644 --- a/.github/workflows/publish_draft_releases.yml +++ b/.github/workflows/publish_draft_releases.yml @@ -119,7 +119,8 @@ jobs: - name: init run: | sudo apt update - sudo apt install -y pkg-config libssl-dev + sudo apt install -y pkg-config libssl-dev protobuf-compiler + protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install stable diff --git a/.github/workflows/run_all_benchmarks.yml b/.github/workflows/run_all_benchmarks.yml index f2ee3b028..0802e72d0 100644 --- a/.github/workflows/run_all_benchmarks.yml +++ b/.github/workflows/run_all_benchmarks.yml @@ -58,6 +58,9 @@ jobs: run: sccache --start-server - name: init run: | + sudo apt update + sudo apt install -y pkg-config libssl-dev protobuf-compiler + protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install stable diff --git a/.github/workflows/run_linters.yml b/.github/workflows/run_linters.yml index 8f3ce4764..a26ee5b55 100644 --- a/.github/workflows/run_linters.yml +++ b/.github/workflows/run_linters.yml @@ -69,7 +69,11 @@ jobs: run: sccache --start-server - name: init rust toolchain # NOTE: We use nightly Rust only to get nightly fmt & clippy + # TODO: use nightly after https://github.com/clap-rs/clap/issues/4733 fixed. run: | + sudo apt update + sudo apt install -y pkg-config libssl-dev protobuf-compiler + protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install nightly-2023-03-13 diff --git a/.github/workflows/try-runtime-mainnet.yml b/.github/workflows/try-runtime-mainnet.yml index 328950cb9..5ad6a52ef 100644 --- a/.github/workflows/try-runtime-mainnet.yml +++ b/.github/workflows/try-runtime-mainnet.yml @@ -77,6 +77,9 @@ jobs: run: sccache --start-server - name: init run: | + sudo apt update + sudo apt install -y pkg-config libssl-dev protobuf-compiler + protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install stable diff --git a/Cargo.lock b/Cargo.lock index 5c172fdfc..423f2bfe4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -27,7 +27,7 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli 0.27.0", + "gimli 0.27.2", ] [[package]] @@ -36,13 +36,44 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "aead" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" +dependencies = [ + "generic-array 0.14.7", +] + [[package]] name = "aead" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", + "rand_core 0.6.4", +] + +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array 0.14.7", +] + +[[package]] +name = "aes" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" +dependencies = [ + "aes-soft", + "aesni", + "cipher 0.2.5", ] [[package]] @@ -51,33 +82,78 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cipher 0.3.0", "cpufeatures", "opaque-debug 0.3.0", ] +[[package]] +name = "aes" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" +dependencies = [ + "cfg-if", + "cipher 0.4.4", + "cpufeatures", +] + [[package]] name = "aes-gcm" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" dependencies = [ - "aead", - "aes", + "aead 0.4.3", + "aes 0.7.5", "cipher 0.3.0", - "ctr", - "ghash", + "ctr 0.8.0", + "ghash 0.4.4", + "subtle", +] + +[[package]] +name = "aes-gcm" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82e1366e0c69c9f927b1fa5ce2c7bf9eafc8f9268c0b9800729e8b267612447c" +dependencies = [ + "aead 0.5.2", + "aes 0.8.2", + "cipher 0.4.4", + "ctr 0.9.2", + "ghash 0.5.0", "subtle", ] +[[package]] +name = "aes-soft" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" +dependencies = [ + "cipher 0.2.5", + "opaque-debug 0.3.0", +] + +[[package]] +name = "aesni" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" +dependencies = [ + "cipher 0.2.5", + "opaque-debug 0.3.0", +] + [[package]] name = "ahash" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.9", "once_cell", "version_check", ] @@ -93,9 +169,9 @@ dependencies = [ [[package]] name = "always-assert" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf688625d06217d5b1bb0ea9d9c44a1635fd0ee3534466388d18203174f4d11" +checksum = "4436e0292ab1bb631b42973c61205e704475fe8126af845c8d923c0996328127" [[package]] name = "android_system_properties" @@ -115,11 +191,60 @@ dependencies = [ "winapi", ] +[[package]] +name = "anstream" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e579a7752471abc2a8268df8b20005e3eadd975f585398f17efcfd8d4927371" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" + +[[package]] +name = "anstyle-parse" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "anstyle-wincon" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bcd8291a340dd8ac70e18878bc4501dd7b4ff970cfa21c207d36ece51ea88fd" +dependencies = [ + "anstyle", + "windows-sys 0.48.0", +] + [[package]] name = "anyhow" -version = "1.0.68" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" +checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" [[package]] name = "approx" @@ -130,6 +255,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "arc-swap" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" + [[package]] name = "ark-bls12-381" version = "0.3.0" @@ -220,7 +351,7 @@ dependencies = [ "ark-serialize", "ark-std", "derivative", - "num-bigint 0.4.3", + "num-bigint", "num-traits", "paste", "rustc_version 0.3.3", @@ -234,7 +365,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" dependencies = [ "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -243,10 +374,10 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" dependencies = [ - "num-bigint 0.4.3", + "num-bigint", "num-traits", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -288,7 +419,7 @@ dependencies = [ "ark-relations", "ark-std", "derivative", - "num-bigint 0.4.3", + "num-bigint", "num-traits", "tracing", ] @@ -324,7 +455,7 @@ checksum = "8dd4e5f0bf8285d5ed538d27fab7411f3e297908fd93c62195de8bee3f199e82" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -349,19 +480,22 @@ dependencies = [ ] [[package]] -name = "arrayref" -version = "0.3.6" +name = "array-bytes" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" [[package]] -name = "arrayvec" -version = "0.4.12" +name = "array-bytes" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" -dependencies = [ - "nodrop", -] +checksum = "d9b1c5a481ec30a5abd8dfbd94ab5cf1bb4e9a66be7f1b3b322f2f1170c200fd" + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] name = "arrayvec" @@ -376,173 +510,122 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" [[package]] -name = "asn1_der" -version = "0.7.5" +name = "asn1-rs" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22d1f4b888c298a027c99dc9048015fac177587de20fc30232a057dfbe24a21" +checksum = "30ff05a702273012438132f449575dbc804e27b2f3cbe3069aa237d26c98fa33" +dependencies = [ + "asn1-rs-derive 0.1.0", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror", + "time 0.3.20", +] [[package]] -name = "assert_matches" -version = "1.5.0" +name = "asn1-rs" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" +checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" +dependencies = [ + "asn1-rs-derive 0.4.0", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror", + "time 0.3.20", +] [[package]] -name = "async-attributes" -version = "1.1.2" +name = "asn1-rs-derive" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" +checksum = "db8b7511298d5b7784b40b092d9e9dcd3a627a5707e4b5e507931ab0d44eeebf" dependencies = [ + "proc-macro2", "quote", - "syn", + "syn 1.0.109", + "synstructure", ] [[package]] -name = "async-channel" -version = "1.8.0" +name = "asn1-rs-derive" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" dependencies = [ - "concurrent-queue", - "event-listener", - "futures-core", + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure", ] [[package]] -name = "async-executor" -version = "1.5.0" +name = "asn1-rs-impl" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17adb73da160dfb475c183343c8cccd80721ea5a605d3eb57125f0a7b7a92d0b" +checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" dependencies = [ - "async-lock", - "async-task", - "concurrent-queue", - "fastrand", - "futures-lite", - "slab", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "async-global-executor" -version = "2.3.1" +name = "asn1_der" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" -dependencies = [ - "async-channel", - "async-executor", - "async-io", - "async-lock", - "blocking", - "futures-lite", - "once_cell", -] +checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" + +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "async-io" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c374dda1ed3e7d8f0d9ba58715f924862c63eae6849c92d3a18e7fbde9e2794" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ "async-lock", "autocfg", + "cfg-if", "concurrent-queue", "futures-lite", - "libc", "log", "parking", "polling", + "rustix 0.37.11", "slab", "socket2", "waker-fn", - "windows-sys", ] [[package]] name = "async-lock" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8101efe8695a6c17e02911402145357e718ac92d3ff88ae8419e84b1707b685" -dependencies = [ - "event-listener", - "futures-lite", -] - -[[package]] -name = "async-process" -version = "1.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6381ead98388605d0d9ff86371043b5aa922a3905824244de40dc263a14fcba4" +checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" dependencies = [ - "async-io", - "async-lock", - "autocfg", - "blocking", - "cfg-if 1.0.0", "event-listener", - "futures-lite", - "libc", - "signal-hook", - "windows-sys", -] - -[[package]] -name = "async-std" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" -dependencies = [ - "async-attributes", - "async-channel", - "async-global-executor", - "async-io", - "async-lock", - "async-process", - "crossbeam-utils", - "futures-channel", - "futures-core", - "futures-io", - "futures-lite", - "gloo-timers", - "kv-log-macro", - "log", - "memchr", - "once_cell", - "pin-project-lite 0.2.9", - "pin-utils", - "slab", - "wasm-bindgen-futures", -] - -[[package]] -name = "async-std-resolver" -version = "0.21.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f2f8a4a203be3325981310ab243a28e6e4ea55b6519bffce05d41ab60e09ad8" -dependencies = [ - "async-std", - "async-trait", - "futures-io", - "futures-util", - "pin-utils", - "socket2", - "trust-dns-resolver", ] -[[package]] -name = "async-task" -version = "4.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524" - [[package]] name = "async-trait" -version = "0.1.61" +version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "705339e0e4a9690e2908d2b3d049d85682cf19fbd5782494498fbf7003a6a282" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] @@ -560,15 +643,15 @@ dependencies = [ [[package]] name = "atomic-waker" -version = "1.0.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065374052e7df7ee4047b1160cca5e1467a12351a40b3da123c870ba0b8eda2a" +checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" [[package]] name = "attohttpc" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b85f766c20e6ae766956f7a2fcc4e0931e79a7e1f48b29132b5d647021114914" +checksum = "8d9a9bf8b79a749ee0b911b91b671cc2b6c670bdbc7e3dfd537576ddc94bb2a2" dependencies = [ "flate2", "http", @@ -594,20 +677,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "backoff" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" -dependencies = [ - "futures-core", - "getrandom 0.2.8", - "instant", - "pin-project-lite 0.2.9", - "rand 0.8.5", - "tokio", -] - [[package]] name = "backtrace" version = "0.3.67" @@ -616,10 +685,10 @@ checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ "addr2line 0.19.0", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide", - "object 0.30.1", + "object 0.30.3", "rustc-demangle", ] @@ -659,6 +728,12 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + [[package]] name = "beef" version = "0.5.2" @@ -671,28 +746,26 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ + "array-bytes 4.2.0", "async-trait", - "beefy-primitives", "fnv", - "futures 0.3.25", - "futures-timer", - "hex", + "futures 0.3.28", "log", "parity-scale-codec", "parking_lot 0.12.1", - "sc-chain-spec", "sc-client-api", "sc-consensus", - "sc-finality-grandpa", "sc-keystore", "sc-network", + "sc-network-common", "sc-network-gossip", "sc-utils", "sp-api", "sp-application-crypto", "sp-arithmetic", + "sp-beefy", "sp-blockchain", "sp-consensus", "sp-core", @@ -707,18 +780,17 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "beefy-gadget", - "beefy-primitives", - "futures 0.3.25", + "futures 0.3.28", "jsonrpsee", "log", "parity-scale-codec", "parking_lot 0.12.1", "sc-rpc", - "sc-utils", "serde", + "sp-beefy", "sp-core", "sp-runtime", "thiserror", @@ -727,32 +799,13 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" -dependencies = [ - "beefy-primitives", - "sp-api", -] - -[[package]] -name = "beefy-primitives" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "parity-scale-codec", - "scale-info", "sp-api", - "sp-application-crypto", - "sp-core", + "sp-beefy", "sp-runtime", - "sp-std", ] -[[package]] -name = "bimap" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0455254eb5c6964c4545d8bac815e1a1be4f3afe0ae695ea539c12d728d44b" - [[package]] name = "bincode" version = "1.3.3" @@ -764,9 +817,9 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.59.2" +version = "0.64.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8" +checksum = "c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4" dependencies = [ "bitflags", "cexpr", @@ -779,22 +832,23 @@ dependencies = [ "regex", "rustc-hash", "shlex", + "syn 1.0.109", ] [[package]] name = "bip32" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "873faa4363bfc54c36a48321da034c92a0645a363eed34d948683ffc1706e37f" +checksum = "b30ed1d6f8437a487a266c8293aeb95b61a23261273e3e02912cdb8b68bf798b" dependencies = [ "bs58", - "hmac 0.11.0", + "hmac 0.12.1", "k256", "once_cell", - "pbkdf2 0.9.0", + "pbkdf2 0.11.0", "rand_core 0.6.4", - "ripemd160", - "sha2 0.9.9", + "ripemd", + "sha2 0.10.6", "subtle", "zeroize", ] @@ -837,36 +891,26 @@ dependencies = [ "digest 0.10.6", ] -[[package]] -name = "blake2-rfc" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" -dependencies = [ - "arrayvec 0.4.12", - "constant_time_eq 0.1.5", -] - [[package]] name = "blake2b_simd" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72936ee4afc7f8f736d1c38383b56480b5497b4617b4a77bdbf1d2ababc76127" +checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc" dependencies = [ "arrayref", "arrayvec 0.7.2", - "constant_time_eq 0.1.5", + "constant_time_eq", ] [[package]] name = "blake2s_simd" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db539cc2b5f6003621f1cd9ef92d7ded8ea5232c7de0f9faa2de251cd98730d4" +checksum = "6637f448b9e61dfadbdcbae9a885fadee1f3eaffb1f8d3c1965d3ade8bdfd44f" dependencies = [ "arrayref", "arrayvec 0.7.2", - "constant_time_eq 0.1.5", + "constant_time_eq", ] [[package]] @@ -878,8 +922,8 @@ dependencies = [ "arrayref", "arrayvec 0.7.2", "cc", - "cfg-if 1.0.0", - "constant_time_eq 0.2.4", + "cfg-if", + "constant_time_eq", "digest 0.10.6", ] @@ -901,21 +945,30 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding 0.2.1", - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] name = "block-buffer" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] -name = "block-padding" +name = "block-modes" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0" +dependencies = [ + "block-padding 0.2.1", + "cipher 0.2.5", +] + +[[package]] +name = "block-padding" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" @@ -929,20 +982,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" -[[package]] -name = "blocking" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c67b173a56acffd6d2326fb7ab938ba0b00a71480e14902b2591c87bc5741e8" -dependencies = [ - "async-channel", - "async-lock", - "async-task", - "atomic-waker", - "fastrand", - "futures-lite", -] - [[package]] name = "bounded-vec" version = "0.6.0" @@ -974,9 +1013,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45ea9b00a7b3f2988e9a65ad3917e62123c38dba709b666506207be96d1790b" +checksum = "c3d4260bcc2e8fc9df1eac4919a720effeb63a3f0952f5bf4944adfa18897f09" dependencies = [ "memchr", "serde", @@ -993,9 +1032,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.11.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" [[package]] name = "byte-slice-cast" @@ -1011,9 +1050,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.12.3" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaa3a8d9a1ca92e282c96a32d6511b695d7d994d1d102ba85d279f9b2756947f" +checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" [[package]] name = "byteorder" @@ -1023,9 +1062,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "bzip2-sys" @@ -1121,7 +1160,7 @@ dependencies = [ "sp-std", "sp-transaction-pool", "sp-version", - "substrate-fixed", + "substrate-fixed 0.5.9 (git+https://github.com/Manta-Network/substrate-fixed.git)", "substrate-wasm-builder", "xcm", "xcm-builder", @@ -1150,9 +1189,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.2" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77df041dc383319cc661b428b6961a005db4d6808d5e12536931b1ca9556055" +checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2" dependencies = [ "serde", ] @@ -1174,20 +1213,31 @@ checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" dependencies = [ "camino", "cargo-platform", - "semver 1.0.16", + "semver 1.0.17", "serde", "serde_json", ] [[package]] name = "cc" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" dependencies = [ "jobserver", ] +[[package]] +name = "ccm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aca1a8fbc20b50ac9673ff014abfb2b5f4085ee1a850d408f14a159c5853ac7" +dependencies = [ + "aead 0.3.2", + "cipher 0.2.5", + "subtle", +] + [[package]] name = "cexpr" version = "0.6.0" @@ -1198,10 +1248,13 @@ dependencies = [ ] [[package]] -name = "cfg-if" -version = "0.1.10" +name = "cfg-expr" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +checksum = "0aacacf4d96c24b2ad6eb8ee6df040e4f27b0d0b39a5710c30091baa830485db" +dependencies = [ + "smallvec", +] [[package]] name = "cfg-if" @@ -1221,7 +1274,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c80e5460aa66fe3b91d40bcbdab953a597b60053e34d684ac6903f863b680a6" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cipher 0.3.0", "cpufeatures", "zeroize", @@ -1233,7 +1286,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a18446b09be63d457bbec447509e85f662f32952b035ce892290396bc0b0cff5" dependencies = [ - "aead", + "aead 0.4.3", "chacha20", "cipher 0.3.0", "poly1305", @@ -1242,15 +1295,15 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.23" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" dependencies = [ "iana-time-zone", "js-sys", "num-integer", "num-traits", - "time", + "time 0.1.45", "wasm-bindgen", "winapi", ] @@ -1263,25 +1316,34 @@ checksum = "f6ed9c8b2d17acb8110c46f1da5bf4a696d745e1474a16db0cd2b49cd0249bf2" dependencies = [ "core2", "multibase", - "multihash", + "multihash 0.16.3", "serde", "unsigned-varint", ] +[[package]] +name = "cipher" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" +dependencies = [ + "generic-array 0.14.7", +] + [[package]] name = "cipher" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] name = "cipher" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1873270f8f7942c191139cb8a40fd228da6c3fd2fc376d7e92d47aa14aeb59e" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common", "inout", @@ -1289,77 +1351,71 @@ dependencies = [ [[package]] name = "ckb-merkle-mountain-range" -version = "0.3.2" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f061f97d64fd1822664bdfb722f7ae5469a97b77567390f7442be5b5dc82a5b" +checksum = "56ccb671c5921be8a84686e6212ca184cb1d7c51cadcdbfcbd1cc3f042f5dfb8" dependencies = [ - "cfg-if 0.1.10", + "cfg-if", ] [[package]] name = "clang-sys" -version = "1.4.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa2e27ae6ab525c3d369ded447057bca5438d86dc3a68f6faafb8269ba82ebf3" +checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" dependencies = [ "glob", "libc", - "libloading 0.7.4", + "libloading", ] [[package]] name = "clap" -version = "3.2.23" +version = "4.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" +checksum = "9b802d85aaf3a1cdb02b224ba472ebdea62014fccfcb269b95a4d76443b5ee5a" dependencies = [ - "atty", - "bitflags", + "clap_builder", "clap_derive", - "clap_lex", - "indexmap", "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14a1a858f532119338887a4b8e1af9c60de8249cd7bafd68036a489e261e37b6" +dependencies = [ + "anstream", + "anstyle", + "bitflags", + "clap_lex", "strsim", - "termcolor", - "textwrap", ] [[package]] name = "clap_derive" -version = "3.2.18" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65" +checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4" dependencies = [ "heck", - "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] name = "clap_lex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] - -[[package]] -name = "cmake" -version = "0.1.49" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db34956e100b30725f2eb215f90d4871051239535632f84fea3bc92722c66b7c" -dependencies = [ - "cc", -] +checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" [[package]] name = "coarsetime" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "454038500439e141804c655b4cd1bc6a70bcb95cd2bc9463af5661b6956f0e46" +checksum = "a90d114103adbc625300f346d4d09dfb4ab1c4a8df6868435dd903392ecf4354" dependencies = [ "libc", "once_cell", @@ -1377,6 +1433,12 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + [[package]] name = "comfy-table" version = "6.1.4" @@ -1390,42 +1452,36 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7bef69dc86e3c610e4e7aed41035e2a7ed12e72dd7530f61327a6579a4390b" +checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" dependencies = [ "crossbeam-utils", ] [[package]] name = "console" -version = "0.15.4" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9b6515d269224923b26b5febea2ed42b2d5f2ce37284a4dd670fedd6cb8347a" +checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60" dependencies = [ "encode_unicode", "lazy_static", "libc", - "windows-sys", + "windows-sys 0.42.0", ] [[package]] name = "const-oid" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" - -[[package]] -name = "constant_time_eq" -version = "0.1.5" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" [[package]] name = "constant_time_eq" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3ad85c1f65dc7b37604eb0e89748faf0b9653065f2a8ef69f96a687ec1e9279" +checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" [[package]] name = "convert_case" @@ -1445,9 +1501,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "core2" @@ -1464,33 +1520,45 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", +] + +[[package]] +name = "cpu-time" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9e393a7668fe1fad3075085b86c781883000b4ede868f43627b34a87c8b7ded" +dependencies = [ + "libc", + "winapi", ] [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "280a9f2d8b3a38871a3c8a46fb80db65e5e5ed97da80c4d08bf27fb63e35e181" dependencies = [ "libc", ] [[package]] name = "cranelift-bforest" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "749d0d6022c9038dccf480bdde2a38d435937335bf2bb0f14e815d94517cdce8" +checksum = "52056f6d0584484b57fa6c1a65c1fcb15f3780d8b6a758426d9e3084169b2ddd" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94370cc7b37bf652ccd8bb8f09bd900997f7ccf97520edfc75554bb5c4abbea" +checksum = "18fed94c8770dc25d01154c3ffa64ed0b3ba9d583736f305fed7beebe5d9cf74" dependencies = [ + "arrayvec 0.7.2", + "bumpalo", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", @@ -1505,33 +1573,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a3cea8fdab90e44018c5b9a1dfd460d8ee265ac354337150222a354628bdb6" +checksum = "1c451b81faf237d11c7e4f3165eeb6bac61112762c5cfe7b4c0fb7241474358f" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ac72f76f2698598951ab26d8c96eaa854810e693e7dd52523958b5909fde6b2" +checksum = "e7c940133198426d26128f08be2b40b0bd117b84771fd36798969c4d712d81fc" [[package]] name = "cranelift-entity" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09eaeacfcd2356fe0e66b295e8f9d59fdd1ac3ace53ba50de14d628ec902f72d" +checksum = "87a0f1b2fdc18776956370cf8d9b009ded3f855350c480c1c52142510961f352" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dba69c9980d5ffd62c18a2bde927855fcd7c8dc92f29feaf8636052662cbd99c" +checksum = "34897538b36b216cc8dd324e73263596d51b8cf610da6498322838b2546baf8a" dependencies = [ "cranelift-codegen", "log", @@ -1541,15 +1609,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2920dc1e05cac40304456ed3301fde2c09bd6a9b0210bcfa2f101398d628d5b" +checksum = "1b2629a569fae540f16a76b70afcc87ad7decb38dc28fa6c648ac73b51e78470" [[package]] name = "cranelift-native" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04dfa45f9b2a6f587c564d6b63388e00cd6589d2df6ea2758cf79e1a13285e6" +checksum = "20937dab4e14d3e225c5adfc9c7106bafd4ac669bdb43027b911ff794c6fb318" dependencies = [ "cranelift-codegen", "libc", @@ -1558,9 +1626,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31a46513ae6f26f3f267d8d75b5373d555fbbd1e68681f348d99df43f747ec54" +checksum = "80fc2288957a94fd342a015811479de1837850924166d1f1856d8406e6f3609b" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -1572,46 +1640,61 @@ dependencies = [ "wasmtime-types", ] +[[package]] +name = "crc" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" + [[package]] name = "crc32fast" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.6" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.13" +version = "0.9.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" +checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" dependencies = [ "autocfg", - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", - "memoffset 0.7.1", + "memoffset 0.8.0", "scopeguard", ] @@ -1621,17 +1704,17 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.14" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" +checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -1642,11 +1725,11 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.3.2" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "rand_core 0.6.4", "subtle", "zeroize", @@ -1658,7 +1741,8 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", + "rand_core 0.6.4", "typenum 1.16.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1668,7 +1752,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle", ] @@ -1678,20 +1762,10 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle", ] -[[package]] -name = "ctor" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" -dependencies = [ - "quote", - "syn", -] - [[package]] name = "ctr" version = "0.8.0" @@ -1702,20 +1776,18 @@ dependencies = [ ] [[package]] -name = "cuckoofilter" -version = "0.5.0" +name = "ctr" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b810a8449931679f64cd7eef1bbd0fa315801b6d5d9cdc1ace2804d6529eee18" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "byteorder", - "fnv", - "rand 0.7.3", + "cipher 0.4.4", ] [[package]] name = "cumulus-client-cli" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ "clap", "parity-scale-codec", @@ -1730,13 +1802,12 @@ dependencies = [ [[package]] name = "cumulus-client-collator" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", "cumulus-primitives-core", - "cumulus-relay-chain-interface", - "futures 0.3.25", + "futures 0.3.28", "parity-scale-codec", "parking_lot 0.12.1", "polkadot-node-primitives", @@ -1754,12 +1825,12 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-aura" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ "async-trait", "cumulus-client-consensus-common", "cumulus-primitives-core", - "futures 0.3.25", + "futures 0.3.28", "parity-scale-codec", "sc-client-api", "sc-consensus", @@ -1783,17 +1854,19 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ "async-trait", + "cumulus-client-pov-recovery", + "cumulus-primitives-core", "cumulus-relay-chain-interface", "dyn-clone", - "futures 0.3.25", + "futures 0.3.28", + "log", "parity-scale-codec", "polkadot-primitives", "sc-client-api", "sc-consensus", - "sp-api", "sp-blockchain", "sp-consensus", "sp-runtime", @@ -1804,15 +1877,14 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-relay-chain" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ "async-trait", "cumulus-client-consensus-common", "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.25", + "futures 0.3.28", "parking_lot 0.12.1", - "sc-client-api", "sc-consensus", "sp-api", "sp-block-builder", @@ -1828,12 +1900,11 @@ dependencies = [ [[package]] name = "cumulus-client-network" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ "async-trait", "cumulus-relay-chain-interface", - "derive_more", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "parity-scale-codec", "parking_lot 0.12.1", @@ -1841,7 +1912,6 @@ dependencies = [ "polkadot-parachain", "polkadot-primitives", "sc-client-api", - "sp-api", "sp-blockchain", "sp-consensus", "sp-core", @@ -1853,11 +1923,11 @@ dependencies = [ [[package]] name = "cumulus-client-pov-recovery" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "parity-scale-codec", "polkadot-node-primitives", @@ -1867,7 +1937,6 @@ dependencies = [ "rand 0.8.5", "sc-client-api", "sc-consensus", - "sp-api", "sp-consensus", "sp-maybe-compressed-blob", "sp-runtime", @@ -1877,35 +1946,35 @@ dependencies = [ [[package]] name = "cumulus-client-service" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", "cumulus-client-consensus-common", "cumulus-client-pov-recovery", "cumulus-primitives-core", + "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", + "cumulus-relay-chain-minimal-node", + "futures 0.3.28", "parking_lot 0.12.1", - "polkadot-overseer", "polkadot-primitives", "sc-client-api", "sc-consensus", - "sc-consensus-babe", "sc-service", + "sc-sysinfo", "sc-telemetry", - "sc-tracing", "sp-api", "sp-blockchain", "sp-consensus", "sp-core", "sp-runtime", - "tracing", ] [[package]] name = "cumulus-pallet-dmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1917,13 +1986,12 @@ dependencies = [ "sp-runtime", "sp-std", "xcm", - "xcm-executor", ] [[package]] name = "cumulus-pallet-parachain-system" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", @@ -1934,11 +2002,9 @@ dependencies = [ "frame-system", "impl-trait-for-tuples", "log", - "pallet-balances", "parity-scale-codec", "polkadot-parachain", "scale-info", - "serde", "sp-core", "sp-externalities", "sp-inherents", @@ -1948,24 +2014,23 @@ dependencies = [ "sp-std", "sp-trie", "sp-version", - "xcm", ] [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "cumulus-pallet-session-benchmarking" version = "3.0.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ "frame-benchmarking", "frame-support", @@ -1979,14 +2044,13 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcm" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "serde", "sp-io", "sp-runtime", "sp-std", @@ -1996,7 +2060,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ "cumulus-primitives-core", "frame-benchmarking", @@ -2015,9 +2079,8 @@ dependencies = [ [[package]] name = "cumulus-primitives-core" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ - "frame-support", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain", @@ -2031,7 +2094,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2054,10 +2117,10 @@ dependencies = [ [[package]] name = "cumulus-primitives-timestamp" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ "cumulus-primitives-core", - "futures 0.3.25", + "futures 0.3.28", "parity-scale-codec", "sp-inherents", "sp-std", @@ -2067,18 +2130,14 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ "cumulus-primitives-core", "frame-support", "log", "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain", - "polkadot-primitives", "sp-runtime", "sp-std", - "sp-trie", "xcm", "xcm-builder", "xcm-executor", @@ -2087,75 +2146,110 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-inprocess-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "polkadot-cli", "polkadot-client", "polkadot-service", "sc-cli", "sc-client-api", - "sc-consensus-babe", - "sc-network", "sc-sysinfo", "sc-telemetry", "sc-tracing", "sp-api", - "sp-blockchain", "sp-consensus", "sp-core", "sp-runtime", "sp-state-machine", - "tracing", ] [[package]] name = "cumulus-relay-chain-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ "async-trait", "cumulus-primitives-core", - "derive_more", - "futures 0.3.25", + "futures 0.3.28", "jsonrpsee-core", "parity-scale-codec", - "parking_lot 0.12.1", "polkadot-overseer", "polkadot-service", "sc-client-api", "sp-api", "sp-blockchain", - "sp-core", - "sp-runtime", "sp-state-machine", "thiserror", + "tokio", +] + +[[package]] +name = "cumulus-relay-chain-minimal-node" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" +dependencies = [ + "array-bytes 6.1.0", + "async-trait", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "cumulus-relay-chain-rpc-interface", + "futures 0.3.28", + "lru", + "polkadot-core-primitives", + "polkadot-network-bridge", + "polkadot-node-network-protocol", + "polkadot-node-subsystem-util", + "polkadot-overseer", + "polkadot-primitives", + "polkadot-service", + "sc-authority-discovery", + "sc-client-api", + "sc-consensus", + "sc-keystore", + "sc-network", + "sc-network-common", + "sc-service", + "sc-telemetry", + "sc-tracing", + "sc-transaction-pool", + "sc-transaction-pool-api", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-runtime", + "tokio", + "tracing", + "url", ] [[package]] name = "cumulus-relay-chain-rpc-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ "async-trait", - "backoff", "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "jsonrpsee", + "lru", "parity-scale-codec", - "parking_lot 0.12.1", "polkadot-service", "sc-client-api", "sc-rpc-api", + "serde", + "serde_json", "sp-api", + "sp-authority-discovery", + "sp-consensus-babe", "sp-core", - "sp-runtime", "sp-state-machine", "sp-storage", "tokio", @@ -2166,7 +2260,7 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", @@ -2204,11 +2298,11 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.0.0-pre.5" +version = "4.0.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67bc65846be335cb20f4e52d49a437b773a2c1fdb42b19fc84e79e6f6771536f" +checksum = "8d4ba9852b42210c7538b75484f9daa0655e9a3ac04f693747bb0f02cf3cfe16" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fiat-crypto", "packed_simd_2", "platforms 3.0.2", @@ -2218,9 +2312,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.86" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d1075c37807dcf850c379432f0df05ba52cc30f279c5cfc43cc221ce7f8579" +checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" dependencies = [ "cc", "cxxbridge-flags", @@ -2230,9 +2324,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.86" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5044281f61b27bc598f2f6647d480aed48d2bf52d6eb0b627d84c0361b17aa70" +checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" dependencies = [ "cc", "codespan-reporting", @@ -2240,24 +2334,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn", + "syn 2.0.15", ] [[package]] name = "cxxbridge-flags" -version = "1.0.86" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61b50bc93ba22c27b0d31128d2d130a0a6b3d267ae27ef7e4fae2167dfe8781c" +checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" [[package]] name = "cxxbridge-macro" -version = "1.0.86" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e61fda7e62115119469c7b3591fd913ecca96fb766cfd3f2e2502ab7bc87a5" +checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] @@ -2266,8 +2360,18 @@ version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.13.4", + "darling_macro 0.13.4", +] + +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", ] [[package]] @@ -2281,7 +2385,21 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn", + "syn 1.0.109", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 1.0.109", ] [[package]] @@ -2290,9 +2408,20 @@ version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" dependencies = [ - "darling_core", + "darling_core 0.13.4", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2318,16 +2447,46 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db" dependencies = [ "data-encoding", - "syn", + "syn 1.0.109", ] [[package]] name = "der" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", + "pem-rfc7468", + "zeroize", +] + +[[package]] +name = "der-parser" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe398ac75057914d7d07307bf67dc7f3f574a26783b4fc7805a20ffa9f506e82" +dependencies = [ + "asn1-rs 0.3.1", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "der-parser" +version = "8.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +dependencies = [ + "asn1-rs 0.5.2", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", ] [[package]] @@ -2338,24 +2497,61 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] -name = "derive_more" -version = "0.99.17" +name = "derive_builder" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version 0.4.0", - "syn", + "derive_builder_macro", ] [[package]] -name = "digest" +name = "derive_builder_core" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" +dependencies = [ + "darling 0.14.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_builder_macro" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" +dependencies = [ + "derive_builder_core", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version 0.4.0", + "syn 1.0.109", +] + +[[package]] +name = "difflib" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" + +[[package]] +name = "digest" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" @@ -2369,7 +2565,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -2378,7 +2574,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.3", + "block-buffer 0.10.4", "crypto-common", "subtle", ] @@ -2398,7 +2594,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "dirs-sys-next", ] @@ -2425,13 +2621,14 @@ dependencies = [ ] [[package]] -name = "dns-parser" -version = "0.8.0" +name = "displaydoc" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" +checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886" dependencies = [ - "byteorder", - "quick-error", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] @@ -2468,6 +2665,7 @@ dependencies = [ "pallet-authorship", "pallet-balances", "pallet-collective", + "pallet-conviction-voting", "pallet-democracy", "pallet-manta-pay", "pallet-manta-sbt", @@ -2475,6 +2673,8 @@ dependencies = [ "pallet-membership", "pallet-multisig", "pallet-preimage", + "pallet-ranked-collective", + "pallet-referenda", "pallet-scheduler", "pallet-session", "pallet-sudo", @@ -2515,6 +2715,12 @@ dependencies = [ "xcm-executor", ] +[[package]] +name = "downcast" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" + [[package]] name = "downcast-rs" version = "1.2.0" @@ -2523,9 +2729,9 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "dtoa" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00704156a7de8df8da0911424e30c2049957b0a714542a44e05fe693dd85313" +checksum = "65d09067bfacaa79114679b279d7f5885b53295b1e2cfb4e79c8e4bd3d633169" [[package]] name = "dyn-clonable" @@ -2545,20 +2751,20 @@ checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "dyn-clone" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9b0705efd4599c15a38151f4721f7bc388306f61084d3bfd50bd07fbca5cb60" +checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" [[package]] name = "ecdsa" -version = "0.13.4" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ "der", "elliptic-curve", @@ -2568,9 +2774,9 @@ dependencies = [ [[package]] name = "ed25519" -version = "1.5.2" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" dependencies = [ "serde", "signature", @@ -2591,24 +2797,42 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ed25519-zebra" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" +dependencies = [ + "curve25519-dalek 3.2.0", + "hashbrown 0.12.3", + "hex", + "rand_core 0.6.4", + "sha2 0.9.9", + "zeroize", +] + [[package]] name = "either" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "elliptic-curve" -version = "0.11.12" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ "base16ct", "crypto-bigint", "der", + "digest 0.10.6", "ff", - "generic-array 0.14.6", + "generic-array 0.14.7", "group", + "hkdf", + "pem-rfc7468", + "pkcs8", "rand_core 0.6.4", "sec1", "subtle", @@ -2623,54 +2847,54 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.31" +version = "0.8.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" +checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] name = "enum-as-inner" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21cdad81446a7f7dc43f6a77409efeb9733d2fa65553efef6018ef257c959b73" +checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" dependencies = [ "heck", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "enumflags2" -version = "0.7.5" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e75d4cd21b95383444831539909fbb14b9dc3fdceb2a6f5d36577329a1f55ccb" +checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" dependencies = [ "enumflags2_derive", ] [[package]] name = "enumflags2_derive" -version = "0.7.4" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f58dc3c5e468259f19f2d46304a6b28f1c3d034442e14b322d2b850e36f6d5ae" +checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] name = "enumn" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88bcb3a067a6555d577aba299e75eff9942da276e6506fc6274327daa026132" +checksum = "48016319042fb7c87b78d2993084a831793a897a5cd1a2a67cab9d1eeb4b7d76" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] @@ -2716,6 +2940,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "errno" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "errno-dragonfly" version = "0.1.2" @@ -2738,7 +2973,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" dependencies = [ - "futures 0.3.25", + "futures 0.3.28", ] [[package]] @@ -2763,7 +2998,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2780,9 +3015,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fastrand" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" dependencies = [ "instant", ] @@ -2808,7 +3043,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "thiserror", ] @@ -2823,9 +3058,9 @@ dependencies = [ [[package]] name = "ff" -version = "0.11.1" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "131655483be284720a17d74ff97592b8e76576dc25563148601df2d7c9080924" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ "rand_core 0.6.4", "subtle", @@ -2833,9 +3068,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.1.17" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a214f5bb88731d436478f3ae1f8a277b62124089ba9fb67f4f93fb100ef73c90" +checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" [[package]] name = "file-per-thread-logger" @@ -2849,24 +3084,24 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.19" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e884668cd0c7480504233e951174ddc3b382f7c2666e3b7310b5c4e7b0c37f9" +checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "redox_syscall", - "windows-sys", + "redox_syscall 0.2.16", + "windows-sys 0.48.0", ] [[package]] name = "finality-grandpa" -version = "0.16.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e24e6c429951433ccb7c87fd528c60084834dcd14763182c1f83291bcde24c34" +checksum = "36530797b9bf31cd4ff126dcfee8170f86b00cfdcea3269d73133cc0415945c3" dependencies = [ "either", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "log", "num-traits", @@ -2877,9 +3112,9 @@ dependencies = [ [[package]] name = "fixed-hash" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", "rand 0.8.5", @@ -2904,6 +3139,15 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "float-cmp" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" +dependencies = [ + "num-traits", +] + [[package]] name = "fnv" version = "1.0.7" @@ -2928,7 +3172,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "parity-scale-codec", ] @@ -2942,10 +3186,16 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fragile" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" + [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-support", "frame-system", @@ -2957,6 +3207,7 @@ dependencies = [ "serde", "sp-api", "sp-application-crypto", + "sp-core", "sp-io", "sp-runtime", "sp-runtime-interface", @@ -2967,9 +3218,10 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "Inflector", + "array-bytes 4.2.0", "chrono", "clap", "comfy-table", @@ -2978,17 +3230,13 @@ dependencies = [ "frame-system", "gethostname", "handlebars", - "hash-db", - "hex", "itertools", - "kvdb", "lazy_static", "linked-hash-map", "log", - "memory-db", "parity-scale-codec", "rand 0.8.5", - "rand_pcg 0.3.1", + "rand_pcg", "sc-block-builder", "sc-cli", "sc-client-api", @@ -2998,7 +3246,6 @@ dependencies = [ "sc-sysinfo", "serde", "serde_json", - "serde_nanos", "sp-api", "sp-blockchain", "sp-core", @@ -3008,9 +3255,9 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-state-machine", + "sp-std", "sp-storage", "sp-trie", - "tempfile", "thiserror", "thousands", ] @@ -3018,18 +3265,18 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -3037,6 +3284,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-arithmetic", + "sp-core", "sp-npos-elections", "sp-runtime", "sp-std", @@ -3045,10 +3293,11 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-support", "frame-system", + "frame-try-runtime", "parity-scale-codec", "scale-info", "sp-core", @@ -3060,20 +3309,36 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "15.0.0" +version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6bb8542ef006ef0de09a5c4420787d79823c0ed7924225822362fd2bf2ff2d" +checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "parity-scale-codec", "scale-info", "serde", ] +[[package]] +name = "frame-remote-externalities" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" +dependencies = [ + "futures 0.3.28", + "log", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "substrate-rpc-client", + "tokio", +] + [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "bitflags", "frame-metadata", @@ -3098,47 +3363,50 @@ dependencies = [ "sp-state-machine", "sp-std", "sp-tracing", + "sp-weights", "tt-call", ] [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "Inflector", + "cfg-expr", "frame-support-procedural-tools", + "itertools", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-support", "log", @@ -3150,12 +3418,13 @@ dependencies = [ "sp-runtime", "sp-std", "sp-version", + "sp-weights", ] [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", @@ -3170,7 +3439,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "parity-scale-codec", "sp-api", @@ -3179,9 +3448,10 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-support", + "parity-scale-codec", "sp-api", "sp-runtime", "sp-std", @@ -3193,18 +3463,6 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541" -[[package]] -name = "fs-swap" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d47dad3685eceed8488986cad3d5027165ea5edb164331770e2059555f10a5" -dependencies = [ - "lazy_static", - "libc", - "libloading 0.5.2", - "winapi", -] - [[package]] name = "fs2" version = "0.4.3" @@ -3215,12 +3473,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "fs_extra" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394" - [[package]] name = "funty" version = "2.0.0" @@ -3235,9 +3487,9 @@ checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] name = "futures" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -3250,9 +3502,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -3260,15 +3512,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -3278,15 +3530,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-lite" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ "fastrand", "futures-core", @@ -3299,13 +3551,13 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] @@ -3315,21 +3567,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" dependencies = [ "futures-io", - "rustls", - "webpki", + "rustls 0.20.8", + "webpki 0.22.0", ] [[package]] name = "futures-sink" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-timer" @@ -3339,9 +3591,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures 0.1.31", "futures-channel", @@ -3376,9 +3628,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum 1.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "version_check", @@ -3400,20 +3652,18 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.0", - "js-sys", + "cfg-if", "libc", "wasi 0.9.0+wasi-snapshot-preview1", - "wasm-bindgen", ] [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.11.0+wasi-snapshot-preview1", ] @@ -3425,7 +3675,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" dependencies = [ "opaque-debug 0.3.0", - "polyval", + "polyval 0.5.3", +] + +[[package]] +name = "ghash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +dependencies = [ + "opaque-debug 0.3.0", + "polyval 0.6.0", ] [[package]] @@ -3441,9 +3701,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.0" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" +checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" [[package]] name = "gitignore" @@ -3467,29 +3727,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" dependencies = [ "aho-corasick", - "bstr 1.1.0", + "bstr 1.4.0", "fnv", "log", "regex", ] -[[package]] -name = "gloo-timers" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c4a8d6391675c6b2ee1a6c8d06e8e2d03605c44cec1270675985a4c2a5500b" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - [[package]] name = "group" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff", "rand_core 0.6.4", @@ -3498,9 +3746,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.15" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" +checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21" dependencies = [ "bytes", "fnv", @@ -3564,9 +3812,9 @@ dependencies = [ [[package]] name = "heck" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" @@ -3586,6 +3834,12 @@ dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" + [[package]] name = "hex" version = "0.4.3" @@ -3599,10 +3853,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" [[package]] -name = "hex_fmt" -version = "0.3.0" +name = "hkdf" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" +checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +dependencies = [ + "hmac 0.12.1", +] [[package]] name = "hmac" @@ -3624,6 +3881,15 @@ dependencies = [ "digest 0.9.0", ] +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.6", +] + [[package]] name = "hmac-drbg" version = "0.3.0" @@ -3631,7 +3897,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", - "generic-array 0.14.6", + "generic-array 0.14.7", "hmac 0.8.1", ] @@ -3648,9 +3914,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes", "fnv", @@ -3668,6 +3934,12 @@ dependencies = [ "pin-project-lite 0.2.9", ] +[[package]] +name = "http-range-header" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" + [[package]] name = "httparse" version = "1.8.0" @@ -3688,9 +3960,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.23" +version = "0.14.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" +checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" dependencies = [ "bytes", "futures-channel", @@ -3719,7 +3991,7 @@ dependencies = [ "http", "hyper", "log", - "rustls", + "rustls 0.20.8", "rustls-native-certs", "tokio", "tokio-rustls", @@ -3740,16 +4012,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.53" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "winapi", + "windows 0.48.0", ] [[package]] @@ -3801,20 +4073,21 @@ dependencies = [ [[package]] name = "if-watch" -version = "1.1.1" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "015a7df1eb6dda30df37f34b63ada9b7b352984b0e84de2a20ed526345000791" +checksum = "a9465340214b296cd17a0009acdb890d6160010b8adf8f78a00d0d7ab270f79f" dependencies = [ "async-io", "core-foundation", "fnv", - "futures 0.3.25", + "futures 0.3.28", "if-addrs", "ipnet", "log", "rtnetlink", "system-configuration", - "windows", + "tokio", + "windows 0.34.0", ] [[package]] @@ -3828,9 +4101,9 @@ dependencies = [ [[package]] name = "impl-serde" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4551f042f3438e64dbd6226b20527fc84a6e1fe65688b58746a2f53623f25f5c" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" dependencies = [ "serde", ] @@ -3843,14 +4116,14 @@ checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", @@ -3859,9 +4132,9 @@ dependencies = [ [[package]] name = "indoc" -version = "1.0.8" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da2d6f23ffea9d7e76c53eee25dfb67bcd8fde7f1198b0855350698c9f07c780" +checksum = "9f2cb48b81b1dc9f39676bf99f5499babfec7cd8fe14307f7b3d747208fb5690" [[package]] name = "inout" @@ -3869,7 +4142,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -3878,7 +4151,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -3897,10 +4170,23 @@ dependencies = [ ] [[package]] -name = "io-lifetimes" -version = "0.5.3" +name = "interceptor" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec58677acfea8a15352d42fc87d11d63596ade9239e0a7c9352914417515dbe6" +checksum = "1e8a11ae2da61704edada656798b61c94b35ecac2c58eb955156987d5e6be90b" +dependencies = [ + "async-trait", + "bytes", + "log", + "rand 0.8.5", + "rtcp", + "rtp", + "thiserror", + "tokio", + "waitgroup", + "webrtc-srtp", + "webrtc-util", +] [[package]] name = "io-lifetimes" @@ -3910,12 +4196,13 @@ checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" [[package]] name = "io-lifetimes" -version = "1.0.3" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46112a93252b123d31a119a8d1a1ac19deac4fac6e0e8b0df58f0d4e5870e63c" +checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" dependencies = [ + "hermit-abi 0.3.1", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -3938,20 +4225,20 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" +checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" [[package]] name = "is-terminal" -version = "0.4.2" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189" +checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ - "hermit-abi 0.2.6", - "io-lifetimes 1.0.3", - "rustix 0.36.6", - "windows-sys", + "hermit-abi 0.3.1", + "io-lifetimes 1.0.10", + "rustix 0.37.11", + "windows-sys 0.48.0", ] [[package]] @@ -3965,48 +4252,47 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "jobserver" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.60" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" dependencies = [ "wasm-bindgen", ] [[package]] name = "jsonrpsee" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd0d559d5e679b1ab2f869b486a11182923863b1b3ee8b421763cdd707b783a" +checksum = "7d291e3a5818a2384645fd9756362e6d89cf0541b0b916fa7702ea4a9833608e" dependencies = [ "jsonrpsee-core", - "jsonrpsee-http-server", "jsonrpsee-proc-macros", + "jsonrpsee-server", "jsonrpsee-types", "jsonrpsee-ws-client", - "jsonrpsee-ws-server", "tracing", ] [[package]] name = "jsonrpsee-client-transport" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8752740ecd374bcbf8b69f3e80b0327942df76f793f8d4e60d3355650c31fb74" +checksum = "965de52763f2004bc91ac5bcec504192440f0b568a5d621c59d9dbd6f886c3fb" dependencies = [ "futures-util", "http", @@ -4025,9 +4311,9 @@ dependencies = [ [[package]] name = "jsonrpsee-core" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3dc3e9cf2ba50b7b1d7d76a667619f82846caa39e8e8daa8a4962d74acaddca" +checksum = "a4e70b4439a751a5de7dd5ed55eacff78ebf4ffe0fc009cb1ebb11417f5b536b" dependencies = [ "anyhow", "arrayvec 0.7.2", @@ -4038,10 +4324,8 @@ dependencies = [ "futures-timer", "futures-util", "globset", - "http", "hyper", "jsonrpsee-types", - "lazy_static", "parking_lot 0.12.1", "rand 0.8.5", "rustc-hash", @@ -4051,45 +4335,48 @@ dependencies = [ "thiserror", "tokio", "tracing", - "tracing-futures", - "unicase", ] [[package]] -name = "jsonrpsee-http-server" -version = "0.15.1" +name = "jsonrpsee-proc-macros" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baa6da1e4199c10d7b1d0a6e5e8bd8e55f351163b6f4b3cbb044672a69bd4c1c" +dependencies = [ + "heck", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "jsonrpsee-server" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03802f0373a38c2420c70b5144742d800b509e2937edc4afb116434f07120117" +checksum = "1fb69dad85df79527c019659a992498d03f8495390496da2f07e6c24c2b356fc" dependencies = [ "futures-channel", "futures-util", + "http", "hyper", "jsonrpsee-core", "jsonrpsee-types", "serde", "serde_json", + "soketto", "tokio", + "tokio-stream", + "tokio-util", + "tower", "tracing", - "tracing-futures", -] - -[[package]] -name = "jsonrpsee-proc-macros" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd67957d4280217247588ac86614ead007b301ca2fa9f19c19f880a536f029e3" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", ] [[package]] name = "jsonrpsee-types" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e290bba767401b646812f608c099b922d8142603c9e73a50fb192d3ac86f4a0d" +checksum = "5bd522fe1ce3702fd94812965d7bb7a3364b1c9aba743944c5a00529aae80f8c" dependencies = [ "anyhow", "beef", @@ -4101,9 +4388,9 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ee5feddd5188e62ac08fcf0e56478138e581509d4730f3f7be9b57dd402a4ff" +checksum = "0b83daeecfc6517cfe210df24e570fb06213533dfb990318fae781f4c7119dd9" dependencies = [ "http", "jsonrpsee-client-transport", @@ -4111,38 +4398,17 @@ dependencies = [ "jsonrpsee-types", ] -[[package]] -name = "jsonrpsee-ws-server" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d488ba74fb369e5ab68926feb75a483458b88e768d44319f37e4ecad283c7325" -dependencies = [ - "futures-channel", - "futures-util", - "http", - "jsonrpsee-core", - "jsonrpsee-types", - "serde_json", - "soketto", - "tokio", - "tokio-stream", - "tokio-util", - "tracing", - "tracing-futures", -] - [[package]] name = "k256" -version = "0.10.4" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" +checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ecdsa", "elliptic-curve", - "sec1", - "sha2 0.9.9", - "sha3 0.9.1", + "sha2 0.10.6", + "sha3", ] [[package]] @@ -4156,10 +4422,9 @@ dependencies = [ [[package]] name = "kusama-runtime" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ - "beefy-primitives", "bitvec", "frame-benchmarking", "frame-election-provider-support", @@ -4180,17 +4445,19 @@ dependencies = [ "pallet-bounties", "pallet-child-bounties", "pallet-collective", + "pallet-conviction-voting", "pallet-democracy", "pallet-election-provider-multi-phase", "pallet-election-provider-support-benchmarking", "pallet-elections-phragmen", - "pallet-gilt", + "pallet-fast-unstake", "pallet-grandpa", "pallet-identity", "pallet-im-online", "pallet-indices", "pallet-membership", "pallet-multisig", + "pallet-nis", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", "pallet-nomination-pools-runtime-api", @@ -4198,13 +4465,14 @@ dependencies = [ "pallet-offences-benchmarking", "pallet-preimage", "pallet-proxy", + "pallet-ranked-collective", "pallet-recovery", + "pallet-referenda", "pallet-scheduler", "pallet-session", "pallet-session-benchmarking", "pallet-society", "pallet-staking", - "pallet-staking-reward-fn", "pallet-timestamp", "pallet-tips", "pallet-transaction-payment", @@ -4212,6 +4480,7 @@ dependencies = [ "pallet-treasury", "pallet-utility", "pallet-vesting", + "pallet-whitelist", "pallet-xcm", "pallet-xcm-benchmarks", "parity-scale-codec", @@ -4226,6 +4495,7 @@ dependencies = [ "sp-api", "sp-arithmetic", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -4249,58 +4519,45 @@ dependencies = [ [[package]] name = "kusama-runtime-constants" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", + "sp-core", "sp-runtime", -] - -[[package]] -name = "kv-log-macro" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" -dependencies = [ - "log", + "sp-weights", ] [[package]] name = "kvdb" -version = "0.11.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a301d8ecb7989d4a6e2c57a49baca77d353bdbf879909debe3f375fe25d61f86" +checksum = "e7d770dcb02bf6835887c3a979b5107a04ff4bbde97a5f0928d27404a155add9" dependencies = [ - "parity-util-mem", "smallvec", ] [[package]] name = "kvdb-memorydb" -version = "0.11.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece7e668abd21387aeb6628130a6f4c802787f014fa46bc83221448322250357" +checksum = "bf7a85fe66f9ff9cd74e169fdd2c94c6e1e74c412c99a73b4df3200b5d3760b2" dependencies = [ "kvdb", - "parity-util-mem", "parking_lot 0.12.1", ] [[package]] name = "kvdb-rocksdb" -version = "0.15.2" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca7fbdfd71cd663dceb0faf3367a99f8cf724514933e9867cec4995b6027cbc1" +checksum = "2182b8219fee6bd83aacaab7344e840179ae079d5216aa4e249b4d704646a844" dependencies = [ - "fs-swap", "kvdb", - "log", "num_cpus", - "owning_ref", - "parity-util-mem", "parking_lot 0.12.1", "regex", "rocksdb", @@ -4321,19 +4578,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - -[[package]] -name = "libloading" -version = "0.5.2" +version = "0.2.141" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" -dependencies = [ - "cc", - "winapi", -] +checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" [[package]] name = "libloading" @@ -4341,7 +4588,7 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "winapi", ] @@ -4359,22 +4606,17 @@ checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" [[package]] name = "libp2p" -version = "0.46.1" +version = "0.50.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81327106887e42d004fbdab1fef93675be2e2e07c1b95fce45e2cc813485611d" +checksum = "9c7b0104790be871edcf97db9bd2356604984e623a08d825c3f27852290266b8" dependencies = [ "bytes", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", - "getrandom 0.2.8", + "getrandom 0.2.9", "instant", - "lazy_static", - "libp2p-autonat", - "libp2p-core", - "libp2p-deflate", + "libp2p-core 0.38.0", "libp2p-dns", - "libp2p-floodsub", - "libp2p-gossipsub", "libp2p-identify", "libp2p-kad", "libp2p-mdns", @@ -4382,71 +4624,46 @@ dependencies = [ "libp2p-mplex", "libp2p-noise", "libp2p-ping", - "libp2p-plaintext", - "libp2p-pnet", - "libp2p-relay", - "libp2p-rendezvous", + "libp2p-quic", "libp2p-request-response", "libp2p-swarm", - "libp2p-swarm-derive", "libp2p-tcp", - "libp2p-uds", "libp2p-wasm-ext", + "libp2p-webrtc", "libp2p-websocket", "libp2p-yamux", - "multiaddr", + "multiaddr 0.16.0", "parking_lot 0.12.1", "pin-project", - "rand 0.7.3", "smallvec", ] -[[package]] -name = "libp2p-autonat" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4decc51f3573653a9f4ecacb31b1b922dd20c25a6322bb15318ec04287ec46f9" -dependencies = [ - "async-trait", - "futures 0.3.25", - "futures-timer", - "instant", - "libp2p-core", - "libp2p-request-response", - "libp2p-swarm", - "log", - "prost", - "prost-build", - "rand 0.8.5", -] - [[package]] name = "libp2p-core" -version = "0.34.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf9b94cefab7599b2d3dff2f93bee218c6621d68590b23ede4485813cbcece6" +checksum = "b6a8fcd392ff67af6cc3f03b1426c41f7f26b6b9aff2dc632c1c56dd649e571f" dependencies = [ "asn1_der", "bs58", "ed25519-dalek", "either", "fnv", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "instant", - "lazy_static", - "libsecp256k1", "log", - "multiaddr", - "multihash", + "multiaddr 0.16.0", + "multihash 0.16.3", "multistream-select", + "once_cell", "parking_lot 0.12.1", "pin-project", "prost", "prost-build", "rand 0.8.5", - "ring", "rw-stream-sink", + "sec1", "sha2 0.10.6", "smallvec", "thiserror", @@ -4456,118 +4673,106 @@ dependencies = [ ] [[package]] -name = "libp2p-deflate" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0183dc2a3da1fbbf85e5b6cf51217f55b14f5daea0c455a9536eef646bfec71" -dependencies = [ - "flate2", - "futures 0.3.25", - "libp2p-core", -] - -[[package]] -name = "libp2p-dns" -version = "0.34.0" +name = "libp2p-core" +version = "0.39.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cbf54723250fa5d521383be789bf60efdabe6bacfb443f87da261019a49b4b5" +checksum = "9b7f8b7d65c070a5a1b5f8f0510648189da08f787b8963f8e21219e0710733af" dependencies = [ - "async-std-resolver", - "futures 0.3.25", - "libp2p-core", + "either", + "fnv", + "futures 0.3.28", + "futures-timer", + "instant", + "libp2p-identity", "log", + "multiaddr 0.17.1", + "multihash 0.17.0", + "multistream-select", + "once_cell", "parking_lot 0.12.1", + "pin-project", + "quick-protobuf", + "rand 0.8.5", + "rw-stream-sink", "smallvec", - "trust-dns-resolver", + "thiserror", + "unsigned-varint", + "void", ] [[package]] -name = "libp2p-floodsub" -version = "0.37.0" +name = "libp2p-dns" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98a4b6ffd53e355775d24b76f583fdda54b3284806f678499b57913adb94f231" +checksum = "8e42a271c1b49f789b92f7fc87749fa79ce5c7bdc88cbdfacb818a4bca47fec5" dependencies = [ - "cuckoofilter", - "fnv", - "futures 0.3.25", - "libp2p-core", - "libp2p-swarm", + "futures 0.3.28", + "libp2p-core 0.38.0", "log", - "prost", - "prost-build", - "rand 0.7.3", + "parking_lot 0.12.1", "smallvec", + "trust-dns-resolver", ] [[package]] -name = "libp2p-gossipsub" -version = "0.39.0" +name = "libp2p-identify" +version = "0.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74b4b888cfbeb1f5551acd3aa1366e01bf88ede26cc3c4645d0d2d004d5ca7b0" +checksum = "c052d0026f4817b44869bfb6810f4e1112f43aec8553f2cb38881c524b563abf" dependencies = [ "asynchronous-codec", - "base64 0.13.1", - "byteorder", - "bytes", - "fnv", - "futures 0.3.25", - "hex_fmt", - "instant", - "libp2p-core", + "futures 0.3.28", + "futures-timer", + "libp2p-core 0.38.0", "libp2p-swarm", "log", - "prometheus-client", + "lru", "prost", "prost-build", - "rand 0.7.3", - "regex", - "sha2 0.10.6", + "prost-codec", "smallvec", - "unsigned-varint", - "wasm-timer", + "thiserror", + "void", ] [[package]] -name = "libp2p-identify" -version = "0.37.0" +name = "libp2p-identity" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c50b585518f8efd06f93ac2f976bd672e17cdac794644b3117edd078e96bda06" +checksum = "8a8ea433ae0cea7e3315354305237b9897afe45278b2118a7a57ca744e70fd27" dependencies = [ - "asynchronous-codec", - "futures 0.3.25", - "futures-timer", - "libp2p-core", - "libp2p-swarm", + "bs58", + "ed25519-dalek", "log", - "lru 0.7.8", + "multiaddr 0.17.1", + "multihash 0.17.0", "prost", - "prost-build", - "prost-codec", - "smallvec", + "quick-protobuf", + "rand 0.8.5", "thiserror", - "void", + "zeroize", ] [[package]] name = "libp2p-kad" -version = "0.38.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740862893bb5f06ac24acc9d49bdeadc3a5e52e51818a30a25c1f3519da2c851" +checksum = "2766dcd2be8c87d5e1f35487deb22d765f49c6ae1251b3633efe3b25698bd3d2" dependencies = [ "arrayvec 0.7.2", "asynchronous-codec", "bytes", "either", "fnv", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "instant", - "libp2p-core", + "libp2p-core 0.38.0", "libp2p-swarm", "log", "prost", "prost-build", - "rand 0.7.3", + "rand 0.8.5", "sha2 0.10.6", "smallvec", "thiserror", @@ -4578,278 +4783,257 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.38.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66e5e5919509603281033fd16306c61df7a4428ce274b67af5e14b07de5cdcb2" +checksum = "04f378264aade9872d6ccd315c0accc18be3a35d15fc1b9c36e5b6f983b62b5b" dependencies = [ - "async-io", "data-encoding", - "dns-parser", - "futures 0.3.25", + "futures 0.3.28", "if-watch", - "lazy_static", - "libp2p-core", + "libp2p-core 0.38.0", "libp2p-swarm", "log", "rand 0.8.5", "smallvec", "socket2", + "tokio", + "trust-dns-proto", "void", ] [[package]] name = "libp2p-metrics" -version = "0.7.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef8aff4a1abef42328fbb30b17c853fff9be986dc39af17ee39f9c5f755c5e0c" +checksum = "5ad8a64f29da86005c86a4d2728b8a0719e9b192f4092b609fd8790acb9dec55" dependencies = [ - "libp2p-core", - "libp2p-gossipsub", + "libp2p-core 0.38.0", "libp2p-identify", "libp2p-kad", "libp2p-ping", - "libp2p-relay", "libp2p-swarm", "prometheus-client", ] [[package]] name = "libp2p-mplex" -version = "0.34.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61fd1b20638ec209c5075dfb2e8ce6a7ea4ec3cd3ad7b77f7a477c06d53322e2" +checksum = "03805b44107aa013e7cbbfa5627b31c36cbedfdfb00603c0311998882bc4bace" dependencies = [ "asynchronous-codec", "bytes", - "futures 0.3.25", - "libp2p-core", + "futures 0.3.28", + "libp2p-core 0.38.0", "log", "nohash-hasher", "parking_lot 0.12.1", - "rand 0.7.3", + "rand 0.8.5", "smallvec", "unsigned-varint", ] [[package]] name = "libp2p-noise" -version = "0.37.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "762408cb5d84b49a600422d7f9a42c18012d8da6ebcd570f9a4a4290ba41fb6f" +checksum = "a978cb57efe82e892ec6f348a536bfbd9fee677adbe5689d7a93ad3a9bffbf2e" dependencies = [ "bytes", "curve25519-dalek 3.2.0", - "futures 0.3.25", - "lazy_static", - "libp2p-core", + "futures 0.3.28", + "libp2p-core 0.38.0", "log", + "once_cell", "prost", "prost-build", "rand 0.8.5", "sha2 0.10.6", "snow", "static_assertions", - "x25519-dalek", + "thiserror", + "x25519-dalek 1.1.1", "zeroize", ] [[package]] name = "libp2p-ping" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "100a6934ae1dbf8a693a4e7dd1d730fd60b774dafc45688ed63b554497c6c925" -dependencies = [ - "futures 0.3.25", - "futures-timer", - "instant", - "libp2p-core", - "libp2p-swarm", - "log", - "rand 0.7.3", - "void", -] - -[[package]] -name = "libp2p-plaintext" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be27bf0820a6238a4e06365b096d428271cce85a129cf16f2fe9eb1610c4df86" -dependencies = [ - "asynchronous-codec", - "bytes", - "futures 0.3.25", - "libp2p-core", - "log", - "prost", - "prost-build", - "unsigned-varint", - "void", -] - -[[package]] -name = "libp2p-pnet" -version = "0.22.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de160c5631696cea22be326c19bd9d306e254c4964945263aea10f25f6e0864e" -dependencies = [ - "futures 0.3.25", - "log", - "pin-project", - "rand 0.8.5", - "salsa20", - "sha3 0.10.6", -] - -[[package]] -name = "libp2p-relay" -version = "0.10.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4931547ee0cce03971ccc1733ff05bb0c4349fd89120a39e9861e2bbe18843c3" +checksum = "929fcace45a112536e22b3dcfd4db538723ef9c3cb79f672b98be2cc8e25f37f" dependencies = [ - "asynchronous-codec", - "bytes", - "either", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "instant", - "libp2p-core", + "libp2p-core 0.38.0", "libp2p-swarm", "log", - "pin-project", - "prost", - "prost-build", - "prost-codec", "rand 0.8.5", - "smallvec", - "static_assertions", - "thiserror", "void", ] [[package]] -name = "libp2p-rendezvous" -version = "0.7.0" +name = "libp2p-quic" +version = "0.7.0-alpha" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9511c9672ba33284838e349623319c8cad2d18cfad243ae46c6b7e8a2982ea4e" +checksum = "01e7c867e95c8130667b24409d236d37598270e6da69b3baf54213ba31ffca59" dependencies = [ - "asynchronous-codec", - "bimap", - "futures 0.3.25", + "bytes", + "futures 0.3.28", "futures-timer", - "instant", - "libp2p-core", - "libp2p-swarm", + "if-watch", + "libp2p-core 0.38.0", + "libp2p-tls", "log", - "prost", - "prost-build", + "parking_lot 0.12.1", + "quinn-proto", "rand 0.8.5", - "sha2 0.10.6", + "rustls 0.20.8", "thiserror", - "unsigned-varint", - "void", + "tokio", ] [[package]] name = "libp2p-request-response" -version = "0.19.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "508a189e2795d892c8f5c1fa1e9e0b1845d32d7b0b249dbf7b05b18811361843" +checksum = "3236168796727bfcf4927f766393415361e2c644b08bedb6a6b13d957c9a4884" dependencies = [ "async-trait", "bytes", - "futures 0.3.25", + "futures 0.3.28", "instant", - "libp2p-core", + "libp2p-core 0.38.0", "libp2p-swarm", "log", - "rand 0.7.3", + "rand 0.8.5", "smallvec", "unsigned-varint", ] [[package]] name = "libp2p-swarm" -version = "0.37.0" +version = "0.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ac5be6c2de2d1ff3f7693fda6faf8a827b1f3e808202277783fea9f527d114" +checksum = "b2a35472fe3276b3855c00f1c032ea8413615e030256429ad5349cdf67c6e1a0" dependencies = [ "either", "fnv", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "instant", - "libp2p-core", + "libp2p-core 0.38.0", + "libp2p-swarm-derive", "log", "pin-project", - "rand 0.7.3", + "rand 0.8.5", "smallvec", "thiserror", + "tokio", "void", ] [[package]] name = "libp2p-swarm-derive" -version = "0.28.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f54a64b6957249e0ce782f8abf41d97f69330d02bf229f0672d864f0650cc76" +checksum = "9d527d5827582abd44a6d80c07ff8b50b4ee238a8979e05998474179e79dc400" dependencies = [ + "heck", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "libp2p-tcp" -version = "0.34.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a6771dc19aa3c65d6af9a8c65222bfc8fcd446630ddca487acd161fa6096f3b" +checksum = "b4b257baf6df8f2df39678b86c578961d48cc8b68642a12f0f763f56c8e5858d" dependencies = [ - "async-io", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "if-watch", - "ipnet", "libc", - "libp2p-core", + "libp2p-core 0.38.0", "log", "socket2", + "tokio", ] [[package]] -name = "libp2p-uds" -version = "0.33.0" +name = "libp2p-tls" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d125e3e5f0d58f3c6ac21815b20cf4b6a88b8db9dc26368ea821838f4161fd4d" +checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" dependencies = [ - "async-std", - "futures 0.3.25", - "libp2p-core", - "log", + "futures 0.3.28", + "futures-rustls", + "libp2p-core 0.39.1", + "libp2p-identity", + "rcgen 0.10.0", + "ring", + "rustls 0.20.8", + "thiserror", + "webpki 0.22.0", + "x509-parser 0.14.0", + "yasna", ] [[package]] name = "libp2p-wasm-ext" -version = "0.34.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec894790eec3c1608f8d1a8a0bdf0dbeb79ed4de2dce964222011c2896dfa05a" +checksum = "1bb1a35299860e0d4b3c02a3e74e3b293ad35ae0cee8a056363b0c862d082069" dependencies = [ - "futures 0.3.25", + "futures 0.3.28", "js-sys", - "libp2p-core", + "libp2p-core 0.38.0", "parity-send-wrapper", "wasm-bindgen", "wasm-bindgen-futures", ] +[[package]] +name = "libp2p-webrtc" +version = "0.4.0-alpha" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb6cd86dd68cba72308ea05de1cebf3ba0ae6e187c40548167955d4e3970f6a" +dependencies = [ + "async-trait", + "asynchronous-codec", + "bytes", + "futures 0.3.28", + "futures-timer", + "hex", + "if-watch", + "libp2p-core 0.38.0", + "libp2p-noise", + "log", + "multihash 0.16.3", + "prost", + "prost-build", + "prost-codec", + "rand 0.8.5", + "rcgen 0.9.3", + "serde", + "stun", + "thiserror", + "tinytemplate", + "tokio", + "tokio-util", + "webrtc", +] + [[package]] name = "libp2p-websocket" -version = "0.36.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9808e57e81be76ff841c106b4c5974fb4d41a233a7bdd2afbf1687ac6def3818" +checksum = "1d705506030d5c0aaf2882437c70dab437605f21c5f9811978f694e6917a3b54" dependencies = [ "either", - "futures 0.3.25", + "futures 0.3.28", "futures-rustls", - "libp2p-core", + "libp2p-core 0.38.0", "log", "parking_lot 0.12.1", "quicksink", @@ -4861,12 +5045,13 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.38.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6dea686217a06072033dc025631932810e2f6ad784e4fafa42e27d311c7a81c" +checksum = "4f63594a0aa818642d9d4915c791945053877253f08a3626f13416b5cd928a29" dependencies = [ - "futures 0.3.25", - "libp2p-core", + "futures 0.3.28", + "libp2p-core 0.38.0", + "log", "parking_lot 0.12.1", "thiserror", "yamux", @@ -4874,9 +5059,9 @@ dependencies = [ [[package]] name = "librocksdb-sys" -version = "0.6.1+6.28.2" +version = "0.8.3+7.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bc587013734dadb7cf23468e531aa120788b87243648be42e2d3a072186291" +checksum = "557b255ff04123fcc176162f56ed0c9cd42d8f357cf55b3fabeb60f7413741b3" dependencies = [ "bindgen", "bzip2-sys", @@ -4980,12 +5165,6 @@ dependencies = [ "statrs 0.15.0", ] -[[package]] -name = "linux-raw-sys" -version = "0.0.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5284f00d480e1c39af34e72f8ad60b94f47007e3481cd3b731c1d67190ddc7b7" - [[package]] name = "linux-raw-sys" version = "0.0.46" @@ -4994,9 +5173,9 @@ checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" [[package]] name = "linux-raw-sys" -version = "0.1.4" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +checksum = "3f508063cc7bb32987c71511216bd5a32be15bccb6a80b52df8b9d7f01fc3aa2" [[package]] name = "lock_api" @@ -5014,17 +5193,7 @@ version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 1.0.0", - "value-bag", -] - -[[package]] -name = "lru" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" -dependencies = [ - "hashbrown 0.12.3", + "cfg-if", ] [[package]] @@ -5080,7 +5249,7 @@ version = "4.0.7" dependencies = [ "async-trait", "calamari-runtime", - "cfg-if 1.0.0", + "cfg-if", "clap", "cumulus-client-cli", "cumulus-client-consensus-aura", @@ -5092,11 +5261,12 @@ dependencies = [ "cumulus-primitives-parachain-inherent", "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", + "cumulus-relay-chain-minimal-node", "cumulus-relay-chain-rpc-interface", "dolphin-runtime", "frame-benchmarking", "frame-benchmarking-cli", - "futures 0.3.25", + "futures 0.3.28", "hex-literal", "jsonrpsee", "log", @@ -5117,6 +5287,7 @@ dependencies = [ "sc-chain-spec", "sc-cli", "sc-client-api", + "sc-client-db", "sc-consensus", "sc-consensus-aura", "sc-consensus-manual-seal", @@ -5124,6 +5295,7 @@ dependencies = [ "sc-executor", "sc-keystore", "sc-network", + "sc-network-common", "sc-rpc", "sc-rpc-api", "sc-service", @@ -5160,12 +5332,12 @@ dependencies = [ [[package]] name = "manta-accounting" -version = "0.5.13" -source = "git+https://github.com/manta-network/manta-rs.git?tag=v0.5.13#0c36f42a26d3955712ae371bf1bf85a7e2849264" +version = "0.5.15" +source = "git+https://github.com/manta-network/manta-rs.git?tag=v0.5.15#d5fb3502f4d492deaeb376dde013d3a12a729ee5" dependencies = [ "derivative", "derive_more", - "futures 0.3.25", + "futures 0.3.28", "indexmap", "manta-crypto", "manta-util", @@ -5204,8 +5376,8 @@ dependencies = [ [[package]] name = "manta-crypto" -version = "0.5.13" -source = "git+https://github.com/manta-network/manta-rs.git?tag=v0.5.13#0c36f42a26d3955712ae371bf1bf85a7e2849264" +version = "0.5.15" +source = "git+https://github.com/manta-network/manta-rs.git?tag=v0.5.15#d5fb3502f4d492deaeb376dde013d3a12a729ee5" dependencies = [ "ark-bls12-381", "ark-bn254", @@ -5230,8 +5402,8 @@ dependencies = [ [[package]] name = "manta-parameters" -version = "0.5.13" -source = "git+https://github.com/manta-network/manta-rs.git?tag=v0.5.13#0c36f42a26d3955712ae371bf1bf85a7e2849264" +version = "0.5.15" +source = "git+https://github.com/manta-network/manta-rs.git?tag=v0.5.15#d5fb3502f4d492deaeb376dde013d3a12a729ee5" dependencies = [ "anyhow", "attohttpc", @@ -5243,10 +5415,10 @@ dependencies = [ [[package]] name = "manta-pay" -version = "0.5.13" -source = "git+https://github.com/manta-network/manta-rs.git?tag=v0.5.13#0c36f42a26d3955712ae371bf1bf85a7e2849264" +version = "0.5.15" +source = "git+https://github.com/manta-network/manta-rs.git?tag=v0.5.15#d5fb3502f4d492deaeb376dde013d3a12a729ee5" dependencies = [ - "aes-gcm", + "aes-gcm 0.9.4", "bip32", "blake2 0.10.6", "derivative", @@ -5254,7 +5426,7 @@ dependencies = [ "manta-crypto", "manta-parameters", "manta-util", - "num-bigint 0.4.3", + "num-bigint", "parity-scale-codec", "scale-info", "tempfile", @@ -5359,8 +5531,8 @@ dependencies = [ [[package]] name = "manta-util" -version = "0.5.13" -source = "git+https://github.com/manta-network/manta-rs.git?tag=v0.5.13#0c36f42a26d3955712ae371bf1bf85a7e2849264" +version = "0.5.15" +source = "git+https://github.com/manta-network/manta-rs.git?tag=v0.5.15#d5fb3502f4d492deaeb376dde013d3a12a729ee5" dependencies = [ "crossbeam-channel", "serde", @@ -5384,9 +5556,9 @@ dependencies = [ [[package]] name = "matches" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "matrixmultiply" @@ -5397,6 +5569,15 @@ dependencies = [ "rawpointer", ] +[[package]] +name = "md-5" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" +dependencies = [ + "digest 0.10.6", +] + [[package]] name = "memchr" version = "2.5.0" @@ -5405,18 +5586,18 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memfd" -version = "0.4.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6627dc657574b49d6ad27105ed671822be56e0d2547d413bfbf3e8d8fa92e7a" +checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" dependencies = [ - "libc", + "rustix 0.37.11", ] [[package]] name = "memmap2" -version = "0.5.8" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" dependencies = [ "libc", ] @@ -5432,38 +5613,28 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" dependencies = [ "autocfg", ] [[package]] name = "memory-db" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6566c70c1016f525ced45d7b7f97730a2bafb037c788211d0c186ef5b2189f0a" +checksum = "5e0c7cba9ce19ac7ffd2053ac9f49843bbd3f4318feedfd74e85c19d5fb0ba66" dependencies = [ "hash-db", "hashbrown 0.12.3", - "parity-util-mem", -] - -[[package]] -name = "memory-lru" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce95ae042940bad7e312857b929ee3d11b8f799a80cb7b9c7ec5125516906395" -dependencies = [ - "lru 0.8.1", ] [[package]] name = "memory_units" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" +checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" [[package]] name = "merlin" @@ -5483,16 +5654,16 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69672161530e8aeca1d1400fbf3f1a1747ff60ea604265a4e906c2442df20532" dependencies = [ - "futures 0.3.25", + "futures 0.3.28", "rand 0.8.5", "thrift", ] [[package]] name = "mime" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "minimal-lexical" @@ -5511,33 +5682,108 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] -name = "more-asserts" -version = "0.2.2" +name = "mmr-gadget" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" +dependencies = [ + "futures 0.3.28", + "log", + "parity-scale-codec", + "sc-client-api", + "sc-offchain", + "sp-api", + "sp-beefy", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-mmr-primitives", + "sp-runtime", +] + +[[package]] +name = "mmr-rpc" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" +dependencies = [ + "anyhow", + "jsonrpsee", + "parity-scale-codec", + "serde", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-mmr-primitives", + "sp-runtime", +] + +[[package]] +name = "mockall" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" +dependencies = [ + "cfg-if", + "downcast", + "fragile", + "lazy_static", + "mockall_derive", + "predicates", + "predicates-tree", +] + +[[package]] +name = "mockall_derive" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" +checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" +dependencies = [ + "cfg-if", + "proc-macro2", + "quote", + "syn 1.0.109", +] [[package]] name = "multiaddr" -version = "0.14.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c580bfdd8803cce319b047d239559a22f809094aaea4ac13902a1fdcfcd4261" +checksum = "a4aebdb21e90f81d13ed01dc84123320838e53963c2ca94b60b305d3fa64f31e" +dependencies = [ + "arrayref", + "byteorder", + "data-encoding", + "multibase", + "multihash 0.16.3", + "percent-encoding", + "serde", + "static_assertions", + "unsigned-varint", + "url", +] + +[[package]] +name = "multiaddr" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b36f567c7099511fa8612bbbb52dda2419ce0bdbacf31714e3a5ffdb766d3bd" dependencies = [ "arrayref", - "bs58", "byteorder", "data-encoding", - "multihash", + "log", + "multibase", + "multihash 0.17.0", "percent-encoding", "serde", "static_assertions", @@ -5569,7 +5815,20 @@ dependencies = [ "digest 0.10.6", "multihash-derive", "sha2 0.10.6", - "sha3 0.10.6", + "sha3", + "unsigned-varint", +] + +[[package]] +name = "multihash" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" +dependencies = [ + "core2", + "digest 0.10.6", + "multihash-derive", + "sha2 0.10.6", "unsigned-varint", ] @@ -5583,7 +5842,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "synstructure", ] @@ -5595,12 +5854,12 @@ checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] name = "multistream-select" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "363a84be6453a70e63513660f4894ef815daf88e3356bffcda9ca27d810ce83b" +checksum = "c8552ab875c1313b97b8d20cb857b9fd63e2d1d6a0a1b53ce9821e575405f27a" dependencies = [ "bytes", - "futures 0.3.25", + "futures 0.3.28", "log", "pin-project", "smallvec", @@ -5617,7 +5876,7 @@ dependencies = [ "matrixmultiply", "nalgebra-macros", "num-complex", - "num-rational 0.4.1", + "num-rational", "num-traits", "rand 0.8.5", "rand_distr", @@ -5635,7 +5894,7 @@ dependencies = [ "matrixmultiply", "nalgebra-macros", "num-complex", - "num-rational 0.4.1", + "num-rational", "num-traits", "rand 0.8.5", "rand_distr", @@ -5651,7 +5910,7 @@ checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -5715,9 +5974,9 @@ dependencies = [ [[package]] name = "netlink-packet-utils" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25af9cf0dc55498b7bd94a1508af7a78706aa0ab715a73c5169273e03c84845e" +checksum = "0ede8a08c71ad5a95cdd0e4e52facd37190977039a4704eb82a283f713747d34" dependencies = [ "anyhow", "byteorder", @@ -5732,7 +5991,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65b4b14489ab424703c092062176d52ba55485a89c076b4f9db05092b7223aa6" dependencies = [ "bytes", - "futures 0.3.25", + "futures 0.3.28", "log", "netlink-packet-core", "netlink-sys", @@ -5742,27 +6001,27 @@ dependencies = [ [[package]] name = "netlink-sys" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92b654097027250401127914afb37cb1f311df6610a9891ff07a757e94199027" +checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" dependencies = [ - "async-io", "bytes", - "futures 0.3.25", + "futures 0.3.28", "libc", "log", + "tokio", ] [[package]] name = "nimbus-consensus" version = "0.9.0" -source = "git+https://github.com/manta-network/nimbus.git?tag=v4.0.1#7e8361067ab8c18dcb6765c26a6287c77b5a3b4f" +source = "git+https://github.com/manta-network/nimbus.git?tag=v4.0.7#a4775e81a2980df045e33e74638c212d804f5d2c" dependencies = [ "async-trait", "cumulus-client-consensus-common", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", - "futures 0.3.25", + "futures 0.3.28", "log", "nimbus-primitives", "parity-scale-codec", @@ -5787,7 +6046,7 @@ dependencies = [ [[package]] name = "nimbus-primitives" version = "0.9.0" -source = "git+https://github.com/manta-network/nimbus.git?tag=v4.0.1#7e8361067ab8c18dcb6765c26a6287c77b5a3b4f" +source = "git+https://github.com/manta-network/nimbus.git?tag=v4.0.7#a4775e81a2980df045e33e74638c212d804f5d2c" dependencies = [ "async-trait", "frame-benchmarking", @@ -5809,16 +6068,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" dependencies = [ "bitflags", - "cfg-if 1.0.0", + "cfg-if", "libc", + "memoffset 0.6.5", ] -[[package]] -name = "nodrop" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" - [[package]] name = "nohash-hasher" version = "0.2.0" @@ -5827,24 +6081,19 @@ checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" [[package]] name = "nom" -version = "7.1.2" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5507769c4919c998e69e49c839d9dc6e693ede4cc4290d6ad8b41d4f09c548c" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ "memchr", "minimal-lexical", ] [[package]] -name = "num-bigint" -version = "0.2.6" +name = "normalize-line-endings" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] +checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] name = "num-bigint" @@ -5859,9 +6108,9 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ae39348c8bc5fbd7f40c727a9925f03517afd2ab27d46702108b6a7e5414c19" +checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" dependencies = [ "num-traits", ] @@ -5886,18 +6135,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-rational" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" -dependencies = [ - "autocfg", - "num-bigint 0.2.6", - "num-integer", - "num-traits", -] - [[package]] name = "num-rational" version = "0.4.1" @@ -5905,6 +6142,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg", + "num-bigint", "num-integer", "num-traits", ] @@ -5931,30 +6169,48 @@ dependencies = [ [[package]] name = "object" -version = "0.28.4" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" +checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" dependencies = [ "crc32fast", - "hashbrown 0.11.2", + "hashbrown 0.12.3", "indexmap", "memchr", ] [[package]] name = "object" -version = "0.30.1" +version = "0.30.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d864c91689fdc196779b98dba0aceac6118594c2df6ee5d943eb6a8df4d107a" +checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" dependencies = [ "memchr", ] +[[package]] +name = "oid-registry" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e20717fa0541f39bd146692035c37bedfa532b3e5071b35761082407546b2a" +dependencies = [ + "asn1-rs 0.3.1", +] + +[[package]] +name = "oid-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +dependencies = [ + "asn1-rs 0.5.2", +] + [[package]] name = "once_cell" -version = "1.17.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" +checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" [[package]] name = "opaque-debug" @@ -5970,12 +6226,12 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.45" +version = "0.10.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1" +checksum = "7e30d8bc91859781f0a943411186324d580f2bbeb71b452fe91ae344806af3f1" dependencies = [ "bitflags", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -5985,13 +6241,13 @@ dependencies = [ [[package]] name = "openssl-macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] @@ -6002,11 +6258,10 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.80" +version = "0.9.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7" +checksum = "0d3d193fb1488ad46ffe3aaabc912cc931d02ee8518fe2959aea8ef52718b0c0" dependencies = [ - "autocfg", "cc", "libc", "pkg-config", @@ -6015,12 +6270,13 @@ dependencies = [ [[package]] name = "orchestra" -version = "0.0.1" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17e7d5b6bb115db09390bed8842c94180893dd83df3dfce7354f2a2aa090a4ee" dependencies = [ "async-trait", "dyn-clonable", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "orchestra-proc-macro", "pin-project", @@ -6031,8 +6287,9 @@ dependencies = [ [[package]] name = "orchestra-proc-macro" -version = "0.0.1" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2af4dabb2286b0be0e9711d2d24e25f6217048b71210cffd3daddc3b5c84e1f" dependencies = [ "expander 0.0.6", "itertools", @@ -6040,7 +6297,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -6055,7 +6312,7 @@ dependencies = [ [[package]] name = "orml-traits" version = "0.4.1-dev" -source = "git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.28#20969f385bf77e41386e8d8aa9626b003a306204" +source = "git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.37#05f0007b30c98303078ee64d34390233d6ffb30e" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -6073,7 +6330,7 @@ dependencies = [ [[package]] name = "orml-utilities" version = "0.4.1-dev" -source = "git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.28#20969f385bf77e41386e8d8aa9626b003a306204" +source = "git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.37#05f0007b30c98303078ee64d34390233d6ffb30e" dependencies = [ "frame-support", "parity-scale-codec", @@ -6087,7 +6344,7 @@ dependencies = [ [[package]] name = "orml-xcm-support" version = "0.4.1-dev" -source = "git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.28#20969f385bf77e41386e8d8aa9626b003a306204" +source = "git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.37#05f0007b30c98303078ee64d34390233d6ffb30e" dependencies = [ "frame-support", "orml-traits", @@ -6101,7 +6358,7 @@ dependencies = [ [[package]] name = "orml-xtokens" version = "0.4.1-dev" -source = "git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.28#20969f385bf77e41386e8d8aa9626b003a306204" +source = "git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.37#05f0007b30c98303078ee64d34390233d6ffb30e" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -6120,18 +6377,25 @@ dependencies = [ ] [[package]] -name = "os_str_bytes" -version = "6.4.1" +name = "p256" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" +checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" +dependencies = [ + "ecdsa", + "elliptic-curve", + "sha2 0.10.6", +] [[package]] -name = "owning_ref" -version = "0.4.1" +name = "p384" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" +checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" dependencies = [ - "stable_deref_trait", + "ecdsa", + "elliptic-curve", + "sha2 0.10.6", ] [[package]] @@ -6140,7 +6404,7 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1914cd452d8fccd6f9db48147b29fd4ae05bea9dc5d9ad578509f72415de282" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libm 0.1.4", ] @@ -6169,13 +6433,14 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", + "sp-core", "sp-runtime", "sp-std", ] @@ -6183,7 +6448,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-support", "frame-system", @@ -6199,7 +6464,7 @@ dependencies = [ [[package]] name = "pallet-aura-style-filter" version = "0.9.0" -source = "git+https://github.com/manta-network/nimbus.git?tag=v4.0.1#7e8361067ab8c18dcb6765c26a6287c77b5a3b4f" +source = "git+https://github.com/manta-network/nimbus.git?tag=v4.0.7#a4775e81a2980df045e33e74638c212d804f5d2c" dependencies = [ "frame-support", "frame-system", @@ -6215,7 +6480,7 @@ dependencies = [ [[package]] name = "pallet-author-inherent" version = "0.9.0" -source = "git+https://github.com/manta-network/nimbus.git?tag=v4.0.1#7e8361067ab8c18dcb6765c26a6287c77b5a3b4f" +source = "git+https://github.com/manta-network/nimbus.git?tag=v4.0.7#a4775e81a2980df045e33e74638c212d804f5d2c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6235,7 +6500,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-support", "frame-system", @@ -6251,7 +6516,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-support", "frame-system", @@ -6266,7 +6531,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", @@ -6290,7 +6555,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6310,7 +6575,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", @@ -6325,15 +6590,15 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "beefy-primitives", "frame-support", "frame-system", "pallet-session", "parity-scale-codec", "scale-info", "serde", + "sp-beefy", "sp-runtime", "sp-std", ] @@ -6341,13 +6606,12 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ + "array-bytes 4.2.0", "beefy-merkle-tree", - "beefy-primitives", "frame-support", "frame-system", - "hex", "log", "pallet-beefy", "pallet-mmr", @@ -6355,6 +6619,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", + "sp-beefy", "sp-core", "sp-io", "sp-runtime", @@ -6364,7 +6629,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", @@ -6382,7 +6647,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", @@ -6401,7 +6666,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", @@ -6415,17 +6680,36 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-conviction-voting" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" +dependencies = [ + "assert_matches", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "serde", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "serde", + "sp-core", "sp-io", "sp-runtime", "sp-std", @@ -6434,15 +6718,16 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-support", "frame-system", "log", + "pallet-election-provider-support-benchmarking", "parity-scale-codec", - "rand 0.7.3", + "rand 0.8.5", "scale-info", "sp-arithmetic", "sp-core", @@ -6450,14 +6735,13 @@ dependencies = [ "sp-npos-elections", "sp-runtime", "sp-std", - "static_assertions", "strum", ] [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6470,7 +6754,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", @@ -6486,24 +6770,27 @@ dependencies = [ ] [[package]] -name = "pallet-gilt" +name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", + "frame-election-provider-support", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", + "sp-io", "sp-runtime", + "sp-staking", "sp-std", ] [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", @@ -6526,7 +6813,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6542,7 +6829,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", @@ -6562,7 +6849,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", @@ -6639,7 +6926,7 @@ dependencies = [ "parity-scale-codec", "rand_chacha 0.3.1", "scale-info", - "sha3 0.10.6", + "sha3", "sp-api", "sp-blockchain", "sp-core", @@ -6678,7 +6965,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", @@ -6695,9 +6982,8 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "ckb-merkle-mountain-range", "frame-benchmarking", "frame-support", "frame-system", @@ -6711,31 +6997,33 @@ dependencies = [ ] [[package]] -name = "pallet-mmr-rpc" -version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +name = "pallet-multisig" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "jsonrpsee", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", "parity-scale-codec", - "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-mmr-primitives", + "scale-info", + "sp-io", "sp-runtime", + "sp-std", ] [[package]] -name = "pallet-multisig" +name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-io", + "sp-arithmetic", + "sp-core", "sp-runtime", "sp-std", ] @@ -6743,7 +7031,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-support", "frame-system", @@ -6760,7 +7048,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6772,6 +7060,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", + "sp-runtime-interface", "sp-staking", "sp-std", ] @@ -6779,7 +7068,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "parity-scale-codec", "sp-api", @@ -6789,7 +7078,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-support", "frame-system", @@ -6806,7 +7095,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6848,17 +7137,18 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-std", - "substrate-fixed", + "substrate-fixed 0.5.9 (git+https://github.com/Manta-Network/substrate-fixed.git?tag=v0.5.9)", ] [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-core", @@ -6870,13 +7160,31 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-ranked-collective" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", + "sp-arithmetic", + "sp-core", "sp-io", "sp-runtime", "sp-std", @@ -6885,13 +7193,32 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-referenda" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ + "assert_matches", "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", + "serde", + "sp-arithmetic", "sp-io", "sp-runtime", "sp-std", @@ -6900,7 +7227,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", @@ -6911,12 +7238,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "sp-weights", ] [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-support", "frame-system", @@ -6937,14 +7265,14 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "pallet-session", "pallet-staking", - "rand 0.7.3", + "rand 0.8.5", "sp-runtime", "sp-session", "sp-std", @@ -6953,7 +7281,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-support", "frame-system", @@ -6967,7 +7295,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6990,27 +7318,44 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "log", "sp-arithmetic", ] +[[package]] +name = "pallet-state-trie-migration" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-support", "frame-system", @@ -7024,7 +7369,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", @@ -7042,7 +7387,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", @@ -7061,7 +7406,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-support", "frame-system", @@ -7077,7 +7422,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -7087,23 +7432,25 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", + "sp-weights", ] [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "sp-api", "sp-runtime", + "sp-weights", ] [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", @@ -7137,7 +7484,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", @@ -7153,7 +7500,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-benchmarking", "frame-support", @@ -7165,10 +7512,25 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-whitelist" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-xcm" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "frame-support", "frame-system", @@ -7185,8 +7547,8 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "frame-benchmarking", "frame-support", @@ -7203,23 +7565,22 @@ dependencies = [ [[package]] name = "parachain-info" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#803de46cae9f84705fd5de3ced225793c4a520ce" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "serde", ] [[package]] name = "parity-db" -version = "0.3.17" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c8fdb726a43661fa54b43e7114e6b88b2289cae388eb3ad766d9d1754d83fce" +checksum = "00bfb81cf5c90a222db2fb7b3a7cbf8cc7f38dfb6647aca4d98edf8281f56ed5" dependencies = [ - "blake2-rfc", + "blake2 0.10.6", "crc32fast", "fs2", "hex", @@ -7229,14 +7590,15 @@ dependencies = [ "memmap2", "parking_lot 0.12.1", "rand 0.8.5", + "siphasher", "snap", ] [[package]] name = "parity-scale-codec" -version = "3.2.1" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "366e44391a8af4cfd6002ef6ba072bae071a96aafca98d7d448a34c5dca38b6a" +checksum = "637935964ff85a605d114591d4d2c13c5d1ba2806dae97cea6bf180238a749ac" dependencies = [ "arrayvec 0.7.2", "bitvec", @@ -7249,14 +7611,14 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.1.3" +version = "3.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9299338969a3d2f491d65f140b00ddec470858402f888af98e8642fb5e8965cd" +checksum = "86b26a931f824dd4eca30b3e43bb4f31cd5f0d3a403c5f5ff27106b805bfde7b" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -7265,53 +7627,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" -[[package]] -name = "parity-util-mem" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c32561d248d352148124f036cac253a644685a21dc9fea383eb4907d7bd35a8f" -dependencies = [ - "cfg-if 1.0.0", - "hashbrown 0.12.3", - "impl-trait-for-tuples", - "parity-util-mem-derive", - "parking_lot 0.12.1", - "primitive-types", - "smallvec", - "winapi", -] - -[[package]] -name = "parity-util-mem-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" -dependencies = [ - "proc-macro2", - "syn", - "synstructure", -] - -[[package]] -name = "parity-wasm" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ad52817c4d343339b3bc2e26861bd21478eda0b7509acf83505727000512ac" -dependencies = [ - "byteorder", -] - [[package]] name = "parity-wasm" -version = "0.42.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" +checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] name = "parking" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" +checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" [[package]] name = "parking_lot" @@ -7331,7 +7657,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.5", + "parking_lot_core 0.9.7", ] [[package]] @@ -7340,41 +7666,32 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "instant", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", "winapi", ] [[package]] name = "parking_lot_core" -version = "0.9.5" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff9f3fef3968a3ec5945535ed654cb38ff72d7495a25619e2247fb15a2ed9ba" +checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] name = "paste" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" - -[[package]] -name = "pbkdf2" -version = "0.4.0" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" -dependencies = [ - "crypto-mac 0.8.0", -] +checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" [[package]] name = "pbkdf2" @@ -7387,11 +7704,11 @@ dependencies = [ [[package]] name = "pbkdf2" -version = "0.9.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f05894bce6a1ba4be299d0c5f29563e08af2bc18bb7d48313113bed71e904739" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ - "crypto-mac 0.11.1", + "digest 0.10.6", ] [[package]] @@ -7400,6 +7717,24 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "pem-rfc7468" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d159833a9105500e0398934e205e0773f0b27529557134ecfc51c27646adac" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" version = "2.2.0" @@ -7408,9 +7743,9 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pest" -version = "2.5.2" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f6e86fb9e7026527a0d46bc308b841d73170ef8f443e1807f6ef88526a816d4" +checksum = "7b1403e8401ad5dedea73c626b99758535b342502f8d1e361f4a2dd952749122" dependencies = [ "thiserror", "ucd-trie", @@ -7418,9 +7753,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.5.2" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96504449aa860c8dcde14f9fba5c58dc6658688ca1fe363589d6327b8662c603" +checksum = "be99c4c1d2fc2769b1d00239431d711d08f6efedcecb8b6e30707160aee99c15" dependencies = [ "pest", "pest_generator", @@ -7428,33 +7763,33 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.5.2" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "798e0220d1111ae63d66cb66a5dcb3fc2d986d520b98e49e1852bfdb11d7c5e7" +checksum = "e56094789873daa36164de2e822b3888c6ae4b4f9da555a1103587658c805b1e" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] name = "pest_meta" -version = "2.5.2" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "984298b75898e30a843e278a9f2452c31e349a073a0ce6fd950a12a74464e065" +checksum = "6733073c7cff3d8459fda0e42f13a047870242aed8b509fe98000928975f359e" dependencies = [ "once_cell", "pest", - "sha1", + "sha2 0.10.6", ] [[package]] name = "petgraph" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143" +checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" dependencies = [ "fixedbitset", "indexmap", @@ -7477,7 +7812,7 @@ checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -7498,6 +7833,16 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkcs8" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +dependencies = [ + "der", + "spki", +] + [[package]] name = "pkg-config" version = "0.3.26" @@ -7518,14 +7863,14 @@ checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" [[package]] name = "polkadot-approval-distribution" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ - "futures 0.3.25", + "futures 0.3.28", + "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", - "polkadot-node-subsystem-util", "polkadot-primitives", "rand 0.8.5", "tracing-gum", @@ -7533,10 +7878,10 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ - "futures 0.3.25", + "futures 0.3.28", "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -7547,13 +7892,13 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "derive_more", "fatality", - "futures 0.3.25", - "lru 0.7.8", + "futures 0.3.28", + "lru", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -7570,12 +7915,12 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "fatality", - "futures 0.3.25", - "lru 0.7.8", + "futures 0.3.28", + "lru", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -7591,12 +7936,12 @@ dependencies = [ [[package]] name = "polkadot-cli" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "clap", "frame-benchmarking-cli", - "futures 0.3.25", + "futures 0.3.28", "log", "polkadot-client", "polkadot-node-core-pvf", @@ -7604,12 +7949,13 @@ dependencies = [ "polkadot-performance-test", "polkadot-service", "sc-cli", + "sc-executor", "sc-service", "sc-sysinfo", "sc-tracing", "sp-core", + "sp-io", "sp-keyring", - "sp-trie", "substrate-build-script-utils", "thiserror", "try-runtime-cli", @@ -7617,14 +7963,15 @@ dependencies = [ [[package]] name = "polkadot-client" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ - "beefy-primitives", + "async-trait", "frame-benchmarking", "frame-benchmarking-cli", "frame-system", "frame-system-rpc-runtime-api", + "futures 0.3.28", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "polkadot-core-primitives", @@ -7638,6 +7985,7 @@ dependencies = [ "sc-service", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-blockchain", "sp-consensus", @@ -7657,12 +8005,13 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "always-assert", + "bitvec", "fatality", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -7678,11 +8027,10 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "parity-scale-codec", - "parity-util-mem", "scale-info", "sp-core", "sp-runtime", @@ -7691,13 +8039,15 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "derive_more", "fatality", - "futures 0.3.25", - "lru 0.7.8", + "futures 0.3.28", + "futures-timer", + "indexmap", + "lru", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -7714,8 +8064,8 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -7728,10 +8078,10 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "polkadot-node-network-protocol", "polkadot-node-subsystem", @@ -7748,19 +8098,19 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "always-assert", "async-trait", "bytes", "fatality", - "futures 0.3.25", + "futures 0.3.28", "parity-scale-codec", "parking_lot 0.12.1", + "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-subsystem", - "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", "sc-network", @@ -7772,10 +8122,10 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ - "futures 0.3.25", + "futures 0.3.28", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-primitives", @@ -7790,15 +8140,15 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "bitvec", "derive_more", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "kvdb", - "lru 0.7.8", + "lru", "merlin", "parity-scale-codec", "polkadot-node-jaeger", @@ -7819,11 +8169,11 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "bitvec", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "kvdb", "parity-scale-codec", @@ -7839,12 +8189,12 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "bitvec", "fatality", - "futures 0.3.25", + "futures 0.3.28", "polkadot-erasure-coding", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -7858,10 +8208,10 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ - "futures 0.3.25", + "futures 0.3.28", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", @@ -7873,16 +8223,17 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "async-trait", - "futures 0.3.25", + "futures 0.3.28", + "futures-timer", "parity-scale-codec", "polkadot-node-core-pvf", + "polkadot-node-metrics", "polkadot-node-primitives", "polkadot-node-subsystem", - "polkadot-node-subsystem-util", "polkadot-parachain", "polkadot-primitives", "sp-maybe-compressed-blob", @@ -7891,12 +8242,12 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ - "futures 0.3.25", + "futures 0.3.28", + "polkadot-node-metrics", "polkadot-node-subsystem", - "polkadot-node-subsystem-util", "polkadot-primitives", "sc-client-api", "sc-consensus-babe", @@ -7906,10 +8257,10 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "kvdb", "parity-scale-codec", @@ -7923,13 +8274,13 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "fatality", - "futures 0.3.25", + "futures 0.3.28", "kvdb", - "lru 0.7.8", + "lru", "parity-scale-codec", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -7942,29 +8293,29 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "async-trait", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "polkadot-node-subsystem", + "polkadot-overseer", "polkadot-primitives", "sp-blockchain", "sp-inherents", - "sp-runtime", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-core-provisioner" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "bitvec", "fatality", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -7977,19 +8328,18 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "always-assert", "assert_matches", - "async-process", - "async-std", - "futures 0.3.25", + "cpu-time", + "futures 0.3.28", "futures-timer", "parity-scale-codec", "pin-project", "polkadot-core-primitives", - "polkadot-node-subsystem-util", + "polkadot-node-metrics", "polkadot-parachain", "rand 0.8.5", "rayon", @@ -8004,15 +8354,16 @@ dependencies = [ "sp-tracing", "sp-wasm-interface", "tempfile", + "tokio", "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf-checker" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ - "futures 0.3.25", + "futures 0.3.28", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -8025,15 +8376,14 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ - "futures 0.3.25", - "memory-lru", - "parity-util-mem", + "futures 0.3.28", + "lru", + "polkadot-node-metrics", "polkadot-node-subsystem", "polkadot-node-subsystem-types", - "polkadot-node-subsystem-util", "polkadot-primitives", "sp-consensus-babe", "tracing-gum", @@ -8041,10 +8391,9 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ - "async-std", "lazy_static", "log", "mick-jaeger", @@ -8055,15 +8404,16 @@ dependencies = [ "sc-network", "sp-core", "thiserror", + "tokio", ] [[package]] name = "polkadot-node-metrics" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "bs58", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "log", "parity-scale-codec", @@ -8078,13 +8428,13 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "async-trait", "derive_more", "fatality", - "futures 0.3.25", + "futures 0.3.28", "hex", "parity-scale-codec", "polkadot-node-jaeger", @@ -8093,6 +8443,7 @@ dependencies = [ "rand 0.8.5", "sc-authority-discovery", "sc-network", + "sc-network-common", "strum", "thiserror", "tracing-gum", @@ -8100,11 +8451,11 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "bounded-vec", - "futures 0.3.25", + "futures 0.3.28", "parity-scale-codec", "polkadot-parachain", "polkadot-primitives", @@ -8122,8 +8473,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -8132,12 +8483,12 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "async-trait", "derive_more", - "futures 0.3.25", + "futures 0.3.28", "orchestra", "polkadot-node-jaeger", "polkadot-node-network-protocol", @@ -8155,19 +8506,19 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "async-trait", "derive_more", "fatality", - "futures 0.3.25", + "futures 0.3.28", + "futures-channel", "itertools", "kvdb", - "lru 0.7.8", + "lru", "parity-db", "parity-scale-codec", - "parity-util-mem", "parking_lot 0.11.2", "pin-project", "polkadot-node-jaeger", @@ -8188,15 +8539,14 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "async-trait", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", - "lru 0.7.8", + "lru", "orchestra", - "parity-util-mem", "parking_lot 0.12.1", "polkadot-node-metrics", "polkadot-node-network-protocol", @@ -8206,18 +8556,18 @@ dependencies = [ "sc-client-api", "sp-api", "sp-core", + "tikv-jemalloc-ctl", "tracing-gum", ] [[package]] name = "polkadot-parachain" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "derive_more", "frame-support", "parity-scale-codec", - "parity-util-mem", "polkadot-core-primitives", "scale-info", "serde", @@ -8228,8 +8578,8 @@ dependencies = [ [[package]] name = "polkadot-performance-test" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "env_logger 0.9.3", "kusama-runtime", @@ -8243,14 +8593,12 @@ dependencies = [ [[package]] name = "polkadot-primitives" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "bitvec", - "frame-system", "hex-literal", "parity-scale-codec", - "parity-util-mem", "polkadot-core-primitives", "polkadot-parachain", "scale-info", @@ -8267,19 +8615,17 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-std", - "sp-trie", - "sp-version", ] [[package]] name = "polkadot-rpc" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "beefy-gadget", "beefy-gadget-rpc", "jsonrpsee", - "pallet-mmr-rpc", + "mmr-rpc", "pallet-transaction-payment-rpc", "polkadot-primitives", "sc-chain-spec", @@ -8305,10 +8651,9 @@ dependencies = [ [[package]] name = "polkadot-runtime" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ - "beefy-primitives", "bitvec", "frame-benchmarking", "frame-election-provider-support", @@ -8332,6 +8677,7 @@ dependencies = [ "pallet-election-provider-multi-phase", "pallet-election-provider-support-benchmarking", "pallet-elections-phragmen", + "pallet-fast-unstake", "pallet-grandpa", "pallet-identity", "pallet-im-online", @@ -8340,6 +8686,7 @@ dependencies = [ "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", + "pallet-nomination-pools-runtime-api", "pallet-offences", "pallet-offences-benchmarking", "pallet-preimage", @@ -8369,6 +8716,7 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -8392,10 +8740,9 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ - "beefy-primitives", "bitvec", "frame-benchmarking", "frame-election-provider-support", @@ -8412,6 +8759,7 @@ dependencies = [ "pallet-election-provider-multi-phase", "pallet-session", "pallet-staking", + "pallet-staking-reward-fn", "pallet-timestamp", "pallet-transaction-payment", "pallet-treasury", @@ -8425,6 +8773,7 @@ dependencies = [ "serde_derive", "slot-range-helper", "sp-api", + "sp-beefy", "sp-core", "sp-inherents", "sp-io", @@ -8439,20 +8788,22 @@ dependencies = [ [[package]] name = "polkadot-runtime-constants" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", + "sp-core", "sp-runtime", + "sp-weights", ] [[package]] name = "polkadot-runtime-metrics" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "bs58", "parity-scale-codec", @@ -8463,8 +8814,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "bitflags", "bitvec", @@ -8506,19 +8857,20 @@ dependencies = [ [[package]] name = "polkadot-service" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "async-trait", "beefy-gadget", - "beefy-primitives", + "frame-support", "frame-system-rpc-runtime-api", - "futures 0.3.25", + "futures 0.3.28", "hex-literal", "kusama-runtime", "kvdb", "kvdb-rocksdb", - "lru 0.7.8", + "lru", + "mmr-gadget", "pallet-babe", "pallet-im-online", "pallet-staking", @@ -8584,6 +8936,7 @@ dependencies = [ "serde_json", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-blockchain", "sp-consensus", @@ -8593,6 +8946,7 @@ dependencies = [ "sp-inherents", "sp-io", "sp-keystore", + "sp-mmr-primitives", "sp-offchain", "sp-runtime", "sp-session", @@ -8609,12 +8963,12 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "arrayvec 0.5.2", "fatality", - "futures 0.3.25", + "futures 0.3.28", "indexmap", "parity-scale-codec", "polkadot-node-network-protocol", @@ -8630,8 +8984,8 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -8640,16 +8994,18 @@ dependencies = [ [[package]] name = "polling" -version = "2.5.2" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22122d5ec4f9fe1b3916419b76be1e80bcb93f618d071d2edf841b137b2a2bd6" +checksum = "4be1c66a6add46bff50935c313dae30a5030cf8385c5206e8a95e9e9def974aa" dependencies = [ "autocfg", - "cfg-if 1.0.0", + "bitflags", + "cfg-if", + "concurrent-queue", "libc", "log", - "wepoll-ffi", - "windows-sys", + "pin-project-lite 0.2.9", + "windows-sys 0.48.0", ] [[package]] @@ -8660,7 +9016,7 @@ checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede" dependencies = [ "cpufeatures", "opaque-debug 0.3.0", - "universal-hash", + "universal-hash 0.4.1", ] [[package]] @@ -8669,10 +9025,22 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", + "cpufeatures", + "opaque-debug 0.3.0", + "universal-hash 0.4.1", +] + +[[package]] +name = "polyval" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef234e08c11dfcb2e56f79fd70f6f2eb7f025c0ce2333e82f4f0518ecad30c6" +dependencies = [ + "cfg-if", "cpufeatures", "opaque-debug 0.3.0", - "universal-hash", + "universal-hash 0.5.0", ] [[package]] @@ -8681,11 +9049,51 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "predicates" +version = "2.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" +dependencies = [ + "difflib", + "float-cmp", + "itertools", + "normalize-line-endings", + "predicates-core", + "regex", +] + +[[package]] +name = "predicates-core" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" + +[[package]] +name = "predicates-tree" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +dependencies = [ + "predicates-core", + "termtree", +] + +[[package]] +name = "prettyplease" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" +dependencies = [ + "proc-macro2", + "syn 1.0.109", +] + [[package]] name = "primitive-types" -version = "0.11.1" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a" +checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" dependencies = [ "fixed-hash", "impl-codec", @@ -8697,12 +9105,13 @@ dependencies = [ [[package]] name = "prioritized-metered-channel" version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "382698e48a268c832d0b181ed438374a6bb708a82a8ca273bb0f61c74cf209c4" dependencies = [ "coarsetime", "crossbeam-queue", "derive_more", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "nanorand", "thiserror", @@ -8711,13 +9120,12 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.2.1" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "thiserror", - "toml", + "toml_edit", ] [[package]] @@ -8729,7 +9137,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "version_check", ] @@ -8746,9 +9154,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.49" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5" +checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" dependencies = [ "unicode-ident", ] @@ -8759,7 +9167,7 @@ version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fnv", "lazy_static", "memchr", @@ -8769,32 +9177,32 @@ dependencies = [ [[package]] name = "prometheus-client" -version = "0.16.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1abe0255c04d15f571427a2d1e00099016506cf3297b53853acd2b7eb87825" +checksum = "83cd1b99916654a69008fd66b4f9397fbe08e6e51dfe23d4417acf5d3b8cb87c" dependencies = [ "dtoa", "itoa", - "owning_ref", + "parking_lot 0.12.1", "prometheus-client-derive-text-encode", ] [[package]] name = "prometheus-client-derive-text-encode" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8e12d01b9d66ad9eb4529c57666b6263fc1993cb30261d83ead658fdd932652" +checksum = "66a455fbcb954c1a7decf3c586e860fd7889cddf4b8e164be736dbac95a953cd" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "prost" -version = "0.10.4" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71adf41db68aa0daaefc69bb30bcd68ded9b9abaad5d1fbb6304c4fb390e083e" +checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes", "prost-derive", @@ -8802,31 +9210,31 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.10.4" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae5a4388762d5815a9fc0dea33c56b021cdc8dde0c55e0c9ca57197254b0cab" +checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", - "cfg-if 1.0.0", - "cmake", "heck", "itertools", "lazy_static", "log", "multimap", "petgraph", + "prettyplease", "prost", "prost-types", "regex", + "syn 1.0.109", "tempfile", "which", ] [[package]] name = "prost-codec" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00af1e92c33b4813cc79fda3f2dbf56af5169709be0202df730e9ebc3e4cd007" +checksum = "0dc34979ff898b6e141106178981ce2596c387ea6e62533facfc61a37fc879c0" dependencies = [ "asynchronous-codec", "bytes", @@ -8837,24 +9245,23 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.10.1" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b670f45da57fb8542ebdbb6105a925fe571b67f9e7ed9f47a06a84e72b4e7cc" +checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", "itertools", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "prost-types" -version = "0.10.1" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d0a014229361011dc8e69c8a1ec6c2e8d0f2af7c91e3ea3f5b2170298461e68" +checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ - "bytes", "prost", ] @@ -8873,6 +9280,15 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quick-protobuf" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d6da84cc204722a989e01ba2f6e1e276e190f22263d0cb6ce8526fcdb0d2e1f" +dependencies = [ + "byteorder", +] + [[package]] name = "quicksink" version = "0.1.2" @@ -8884,11 +9300,29 @@ dependencies = [ "pin-project-lite 0.1.12", ] +[[package]] +name = "quinn-proto" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c10f662eee9c94ddd7135043e544f3c82fa839a1e7b865911331961b53186c" +dependencies = [ + "bytes", + "rand 0.8.5", + "ring", + "rustc-hash", + "rustls 0.20.8", + "slab", + "thiserror", + "tinyvec", + "tracing", + "webpki 0.22.0", +] + [[package]] name = "quote" -version = "1.0.23" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" dependencies = [ "proc-macro2", ] @@ -8910,7 +9344,6 @@ dependencies = [ "rand_chacha 0.2.2", "rand_core 0.5.1", "rand_hc", - "rand_pcg 0.2.1", ] [[package]] @@ -8960,7 +9393,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.9", ] [[package]] @@ -8982,15 +9415,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rand_pcg" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" -dependencies = [ - "rand_core 0.5.1", -] - [[package]] name = "rand_pcg" version = "0.3.1" @@ -9008,9 +9432,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" dependencies = [ "either", "rayon-core", @@ -9018,9 +9442,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" dependencies = [ "crossbeam-channel", "crossbeam-deque", @@ -9028,6 +9452,31 @@ dependencies = [ "num_cpus", ] +[[package]] +name = "rcgen" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" +dependencies = [ + "pem", + "ring", + "time 0.3.20", + "x509-parser 0.13.2", + "yasna", +] + +[[package]] +name = "rcgen" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" +dependencies = [ + "pem", + "ring", + "time 0.3.20", + "yasna", +] + [[package]] name = "redox_syscall" version = "0.2.16" @@ -9037,14 +9486,23 @@ dependencies = [ "bitflags", ] +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags", +] + [[package]] name = "redox_users" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.8", - "redox_syscall", + "getrandom 0.2.9", + "redox_syscall 0.2.16", "thiserror", ] @@ -9057,35 +9515,35 @@ dependencies = [ "derive_more", "fs-err", "itertools", - "static_init", + "static_init 0.5.2", "thiserror", ] [[package]] name = "ref-cast" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c78fb8c9293bcd48ef6fce7b4ca950ceaf21210de6e105a883ee280c0f7b9ed" +checksum = "f43faa91b1c8b36841ee70e97188a869d37ae21759da6846d4be66de5bf7b12c" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9c0c92af03644e4806106281fe2e068ac5bc0ae74a707266d06ea27bccee5f" +checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] name = "regalloc2" -version = "0.2.3" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a8d23b35d7177df3b9d31ed8a9ab4bf625c668be77a319d4f5efd4a5257701c" +checksum = "d43a209257d978ef079f3d446331d0f1794f5e0fc19b306a199983857833a779" dependencies = [ "fxhash", "log", @@ -9095,9 +9553,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.7.1" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" dependencies = [ "aho-corasick", "memchr", @@ -9115,66 +9573,28 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] -name = "region" -version = "2.2.0" +name = "reqwest" +version = "0.11.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877e54ea2adcd70d80e9179344c97f93ef0dffd6b03e1f4529e6e83ab2fa9ae0" -dependencies = [ - "bitflags", - "libc", - "mach", - "winapi", -] - -[[package]] -name = "remote-externalities" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +checksum = "27b71749df584b7f4cac2c426c127a7c785a5106cc98f7a8feb044115f0fa254" dependencies = [ - "env_logger 0.9.3", - "jsonrpsee", - "log", - "parity-scale-codec", - "serde", - "serde_json", - "sp-core", - "sp-io", - "sp-runtime", - "sp-version", -] - -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] - -[[package]] -name = "reqwest" -version = "0.11.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c" -dependencies = [ - "base64 0.13.1", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-tls", - "ipnet", - "js-sys", + "base64 0.21.0", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-tls", + "ipnet", + "js-sys", "log", "mime", "native-tls", @@ -9206,12 +9626,12 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.1.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ef608575f6392792f9ecf7890c00086591d29a83910939d430753f7c050525" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ "crypto-bigint", - "hmac 0.11.0", + "hmac 0.12.1", "zeroize", ] @@ -9231,21 +9651,19 @@ dependencies = [ ] [[package]] -name = "ripemd160" -version = "0.9.1" +name = "ripemd" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eca4ecc81b7f313189bf73ce724400a07da2a6dac19588b03c8bd76a2dcc251" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "opaque-debug 0.3.0", + "digest 0.10.6", ] [[package]] name = "rocksdb" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "620f4129485ff1a7128d184bc687470c21c7951b64779ebc9cfdad3dcd920290" +checksum = "7e9562ea1d70c0cc63a34a22d977753b50cca91cc6b6527750463bd5dd8697bc" dependencies = [ "libc", "librocksdb-sys", @@ -9253,17 +9671,17 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "beefy-merkle-tree", - "beefy-primitives", "frame-benchmarking", "frame-executive", "frame-support", "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", + "frame-try-runtime", "hex-literal", "log", "pallet-authority-discovery", @@ -9272,23 +9690,38 @@ dependencies = [ "pallet-balances", "pallet-beefy", "pallet-beefy-mmr", + "pallet-bounties", + "pallet-child-bounties", "pallet-collective", + "pallet-democracy", + "pallet-elections-phragmen", "pallet-grandpa", + "pallet-identity", "pallet-im-online", "pallet-indices", "pallet-membership", "pallet-mmr", "pallet-multisig", + "pallet-nis", "pallet-offences", + "pallet-preimage", "pallet-proxy", + "pallet-recovery", + "pallet-scheduler", "pallet-session", + "pallet-society", "pallet-staking", + "pallet-state-trie-migration", "pallet-sudo", "pallet-timestamp", + "pallet-tips", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", "pallet-utility", + "pallet-vesting", "pallet-xcm", + "pallet-xcm-benchmarks", "parity-scale-codec", "polkadot-parachain", "polkadot-primitives", @@ -9301,6 +9734,7 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -9314,6 +9748,7 @@ dependencies = [ "sp-std", "sp-transaction-pool", "sp-version", + "static_assertions", "substrate-wasm-builder", "xcm", "xcm-builder", @@ -9322,39 +9757,77 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", + "sp-core", "sp-runtime", + "sp-weights", ] [[package]] name = "rpassword" -version = "5.0.1" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc936cf8a7ea60c58f030fd36a612a48f440610214dc54bc36431f9ea0c3efb" +checksum = "6678cf63ab3491898c0d021b493c94c9b221d91295294a2a5746eacbe5928322" dependencies = [ "libc", + "rtoolbox", "winapi", ] +[[package]] +name = "rtcp" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1919efd6d4a6a85d13388f9487549bb8e359f17198cc03ffd72f79b553873691" +dependencies = [ + "bytes", + "thiserror", + "webrtc-util", +] + [[package]] name = "rtnetlink" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" dependencies = [ - "async-global-executor", - "futures 0.3.25", + "futures 0.3.28", "log", "netlink-packet-route", "netlink-proto", "nix", "thiserror", + "tokio", +] + +[[package]] +name = "rtoolbox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "034e22c514f5c0cb8a10ff341b9b048b5ceb21591f31c8f44c43b960f9b3524a" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "rtp" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2a095411ff00eed7b12e4c6a118ba984d113e1079582570d56a5ee723f11f80" +dependencies = [ + "async-trait", + "bytes", + "rand 0.8.5", + "serde", + "thiserror", + "webrtc-util", ] [[package]] @@ -9399,9 +9872,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.21" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc-hash" @@ -9430,21 +9903,16 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.16", + "semver 1.0.17", ] [[package]] -name = "rustix" -version = "0.33.7" +name = "rusticata-macros" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938a344304321a9da4973b9ff4f9f8db9caf4597dfd9dda6a60b523340a0fff0" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" dependencies = [ - "bitflags", - "errno", - "io-lifetimes 0.5.3", - "libc", - "linux-raw-sys 0.0.42", - "winapi", + "nom", ] [[package]] @@ -9454,37 +9922,50 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "727a1a6d65f786ec22df8a81ca3121107f235970dc1705ed681d3e6e8b9cd5f9" dependencies = [ "bitflags", - "errno", + "errno 0.2.8", "io-lifetimes 0.7.5", "libc", "linux-raw-sys 0.0.46", - "windows-sys", + "windows-sys 0.42.0", ] [[package]] name = "rustix" -version = "0.36.6" +version = "0.37.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4feacf7db682c6c329c4ede12649cd36ecab0f3be5b7d74e6a20304725db4549" +checksum = "85597d61f83914ddeba6a47b3b8ffe7365107221c2e557ed94426489fefb5f77" dependencies = [ "bitflags", - "errno", - "io-lifetimes 1.0.3", + "errno 0.3.1", + "io-lifetimes 1.0.10", "libc", - "linux-raw-sys 0.1.4", - "windows-sys", + "linux-raw-sys 0.3.2", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustls" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +dependencies = [ + "base64 0.13.1", + "log", + "ring", + "sct 0.6.1", + "webpki 0.21.4", ] [[package]] name = "rustls" -version = "0.20.7" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "539a2bfe908f471bfa933876bd1eb6a19cf2176d375f82ef7f99530a40e48c2c" +checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" dependencies = [ "log", "ring", - "sct", - "webpki", + "sct 0.7.0", + "webpki 0.22.0", ] [[package]] @@ -9510,9 +9991,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" +checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" [[package]] name = "rw-stream-sink" @@ -9520,16 +10001,16 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26338f5e09bb721b85b135ea05af7767c90b52f6de4f087d4f4a3a9d64e7dc04" dependencies = [ - "futures 0.3.25", + "futures 0.3.28", "pin-project", "static_assertions", ] [[package]] name = "ryu" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "safe_arch" @@ -9540,15 +10021,6 @@ dependencies = [ "bytemuck", ] -[[package]] -name = "salsa20" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" -dependencies = [ - "cipher 0.4.3", -] - [[package]] name = "same-file" version = "1.0.6" @@ -9561,7 +10033,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "log", "sp-core", @@ -9572,9 +10044,10 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "futures 0.3.25", + "async-trait", + "futures 0.3.28", "futures-timer", "ip_network", "libp2p", @@ -9582,9 +10055,8 @@ dependencies = [ "parity-scale-codec", "prost", "prost-build", - "rand 0.7.3", + "rand 0.8.5", "sc-client-api", - "sc-network", "sc-network-common", "sp-api", "sp-authority-discovery", @@ -9599,9 +10071,9 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "log", "parity-scale-codec", @@ -9622,7 +10094,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9638,13 +10110,11 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "impl-trait-for-tuples", "memmap2", - "parity-scale-codec", "sc-chain-spec-derive", - "sc-network", + "sc-network-common", "sc-telemetry", "serde", "serde_json", @@ -9655,35 +10125,36 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ + "array-bytes 4.2.0", "chrono", "clap", "fdlimit", - "futures 0.3.25", - "hex", + "futures 0.3.28", "libp2p", "log", "names", "parity-scale-codec", - "rand 0.7.3", + "rand 0.8.5", "regex", "rpassword", "sc-client-api", "sc-client-db", "sc-keystore", "sc-network", + "sc-network-common", "sc-service", "sc-telemetry", "sc-tracing", @@ -9705,11 +10176,10 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "fnv", - "futures 0.3.25", - "hash-db", + "futures 0.3.28", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -9726,14 +10196,13 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-storage", - "sp-trie", "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "hash-db", "kvdb", @@ -9758,13 +10227,14 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "async-trait", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "libp2p", "log", + "mockall", "parking_lot 0.12.1", "sc-client-api", "sc-utils", @@ -9782,10 +10252,10 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "async-trait", - "futures 0.3.25", + "futures 0.3.28", "log", "parity-scale-codec", "sc-block-builder", @@ -9811,19 +10281,18 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "async-trait", "fork-tree", - "futures 0.3.25", + "futures 0.3.28", "log", "merlin", - "num-bigint 0.2.6", - "num-rational 0.2.4", + "num-bigint", + "num-rational", "num-traits", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.7.3", "sc-client-api", "sc-consensus", "sc-consensus-epochs", @@ -9831,7 +10300,6 @@ dependencies = [ "sc-keystore", "sc-telemetry", "schnorrkel", - "serde", "sp-api", "sp-application-crypto", "sp-block-builder", @@ -9842,10 +10310,8 @@ dependencies = [ "sp-consensus-vrf", "sp-core", "sp-inherents", - "sp-io", "sp-keystore", "sp-runtime", - "sp-version", "substrate-prometheus-endpoint", "thiserror", ] @@ -9853,9 +10319,9 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "futures 0.3.25", + "futures 0.3.28", "jsonrpsee", "sc-consensus-babe", "sc-consensus-epochs", @@ -9875,7 +10341,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9888,11 +10354,11 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "assert_matches", "async-trait", - "futures 0.3.25", + "futures 0.3.28", "jsonrpsee", "log", "parity-scale-codec", @@ -9922,10 +10388,10 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "async-trait", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "log", "parity-scale-codec", @@ -9940,17 +10406,14 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-timestamp", - "thiserror", ] [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "lazy_static", - "lru 0.7.8", + "lru", "parity-scale-codec", "parking_lot 0.12.1", "sc-executor-common", @@ -9958,12 +10421,10 @@ dependencies = [ "sc-executor-wasmtime", "sp-api", "sp-core", - "sp-core-hashing-proc-macro", "sp-externalities", "sp-io", "sp-panic-handler", "sp-runtime-interface", - "sp-tasks", "sp-trie", "sp-version", "sp-wasm-interface", @@ -9974,13 +10435,10 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "environmental", - "parity-scale-codec", "sc-allocator", "sp-maybe-compressed-blob", - "sp-sandbox", "sp-wasm-interface", "thiserror", "wasm-instrument", @@ -9990,14 +10448,12 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "log", - "parity-scale-codec", "sc-allocator", "sc-executor-common", "sp-runtime-interface", - "sp-sandbox", "sp-wasm-interface", "wasmi", ] @@ -10005,19 +10461,16 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "log", "once_cell", - "parity-scale-codec", - "parity-wasm 0.42.2", "rustix 0.35.13", "sc-allocator", "sc-executor-common", "sp-runtime-interface", - "sp-sandbox", "sp-wasm-interface", "wasmtime", ] @@ -10025,16 +10478,16 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "ahash", + "array-bytes 4.2.0", "async-trait", "dyn-clone", "finality-grandpa", "fork-tree", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", - "hex", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -10043,7 +10496,6 @@ dependencies = [ "sc-chain-spec", "sc-client-api", "sc-consensus", - "sc-keystore", "sc-network", "sc-network-common", "sc-network-gossip", @@ -10066,10 +10518,10 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "finality-grandpa", - "futures 0.3.25", + "futures 0.3.28", "jsonrpsee", "log", "parity-scale-codec", @@ -10077,7 +10529,6 @@ dependencies = [ "sc-finality-grandpa", "sc-rpc", "serde", - "serde_json", "sp-blockchain", "sp-core", "sp-runtime", @@ -10087,16 +10538,14 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "ansi_term", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "log", - "parity-util-mem", "sc-client-api", "sc-network-common", - "sc-transaction-pool-api", "sp-blockchain", "sp-runtime", ] @@ -10104,10 +10553,10 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ + "array-bytes 4.2.0", "async-trait", - "hex", "parking_lot 0.12.1", "serde_json", "sp-application-crypto", @@ -10119,31 +10568,25 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ + "array-bytes 4.2.0", "async-trait", "asynchronous-codec", - "bitflags", + "backtrace", "bytes", - "cid", "either", "fnv", - "fork-tree", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", - "hex", "ip_network", "libp2p", - "linked-hash-map", - "linked_hash_set", "log", - "lru 0.7.8", + "lru", "parity-scale-codec", "parking_lot 0.12.1", "pin-project", - "prost", - "prost-build", - "rand 0.7.3", + "rand 0.8.5", "sc-block-builder", "sc-client-api", "sc-consensus", @@ -10161,44 +10604,67 @@ dependencies = [ "substrate-prometheus-endpoint", "thiserror", "unsigned-varint", - "void", "zeroize", ] +[[package]] +name = "sc-network-bitswap" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" +dependencies = [ + "cid", + "futures 0.3.28", + "libp2p", + "log", + "prost", + "prost-build", + "sc-client-api", + "sc-network-common", + "sp-blockchain", + "sp-runtime", + "thiserror", + "unsigned-varint", +] + [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "async-trait", "bitflags", "bytes", - "futures 0.3.25", + "futures 0.3.28", + "futures-timer", "libp2p", + "linked_hash_set", "parity-scale-codec", "prost-build", "sc-consensus", "sc-peerset", + "serde", "smallvec", + "sp-blockchain", "sp-consensus", "sp-finality-grandpa", "sp-runtime", + "substrate-prometheus-endpoint", "thiserror", ] [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "ahash", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", "libp2p", "log", - "lru 0.7.8", - "sc-network", + "lru", "sc-network-common", + "sc-peerset", "sp-runtime", "substrate-prometheus-endpoint", "tracing", @@ -10207,10 +10673,10 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "futures 0.3.25", - "hex", + "array-bytes 4.2.0", + "futures 0.3.28", "libp2p", "log", "parity-scale-codec", @@ -10228,14 +10694,16 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ + "array-bytes 4.2.0", + "async-trait", "fork-tree", - "futures 0.3.25", - "hex", + "futures 0.3.28", "libp2p", "log", - "lru 0.7.8", + "lru", + "mockall", "parity-scale-codec", "prost", "prost-build", @@ -10243,6 +10711,7 @@ dependencies = [ "sc-consensus", "sc-network-common", "sc-peerset", + "sc-utils", "smallvec", "sp-arithmetic", "sp-blockchain", @@ -10250,29 +10719,50 @@ dependencies = [ "sp-core", "sp-finality-grandpa", "sp-runtime", + "substrate-prometheus-endpoint", "thiserror", ] +[[package]] +name = "sc-network-transactions" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" +dependencies = [ + "array-bytes 4.2.0", + "futures 0.3.28", + "libp2p", + "log", + "parity-scale-codec", + "pin-project", + "sc-network-common", + "sc-peerset", + "sc-utils", + "sp-consensus", + "sp-runtime", + "substrate-prometheus-endpoint", +] + [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ + "array-bytes 4.2.0", "bytes", "fnv", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", - "hex", "hyper", "hyper-rustls", + "libp2p", "num_cpus", "once_cell", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.7.3", + "rand 0.8.5", "sc-client-api", - "sc-network", "sc-network-common", + "sc-peerset", "sc-utils", "sp-api", "sp-core", @@ -10285,9 +10775,9 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "futures 0.3.25", + "futures 0.3.28", "libp2p", "log", "sc-utils", @@ -10298,7 +10788,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10307,10 +10797,9 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "futures 0.3.25", - "hash-db", + "futures 0.3.28", "jsonrpsee", "log", "parity-scale-codec", @@ -10337,13 +10826,10 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "futures 0.3.25", "jsonrpsee", - "log", "parity-scale-codec", - "parking_lot 0.12.1", "sc-chain-spec", "sc-transaction-pool-api", "scale-info", @@ -10352,7 +10838,6 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", - "sp-tracing", "sp-version", "thiserror", ] @@ -10360,34 +10845,60 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "futures 0.3.25", + "http", "jsonrpsee", "log", "serde_json", "substrate-prometheus-endpoint", "tokio", + "tower", + "tower-http", +] + +[[package]] +name = "sc-rpc-spec-v2" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" +dependencies = [ + "array-bytes 4.2.0", + "futures 0.3.28", + "futures-util", + "hex", + "jsonrpsee", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-chain-spec", + "sc-client-api", + "sc-transaction-pool-api", + "serde", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-runtime", + "sp-version", + "thiserror", + "tokio-stream", ] [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "async-trait", "directories", "exit-future", - "futures 0.3.25", + "futures 0.3.28", "futures-timer", - "hash-db", "jsonrpsee", "log", "parity-scale-codec", - "parity-util-mem", "parking_lot 0.12.1", "pin-project", - "rand 0.7.3", + "rand 0.8.5", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -10397,12 +10908,15 @@ dependencies = [ "sc-informant", "sc-keystore", "sc-network", + "sc-network-bitswap", "sc-network-common", "sc-network-light", "sc-network-sync", + "sc-network-transactions", "sc-offchain", "sc-rpc", "sc-rpc-server", + "sc-rpc-spec-v2", "sc-sysinfo", "sc-telemetry", "sc-tracing", @@ -10412,23 +10926,20 @@ dependencies = [ "serde", "serde_json", "sp-api", - "sp-application-crypto", - "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-core", "sp-externalities", - "sp-inherents", "sp-keystore", "sp-runtime", "sp-session", "sp-state-machine", "sp-storage", - "sp-tracing", "sp-transaction-pool", "sp-transaction-storage-proof", "sp-trie", "sp-version", + "static_init 1.0.3", "substrate-prometheus-endpoint", "tempfile", "thiserror", @@ -10440,21 +10951,18 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "log", "parity-scale-codec", - "parity-util-mem", - "parity-util-mem-derive", "parking_lot 0.12.1", - "sc-client-api", "sp-core", ] [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10473,13 +10981,13 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "futures 0.3.25", + "futures 0.3.28", "libc", "log", - "rand 0.7.3", - "rand_pcg 0.2.1", + "rand 0.8.5", + "rand_pcg", "regex", "sc-telemetry", "serde", @@ -10492,15 +11000,16 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "chrono", - "futures 0.3.25", + "futures 0.3.28", "libp2p", "log", "parking_lot 0.12.1", "pin-project", - "rand 0.7.3", + "rand 0.8.5", + "sc-utils", "serde", "serde_json", "thiserror", @@ -10510,7 +11019,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "ansi_term", "atty", @@ -10541,25 +11050,25 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "futures 0.3.25", + "async-trait", + "futures 0.3.28", "futures-timer", "linked-hash-map", "log", "parity-scale-codec", - "parity-util-mem", "parking_lot 0.12.1", "sc-client-api", "sc-transaction-pool-api", @@ -10578,9 +11087,10 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "futures 0.3.25", + "async-trait", + "futures 0.3.28", "log", "serde", "sp-blockchain", @@ -10591,9 +11101,10 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "futures 0.3.25", + "backtrace", + "futures 0.3.28", "futures-timer", "lazy_static", "log", @@ -10603,12 +11114,12 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.3.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "001cf62ece89779fd16105b5f515ad0e5cedcd5440d3dd806bb067978e7c3608" +checksum = "0cfdffd972d76b22f3d7f81c8be34b2296afd3a25e0a547bd9abe340a4dbbe97" dependencies = [ "bitvec", - "cfg-if 1.0.0", + "cfg-if", "derive_more", "parity-scale-codec", "scale-info-derive", @@ -10617,14 +11128,14 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.3.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "303959cf613a6f6efd19ed4b4ad5bf79966a13352716299ad532cfb115f4205c" +checksum = "61fa974aea2d63dd18a4ec3a49d59af9f34178c73a4f56d2f18205628d00681e" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -10633,7 +11144,7 @@ version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" dependencies = [ - "windows-sys", + "windows-sys 0.42.0", ] [[package]] @@ -10662,37 +11173,61 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "scratch" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" +checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" [[package]] name = "sct" -version = "0.7.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" dependencies = [ "ring", "untrusted", ] [[package]] -name = "sec1" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" +name = "sct" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "sdp" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d22a5ef407871893fd72b4562ee15e4742269b173959db4b8df6f538c414e13" +dependencies = [ + "rand 0.8.5", + "substring", + "thiserror", + "url", +] + +[[package]] +name = "sec1" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ + "base16ct", "der", - "generic-array 0.14.6", + "generic-array 0.14.7", + "pkcs8", "subtle", "zeroize", ] [[package]] name = "secp256k1" -version = "0.24.2" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9512ffd81e3a3503ed401f79c33168b9148c75038956039166cd750eaa037c3" +checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" dependencies = [ "secp256k1-sys", ] @@ -10717,9 +11252,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.7.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" +checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" dependencies = [ "bitflags", "core-foundation", @@ -10730,9 +11265,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.6.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" dependencies = [ "core-foundation-sys", "libc", @@ -10758,9 +11293,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" +checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" dependencies = [ "serde", ] @@ -10782,53 +11317,44 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.152" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" dependencies = [ "serde_derive", ] [[package]] name = "serde_bytes" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718dc5fff5b36f99093fc49b280cfc96ce6fc824317783bff5a1fed0c7a64819" +checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.152" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] name = "serde_json" -version = "1.0.91" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" +checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" dependencies = [ "itoa", "ryu", "serde", ] -[[package]] -name = "serde_nanos" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e44969a61f5d316be20a42ff97816efb3b407a924d06824c3d8a49fa8450de0e" -dependencies = [ - "serde", -] - [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -10857,10 +11383,10 @@ version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" dependencies = [ - "darling", + "darling 0.13.4", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -10884,7 +11410,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", "opaque-debug 0.3.0", @@ -10896,7 +11422,7 @@ version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.10.6", ] @@ -10920,7 +11446,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", "opaque-debug 0.3.0", @@ -10932,28 +11458,16 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.10.6", ] [[package]] name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "keccak", - "opaque-debug 0.3.0", -] - -[[package]] -name = "sha3" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" +checksum = "54c2bb1a323307527314a36bfb73f24febb08ce2b8a554bf4ffd6f51ad15198c" dependencies = [ "digest 0.10.6", "keccak", @@ -10974,32 +11488,22 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" -[[package]] -name = "signal-hook" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d" -dependencies = [ - "libc", - "signal-hook-registry", -] - [[package]] name = "signal-hook-registry" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ "libc", ] [[package]] name = "signature" -version = "1.4.0" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest 0.9.0", + "digest 0.10.6", "rand_core 0.6.4", ] @@ -11048,11 +11552,17 @@ dependencies = [ "similar", ] +[[package]] +name = "siphasher" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" + [[package]] name = "slab" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" dependencies = [ "autocfg", ] @@ -11065,8 +11575,8 @@ checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec" [[package]] name = "slot-range-helper" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "enumn", "parity-scale-codec", @@ -11098,14 +11608,14 @@ checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" [[package]] name = "snow" -version = "0.9.0" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774d05a3edae07ce6d68ea6984f3c05e9bba8927e3dd591e3b479e5b03213d0d" +checksum = "5ccba027ba85743e09d15c03296797cad56395089b832b48b5a5217880f57733" dependencies = [ - "aes-gcm", + "aes-gcm 0.9.4", "blake2 0.10.6", "chacha20poly1305", - "curve25519-dalek 4.0.0-pre.5", + "curve25519-dalek 4.0.0-rc.1", "rand_core 0.6.4", "ring", "rustc_version 0.4.0", @@ -11115,9 +11625,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", @@ -11132,7 +11642,8 @@ dependencies = [ "base64 0.13.1", "bytes", "flate2", - "futures 0.3.25", + "futures 0.3.28", + "http", "httparse", "log", "rand 0.8.5", @@ -11142,7 +11653,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "hash-db", "log", @@ -11152,6 +11663,7 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-std", + "sp-trie", "sp-version", "thiserror", ] @@ -11159,19 +11671,19 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "blake2 0.10.6", "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "sp-application-crypto" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "parity-scale-codec", "scale-info", @@ -11183,15 +11695,14 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "integer-sqrt", "num-traits", "parity-scale-codec", "scale-info", "serde", - "sp-debug-derive", "sp-std", "static_assertions", ] @@ -11199,7 +11710,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "parity-scale-codec", "scale-info", @@ -11212,7 +11723,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "async-trait", "parity-scale-codec", @@ -11221,10 +11732,27 @@ dependencies = [ "sp-std", ] +[[package]] +name = "sp-beefy" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-mmr-primitives", + "sp-runtime", + "sp-std", +] + [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "parity-scale-codec", "sp-api", @@ -11236,11 +11764,11 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "futures 0.3.25", + "futures 0.3.28", "log", - "lru 0.7.8", + "lru", "parity-scale-codec", "parking_lot 0.12.1", "sp-api", @@ -11254,11 +11782,10 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "async-trait", - "futures 0.3.25", - "futures-timer", + "futures 0.3.28", "log", "parity-scale-codec", "sp-core", @@ -11273,7 +11800,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "async-trait", "parity-scale-codec", @@ -11291,7 +11818,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "async-trait", "merlin", @@ -11314,13 +11841,11 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", - "sp-runtime", "sp-std", "sp-timestamp", ] @@ -11328,7 +11853,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "parity-scale-codec", "scale-info", @@ -11340,30 +11865,27 @@ dependencies = [ [[package]] name = "sp-core" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ + "array-bytes 4.2.0", "base58", "bitflags", - "blake2-rfc", - "byteorder", + "blake2 0.10.6", "dyn-clonable", - "ed25519-dalek", - "futures 0.3.25", + "ed25519-zebra", + "futures 0.3.28", "hash-db", "hash256-std-hasher", - "hex", "impl-serde", "lazy_static", "libsecp256k1", "log", "merlin", - "num-traits", "parity-scale-codec", - "parity-util-mem", "parking_lot 0.12.1", "primitive-types", - "rand 0.7.3", + "rand 0.8.5", "regex", "scale-info", "schnorrkel", @@ -11380,20 +11902,19 @@ dependencies = [ "substrate-bip39", "thiserror", "tiny-bip39", - "wasmi", "zeroize", ] [[package]] name = "sp-core-hashing" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "blake2 0.10.6", "byteorder", "digest 0.10.6", "sha2 0.10.6", - "sha3 0.10.6", + "sha3", "sp-std", "twox-hash", ] @@ -11401,18 +11922,18 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "proc-macro2", "quote", "sp-core-hashing", - "syn", + "syn 1.0.109", ] [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -11420,18 +11941,18 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "sp-externalities" -version = "0.12.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +version = "0.13.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "environmental", "parity-scale-codec", @@ -11442,7 +11963,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "finality-grandpa", "log", @@ -11460,7 +11981,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -11473,16 +11994,16 @@ dependencies = [ [[package]] name = "sp-io" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "bytes", - "futures 0.3.25", - "hash-db", + "ed25519", + "ed25519-dalek", + "futures 0.3.28", "libsecp256k1", "log", "parity-scale-codec", - "parking_lot 0.12.1", "secp256k1", "sp-core", "sp-externalities", @@ -11492,15 +12013,14 @@ dependencies = [ "sp-std", "sp-tracing", "sp-trie", - "sp-wasm-interface", "tracing", "tracing-core", ] [[package]] name = "sp-keyring" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "lazy_static", "sp-core", @@ -11510,11 +12030,11 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.12.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +version = "0.13.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "async-trait", - "futures 0.3.25", + "futures 0.3.28", "merlin", "parity-scale-codec", "parking_lot 0.12.1", @@ -11528,7 +12048,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "thiserror", "zstd", @@ -11537,22 +12057,25 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ + "ckb-merkle-mountain-range", "log", "parity-scale-codec", + "scale-info", "serde", "sp-api", "sp-core", "sp-debug-derive", "sp-runtime", "sp-std", + "thiserror", ] [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "parity-scale-codec", "scale-info", @@ -11566,7 +12089,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "sp-api", "sp-core", @@ -11575,8 +12098,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "backtrace", "lazy_static", @@ -11586,7 +12109,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "rustc-hash", "serde", @@ -11595,17 +12118,16 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "either", "hash256-std-hasher", "impl-trait-for-tuples", "log", "parity-scale-codec", - "parity-util-mem", "paste", - "rand 0.7.3", + "rand 0.8.5", "scale-info", "serde", "sp-application-crypto", @@ -11613,12 +12135,13 @@ dependencies = [ "sp-core", "sp-io", "sp-std", + "sp-weights", ] [[package]] name = "sp-runtime-interface" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11635,34 +12158,20 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "Inflector", "proc-macro-crate", "proc-macro2", "quote", - "syn", -] - -[[package]] -name = "sp-sandbox" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" -dependencies = [ - "log", - "parity-scale-codec", - "sp-core", - "sp-io", - "sp-std", - "sp-wasm-interface", - "wasmi", + "syn 1.0.109", ] [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "parity-scale-codec", "scale-info", @@ -11676,25 +12185,25 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "parity-scale-codec", "scale-info", + "sp-core", "sp-runtime", "sp-std", ] [[package]] name = "sp-state-machine" -version = "0.12.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +version = "0.13.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "hash-db", "log", - "num-traits", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.7.3", + "rand 0.8.5", "smallvec", "sp-core", "sp-externalities", @@ -11703,18 +12212,17 @@ dependencies = [ "sp-trie", "thiserror", "tracing", - "trie-root", ] [[package]] name = "sp-std" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" [[package]] name = "sp-storage" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11724,29 +12232,15 @@ dependencies = [ "sp-std", ] -[[package]] -name = "sp-tasks" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" -dependencies = [ - "log", - "sp-core", - "sp-externalities", - "sp-io", - "sp-runtime-interface", - "sp-std", -] - [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "async-trait", "futures-timer", "log", "parity-scale-codec", - "sp-api", "sp-inherents", "sp-runtime", "sp-std", @@ -11755,8 +12249,8 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "parity-scale-codec", "sp-std", @@ -11768,7 +12262,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "sp-api", "sp-runtime", @@ -11777,7 +12271,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "async-trait", "log", @@ -11792,16 +12286,23 @@ dependencies = [ [[package]] name = "sp-trie" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ + "ahash", "hash-db", + "hashbrown 0.12.3", + "lazy_static", + "lru", "memory-db", + "nohash-hasher", "parity-scale-codec", + "parking_lot 0.12.1", "scale-info", "sp-core", "sp-std", "thiserror", + "tracing", "trie-db", "trie-root", ] @@ -11809,11 +12310,11 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "impl-serde", "parity-scale-codec", - "parity-wasm 0.42.2", + "parity-wasm", "scale-info", "serde", "sp-core-hashing-proc-macro", @@ -11826,18 +12327,18 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "sp-wasm-interface" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "impl-trait-for-tuples", "log", @@ -11847,17 +12348,42 @@ dependencies = [ "wasmtime", ] +[[package]] +name = "sp-weights" +version = "4.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic", + "sp-core", + "sp-debug-derive", + "sp-std", +] + [[package]] name = "spin" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spki" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +dependencies = [ + "base64ct", + "der", +] + [[package]] name = "ss58-registry" -version = "1.37.0" +version = "1.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d44528162f980c0e03c71e005d334332c8da0aec9f2b0b4bdc557ed4a9f24776" +checksum = "ecf0bd63593ef78eca595a7fc25e9a443ca46fe69fd472f8f09f5245cdcd769d" dependencies = [ "Inflector", "num-format", @@ -11889,7 +12415,22 @@ dependencies = [ "cfg_aliases", "libc", "parking_lot 0.11.2", - "static_init_macro", + "static_init_macro 0.5.0", +] + +[[package]] +name = "static_init" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a2a1c578e98c1c16fc3b8ec1328f7659a500737d7a0c6d625e73e830ff9c1f6" +dependencies = [ + "bitflags", + "cfg_aliases", + "libc", + "parking_lot 0.11.2", + "parking_lot_core 0.8.6", + "static_init_macro 1.0.2", + "winapi", ] [[package]] @@ -11902,7 +12443,20 @@ dependencies = [ "memchr", "proc-macro2", "quote", - "syn", + "syn 1.0.109", +] + +[[package]] +name = "static_init_macro" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a2595fc3aa78f2d0e45dd425b22282dd863273761cc77780914b2cf3003acf" +dependencies = [ + "cfg_aliases", + "memchr", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] @@ -11956,7 +12510,26 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn", + "syn 1.0.109", +] + +[[package]] +name = "stun" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7e94b1ec00bad60e6410e058b52f1c66de3dc5fe4d62d09b3e52bb7d3b73e25" +dependencies = [ + "base64 0.13.1", + "crc", + "lazy_static", + "md-5", + "rand 0.8.5", + "ring", + "subtle", + "thiserror", + "tokio", + "url", + "webrtc-util", ] [[package]] @@ -11975,7 +12548,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "platforms 2.0.0", ] @@ -11991,20 +12564,29 @@ dependencies = [ "typenum 1.16.0 (git+https://github.com/encointer/typenum?tag=v1.16.0)", ] +[[package]] +name = "substrate-fixed" +version = "0.5.9" +source = "git+https://github.com/Manta-Network/substrate-fixed.git#a4fb461aae6205ffc55bed51254a40c52be04e5d" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "typenum 1.16.0 (git+https://github.com/encointer/typenum?tag=v1.16.0)", +] + [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "frame-system-rpc-runtime-api", - "futures 0.3.25", + "futures 0.3.28", "jsonrpsee", "log", "parity-scale-codec", - "sc-client-api", "sc-rpc-api", "sc-transaction-pool-api", - "serde_json", "sp-api", "sp-block-builder", "sp-blockchain", @@ -12015,9 +12597,8 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "futures-util", "hyper", "log", "prometheus", @@ -12025,10 +12606,23 @@ dependencies = [ "tokio", ] +[[package]] +name = "substrate-rpc-client" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" +dependencies = [ + "async-trait", + "jsonrpsee", + "log", + "sc-rpc-api", + "serde", + "sp-runtime", +] + [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "jsonrpsee", "log", @@ -12038,10 +12632,8 @@ dependencies = [ "scale-info", "serde", "sp-core", - "sp-io", "sp-runtime", "sp-state-machine", - "sp-std", "sp-trie", "trie-db", ] @@ -12049,7 +12641,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "ansi_term", "build-helper", @@ -12060,20 +12652,40 @@ dependencies = [ "tempfile", "toml", "walkdir", - "wasm-gc-api", + "wasm-opt", ] [[package]] -name = "subtle" -version = "2.4.1" +name = "substring" +version = "1.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" - -[[package]] +checksum = "42ee6433ecef213b2e72f587ef64a2f5943e7cd16fbd82dbe8bc07486c534c86" +dependencies = [ + "autocfg", +] + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] name = "syn" -version = "1.0.107" +version = "2.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" dependencies = [ "proc-macro2", "quote", @@ -12088,7 +12700,7 @@ checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "unicode-xid", ] @@ -12121,57 +12733,56 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.5" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d" +checksum = "8ae9980cab1db3fceee2f6c6f643d5d8de2997c58ee8d25fb0cc8a9e9e7348e5" [[package]] name = "tempfile" -version = "3.3.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi", + "redox_syscall 0.3.5", + "rustix 0.37.11", + "windows-sys 0.45.0", ] [[package]] name = "termcolor" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" dependencies = [ "winapi-util", ] [[package]] -name = "textwrap" -version = "0.16.0" +name = "termtree" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] @@ -12182,10 +12793,11 @@ checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820" [[package]] name = "thread_local" -version = "1.1.4" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" dependencies = [ + "cfg-if", "once_cell", ] @@ -12211,14 +12823,24 @@ dependencies = [ "threadpool", ] +[[package]] +name = "tikv-jemalloc-ctl" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e37706572f4b151dff7a0146e040804e9c26fe3a3118591112f05cf12a4216c1" +dependencies = [ + "libc", + "paste", + "tikv-jemalloc-sys", +] + [[package]] name = "tikv-jemalloc-sys" -version = "0.4.3+5.2.1-patched.2" +version = "0.5.3+5.3.0-patched" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1792ccb507d955b46af42c123ea8863668fae24d03721e40cad6a41773dbb49" +checksum = "a678df20055b43e57ef8cddde41cdfda9a3c1a060b67f4c5836dfb1d78543ba8" dependencies = [ "cc", - "fs_extra", "libc", ] @@ -12233,25 +12855,62 @@ dependencies = [ "winapi", ] +[[package]] +name = "time" +version = "0.3.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" +dependencies = [ + "itoa", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" + +[[package]] +name = "time-macros" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" +dependencies = [ + "time-core", +] + [[package]] name = "tiny-bip39" -version = "0.8.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861" dependencies = [ "anyhow", - "hmac 0.8.1", + "hmac 0.12.1", "once_cell", - "pbkdf2 0.4.0", - "rand 0.7.3", + "pbkdf2 0.11.0", + "rand 0.8.5", "rustc-hash", - "sha2 0.9.9", + "sha2 0.10.6", "thiserror", "unicode-normalization", "wasm-bindgen", "zeroize", ] +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -12263,20 +12922,19 @@ dependencies = [ [[package]] name = "tinyvec_macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.24.1" +version = "1.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d9f76183f91ecfb55e1d7d5602bd1d979e38a3a522fe900241cf195624d67ae" +checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" dependencies = [ "autocfg", "bytes", "libc", - "memchr", "mio", "num_cpus", "parking_lot 0.12.1", @@ -12284,25 +12942,25 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] name = "tokio-native-tls" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" dependencies = [ "native-tls", "tokio", @@ -12314,27 +12972,28 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls", + "rustls 0.20.8", "tokio", - "webpki", + "webpki 0.22.0", ] [[package]] name = "tokio-stream" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" +checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" dependencies = [ "futures-core", "pin-project-lite 0.2.9", "tokio", + "tokio-util", ] [[package]] name = "tokio-util" -version = "0.7.4" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" dependencies = [ "bytes", "futures-core", @@ -12347,13 +13006,65 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.10" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" + +[[package]] +name = "toml_edit" +version = "0.19.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" +dependencies = [ + "bitflags", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-range-header", + "pin-project-lite 0.2.9", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + [[package]] name = "tower-service" version = "0.3.2" @@ -12366,7 +13077,8 @@ version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", + "log", "pin-project-lite 0.2.9", "tracing-attributes", "tracing-core", @@ -12380,7 +13092,7 @@ checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -12405,8 +13117,8 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "polkadot-node-jaeger", "polkadot-primitives", @@ -12416,14 +13128,14 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "expander 0.0.6", "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -12472,9 +13184,9 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.23.1" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32d034c0d3db64b43c31de38e945f15b40cd4ca6d2dcfc26d4798ce8de4ab83" +checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908" dependencies = [ "hash-db", "hashbrown 0.12.3", @@ -12494,12 +13206,12 @@ dependencies = [ [[package]] name = "trust-dns-proto" -version = "0.21.2" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c31f240f59877c3d4bb3b3ea0ec5a6a0cff07323580ff8c7a605cd7d08b255d" +checksum = "4f7f83d1e4a0e4358ac54c5c3681e5d7da5efc5a7a632c90bb6d6669ddd9bc26" dependencies = [ "async-trait", - "cfg-if 1.0.0", + "cfg-if", "data-encoding", "enum-as-inner", "futures-channel", @@ -12508,30 +13220,33 @@ dependencies = [ "idna 0.2.3", "ipnet", "lazy_static", - "log", "rand 0.8.5", "smallvec", + "socket2", "thiserror", "tinyvec", + "tokio", + "tracing", "url", ] [[package]] name = "trust-dns-resolver" -version = "0.21.2" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ba72c2ea84515690c9fcef4c6c660bb9df3036ed1051686de84605b74fd558" +checksum = "aff21aa4dcefb0a1afbfac26deb0adc93888c7d295fb63ab273ef276ba2b7cfe" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "futures-util", "ipconfig", "lazy_static", - "log", "lru-cache", "parking_lot 0.12.1", "resolv-conf", "smallvec", "thiserror", + "tokio", + "tracing", "trust-dns-proto", ] @@ -12544,25 +13259,31 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f29353e89fc3e59d447041bb29622def3f" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "clap", - "jsonrpsee", + "frame-remote-externalities", + "frame-try-runtime", + "hex", "log", "parity-scale-codec", - "remote-externalities", - "sc-chain-spec", "sc-cli", "sc-executor", "sc-service", "serde", + "serde_json", + "sp-api", "sp-core", + "sp-debug-derive", "sp-externalities", "sp-io", "sp-keystore", + "sp-rpc", "sp-runtime", "sp-state-machine", "sp-version", + "sp-weights", + "substrate-rpc-client", "zstd", ] @@ -12572,13 +13293,32 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4f195fd851901624eee5a58c4bb2b4f06399148fcd0ed336e6f1cb60a9881df" +[[package]] +name = "turn" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4712ee30d123ec7ae26d1e1b218395a16c87cdbaf4b3925d170d684af62ea5e8" +dependencies = [ + "async-trait", + "base64 0.13.1", + "futures 0.3.28", + "log", + "md-5", + "rand 0.8.5", + "ring", + "stun", + "thiserror", + "tokio", + "webrtc-util", +] + [[package]] name = "twox-hash" version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if 0.1.10", + "cfg-if", "digest 0.10.6", "rand 0.8.5", "static_assertions", @@ -12617,26 +13357,17 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "unicase" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check", -] - [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] name = "unicode-normalization" @@ -12649,9 +13380,9 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" @@ -12671,7 +13402,17 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", + "subtle", +] + +[[package]] +name = "universal-hash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d3160b73c9a19f7e2939a2fdad446c57c1bbbbf4d919d3213ff1267a580d8b5" +dependencies = [ + "crypto-common", "subtle", ] @@ -12705,21 +13446,26 @@ dependencies = [ ] [[package]] -name = "valuable" -version = "0.1.0" +name = "utf8parse" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] -name = "value-bag" -version = "1.0.0-alpha.9" +name = "uuid" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55" +checksum = "5b55a3fef2a1e3b3a00ce878640918820d3c51081576ac657d23af9fc7928fdb" dependencies = [ - "ctor", - "version_check", + "getrandom 0.2.9", ] +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + [[package]] name = "vcpkg" version = "0.2.15" @@ -12738,6 +13484,15 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "waitgroup" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1f50000a783467e6c0200f9d10642f4bc424e39efc1b770203e88b488f79292" +dependencies = [ + "atomic-waker", +] + [[package]] name = "waker-fn" version = "1.1.0" @@ -12746,12 +13501,11 @@ checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi", "winapi-util", ] @@ -12785,36 +13539,36 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.33" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" +checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -12822,9 +13576,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -12832,41 +13586,71 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" +checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" [[package]] -name = "wasm-gc-api" -version = "0.1.11" +name = "wasm-instrument" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c32691b6c7e6c14e7f8fd55361a9088b507aa49620fcd06c09b3a1082186b9" +checksum = "aa1dafb3e60065305741e83db35c6c2584bb3725b692b5b66148a38d72ace6cd" dependencies = [ - "log", - "parity-wasm 0.32.0", - "rustc-demangle", + "parity-wasm", ] [[package]] -name = "wasm-instrument" -version = "0.1.1" +name = "wasm-opt" +version = "0.110.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "962e5b0401bbb6c887f54e69b8c496ea36f704df65db73e81fd5ff8dc3e63a9f" +checksum = "b68e8037b4daf711393f4be2056246d12d975651b14d581520ad5d1f19219cec" dependencies = [ - "parity-wasm 0.42.2", + "anyhow", + "libc", + "strum", + "strum_macros", + "tempfile", + "thiserror", + "wasm-opt-cxx-sys", + "wasm-opt-sys", +] + +[[package]] +name = "wasm-opt-cxx-sys" +version = "0.110.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91adbad477e97bba3fbd21dd7bfb594e7ad5ceb9169ab1c93ab9cb0ada636b6f" +dependencies = [ + "anyhow", + "cxx", + "cxx-build", + "wasm-opt-sys", +] + +[[package]] +name = "wasm-opt-sys" +version = "0.110.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec4fa5a322a4e6ac22fd141f498d56afbdbf9df5debeac32380d2dcaa3e06941" +dependencies = [ + "anyhow", + "cc", + "cxx", + "cxx-build", + "regex", ] [[package]] @@ -12875,7 +13659,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ - "futures 0.3.25", + "futures 0.3.28", "js-sys", "parking_lot 0.11.2", "pin-utils", @@ -12886,58 +13670,63 @@ dependencies = [ [[package]] name = "wasmi" -version = "0.9.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca00c5147c319a8ec91ec1a0edbec31e566ce2c9cc93b3f9bb86a9efd0eb795d" +checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" dependencies = [ - "downcast-rs", - "libc", - "libm 0.2.6", - "memory_units", - "num-rational 0.2.4", - "num-traits", - "parity-wasm 0.42.2", + "parity-wasm", "wasmi-validation", + "wasmi_core", ] [[package]] name = "wasmi-validation" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "165343ecd6c018fc09ebcae280752702c9a2ef3e6f8d02f1cfcbdb53ef6d7937" +checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" dependencies = [ - "parity-wasm 0.42.2", + "parity-wasm", +] + +[[package]] +name = "wasmi_core" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" +dependencies = [ + "downcast-rs", + "libm 0.2.6", + "memory_units", + "num-rational", + "num-traits", ] [[package]] name = "wasmparser" -version = "0.85.0" +version = "0.89.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "570460c58b21e9150d2df0eaaedbb7816c34bcec009ae0dcc976e40ba81463e7" +checksum = "ab5d3e08b13876f96dd55608d03cd4883a0545884932d5adf11925876c96daef" dependencies = [ "indexmap", ] [[package]] name = "wasmtime" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f50eadf868ab6a04b7b511460233377d0bfbb92e417b2f6a98b98fef2e098f5" +checksum = "4ad5af6ba38311282f2a21670d96e78266e8c8e2f38cbcd52c254df6ccbc7731" dependencies = [ "anyhow", - "backtrace", "bincode", - "cfg-if 1.0.0", + "cfg-if", "indexmap", - "lazy_static", "libc", "log", - "object 0.28.4", + "object 0.29.0", "once_cell", "paste", "psm", "rayon", - "region", "serde", "target-lexicon", "wasmparser", @@ -12946,14 +13735,23 @@ dependencies = [ "wasmtime-environ", "wasmtime-jit", "wasmtime-runtime", - "winapi", + "windows-sys 0.36.1", +] + +[[package]] +name = "wasmtime-asm-macros" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45de63ddfc8b9223d1adc8f7b2ee5f35d1f6d112833934ad7ea66e4f4339e597" +dependencies = [ + "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1df23c642e1376892f3b72f311596976979cbf8b85469680cdd3a8a063d12a2" +checksum = "bcd849399d17d2270141cfe47fa0d91ee52d5f8ea9b98cf7ddde0d53e5f79882" dependencies = [ "anyhow", "base64 0.13.1", @@ -12961,19 +13759,19 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix 0.33.7", + "rustix 0.35.13", "serde", "sha2 0.9.9", "toml", - "winapi", + "windows-sys 0.36.1", "zstd", ] [[package]] name = "wasmtime-cranelift" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f264ff6b4df247d15584f2f53d009fbc90032cfdc2605b52b961bffc71b6eccd" +checksum = "4bd91339b742ff20bfed4532a27b73c86b5bcbfedd6bea2dcdf2d64471e1b5c6" dependencies = [ "anyhow", "cranelift-codegen", @@ -12983,8 +13781,7 @@ dependencies = [ "cranelift-wasm", "gimli 0.26.2", "log", - "more-asserts", - "object 0.28.4", + "object 0.29.0", "target-lexicon", "thiserror", "wasmparser", @@ -12993,17 +13790,16 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "839d2820e4b830f4b9e7aa08d4c0acabf4a5036105d639f6dfa1c6891c73bdc6" +checksum = "ebb881c61f4f627b5d45c54e629724974f8a8890d455bcbe634330cc27309644" dependencies = [ "anyhow", "cranelift-entity", "gimli 0.26.2", "indexmap", "log", - "more-asserts", - "object 0.28.4", + "object 0.29.0", "serde", "target-lexicon", "thiserror", @@ -13013,72 +13809,70 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef0a0bcbfa18b946d890078ba0e1bc76bcc53eccfb40806c0020ec29dcd1bd49" +checksum = "1985c628011fe26adf5e23a5301bdc79b245e0e338f14bb58b39e4e25e4d8681" dependencies = [ "addr2line 0.17.0", "anyhow", "bincode", - "cfg-if 1.0.0", + "cfg-if", "cpp_demangle", "gimli 0.26.2", "log", - "object 0.28.4", - "region", + "object 0.29.0", "rustc-demangle", - "rustix 0.33.7", + "rustix 0.35.13", "serde", "target-lexicon", "thiserror", "wasmtime-environ", "wasmtime-jit-debug", "wasmtime-runtime", - "winapi", + "windows-sys 0.36.1", ] [[package]] name = "wasmtime-jit-debug" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4779d976206c458edd643d1ac622b6c37e4a0800a8b1d25dfbf245ac2f2cac" +checksum = "f671b588486f5ccec8c5a3dba6b4c07eac2e66ab8c60e6f4e53717c77f709731" dependencies = [ - "lazy_static", - "object 0.28.4", - "rustix 0.33.7", + "object 0.29.0", + "once_cell", + "rustix 0.35.13", ] [[package]] name = "wasmtime-runtime" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7eb6ffa169eb5dcd18ac9473c817358cd57bc62c244622210566d473397954a" +checksum = "ee8f92ad4b61736339c29361da85769ebc200f184361959d1792832e592a1afd" dependencies = [ "anyhow", - "backtrace", "cc", - "cfg-if 1.0.0", + "cfg-if", "indexmap", "libc", "log", "mach", "memfd", "memoffset 0.6.5", - "more-asserts", + "paste", "rand 0.8.5", - "region", - "rustix 0.33.7", + "rustix 0.35.13", "thiserror", + "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", - "winapi", + "windows-sys 0.36.1", ] [[package]] name = "wasmtime-types" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d932b0ac5336f7308d869703dd225610a6a3aeaa8e968c52b43eed96cefb1c2" +checksum = "d23d61cb4c46e837b431196dd06abb11731541021916d03476a178b54dc07aeb" dependencies = [ "cranelift-entity", "serde", @@ -13088,14 +13882,24 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.60" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" dependencies = [ "js-sys", "wasm-bindgen", ] +[[package]] +name = "webpki" +version = "0.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "webpki" version = "0.22.0" @@ -13112,24 +13916,226 @@ version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ - "webpki", + "webpki 0.22.0", ] [[package]] -name = "wepoll-ffi" -version = "0.1.2" +name = "webrtc" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" +checksum = "2d3bc9049bdb2cea52f5fd4f6f728184225bdb867ed0dc2410eab6df5bdd67bb" dependencies = [ + "arc-swap", + "async-trait", + "bytes", + "hex", + "interceptor", + "lazy_static", + "log", + "rand 0.8.5", + "rcgen 0.9.3", + "regex", + "ring", + "rtcp", + "rtp", + "rustls 0.19.1", + "sdp", + "serde", + "serde_json", + "sha2 0.10.6", + "stun", + "thiserror", + "time 0.3.20", + "tokio", + "turn", + "url", + "waitgroup", + "webrtc-data", + "webrtc-dtls", + "webrtc-ice", + "webrtc-mdns", + "webrtc-media", + "webrtc-sctp", + "webrtc-srtp", + "webrtc-util", +] + +[[package]] +name = "webrtc-data" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ef36a4d12baa6e842582fe9ec16a57184ba35e1a09308307b67d43ec8883100" +dependencies = [ + "bytes", + "derive_builder", + "log", + "thiserror", + "tokio", + "webrtc-sctp", + "webrtc-util", +] + +[[package]] +name = "webrtc-dtls" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "942be5bd85f072c3128396f6e5a9bfb93ca8c1939ded735d177b7bcba9a13d05" +dependencies = [ + "aes 0.6.0", + "aes-gcm 0.10.1", + "async-trait", + "bincode", + "block-modes", + "byteorder", + "ccm", + "curve25519-dalek 3.2.0", + "der-parser 8.2.0", + "elliptic-curve", + "hkdf", + "hmac 0.12.1", + "log", + "oid-registry 0.6.1", + "p256", + "p384", + "rand 0.8.5", + "rand_core 0.6.4", + "rcgen 0.9.3", + "ring", + "rustls 0.19.1", + "sec1", + "serde", + "sha1", + "sha2 0.10.6", + "signature", + "subtle", + "thiserror", + "tokio", + "webpki 0.21.4", + "webrtc-util", + "x25519-dalek 2.0.0-pre.1", + "x509-parser 0.13.2", +] + +[[package]] +name = "webrtc-ice" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "465a03cc11e9a7d7b4f9f99870558fe37a102b65b93f8045392fef7c67b39e80" +dependencies = [ + "arc-swap", + "async-trait", + "crc", + "log", + "rand 0.8.5", + "serde", + "serde_json", + "stun", + "thiserror", + "tokio", + "turn", + "url", + "uuid", + "waitgroup", + "webrtc-mdns", + "webrtc-util", +] + +[[package]] +name = "webrtc-mdns" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f08dfd7a6e3987e255c4dbe710dde5d94d0f0574f8a21afa95d171376c143106" +dependencies = [ + "log", + "socket2", + "thiserror", + "tokio", + "webrtc-util", +] + +[[package]] +name = "webrtc-media" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee2a3c157a040324e5049bcbd644ffc9079e6738fa2cfab2bcff64e5cc4c00d7" +dependencies = [ + "byteorder", + "bytes", + "derive_builder", + "displaydoc", + "rand 0.8.5", + "rtp", + "thiserror", + "webrtc-util", +] + +[[package]] +name = "webrtc-sctp" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d47adcd9427eb3ede33d5a7f3424038f63c965491beafcc20bc650a2f6679c0" +dependencies = [ + "arc-swap", + "async-trait", + "bytes", + "crc", + "log", + "rand 0.8.5", + "thiserror", + "tokio", + "webrtc-util", +] + +[[package]] +name = "webrtc-srtp" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6183edc4c1c6c0175f8812eefdce84dfa0aea9c3ece71c2bf6ddd3c964de3da5" +dependencies = [ + "aead 0.4.3", + "aes 0.7.5", + "aes-gcm 0.9.4", + "async-trait", + "byteorder", + "bytes", + "ctr 0.8.0", + "hmac 0.11.0", + "log", + "rtcp", + "rtp", + "sha-1", + "subtle", + "thiserror", + "tokio", + "webrtc-util", +] + +[[package]] +name = "webrtc-util" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f1db1727772c05cf7a2cfece52c3aca8045ca1e176cd517d323489aa3c6d87" +dependencies = [ + "async-trait", + "bitflags", + "bytes", "cc", + "ipnet", + "lazy_static", + "libc", + "log", + "nix", + "rand 0.8.5", + "thiserror", + "tokio", + "winapi", ] [[package]] name = "westend-runtime" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ - "beefy-primitives", "bitvec", "frame-benchmarking", "frame-election-provider-support", @@ -13151,6 +14157,7 @@ dependencies = [ "pallet-election-provider-multi-phase", "pallet-election-provider-support-benchmarking", "pallet-elections-phragmen", + "pallet-fast-unstake", "pallet-grandpa", "pallet-identity", "pallet-im-online", @@ -13192,6 +14199,7 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -13215,21 +14223,23 @@ dependencies = [ [[package]] name = "westend-runtime-constants" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", + "sp-core", "sp-runtime", + "sp-weights", ] [[package]] name = "which" -version = "4.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" +checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" dependencies = [ "either", "libc", @@ -13238,9 +14248,9 @@ dependencies = [ [[package]] name = "wide" -version = "0.7.5" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae41ecad2489a1655c8ef8489444b0b113c0a0c795944a3572a0931cf7d2525c" +checksum = "b689b6c49d6549434bf944e6b0f39238cf63693cb7a147e9d887507fffa3b223" dependencies = [ "bytemuck", "safe_arch", @@ -13296,26 +14306,102 @@ dependencies = [ "windows_x86_64_msvc 0.34.0", ] +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets 0.48.0", +] + +[[package]] +name = "windows-sys" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +dependencies = [ + "windows_aarch64_msvc 0.36.1", + "windows_i686_gnu 0.36.1", + "windows_i686_msvc 0.36.1", + "windows_x86_64_gnu 0.36.1", + "windows_x86_64_msvc 0.36.1", +] + [[package]] name = "windows-sys" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.0", - "windows_i686_gnu 0.42.0", - "windows_i686_msvc 0.42.0", - "windows_x86_64_gnu 0.42.0", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.0", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.0", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" [[package]] name = "windows_aarch64_msvc" @@ -13325,9 +14411,21 @@ checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" [[package]] name = "windows_aarch64_msvc" -version = "0.42.0" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" [[package]] name = "windows_i686_gnu" @@ -13337,9 +14435,21 @@ checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" [[package]] name = "windows_i686_gnu" -version = "0.42.0" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] name = "windows_i686_msvc" @@ -13349,9 +14459,21 @@ checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" [[package]] name = "windows_i686_msvc" -version = "0.42.0" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" [[package]] name = "windows_x86_64_gnu" @@ -13361,15 +14483,33 @@ checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" [[package]] name = "windows_x86_64_gnu" -version = "0.42.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.0" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" [[package]] name = "windows_x86_64_msvc" @@ -13379,9 +14519,30 @@ checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" [[package]] name = "windows_x86_64_msvc" -version = "0.42.0" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + +[[package]] +name = "winnow" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +checksum = "ae8970b36c66498d8ff1d66685dc86b91b29db0c7739899012f63a63814b4b28" +dependencies = [ + "memchr", +] [[package]] name = "winreg" @@ -13412,10 +14573,58 @@ dependencies = [ "zeroize", ] +[[package]] +name = "x25519-dalek" +version = "2.0.0-pre.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5da623d8af10a62342bcbbb230e33e58a63255a58012f8653c578e54bab48df" +dependencies = [ + "curve25519-dalek 3.2.0", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "x509-parser" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb9bace5b5589ffead1afb76e43e34cff39cd0f3ce7e170ae0c29e53b88eb1c" +dependencies = [ + "asn1-rs 0.3.1", + "base64 0.13.1", + "data-encoding", + "der-parser 7.0.0", + "lazy_static", + "nom", + "oid-registry 0.4.0", + "ring", + "rusticata-macros", + "thiserror", + "time 0.3.20", +] + +[[package]] +name = "x509-parser" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" +dependencies = [ + "asn1-rs 0.5.2", + "base64 0.13.1", + "data-encoding", + "der-parser 8.2.0", + "lazy_static", + "nom", + "oid-registry 0.6.1", + "rusticata-macros", + "thiserror", + "time 0.3.20", +] + [[package]] name = "xcm" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "derivative", "impl-trait-for-tuples", @@ -13428,8 +14637,8 @@ dependencies = [ [[package]] name = "xcm-builder" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "frame-support", "frame-system", @@ -13448,8 +14657,8 @@ dependencies = [ [[package]] name = "xcm-executor" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "frame-benchmarking", "frame-support", @@ -13466,19 +14675,19 @@ dependencies = [ [[package]] name = "xcm-procedural" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "Inflector", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "xcm-simulator" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.37" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3" dependencies = [ "frame-support", "parity-scale-codec", @@ -13498,7 +14707,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d9ba232399af1783a58d8eb26f6b5006fbefe2dc9ef36bd283324792d03ea5" dependencies = [ - "futures 0.3.25", + "futures 0.3.28", "log", "nohash-hasher", "parking_lot 0.12.1", @@ -13506,25 +14715,33 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "yasna" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +dependencies = [ + "time 0.3.20", +] + [[package]] name = "zeroize" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.3.3" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn", - "synstructure", + "syn 2.0.15", ] [[package]] @@ -13548,9 +14765,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.5+zstd.1.5.2" +version = "2.0.8+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc50ffce891ad571e9f9afe5039c4837bede781ac4bb13052ed7ae695518596" +checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" dependencies = [ "cc", "libc", diff --git a/node/Cargo.toml b/node/Cargo.toml index c5ee10675..519f12a56 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -15,89 +15,92 @@ version = '4.0.7' targets = ['x86_64-unknown-linux-gnu'] [dependencies] -async-trait = "0.1.52" +async-trait = "0.1.66" cfg-if = "1.0.0" -clap = { version = "3.1", features = ["derive"] } -codec = { package = 'parity-scale-codec', version = '3.1.2' } -futures = "0.3.21" +clap = { version = "4.1.8", features = ["derive"] } +codec = { package = 'parity-scale-codec', version = '3.4.0' } +futures = "0.3.26" hex-literal = "0.3" log = "0.4.16" serde = { version = "1.0.140", features = ["derive"] } tracing-core = "=0.1.30" # Substrate frames -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -frame-benchmarking-cli = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -try-runtime-cli = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", optional = true } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +frame-benchmarking-cli = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +try-runtime-cli = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", optional = true } # RPC related dependencies -frame-rpc-system = { package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -jsonrpsee = { version = "0.15.0", features = ["server"] } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +frame-rpc-system = { package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } +jsonrpsee = { version = "0.16.2", features = ["server"] } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } # Substrate client dependencies -sc-basic-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sc-chain-spec = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sc-cli = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sc-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sc-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sc-consensus-manual-seal = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sc-consensus-slots = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sc-executor = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sc-network = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sc-sysinfo = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sc-telemetry = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sc-tracing = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } +sc-basic-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sc-chain-spec = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sc-cli = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sc-client-db = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sc-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sc-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sc-consensus-manual-seal = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sc-consensus-slots = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sc-executor = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sc-network = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } +sc-network-common = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } +sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sc-sysinfo = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } +sc-telemetry = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sc-tracing = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } # Substrate primitives -sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-application-crypto = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-arithmetic = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-keystore = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-application-crypto = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-arithmetic = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } +sp-keystore = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } +sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } # Cumulus dependencies -cumulus-client-cli = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" } -cumulus-client-consensus-aura = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" } -cumulus-client-consensus-common = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" } -cumulus-client-consensus-relay-chain = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" } -cumulus-client-network = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" } -cumulus-client-service = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" } -cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" } -cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" } -cumulus-relay-chain-inprocess-interface = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" } -cumulus-relay-chain-interface = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" } -cumulus-relay-chain-rpc-interface = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" } +cumulus-client-cli = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.37" } +cumulus-client-consensus-aura = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.37" } +cumulus-client-consensus-common = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.37" } +cumulus-client-consensus-relay-chain = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.37" } +cumulus-client-network = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.37" } +cumulus-client-service = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.37" } +cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.37" } +cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.37" } +cumulus-relay-chain-inprocess-interface = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.37" } +cumulus-relay-chain-interface = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.37" } +cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.37" } +cumulus-relay-chain-rpc-interface = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.37" } # Nimbus dependencies -nimbus-consensus = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.1" } -nimbus-primitives = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.1" } -pallet-author-inherent = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.1" } +nimbus-consensus = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.7" } +nimbus-primitives = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.7" } +pallet-author-inherent = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.7" } # Polkadot dependencies -polkadot-cli = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } -polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } -polkadot-service = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } -xcm = { git = "https://github.com/paritytech/polkadot.git", branch = "release-v0.9.28" } +polkadot-cli = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } +polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } +polkadot-service = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } +xcm = { git = "https://github.com/paritytech/polkadot.git", branch = "release-v0.9.37" } # Self dependencies calamari-runtime = { path = '../runtime/calamari' } @@ -110,7 +113,7 @@ pallet-parachain-staking = { path = '../pallets/parachain-staking' } session-key-primitives = { path = '../primitives/session-keys' } [build-dependencies] -substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } +substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } [features] fast-runtime = [ @@ -125,5 +128,5 @@ runtime-benchmarks = [ try-runtime = [ 'calamari-runtime/try-runtime', 'manta-runtime/try-runtime', - 'try-runtime-cli', + 'try-runtime-cli/try-runtime', ] diff --git a/node/src/aura_or_nimbus_consensus.rs b/node/src/aura_or_nimbus_consensus.rs index f268da9ba..20586daa5 100644 --- a/node/src/aura_or_nimbus_consensus.rs +++ b/node/src/aura_or_nimbus_consensus.rs @@ -27,14 +27,14 @@ use sc_consensus::{ import_queue::{BasicQueue, Verifier as VerifierT}, BlockImport, BlockImportParams, }; -use sc_consensus_aura::BuildVerifierParams; +use sc_consensus_aura::{BuildVerifierParams, CompatibilityMode}; use sc_consensus_slots::InherentDataProviderExt; use sc_telemetry::TelemetryHandle; use session_key_primitives::aura::AuraId; use sp_api::ProvideRuntimeApi; use sp_block_builder::BlockBuilder as BlockBuilderApi; use sp_blockchain::Result as ClientResult; -use sp_consensus::{error::Error as ConsensusError, CacheKeyId, NeverCanAuthor}; +use sp_consensus::{error::Error as ConsensusError, CacheKeyId}; use sp_consensus_aura::AuraApi; use sp_inherents::CreateInherentDataProviders; use sp_runtime::{ @@ -49,8 +49,12 @@ use sc_consensus_aura::CompatibleDigestItem as AuraDigestItem; const LOG_TARGET: &str = "aura-nimbus-consensus"; struct AuraOrNimbusVerifier { - aura_verifier: - sc_consensus_aura::AuraVerifier::Pair, NeverCanAuthor, AuraCIDP>, + aura_verifier: sc_consensus_aura::AuraVerifier< + Client, + ::Pair, + AuraCIDP, + <::Header as HeaderT>::Number, + >, nimbus_verifier: nimbus_consensus::Verifier, } impl AuraOrNimbusVerifier @@ -73,10 +77,9 @@ where aura_verifier: sc_consensus_aura::build_verifier(BuildVerifierParams { client: client.clone(), create_inherent_data_providers: create_inherent_data_providers_aura, - // NOTE: We only support verification of historic aura blocks, not new block proposals using aura - can_author_with: NeverCanAuthor {}, check_for_equivocation: sc_consensus_aura::CheckForEquivocation::Yes, telemetry, + compatibility_mode: CompatibilityMode::None, }), nimbus_verifier: nimbus_consensus::Verifier::new( client, @@ -139,6 +142,7 @@ where pub fn import_queue( client: Arc, block_import: InnerBI, + backend: Arc>, spawner: &impl sp_core::traits::SpawnEssentialNamed, registry: Option<&substrate_prometheus_endpoint::Registry>, telemetry: Option, @@ -164,7 +168,7 @@ where *timestamp, slot_duration, ); - Ok((timestamp, slot)) + Ok((slot, timestamp)) } }, move |_, _| async move { @@ -182,6 +186,7 @@ where // node/src/service.rs:L467 aka. BuildNimbusConsensusParams Box::new(cumulus_client_consensus_common::ParachainBlockImport::new( block_import, + backend, )), None, spawner, diff --git a/node/src/builder.rs b/node/src/builder.rs index 8ffe71090..7c4310a19 100644 --- a/node/src/builder.rs +++ b/node/src/builder.rs @@ -46,7 +46,7 @@ use cumulus_primitives_parachain_inherent::{ }; use cumulus_relay_chain_inprocess_interface::build_inprocess_relay_chain; use cumulus_relay_chain_interface::{RelayChainInterface, RelayChainResult}; -use cumulus_relay_chain_rpc_interface::{create_client_and_start_worker, RelayChainRpcInterface}; +use cumulus_relay_chain_minimal_node::build_minimal_relay_chain_node; use nimbus_consensus::{ BuildNimbusConsensusParams, NimbusConsensus, NimbusManualSealConsensusDataProvider, @@ -64,21 +64,21 @@ pub async fn build_relay_chain_interface( Arc<(dyn RelayChainInterface + 'static)>, Option, )> { - match collator_options.relay_chain_rpc_url { - Some(relay_chain_url) => { - let client = create_client_and_start_worker(relay_chain_url, task_manager).await?; - Ok(( - Arc::new(RelayChainRpcInterface::new(client)) as Arc<_>, - None, - )) - } - None => build_inprocess_relay_chain( + if !collator_options.relay_chain_rpc_urls.is_empty() { + build_minimal_relay_chain_node( + polkadot_config, + task_manager, + collator_options.relay_chain_rpc_urls, + ) + .await + } else { + build_inprocess_relay_chain( polkadot_config, parachain_config, telemetry_worker_handle, task_manager, hwbench, - ), + ) } } @@ -86,6 +86,7 @@ pub async fn build_relay_chain_interface( pub fn build_nimbus_consensus( id: ParaId, client: Arc>, + backend: Arc>, prometheus_registry: Option<&Registry>, telemetry: Option, task_manager: &TaskManager, @@ -141,6 +142,7 @@ where para_id: id, proposer_factory, block_import: client.clone(), + backend, parachain_client: client, keystore, skip_prediction: force_authoring, @@ -215,6 +217,8 @@ where current_para_block, relay_offset: 1000, relay_blocks_per_para_block: 2, + para_blocks_per_relay_epoch: 0, + relay_randomness_config: (), xcm_config: MockXcmConfig::new( &*client_for_xcm, block, diff --git a/node/src/chain_specs/manta/mod.rs b/node/src/chain_specs/manta/mod.rs index d6177dbcd..171118ba8 100644 --- a/node/src/chain_specs/manta/mod.rs +++ b/node/src/chain_specs/manta/mod.rs @@ -22,7 +22,7 @@ use manta_runtime::{ opaque::SessionKeys, staking::NORMAL_COLLATOR_MINIMUM_STAKE, GenesisConfig, ParachainStakingConfig, PolkadotXcmConfig, }; -use sc_network::config::MultiaddrWithPeerId; +use sc_network_common::config::MultiaddrWithPeerId; mod local_testnets_geneses; mod public_testnet_genesis; diff --git a/node/src/cli.rs b/node/src/cli.rs index 6150d11fd..ab09b48bc 100644 --- a/node/src/cli.rs +++ b/node/src/cli.rs @@ -52,7 +52,7 @@ pub enum Subcommand { /// Sub-commands concerned with benchmarking. /// The pallet benchmarking moved to the `pallet` sub-command. - #[clap(subcommand)] + #[command(subcommand)] Benchmark(frame_benchmarking_cli::BenchmarkCmd), /// Try some command against runtime state. @@ -67,18 +67,18 @@ pub enum Subcommand { /// Node CLI #[derive(Debug, Parser)] -#[clap( +#[command( propagate_version = true, args_conflicts_with_subcommands = true, subcommand_negates_reqs = true )] pub struct Cli { /// Subcommand - #[clap(subcommand)] + #[command(subcommand)] pub subcommand: Option, /// Cumulus Client Running CLI - #[clap(flatten)] + #[command(flatten)] pub run: cumulus_client_cli::RunCmd, /// Disable automatic hardware benchmarks. @@ -88,11 +88,11 @@ pub struct Cli { /// /// The results are then printed out in the logs, and also sent as part of /// telemetry, if telemetry is enabled. - #[clap(long)] + #[arg(long)] pub no_hardware_benchmarks: bool, /// Relay chain arguments - #[clap(raw = true, conflicts_with = "relay-chain-rpc-url")] + #[arg(raw = true)] pub relaychain_args: Vec, } diff --git a/node/src/command.rs b/node/src/command.rs index 12c2d618c..f4aaf4abe 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -372,6 +372,12 @@ pub fn run_with(cli: Cli) -> Result { BenchmarkCmd::Block(cmd) => runner.sync_run(|config| { construct_benchmark_partials!(config, |partials| cmd.run(partials.client)) }), + #[cfg(not(feature = "runtime-benchmarks"))] + BenchmarkCmd::Storage(_) => Err( + "Storage benchmarking can be enabled with `--features runtime-benchmarks`." + .into(), + ), + #[cfg(feature = "runtime-benchmarks")] BenchmarkCmd::Storage(cmd) => runner.sync_run(|config| { construct_benchmark_partials!(config, |partials| { let db = partials.backend.expose_db(); @@ -389,6 +395,8 @@ pub fn run_with(cli: Cli) -> Result { } #[cfg(feature = "try-runtime")] Some(Subcommand::TryRuntime(cmd)) => { + use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch}; + // grab the task manager. let runner = cli.create_runner(cmd)?; let registry = &runner @@ -401,13 +409,22 @@ pub fn run_with(cli: Cli) -> Result { .map_err(|e| format!("Error: {e:?}"))?; if runner.config().chain_spec.is_manta() { - runner.async_run(|config| { - Ok((cmd.run::(config), task_manager)) + runner.async_run(|_config| { + Ok(( + cmd.run::::ExtendHostFunctions, + >>(), + task_manager, + )) }) } else if runner.config().chain_spec.is_calamari() { - runner.async_run(|config| { + runner.async_run(|_config| { Ok(( - cmd.run::(config), + cmd.run::::ExtendHostFunctions, + >>(), task_manager, )) }) @@ -583,7 +600,7 @@ impl CliConfiguration for RelayChainCli { fn base_path(&self) -> Result> { Ok(self .shared_params() - .base_path() + .base_path()? .or_else(|| self.base_path.clone().map(Into::into))) } @@ -640,10 +657,6 @@ impl CliConfiguration for RelayChainCli { self.base.base.transaction_pool(is_dev) } - fn state_cache_child_ratio(&self) -> Result> { - self.base.base.state_cache_child_ratio() - } - fn rpc_methods(&self) -> Result { self.base.base.rpc_methods() } diff --git a/node/src/service.rs b/node/src/service.rs index 94e3e2900..b5d700175 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -31,6 +31,7 @@ use cumulus_relay_chain_interface::{RelayChainError, RelayChainInterface}; use jsonrpsee::RpcModule; pub use manta_primitives::types::{AccountId, Balance, Block, Hash, Header, Index as Nonce}; +use sc_consensus::ImportQueue; use sc_executor::WasmExecutor; use sc_network::{NetworkBlock, NetworkService}; pub use sc_rpc::{DenyUnsafe, SubscriptionTaskExecutor}; @@ -100,7 +101,8 @@ pub type DefaultExecutorType = WasmExecutor; pub type Client = TFullClient; /// Default Import Queue Type -pub type ImportQueue = sc_consensus::DefaultImportQueue>; +pub type DefaultImportQueue = + sc_consensus::DefaultImportQueue>; /// Full Transaction Pool Type pub type TransactionPool = sc_transaction_pool::FullPool>; @@ -110,7 +112,7 @@ pub type PartialComponents = sc_service::PartialComponents< Client, TFullBackend, (), - ImportQueue, + DefaultImportQueue, TransactionPool, (Option, Option), >; @@ -173,6 +175,7 @@ where // single step block import pipeline, after nimbus/aura seal, import block into client client.clone(), client.clone(), + backend.clone(), &task_manager.spawn_essential_handle(), config.prometheus_registry(), telemetry.as_ref().map(|telemetry| telemetry.handle()), @@ -215,6 +218,7 @@ where BIC: FnOnce( ParaId, Arc>, + Arc>, Option<&Registry>, Option, &TaskManager, @@ -253,14 +257,15 @@ where let collator = parachain_config.role.is_authority(); let prometheus_registry = parachain_config.prometheus_registry().cloned(); let transaction_pool = params.transaction_pool.clone(); - let import_queue = cumulus_client_service::SharedImportQueue::new(params.import_queue); - let (network, system_rpc_tx, start_network) = + let import_queue = params.import_queue.service(); + + let (network, system_rpc_tx, tx_handler_controller, start_network) = sc_service::build_network(sc_service::BuildNetworkParams { config: ¶chain_config, client: client.clone(), transaction_pool: transaction_pool.clone(), spawn_handle: task_manager.spawn_handle(), - import_queue: import_queue.clone(), + import_queue: params.import_queue, block_announce_validator_builder: Some(Box::new(|_| { Box::new(block_announce_validator) })), @@ -292,6 +297,7 @@ where backend: backend.clone(), network: network.clone(), system_rpc_tx, + tx_handler_controller, telemetry: telemetry.as_mut(), })?; @@ -305,6 +311,7 @@ where let parachain_consensus = build_consensus( id, client.clone(), + backend, prometheus_registry.as_ref(), telemetry.as_ref().map(|t| t.handle()), &task_manager, @@ -338,7 +345,6 @@ where relay_chain_interface, relay_chain_slot_duration, import_queue, - collator_options, })?; } @@ -405,7 +411,7 @@ where other: (_, _), } = new_partial::(&config)?; - let (network, system_rpc_tx, network_starter) = + let (network, system_rpc_tx, tx_handler_controller, network_starter) = sc_service::build_network(sc_service::BuildNetworkParams { config: &config, client: client.clone(), @@ -460,6 +466,7 @@ where backend, network, system_rpc_tx, + tx_handler_controller, telemetry: None, })?; diff --git a/pallets/asset-manager/Cargo.toml b/pallets/asset-manager/Cargo.toml index bc9538e11..64f7faaba 100644 --- a/pallets/asset-manager/Cargo.toml +++ b/pallets/asset-manager/Cargo.toml @@ -8,31 +8,31 @@ repository = 'https://github.com/Manta-Network/Manta/' version = '4.0.7' [dependencies] -codec = { package = "parity-scale-codec", version = "3.1.2", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false, optional = true } -frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } +codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false, optional = true } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } log = { version = "0.4.0", default-features = false } manta-primitives = { path = "../../primitives/manta", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-arithmetic = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } -xcm = { git = "https://github.com/paritytech/polkadot.git", default-features = false, branch = "release-v0.9.28" } +sp-arithmetic = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } +xcm = { git = "https://github.com/paritytech/polkadot.git", default-features = false, branch = "release-v0.9.37" } # 3rd party dependencies -orml-traits = { git = "https://github.com/manta-network/open-runtime-module-library.git", default-features = false, branch = "polkadot-v0.9.28" } +orml-traits = { git = "https://github.com/manta-network/open-runtime-module-library.git", default-features = false, branch = "polkadot-v0.9.37" } [dev-dependencies] -pallet-assets = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +pallet-assets = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } +sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } [features] default = ["std"] runtime-benchmarks = [ - "frame-benchmarking", + "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "manta-primitives/runtime-benchmarks", @@ -52,4 +52,5 @@ std = [ ] try-runtime = [ "frame-support/try-runtime", + "frame-system/try-runtime", ] diff --git a/pallets/asset-manager/src/benchmarking.rs b/pallets/asset-manager/src/benchmarking.rs index df7e4969c..4bf26aa29 100644 --- a/pallets/asset-manager/src/benchmarking.rs +++ b/pallets/asset-manager/src/benchmarking.rs @@ -16,16 +16,16 @@ #![cfg(feature = "runtime-benchmarks")] -use crate::{Call, Config, Event, Pallet}; +use crate::{Call, Config, Pallet}; use frame_benchmarking::{benchmarks, impl_benchmark_test_suite, whitelisted_caller}; use frame_support::traits::Get; use frame_system::{EventRecord, RawOrigin}; use manta_primitives::assets::{AssetConfig, TestingDefault, UnitsPerSecond}; use xcm::latest::prelude::*; -fn assert_last_event(generic_event: ::Event) { +fn assert_last_event(generic_event: ::RuntimeEvent) { let events = frame_system::Pallet::::events(); - let system_event: ::Event = generic_event.into(); + let system_event: ::RuntimeEvent = generic_event.into(); let EventRecord { event, .. } = &events[events.len() - 1]; assert_eq!(event, &system_event); } @@ -95,7 +95,7 @@ benchmarks! { let some_valid_asset_id = ::AssetId::from(assets_count); }: _(RawOrigin::Root, some_valid_asset_id, metadata.clone()) verify { - assert_last_event::(Event::AssetMetadataUpdated { asset_id: some_valid_asset_id, metadata }.into()); + assert_last_event::(crate::Event::AssetMetadataUpdated { asset_id: some_valid_asset_id, metadata }.into()); } mint_asset { @@ -114,7 +114,7 @@ benchmarks! { let some_valid_asset_id = ::AssetId::from(assets_count); }: _(RawOrigin::Root, ::AssetId::from(assets_count), beneficiary.clone(), ::Balance::from(amount) ) verify { - assert_last_event::(Event::AssetMinted { asset_id: some_valid_asset_id, beneficiary, amount: ::Balance::from(amount) }.into()); + assert_last_event::(crate::Event::AssetMinted { asset_id: some_valid_asset_id, beneficiary, amount: ::Balance::from(amount) }.into()); } set_min_xcm_fee { diff --git a/pallets/asset-manager/src/lib.rs b/pallets/asset-manager/src/lib.rs index 51af3f703..aea9c0798 100644 --- a/pallets/asset-manager/src/lib.rs +++ b/pallets/asset-manager/src/lib.rs @@ -76,7 +76,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { /// The overarching event type. - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Asset Id Type type AssetId: AtLeast32BitUnsigned @@ -106,7 +106,7 @@ pub mod pallet { /// The origin which may forcibly create or destroy an asset or otherwise alter privileged /// attributes. - type ModifierOrigin: EnsureOrigin; + type ModifierOrigin: EnsureOrigin; /// Pallet ID type PalletId: Get; diff --git a/pallets/asset-manager/src/migrations.rs b/pallets/asset-manager/src/migrations.rs index f0a8d4284..dbdc62933 100644 --- a/pallets/asset-manager/src/migrations.rs +++ b/pallets/asset-manager/src/migrations.rs @@ -24,6 +24,7 @@ use frame_support::{ pallet_prelude::Weight, traits::{Get, OnRuntimeUpgrade, PalletInfoAccess, StorageVersion}, }; +use sp_std::vec::Vec; /// Storage migration to populate the existing assets' /// entries in the new AllowedDestParaIds storage item @@ -38,8 +39,8 @@ where let storage_version = ::on_chain_storage_version(); if storage_version < 1 { log::info!(target: "asset-manager", "Start to execute storage migration for asset-manager."); - let mut reads: Weight = 0; - let mut writes: Weight = 0; + let mut reads: u64 = 0; + let mut writes: u64 = 0; LocationAssetId::::iter().for_each(|(location, _asset_id)| { reads += 1; if let Some(para_id) = @@ -66,16 +67,16 @@ where } #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result<(), &'static str> { + fn pre_upgrade() -> Result, &'static str> { let storage_version = ::on_chain_storage_version(); if storage_version >= 1 { return Err("Storage version is >= 1, the migration won't be executed."); } - Ok(()) + Ok(Vec::new()) } #[cfg(feature = "try-runtime")] - fn post_upgrade() -> Result<(), &'static str> { + fn post_upgrade(_state: Vec) -> Result<(), &'static str> { let storage_version = ::on_chain_storage_version(); if storage_version < 1 { return Err("Storage version is >= 1, the migration won't be executed."); diff --git a/pallets/asset-manager/src/mock.rs b/pallets/asset-manager/src/mock.rs index ef009b8c4..c97d1f16a 100644 --- a/pallets/asset-manager/src/mock.rs +++ b/pallets/asset-manager/src/mock.rs @@ -22,10 +22,14 @@ use crate as pallet_asset_manager; use crate::mock::sp_api_hidden_includes_construct_runtime::hidden_include::traits::GenesisBuild; use frame_support::{ - construct_runtime, pallet_prelude::DispatchResult, parameter_types, traits::ConstU32, PalletId, + construct_runtime, + pallet_prelude::DispatchResult, + parameter_types, + traits::{AsEnsureOriginWithArg, ConstU32}, + PalletId, }; use frame_system as system; -use frame_system::EnsureRoot; +use frame_system::{EnsureNever, EnsureRoot}; use manta_primitives::{ assets::{ AssetConfig, AssetIdType, AssetLocation, AssetRegistry, AssetRegistryMetadata, @@ -51,8 +55,8 @@ impl system::Config for Runtime { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; type Hash = H256; @@ -60,7 +64,7 @@ impl system::Config for Runtime { type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = ConstU32<250>; type Version = (); type PalletInfo = PalletInfo; @@ -83,7 +87,7 @@ parameter_types! { } impl pallet_assets::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CalamariAssetId; type Currency = Balances; @@ -97,6 +101,12 @@ impl pallet_assets::Config for Runtime { type Freezer = (); type Extra = (); type WeightInfo = (); + type RemoveItemsLimit = ConstU32<1000>; + type AssetIdParameter = CalamariAssetId; + type CreateOrigin = AsEnsureOriginWithArg>; + type CallbackHandle = (); + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); } parameter_types! { @@ -108,7 +118,7 @@ parameter_types! { impl pallet_balances::Config for Runtime { type MaxLocks = MaxLocks; type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -135,7 +145,7 @@ impl AssetRegistry for MantaAssetRegistry { is_sufficient: bool, ) -> DispatchResult { Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), asset_id, AssetManager::account_id(), is_sufficient, @@ -143,7 +153,7 @@ impl AssetRegistry for MantaAssetRegistry { )?; Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), asset_id, metadata.name, metadata.symbol, @@ -157,7 +167,7 @@ impl AssetRegistry for MantaAssetRegistry { metadata: AssetStorageMetadata, ) -> DispatchResult { Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), *asset_id, metadata.name, metadata.symbol, @@ -209,7 +219,7 @@ impl AssetConfig for MantaAssetConfig { } impl pallet_asset_manager::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AssetId = CalamariAssetId; type Balance = Balance; type Location = AssetLocation; diff --git a/pallets/asset-manager/src/tests.rs b/pallets/asset-manager/src/tests.rs index 67a6329bd..44a57e447 100644 --- a/pallets/asset-manager/src/tests.rs +++ b/pallets/asset-manager/src/tests.rs @@ -60,7 +60,7 @@ fn wrong_modifier_origin_should_not_work() { let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::parent())); assert_noop!( AssetManager::register_asset( - Origin::signed([0u8; 32].into()), + RuntimeOrigin::signed([0u8; 32].into()), source_location.clone(), asset_metadata.clone() ), @@ -68,7 +68,7 @@ fn wrong_modifier_origin_should_not_work() { ); assert_noop!( AssetManager::update_asset_location( - Origin::signed([2u8; 32].into()), + RuntimeOrigin::signed([2u8; 32].into()), 0, source_location ), @@ -76,14 +76,14 @@ fn wrong_modifier_origin_should_not_work() { ); assert_noop!( AssetManager::update_asset_metadata( - Origin::signed([3u8; 32].into()), + RuntimeOrigin::signed([3u8; 32].into()), 0, asset_metadata ), BadOrigin ); assert_noop!( - AssetManager::set_units_per_second(Origin::signed([4u8; 32].into()), 0, 0), + AssetManager::set_units_per_second(RuntimeOrigin::signed([4u8; 32].into()), 0, 0), BadOrigin ); }) @@ -102,7 +102,7 @@ fn register_asset_should_work() { let mut counter = >::StartNonNativeAssetId::get(); // Register relay chain native token assert_ok!(AssetManager::register_asset( - Origin::root(), + RuntimeOrigin::root(), source_location.clone(), asset_metadata.clone() )); @@ -115,12 +115,16 @@ fn register_asset_should_work() { counter += 1; // Register twice will fail assert_noop!( - AssetManager::register_asset(Origin::root(), source_location, asset_metadata.clone()), + AssetManager::register_asset( + RuntimeOrigin::root(), + source_location, + asset_metadata.clone() + ), Error::::LocationAlreadyExists ); // Register a new asset assert_ok!(AssetManager::register_asset( - Origin::root(), + RuntimeOrigin::root(), new_location.clone(), asset_metadata.clone() )); @@ -152,7 +156,7 @@ fn update_asset() { // Register relay chain native token let asset_id = >::StartNonNativeAssetId::get(); assert_ok!(AssetManager::register_asset( - Origin::root(), + RuntimeOrigin::root(), source_location.clone(), asset_metadata.clone() )); @@ -164,14 +168,14 @@ fn update_asset() { let native_asset_id = >::NativeAssetId::get(); assert_noop!( AssetManager::update_asset_metadata( - Origin::root(), + RuntimeOrigin::root(), native_asset_id, new_metadata.clone(), ), Error::::CannotUpdateNativeAssetMetadata ); assert_ok!(AssetManager::update_asset_metadata( - Origin::root(), + RuntimeOrigin::root(), asset_id, new_metadata.clone(), ),); @@ -180,13 +184,13 @@ fn update_asset() { assert_eq!(Assets::decimals(&asset_id), new_decimals); // Update the asset location assert_ok!(AssetManager::update_asset_location( - Origin::root(), + RuntimeOrigin::root(), asset_id, new_location.clone() )); // Update asset units per seconds assert_ok!(AssetManager::set_units_per_second( - Origin::root(), + RuntimeOrigin::root(), asset_id, 125u128 )); @@ -195,7 +199,7 @@ fn update_asset() { // Update a non-exist asset should fail assert_noop!( AssetManager::update_asset_location( - Origin::root(), + RuntimeOrigin::root(), next_asset_id, new_location.clone() ), @@ -203,7 +207,7 @@ fn update_asset() { ); assert_noop!( AssetManager::update_asset_metadata( - Origin::root(), + RuntimeOrigin::root(), next_asset_id, new_metadata.clone() ), @@ -212,13 +216,13 @@ fn update_asset() { // Re-registering the original location and metadata should work, // as we modified the previous asset. assert_ok!(AssetManager::register_asset( - Origin::root(), + RuntimeOrigin::root(), source_location.clone(), asset_metadata.clone() )); // But updating the asset to an existing location will fail. assert_noop!( - AssetManager::update_asset_location(Origin::root(), next_asset_id, new_location), + AssetManager::update_asset_location(RuntimeOrigin::root(), next_asset_id, new_location), Error::::LocationAlreadyExists ); @@ -235,7 +239,7 @@ fn update_asset() { assert!(crate::AllowedDestParaIds::::contains_key(para_id)); assert_ok!(AssetManager::update_asset_location( - Origin::root(), + RuntimeOrigin::root(), asset_id, new_location_2, )); @@ -258,7 +262,7 @@ fn check_para_id_info_when_update_asset_location() { // registering manta native asset should work. assert_ok!(AssetManager::register_asset( - Origin::root(), + RuntimeOrigin::root(), manta_native_location, manta_asset_metadata )); @@ -285,7 +289,7 @@ fn check_para_id_info_when_update_asset_location() { ))); // registering manta non native asset should work. assert_ok!(AssetManager::register_asset( - Origin::root(), + RuntimeOrigin::root(), manta_non_native_location, manta_non_native_asset_metadata )); @@ -306,7 +310,7 @@ fn check_para_id_info_when_update_asset_location() { ), ))); assert_ok!(AssetManager::update_asset_location( - Origin::root(), + RuntimeOrigin::root(), manta_asset_id, manta_native_location, )); @@ -331,7 +335,7 @@ fn check_para_id_info_when_update_asset_location() { ), ))); assert_ok!(AssetManager::update_asset_location( - Origin::root(), + RuntimeOrigin::root(), manta_non_native_asset_id, manta_non_native_location, )); @@ -371,7 +375,7 @@ fn mint_asset() { let asset_metadata = create_asset_metadata("Kusama", "KSM", 12, 1u128, false, true); let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::parent())); assert_ok!(AssetManager::register_asset( - Origin::root(), + RuntimeOrigin::root(), source_location, asset_metadata )); @@ -399,7 +403,7 @@ fn filter_asset_location_should_work() { new_test_ext().execute_with(|| { // Register relay chain native token assert_ok!(AssetManager::register_asset( - Origin::root(), + RuntimeOrigin::root(), kusama_location.clone(), kusama_asset_metadata.clone() )); @@ -411,7 +415,7 @@ fn filter_asset_location_should_work() { // Register manta para chain native token assert_ok!(AssetManager::register_asset( - Origin::root(), + RuntimeOrigin::root(), manta_location.clone(), manta_asset_metadata.clone() )); @@ -492,7 +496,7 @@ fn set_min_xcm_fee_should_work() { new_test_ext().execute_with(|| { // Register a non native token. assert_ok!(AssetManager::register_asset( - Origin::root(), + RuntimeOrigin::root(), manta_location.clone(), manta_asset_metadata.clone() )); @@ -507,7 +511,7 @@ fn set_min_xcm_fee_should_work() { // normal account cannot set min xcm fee. assert_noop!( AssetManager::set_min_xcm_fee( - Origin::signed([2u8; 32].into()), + RuntimeOrigin::signed([2u8; 32].into()), manta_location.clone(), min_xcm_fee, ), @@ -516,7 +520,7 @@ fn set_min_xcm_fee_should_work() { // only sudo can set it. assert_ok!(AssetManager::set_min_xcm_fee( - Origin::root(), + RuntimeOrigin::root(), manta_location.clone(), min_xcm_fee, )); diff --git a/pallets/asset-manager/src/weights.rs b/pallets/asset-manager/src/weights.rs index de347aca7..23aaca9f1 100644 --- a/pallets/asset-manager/src/weights.rs +++ b/pallets/asset-manager/src/weights.rs @@ -63,46 +63,46 @@ impl WeightInfo for SubstrateWeight { // Storage: AssetManager AssetIdMetadata (r:0 w:1) // Storage: AssetManager AssetIdLocation (r:0 w:1) fn register_asset() -> Weight { - (43_430_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(43_430_000) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(6_u64)) } // Storage: AssetManager AssetIdLocation (r:1 w:0) // Storage: AssetManager UnitsPerSecond (r:0 w:1) fn set_units_per_second() -> Weight { - (56_974_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(56_974_000) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: AssetManager AssetIdLocation (r:1 w:1) // Storage: AssetManager LocationAssetId (r:1 w:2) // Storage: AssetManager AllowedDestParaIds (r:1 w:1) fn update_asset_location() -> Weight { - (72_974_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(72_974_000) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) } // Storage: AssetManager AssetIdLocation (r:1 w:0) // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) // Storage: AssetManager AssetIdMetadata (r:0 w:1) fn update_asset_metadata() -> Weight { - (73_985_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(73_985_000) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: AssetManager AssetIdLocation (r:1 w:0) // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn mint_asset() -> Weight { - (85_480_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(85_480_000) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: AssetManager MinXcmFee (r:0 w:1) fn set_min_xcm_fee() -> Weight { - (49_509_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(49_509_000) + .saturating_add(T::DbWeight::get().writes(1_u64)) } } @@ -115,45 +115,45 @@ impl WeightInfo for () { // Storage: AssetManager AssetIdMetadata (r:0 w:1) // Storage: AssetManager AssetIdLocation (r:0 w:1) fn register_asset() -> Weight { - (43_430_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(43_430_000) + .saturating_add(RocksDbWeight::get().reads(4_u64)) + .saturating_add(RocksDbWeight::get().writes(6_u64)) } // Storage: AssetManager AssetIdLocation (r:1 w:0) // Storage: AssetManager UnitsPerSecond (r:0 w:1) fn set_units_per_second() -> Weight { - (56_974_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(56_974_000) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: AssetManager AssetIdLocation (r:1 w:1) // Storage: AssetManager LocationAssetId (r:1 w:2) // Storage: AssetManager AllowedDestParaIds (r:1 w:1) fn update_asset_location() -> Weight { - (72_974_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(72_974_000) + .saturating_add(RocksDbWeight::get().reads(3_u64)) + .saturating_add(RocksDbWeight::get().writes(4_u64)) } // Storage: AssetManager AssetIdLocation (r:1 w:0) // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) // Storage: AssetManager AssetIdMetadata (r:0 w:1) fn update_asset_metadata() -> Weight { - (73_985_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(73_985_000) + .saturating_add(RocksDbWeight::get().reads(3_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) } // Storage: AssetManager AssetIdLocation (r:1 w:0) // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn mint_asset() -> Weight { - (85_480_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(85_480_000) + .saturating_add(RocksDbWeight::get().reads(3_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) } // Storage: AssetManager MinXcmFee (r:0 w:1) fn set_min_xcm_fee() -> Weight { - (49_509_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(49_509_000) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } } diff --git a/pallets/collator-selection/Cargo.toml b/pallets/collator-selection/Cargo.toml index 8fd593775..aab87e312 100644 --- a/pallets/collator-selection/Cargo.toml +++ b/pallets/collator-selection/Cargo.toml @@ -19,32 +19,32 @@ rand = { version = "0.8.5", default-features = false, optional = true } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.140", default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28", optional = true } -frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -nimbus-primitives = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.1", default-features = false } -pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-arithmetic = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-staking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37", optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +nimbus-primitives = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.7", default-features = false } +pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-arithmetic = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-staking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } [dev-dependencies] manta-primitives = { path = "../../primitives/manta" } -pallet-aura = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-tracing = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } +pallet-aura = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-tracing = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } [features] default = ['std'] runtime-benchmarks = [ - 'frame-benchmarking', + 'frame-benchmarking/runtime-benchmarks', 'frame-support/runtime-benchmarks', 'frame-system/runtime-benchmarks', 'nimbus-primitives/runtime-benchmarks', @@ -64,3 +64,7 @@ std = [ 'pallet-authorship/std', 'pallet-session/std', ] +try-runtime = [ + 'frame-support/try-runtime', + 'frame-system/try-runtime', +] diff --git a/pallets/collator-selection/src/benchmarking.rs b/pallets/collator-selection/src/benchmarking.rs index 32762a6b3..164c00491 100644 --- a/pallets/collator-selection/src/benchmarking.rs +++ b/pallets/collator-selection/src/benchmarking.rs @@ -46,9 +46,9 @@ macro_rules! whitelist { }; } -fn assert_last_event(generic_event: ::Event) { +fn assert_last_event(generic_event: ::RuntimeEvent) { let events = frame_system::Pallet::::events(); - let system_event: ::Event = generic_event.into(); + let system_event: ::RuntimeEvent = generic_event.into(); // compare to the last event record let EventRecord { event, .. } = &events[events.len() - 1]; assert_eq!(event, &system_event); diff --git a/pallets/collator-selection/src/lib.rs b/pallets/collator-selection/src/lib.rs index d94faa513..898548293 100644 --- a/pallets/collator-selection/src/lib.rs +++ b/pallets/collator-selection/src/lib.rs @@ -80,7 +80,7 @@ pub mod pallet { pub use crate::weights::WeightInfo; use core::ops::Div; use frame_support::{ - dispatch::DispatchResultWithPostInfo, + dispatch::{DispatchClass, DispatchResultWithPostInfo}, inherent::Vec, pallet_prelude::*, sp_runtime::{ @@ -91,7 +91,6 @@ pub mod pallet { Currency, EnsureOrigin, ExistenceRequirement::KeepAlive, ReservableCurrency, StorageVersion, ValidatorRegistration, ValidatorSet, }, - weights::DispatchClass, PalletId, }; use frame_system::{pallet_prelude::*, Config as SystemConfig}; @@ -123,13 +122,13 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { /// Overarching event type. - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// The currency mechanism. type Currency: ReservableCurrency; /// Origin that can dictate updating parameters of this pallet. - type UpdateOrigin: EnsureOrigin; + type UpdateOrigin: EnsureOrigin; /// Account Identifier from which the internal Pot is generated. type PotId: Get; diff --git a/pallets/collator-selection/src/migrations.rs b/pallets/collator-selection/src/migrations.rs index 62246decc..6c905382f 100644 --- a/pallets/collator-selection/src/migrations.rs +++ b/pallets/collator-selection/src/migrations.rs @@ -62,10 +62,10 @@ impl Pallet { } // Return the weight consumed by the migration. - T::DbWeight::get().reads_writes(1, dropcount as Weight + 1) + T::DbWeight::get().reads_writes(1, dropcount + 1) } else { log::debug!("collator-selection V0->V1 migration not needed!"); - 0 + Weight::zero() } } pub fn pre_migrate_v0_to_v1() -> Result<(), &'static str> { diff --git a/pallets/collator-selection/src/mock.rs b/pallets/collator-selection/src/mock.rs index a4786180c..20ab39a8d 100644 --- a/pallets/collator-selection/src/mock.rs +++ b/pallets/collator-selection/src/mock.rs @@ -58,8 +58,8 @@ impl frame_system::Config for Test { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; type Hash = H256; @@ -67,7 +67,7 @@ impl frame_system::Config for Test { type AccountId = u64; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = ConstU32<250>; type Version = (); type PalletInfo = PalletInfo; @@ -82,7 +82,7 @@ impl frame_system::Config for Test { impl pallet_balances::Config for Test { type Balance = u64; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ConstU64<5>; type AccountStore = System; @@ -160,7 +160,7 @@ parameter_types! { } impl pallet_session::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorId = ::AccountId; // we don't have stash and controller, thus we don't need the convert as well. type ValidatorIdOf = IdentityCollator; @@ -199,7 +199,7 @@ impl ValidatorSet for IsRegistered { } impl Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type UpdateOrigin = EnsureSignedBy; type PotId = PotId; @@ -254,6 +254,8 @@ pub fn new_test_ext() -> sp_io::TestExternalities { pub fn initialize_to_block(n: BlockNumber) { for i in System::block_number() + 1..=n { System::set_block_number(i); - >::on_initialize(i); + >::on_initialize( + i, + ); } } diff --git a/pallets/collator-selection/src/tests.rs b/pallets/collator-selection/src/tests.rs index 0b35e8fc9..70660501c 100644 --- a/pallets/collator-selection/src/tests.rs +++ b/pallets/collator-selection/src/tests.rs @@ -46,30 +46,30 @@ fn set_all_validator_perf_to(n: u32) { } fn setup_3_candidates() { assert_ok!(CollatorSelection::set_desired_candidates( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), 3 )); - assert_ok!(CollatorSelection::register_as_candidate(Origin::signed( - CHAD - ))); + assert_ok!(CollatorSelection::register_as_candidate( + RuntimeOrigin::signed(CHAD) + )); assert_ok!(Session::set_keys( - Origin::signed(CHAD), + RuntimeOrigin::signed(CHAD), UintAuthorityId(CHAD).into(), vec![] )); - assert_ok!(CollatorSelection::register_as_candidate(Origin::signed( - DAVE - ))); + assert_ok!(CollatorSelection::register_as_candidate( + RuntimeOrigin::signed(DAVE) + )); assert_ok!(Session::set_keys( - Origin::signed(DAVE), + RuntimeOrigin::signed(DAVE), UintAuthorityId(DAVE).into(), vec![] )); - assert_ok!(CollatorSelection::register_as_candidate(Origin::signed( - EVE - ))); + assert_ok!(CollatorSelection::register_as_candidate( + RuntimeOrigin::signed(EVE) + )); assert_ok!(Session::set_keys( - Origin::signed(EVE), + RuntimeOrigin::signed(EVE), UintAuthorityId(EVE).into(), vec![] )); @@ -91,14 +91,14 @@ fn it_should_set_invulnerables() { new_test_ext().execute_with(|| { let new_set = vec![1, 2, 3, 4]; assert_ok!(CollatorSelection::set_invulnerables( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), new_set.clone() )); assert_eq!(CollatorSelection::invulnerables(), new_set); // cannot set with non-root. assert_noop!( - CollatorSelection::set_invulnerables(Origin::signed(1), new_set), + CollatorSelection::set_invulnerables(RuntimeOrigin::signed(1), new_set), BadOrigin ); }); @@ -112,14 +112,14 @@ fn set_desired_candidates_works() { // can set assert_ok!(CollatorSelection::set_desired_candidates( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), 7 )); assert_eq!(CollatorSelection::desired_candidates(), 7); // rejects bad origin assert_noop!( - CollatorSelection::set_desired_candidates(Origin::signed(1), 8), + CollatorSelection::set_desired_candidates(RuntimeOrigin::signed(1), 8), BadOrigin ); }); @@ -133,14 +133,14 @@ fn set_candidacy_bond() { // can set assert_ok!(CollatorSelection::set_candidacy_bond( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), 7 )); assert_eq!(CollatorSelection::candidacy_bond(), 7); // rejects bad origin. assert_noop!( - CollatorSelection::set_candidacy_bond(Origin::signed(1), 8), + CollatorSelection::set_candidacy_bond(RuntimeOrigin::signed(1), 8), BadOrigin ); }); @@ -157,7 +157,7 @@ fn set_eviction_baseline() { // can set assert_ok!(CollatorSelection::set_eviction_baseline( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), Percent::from_percent(100) )); assert_eq!( @@ -167,7 +167,7 @@ fn set_eviction_baseline() { // saturates to 100 assert_ok!(CollatorSelection::set_eviction_baseline( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), Percent::from_percent(101) )); assert_eq!( @@ -177,7 +177,10 @@ fn set_eviction_baseline() { // rejects bad origin. assert_noop!( - CollatorSelection::set_eviction_baseline(Origin::signed(1), Percent::from_percent(8)), + CollatorSelection::set_eviction_baseline( + RuntimeOrigin::signed(1), + Percent::from_percent(8) + ), BadOrigin ); }); @@ -194,7 +197,7 @@ fn set_eviction_tolerance() { // can set assert_ok!(CollatorSelection::set_eviction_tolerance( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), Percent::from_percent(5) )); assert_eq!( @@ -204,7 +207,7 @@ fn set_eviction_tolerance() { // saturates to 100 assert_ok!(CollatorSelection::set_eviction_tolerance( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), Percent::from_percent(101) )); assert_eq!( @@ -214,7 +217,10 @@ fn set_eviction_tolerance() { // rejects bad origin. assert_noop!( - CollatorSelection::set_eviction_tolerance(Origin::signed(1), Percent::from_percent(8)), + CollatorSelection::set_eviction_tolerance( + RuntimeOrigin::signed(1), + Percent::from_percent(8) + ), BadOrigin ); }); @@ -227,17 +233,19 @@ fn cannot_register_candidate_if_too_many() { // can't accept anyone anymore. assert_noop!( - CollatorSelection::register_as_candidate(Origin::signed(3)), + CollatorSelection::register_as_candidate(RuntimeOrigin::signed(3)), Error::::TooManyCandidates, ); // reset desired candidates: >::put(1); - assert_ok!(CollatorSelection::register_as_candidate(Origin::signed(4))); + assert_ok!(CollatorSelection::register_as_candidate( + RuntimeOrigin::signed(4) + )); // but no more assert_noop!( - CollatorSelection::register_as_candidate(Origin::signed(5)), + CollatorSelection::register_as_candidate(RuntimeOrigin::signed(5)), Error::::TooManyCandidates, ); }) @@ -250,7 +258,7 @@ fn cannot_register_as_candidate_if_invulnerable() { // can't 1 because it is invulnerable. assert_noop!( - CollatorSelection::register_as_candidate(Origin::signed(1)), + CollatorSelection::register_as_candidate(RuntimeOrigin::signed(1)), Error::::AlreadyInvulnerable, ); }) @@ -261,7 +269,7 @@ fn cannot_register_as_candidate_if_keys_not_registered() { new_test_ext().execute_with(|| { // can't 7 because keys not registered. assert_noop!( - CollatorSelection::register_as_candidate(Origin::signed(7)), + CollatorSelection::register_as_candidate(RuntimeOrigin::signed(7)), Error::::ValidatorNotRegistered ); }) @@ -271,7 +279,9 @@ fn cannot_register_as_candidate_if_keys_not_registered() { fn cannot_register_dupe_candidate() { new_test_ext().execute_with(|| { // can add 3 as candidate - assert_ok!(CollatorSelection::register_as_candidate(Origin::signed(3))); + assert_ok!(CollatorSelection::register_as_candidate( + RuntimeOrigin::signed(3) + )); let addition = CandidateInfo { who: 3, deposit: 10, @@ -281,7 +291,7 @@ fn cannot_register_dupe_candidate() { // but no more assert_noop!( - CollatorSelection::register_as_candidate(Origin::signed(3)), + CollatorSelection::register_as_candidate(RuntimeOrigin::signed(3)), Error::::AlreadyCandidate, ); }) @@ -294,11 +304,13 @@ fn cannot_register_as_candidate_if_poor() { assert_eq!(Balances::free_balance(33), 0); // works - assert_ok!(CollatorSelection::register_as_candidate(Origin::signed(3))); + assert_ok!(CollatorSelection::register_as_candidate( + RuntimeOrigin::signed(3) + )); // poor assert_noop!( - CollatorSelection::register_as_candidate(Origin::signed(33)), + CollatorSelection::register_as_candidate(RuntimeOrigin::signed(33)), BalancesError::::InsufficientBalance, ); }); @@ -317,8 +329,12 @@ fn register_as_candidate_works() { assert_eq!(Balances::free_balance(3), 100); assert_eq!(Balances::free_balance(4), 100); - assert_ok!(CollatorSelection::register_as_candidate(Origin::signed(3))); - assert_ok!(CollatorSelection::register_as_candidate(Origin::signed(4))); + assert_ok!(CollatorSelection::register_as_candidate( + RuntimeOrigin::signed(3) + )); + assert_ok!(CollatorSelection::register_as_candidate( + RuntimeOrigin::signed(4) + )); assert_eq!(Balances::free_balance(3), 90); assert_eq!(Balances::free_balance(4), 90); @@ -331,21 +347,25 @@ fn register_as_candidate_works() { fn leave_intent() { new_test_ext().execute_with(|| { // register a candidate. - assert_ok!(CollatorSelection::register_as_candidate(Origin::signed(3))); + assert_ok!(CollatorSelection::register_as_candidate( + RuntimeOrigin::signed(3) + )); assert_eq!(Balances::free_balance(3), 90); // register too so can leave above min candidates - assert_ok!(CollatorSelection::register_as_candidate(Origin::signed(5))); + assert_ok!(CollatorSelection::register_as_candidate( + RuntimeOrigin::signed(5) + )); assert_eq!(Balances::free_balance(5), 90); // cannot leave if not candidate. assert_noop!( - CollatorSelection::leave_intent(Origin::signed(4)), + CollatorSelection::leave_intent(RuntimeOrigin::signed(4)), Error::::NotCandidate ); // bond is returned - assert_ok!(CollatorSelection::leave_intent(Origin::signed(3))); + assert_ok!(CollatorSelection::leave_intent(RuntimeOrigin::signed(3))); assert_eq!(Balances::free_balance(3), 100); }); } @@ -358,7 +378,9 @@ fn authorship_event_handler() { // 4 is the default author. assert_eq!(Balances::free_balance(4), 100); - assert_ok!(CollatorSelection::register_as_candidate(Origin::signed(4))); + assert_ok!(CollatorSelection::register_as_candidate( + RuntimeOrigin::signed(4) + )); // triggers `note_author` Authorship::on_initialize(1); @@ -385,7 +407,9 @@ fn fees_edgecases() { Balances::make_free_balance_be(&CollatorSelection::account_id(), 5); // 4 is the default author. assert_eq!(Balances::free_balance(4), 100); - assert_ok!(CollatorSelection::register_as_candidate(Origin::signed(4))); + assert_ok!(CollatorSelection::register_as_candidate( + RuntimeOrigin::signed(4) + )); // triggers `note_author` Authorship::on_initialize(1); @@ -416,9 +440,11 @@ fn session_management_works() { assert_eq!(SessionHandlerCollators::get(), vec![1, 2]); // add a new collator - assert_ok!(CollatorSelection::register_as_candidate(Origin::signed(3))); + assert_ok!(CollatorSelection::register_as_candidate( + RuntimeOrigin::signed(3) + )); assert_ok!(Session::set_keys( - Origin::signed(3), + RuntimeOrigin::signed(3), UintAuthorityId(3).into(), vec![] )); @@ -446,15 +472,19 @@ fn session_management_works() { #[test] fn kick_mechanism_parity() { new_test_ext().execute_with(|| { - assert_ok!(CollatorSelection::register_as_candidate(Origin::signed(3))); + assert_ok!(CollatorSelection::register_as_candidate( + RuntimeOrigin::signed(3) + )); assert_ok!(Session::set_keys( - Origin::signed(3), + RuntimeOrigin::signed(3), UintAuthorityId(3).into(), vec![] )); - assert_ok!(CollatorSelection::register_as_candidate(Origin::signed(4))); + assert_ok!(CollatorSelection::register_as_candidate( + RuntimeOrigin::signed(4) + )); assert_ok!(Session::set_keys( - Origin::signed(4), + RuntimeOrigin::signed(4), UintAuthorityId(4).into(), vec![] )); @@ -502,12 +532,12 @@ fn manta_kick_algorithm_normal_operation() { ); // readd them - assert_ok!(CollatorSelection::register_as_candidate(Origin::signed( - CHAD - ))); - assert_ok!(CollatorSelection::register_as_candidate(Origin::signed( - EVE - ))); + assert_ok!(CollatorSelection::register_as_candidate( + RuntimeOrigin::signed(CHAD) + )); + assert_ok!(CollatorSelection::register_as_candidate( + RuntimeOrigin::signed(EVE) + )); // Don't try kicking invulnerables ( ALICE and BOB ), percentile = 9, threshold is 8.1 => kick 8 and below BlocksPerCollatorThisSession::::insert(ALICE, 0); @@ -541,9 +571,9 @@ fn manta_kick_algorithm_boundaries() { CollatorSelection::evict_bad_collators(CollatorSelection::candidates()), vec![CHAD, EVE] ); - assert_ok!(CollatorSelection::register_as_candidate(Origin::signed( - CHAD - ))); + assert_ok!(CollatorSelection::register_as_candidate( + RuntimeOrigin::signed(CHAD) + )); // Allow any underperformance => eviction disabled EvictionTolerance::::put(Percent::from_percent(100)); assert_eq!( @@ -660,9 +690,9 @@ fn manta_remove_underperformer_even_if_it_is_immediately_readded_as_candidate() initialize_to_block(30); assert_eq!(Session::validators(), vec![ALICE, BOB, CHAD, DAVE, EVE]); assert_eq!(candidate_ids(), vec![CHAD, DAVE]); // EVE got kicked - assert_ok!(CollatorSelection::register_as_candidate(Origin::signed( - EVE - ))); // and is immediately readded + assert_ok!(CollatorSelection::register_as_candidate( + RuntimeOrigin::signed(EVE) + )); // and is immediately readded assert_eq!(candidate_ids(), vec![CHAD, DAVE, EVE]); initialize_to_block(39); set_all_validator_perf_to(10); @@ -734,13 +764,16 @@ fn register_candidate_should_work() { // add collator by root should work let candidate = 3; assert_ok!(CollatorSelection::register_candidate( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), candidate )); // cannot add the same collator twice assert_noop!( - CollatorSelection::register_candidate(Origin::signed(RootAccount::get()), candidate), + CollatorSelection::register_candidate( + RuntimeOrigin::signed(RootAccount::get()), + candidate + ), Error::::AlreadyCandidate ); @@ -752,19 +785,19 @@ fn register_candidate_should_work() { // normal user cannot add collator assert_noop!( - CollatorSelection::register_candidate(Origin::signed(5), 4), + CollatorSelection::register_candidate(RuntimeOrigin::signed(5), 4), BadOrigin, ); // Cannot add collator if it reaches desired candidate // Now it should be 2 candidates. assert_ok!(CollatorSelection::register_candidate( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), 4 )); assert_eq!(CollatorSelection::candidates().len(), 2); assert_noop!( - CollatorSelection::register_candidate(Origin::signed(RootAccount::get()), 5), + CollatorSelection::register_candidate(RuntimeOrigin::signed(RootAccount::get()), 5), Error::::TooManyCandidates ); }); @@ -776,32 +809,38 @@ fn remove_collator_should_work() { // add collator by root should work let candidate = 3; assert_ok!(CollatorSelection::register_candidate( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), candidate )); // normal user cannot remove specified collator assert_noop!( - CollatorSelection::remove_collator(Origin::signed(5), candidate), + CollatorSelection::remove_collator(RuntimeOrigin::signed(5), candidate), BadOrigin ); // remove collator should work assert_ok!(CollatorSelection::remove_collator( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), candidate )); // cannot remove a unregistered collator assert_noop!( - CollatorSelection::remove_collator(Origin::signed(RootAccount::get()), candidate), + CollatorSelection::remove_collator( + RuntimeOrigin::signed(RootAccount::get()), + candidate + ), Error::::NotCandidate ); // Cannot remove invulnerables let invulnerable = 2; assert_noop!( - CollatorSelection::remove_collator(Origin::signed(RootAccount::get()), invulnerable), + CollatorSelection::remove_collator( + RuntimeOrigin::signed(RootAccount::get()), + invulnerable + ), Error::::NotAllowRemoveInvulnerable ); }); @@ -831,7 +870,7 @@ fn increase_bond_after_register_candidate() { let candidate_1_balances_before_registration = Balances::free_balance(candidate_1); assert_ok!(CollatorSelection::register_candidate( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), candidate_1 )); @@ -846,7 +885,7 @@ fn increase_bond_after_register_candidate() { // increase bond let new_bond = prev_bond + 5; assert_ok!(CollatorSelection::set_candidacy_bond( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), new_bond )); @@ -863,7 +902,7 @@ fn increase_bond_after_register_candidate() { let candidate_2_balances_before_registration = Balances::free_balance(candidate_2); assert_ok!(CollatorSelection::register_candidate( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), candidate_2 )); // check new bond @@ -876,7 +915,7 @@ fn increase_bond_after_register_candidate() { // remove candidate_1 assert_ok!(CollatorSelection::remove_collator( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), candidate_1 )); // check candidate_1 @@ -888,7 +927,7 @@ fn increase_bond_after_register_candidate() { // remove candidate_2 assert_ok!(CollatorSelection::remove_collator( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), candidate_2 )); // check candidate_2 diff --git a/pallets/collator-selection/src/weights.rs b/pallets/collator-selection/src/weights.rs index f54a65c87..9e632e2e1 100644 --- a/pallets/collator-selection/src/weights.rs +++ b/pallets/collator-selection/src/weights.rs @@ -63,30 +63,30 @@ pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { // Storage: CollatorSelection Invulnerables (r:0 w:1) fn set_invulnerables(b: u32, ) -> Weight { - (9_758_000 as Weight) + Weight::from_ref_time(9_758_000) // Standard Error: 12_000 - .saturating_add((99_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(99_000).saturating_mul(b as u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: CollatorSelection DesiredCandidates (r:0 w:1) fn set_desired_candidates() -> Weight { - (11_283_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(11_283_000) + .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: CollatorSelection CandidacyBond (r:0 w:1) fn set_candidacy_bond() -> Weight { - (9_598_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(9_598_000) + .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: CollatorSelection EvictionBaseline (r:0 w:1) fn set_eviction_baseline() -> Weight { - (9_374_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(9_374_000) + .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: CollatorSelection EvictionTolerance (r:0 w:1) fn set_eviction_tolerance() -> Weight { - (9_330_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(9_330_000) + .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: CollatorSelection Candidates (r:1 w:1) // Storage: CollatorSelection DesiredCandidates (r:1 w:0) @@ -94,28 +94,28 @@ impl WeightInfo for SubstrateWeight { // Storage: Session NextKeys (r:1 w:0) // Storage: CollatorSelection CandidacyBond (r:1 w:0) fn register_as_candidate(c: u32, ) -> Weight { - (44_181_000 as Weight) + Weight::from_ref_time(44_181_000) // Standard Error: 4_000 - .saturating_add((477_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(477_000).saturating_mul(c as u64)) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: CollatorSelection Candidates (r:1 w:1) fn leave_intent(c: u32, ) -> Weight { - (30_937_000 as Weight) + Weight::from_ref_time(30_937_000) // Standard Error: 3_000 - .saturating_add((457_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(457_000).saturating_mul(c as u64)) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: CollatorSelection Invulnerables (r:1 w:0) // Storage: CollatorSelection Candidates (r:1 w:1) fn remove_collator(c: u32, ) -> Weight { - (30_209_000 as Weight) + Weight::from_ref_time(30_209_000) // Standard Error: 7_000 - .saturating_add((295_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(295_000).saturating_mul(c as u64)) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: CollatorSelection Candidates (r:1 w:1) // Storage: CollatorSelection DesiredCandidates (r:1 w:0) @@ -123,19 +123,19 @@ impl WeightInfo for SubstrateWeight { // Storage: Session NextKeys (r:1 w:0) // Storage: CollatorSelection CandidacyBond (r:1 w:0) fn register_candidate(c: u32, ) -> Weight { - (40_356_000 as Weight) + Weight::from_ref_time(40_356_000) // Standard Error: 8_000 - .saturating_add((336_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(336_000).saturating_mul(c as u64)) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: System Account (r:2 w:2) // Storage: CollatorSelection BlocksPerCollatorThisSession (r:1 w:1) // Storage: System BlockWeight (r:1 w:1) fn note_author() -> Weight { - (34_463_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(34_463_000) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) } // Storage: CollatorSelection Candidates (r:1 w:0) // Storage: CollatorSelection EvictionBaseline (r:1 w:0) @@ -146,13 +146,13 @@ impl WeightInfo for SubstrateWeight { // Storage: Session Validators (r:1 w:0) // Storage: System Account (r:1 w:1) fn new_session(c: u32, ) -> Weight { - (11_539_000 as Weight) + Weight::from_ref_time(11_539_000) // Standard Error: 84_000 - .saturating_add((24_290_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) + .saturating_add(Weight::from_ref_time(24_290_000).saturating_mul(c as u64)) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c as u64))) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c as u64))) } } @@ -160,30 +160,30 @@ impl WeightInfo for SubstrateWeight { impl WeightInfo for () { // Storage: CollatorSelection Invulnerables (r:0 w:1) fn set_invulnerables(b: u32, ) -> Weight { - (9_758_000 as Weight) + Weight::from_ref_time(9_758_000) // Standard Error: 12_000 - .saturating_add((99_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(99_000).saturating_mul(b as u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: CollatorSelection DesiredCandidates (r:0 w:1) fn set_desired_candidates() -> Weight { - (11_283_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(11_283_000) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: CollatorSelection CandidacyBond (r:0 w:1) fn set_candidacy_bond() -> Weight { - (9_598_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(9_598_000) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: CollatorSelection EvictionBaseline (r:0 w:1) fn set_eviction_baseline() -> Weight { - (9_374_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(9_374_000) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: CollatorSelection EvictionTolerance (r:0 w:1) fn set_eviction_tolerance() -> Weight { - (9_330_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(9_330_000) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: CollatorSelection Candidates (r:1 w:1) // Storage: CollatorSelection DesiredCandidates (r:1 w:0) @@ -191,28 +191,28 @@ impl WeightInfo for () { // Storage: Session NextKeys (r:1 w:0) // Storage: CollatorSelection CandidacyBond (r:1 w:0) fn register_as_candidate(c: u32, ) -> Weight { - (44_181_000 as Weight) + Weight::from_ref_time(44_181_000) // Standard Error: 4_000 - .saturating_add((477_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(477_000).saturating_mul(c as u64)) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: CollatorSelection Candidates (r:1 w:1) fn leave_intent(c: u32, ) -> Weight { - (30_937_000 as Weight) + Weight::from_ref_time(30_937_000) // Standard Error: 3_000 - .saturating_add((457_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(457_000).saturating_mul(c as u64)) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: CollatorSelection Invulnerables (r:1 w:0) // Storage: CollatorSelection Candidates (r:1 w:1) fn remove_collator(c: u32, ) -> Weight { - (30_209_000 as Weight) + Weight::from_ref_time(30_209_000) // Standard Error: 7_000 - .saturating_add((295_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(295_000).saturating_mul(c as u64)) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: CollatorSelection Candidates (r:1 w:1) // Storage: CollatorSelection DesiredCandidates (r:1 w:0) @@ -220,19 +220,19 @@ impl WeightInfo for () { // Storage: Session NextKeys (r:1 w:0) // Storage: CollatorSelection CandidacyBond (r:1 w:0) fn register_candidate(c: u32, ) -> Weight { - (40_356_000 as Weight) + Weight::from_ref_time(40_356_000) // Standard Error: 8_000 - .saturating_add((336_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(336_000).saturating_mul(c as u64)) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: System Account (r:2 w:2) // Storage: CollatorSelection BlocksPerCollatorThisSession (r:1 w:1) // Storage: System BlockWeight (r:1 w:1) fn note_author() -> Weight { - (34_463_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(34_463_000) + .saturating_add(RocksDbWeight::get().reads(4_u64)) + .saturating_add(RocksDbWeight::get().writes(4_u64)) } // Storage: CollatorSelection Candidates (r:1 w:0) // Storage: CollatorSelection EvictionBaseline (r:1 w:0) @@ -243,12 +243,12 @@ impl WeightInfo for () { // Storage: Session Validators (r:1 w:0) // Storage: System Account (r:1 w:1) fn new_session(c: u32, ) -> Weight { - (11_539_000 as Weight) + Weight::from_ref_time(11_539_000) // Standard Error: 84_000 - .saturating_add((24_290_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) + .saturating_add(Weight::from_ref_time(24_290_000).saturating_mul(c as u64)) + .saturating_add(RocksDbWeight::get().reads(6_u64)) + .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(c as u64))) + .saturating_add(RocksDbWeight::get().writes(3_u64)) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(c as u64))) } } diff --git a/pallets/manta-pay/Cargo.toml b/pallets/manta-pay/Cargo.toml index e7cfecb69..3d63a5a01 100644 --- a/pallets/manta-pay/Cargo.toml +++ b/pallets/manta-pay/Cargo.toml @@ -38,12 +38,17 @@ runtime = ["sp-api"] # Runtime Benchmarks runtime-benchmarks = [ - "frame-benchmarking", + "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "manta-primitives/runtime-benchmarks", ] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", +] + # Serde Serialization serde = [ "manta-support/serde", @@ -88,41 +93,41 @@ precompute-coins = [ # utils anyhow = { version = "1.0.55", optional = true, default-features = false } base64 = { version = "0.20", default-features = false, features = ["alloc"] } -indoc = { version = "1.0.3", optional = true, default-features = false } +indoc = { version = "2.0.1", optional = true, default-features = false } rand_chacha = { version = "0.3.1", optional = true, default-features = false } tempfile = { version = "3.3.0", optional = true, default-features = false } # substrate dependencies -frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false, optional = true } -frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } -scale-codec = { package = "parity-scale-codec", version = '3.1.2', default-features = false, features = ["derive", "max-encoded-len"] } +frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false, optional = true } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } +scale-codec = { package = "parity-scale-codec", version = '3.4.0', default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28", optional = true, default-features = false } -sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28", optional = true, default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28", default-features = false } +sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37", optional = true, default-features = false } +sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37", optional = true, default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37", default-features = false } # JSON-RPC -jsonrpsee = { version = "0.15.0", features = ["server", "macros"], optional = true } +jsonrpsee = { version = "0.16.2", features = ["server", "macros"], optional = true } # manta dependencies -manta-accounting = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.13", default-features = false } -manta-crypto = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.13", default-features = false } -manta-pay = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.13", default-features = false, features = ["groth16", "parameters", "scale"] } +manta-accounting = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.15", default-features = false } +manta-crypto = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.15", default-features = false } +manta-pay = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.15", default-features = false, features = ["groth16", "parameters", "scale"] } manta-primitives = { path = "../../primitives/manta", default-features = false } manta-support = { package = "pallet-manta-support", path = "../manta-support", default-features = false } -manta-util = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.13", default-features = false } +manta-util = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.15", default-features = false } [dev-dependencies] lazy_static = "1.4.0" -manta-crypto = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.13", features = ["getrandom"] } -manta-pay = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.13", features = ["groth16", "parameters", "scale", "download", "test"] } +manta-crypto = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.15", features = ["getrandom"] } +manta-pay = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.15", features = ["groth16", "parameters", "scale", "download", "test"] } pallet-asset-manager = { path = "../asset-manager" } -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } pallet-tx-pause = { path = '../tx-pause' } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } +sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } tempfile = "3.3.0" -xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } +xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } diff --git a/pallets/manta-pay/src/benchmark/mod.rs b/pallets/manta-pay/src/benchmark/mod.rs index 027efd5d8..9f76bb907 100644 --- a/pallets/manta-pay/src/benchmark/mod.rs +++ b/pallets/manta-pay/src/benchmark/mod.rs @@ -43,7 +43,7 @@ pub const INITIAL_VALUE: u128 = 1_000_000_000_000_000_000_000u128; pub fn assert_last_event(event: E) where T: Config, - E: Into<::Event>, + E: Into<::RuntimeEvent>, { let events = frame_system::Pallet::::events(); assert_eq!(events[events.len() - 1].event, event.into().into()); @@ -84,7 +84,7 @@ benchmarks! { where_clause { where T::AccountId: From + Into } to_private { let caller: T::AccountId = whitelisted_caller(); - let origin = T::Origin::from(RawOrigin::Signed(caller.clone())); + let origin = T::RuntimeOrigin::from(RawOrigin::Signed(caller.clone())); let mint_post = TransferPost::decode(&mut &*TO_PRIVATE).unwrap(); let asset = mint_post.source(0).unwrap(); init_asset::(&caller, id_from_field(asset.id).unwrap(), asset_value_decode(asset.value)); @@ -98,7 +98,7 @@ benchmarks! { to_public { let caller: T::AccountId = whitelisted_caller(); - let origin = T::Origin::from(RawOrigin::Signed(caller.clone())); + let origin = T::RuntimeOrigin::from(RawOrigin::Signed(caller.clone())); init_asset::(&caller, >::StartNonNativeAssetId::get(), INITIAL_VALUE); for coin in TO_PUBLIC_INPUT { Pallet::::to_private( @@ -118,7 +118,7 @@ benchmarks! { private_transfer { let caller: T::AccountId = whitelisted_caller(); - let origin = T::Origin::from(RawOrigin::Signed(caller.clone())); + let origin = T::RuntimeOrigin::from(RawOrigin::Signed(caller.clone())); init_asset::(&caller, >::StartNonNativeAssetId::get(), INITIAL_VALUE); for coin in PRIVATE_TRANSFER_INPUT { Pallet::::to_private( @@ -136,7 +136,7 @@ benchmarks! { public_transfer { let caller: T::AccountId = whitelisted_caller(); - let origin = T::Origin::from(RawOrigin::Signed(caller.clone())); + let origin = T::RuntimeOrigin::from(RawOrigin::Signed(caller.clone())); init_asset::(&caller, >::StartNonNativeAssetId::get(), INITIAL_VALUE); let asset = Asset::new(field_from_id(8u128), asset_value_encode(100)); let sink = Pallet::::account_id(); diff --git a/pallets/manta-pay/src/lib.rs b/pallets/manta-pay/src/lib.rs index ae9e4704b..8d5680d55 100644 --- a/pallets/manta-pay/src/lib.rs +++ b/pallets/manta-pay/src/lib.rs @@ -132,7 +132,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { /// The overarching event type. - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Asset Configuration type AssetConfig: AssetConfig; diff --git a/pallets/manta-pay/src/mock.rs b/pallets/manta-pay/src/mock.rs index a089bd31c..2c82c0d1e 100644 --- a/pallets/manta-pay/src/mock.rs +++ b/pallets/manta-pay/src/mock.rs @@ -17,10 +17,10 @@ use frame_support::{ pallet_prelude::DispatchResult, parameter_types, - traits::{ConstU32, IsInVec}, + traits::{AsEnsureOriginWithArg, ConstU32, IsInVec}, PalletId, }; -use frame_system::EnsureRoot; +use frame_system::{EnsureNever, EnsureRoot}; use manta_primitives::{ assets::{ AssetConfig, AssetIdType, AssetLocation, AssetRegistry, AssetRegistryMetadata, @@ -70,8 +70,8 @@ impl frame_system::Config for Test { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; type Hash = H256; @@ -79,7 +79,7 @@ impl frame_system::Config for Test { type AccountId = AccountId32; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -101,7 +101,7 @@ parameter_types! { impl pallet_balances::Config for Test { type MaxLocks = MaxLocks; type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -121,7 +121,7 @@ parameter_types! { } impl pallet_assets::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = StandardAssetId; type Currency = Balances; @@ -135,6 +135,12 @@ impl pallet_assets::Config for Test { type Freezer = (); type Extra = (); type WeightInfo = pallet_assets::weights::SubstrateWeight; + type RemoveItemsLimit = ConstU32<1000>; + type AssetIdParameter = StandardAssetId; + type CreateOrigin = AsEnsureOriginWithArg>; + type CallbackHandle = (); + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); } pub struct MantaAssetRegistry; @@ -155,7 +161,7 @@ impl AssetRegistry for MantaAssetRegistry { is_sufficient: bool, ) -> DispatchResult { Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), asset_id, AssetManager::account_id(), is_sufficient, @@ -163,7 +169,7 @@ impl AssetRegistry for MantaAssetRegistry { )?; Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), asset_id, metadata.name, metadata.symbol, @@ -172,7 +178,7 @@ impl AssetRegistry for MantaAssetRegistry { )?; Assets::force_asset_status( - Origin::root(), + RuntimeOrigin::root(), asset_id, AssetManager::account_id(), AssetManager::account_id(), @@ -189,7 +195,7 @@ impl AssetRegistry for MantaAssetRegistry { metadata: AssetStorageMetadata, ) -> DispatchResult { Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), *asset_id, metadata.name, metadata.symbol, @@ -242,7 +248,7 @@ impl AssetConfig for MantaAssetConfig { } impl pallet_asset_manager::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AssetId = StandardAssetId; type Balance = Balance; type Location = AssetLocation; @@ -257,7 +263,7 @@ parameter_types! { } impl crate::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = crate::weights::SubstrateWeight; type PalletId = MantaPayPalletId; type AssetConfig = MantaAssetConfig; @@ -268,8 +274,8 @@ parameter_types! { } impl pallet_tx_pause::Config for Test { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type MaxCallNames = ConstU32<25>; type PauseOrigin = EnsureRoot; type UnpauseOrigin = EnsureRoot; diff --git a/pallets/manta-pay/src/test/payment.rs b/pallets/manta-pay/src/test/payment.rs index 0f903a1de..28691122e 100644 --- a/pallets/manta-pay/src/test/payment.rs +++ b/pallets/manta-pay/src/test/payment.rs @@ -17,8 +17,8 @@ use crate::{ fp_decode, id_from_field, mock::{ - new_test_ext, Assets, MantaAssetConfig, MantaAssetRegistry, MantaPay, Origin as MockOrigin, - Test, + new_test_ext, Assets, MantaAssetConfig, MantaAssetRegistry, MantaPay, + RuntimeOrigin as MockOrigin, Test, }, Error, FungibleLedger, }; diff --git a/pallets/manta-pay/src/weights.rs b/pallets/manta-pay/src/weights.rs index cb23aa5df..bc73c77f2 100644 --- a/pallets/manta-pay/src/weights.rs +++ b/pallets/manta-pay/src/weights.rs @@ -61,9 +61,9 @@ where /// Storage: MantaPay Shards (r:0 w:1) /// ``` fn to_private() -> Weight { - (36_400_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(36_400_000_000) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(7_u64)) } /// ```text @@ -77,9 +77,9 @@ where /// Storage: MantaPay Shards (r:0 w:1) /// ``` fn to_public() -> Weight { - (44_100_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(10 as Weight)) - .saturating_add(T::DbWeight::get().writes(12 as Weight)) + Weight::from_ref_time(44_100_000_000) + .saturating_add(T::DbWeight::get().reads(10_u64)) + .saturating_add(T::DbWeight::get().writes(12_u64)) } /// ```text @@ -92,14 +92,14 @@ where /// Storage: MantaPay Shards (r:0 w:2) /// ``` fn private_transfer() -> Weight { - (51_500_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().writes(13 as Weight)) + Weight::from_ref_time(51_500_000_000) + .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(T::DbWeight::get().writes(13_u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) fn public_transfer() -> Weight { - (46_629_000 as Weight) + Weight::from_ref_time(46_629_000) } } diff --git a/pallets/manta-sbt/Cargo.toml b/pallets/manta-sbt/Cargo.toml index 93fc24f8a..e929bf279 100644 --- a/pallets/manta-sbt/Cargo.toml +++ b/pallets/manta-sbt/Cargo.toml @@ -26,6 +26,11 @@ runtime-benchmarks = [ "manta-primitives/runtime-benchmarks", ] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", +] + # Standard Library std = [ "anyhow/std", @@ -87,45 +92,45 @@ precompute-coins = [ # utils anyhow = { version = "1.0.55", optional = true, default-features = false } base64 = { version = "0.20", default-features = false, features = ["alloc"] } -indoc = { version = "1.0.3", optional = true, default-features = false } +indoc = { version = "2.0.1", optional = true, default-features = false } libsecp256k1 = { version = "0.7", default-features = false, features = ["hmac", "static-context"], optional = true } rand_chacha = { version = "0.3.1", optional = true, default-features = false } sha3 = { version = "0.10.6", default-features = false } tempfile = { version = "3.3.0", optional = true, default-features = false } # substrate dependencies -frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false, optional = true } -frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } -scale-codec = { package = "parity-scale-codec", version = '3.1.2', default-features = false, features = ["derive", "max-encoded-len"] } +frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false, optional = true } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } +scale-codec = { package = "parity-scale-codec", version = '3.4.0', default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28", optional = true, default-features = false } -sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28", optional = true, default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28", default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28", default-features = false } +sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37", optional = true, default-features = false } +sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37", optional = true, default-features = false } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37", default-features = false } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37", default-features = false } # JSON-RPC -jsonrpsee = { version = "0.15.0", features = ["server", "macros"], optional = true } +jsonrpsee = { version = "0.16.2", features = ["server", "macros"], optional = true } # manta dependencies -manta-accounting = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.13", default-features = false } -manta-crypto = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.13", default-features = false } -manta-pay = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.13", default-features = false, features = ["groth16", "parameters", "scale"] } +manta-accounting = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.15", default-features = false } +manta-crypto = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.15", default-features = false } +manta-pay = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.15", default-features = false, features = ["groth16", "parameters", "scale"] } manta-primitives = { path = "../../primitives/manta", default-features = false } manta-support = { package = "pallet-manta-support", path = "../manta-support", default-features = false } -manta-util = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.13", default-features = false } +manta-util = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.15", default-features = false } [dev-dependencies] lazy_static = "1.4.0" -manta-crypto = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.13", features = ["getrandom"] } -manta-pay = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.13", features = ["groth16", "parameters", "scale", "download", "test"] } +manta-crypto = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.15", features = ["getrandom"] } +manta-pay = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.15", features = ["groth16", "parameters", "scale", "download", "test"] } pallet-asset-manager = { path = "../asset-manager" } -pallet-assets = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } +pallet-assets = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } pallet-manta-pay = { path = "../manta-pay" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } pallet-tx-pause = { path = "../tx-pause" } tempfile = "3.3.0" -xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } +xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } diff --git a/pallets/manta-sbt/src/lib.rs b/pallets/manta-sbt/src/lib.rs index 25307d951..b1ac4c7b2 100644 --- a/pallets/manta-sbt/src/lib.rs +++ b/pallets/manta-sbt/src/lib.rs @@ -234,7 +234,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { /// The overarching event type. - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Weight information for extrinsics in this pallet. type WeightInfo: WeightInfo; @@ -243,7 +243,7 @@ pub mod pallet { type Currency: ReservableCurrency; /// The origin which can change the privileged allowlist account and set time range for mints - type AdminOrigin: EnsureOrigin; + type AdminOrigin: EnsureOrigin; /// Gets the current on-chain time type Now: Time; @@ -655,7 +655,7 @@ pub mod pallet { /// remove once migration is complete fn on_idle(_n: T::BlockNumber, remaining_weight: Weight) -> Weight { let mut weight_tracking = remaining_weight; - if weight_tracking <= T::MinimumWeightRemainInBlock::get() { + if weight_tracking.ref_time() <= T::MinimumWeightRemainInBlock::get().ref_time() { // return total weight so all the weight is exhausted return remaining_weight; } @@ -665,28 +665,31 @@ pub mod pallet { .saturating_add(T::DbWeight::get().read); for (mint_type, mint_info) in MintChainInfos::::drain() { - if weight_tracking <= T::MinimumWeightRemainInBlock::get() { + if weight_tracking.ref_time() <= T::MinimumWeightRemainInBlock::get().ref_time() { break; } - weight_tracking = weight_tracking.saturating_sub(two_writes_one_read); + weight_tracking = + weight_tracking.saturating_sub(Weight::from_ref_time(two_writes_one_read)); Self::migrate_mint_info(mint_type, mint_info); } for (evm_address_type, mint_status) in EvmAddressAllowlist::::drain() { - if weight_tracking <= T::MinimumWeightRemainInBlock::get() { + if weight_tracking.ref_time() <= T::MinimumWeightRemainInBlock::get().ref_time() { break; } - weight_tracking = weight_tracking.saturating_sub(two_writes_one_read); + weight_tracking = + weight_tracking.saturating_sub(Weight::from_ref_time(two_writes_one_read)); Self::migrate_evm_address_type(evm_address_type, mint_status) } for (asset_id, old_metadata) in SbtMetadata::::drain() { - if weight_tracking <= T::MinimumWeightRemainInBlock::get() { + if weight_tracking.ref_time() <= T::MinimumWeightRemainInBlock::get().ref_time() { break; } - weight_tracking = weight_tracking.saturating_sub(two_writes_one_read); + weight_tracking = + weight_tracking.saturating_sub(Weight::from_ref_time(two_writes_one_read)); Self::migrate_metadata(asset_id, old_metadata); } diff --git a/pallets/manta-sbt/src/mock.rs b/pallets/manta-sbt/src/mock.rs index b26f15115..c6ac2bd06 100644 --- a/pallets/manta-sbt/src/mock.rs +++ b/pallets/manta-sbt/src/mock.rs @@ -18,11 +18,15 @@ use frame_support::{ parameter_types, - traits::{ConstU128, ConstU16, ConstU32, ConstU64, Everything, GenesisBuild, IsInVec}, - weights::RuntimeDbWeight, + traits::{ + AsEnsureOriginWithArg, ConstU128, ConstU16, ConstU32, ConstU64, Everything, GenesisBuild, + IsInVec, + }, + weights::{RuntimeDbWeight, Weight}, PalletId, }; -use frame_system::EnsureRoot; + +use frame_system::{EnsureNever, EnsureRoot}; use manta_primitives::{ assets::{ AssetConfig, AssetIdType, AssetLocation, AssetRegistry, AssetRegistryMetadata, @@ -80,8 +84,8 @@ impl frame_system::Config for Test { type BlockWeights = (); type BlockLength = (); type DbWeight = MockRocksDbWeight; - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; type Hash = H256; @@ -89,7 +93,7 @@ impl frame_system::Config for Test { type AccountId = AccountId32; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -111,7 +115,7 @@ parameter_types! { impl pallet_balances::Config for Test { type MaxLocks = MaxLocks; type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -132,10 +136,11 @@ parameter_types! { parameter_types! { pub const MantaSBTPalletId: PalletId = MANTA_SBT_PALLET_ID; pub const CustodialAccount: AccountId32 = ALICE; + pub const MinimumWeightRemainInBlock: Weight = Weight::from_ref_time(10000); } impl crate::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = crate::weights::SubstrateWeight; type PalletId = MantaSBTPalletId; type Currency = Balances; @@ -145,7 +150,7 @@ impl crate::Config for Test { type AdminOrigin = EnsureRoot; type Now = Timestamp; type RegistryBound = ConstU32<200>; - type MinimumWeightRemainInBlock = ConstU64<10000>; + type MinimumWeightRemainInBlock = MinimumWeightRemainInBlock; } parameter_types! { @@ -157,7 +162,7 @@ parameter_types! { } impl pallet_assets::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = StandardAssetId; type Currency = Balances; @@ -171,6 +176,12 @@ impl pallet_assets::Config for Test { type Freezer = (); type Extra = (); type WeightInfo = pallet_assets::weights::SubstrateWeight; + type RemoveItemsLimit = ConstU32<1000>; + type AssetIdParameter = StandardAssetId; + type CreateOrigin = AsEnsureOriginWithArg>; + type CallbackHandle = (); + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); } pub struct MantaAssetRegistry; @@ -191,7 +202,7 @@ impl AssetRegistry for MantaAssetRegistry { is_sufficient: bool, ) -> DispatchResult { Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), asset_id, AssetManager::account_id(), is_sufficient, @@ -199,7 +210,7 @@ impl AssetRegistry for MantaAssetRegistry { )?; Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), asset_id, metadata.name, metadata.symbol, @@ -213,7 +224,7 @@ impl AssetRegistry for MantaAssetRegistry { metadata: AssetStorageMetadata, ) -> DispatchResult { Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), *asset_id, metadata.name, metadata.symbol, @@ -266,7 +277,7 @@ impl AssetConfig for MantaAssetConfig { } impl pallet_asset_manager::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AssetId = StandardAssetId; type Balance = Balance; type Location = AssetLocation; @@ -281,7 +292,7 @@ parameter_types! { } impl pallet_manta_pay::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = pallet_manta_pay::weights::SubstrateWeight; type PalletId = MantaPayPalletId; type AssetConfig = MantaAssetConfig; @@ -292,8 +303,8 @@ parameter_types! { } impl pallet_tx_pause::Config for Test { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type MaxCallNames = ConstU32<25>; type PauseOrigin = EnsureRoot; type UnpauseOrigin = EnsureRoot; diff --git a/pallets/manta-sbt/src/tests.rs b/pallets/manta-sbt/src/tests.rs index 6752e614d..815827a7d 100644 --- a/pallets/manta-sbt/src/tests.rs +++ b/pallets/manta-sbt/src/tests.rs @@ -17,7 +17,7 @@ //! Tests for Manta-SBT use crate::{ - mock::{new_test_ext, Balances, MantaSBTPallet, Origin as MockOrigin, Test, Timestamp}, + mock::{new_test_ext, Balances, MantaSBTPallet, RuntimeOrigin as MockOrigin, Test, Timestamp}, AllowlistAccount, DispatchError, Error, EvmAccountAllowlist, EvmAddress, EvmAddressAllowlist, EvmAddressType, Metadata, MintChainInfo, MintChainInfos, MintId, MintIdRegistry, MintStatus, MintType, Moment, RegisteredMint, ReservedIds, SbtMetadata, SbtMetadataV2, MANTA_MINT_ID, @@ -25,6 +25,7 @@ use crate::{ use frame_support::{ assert_noop, assert_ok, traits::{Get, OnIdle}, + weights::Weight, }; use manta_crypto::{ arkworks::constraint::fp::Fp, @@ -795,7 +796,7 @@ fn on_idle_test() { MintChainInfos::::insert(MintType::Bab, example_info.clone()); MintChainInfos::::insert(MintType::Galxe, example_info); - MantaSBTPallet::on_idle(0, 100000); + MantaSBTPallet::on_idle(0, Weight::from_ref_time(100000)); assert!(MintChainInfos::::iter().next().is_none()); assert_eq!( MintIdRegistry::::get(1).unwrap().mint_name, @@ -814,7 +815,7 @@ fn on_idle_test() { extra: Some(b"metadata".to_vec().try_into().unwrap()), }; SbtMetadata::::insert(asset_id, metadata); - MantaSBTPallet::on_idle(0, 100000); + MantaSBTPallet::on_idle(0, Weight::from_ref_time(100000)); assert!(SbtMetadata::::iter().next().is_none()); // Converts Galxe correctly to value of 2 assert_eq!(SbtMetadataV2::::get(asset_id).unwrap().mint_id, 2); @@ -825,7 +826,7 @@ fn on_idle_test() { let address_type = EvmAddressType::Bab(EvmAddress::default()); EvmAddressAllowlist::::insert(address_type, MintStatus::AlreadyMinted); - MantaSBTPallet::on_idle(0, 100000); + MantaSBTPallet::on_idle(0, Weight::from_ref_time(100000)); assert!(EvmAddressAllowlist::::iter().next().is_none()); assert_eq!( EvmAccountAllowlist::::get(1, EvmAddress::default()).unwrap(), @@ -846,7 +847,7 @@ fn on_idle_weight_test() { }; SbtMetadata::::insert(i, metadata); } - MantaSBTPallet::on_idle(0, 1000000); + MantaSBTPallet::on_idle(0, Weight::from_ref_time(1000000)); // Will not try to migrate in one block assert!(SbtMetadata::::iter().next().is_some()); diff --git a/pallets/manta-sbt/src/weights.rs b/pallets/manta-sbt/src/weights.rs index 4b4bd2ec2..b7b168f0a 100644 --- a/pallets/manta-sbt/src/weights.rs +++ b/pallets/manta-sbt/src/weights.rs @@ -65,22 +65,23 @@ impl WeightInfo for SubstrateWeight { // Storage: MantaSbt Shards (r:0 w:1) // Storage: MantaSbt SbtMetadataV2 (r:0 w:1) fn to_private() -> Weight { - (30_118_417_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(30_118_417_000) + .saturating_add(T::DbWeight::get().reads(3u64)) + .saturating_add(T::DbWeight::get().writes(6u64)) } // Storage: System Account (r:1 w:1) // Storage: MantaSbt NextSbtId (r:1 w:1) // Storage: MantaSbt ReservedIds (r:0 w:1) fn reserve_sbt() -> Weight { - (48_730_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(48_730_000) + .saturating_add(T::DbWeight::get().reads(2u64)) + .saturating_add(T::DbWeight::get().writes(3u64)) } - // Storage: MantaSbt AllowlistAccount (r:0 w:1) + + fn change_allowlist_account() -> Weight { - (13_553_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(13_553_000) + .saturating_add(T::DbWeight::get().writes(1u64)) } // Storage: MantaSbt MintIdRegistry (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) @@ -88,22 +89,22 @@ impl WeightInfo for SubstrateWeight { // Storage: MantaSbt EvmAccountAllowlist (r:1 w:1) // Storage: MantaSbt NextSbtId (r:1 w:1) fn allowlist_evm_account() -> Weight { - (28_472_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(28_472_000) + .saturating_add(T::DbWeight::get().reads(5u64)) + .saturating_add(T::DbWeight::get().writes(2u64)) } // Storage: MantaSbt NextMintId (r:1 w:1) // Storage: MantaSbt MintIdRegistry (r:0 w:1) fn new_mint_info() -> Weight { - (15_471_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(15_471_000) + .saturating_add(T::DbWeight::get().reads(1u64)) + .saturating_add(T::DbWeight::get().writes(2u64)) } // Storage: MantaSbt MintIdRegistry (r:1 w:1) fn update_mint_info() -> Weight { - (16_570_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(16_570_000) + .saturating_add(T::DbWeight::get().reads(1u64)) + .saturating_add(T::DbWeight::get().writes(1u64)) } // Storage: MantaSbt MintIdRegistry (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) @@ -115,9 +116,9 @@ impl WeightInfo for SubstrateWeight { // Storage: MantaSbt Shards (r:0 w:1) // Storage: MantaSbt SbtMetadataV2 (r:0 w:1) fn mint_sbt_eth() -> Weight { - (30_190_491_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(30_190_491_000) + .saturating_add(T::DbWeight::get().reads(6u64)) + .saturating_add(T::DbWeight::get().writes(6u64)) } } @@ -130,22 +131,23 @@ impl WeightInfo for () { // Storage: MantaSbt Shards (r:0 w:1) // Storage: MantaSbt SbtMetadataV2 (r:0 w:1) fn to_private() -> Weight { - (30_118_417_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(30_118_417_000) + .saturating_add(RocksDbWeight::get().reads(3u64)) + .saturating_add(RocksDbWeight::get().writes(6u64)) } // Storage: System Account (r:1 w:1) // Storage: MantaSbt NextSbtId (r:1 w:1) // Storage: MantaSbt ReservedIds (r:0 w:1) fn reserve_sbt() -> Weight { - (48_730_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(48_730_000) + .saturating_add(RocksDbWeight::get().reads(2u64)) + .saturating_add(RocksDbWeight::get().writes(3u64)) } - // Storage: MantaSbt AllowlistAccount (r:0 w:1) + + fn change_allowlist_account() -> Weight { - (13_553_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(13_553_000) + .saturating_add(RocksDbWeight::get().writes(1u64)) } // Storage: MantaSbt MintIdRegistry (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) @@ -153,22 +155,22 @@ impl WeightInfo for () { // Storage: MantaSbt EvmAccountAllowlist (r:1 w:1) // Storage: MantaSbt NextSbtId (r:1 w:1) fn allowlist_evm_account() -> Weight { - (28_472_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(28_472_000u64) + .saturating_add(RocksDbWeight::get().reads(5u64)) + .saturating_add(RocksDbWeight::get().writes(2u64)) } // Storage: MantaSbt NextMintId (r:1 w:1) // Storage: MantaSbt MintIdRegistry (r:0 w:1) fn new_mint_info() -> Weight { - (15_471_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(15_471_000u64) + .saturating_add(RocksDbWeight::get().reads(1u64)) + .saturating_add(RocksDbWeight::get().writes(2u64)) } // Storage: MantaSbt MintIdRegistry (r:1 w:1) fn update_mint_info() -> Weight { - (16_570_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(16_570_000u64) + .saturating_add(RocksDbWeight::get().reads(1u64)) + .saturating_add(RocksDbWeight::get().writes(1u64)) } // Storage: MantaSbt MintIdRegistry (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) @@ -180,8 +182,8 @@ impl WeightInfo for () { // Storage: MantaSbt Shards (r:0 w:1) // Storage: MantaSbt SbtMetadataV2 (r:0 w:1) fn mint_sbt_eth() -> Weight { - (30_190_491_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(30_190_491_000u64) + .saturating_add(RocksDbWeight::get().reads(6u64)) + .saturating_add(RocksDbWeight::get().writes(6u64)) } } diff --git a/pallets/manta-support/Cargo.toml b/pallets/manta-support/Cargo.toml index a905b46a3..8443316bf 100644 --- a/pallets/manta-support/Cargo.toml +++ b/pallets/manta-support/Cargo.toml @@ -13,27 +13,27 @@ version = '4.0.7' # utils anyhow = { version = "1.0.55", optional = true, default-features = false } base64 = { version = "0.20", default-features = false, features = ["alloc"] } -indoc = { version = "1.0.3", optional = true, default-features = false } +indoc = { version = "2.0.1", optional = true, default-features = false } rand_chacha = { version = "0.3.1", optional = true, default-features = false } tempfile = { version = "3.3.0", optional = true, default-features = false } # substrate dependencies -frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false, optional = true } -frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } -scale-codec = { package = "parity-scale-codec", version = '3.1.2', default-features = false, features = ["derive", "max-encoded-len"] } +frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false, optional = true } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } +scale-codec = { package = "parity-scale-codec", version = '3.4.0', default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28", optional = true, default-features = false } -sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28", optional = true, default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28", default-features = false } +sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37", optional = true, default-features = false } +sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37", optional = true, default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37", default-features = false } # manta dependencies -manta-accounting = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.13", default-features = false } -manta-crypto = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.13", default-features = false } -manta-pay = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.13", default-features = false, features = ["groth16", "parameters", "scale"] } +manta-accounting = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.15", default-features = false } +manta-crypto = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.15", default-features = false } +manta-pay = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.15", default-features = false, features = ["groth16", "parameters", "scale"] } manta-primitives = { path = "../../primitives/manta", default-features = false } -manta-util = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.13", default-features = false } +manta-util = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.15", default-features = false } [features] default = ["std"] diff --git a/pallets/parachain-staking/Cargo.toml b/pallets/parachain-staking/Cargo.toml index b537ac85e..1741f5c8a 100644 --- a/pallets/parachain-staking/Cargo.toml +++ b/pallets/parachain-staking/Cargo.toml @@ -13,34 +13,34 @@ log = { version = "0.4", default-features = false } serde = { version = "1.0.136", default-features = false, optional = true } # Substrate -frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", optional = true, default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } -parity-scale-codec = { version = "3.1.2", default-features = false, features = ["derive"] } +frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", optional = true, default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } +parity-scale-codec = { version = "3.4.0", default-features = false, features = ["derive"] } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-arithmetic = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } +sp-arithmetic = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } substrate-fixed = { git = "https://github.com/Manta-Network/substrate-fixed.git", tag = "v0.5.9", default-features = false } # Manta manta-primitives = { path = '../../primitives/manta', default-features = false } # TODO: remove after whitelist period manta-collator-selection = { path = '../collator-selection', default-features = false } -pallet-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-staking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } +pallet-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-staking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } [dev-dependencies] similar-asserts = "1.1.0" -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } +sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } [features] default = ["std"] runtime-benchmarks = [ - "frame-benchmarking", + "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", ] @@ -60,4 +60,7 @@ std = [ "sp-std/std", 'substrate-fixed/std', ] -try-runtime = ["frame-support/try-runtime"] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", +] diff --git a/pallets/parachain-staking/src/benchmarks.rs b/pallets/parachain-staking/src/benchmarks.rs index 334115aa1..ee6cf43dd 100644 --- a/pallets/parachain-staking/src/benchmarks.rs +++ b/pallets/parachain-staking/src/benchmarks.rs @@ -26,6 +26,7 @@ use frame_support::traits::{tokens::fungible::Inspect, Currency, Get, OnFinalize use frame_system::RawOrigin; use sp_runtime::{Perbill, Percent}; use sp_std::{collections::btree_map::BTreeMap, vec::Vec}; + /// Minimum collator candidate stake fn min_candidate_stk() -> BalanceOf { <::MinCandidateStk as Get>>::get() diff --git a/pallets/parachain-staking/src/lib.rs b/pallets/parachain-staking/src/lib.rs index 7e7b281d5..fc387b477 100644 --- a/pallets/parachain-staking/src/lib.rs +++ b/pallets/parachain-staking/src/lib.rs @@ -121,14 +121,14 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config + manta_collator_selection::Config { /// Overarching event type - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// The currency type type Currency: Currency + ReservableCurrency + LockableCurrency + Inspect; /// The origin for monetary governance - type MonetaryGovernanceOrigin: EnsureOrigin; + type MonetaryGovernanceOrigin: EnsureOrigin; /// Minimum number of blocks per round #[pallet::constant] type MinBlocksPerRound: Get; @@ -649,7 +649,7 @@ pub mod pallet { ); candidate_count = candidate_count.saturating_add(1u32); if let Err(error) = >::join_candidates( - T::Origin::from(Some(candidate.clone()).into()), + T::RuntimeOrigin::from(Some(candidate.clone()).into()), balance, candidate_count, ) { @@ -677,7 +677,7 @@ pub mod pallet { 0u32 }; if let Err(error) = >::delegate( - T::Origin::from(Some(delegator.clone()).into()), + T::RuntimeOrigin::from(Some(delegator.clone()).into()), target.clone(), balance, cd_count, @@ -1440,7 +1440,7 @@ pub mod pallet { >::InsufficientBalance ); if let Err(error) = >::join_candidates( - T::Origin::from(Some(candidate.clone()).into()), + T::RuntimeOrigin::from(Some(candidate.clone()).into()), whitelist_bond, candidate_count, ) { @@ -1570,7 +1570,7 @@ pub mod pallet { // don't underflow uint if now < delay { - return 0u64.into(); + return Weight::zero(); } let paid_for_round = now.saturating_sub(delay); @@ -1585,7 +1585,7 @@ pub mod pallet { } result.1 // weight consumed by pay_one_collator_reward } else { - 0u64.into() + Weight::zero() } } @@ -1607,7 +1607,7 @@ pub mod pallet { // 2. we called pay_one_collator_reward when we were actually done with deferred // payouts log::warn!("pay_one_collator_reward called with no > for the round!"); - return (None, 0u64.into()); + return (None, Weight::zero()); } let mint = |amt: BalanceOf, to: T::AccountId| { @@ -1627,7 +1627,7 @@ pub mod pallet { if let Some((collator, pts)) = >::iter_prefix(paid_for_round).drain().next() { - let mut extra_weight = 0; + let mut extra_weight = Weight::zero(); let pct_due = Perbill::from_rational(pts, total_points); let total_paid = pct_due * payout_info.total_staking_reward; let mut amt_due = total_paid; @@ -1672,7 +1672,7 @@ pub mod pallet { } else { // Note that we don't clean up storage here; it is cleaned up in // handle_delayed_payouts() - (None, 0u64.into()) + (None, Weight::zero()) } } diff --git a/pallets/parachain-staking/src/migrations.rs b/pallets/parachain-staking/src/migrations.rs index d1ad8942e..e933787d5 100644 --- a/pallets/parachain-staking/src/migrations.rs +++ b/pallets/parachain-staking/src/migrations.rs @@ -30,8 +30,6 @@ use crate::{ BalanceOf, Bond, BottomDelegations, CandidateInfo, CandidateMetadata, CapacityStatus, CollatorCandidate, Config, Delegations, Event, Pallet, Points, Round, Staked, TopDelegations, }; -#[cfg(feature = "try-runtime")] -use frame_support::traits::OnRuntimeUpgradeHelpersExt; use frame_support::Twox64Concat; extern crate alloc; #[cfg(feature = "try-runtime")] @@ -159,7 +157,7 @@ impl OnRuntimeUpgrade for SplitDelegatorStateIntoDelegationScheduledR } #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result<(), &'static str> { + fn pre_upgrade() -> Result, &'static str> { let mut expected_delegator_state_entries = 0u64; let mut expected_requests = 0u64; for (_key, state) in migration::storage_iter::>>( @@ -193,11 +191,11 @@ impl OnRuntimeUpgrade for SplitDelegatorStateIntoDelegationScheduledR use frame_support::migration; - Ok(()) + Ok(Vec::new()) } #[cfg(feature = "try-runtime")] - fn post_upgrade() -> Result<(), &'static str> { + fn post_upgrade(_state: Vec) -> Result<(), &'static str> { // Scheduled decrease amount (bond_less) is correctly migrated let mut actual_delegator_state_entries = 0; for (delegator, state) in >::iter() { @@ -326,7 +324,7 @@ impl OnRuntimeUpgrade for PatchIncorrectDelegationSums { top + bottom + 100_000_000_000 } #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result<(), &'static str> { + fn pre_upgrade() -> Result, &'static str> { // get total counted for all candidates for (account, state) in >::iter() { Self::set_temp_storage( @@ -334,11 +332,11 @@ impl OnRuntimeUpgrade for PatchIncorrectDelegationSums { &format!("Candidate{:?}TotalCounted", account)[..], ); } - Ok(()) + Ok(Vec::new()) } #[cfg(feature = "try-runtime")] - fn post_upgrade() -> Result<(), &'static str> { + fn post_upgrade(_state: Vec) -> Result<(), &'static str> { // ensure new total counted = top_delegations.sum() + collator self bond for (account, state) in >::iter() { let old_count = @@ -506,7 +504,7 @@ impl OnRuntimeUpgrade for SplitCandidateStateToDecreasePoV { migrated_count.saturating_mul(3 * weight.write + weight.read) } #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result<(), &'static str> { + fn pre_upgrade() -> Result, &'static str> { // get delegation count for all candidates to check consistency for (account, state) in >::iter() { // insert top + bottom into some temp map? @@ -517,11 +515,11 @@ impl OnRuntimeUpgrade for SplitCandidateStateToDecreasePoV { &format!("Candidate{:?}DelegationCount", account)[..], ); } - Ok(()) + Ok(Vec::new()) } #[cfg(feature = "try-runtime")] - fn post_upgrade() -> Result<(), &'static str> { + fn post_upgrade(_state: Vec) -> Result<(), &'static str> { // check that top + bottom are the same as the expected (stored in temp) for (account, state) in >::iter() { let expected_count: u32 = @@ -591,7 +589,7 @@ impl OnRuntimeUpgrade for RemoveExitQueue { } #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result<(), &'static str> { + fn pre_upgrade() -> Result, &'static str> { use frame_support::storage::migration::storage_iter; let pallet_prefix: &[u8] = b"ParachainStaking"; @@ -643,11 +641,11 @@ impl OnRuntimeUpgrade for RemoveExitQueue { Self::set_temp_storage(example_nominator, "example_nominator"); } - Ok(()) + Ok(Vec::new()) } #[cfg(feature = "try-runtime")] - fn post_upgrade() -> Result<(), &'static str> { + fn post_upgrade(_state: Vec) -> Result<(), &'static str> { // Check number of candidates matches what was set aside in pre_upgrade let old_candidate_count: u64 = Self::get_temp_storage("old_collator_count") .expect("We stored the old collator candidate count so it should be there"); @@ -715,13 +713,13 @@ impl OnRuntimeUpgrade for PurgeStaleStorage { } #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result<(), &'static str> { + fn pre_upgrade() -> Result, &'static str> { // trivial migration - Ok(()) + Ok(Vec::new()) } #[cfg(feature = "try-runtime")] - fn post_upgrade() -> Result<(), &'static str> { + fn post_upgrade(_state: Vec) -> Result<(), &'static str> { // expect only the storage items for the last 2 rounds to be stored let staked_count = Staked::::iter().count() as u32; let points_count = Points::::iter().count() as u32; diff --git a/pallets/parachain-staking/src/mock.rs b/pallets/parachain-staking/src/mock.rs index ddbc4fc1b..10317ad3f 100644 --- a/pallets/parachain-staking/src/mock.rs +++ b/pallets/parachain-staking/src/mock.rs @@ -22,7 +22,6 @@ use crate::{ use frame_support::{ construct_runtime, parameter_types, traits::{Everything, GenesisBuild, LockIdentifier, OnFinalize, OnInitialize}, - weights::Weight, }; use manta_primitives::types::{BlockNumber, Header}; use sp_core::H256; @@ -57,7 +56,7 @@ construct_runtime!( parameter_types! { pub const BlockHashCount: BlockNumber = 250; - pub const MaximumBlockWeight: Weight = 1024; + pub const MaximumBlockWeight: u64 = 1024; pub const MaximumBlockLength: u32 = 2 * 1024; pub const AvailableBlockRatio: Perbill = Perbill::one(); pub const SS58Prefix: u8 = manta_primitives::constants::CALAMARI_SS58PREFIX; @@ -65,16 +64,16 @@ parameter_types! { impl frame_system::Config for Test { type BaseCallFilter = Everything; type DbWeight = (); - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type Index = u64; type BlockNumber = BlockNumber; - type Call = Call; + type RuntimeCall = RuntimeCall; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -96,7 +95,7 @@ impl pallet_balances::Config for Test { type ReserveIdentifier = [u8; 4]; type MaxLocks = (); type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -125,7 +124,7 @@ parameter_types! { pub const MinDelegation: u128 = 3; } impl Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type MonetaryGovernanceOrigin = frame_system::EnsureRoot; type MinBlocksPerRound = MinBlocksPerRound; @@ -184,7 +183,7 @@ ord_parameter_types! { pub const RootAccount: u64 = 777; } impl manta_collator_selection::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type UpdateOrigin = EnsureSignedBy; type PotId = PotId; @@ -236,7 +235,7 @@ parameter_types! { pub const Period: BlockNumber = 10; } impl pallet_session::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorId = ::AccountId; // we don't have stash and controller, thus we don't need the convert as well. type ValidatorIdOf = manta_collator_selection::IdentityCollator; @@ -375,7 +374,7 @@ pub(crate) fn roll_to_round_end(round: u32) -> u32 { roll_to(block) } -pub(crate) fn last_event() -> Event { +pub(crate) fn last_event() -> RuntimeEvent { System::events().pop().expect("Event expected").event } @@ -384,7 +383,7 @@ pub(crate) fn events() -> Vec> { .into_iter() .map(|r| r.event) .filter_map(|e| { - if let Event::ParachainStaking(inner) = e { + if let RuntimeEvent::ParachainStaking(inner) = e { Some(inner) } else { None diff --git a/pallets/parachain-staking/src/tests.rs b/pallets/parachain-staking/src/tests.rs index 9492093b7..36ae52cca 100644 --- a/pallets/parachain-staking/src/tests.rs +++ b/pallets/parachain-staking/src/tests.rs @@ -27,7 +27,8 @@ use crate::{ delegation_requests::{CancelledScheduledRequest, DelegationAction, ScheduledRequest}, mock::{ roll_one_block, roll_to, roll_to_round_begin, roll_to_round_end, set_author, Balances, - CollatorSelection, Event as MetaEvent, ExtBuilder, Origin, ParachainStaking, Test, + CollatorSelection, ExtBuilder, ParachainStaking, RuntimeEvent as MetaEvent, RuntimeOrigin, + Test, }, AtStake, Bond, CollatorStatus, DelegationScheduledRequests, DelegatorAdded, DelegatorState, DelegatorStatus, Error, Event, Range, DELEGATOR_LOCK_ID, @@ -41,15 +42,18 @@ use sp_runtime::{traits::Zero, DispatchError, ModuleError, Perbill, Percent}; fn invalid_root_origin_fails() { ExtBuilder::default().build().execute_with(|| { assert_noop!( - ParachainStaking::set_total_selected(Origin::signed(45), 6u32), + ParachainStaking::set_total_selected(RuntimeOrigin::signed(45), 6u32), sp_runtime::DispatchError::BadOrigin ); assert_noop!( - ParachainStaking::set_collator_commission(Origin::signed(45), Perbill::from_percent(5)), + ParachainStaking::set_collator_commission( + RuntimeOrigin::signed(45), + Perbill::from_percent(5) + ), sp_runtime::DispatchError::BadOrigin ); assert_noop!( - ParachainStaking::set_blocks_per_round(Origin::signed(45), 3u32), + ParachainStaking::set_blocks_per_round(RuntimeOrigin::signed(45), 3u32), sp_runtime::DispatchError::BadOrigin ); }); @@ -61,8 +65,14 @@ fn invalid_root_origin_fails() { fn set_total_selected_event_emits_correctly() { ExtBuilder::default().build().execute_with(|| { // before we can bump total_selected we must bump the blocks per round - assert_ok!(ParachainStaking::set_blocks_per_round(Origin::root(), 6u32)); - assert_ok!(ParachainStaking::set_total_selected(Origin::root(), 6u32)); + assert_ok!(ParachainStaking::set_blocks_per_round( + RuntimeOrigin::root(), + 6u32 + )); + assert_ok!(ParachainStaking::set_total_selected( + RuntimeOrigin::root(), + 6u32 + )); assert_last_event!(MetaEvent::ParachainStaking(Event::TotalSelectedSet { old: 5u32, new: 6u32 @@ -75,7 +85,7 @@ fn set_total_selected_fails_if_above_blocks_per_round() { ExtBuilder::default().build().execute_with(|| { assert_eq!(ParachainStaking::round().length, 5); // test relies on this assert_noop!( - ParachainStaking::set_total_selected(Origin::root(), 6u32), + ParachainStaking::set_total_selected(RuntimeOrigin::root(), 6u32), Error::::RoundLengthMustBeAtLeastTotalSelectedCollators, ); }); @@ -85,10 +95,13 @@ fn set_total_selected_fails_if_above_blocks_per_round() { fn set_total_selected_passes_if_equal_to_blocks_per_round() { ExtBuilder::default().build().execute_with(|| { assert_ok!(ParachainStaking::set_blocks_per_round( - Origin::root(), + RuntimeOrigin::root(), + 10u32 + )); + assert_ok!(ParachainStaking::set_total_selected( + RuntimeOrigin::root(), 10u32 )); - assert_ok!(ParachainStaking::set_total_selected(Origin::root(), 10u32)); }); } @@ -96,10 +109,13 @@ fn set_total_selected_passes_if_equal_to_blocks_per_round() { fn set_total_selected_passes_if_below_blocks_per_round() { ExtBuilder::default().build().execute_with(|| { assert_ok!(ParachainStaking::set_blocks_per_round( - Origin::root(), + RuntimeOrigin::root(), 10u32 )); - assert_ok!(ParachainStaking::set_total_selected(Origin::root(), 9u32)); + assert_ok!(ParachainStaking::set_total_selected( + RuntimeOrigin::root(), + 9u32 + )); }); } @@ -107,12 +123,15 @@ fn set_total_selected_passes_if_below_blocks_per_round() { fn set_blocks_per_round_fails_if_below_total_selected() { ExtBuilder::default().build().execute_with(|| { assert_ok!(ParachainStaking::set_blocks_per_round( - Origin::root(), + RuntimeOrigin::root(), 20u32 )); - assert_ok!(ParachainStaking::set_total_selected(Origin::root(), 15u32)); + assert_ok!(ParachainStaking::set_total_selected( + RuntimeOrigin::root(), + 15u32 + )); assert_noop!( - ParachainStaking::set_blocks_per_round(Origin::root(), 14u32), + ParachainStaking::set_blocks_per_round(RuntimeOrigin::root(), 14u32), Error::::RoundLengthMustBeAtLeastTotalSelectedCollators, ); }); @@ -122,11 +141,17 @@ fn set_blocks_per_round_fails_if_below_total_selected() { fn set_blocks_per_round_passes_if_equal_to_total_selected() { ExtBuilder::default().build().execute_with(|| { assert_ok!(ParachainStaking::set_blocks_per_round( - Origin::root(), + RuntimeOrigin::root(), 10u32 )); - assert_ok!(ParachainStaking::set_total_selected(Origin::root(), 9u32)); - assert_ok!(ParachainStaking::set_blocks_per_round(Origin::root(), 9u32)); + assert_ok!(ParachainStaking::set_total_selected( + RuntimeOrigin::root(), + 9u32 + )); + assert_ok!(ParachainStaking::set_blocks_per_round( + RuntimeOrigin::root(), + 9u32 + )); }); } @@ -134,7 +159,10 @@ fn set_blocks_per_round_passes_if_equal_to_total_selected() { fn set_blocks_per_round_passes_if_above_total_selected() { ExtBuilder::default().build().execute_with(|| { assert_eq!(ParachainStaking::round().length, 5); // test relies on this - assert_ok!(ParachainStaking::set_blocks_per_round(Origin::root(), 6u32)); + assert_ok!(ParachainStaking::set_blocks_per_round( + RuntimeOrigin::root(), + 6u32 + )); }); } @@ -143,12 +171,15 @@ fn set_total_selected_storage_updates_correctly() { ExtBuilder::default().build().execute_with(|| { // round length must be >= total_selected, so update that first assert_ok!(ParachainStaking::set_blocks_per_round( - Origin::root(), + RuntimeOrigin::root(), 10u32 )); assert_eq!(ParachainStaking::total_selected(), 5u32); - assert_ok!(ParachainStaking::set_total_selected(Origin::root(), 6u32)); + assert_ok!(ParachainStaking::set_total_selected( + RuntimeOrigin::root(), + 6u32 + )); assert_eq!(ParachainStaking::total_selected(), 6u32); }); } @@ -157,7 +188,7 @@ fn set_total_selected_storage_updates_correctly() { fn cannot_set_total_selected_to_current_total_selected() { ExtBuilder::default().build().execute_with(|| { assert_noop!( - ParachainStaking::set_total_selected(Origin::root(), 5u32), + ParachainStaking::set_total_selected(RuntimeOrigin::root(), 5u32), Error::::NoWritingSameValue ); }); @@ -167,7 +198,7 @@ fn cannot_set_total_selected_to_current_total_selected() { fn cannot_set_total_selected_below_module_min() { ExtBuilder::default().build().execute_with(|| { assert_noop!( - ParachainStaking::set_total_selected(Origin::root(), 4u32), + ParachainStaking::set_total_selected(RuntimeOrigin::root(), 4u32), Error::::CannotSetBelowMin ); }); @@ -179,7 +210,7 @@ fn cannot_set_total_selected_below_module_min() { fn set_collator_commission_event_emits_correctly() { ExtBuilder::default().build().execute_with(|| { assert_ok!(ParachainStaking::set_collator_commission( - Origin::root(), + RuntimeOrigin::root(), Perbill::from_percent(5) )); assert_last_event!(MetaEvent::ParachainStaking(Event::CollatorCommissionSet { @@ -197,7 +228,7 @@ fn set_collator_commission_storage_updates_correctly() { Perbill::from_percent(20) ); assert_ok!(ParachainStaking::set_collator_commission( - Origin::root(), + RuntimeOrigin::root(), Perbill::from_percent(5) )); assert_eq!( @@ -211,7 +242,10 @@ fn set_collator_commission_storage_updates_correctly() { fn cannot_set_collator_commission_to_current_collator_commission() { ExtBuilder::default().build().execute_with(|| { assert_noop!( - ParachainStaking::set_collator_commission(Origin::root(), Perbill::from_percent(20)), + ParachainStaking::set_collator_commission( + RuntimeOrigin::root(), + Perbill::from_percent(20) + ), Error::::NoWritingSameValue ); }); @@ -222,7 +256,10 @@ fn cannot_set_collator_commission_to_current_collator_commission() { #[test] fn set_blocks_per_round_event_emits_correctly() { ExtBuilder::default().build().execute_with(|| { - assert_ok!(ParachainStaking::set_blocks_per_round(Origin::root(), 6u32)); + assert_ok!(ParachainStaking::set_blocks_per_round( + RuntimeOrigin::root(), + 6u32 + )); assert_last_event!(MetaEvent::ParachainStaking(Event::BlocksPerRoundSet { current_round: 1, first_block: 0, @@ -239,7 +276,10 @@ fn set_blocks_per_round_event_emits_correctly() { fn set_blocks_per_round_storage_updates_correctly() { ExtBuilder::default().build().execute_with(|| { assert_eq!(ParachainStaking::round().length, 5); - assert_ok!(ParachainStaking::set_blocks_per_round(Origin::root(), 6u32)); + assert_ok!(ParachainStaking::set_blocks_per_round( + RuntimeOrigin::root(), + 6u32 + )); assert_eq!(ParachainStaking::round().length, 6); }); } @@ -248,7 +288,7 @@ fn set_blocks_per_round_storage_updates_correctly() { fn cannot_set_blocks_per_round_below_module_min() { ExtBuilder::default().build().execute_with(|| { assert_noop!( - ParachainStaking::set_blocks_per_round(Origin::root(), 2u32), + ParachainStaking::set_blocks_per_round(RuntimeOrigin::root(), 2u32), Error::::CannotSetBelowMin ); }); @@ -258,7 +298,7 @@ fn cannot_set_blocks_per_round_below_module_min() { fn cannot_set_blocks_per_round_to_current_blocks_per_round() { ExtBuilder::default().build().execute_with(|| { assert_noop!( - ParachainStaking::set_blocks_per_round(Origin::root(), 5u32), + ParachainStaking::set_blocks_per_round(RuntimeOrigin::root(), 5u32), Error::::NoWritingSameValue ); }); @@ -275,7 +315,7 @@ fn round_immediately_jumps_if_current_duration_exceeds_new_blocks_per_round() { // and we can't lower the number of collators because it must be above // MinSelectedCandidates. so we first raise blocks per round, then lower it. assert_ok!(ParachainStaking::set_blocks_per_round( - Origin::root(), + RuntimeOrigin::root(), 10u32 )); @@ -286,7 +326,10 @@ fn round_immediately_jumps_if_current_duration_exceeds_new_blocks_per_round() { selected_collators_number: 1, total_balance: 20 })); - assert_ok!(ParachainStaking::set_blocks_per_round(Origin::root(), 5u32)); + assert_ok!(ParachainStaking::set_blocks_per_round( + RuntimeOrigin::root(), + 5u32 + )); roll_to(18); assert_last_event!(MetaEvent::ParachainStaking(Event::NewRound { starting_block: 18, @@ -304,7 +347,7 @@ fn invalid_monetary_origin_fails() { ExtBuilder::default().build().execute_with(|| { assert_noop!( ParachainStaking::set_staking_expectations( - Origin::signed(45), + RuntimeOrigin::signed(45), Range { min: 3u32.into(), ideal: 4u32.into(), @@ -315,7 +358,7 @@ fn invalid_monetary_origin_fails() { ); assert_noop!( ParachainStaking::set_inflation( - Origin::signed(45), + RuntimeOrigin::signed(45), Range { min: Perbill::from_percent(3), ideal: Perbill::from_percent(4), @@ -326,7 +369,7 @@ fn invalid_monetary_origin_fails() { ); assert_noop!( ParachainStaking::set_inflation( - Origin::signed(45), + RuntimeOrigin::signed(45), Range { min: Perbill::from_percent(3), ideal: Perbill::from_percent(4), @@ -336,12 +379,12 @@ fn invalid_monetary_origin_fails() { sp_runtime::DispatchError::BadOrigin ); assert_noop!( - ParachainStaking::set_parachain_bond_account(Origin::signed(45), 11), + ParachainStaking::set_parachain_bond_account(RuntimeOrigin::signed(45), 11), sp_runtime::DispatchError::BadOrigin ); assert_noop!( ParachainStaking::set_parachain_bond_reserve_percent( - Origin::signed(45), + RuntimeOrigin::signed(45), Percent::from_percent(2) ), sp_runtime::DispatchError::BadOrigin @@ -356,7 +399,7 @@ fn set_staking_event_emits_event_correctly() { ExtBuilder::default().build().execute_with(|| { // valid call succeeds assert_ok!(ParachainStaking::set_staking_expectations( - Origin::root(), + RuntimeOrigin::root(), Range { min: 3u128, ideal: 4u128, @@ -383,7 +426,7 @@ fn set_staking_updates_storage_correctly() { } ); assert_ok!(ParachainStaking::set_staking_expectations( - Origin::root(), + RuntimeOrigin::root(), Range { min: 3u128, ideal: 4u128, @@ -407,7 +450,7 @@ fn cannot_set_invalid_staking_expectations() { // invalid call fails assert_noop!( ParachainStaking::set_staking_expectations( - Origin::root(), + RuntimeOrigin::root(), Range { min: 5u128, ideal: 4u128, @@ -423,7 +466,7 @@ fn cannot_set_invalid_staking_expectations() { fn cannot_set_same_staking_expectations() { ExtBuilder::default().build().execute_with(|| { assert_ok!(ParachainStaking::set_staking_expectations( - Origin::root(), + RuntimeOrigin::root(), Range { min: 3u128, ideal: 4u128, @@ -432,7 +475,7 @@ fn cannot_set_same_staking_expectations() { )); assert_noop!( ParachainStaking::set_staking_expectations( - Origin::root(), + RuntimeOrigin::root(), Range { min: 3u128, ideal: 4u128, @@ -455,7 +498,7 @@ fn set_inflation_event_emits_correctly() { Perbill::from_percent(5), ); assert_ok!(ParachainStaking::set_inflation( - Origin::root(), + RuntimeOrigin::root(), Range { min, ideal, max } )); assert_last_event!(MetaEvent::ParachainStaking(Event::InflationSet { @@ -494,7 +537,7 @@ fn set_inflation_storage_updates_correctly() { } ); assert_ok!(ParachainStaking::set_inflation( - Origin::root(), + RuntimeOrigin::root(), Range { min, ideal, max } ),); assert_eq!( @@ -517,7 +560,7 @@ fn cannot_set_invalid_inflation() { ExtBuilder::default().build().execute_with(|| { assert_noop!( ParachainStaking::set_inflation( - Origin::root(), + RuntimeOrigin::root(), Range { min: Perbill::from_percent(5), ideal: Perbill::from_percent(4), @@ -538,11 +581,11 @@ fn cannot_set_same_inflation() { Perbill::from_percent(5), ); assert_ok!(ParachainStaking::set_inflation( - Origin::root(), + RuntimeOrigin::root(), Range { min, ideal, max } ),); assert_noop!( - ParachainStaking::set_inflation(Origin::root(), Range { min, ideal, max }), + ParachainStaking::set_inflation(RuntimeOrigin::root(), Range { min, ideal, max }), Error::::NoWritingSameValue ); }); @@ -554,7 +597,7 @@ fn cannot_set_same_inflation() { fn set_parachain_bond_account_event_emits_correctly() { ExtBuilder::default().build().execute_with(|| { assert_ok!(ParachainStaking::set_parachain_bond_account( - Origin::root(), + RuntimeOrigin::root(), 11 )); assert_last_event!(MetaEvent::ParachainStaking( @@ -568,7 +611,7 @@ fn set_parachain_bond_account_storage_updates_correctly() { ExtBuilder::default().build().execute_with(|| { assert_eq!(ParachainStaking::parachain_bond_info().account, 0); assert_ok!(ParachainStaking::set_parachain_bond_account( - Origin::root(), + RuntimeOrigin::root(), 11 )); assert_eq!(ParachainStaking::parachain_bond_info().account, 11); @@ -581,7 +624,7 @@ fn set_parachain_bond_account_storage_updates_correctly() { fn set_parachain_bond_reserve_percent_event_emits_correctly() { ExtBuilder::default().build().execute_with(|| { assert_ok!(ParachainStaking::set_parachain_bond_reserve_percent( - Origin::root(), + RuntimeOrigin::root(), Percent::from_percent(50) )); assert_last_event!(MetaEvent::ParachainStaking( @@ -601,7 +644,7 @@ fn set_parachain_bond_reserve_percent_storage_updates_correctly() { Percent::from_percent(30) ); assert_ok!(ParachainStaking::set_parachain_bond_reserve_percent( - Origin::root(), + RuntimeOrigin::root(), Percent::from_percent(50) )); assert_eq!( @@ -616,7 +659,7 @@ fn cannot_set_same_parachain_bond_reserve_percent() { ExtBuilder::default().build().execute_with(|| { assert_noop!( ParachainStaking::set_parachain_bond_reserve_percent( - Origin::root(), + RuntimeOrigin::root(), Percent::from_percent(30) ), Error::::NoWritingSameValue @@ -635,7 +678,7 @@ fn join_candidates_event_emits_correctly() { .build() .execute_with(|| { assert_ok!(ParachainStaking::join_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 10u128, 0u32 )); @@ -657,7 +700,7 @@ fn join_candidates_reserves_balance() { .execute_with(|| { assert_eq!(ParachainStaking::get_collator_stakable_free_balance(&1), 10); assert_ok!(ParachainStaking::join_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 10u128, 0u32 )); @@ -673,7 +716,7 @@ fn join_candidates_increases_total_staked() { .execute_with(|| { assert_eq!(ParachainStaking::total(), 0); assert_ok!(ParachainStaking::join_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 10u128, 0u32 )); @@ -689,7 +732,7 @@ fn join_candidates_creates_candidate_state() { .execute_with(|| { assert!(ParachainStaking::candidate_info(1).is_none()); assert_ok!(ParachainStaking::join_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 10u128, 0u32 )); @@ -707,7 +750,7 @@ fn join_candidates_adds_to_candidate_pool() { .execute_with(|| { assert!(ParachainStaking::candidate_pool().0.is_empty()); assert_ok!(ParachainStaking::join_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 10u128, 0u32 )); @@ -725,7 +768,7 @@ fn cannot_join_candidates_if_candidate() { .build() .execute_with(|| { assert_noop!( - ParachainStaking::join_candidates(Origin::signed(1), 11u128, 100u32), + ParachainStaking::join_candidates(RuntimeOrigin::signed(1), 11u128, 100u32), Error::::CandidateExists ); }); @@ -747,22 +790,22 @@ fn can_join_candidates_with_smaller_bond_if_whitelisted() { .execute_with(|| { // Register with collator_selection assert_ok!(CollatorSelection::set_desired_candidates( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), 10 )); assert_ok!(Session::set_keys( // type of keys doesn't matter, we only want to have the collator registered - Origin::signed(WHITELISTED_ACCOUNT_ID), + RuntimeOrigin::signed(WHITELISTED_ACCOUNT_ID), UintAuthorityId(123).into(), vec![] )); assert_ok!(CollatorSelection::register_candidate( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), WHITELISTED_ACCOUNT_ID )); // Migrate assert_ok!(ParachainStaking::join_candidates( - Origin::signed(WHITELISTED_ACCOUNT_ID), + RuntimeOrigin::signed(WHITELISTED_ACCOUNT_ID), 1u128, 6u32 )); @@ -780,7 +823,7 @@ fn non_whitelisted_candidate_cant_join_with_smaller_bond() { assert_noop!( // Note: 7 is NOT registered as collators_selection candidate in mock ParachainStaking::join_candidates( - Origin::signed(NON_WHITELISTED_ACCOUNT_ID), + RuntimeOrigin::signed(NON_WHITELISTED_ACCOUNT_ID), 1u128, 6u32 ), @@ -797,41 +840,41 @@ fn cannot_join_candidates_with_smaller_bond_twice_if_whitelisted() { .execute_with(|| { // Register with collator_selection assert_ok!(CollatorSelection::set_desired_candidates( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), 10 )); assert_ok!(Session::set_keys( - Origin::signed(WHITELISTED_ACCOUNT_ID), + RuntimeOrigin::signed(WHITELISTED_ACCOUNT_ID), UintAuthorityId(7).into(), vec![] )); assert_ok!(CollatorSelection::register_candidate( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), WHITELISTED_ACCOUNT_ID )); // Migrate assert_ok!(ParachainStaking::join_candidates( - Origin::signed(WHITELISTED_ACCOUNT_ID), + RuntimeOrigin::signed(WHITELISTED_ACCOUNT_ID), 1u128, 6u32 )); assert!(CollatorSelection::candidates().is_empty()); // leave the candidate set assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(WHITELISTED_ACCOUNT_ID), + RuntimeOrigin::signed(WHITELISTED_ACCOUNT_ID), 6u32 )); // Forward the chain let _ = roll_to_round_end(5); assert_ok!(ParachainStaking::execute_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), WHITELISTED_ACCOUNT_ID, 6 )); // attempt to reenter assert_noop!( ParachainStaking::join_candidates( - Origin::signed(WHITELISTED_ACCOUNT_ID), + RuntimeOrigin::signed(WHITELISTED_ACCOUNT_ID), 1u128, 1u32 ), @@ -848,54 +891,54 @@ fn cannot_reduce_bond_between_1_and_10() { .execute_with(|| { // Register with collator_selection assert_ok!(CollatorSelection::set_desired_candidates( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), 10 )); assert_ok!(Session::set_keys( // type of keys doesn't matter, we only want to have the collator registered - Origin::signed(WHITELISTED_ACCOUNT_ID), + RuntimeOrigin::signed(WHITELISTED_ACCOUNT_ID), UintAuthorityId(123).into(), vec![] )); assert_ok!(CollatorSelection::register_candidate( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), WHITELISTED_ACCOUNT_ID )); // Migrate assert_ok!(ParachainStaking::join_candidates( - Origin::signed(WHITELISTED_ACCOUNT_ID), + RuntimeOrigin::signed(WHITELISTED_ACCOUNT_ID), 1u128, 6u32 )); assert!(CollatorSelection::candidates().is_empty()); // Bond more assert_ok!(ParachainStaking::candidate_bond_more( - Origin::signed(WHITELISTED_ACCOUNT_ID), + RuntimeOrigin::signed(WHITELISTED_ACCOUNT_ID), 5u128 )); // attempt to bond less assert_noop!( ParachainStaking::schedule_candidate_bond_less( - Origin::signed(WHITELISTED_ACCOUNT_ID), + RuntimeOrigin::signed(WHITELISTED_ACCOUNT_ID), 2u128 ), Error::::CandidateBondBelowMin ); // Bond more assert_ok!(ParachainStaking::candidate_bond_more( - Origin::signed(WHITELISTED_ACCOUNT_ID), + RuntimeOrigin::signed(WHITELISTED_ACCOUNT_ID), 5u128 )); // attempt to bond less assert_noop!( ParachainStaking::schedule_candidate_bond_less( - Origin::signed(WHITELISTED_ACCOUNT_ID), + RuntimeOrigin::signed(WHITELISTED_ACCOUNT_ID), 2u128 ), Error::::CandidateBondBelowMin ); assert_ok!(ParachainStaking::schedule_candidate_bond_less( - Origin::signed(WHITELISTED_ACCOUNT_ID), + RuntimeOrigin::signed(WHITELISTED_ACCOUNT_ID), 1u128 )); }); @@ -909,34 +952,34 @@ fn can_reduce_bond_to_10() { .execute_with(|| { // Register with collator_selection assert_ok!(CollatorSelection::set_desired_candidates( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), 10 )); assert_ok!(Session::set_keys( // type of keys doesn't matter, we only want to have the collator registered - Origin::signed(WHITELISTED_ACCOUNT_ID), + RuntimeOrigin::signed(WHITELISTED_ACCOUNT_ID), UintAuthorityId(123).into(), vec![] )); assert_ok!(CollatorSelection::register_candidate( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), WHITELISTED_ACCOUNT_ID )); // Migrate assert_ok!(ParachainStaking::join_candidates( - Origin::signed(WHITELISTED_ACCOUNT_ID), + RuntimeOrigin::signed(WHITELISTED_ACCOUNT_ID), 1u128, 6u32 )); assert!(CollatorSelection::candidates().is_empty()); // Bond more 1 + 10 = 11 assert_ok!(ParachainStaking::candidate_bond_more( - Origin::signed(WHITELISTED_ACCOUNT_ID), + RuntimeOrigin::signed(WHITELISTED_ACCOUNT_ID), 10u128 )); // attempt to bond less -> 11 - 1 = 10 assert_ok!(ParachainStaking::schedule_candidate_bond_less( - Origin::signed(WHITELISTED_ACCOUNT_ID), + RuntimeOrigin::signed(WHITELISTED_ACCOUNT_ID), 1u128 )); }); @@ -950,35 +993,35 @@ fn cant_reduce_bond_below_10() { .execute_with(|| { // Register with collator_selection assert_ok!(CollatorSelection::set_desired_candidates( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), 10 )); assert_ok!(Session::set_keys( // type of keys doesn't matter, we only want to have the collator registered - Origin::signed(WHITELISTED_ACCOUNT_ID), + RuntimeOrigin::signed(WHITELISTED_ACCOUNT_ID), UintAuthorityId(123).into(), vec![] )); assert_ok!(CollatorSelection::register_candidate( - Origin::signed(RootAccount::get()), + RuntimeOrigin::signed(RootAccount::get()), WHITELISTED_ACCOUNT_ID )); // Migrate assert_ok!(ParachainStaking::join_candidates( - Origin::signed(WHITELISTED_ACCOUNT_ID), + RuntimeOrigin::signed(WHITELISTED_ACCOUNT_ID), 1u128, 6u32 )); assert!(CollatorSelection::candidates().is_empty()); // Bond more 1 + 10 = 11 assert_ok!(ParachainStaking::candidate_bond_more( - Origin::signed(WHITELISTED_ACCOUNT_ID), + RuntimeOrigin::signed(WHITELISTED_ACCOUNT_ID), 10u128 )); // attempt to bond less -> 11 - 3 = 8 assert_noop!( ParachainStaking::schedule_candidate_bond_less( - Origin::signed(WHITELISTED_ACCOUNT_ID), + RuntimeOrigin::signed(WHITELISTED_ACCOUNT_ID), 3u128 ), Error::::CandidateBondBelowMin @@ -996,7 +1039,7 @@ fn cannot_join_candidates_if_delegator() { .build() .execute_with(|| { assert_noop!( - ParachainStaking::join_candidates(Origin::signed(2), 10u128, 1u32), + ParachainStaking::join_candidates(RuntimeOrigin::signed(2), 10u128, 1u32), Error::::DelegatorExists ); }); @@ -1009,7 +1052,7 @@ fn cannot_join_candidates_without_min_bond() { .build() .execute_with(|| { assert_noop!( - ParachainStaking::join_candidates(Origin::signed(1), 9u128, 100u32), + ParachainStaking::join_candidates(RuntimeOrigin::signed(1), 9u128, 100u32), Error::::CandidateBondBelowMin ); }); @@ -1022,7 +1065,7 @@ fn cannot_join_candidates_with_more_than_available_balance() { .build() .execute_with(|| { assert_noop!( - ParachainStaking::join_candidates(Origin::signed(1), 501u128, 100u32), + ParachainStaking::join_candidates(RuntimeOrigin::signed(1), 501u128, 100u32), DispatchError::Module(ModuleError { index: 2, error: [8, 0, 0, 0], @@ -1041,7 +1084,7 @@ fn insufficient_join_candidates_weight_hint_fails() { .execute_with(|| { for i in 0..5 { assert_noop!( - ParachainStaking::join_candidates(Origin::signed(6), 20, i), + ParachainStaking::join_candidates(RuntimeOrigin::signed(6), 20, i), Error::::TooLowCandidateCountWeightHintJoinCandidates ); } @@ -1068,7 +1111,7 @@ fn sufficient_join_candidates_weight_hint_succeeds() { let mut count = 5u32; for i in 6..10 { assert_ok!(ParachainStaking::join_candidates( - Origin::signed(i), + RuntimeOrigin::signed(i), 20, count )); @@ -1087,7 +1130,7 @@ fn leave_candidates_event_emits_correctly() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1u32 )); assert_last_event!(MetaEvent::ParachainStaking(Event::CandidateScheduledExit { @@ -1107,7 +1150,7 @@ fn leave_candidates_removes_candidate_from_candidate_pool() { .execute_with(|| { assert_eq!(ParachainStaking::candidate_pool().0.len(), 1); assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1u32 )); assert!(ParachainStaking::candidate_pool().0.is_empty()); @@ -1118,7 +1161,7 @@ fn leave_candidates_removes_candidate_from_candidate_pool() { fn cannot_leave_candidates_if_not_candidate() { ExtBuilder::default().build().execute_with(|| { assert_noop!( - ParachainStaking::schedule_leave_candidates(Origin::signed(1), 1u32), + ParachainStaking::schedule_leave_candidates(RuntimeOrigin::signed(1), 1u32), Error::::CandidateDNE ); }); @@ -1132,11 +1175,11 @@ fn cannot_leave_candidates_if_already_leaving_candidates() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1u32 )); assert_noop!( - ParachainStaking::schedule_leave_candidates(Origin::signed(1), 1u32), + ParachainStaking::schedule_leave_candidates(RuntimeOrigin::signed(1), 1u32), Error::::CandidateAlreadyLeaving ); }); @@ -1151,7 +1194,7 @@ fn insufficient_leave_candidates_weight_hint_fails() { .execute_with(|| { for i in 1..6 { assert_noop!( - ParachainStaking::schedule_leave_candidates(Origin::signed(i), 4u32), + ParachainStaking::schedule_leave_candidates(RuntimeOrigin::signed(i), 4u32), Error::::TooLowCandidateCountToLeaveCandidates ); } @@ -1168,7 +1211,7 @@ fn sufficient_leave_candidates_weight_hint_succeeds() { let mut count = 5u32; for i in 1..6 { assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(i), + RuntimeOrigin::signed(i), count )); count -= 1u32; @@ -1186,12 +1229,12 @@ fn execute_leave_candidates_emits_event() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1u32 )); roll_to(10); assert_ok!(ParachainStaking::execute_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1, 0 )); @@ -1211,12 +1254,12 @@ fn execute_leave_candidates_callable_by_any_signed() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1u32 )); roll_to(10); assert_ok!(ParachainStaking::execute_leave_candidates( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 0 )); @@ -1232,18 +1275,18 @@ fn execute_leave_candidates_requires_correct_weight_hint() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1u32 )); roll_to(10); for i in 0..3 { assert_noop!( - ParachainStaking::execute_leave_candidates(Origin::signed(1), 1, i), + ParachainStaking::execute_leave_candidates(RuntimeOrigin::signed(1), 1, i), Error::::TooLowCandidateDelegationCountToLeaveCandidates ); } assert_ok!(ParachainStaking::execute_leave_candidates( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 3 )); @@ -1259,12 +1302,12 @@ fn execute_leave_candidates_unreserves_balance() { .execute_with(|| { assert_eq!(ParachainStaking::get_collator_stakable_free_balance(&1), 0); assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1u32 )); roll_to(10); assert_ok!(ParachainStaking::execute_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1, 0 )); @@ -1281,12 +1324,12 @@ fn execute_leave_candidates_decreases_total_staked() { .execute_with(|| { assert_eq!(ParachainStaking::total(), 10); assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1u32 )); roll_to(10); assert_ok!(ParachainStaking::execute_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1, 0 )); @@ -1302,7 +1345,7 @@ fn execute_leave_candidates_removes_candidate_state() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1u32 )); // candidate state is not immediately removed @@ -1311,7 +1354,7 @@ fn execute_leave_candidates_removes_candidate_state() { assert_eq!(candidate_state.bond, 10u128); roll_to(10); assert_ok!(ParachainStaking::execute_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1, 0 )); @@ -1328,7 +1371,7 @@ fn execute_leave_candidates_removes_pending_delegation_requests() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_delegator_bond_less( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 5 )); @@ -1342,7 +1385,7 @@ fn execute_leave_candidates_removes_pending_delegation_requests() { }], ); assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1u32 )); // candidate state is not immediately removed @@ -1351,7 +1394,7 @@ fn execute_leave_candidates_removes_pending_delegation_requests() { assert_eq!(candidate_state.bond, 10u128); roll_to(10); assert_ok!(ParachainStaking::execute_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1, 1 )); @@ -1377,21 +1420,21 @@ fn cannot_execute_leave_candidates_before_delay() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1u32 )); assert_noop!( - ParachainStaking::execute_leave_candidates(Origin::signed(3), 1, 0), + ParachainStaking::execute_leave_candidates(RuntimeOrigin::signed(3), 1, 0), Error::::CandidateCannotLeaveYet ); roll_to(9); assert_noop!( - ParachainStaking::execute_leave_candidates(Origin::signed(3), 1, 0), + ParachainStaking::execute_leave_candidates(RuntimeOrigin::signed(3), 1, 0), Error::::CandidateCannotLeaveYet ); roll_to(10); assert_ok!(ParachainStaking::execute_leave_candidates( - Origin::signed(3), + RuntimeOrigin::signed(3), 1, 0 )); @@ -1408,11 +1451,11 @@ fn cancel_leave_candidates_emits_event() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1u32 )); assert_ok!(ParachainStaking::cancel_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1 )); assert_last_event!(MetaEvent::ParachainStaking(Event::CancelledCandidateExit { @@ -1429,11 +1472,11 @@ fn cancel_leave_candidates_updates_candidate_state() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1u32 )); assert_ok!(ParachainStaking::cancel_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1 )); let candidate = @@ -1450,11 +1493,11 @@ fn cancel_leave_candidates_adds_to_candidate_pool() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1u32 )); assert_ok!(ParachainStaking::cancel_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1 )); assert_eq!(ParachainStaking::candidate_pool().0[0].owner, 1); @@ -1471,7 +1514,7 @@ fn go_offline_event_emits_correctly() { .with_candidates(vec![(1, 20)]) .build() .execute_with(|| { - assert_ok!(ParachainStaking::go_offline(Origin::signed(1))); + assert_ok!(ParachainStaking::go_offline(RuntimeOrigin::signed(1))); assert_last_event!(MetaEvent::ParachainStaking(Event::CandidateWentOffline { candidate: 1 })); @@ -1486,7 +1529,7 @@ fn go_offline_removes_candidate_from_candidate_pool() { .build() .execute_with(|| { assert_eq!(ParachainStaking::candidate_pool().0.len(), 1); - assert_ok!(ParachainStaking::go_offline(Origin::signed(1))); + assert_ok!(ParachainStaking::go_offline(RuntimeOrigin::signed(1))); assert!(ParachainStaking::candidate_pool().0.is_empty()); }); } @@ -1500,7 +1543,7 @@ fn go_offline_updates_candidate_state_to_idle() { .execute_with(|| { let candidate_state = ParachainStaking::candidate_info(1).expect("is active candidate"); assert_eq!(candidate_state.status, CollatorStatus::Active); - assert_ok!(ParachainStaking::go_offline(Origin::signed(1))); + assert_ok!(ParachainStaking::go_offline(RuntimeOrigin::signed(1))); let candidate_state = ParachainStaking::candidate_info(1).expect("is candidate, just offline"); assert_eq!(candidate_state.status, CollatorStatus::Idle); @@ -1511,7 +1554,7 @@ fn go_offline_updates_candidate_state_to_idle() { fn cannot_go_offline_if_not_candidate() { ExtBuilder::default().build().execute_with(|| { assert_noop!( - ParachainStaking::go_offline(Origin::signed(3)), + ParachainStaking::go_offline(RuntimeOrigin::signed(3)), Error::::CandidateDNE ); }); @@ -1524,9 +1567,9 @@ fn cannot_go_offline_if_already_offline() { .with_candidates(vec![(1, 20)]) .build() .execute_with(|| { - assert_ok!(ParachainStaking::go_offline(Origin::signed(1))); + assert_ok!(ParachainStaking::go_offline(RuntimeOrigin::signed(1))); assert_noop!( - ParachainStaking::go_offline(Origin::signed(1)), + ParachainStaking::go_offline(RuntimeOrigin::signed(1)), Error::::AlreadyOffline ); }); @@ -1541,8 +1584,8 @@ fn go_online_event_emits_correctly() { .with_candidates(vec![(1, 20)]) .build() .execute_with(|| { - assert_ok!(ParachainStaking::go_offline(Origin::signed(1))); - assert_ok!(ParachainStaking::go_online(Origin::signed(1))); + assert_ok!(ParachainStaking::go_offline(RuntimeOrigin::signed(1))); + assert_ok!(ParachainStaking::go_online(RuntimeOrigin::signed(1))); assert_last_event!(MetaEvent::ParachainStaking(Event::CandidateBackOnline { candidate: 1 })); @@ -1556,9 +1599,9 @@ fn go_online_adds_to_candidate_pool() { .with_candidates(vec![(1, 20)]) .build() .execute_with(|| { - assert_ok!(ParachainStaking::go_offline(Origin::signed(1))); + assert_ok!(ParachainStaking::go_offline(RuntimeOrigin::signed(1))); assert!(ParachainStaking::candidate_pool().0.is_empty()); - assert_ok!(ParachainStaking::go_online(Origin::signed(1))); + assert_ok!(ParachainStaking::go_online(RuntimeOrigin::signed(1))); assert_eq!(ParachainStaking::candidate_pool().0[0].owner, 1); assert_eq!(ParachainStaking::candidate_pool().0[0].amount, 20); }); @@ -1571,11 +1614,11 @@ fn go_online_storage_updates_candidate_state() { .with_candidates(vec![(1, 20)]) .build() .execute_with(|| { - assert_ok!(ParachainStaking::go_offline(Origin::signed(1))); + assert_ok!(ParachainStaking::go_offline(RuntimeOrigin::signed(1))); let candidate_state = ParachainStaking::candidate_info(1).expect("offline still exists"); assert_eq!(candidate_state.status, CollatorStatus::Idle); - assert_ok!(ParachainStaking::go_online(Origin::signed(1))); + assert_ok!(ParachainStaking::go_online(RuntimeOrigin::signed(1))); let candidate_state = ParachainStaking::candidate_info(1).expect("online so exists"); assert_eq!(candidate_state.status, CollatorStatus::Active); }); @@ -1585,7 +1628,7 @@ fn go_online_storage_updates_candidate_state() { fn cannot_go_online_if_not_candidate() { ExtBuilder::default().build().execute_with(|| { assert_noop!( - ParachainStaking::go_online(Origin::signed(3)), + ParachainStaking::go_online(RuntimeOrigin::signed(3)), Error::::CandidateDNE ); }); @@ -1599,7 +1642,7 @@ fn cannot_go_online_if_already_online() { .build() .execute_with(|| { assert_noop!( - ParachainStaking::go_online(Origin::signed(1)), + ParachainStaking::go_online(RuntimeOrigin::signed(1)), Error::::AlreadyActive ); }); @@ -1613,11 +1656,11 @@ fn cannot_go_online_if_leaving() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1 )); assert_noop!( - ParachainStaking::go_online(Origin::signed(1)), + ParachainStaking::go_online(RuntimeOrigin::signed(1)), Error::::CannotGoOnlineIfLeaving ); }); @@ -1632,7 +1675,10 @@ fn candidate_bond_more_emits_correct_event() { .with_candidates(vec![(1, 20)]) .build() .execute_with(|| { - assert_ok!(ParachainStaking::candidate_bond_more(Origin::signed(1), 30)); + assert_ok!(ParachainStaking::candidate_bond_more( + RuntimeOrigin::signed(1), + 30 + )); assert_last_event!(MetaEvent::ParachainStaking(Event::CandidateBondedMore { candidate: 1, amount: 30, @@ -1649,7 +1695,10 @@ fn candidate_bond_more_reserves_balance() { .build() .execute_with(|| { assert_eq!(ParachainStaking::get_collator_stakable_free_balance(&1), 30); - assert_ok!(ParachainStaking::candidate_bond_more(Origin::signed(1), 30)); + assert_ok!(ParachainStaking::candidate_bond_more( + RuntimeOrigin::signed(1), + 30 + )); assert_eq!(ParachainStaking::get_collator_stakable_free_balance(&1), 0); }); } @@ -1662,7 +1711,10 @@ fn candidate_bond_more_increases_total() { .build() .execute_with(|| { let mut total = ParachainStaking::total(); - assert_ok!(ParachainStaking::candidate_bond_more(Origin::signed(1), 30)); + assert_ok!(ParachainStaking::candidate_bond_more( + RuntimeOrigin::signed(1), + 30 + )); total += 30; assert_eq!(ParachainStaking::total(), total); }); @@ -1677,7 +1729,10 @@ fn candidate_bond_more_updates_candidate_state() { .execute_with(|| { let candidate_state = ParachainStaking::candidate_info(1).expect("updated => exists"); assert_eq!(candidate_state.bond, 20); - assert_ok!(ParachainStaking::candidate_bond_more(Origin::signed(1), 30)); + assert_ok!(ParachainStaking::candidate_bond_more( + RuntimeOrigin::signed(1), + 30 + )); let candidate_state = ParachainStaking::candidate_info(1).expect("updated => exists"); assert_eq!(candidate_state.bond, 50); }); @@ -1692,7 +1747,10 @@ fn candidate_bond_more_updates_candidate_pool() { .execute_with(|| { assert_eq!(ParachainStaking::candidate_pool().0[0].owner, 1); assert_eq!(ParachainStaking::candidate_pool().0[0].amount, 20); - assert_ok!(ParachainStaking::candidate_bond_more(Origin::signed(1), 30)); + assert_ok!(ParachainStaking::candidate_bond_more( + RuntimeOrigin::signed(1), + 30 + )); assert_eq!(ParachainStaking::candidate_pool().0[0].owner, 1); assert_eq!(ParachainStaking::candidate_pool().0[0].amount, 50); }); @@ -1708,7 +1766,7 @@ fn schedule_candidate_bond_less_event_emits_correctly() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_candidate_bond_less( - Origin::signed(1), + RuntimeOrigin::signed(1), 10 )); assert_last_event!(MetaEvent::ParachainStaking( @@ -1729,11 +1787,11 @@ fn cannot_schedule_candidate_bond_less_if_request_exists() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_candidate_bond_less( - Origin::signed(1), + RuntimeOrigin::signed(1), 5 )); assert_noop!( - ParachainStaking::schedule_candidate_bond_less(Origin::signed(1), 5), + ParachainStaking::schedule_candidate_bond_less(RuntimeOrigin::signed(1), 5), Error::::PendingCandidateRequestAlreadyExists ); }); @@ -1743,7 +1801,7 @@ fn cannot_schedule_candidate_bond_less_if_request_exists() { fn cannot_schedule_candidate_bond_less_if_not_candidate() { ExtBuilder::default().build().execute_with(|| { assert_noop!( - ParachainStaking::schedule_candidate_bond_less(Origin::signed(6), 50), + ParachainStaking::schedule_candidate_bond_less(RuntimeOrigin::signed(6), 50), Error::::CandidateDNE ); }); @@ -1757,7 +1815,7 @@ fn cannot_schedule_candidate_bond_less_if_new_total_below_min_candidate_stk() { .build() .execute_with(|| { assert_noop!( - ParachainStaking::schedule_candidate_bond_less(Origin::signed(1), 21), + ParachainStaking::schedule_candidate_bond_less(RuntimeOrigin::signed(1), 21), Error::::CandidateBondBelowMin ); }); @@ -1771,11 +1829,11 @@ fn can_schedule_candidate_bond_less_if_leaving_candidates() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1 )); assert_ok!(ParachainStaking::schedule_candidate_bond_less( - Origin::signed(1), + RuntimeOrigin::signed(1), 10 )); }); @@ -1789,17 +1847,17 @@ fn cannot_schedule_candidate_bond_less_if_exited_candidates() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1 )); roll_to(10); assert_ok!(ParachainStaking::execute_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1, 0 )); assert_noop!( - ParachainStaking::schedule_candidate_bond_less(Origin::signed(1), 10), + ParachainStaking::schedule_candidate_bond_less(RuntimeOrigin::signed(1), 10), Error::::CandidateDNE ); }); @@ -1815,12 +1873,12 @@ fn execute_candidate_bond_less_emits_correct_event() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_candidate_bond_less( - Origin::signed(1), + RuntimeOrigin::signed(1), 30 )); roll_to(10); assert_ok!(ParachainStaking::execute_candidate_bond_less( - Origin::signed(1), + RuntimeOrigin::signed(1), 1 )); assert_last_event!(MetaEvent::ParachainStaking(Event::CandidateBondedLess { @@ -1840,12 +1898,12 @@ fn execute_candidate_bond_less_unreserves_balance() { .execute_with(|| { assert_eq!(ParachainStaking::get_collator_stakable_free_balance(&1), 0); assert_ok!(ParachainStaking::schedule_candidate_bond_less( - Origin::signed(1), + RuntimeOrigin::signed(1), 10 )); roll_to(10); assert_ok!(ParachainStaking::execute_candidate_bond_less( - Origin::signed(1), + RuntimeOrigin::signed(1), 1 )); assert_eq!(ParachainStaking::get_collator_stakable_free_balance(&1), 10); @@ -1861,12 +1919,12 @@ fn execute_candidate_bond_less_decreases_total() { .execute_with(|| { let mut total = ParachainStaking::total(); assert_ok!(ParachainStaking::schedule_candidate_bond_less( - Origin::signed(1), + RuntimeOrigin::signed(1), 10 )); roll_to(10); assert_ok!(ParachainStaking::execute_candidate_bond_less( - Origin::signed(1), + RuntimeOrigin::signed(1), 1 )); total -= 10; @@ -1884,12 +1942,12 @@ fn execute_candidate_bond_less_updates_candidate_state() { let candidate_state = ParachainStaking::candidate_info(1).expect("updated => exists"); assert_eq!(candidate_state.bond, 30); assert_ok!(ParachainStaking::schedule_candidate_bond_less( - Origin::signed(1), + RuntimeOrigin::signed(1), 10 )); roll_to(10); assert_ok!(ParachainStaking::execute_candidate_bond_less( - Origin::signed(1), + RuntimeOrigin::signed(1), 1 )); let candidate_state = ParachainStaking::candidate_info(1).expect("updated => exists"); @@ -1907,12 +1965,12 @@ fn execute_candidate_bond_less_updates_candidate_pool() { assert_eq!(ParachainStaking::candidate_pool().0[0].owner, 1); assert_eq!(ParachainStaking::candidate_pool().0[0].amount, 30); assert_ok!(ParachainStaking::schedule_candidate_bond_less( - Origin::signed(1), + RuntimeOrigin::signed(1), 10 )); roll_to(10); assert_ok!(ParachainStaking::execute_candidate_bond_less( - Origin::signed(1), + RuntimeOrigin::signed(1), 1 )); assert_eq!(ParachainStaking::candidate_pool().0[0].owner, 1); @@ -1930,11 +1988,11 @@ fn cancel_candidate_bond_less_emits_event() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_candidate_bond_less( - Origin::signed(1), + RuntimeOrigin::signed(1), 10 )); assert_ok!(ParachainStaking::cancel_candidate_bond_less( - Origin::signed(1) + RuntimeOrigin::signed(1) )); assert_last_event!(MetaEvent::ParachainStaking( Event::CancelledCandidateBondLess { @@ -1954,11 +2012,11 @@ fn cancel_candidate_bond_less_updates_candidate_state() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_candidate_bond_less( - Origin::signed(1), + RuntimeOrigin::signed(1), 10 )); assert_ok!(ParachainStaking::cancel_candidate_bond_less( - Origin::signed(1) + RuntimeOrigin::signed(1) )); assert!(ParachainStaking::candidate_info(&1) .unwrap() @@ -1975,11 +2033,11 @@ fn only_candidate_can_cancel_candidate_bond_less_request() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_candidate_bond_less( - Origin::signed(1), + RuntimeOrigin::signed(1), 10 )); assert_noop!( - ParachainStaking::cancel_candidate_bond_less(Origin::signed(2)), + ParachainStaking::cancel_candidate_bond_less(RuntimeOrigin::signed(2)), Error::::CandidateDNE ); }); @@ -1994,7 +2052,13 @@ fn delegate_event_emits_correctly() { .with_candidates(vec![(1, 30)]) .build() .execute_with(|| { - assert_ok!(ParachainStaking::delegate(Origin::signed(2), 1, 10, 0, 0)); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(2), + 1, + 10, + 0, + 0 + )); assert_last_event!(MetaEvent::ParachainStaking(Event::Delegation { delegator: 2, locked_amount: 10, @@ -2015,7 +2079,13 @@ fn delegate_reserves_balance() { ParachainStaking::get_delegator_stakable_free_balance(&2), 10 ); - assert_ok!(ParachainStaking::delegate(Origin::signed(2), 1, 10, 0, 0)); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(2), + 1, + 10, + 0, + 0 + )); assert_eq!(ParachainStaking::get_delegator_stakable_free_balance(&2), 0); }); } @@ -2028,7 +2098,13 @@ fn delegate_updates_delegator_state() { .build() .execute_with(|| { assert!(ParachainStaking::delegator_state(2).is_none()); - assert_ok!(ParachainStaking::delegate(Origin::signed(2), 1, 10, 0, 0)); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(2), + 1, + 10, + 0, + 0 + )); let delegator_state = ParachainStaking::delegator_state(2).expect("just delegated => exists"); assert_eq!(delegator_state.total(), 10); @@ -2051,7 +2127,13 @@ fn delegate_updates_collator_state() { ParachainStaking::top_delegations(1).expect("registered in genesis"); assert!(top_delegations.delegations.is_empty()); assert!(top_delegations.total.is_zero()); - assert_ok!(ParachainStaking::delegate(Origin::signed(2), 1, 10, 0, 0)); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(2), + 1, + 10, + 0, + 0 + )); let candidate_state = ParachainStaking::candidate_info(1).expect("just delegated => exists"); assert_eq!(candidate_state.total_counted, 40); @@ -2069,8 +2151,18 @@ fn can_delegate_immediately_after_other_join_candidates() { .with_balances(vec![(1, 20), (2, 20)]) .build() .execute_with(|| { - assert_ok!(ParachainStaking::join_candidates(Origin::signed(1), 20, 0)); - assert_ok!(ParachainStaking::delegate(Origin::signed(2), 1, 20, 0, 0)); + assert_ok!(ParachainStaking::join_candidates( + RuntimeOrigin::signed(1), + 20, + 0 + )); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(2), + 1, + 20, + 0, + 0 + )); }); } @@ -2083,10 +2175,16 @@ fn can_delegate_if_revoking() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); - assert_ok!(ParachainStaking::delegate(Origin::signed(2), 4, 10, 0, 2)); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(2), + 4, + 10, + 0, + 2 + )); }); } @@ -2120,7 +2218,7 @@ fn cannot_delegate_if_full_and_new_delegation_less_than_or_equal_lowest_bottom() .build() .execute_with(|| { assert_noop!( - ParachainStaking::delegate(Origin::signed(11), 1, 10, 8, 0), + ParachainStaking::delegate(RuntimeOrigin::signed(11), 1, 10, 8, 0), Error::::CannotDelegateLessThanOrEqualToLowestBottomWhenFull ); }); @@ -2155,7 +2253,13 @@ fn can_delegate_if_full_and_new_delegation_greater_than_lowest_bottom() { ]) .build() .execute_with(|| { - assert_ok!(ParachainStaking::delegate(Origin::signed(11), 1, 11, 8, 0)); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(11), + 1, + 11, + 8, + 0 + )); assert_event_emitted!(Event::DelegationKicked { delegator: 10, candidate: 1, @@ -2176,10 +2280,16 @@ fn can_still_delegate_if_leaving() { .with_delegations(vec![(2, 1, 10)]) .build() .execute_with(|| { - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - 2 - ))); - assert_ok!(ParachainStaking::delegate(Origin::signed(2), 3, 10, 0, 1),); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(2) + )); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(2), + 3, + 10, + 0, + 1 + ),); }); } @@ -2191,7 +2301,7 @@ fn cannot_delegate_if_candidate() { .build() .execute_with(|| { assert_noop!( - ParachainStaking::delegate(Origin::signed(2), 1, 10, 0, 0), + ParachainStaking::delegate(RuntimeOrigin::signed(2), 1, 10, 0, 0), Error::::CandidateExists ); }); @@ -2206,7 +2316,7 @@ fn cannot_delegate_if_already_delegated() { .build() .execute_with(|| { assert_noop!( - ParachainStaking::delegate(Origin::signed(2), 1, 10, 1, 1), + ParachainStaking::delegate(RuntimeOrigin::signed(2), 1, 10, 1, 1), Error::::AlreadyDelegatedCandidate ); }); @@ -2221,7 +2331,7 @@ fn cannot_delegate_more_than_max_delegations() { .build() .execute_with(|| { assert_noop!( - ParachainStaking::delegate(Origin::signed(2), 6, 10, 0, 4), + ParachainStaking::delegate(RuntimeOrigin::signed(2), 6, 10, 0, 4), Error::::ExceedMaxDelegationsPerDelegator, ); }); @@ -2249,7 +2359,7 @@ fn sufficient_delegate_weight_hint_succeeds() { let mut count = 4u32; for i in 7..11 { assert_ok!(ParachainStaking::delegate( - Origin::signed(i), + RuntimeOrigin::signed(i), 1, 10, count, @@ -2260,7 +2370,7 @@ fn sufficient_delegate_weight_hint_succeeds() { let mut count = 0u32; for i in 3..11 { assert_ok!(ParachainStaking::delegate( - Origin::signed(i), + RuntimeOrigin::signed(i), 2, 10, count, @@ -2293,7 +2403,7 @@ fn insufficient_delegate_weight_hint_fails() { let mut count = 3u32; for i in 7..11 { assert_noop!( - ParachainStaking::delegate(Origin::signed(i), 1, 10, count, 0u32), + ParachainStaking::delegate(RuntimeOrigin::signed(i), 1, 10, count, 0u32), Error::::TooLowCandidateDelegationCountToDelegate ); } @@ -2301,7 +2411,7 @@ fn insufficient_delegate_weight_hint_fails() { count = 4u32; for i in 7..11 { assert_ok!(ParachainStaking::delegate( - Origin::signed(i), + RuntimeOrigin::signed(i), 1, 10, count, @@ -2312,7 +2422,7 @@ fn insufficient_delegate_weight_hint_fails() { count = 0u32; for i in 3..11 { assert_noop!( - ParachainStaking::delegate(Origin::signed(i), 2, 10, count, 0u32), + ParachainStaking::delegate(RuntimeOrigin::signed(i), 2, 10, count, 0u32), Error::::TooLowDelegationCountToDelegate ); count += 1u32; @@ -2330,9 +2440,9 @@ fn schedule_leave_delegators_event_emits_correctly() { .with_delegations(vec![(2, 1, 10)]) .build() .execute_with(|| { - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - 2 - ))); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(2) + )); assert_last_event!(MetaEvent::ParachainStaking(Event::DelegatorExitScheduled { round: 1, delegator: 2, @@ -2349,11 +2459,11 @@ fn cannot_schedule_leave_delegators_if_already_leaving() { .with_delegations(vec![(2, 1, 10)]) .build() .execute_with(|| { - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - 2 - ))); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(2) + )); assert_noop!( - ParachainStaking::schedule_leave_delegators(Origin::signed(2)), + ParachainStaking::schedule_leave_delegators(RuntimeOrigin::signed(2)), Error::::DelegatorAlreadyLeaving ); }); @@ -2367,7 +2477,7 @@ fn cannot_schedule_leave_delegators_if_not_delegator() { .build() .execute_with(|| { assert_noop!( - ParachainStaking::schedule_leave_delegators(Origin::signed(2)), + ParachainStaking::schedule_leave_delegators(RuntimeOrigin::signed(2)), Error::::DelegatorDNE ); }); @@ -2383,12 +2493,12 @@ fn execute_leave_delegators_event_emits_correctly() { .with_delegations(vec![(2, 1, 10)]) .build() .execute_with(|| { - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - 2 - ))); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(2) + )); roll_to(10); assert_ok!(ParachainStaking::execute_leave_delegators( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -2411,12 +2521,12 @@ fn execute_leave_delegators_unreserves_balance() { ParachainStaking::get_delegator_stakable_free_balance(&2), 00 ); - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - 2 - ))); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(2) + )); roll_to(10); assert_ok!(ParachainStaking::execute_leave_delegators( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -2437,12 +2547,12 @@ fn execute_leave_delegators_decreases_total_staked() { .build() .execute_with(|| { assert_eq!(ParachainStaking::total(), 40); - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - 2 - ))); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(2) + )); roll_to(10); assert_ok!(ParachainStaking::execute_leave_delegators( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -2459,12 +2569,12 @@ fn execute_leave_delegators_removes_delegator_state() { .build() .execute_with(|| { assert!(ParachainStaking::delegator_state(2).is_some()); - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - 2 - ))); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(2) + )); roll_to(10); assert_ok!(ParachainStaking::execute_leave_delegators( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -2481,7 +2591,7 @@ fn execute_leave_delegators_removes_pending_delegation_requests() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_delegator_bond_less( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 5 )); @@ -2494,12 +2604,12 @@ fn execute_leave_delegators_removes_pending_delegation_requests() { action: DelegationAction::Decrease(5), }], ); - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - 2 - ))); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(2) + )); roll_to(10); assert_ok!(ParachainStaking::execute_leave_delegators( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -2539,12 +2649,12 @@ fn execute_leave_delegators_removes_delegations_from_collator_state() { .len(), 4usize ); - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - 1 - ))); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(1) + )); roll_to(10); assert_ok!(ParachainStaking::execute_leave_delegators( - Origin::signed(1), + RuntimeOrigin::signed(1), 1, 10 )); @@ -2567,17 +2677,17 @@ fn cannot_execute_leave_delegators_before_delay() { .with_delegations(vec![(2, 1, 10)]) .build() .execute_with(|| { - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - 2 - ))); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(2) + )); assert_noop!( - ParachainStaking::execute_leave_delegators(Origin::signed(2), 2, 1), + ParachainStaking::execute_leave_delegators(RuntimeOrigin::signed(2), 2, 1), Error::::DelegatorCannotLeaveYet ); // can execute after delay roll_to(10); assert_ok!(ParachainStaking::execute_leave_delegators( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -2592,27 +2702,27 @@ fn cannot_execute_leave_delegators_if_single_delegation_revoke_manually_cancelle .with_delegations(vec![(2, 1, 10), (2, 3, 10)]) .build() .execute_with(|| { - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - 2 - ))); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(2) + )); assert_ok!(ParachainStaking::cancel_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 3 )); roll_to(10); assert_noop!( - ParachainStaking::execute_leave_delegators(Origin::signed(2), 2, 2), + ParachainStaking::execute_leave_delegators(RuntimeOrigin::signed(2), 2, 2), Error::::DelegatorNotLeaving ); // can execute after manually scheduling revoke, and the round delay after which // all revokes can be executed assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 3 )); roll_to(20); assert_ok!(ParachainStaking::execute_leave_delegators( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 2 )); @@ -2628,14 +2738,14 @@ fn insufficient_execute_leave_delegators_weight_hint_fails() { .build() .execute_with(|| { for i in 3..7 { - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - i - ))); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(i) + )); } roll_to(10); for i in 3..7 { assert_noop!( - ParachainStaking::execute_leave_delegators(Origin::signed(i), i, 0), + ParachainStaking::execute_leave_delegators(RuntimeOrigin::signed(i), i, 0), Error::::TooLowDelegationCountToLeaveDelegators ); } @@ -2651,14 +2761,14 @@ fn sufficient_execute_leave_delegators_weight_hint_succeeds() { .build() .execute_with(|| { for i in 3..7 { - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - i - ))); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(i) + )); } roll_to(10); for i in 3..7 { assert_ok!(ParachainStaking::execute_leave_delegators( - Origin::signed(i), + RuntimeOrigin::signed(i), i, 1 )); @@ -2676,10 +2786,12 @@ fn cancel_leave_delegators_emits_correct_event() { .with_delegations(vec![(2, 1, 10)]) .build() .execute_with(|| { - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - 2 - ))); - assert_ok!(ParachainStaking::cancel_leave_delegators(Origin::signed(2))); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(2) + )); + assert_ok!(ParachainStaking::cancel_leave_delegators( + RuntimeOrigin::signed(2) + )); assert_last_event!(MetaEvent::ParachainStaking(Event::DelegatorExitCancelled { delegator: 2 })); @@ -2694,10 +2806,12 @@ fn cancel_leave_delegators_updates_delegator_state() { .with_delegations(vec![(2, 1, 10)]) .build() .execute_with(|| { - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - 2 - ))); - assert_ok!(ParachainStaking::cancel_leave_delegators(Origin::signed(2))); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(2) + )); + assert_ok!(ParachainStaking::cancel_leave_delegators( + RuntimeOrigin::signed(2) + )); let delegator = ParachainStaking::delegator_state(&2).expect("just cancelled exit so exists"); assert!(delegator.is_active()); @@ -2712,25 +2826,27 @@ fn cannot_cancel_leave_delegators_if_single_delegation_revoke_manually_cancelled .with_delegations(vec![(2, 1, 10), (2, 3, 10)]) .build() .execute_with(|| { - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - 2 - ))); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(2) + )); assert_ok!(ParachainStaking::cancel_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 3 )); roll_to(10); assert_noop!( - ParachainStaking::cancel_leave_delegators(Origin::signed(2)), + ParachainStaking::cancel_leave_delegators(RuntimeOrigin::signed(2)), Error::::DelegatorNotLeaving ); // can execute after manually scheduling revoke, without waiting for round delay after // which all revokes can be executed assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 3 )); - assert_ok!(ParachainStaking::cancel_leave_delegators(Origin::signed(2))); + assert_ok!(ParachainStaking::cancel_leave_delegators( + RuntimeOrigin::signed(2) + )); }); } @@ -2745,7 +2861,7 @@ fn revoke_delegation_event_emits_correctly() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); assert_last_event!(MetaEvent::ParachainStaking( @@ -2758,7 +2874,7 @@ fn revoke_delegation_event_emits_correctly() { )); roll_to(10); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -2780,12 +2896,12 @@ fn can_revoke_delegation_if_revoking_another_delegation() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); // this is an exit implicitly because last delegation revoked assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 3 )); }); @@ -2799,11 +2915,11 @@ fn delegator_not_allowed_revoke_if_already_leaving() { .with_delegations(vec![(2, 1, 10), (2, 3, 10)]) .build() .execute_with(|| { - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - 2 - ))); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(2) + )); assert_noop!( - ParachainStaking::schedule_revoke_delegation(Origin::signed(2), 3), + ParachainStaking::schedule_revoke_delegation(RuntimeOrigin::signed(2), 3), >::PendingDelegationRequestAlreadyExists, ); }); @@ -2813,7 +2929,7 @@ fn delegator_not_allowed_revoke_if_already_leaving() { fn cannot_revoke_delegation_if_not_delegator() { ExtBuilder::default().build().execute_with(|| { assert_noop!( - ParachainStaking::schedule_revoke_delegation(Origin::signed(2), 1), + ParachainStaking::schedule_revoke_delegation(RuntimeOrigin::signed(2), 1), Error::::DelegatorDNE ); }); @@ -2828,7 +2944,7 @@ fn cannot_revoke_delegation_that_dne() { .build() .execute_with(|| { assert_noop!( - ParachainStaking::schedule_revoke_delegation(Origin::signed(2), 3), + ParachainStaking::schedule_revoke_delegation(RuntimeOrigin::signed(2), 3), Error::::DelegationDNE ); }); @@ -2845,7 +2961,7 @@ fn can_schedule_revoke_delegation_below_min_delegator_stake() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); }); @@ -2863,7 +2979,7 @@ fn delegator_bond_more_reserves_balance() { .execute_with(|| { assert_eq!(ParachainStaking::get_delegator_stakable_free_balance(&2), 5); assert_ok!(ParachainStaking::delegator_bond_more( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 5 )); @@ -2881,7 +2997,7 @@ fn delegator_bond_more_increases_total_staked() { .execute_with(|| { assert_eq!(ParachainStaking::total(), 40); assert_ok!(ParachainStaking::delegator_bond_more( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 5 )); @@ -2904,7 +3020,7 @@ fn delegator_bond_more_updates_delegator_state() { 10 ); assert_ok!(ParachainStaking::delegator_bond_more( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 5 )); @@ -2935,7 +3051,7 @@ fn delegator_bond_more_updates_candidate_state_top_delegations() { ); assert_eq!(ParachainStaking::top_delegations(1).unwrap().total, 10); assert_ok!(ParachainStaking::delegator_bond_more( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 5 )); @@ -2981,7 +3097,7 @@ fn delegator_bond_more_updates_candidate_state_bottom_delegations() { ); assert_eq!(ParachainStaking::bottom_delegations(1).unwrap().total, 10); assert_ok!(ParachainStaking::delegator_bond_more( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 5 )); @@ -3019,7 +3135,7 @@ fn delegator_bond_more_increases_total() { .execute_with(|| { assert_eq!(ParachainStaking::total(), 40); assert_ok!(ParachainStaking::delegator_bond_more( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 5 )); @@ -3036,11 +3152,11 @@ fn can_delegator_bond_more_for_leaving_candidate() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1 )); assert_ok!(ParachainStaking::delegator_bond_more( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 5 )); @@ -3056,11 +3172,11 @@ fn delegator_bond_more_disallowed_when_revoke_scheduled() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); assert_noop!( - ParachainStaking::delegator_bond_more(Origin::signed(2), 1, 5), + ParachainStaking::delegator_bond_more(RuntimeOrigin::signed(2), 1, 5), >::PendingDelegationRevoke ); }); @@ -3075,12 +3191,12 @@ fn delegator_bond_more_allowed_when_bond_decrease_scheduled() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_delegator_bond_less( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 5, )); assert_ok!(ParachainStaking::delegator_bond_more( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 5 )); @@ -3098,7 +3214,7 @@ fn delegator_bond_less_event_emits_correctly() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_delegator_bond_less( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 5 )); @@ -3122,7 +3238,7 @@ fn delegator_bond_less_updates_delegator_state() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_delegator_bond_less( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 5 )); @@ -3146,11 +3262,11 @@ fn delegator_not_allowed_bond_less_if_leaving() { .with_delegations(vec![(2, 1, 10)]) .build() .execute_with(|| { - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - 2 - ))); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(2) + )); assert_noop!( - ParachainStaking::schedule_delegator_bond_less(Origin::signed(2), 1, 1), + ParachainStaking::schedule_delegator_bond_less(RuntimeOrigin::signed(2), 1, 1), >::PendingDelegationRequestAlreadyExists, ); }); @@ -3165,11 +3281,11 @@ fn cannot_delegator_bond_less_if_revoking() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); assert_noop!( - ParachainStaking::schedule_delegator_bond_less(Origin::signed(2), 1, 1), + ParachainStaking::schedule_delegator_bond_less(RuntimeOrigin::signed(2), 1, 1), Error::::PendingDelegationRequestAlreadyExists ); }); @@ -3179,7 +3295,7 @@ fn cannot_delegator_bond_less_if_revoking() { fn cannot_delegator_bond_less_if_not_delegator() { ExtBuilder::default().build().execute_with(|| { assert_noop!( - ParachainStaking::schedule_delegator_bond_less(Origin::signed(2), 1, 5), + ParachainStaking::schedule_delegator_bond_less(RuntimeOrigin::signed(2), 1, 5), Error::::DelegatorDNE ); }); @@ -3194,7 +3310,7 @@ fn cannot_delegator_bond_less_if_candidate_dne() { .build() .execute_with(|| { assert_noop!( - ParachainStaking::schedule_delegator_bond_less(Origin::signed(2), 3, 5), + ParachainStaking::schedule_delegator_bond_less(RuntimeOrigin::signed(2), 3, 5), Error::::DelegationDNE ); }); @@ -3209,7 +3325,7 @@ fn cannot_delegator_bond_less_if_delegation_dne() { .build() .execute_with(|| { assert_noop!( - ParachainStaking::schedule_delegator_bond_less(Origin::signed(2), 3, 5), + ParachainStaking::schedule_delegator_bond_less(RuntimeOrigin::signed(2), 3, 5), Error::::DelegationDNE ); }); @@ -3224,7 +3340,7 @@ fn cannot_delegator_bond_less_below_min_collator_stk() { .build() .execute_with(|| { assert_noop!( - ParachainStaking::schedule_delegator_bond_less(Origin::signed(2), 1, 6), + ParachainStaking::schedule_delegator_bond_less(RuntimeOrigin::signed(2), 1, 6), Error::::DelegatorBondBelowMin ); }); @@ -3239,7 +3355,7 @@ fn cannot_delegator_bond_less_more_than_total_delegation() { .build() .execute_with(|| { assert_noop!( - ParachainStaking::schedule_delegator_bond_less(Origin::signed(2), 1, 11), + ParachainStaking::schedule_delegator_bond_less(RuntimeOrigin::signed(2), 1, 11), Error::::DelegatorBondBelowMin ); }); @@ -3254,7 +3370,7 @@ fn cannot_delegator_bond_less_below_min_delegation() { .build() .execute_with(|| { assert_noop!( - ParachainStaking::schedule_delegator_bond_less(Origin::signed(2), 1, 8), + ParachainStaking::schedule_delegator_bond_less(RuntimeOrigin::signed(2), 1, 8), Error::::DelegationBelowMin ); }); @@ -3274,12 +3390,12 @@ fn execute_revoke_delegation_emits_exit_event_if_exit_happens() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); roll_to(10); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -3305,25 +3421,25 @@ fn cannot_execute_revoke_delegation_below_min_delegator_stake() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); roll_to(10); assert_noop!( - ParachainStaking::execute_delegation_request(Origin::signed(2), 2, 1), + ParachainStaking::execute_delegation_request(RuntimeOrigin::signed(2), 2, 1), Error::::DelegatorBondBelowMin ); // but delegator can cancel the request and request to leave instead: assert_ok!(ParachainStaking::cancel_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - 2 - ))); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(2) + )); roll_to(20); assert_ok!(ParachainStaking::execute_leave_delegators( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 2 )); @@ -3340,12 +3456,12 @@ fn revoke_delegation_executes_exit_if_last_delegation() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); roll_to(10); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -3371,12 +3487,12 @@ fn execute_revoke_delegation_emits_correct_event() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); roll_to(10); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -3399,12 +3515,12 @@ fn execute_revoke_delegation_unreserves_balance() { .execute_with(|| { assert_eq!(ParachainStaking::get_delegator_stakable_free_balance(&2), 0); assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); roll_to(10); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -3427,7 +3543,7 @@ fn execute_revoke_delegation_adds_revocation_to_delegator_state() { .iter() .any(|x| x.delegator == 2)); assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); assert!(ParachainStaking::delegation_scheduled_requests(&1) @@ -3445,12 +3561,12 @@ fn execute_revoke_delegation_removes_revocation_from_delegator_state_upon_execut .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); roll_to(10); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -3469,12 +3585,12 @@ fn execute_revoke_delegation_removes_revocation_from_state_for_single_delegation .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); roll_to(10); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -3497,12 +3613,12 @@ fn execute_revoke_delegation_decreases_total_staked() { .execute_with(|| { assert_eq!(ParachainStaking::total(), 40); assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); roll_to(10); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -3520,14 +3636,14 @@ fn execute_revoke_delegation_for_last_delegation_removes_delegator_state() { .execute_with(|| { assert!(ParachainStaking::delegator_state(2).is_some()); assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); roll_to(10); // this will be confusing for people // if status is leaving, then execute_delegation_request works if last delegation assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -3550,12 +3666,12 @@ fn execute_revoke_delegation_removes_delegation_from_candidate_state() { 1u32 ); assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); roll_to(10); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -3575,17 +3691,17 @@ fn can_execute_revoke_delegation_for_leaving_candidate() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1 )); assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); roll_to(10); // can execute delegation request for leaving candidate assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -3601,17 +3717,17 @@ fn can_execute_leave_candidates_if_revoking_candidate() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1 )); assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); roll_to(10); // revocation executes during execute leave candidates (callable by anyone) assert_ok!(ParachainStaking::execute_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1, 1 )); @@ -3630,17 +3746,17 @@ fn delegator_bond_more_after_revoke_delegation_does_not_effect_exit() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); assert_ok!(ParachainStaking::delegator_bond_more( - Origin::signed(2), + RuntimeOrigin::signed(2), 3, 10 )); roll_to(100); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -3661,7 +3777,7 @@ fn delegator_bond_less_after_revoke_delegation_does_not_effect_exit() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); assert_last_event!(MetaEvent::ParachainStaking( @@ -3673,22 +3789,22 @@ fn delegator_bond_less_after_revoke_delegation_does_not_effect_exit() { } )); assert_noop!( - ParachainStaking::schedule_delegator_bond_less(Origin::signed(2), 1, 2), + ParachainStaking::schedule_delegator_bond_less(RuntimeOrigin::signed(2), 1, 2), Error::::PendingDelegationRequestAlreadyExists ); assert_ok!(ParachainStaking::schedule_delegator_bond_less( - Origin::signed(2), + RuntimeOrigin::signed(2), 3, 2 )); roll_to(10); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 3 )); @@ -3718,13 +3834,13 @@ fn execute_delegator_bond_less_unreserves_balance() { .execute_with(|| { assert_eq!(ParachainStaking::get_delegator_stakable_free_balance(&2), 0); assert_ok!(ParachainStaking::schedule_delegator_bond_less( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 5 )); roll_to(10); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -3742,13 +3858,13 @@ fn execute_delegator_bond_less_decreases_total_staked() { .execute_with(|| { assert_eq!(ParachainStaking::total(), 40); assert_ok!(ParachainStaking::schedule_delegator_bond_less( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 5 )); roll_to(10); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -3771,13 +3887,13 @@ fn execute_delegator_bond_less_updates_delegator_state() { 10 ); assert_ok!(ParachainStaking::schedule_delegator_bond_less( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 5 )); roll_to(10); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -3807,13 +3923,13 @@ fn execute_delegator_bond_less_updates_candidate_state() { 10 ); assert_ok!(ParachainStaking::schedule_delegator_bond_less( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 5 )); roll_to(10); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -3838,13 +3954,13 @@ fn execute_delegator_bond_less_decreases_total() { .execute_with(|| { assert_eq!(ParachainStaking::total(), 40); assert_ok!(ParachainStaking::schedule_delegator_bond_less( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 5 )); roll_to(10); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -3873,13 +3989,13 @@ fn execute_delegator_bond_less_updates_just_bottom_delegations() { let pre_call_bottom_delegations = ParachainStaking::bottom_delegations(&1).expect("delegated by all so exists"); assert_ok!(ParachainStaking::schedule_delegator_bond_less( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 2 )); roll_to(10); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -3949,13 +4065,13 @@ fn execute_delegator_bond_less_does_not_delete_bottom_delegations() { let pre_call_bottom_delegations = ParachainStaking::bottom_delegations(&1).expect("delegated by all so exists"); assert_ok!(ParachainStaking::schedule_delegator_bond_less( - Origin::signed(6), + RuntimeOrigin::signed(6), 1, 4 )); roll_to(10); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(6), + RuntimeOrigin::signed(6), 6, 1 )); @@ -4013,18 +4129,18 @@ fn can_execute_delegator_bond_less_for_leaving_candidate() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(1), + RuntimeOrigin::signed(1), 1 )); assert_ok!(ParachainStaking::schedule_delegator_bond_less( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 5 )); roll_to(10); // can execute bond more delegation request for leaving candidate assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -4043,11 +4159,11 @@ fn cancel_revoke_delegation_emits_correct_event() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); assert_ok!(ParachainStaking::cancel_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); assert_last_event!(MetaEvent::ParachainStaking( @@ -4072,7 +4188,7 @@ fn cancel_revoke_delegation_updates_delegator_state() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); let state = ParachainStaking::delegation_scheduled_requests(&1); @@ -4091,7 +4207,7 @@ fn cancel_revoke_delegation_updates_delegator_state() { 10 ); assert_ok!(ParachainStaking::cancel_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); assert!(!ParachainStaking::delegation_scheduled_requests(&1) @@ -4117,12 +4233,12 @@ fn cancel_delegator_bond_less_correct_event() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_delegator_bond_less( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 5 )); assert_ok!(ParachainStaking::cancel_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); assert_last_event!(MetaEvent::ParachainStaking( @@ -4147,7 +4263,7 @@ fn cancel_delegator_bond_less_updates_delegator_state() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_delegator_bond_less( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 5 )); @@ -4167,7 +4283,7 @@ fn cancel_delegator_bond_less_updates_delegator_state() { 5 ); assert_ok!(ParachainStaking::cancel_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); assert!(!ParachainStaking::delegation_scheduled_requests(&1) @@ -4193,7 +4309,7 @@ fn delegator_schedule_revocation_total() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); assert_eq!( @@ -4204,7 +4320,7 @@ fn delegator_schedule_revocation_total() { ); roll_to(10); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -4214,13 +4330,19 @@ fn delegator_schedule_revocation_total() { .expect("delegator state must exist"), 0 ); - assert_ok!(ParachainStaking::delegate(Origin::signed(2), 5, 10, 0, 2)); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(2), + 5, + 10, + 0, + 2 + )); assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 3 )); assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 4 )); assert_eq!( @@ -4231,7 +4353,7 @@ fn delegator_schedule_revocation_total() { ); roll_to(20); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 3 )); @@ -4242,7 +4364,7 @@ fn delegator_schedule_revocation_total() { 10, ); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 4 )); @@ -4285,7 +4407,7 @@ fn parachain_bond_inflation_reserve_matches_config() { // set parachain bond account so DefaultParachainBondReservePercent = 30% of inflation // is allocated to this account hereafter assert_ok!(ParachainStaking::set_parachain_bond_account( - Origin::root(), + RuntimeOrigin::root(), 11 )); roll_to(8); @@ -4423,16 +4545,16 @@ fn parachain_bond_inflation_reserve_matches_config() { set_author(5, 1, 100); // 1. ensure delegators are paid for 2 rounds after they leave assert_noop!( - ParachainStaking::schedule_leave_delegators(Origin::signed(66)), + ParachainStaking::schedule_leave_delegators(RuntimeOrigin::signed(66)), Error::::DelegatorDNE ); - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - 6 - ))); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(6) + )); // fast forward to block in which delegator 6 exit executes roll_to(25); assert_ok!(ParachainStaking::execute_leave_delegators( - Origin::signed(6), + RuntimeOrigin::signed(6), 6, 10 )); @@ -4607,7 +4729,7 @@ fn parachain_bond_inflation_reserve_matches_config() { assert_eq_events!(expected.clone()); assert_eq!(Balances::free_balance(&11), 65); assert_ok!(ParachainStaking::set_parachain_bond_reserve_percent( - Origin::root(), + RuntimeOrigin::root(), Percent::from_percent(50) )); // 6 won't be paid for this round because they left already @@ -4726,7 +4848,13 @@ fn parachain_bond_inflation_reserve_matches_config() { assert_eq_events!(expected.clone()); assert_eq!(Balances::free_balance(&11), 127); set_author(8, 1, 100); - assert_ok!(ParachainStaking::delegate(Origin::signed(8), 1, 10, 10, 10)); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(8), + 1, + 10, + 10, + 10 + )); roll_to(45); // new delegation is not rewarded yet let mut new5 = vec![ @@ -4936,7 +5064,7 @@ fn paid_collator_commission_matches_config() { ]; assert_eq_events!(expected.clone()); assert_ok!(ParachainStaking::join_candidates( - Origin::signed(4), + RuntimeOrigin::signed(4), 20u128, 100u32 )); @@ -4948,8 +5076,20 @@ fn paid_collator_commission_matches_config() { } )); roll_to(9); - assert_ok!(ParachainStaking::delegate(Origin::signed(5), 4, 10, 10, 10)); - assert_ok!(ParachainStaking::delegate(Origin::signed(6), 4, 10, 10, 10)); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(5), + 4, + 10, + 10, + 10 + )); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(6), + 4, + 10, + 10, + 10 + )); roll_to(11); let mut new = vec![ Event::JoinedCollatorCandidates { @@ -5064,14 +5204,14 @@ fn collator_exit_executes_after_delay() { .execute_with(|| { roll_to(11); assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(2), + RuntimeOrigin::signed(2), 2 )); let info = ParachainStaking::candidate_info(&2).unwrap(); assert_eq!(info.status, CollatorStatus::Leaving(5)); roll_to(21); assert_ok!(ParachainStaking::execute_leave_candidates( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 2 )); @@ -5202,7 +5342,7 @@ fn collator_selection_chooses_top_candidates() { ]; assert_eq_events!(expected.clone()); assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(6), + RuntimeOrigin::signed(6), 6 )); assert_last_event!(MetaEvent::ParachainStaking(Event::CandidateScheduledExit { @@ -5212,12 +5352,12 @@ fn collator_selection_chooses_top_candidates() { })); roll_to(21); assert_ok!(ParachainStaking::execute_leave_candidates( - Origin::signed(6), + RuntimeOrigin::signed(6), 6, 0 )); assert_ok!(ParachainStaking::join_candidates( - Origin::signed(6), + RuntimeOrigin::signed(6), 69u128, 100u32 )); @@ -5780,9 +5920,27 @@ fn multiple_delegations() { }, ]; assert_eq_events!(expected.clone()); - assert_ok!(ParachainStaking::delegate(Origin::signed(6), 2, 10, 10, 10)); - assert_ok!(ParachainStaking::delegate(Origin::signed(6), 3, 10, 10, 10)); - assert_ok!(ParachainStaking::delegate(Origin::signed(6), 4, 10, 10, 10)); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(6), + 2, + 10, + 10, + 10 + )); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(6), + 3, + 10, + 10, + 10 + )); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(6), + 4, + 10, + 10, + 10 + )); roll_to(16); let mut new = vec![ Event::Delegation { @@ -5869,9 +6027,15 @@ fn multiple_delegations() { expected.append(&mut new); assert_eq_events!(expected.clone()); roll_to(21); - assert_ok!(ParachainStaking::delegate(Origin::signed(7), 2, 80, 10, 10)); assert_ok!(ParachainStaking::delegate( - Origin::signed(10), + RuntimeOrigin::signed(7), + 2, + 80, + 10, + 10 + )); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(10), 2, 10, 10, @@ -5957,7 +6121,7 @@ fn multiple_delegations() { expected.append(&mut new2); assert_eq_events!(expected.clone()); assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(2), + RuntimeOrigin::signed(2), 5 )); assert_last_event!(MetaEvent::ParachainStaking(Event::CandidateScheduledExit { @@ -6032,7 +6196,7 @@ fn multiple_delegations() { ); roll_to(40); assert_ok!(ParachainStaking::execute_leave_candidates( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 5 )); @@ -6081,11 +6245,11 @@ fn execute_leave_candidate_removes_delegations() { .any(|x| x.delegator == 3)); assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(2), + RuntimeOrigin::signed(2), 2 )); assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(3), + RuntimeOrigin::signed(3), 2 )); // Verifies the revocation request is present @@ -6095,7 +6259,7 @@ fn execute_leave_candidate_removes_delegations() { roll_to(16); assert_ok!(ParachainStaking::execute_leave_candidates( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 2 )); @@ -6260,16 +6424,16 @@ fn payouts_follow_delegation_changes() { set_author(6, 1, 100); // 1. ensure delegators are paid for 2 rounds after they leave assert_noop!( - ParachainStaking::schedule_leave_delegators(Origin::signed(66)), + ParachainStaking::schedule_leave_delegators(RuntimeOrigin::signed(66)), Error::::DelegatorDNE ); - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - 6 - ))); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(6) + )); // fast forward to block in which delegator 6 exit executes roll_to(25); assert_ok!(ParachainStaking::execute_leave_delegators( - Origin::signed(6), + RuntimeOrigin::signed(6), 6, 10 )); @@ -6532,7 +6696,13 @@ fn payouts_follow_delegation_changes() { expected.append(&mut new4); assert_eq_events!(expected.clone()); set_author(9, 1, 100); - assert_ok!(ParachainStaking::delegate(Origin::signed(8), 1, 10, 10, 10)); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(8), + 1, + 10, + 10, + 10 + )); roll_to(45); // new delegation is not rewarded yet let mut new5 = vec![ @@ -6708,25 +6878,49 @@ fn bottom_delegations_are_empty_when_top_delegations_not_full() { assert!(top_delegations.delegations.is_empty()); assert!(bottom_delegations.delegations.is_empty()); // 1 delegator => 1 top delegator, 0 bottom delegators - assert_ok!(ParachainStaking::delegate(Origin::signed(2), 1, 10, 10, 10)); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(2), + 1, + 10, + 10, + 10 + )); let top_delegations = ParachainStaking::top_delegations(1).unwrap(); let bottom_delegations = ParachainStaking::bottom_delegations(1).unwrap(); assert_eq!(top_delegations.delegations.len(), 1usize); assert!(bottom_delegations.delegations.is_empty()); // 2 delegators => 2 top delegators, 0 bottom delegators - assert_ok!(ParachainStaking::delegate(Origin::signed(3), 1, 10, 10, 10)); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(3), + 1, + 10, + 10, + 10 + )); let top_delegations = ParachainStaking::top_delegations(1).unwrap(); let bottom_delegations = ParachainStaking::bottom_delegations(1).unwrap(); assert_eq!(top_delegations.delegations.len(), 2usize); assert!(bottom_delegations.delegations.is_empty()); // 3 delegators => 3 top delegators, 0 bottom delegators - assert_ok!(ParachainStaking::delegate(Origin::signed(4), 1, 10, 10, 10)); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(4), + 1, + 10, + 10, + 10 + )); let top_delegations = ParachainStaking::top_delegations(1).unwrap(); let bottom_delegations = ParachainStaking::bottom_delegations(1).unwrap(); assert_eq!(top_delegations.delegations.len(), 3usize); assert!(bottom_delegations.delegations.is_empty()); // 4 delegators => 4 top delegators, 0 bottom delegators - assert_ok!(ParachainStaking::delegate(Origin::signed(5), 1, 10, 10, 10)); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(5), + 1, + 10, + 10, + 10 + )); let top_delegations = ParachainStaking::top_delegations(1).unwrap(); let bottom_delegations = ParachainStaking::bottom_delegations(1).unwrap(); assert_eq!(top_delegations.delegations.len(), 4usize); @@ -6776,7 +6970,7 @@ fn candidate_pool_updates_when_total_counted_changes() { // 15 + 16 + 17 + 18 + 20 = 86 (top 4 + self bond) is_candidate_pool_bond(1, 86); assert_ok!(ParachainStaking::delegator_bond_more( - Origin::signed(3), + RuntimeOrigin::signed(3), 1, 8 )); @@ -6784,7 +6978,7 @@ fn candidate_pool_updates_when_total_counted_changes() { // 16 + 17 + 18 + 19 + 20 = 90 (top 4 + self bond) is_candidate_pool_bond(1, 90); assert_ok!(ParachainStaking::delegator_bond_more( - Origin::signed(4), + RuntimeOrigin::signed(4), 1, 8 )); @@ -6792,27 +6986,27 @@ fn candidate_pool_updates_when_total_counted_changes() { // 17 + 18 + 19 + 20 + 20 = 94 (top 4 + self bond) is_candidate_pool_bond(1, 94); assert_ok!(ParachainStaking::schedule_delegator_bond_less( - Origin::signed(10), + RuntimeOrigin::signed(10), 1, 3 )); roll_to(30); // 10: 18 -> 15 => 10 bumped to bottom, 8 bumped to top (- 18 + 16 = -2 for count) assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(10), + RuntimeOrigin::signed(10), 10, 1 )); // 16 + 17 + 19 + 20 + 20 = 92 (top 4 + self bond) is_candidate_pool_bond(1, 92); assert_ok!(ParachainStaking::schedule_delegator_bond_less( - Origin::signed(9), + RuntimeOrigin::signed(9), 1, 4 )); roll_to(40); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(9), + RuntimeOrigin::signed(9), 9, 1 )); @@ -6857,7 +7051,7 @@ fn only_top_collators_are_counted() { assert_eq!(collator_state.total_counted, 86); // bump bottom to the top assert_ok!(ParachainStaking::delegator_bond_more( - Origin::signed(3), + RuntimeOrigin::signed(3), 1, 8 )); @@ -6872,7 +7066,7 @@ fn only_top_collators_are_counted() { assert_eq!(collator_state.total_counted, 90); // bump bottom to the top assert_ok!(ParachainStaking::delegator_bond_more( - Origin::signed(4), + RuntimeOrigin::signed(4), 1, 8 )); @@ -6887,7 +7081,7 @@ fn only_top_collators_are_counted() { assert_eq!(collator_state.total_counted, 94); // bump bottom to the top assert_ok!(ParachainStaking::delegator_bond_more( - Origin::signed(5), + RuntimeOrigin::signed(5), 1, 8 )); @@ -6902,7 +7096,7 @@ fn only_top_collators_are_counted() { assert_eq!(collator_state.total_counted, 98); // bump bottom to the top assert_ok!(ParachainStaking::delegator_bond_more( - Origin::signed(6), + RuntimeOrigin::signed(6), 1, 8 )); @@ -6941,7 +7135,13 @@ fn delegation_events_convey_correct_position() { // 11 + 12 + 13 + 14 + 20 = 70 (top 4 + self bond) assert_eq!(collator1_state.total_counted, 70); // Top delegations are full, new highest delegation is made - assert_ok!(ParachainStaking::delegate(Origin::signed(7), 1, 15, 10, 10)); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(7), + 1, + 15, + 10, + 10 + )); assert_event_emitted!(Event::Delegation { delegator: 7, locked_amount: 15, @@ -6952,7 +7152,13 @@ fn delegation_events_convey_correct_position() { // 12 + 13 + 14 + 15 + 20 = 70 (top 4 + self bond) assert_eq!(collator1_state.total_counted, 74); // New delegation is added to the bottom - assert_ok!(ParachainStaking::delegate(Origin::signed(8), 1, 10, 10, 10)); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(8), + 1, + 10, + 10, + 10 + )); assert_event_emitted!(Event::Delegation { delegator: 8, locked_amount: 10, @@ -6964,7 +7170,7 @@ fn delegation_events_convey_correct_position() { assert_eq!(collator1_state.total_counted, 74); // 8 increases delegation to the top assert_ok!(ParachainStaking::delegator_bond_more( - Origin::signed(8), + RuntimeOrigin::signed(8), 1, 3 )); @@ -6979,7 +7185,7 @@ fn delegation_events_convey_correct_position() { assert_eq!(collator1_state.total_counted, 75); // 3 increases delegation but stays in bottom assert_ok!(ParachainStaking::delegator_bond_more( - Origin::signed(3), + RuntimeOrigin::signed(3), 1, 1 )); @@ -6994,7 +7200,7 @@ fn delegation_events_convey_correct_position() { assert_eq!(collator1_state.total_counted, 75); // 6 decreases delegation but stays in top assert_ok!(ParachainStaking::schedule_delegator_bond_less( - Origin::signed(6), + RuntimeOrigin::signed(6), 1, 2 )); @@ -7006,7 +7212,7 @@ fn delegation_events_convey_correct_position() { }); roll_to(30); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(6), + RuntimeOrigin::signed(6), 6, 1 )); @@ -7021,7 +7227,7 @@ fn delegation_events_convey_correct_position() { assert_eq!(collator1_state.total_counted, 73); // 6 decreases delegation and is bumped to bottom assert_ok!(ParachainStaking::schedule_delegator_bond_less( - Origin::signed(6), + RuntimeOrigin::signed(6), 1, 1 )); @@ -7033,7 +7239,7 @@ fn delegation_events_convey_correct_position() { }); roll_to(40); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(6), + RuntimeOrigin::signed(6), 6, 1 )); @@ -7852,11 +8058,17 @@ fn delegation_kicked_from_bottom_removes_pending_request() { .build() .execute_with(|| { assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); // 10 delegates to full 1 => kicks lowest delegation (2, 19) - assert_ok!(ParachainStaking::delegate(Origin::signed(10), 1, 20, 8, 0)); + assert_ok!(ParachainStaking::delegate( + RuntimeOrigin::signed(10), + 1, + 20, + 8, + 0 + )); // check the event assert_event_emitted!(Event::DelegationKicked { delegator: 2, @@ -7881,7 +8093,7 @@ fn no_selected_candidates_defaults_to_last_round_collators() { // schedule to leave for i in 1..6 { assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(i), + RuntimeOrigin::signed(i), 5 )); } @@ -7895,7 +8107,7 @@ fn no_selected_candidates_defaults_to_last_round_collators() { // execute leave for i in 1..6 { assert_ok!(ParachainStaking::execute_leave_candidates( - Origin::signed(i), + RuntimeOrigin::signed(i), i, 0, )); @@ -7929,7 +8141,7 @@ fn test_delegator_scheduled_for_revoke_is_rewarded_for_previous_rounds_but_not_f (1..=3).for_each(|round| set_author(round, 1, 1)); assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); assert_last_event!(MetaEvent::ParachainStaking( @@ -7999,7 +8211,7 @@ fn test_delegator_scheduled_for_revoke_is_rewarded_when_request_cancelled() { (2..=4).for_each(|round| set_author(round, 1, 1)); assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); assert_last_event!(MetaEvent::ParachainStaking( @@ -8022,7 +8234,7 @@ fn test_delegator_scheduled_for_revoke_is_rewarded_when_request_cancelled() { roll_to_round_begin(2); assert_ok!(ParachainStaking::cancel_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); @@ -8076,7 +8288,7 @@ fn test_delegator_scheduled_for_bond_decrease_is_rewarded_for_previous_rounds_bu (1..=3).for_each(|round| set_author(round, 1, 1)); assert_ok!(ParachainStaking::schedule_delegator_bond_less( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 10, )); @@ -8153,7 +8365,7 @@ fn test_delegator_scheduled_for_bond_decrease_is_rewarded_when_request_cancelled (2..=4).for_each(|round| set_author(round, 1, 1)); assert_ok!(ParachainStaking::schedule_delegator_bond_less( - Origin::signed(2), + RuntimeOrigin::signed(2), 1, 10, )); @@ -8177,7 +8389,7 @@ fn test_delegator_scheduled_for_bond_decrease_is_rewarded_when_request_cancelled roll_to_round_begin(2); assert_ok!(ParachainStaking::cancel_delegation_request( - Origin::signed(2), + RuntimeOrigin::signed(2), 1 )); @@ -8235,9 +8447,9 @@ fn test_delegator_scheduled_for_leave_is_rewarded_for_previous_rounds_but_not_fo // preset rewards for rounds 1, 2 and 3 (1..=3).for_each(|round| set_author(round, 1, 1)); - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - 2 - ),)); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(2), + )); assert_last_event!(MetaEvent::ParachainStaking(Event::DelegatorExitScheduled { round: 1, delegator: 2, @@ -8301,9 +8513,9 @@ fn test_delegator_scheduled_for_leave_is_rewarded_when_request_cancelled() { // preset rewards for rounds 2, 3 and 4 (2..=4).for_each(|round| set_author(round, 1, 1)); - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - 2 - ))); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(2) + )); assert_last_event!(MetaEvent::ParachainStaking(Event::DelegatorExitScheduled { round: 1, delegator: 2, @@ -8320,7 +8532,9 @@ fn test_delegator_scheduled_for_leave_is_rewarded_when_request_cancelled() { ); roll_to_round_begin(2); - assert_ok!(ParachainStaking::cancel_leave_delegators(Origin::signed(2))); + assert_ok!(ParachainStaking::cancel_leave_delegators( + RuntimeOrigin::signed(2) + )); roll_to_round_begin(4); assert_eq_last_events!( @@ -8506,12 +8720,12 @@ fn revoke_last_removes_lock() { // schedule and remove one... assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(3), + RuntimeOrigin::signed(3), 1 )); roll_to_round_begin(3); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(3), + RuntimeOrigin::signed(3), 3, 1 )); @@ -8522,12 +8736,12 @@ fn revoke_last_removes_lock() { // schedule and remove the other... assert_ok!(ParachainStaking::schedule_revoke_delegation( - Origin::signed(3), + RuntimeOrigin::signed(3), 2 )); roll_to_round_begin(5); assert_ok!(ParachainStaking::execute_delegation_request( - Origin::signed(3), + RuntimeOrigin::signed(3), 3, 2 )); @@ -8552,9 +8766,9 @@ fn test_delegator_with_deprecated_status_leaving_can_schedule_leave_delegators_a let state = >::get(2); assert!(matches!(state.unwrap().status, DelegatorStatus::Leaving(_))); - assert_ok!(ParachainStaking::schedule_leave_delegators(Origin::signed( - 2 - ))); + assert_ok!(ParachainStaking::schedule_leave_delegators( + RuntimeOrigin::signed(2) + )); assert!(>::get(1) .iter() .any(|r| r.delegator == 2 && matches!(r.action, DelegationAction::Revoke(_)))); @@ -8586,7 +8800,9 @@ fn test_delegator_with_deprecated_status_leaving_can_cancel_leave_delegators_as_ let state = >::get(2); assert!(matches!(state.unwrap().status, DelegatorStatus::Leaving(_))); - assert_ok!(ParachainStaking::cancel_leave_delegators(Origin::signed(2))); + assert_ok!(ParachainStaking::cancel_leave_delegators( + RuntimeOrigin::signed(2) + )); assert_last_event!(MetaEvent::ParachainStaking(Event::DelegatorExitCancelled { delegator: 2 })); @@ -8615,7 +8831,7 @@ fn test_delegator_with_deprecated_status_leaving_can_execute_leave_delegators_as roll_to(10); assert_ok!(ParachainStaking::execute_leave_delegators( - Origin::signed(2), + RuntimeOrigin::signed(2), 2, 1 )); @@ -8647,7 +8863,7 @@ fn test_delegator_with_deprecated_status_leaving_cannot_execute_leave_delegators assert!(matches!(state.unwrap().status, DelegatorStatus::Leaving(_))); assert_noop!( - ParachainStaking::execute_leave_delegators(Origin::signed(2), 2, 1), + ParachainStaking::execute_leave_delegators(RuntimeOrigin::signed(2), 2, 1), Error::::DelegatorCannotLeaveYet ); }); diff --git a/pallets/parachain-staking/src/traits.rs b/pallets/parachain-staking/src/traits.rs index f95899848..3522ccddd 100644 --- a/pallets/parachain-staking/src/traits.rs +++ b/pallets/parachain-staking/src/traits.rs @@ -16,28 +16,30 @@ //! traits for parachain-staking +use frame_support::pallet_prelude::Weight; + pub trait OnCollatorPayout { fn on_collator_payout( for_round: crate::RoundIndex, collator_id: AccountId, amount: Balance, - ) -> frame_support::pallet_prelude::Weight; + ) -> Weight; } impl OnCollatorPayout for () { fn on_collator_payout( _for_round: crate::RoundIndex, _collator_id: AccountId, _amount: Balance, - ) -> frame_support::pallet_prelude::Weight { - 0 + ) -> Weight { + Weight::zero() } } pub trait OnNewRound { - fn on_new_round(round_index: crate::RoundIndex) -> frame_support::pallet_prelude::Weight; + fn on_new_round(round_index: crate::RoundIndex) -> Weight; } impl OnNewRound for () { - fn on_new_round(_round_index: crate::RoundIndex) -> frame_support::pallet_prelude::Weight { - 0 + fn on_new_round(_round_index: crate::RoundIndex) -> Weight { + Weight::zero() } } diff --git a/pallets/parachain-staking/src/weights.rs b/pallets/parachain-staking/src/weights.rs index 1c26a07b7..dee10f4ca 100644 --- a/pallets/parachain-staking/src/weights.rs +++ b/pallets/parachain-staking/src/weights.rs @@ -83,46 +83,46 @@ pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { // Storage: ParachainStaking InflationConfig (r:1 w:1) fn set_staking_expectations() -> Weight { - (16_968_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(16_968_000) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: ParachainStaking InflationConfig (r:1 w:1) fn set_inflation() -> Weight { - (63_585_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(63_585_000) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) fn set_parachain_bond_account() -> Weight { - (16_440_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(16_440_000) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) fn set_parachain_bond_reserve_percent() -> Weight { - (15_869_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(15_869_000) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: ParachainStaking TotalSelected (r:1 w:1) fn set_total_selected() -> Weight { - (18_789_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(18_789_000) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: ParachainStaking CollatorCommission (r:1 w:1) fn set_collator_commission() -> Weight { - (15_153_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(15_153_000) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: ParachainStaking TotalSelected (r:1 w:0) // Storage: ParachainStaking InflationConfig (r:1 w:1) fn set_blocks_per_round() -> Weight { - (71_381_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(71_381_000) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking DelegatorState (r:1 w:0) @@ -134,20 +134,20 @@ impl WeightInfo for SubstrateWeight { // Storage: ParachainStaking TopDelegations (r:0 w:1) // Storage: ParachainStaking BottomDelegations (r:0 w:1) fn join_candidates(x: u32, ) -> Weight { - (77_739_000 as Weight) + Weight::from_ref_time(77_739_000) // Standard Error: 1_000 - .saturating_add((87_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + .saturating_add(Weight::from_ref_time(87_000).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(7_u64)) + .saturating_add(T::DbWeight::get().writes(7_u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn schedule_leave_candidates(x: u32, ) -> Weight { - (61_536_000 as Weight) + Weight::from_ref_time(61_536_000) // Standard Error: 1_000 - .saturating_add((63_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(63_000).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking TopDelegations (r:1 w:1) @@ -158,36 +158,36 @@ impl WeightInfo for SubstrateWeight { // Storage: ParachainStaking BottomDelegations (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn execute_leave_candidates(x: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0) // Standard Error: 62_000 - .saturating_add((28_397_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(x as Weight))) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(x as Weight))) + .saturating_add(Weight::from_ref_time(28_397_000).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(x as u64))) + .saturating_add(T::DbWeight::get().writes(4_u64)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(x as u64))) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn cancel_leave_candidates(x: u32, ) -> Weight { - (54_676_000 as Weight) + Weight::from_ref_time(54_676_000) // Standard Error: 1_000 - .saturating_add((74_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(74_000).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn go_offline() -> Weight { - (25_944_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(25_944_000) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn go_online() -> Weight { - (26_438_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(26_438_000) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: System Account (r:1 w:1) @@ -195,15 +195,15 @@ impl WeightInfo for SubstrateWeight { // Storage: Balances Locks (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn candidate_bond_more() -> Weight { - (43_464_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(43_464_000) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(5_u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) fn schedule_candidate_bond_less() -> Weight { - (23_295_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(23_295_000) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) @@ -211,15 +211,15 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn execute_candidate_bond_less() -> Weight { - (53_733_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(53_733_000) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(5_u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) fn cancel_candidate_bond_less() -> Weight { - (16_037_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(16_037_000) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: System Account (r:1 w:1) // Storage: ParachainStaking DelegatorState (r:1 w:1) @@ -229,20 +229,20 @@ impl WeightInfo for SubstrateWeight { // Storage: Balances Locks (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn delegate(x: u32, y: u32, ) -> Weight { - (68_850_000 as Weight) + Weight::from_ref_time(68_850_000) // Standard Error: 7_000 - .saturating_add((562_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(Weight::from_ref_time(562_000).saturating_mul(x as u64)) // Standard Error: 1_000 - .saturating_add((317_000 as Weight).saturating_mul(y as Weight)) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + .saturating_add(Weight::from_ref_time(317_000).saturating_mul(y as u64)) + .saturating_add(T::DbWeight::get().reads(7_u64)) + .saturating_add(T::DbWeight::get().writes(7_u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn schedule_leave_delegators() -> Weight { - (30_861_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(30_861_000) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) @@ -253,27 +253,27 @@ impl WeightInfo for SubstrateWeight { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn execute_leave_delegators(x: u32, ) -> Weight { - (34_828_000 as Weight) + Weight::from_ref_time(34_828_000) // Standard Error: 60_000 - .saturating_add((24_273_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(x as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(x as Weight))) + .saturating_add(Weight::from_ref_time(24_273_000).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(x as u64))) + .saturating_add(T::DbWeight::get().writes(2_u64)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(x as u64))) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn cancel_leave_delegators() -> Weight { - (29_158_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(29_158_000) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn schedule_revoke_delegation() -> Weight { - (28_758_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(28_758_000) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:0) // Storage: ParachainStaking DelegatorState (r:1 w:1) @@ -284,16 +284,16 @@ impl WeightInfo for SubstrateWeight { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn delegator_bond_more() -> Weight { - (60_205_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(60_205_000) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(7_u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn schedule_delegator_bond_less() -> Weight { - (31_416_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(31_416_000) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) @@ -304,9 +304,9 @@ impl WeightInfo for SubstrateWeight { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn execute_revoke_delegation() -> Weight { - (79_435_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(79_435_000) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(8_u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) @@ -317,23 +317,23 @@ impl WeightInfo for SubstrateWeight { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn execute_delegator_bond_less() -> Weight { - (69_937_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(69_937_000) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(8_u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn cancel_revoke_delegation() -> Weight { - (22_521_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(22_521_000) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn cancel_delegator_bond_less() -> Weight { - (27_918_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(27_918_000) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: ParachainStaking Points (r:1 w:0) // Storage: ParachainStaking Staked (r:1 w:2) @@ -352,12 +352,12 @@ impl WeightInfo for SubstrateWeight { // Storage: ParachainStaking SelectedCandidates (r:0 w:1) // Storage: ParachainStaking DelayedPayouts (r:0 w:1) fn round_transition_on_initialize(x: u32, _y: u32, ) -> Weight { - (1_707_396_000 as Weight) + Weight::from_ref_time(1_707_396_000) // Standard Error: 331_000 - .saturating_add((1_854_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(126 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(x as Weight))) - .saturating_add(T::DbWeight::get().writes(122 as Weight)) + .saturating_add(Weight::from_ref_time(1_854_000).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(126_u64)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(x as u64))) + .saturating_add(T::DbWeight::get().writes(122_u64)) } // Storage: ParachainStaking DelayedPayouts (r:1 w:0) // Storage: ParachainStaking Points (r:1 w:0) @@ -365,16 +365,16 @@ impl WeightInfo for SubstrateWeight { // Storage: ParachainStaking AtStake (r:1 w:1) // Storage: System Account (r:1 w:1) fn pay_one_collator_reward(y: u32, ) -> Weight { - (47_386_000 as Weight) + Weight::from_ref_time(47_386_000) // Standard Error: 14_000 - .saturating_add((13_544_000 as Weight).saturating_mul(y as Weight)) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(y as Weight))) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(y as Weight))) + .saturating_add(Weight::from_ref_time(13_544_000).saturating_mul(y as u64)) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(y as u64))) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(y as u64))) } fn base_on_initialize() -> Weight { - (3_118_000 as Weight) + Weight::from_ref_time(3_118_000) } } @@ -382,46 +382,46 @@ impl WeightInfo for SubstrateWeight { impl WeightInfo for () { // Storage: ParachainStaking InflationConfig (r:1 w:1) fn set_staking_expectations() -> Weight { - (16_968_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(16_968_000) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: ParachainStaking InflationConfig (r:1 w:1) fn set_inflation() -> Weight { - (63_585_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(63_585_000) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) fn set_parachain_bond_account() -> Weight { - (16_440_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(16_440_000) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) fn set_parachain_bond_reserve_percent() -> Weight { - (15_869_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(15_869_000) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: ParachainStaking TotalSelected (r:1 w:1) fn set_total_selected() -> Weight { - (18_789_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(18_789_000) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: ParachainStaking CollatorCommission (r:1 w:1) fn set_collator_commission() -> Weight { - (15_153_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(15_153_000) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: ParachainStaking TotalSelected (r:1 w:0) // Storage: ParachainStaking InflationConfig (r:1 w:1) fn set_blocks_per_round() -> Weight { - (71_381_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(71_381_000) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking DelegatorState (r:1 w:0) @@ -433,20 +433,20 @@ impl WeightInfo for () { // Storage: ParachainStaking TopDelegations (r:0 w:1) // Storage: ParachainStaking BottomDelegations (r:0 w:1) fn join_candidates(x: u32, ) -> Weight { - (77_739_000 as Weight) + Weight::from_ref_time(77_739_000) // Standard Error: 1_000 - .saturating_add((87_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(7 as Weight)) - .saturating_add(RocksDbWeight::get().writes(7 as Weight)) + .saturating_add(Weight::from_ref_time(87_000).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(7_u64)) + .saturating_add(RocksDbWeight::get().writes(7_u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn schedule_leave_candidates(x: u32, ) -> Weight { - (61_536_000 as Weight) + Weight::from_ref_time(61_536_000) // Standard Error: 1_000 - .saturating_add((63_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(63_000).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking TopDelegations (r:1 w:1) @@ -457,36 +457,36 @@ impl WeightInfo for () { // Storage: ParachainStaking BottomDelegations (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn execute_leave_candidates(x: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0) // Standard Error: 62_000 - .saturating_add((28_397_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(x as Weight))) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(x as Weight))) + .saturating_add(Weight::from_ref_time(28_397_000).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(4_u64)) + .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(x as u64))) + .saturating_add(RocksDbWeight::get().writes(4_u64)) + .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(x as u64))) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn cancel_leave_candidates(x: u32, ) -> Weight { - (54_676_000 as Weight) + Weight::from_ref_time(54_676_000) // Standard Error: 1_000 - .saturating_add((74_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(74_000).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn go_offline() -> Weight { - (25_944_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(25_944_000) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn go_online() -> Weight { - (26_438_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(26_438_000) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: System Account (r:1 w:1) @@ -494,15 +494,15 @@ impl WeightInfo for () { // Storage: Balances Locks (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn candidate_bond_more() -> Weight { - (43_464_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(43_464_000) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().writes(5_u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) fn schedule_candidate_bond_less() -> Weight { - (23_295_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(23_295_000) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) @@ -510,15 +510,15 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn execute_candidate_bond_less() -> Weight { - (53_733_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(53_733_000) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().writes(5_u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) fn cancel_candidate_bond_less() -> Weight { - (16_037_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(16_037_000) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: System Account (r:1 w:1) // Storage: ParachainStaking DelegatorState (r:1 w:1) @@ -528,20 +528,20 @@ impl WeightInfo for () { // Storage: Balances Locks (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn delegate(x: u32, y: u32, ) -> Weight { - (68_850_000 as Weight) + Weight::from_ref_time(68_850_000) // Standard Error: 7_000 - .saturating_add((562_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(Weight::from_ref_time(562_000).saturating_mul(x as u64)) // Standard Error: 1_000 - .saturating_add((317_000 as Weight).saturating_mul(y as Weight)) - .saturating_add(RocksDbWeight::get().reads(7 as Weight)) - .saturating_add(RocksDbWeight::get().writes(7 as Weight)) + .saturating_add(Weight::from_ref_time(317_000).saturating_mul(y as u64)) + .saturating_add(RocksDbWeight::get().reads(7_u64)) + .saturating_add(RocksDbWeight::get().writes(7_u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn schedule_leave_delegators() -> Weight { - (30_861_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(30_861_000) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) @@ -552,27 +552,27 @@ impl WeightInfo for () { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn execute_leave_delegators(x: u32, ) -> Weight { - (34_828_000 as Weight) + Weight::from_ref_time(34_828_000) // Standard Error: 60_000 - .saturating_add((24_273_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(x as Weight))) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(x as Weight))) + .saturating_add(Weight::from_ref_time(24_273_000).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(x as u64))) + .saturating_add(RocksDbWeight::get().writes(2_u64)) + .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(x as u64))) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn cancel_leave_delegators() -> Weight { - (29_158_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(29_158_000) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn schedule_revoke_delegation() -> Weight { - (28_758_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(28_758_000) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) } // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:0) // Storage: ParachainStaking DelegatorState (r:1 w:1) @@ -583,16 +583,16 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn delegator_bond_more() -> Weight { - (60_205_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(8 as Weight)) - .saturating_add(RocksDbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(60_205_000) + .saturating_add(RocksDbWeight::get().reads(8_u64)) + .saturating_add(RocksDbWeight::get().writes(7_u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn schedule_delegator_bond_less() -> Weight { - (31_416_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(31_416_000) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) @@ -603,9 +603,9 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn execute_revoke_delegation() -> Weight { - (79_435_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(8 as Weight)) - .saturating_add(RocksDbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(79_435_000) + .saturating_add(RocksDbWeight::get().reads(8_u64)) + .saturating_add(RocksDbWeight::get().writes(8_u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) @@ -616,23 +616,23 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn execute_delegator_bond_less() -> Weight { - (69_937_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(8 as Weight)) - .saturating_add(RocksDbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(69_937_000) + .saturating_add(RocksDbWeight::get().reads(8_u64)) + .saturating_add(RocksDbWeight::get().writes(8_u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn cancel_revoke_delegation() -> Weight { - (22_521_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(22_521_000) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn cancel_delegator_bond_less() -> Weight { - (27_918_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(27_918_000) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) } // Storage: ParachainStaking Points (r:1 w:0) // Storage: ParachainStaking Staked (r:1 w:2) @@ -651,12 +651,12 @@ impl WeightInfo for () { // Storage: ParachainStaking SelectedCandidates (r:0 w:1) // Storage: ParachainStaking DelayedPayouts (r:0 w:1) fn round_transition_on_initialize(x: u32, _y: u32, ) -> Weight { - (1_707_396_000 as Weight) + Weight::from_ref_time(1_707_396_000) // Standard Error: 331_000 - .saturating_add((1_854_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(126 as Weight)) - .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(x as Weight))) - .saturating_add(RocksDbWeight::get().writes(122 as Weight)) + .saturating_add(Weight::from_ref_time(1_854_000).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(126_u64)) + .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(x as u64))) + .saturating_add(RocksDbWeight::get().writes(122_u64)) } // Storage: ParachainStaking DelayedPayouts (r:1 w:0) // Storage: ParachainStaking Points (r:1 w:0) @@ -664,15 +664,15 @@ impl WeightInfo for () { // Storage: ParachainStaking AtStake (r:1 w:1) // Storage: System Account (r:1 w:1) fn pay_one_collator_reward(y: u32, ) -> Weight { - (47_386_000 as Weight) + Weight::from_ref_time(47_386_000) // Standard Error: 14_000 - .saturating_add((13_544_000 as Weight).saturating_mul(y as Weight)) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(y as Weight))) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(y as Weight))) + .saturating_add(Weight::from_ref_time(13_544_000).saturating_mul(y as u64)) + .saturating_add(RocksDbWeight::get().reads(6_u64)) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(y as u64))) + .saturating_add(RocksDbWeight::get().writes(3_u64)) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(y as u64))) } fn base_on_initialize() -> Weight { - (3_118_000 as Weight) + Weight::from_ref_time(3_118_000) } } diff --git a/pallets/tx-pause/Cargo.toml b/pallets/tx-pause/Cargo.toml index 89eb55ff6..12f9ef386 100644 --- a/pallets/tx-pause/Cargo.toml +++ b/pallets/tx-pause/Cargo.toml @@ -8,24 +8,24 @@ repository = 'https://github.com/Manta-Network/Manta/' version = '4.0.7' [dependencies] -codec = { package = "parity-scale-codec", version = '3.1.2', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28", default-features = false, optional = true } -frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } +codec = { package = "parity-scale-codec", version = '3.4.0', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37", default-features = false, optional = true } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } [dev-dependencies] manta-primitives = { path = '../../primitives/manta' } -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } +sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } [features] default = ["std"] runtime-benchmarks = [ - "frame-benchmarking", + "frame-benchmarking/runtime-benchmarks", 'frame-support/runtime-benchmarks', 'frame-system/runtime-benchmarks', ] @@ -38,4 +38,5 @@ std = [ ] try-runtime = [ "frame-support/try-runtime", + "frame-system/try-runtime", ] diff --git a/pallets/tx-pause/src/benchmarking.rs b/pallets/tx-pause/src/benchmarking.rs index cc5d33050..0f61d9b04 100644 --- a/pallets/tx-pause/src/benchmarking.rs +++ b/pallets/tx-pause/src/benchmarking.rs @@ -26,9 +26,9 @@ use crate::Pallet as TransactionPause; use frame_benchmarking::{benchmarks, impl_benchmark_test_suite}; use frame_system::{EventRecord, RawOrigin}; -pub fn assert_last_event(generic_event: ::Event) { +pub fn assert_last_event(generic_event: ::RuntimeEvent) { let events = frame_system::Pallet::::events(); - let system_event: ::Event = generic_event.into(); + let system_event: ::RuntimeEvent = generic_event.into(); let EventRecord { event, .. } = &events[events.len() - 1]; assert_eq!(event, &system_event); } @@ -47,7 +47,7 @@ benchmarks! { // Benchmark `unpause_transaction` extrinsic: unpause_transaction { - let origin: T::Origin = T::Origin::from(RawOrigin::Root); + let origin: T::RuntimeOrigin = T::RuntimeOrigin::from(RawOrigin::Root); let pallet_name = b"System".to_vec(); let function_name = b"remark".to_vec(); TransactionPause::::pause_transaction(origin, pallet_name.clone(), function_name.clone())?; diff --git a/pallets/tx-pause/src/lib.rs b/pallets/tx-pause/src/lib.rs index 6036a14b4..b7b36d261 100644 --- a/pallets/tx-pause/src/lib.rs +++ b/pallets/tx-pause/src/lib.rs @@ -40,7 +40,7 @@ pub mod weights; pub use pallet::*; pub use weights::WeightInfo; -type CallOf = ::Call; +type CallOf = ::RuntimeCall; #[frame_support::pallet] pub mod pallet { @@ -51,17 +51,17 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; - type Call: Parameter + GetCallMetadata; + type RuntimeCall: Parameter + GetCallMetadata; type MaxCallNames: Get; /// The origin which may add to filter. - type PauseOrigin: EnsureOrigin; + type PauseOrigin: EnsureOrigin; /// The origin which may remove from filter. - type UnpauseOrigin: EnsureOrigin; + type UnpauseOrigin: EnsureOrigin; /// Names of pallets which cannot be paused. type NonPausablePallets: Contains>; @@ -152,7 +152,7 @@ pub mod pallet { #[pallet::call_index(2)] #[pallet::weight({ let len = pallet_and_funcs.iter().flat_map(|item| {item.clone().1}).count(); - T::WeightInfo::pause_transaction().saturating_mul(len as Weight) + T::WeightInfo::pause_transaction().saturating_mul(len as u64) })] #[transactional] pub fn pause_transactions( @@ -177,7 +177,7 @@ pub mod pallet { #[pallet::call_index(3)] #[pallet::weight({ let len = pallet_and_funcs.iter().flat_map(|item| {item.clone().1}).count(); - T::WeightInfo::unpause_transaction().saturating_mul(len as Weight) + T::WeightInfo::unpause_transaction().saturating_mul(len as u64) })] #[transactional] pub fn unpause_transactions( @@ -201,7 +201,7 @@ pub mod pallet { #[pallet::weight({ let len = pallet_names.len(); let max = T::MaxCallNames::get(); - T::WeightInfo::pause_transaction().saturating_mul(len as Weight).saturating_mul(max as Weight) + T::WeightInfo::pause_transaction().saturating_mul(len as u64).saturating_mul(max as u64) })] #[transactional] pub fn pause_pallets( @@ -236,7 +236,7 @@ pub mod pallet { Self::deposit_event(Event::PalletPaused(pallet_name)); } - Ok(Some(T::WeightInfo::pause_transaction().saturating_mul(sum as Weight)).into()) + Ok(Some(T::WeightInfo::pause_transaction().saturating_mul(sum as u64)).into()) } /// Unpause all the calls of the listed pallets in `pallet_names`. @@ -245,7 +245,7 @@ pub mod pallet { #[pallet::weight({ let len = pallet_names.len(); let max = T::MaxCallNames::get(); - T::WeightInfo::pause_transaction().saturating_mul(len as Weight).saturating_mul(max as Weight) + T::WeightInfo::pause_transaction().saturating_mul(len as u64).saturating_mul(max as u64) })] #[transactional] pub fn unpause_pallets( @@ -273,7 +273,7 @@ pub mod pallet { Self::deposit_event(Event::PalletUnpaused(pallet_name)); } - Ok(Some(T::WeightInfo::pause_transaction().saturating_mul(sum as Weight)).into()) + Ok(Some(T::WeightInfo::pause_transaction().saturating_mul(sum as u64)).into()) } } } diff --git a/pallets/tx-pause/src/mock.rs b/pallets/tx-pause/src/mock.rs index 504a04fc4..13d6de39a 100644 --- a/pallets/tx-pause/src/mock.rs +++ b/pallets/tx-pause/src/mock.rs @@ -39,24 +39,24 @@ mod tx_pause { } pub struct BaseFilter; -impl Contains for BaseFilter { - fn contains(call: &Call) -> bool { +impl Contains for BaseFilter { + fn contains(call: &RuntimeCall) -> bool { // filter paused calls !tx_pause::PausedTransactionFilter::::contains(call) } } impl frame_system::Config for Runtime { - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type Index = u64; type BlockNumber = BlockNumber; - type Call = Call; + type RuntimeCall = RuntimeCall; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = ConstU32<250>; type BlockWeights = (); type BlockLength = (); @@ -80,7 +80,7 @@ parameter_types! { impl pallet_balances::Config for Runtime { type Balance = Balance; type DustRemoval = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = NativeTokenExistentialDeposit; type AccountStore = System; type MaxLocks = (); @@ -98,8 +98,8 @@ parameter_types! { } impl Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type MaxCallNames = ConstU32<10>; type PauseOrigin = EnsureRoot; type UnpauseOrigin = EnsureRoot; diff --git a/pallets/tx-pause/src/tests.rs b/pallets/tx-pause/src/tests.rs index 35aed36c6..5604ecc4d 100644 --- a/pallets/tx-pause/src/tests.rs +++ b/pallets/tx-pause/src/tests.rs @@ -24,14 +24,14 @@ use super::*; use frame_support::{assert_noop, assert_ok}; use frame_system::RawOrigin; -use mock::{Event, *}; +use mock::{RuntimeEvent as Event, *}; use sp_runtime::traits::BadOrigin; -const REMARK_CALL: &::Call = - &mock::Call::System(frame_system::Call::remark { remark: vec![] }); +const REMARK_CALL: &::RuntimeCall = + &mock::RuntimeCall::System(frame_system::Call::remark { remark: vec![] }); -const SETCODE_CALL: &::Call = - &mock::Call::System(frame_system::Call::set_code { code: vec![] }); +const SETCODE_CALL: &::RuntimeCall = + &mock::RuntimeCall::System(frame_system::Call::set_code { code: vec![] }); #[test] fn pause_transaction_work() { @@ -43,7 +43,7 @@ fn pause_transaction_work() { System::set_block_number(1); assert_noop!( TransactionPause::pause_transaction( - Origin::signed(1), + RuntimeOrigin::signed(1), b"Balances".to_vec(), b"transfer".to_vec() ), @@ -136,7 +136,7 @@ fn unpause_transaction_work() { assert_noop!( TransactionPause::unpause_transaction( - Origin::signed(1), + RuntimeOrigin::signed(1), b"System".to_vec(), b"remark".to_vec() ), @@ -194,7 +194,7 @@ fn pause_unpause_transactions_work() { assert_noop!( TransactionPause::unpause_transactions( - Origin::signed(1), + RuntimeOrigin::signed(1), vec![( b"System".to_vec(), vec![b"remark".to_vec(), b"set_code".to_vec()] @@ -240,7 +240,7 @@ fn pause_unpause_pallets_work() { ExtBuilder::default().build().execute_with(|| { System::set_block_number(1); assert_noop!( - TransactionPause::pause_pallets(Origin::signed(1), vec![b"Balances".to_vec()]), + TransactionPause::pause_pallets(RuntimeOrigin::signed(1), vec![b"Balances".to_vec()]), BadOrigin ); assert_noop!( @@ -279,7 +279,7 @@ fn pause_unpause_pallets_work() { // unpause pallets assert_noop!( - TransactionPause::unpause_pallets(Origin::signed(1), vec![b"System".to_vec()],), + TransactionPause::unpause_pallets(RuntimeOrigin::signed(1), vec![b"System".to_vec()],), BadOrigin ); assert_ok!(TransactionPause::unpause_pallets( @@ -316,12 +316,12 @@ fn pause_pallets_weight_works() { let max_call_len: u32 = <::MaxCallNames as sp_runtime::traits::Get>::get(); let weight_per_tx: Weight = ::WeightInfo::pause_transaction(); - let initial_weight = weight_per_tx.saturating_mul(max_call_len as Weight); + let initial_weight = weight_per_tx.saturating_mul(max_call_len as u64); let ps = ps.unwrap(); let actual_weight = ps.actual_weight.unwrap(); - assert_eq!(actual_weight, weight_per_tx.saturating_mul(size as Weight)); - assert!(actual_weight < initial_weight); + assert_eq!(actual_weight, weight_per_tx.saturating_mul(size as u64)); + assert!(actual_weight.ref_time() < initial_weight.ref_time()); let ps2: DispatchResultWithPostInfo = TransactionPause::unpause_pallets(RawOrigin::Root.into(), vec![b"System".to_vec()]); diff --git a/pallets/tx-pause/src/weights.rs b/pallets/tx-pause/src/weights.rs index a2ec5563b..8d9e76311 100644 --- a/pallets/tx-pause/src/weights.rs +++ b/pallets/tx-pause/src/weights.rs @@ -54,15 +54,15 @@ pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { // Storage: TransactionPause PausedTransactions (r:1 w:1) fn pause_transaction() -> Weight { - (50_640_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(50_640_000) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: TransactionPause PausedTransactions (r:1 w:1) fn unpause_transaction() -> Weight { - (22_839_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(22_839_000) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } } @@ -70,14 +70,14 @@ impl WeightInfo for SubstrateWeight { impl WeightInfo for () { // Storage: TransactionPause PausedTransactions (r:1 w:1) fn pause_transaction() -> Weight { - (50_640_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(50_640_000) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: TransactionPause PausedTransactions (r:1 w:1) fn unpause_transaction() -> Weight { - (22_839_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(22_839_000) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } } diff --git a/pallets/vesting/Cargo.toml b/pallets/vesting/Cargo.toml index c0c1c179a..840d6273f 100644 --- a/pallets/vesting/Cargo.toml +++ b/pallets/vesting/Cargo.toml @@ -8,33 +8,33 @@ repository = 'https://github.com/Manta-Network/Manta/' version = '4.0.7' [dependencies] -codec = { package = "parity-scale-codec", version = '3.1.2', default-features = false, features = ["derive", "max-encoded-len"] } +codec = { package = "parity-scale-codec", version = '3.4.0', default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28", optional = true } -frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28", optional = true } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28", optional = true } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37", optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37", optional = true } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37", optional = true } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } [dev-dependencies] chrono = "0.4" manta-primitives = { path = "../../primitives/manta" } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } [features] default = ["std"] runtime-benchmarks = [ - "frame-benchmarking", + 'frame-benchmarking/runtime-benchmarks', 'frame-support/runtime-benchmarks', 'frame-system/runtime-benchmarks', - "pallet-timestamp/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", + 'pallet-timestamp/runtime-benchmarks', + 'pallet-balances/runtime-benchmarks', ] std = [ "codec/std", @@ -44,3 +44,7 @@ std = [ "sp-runtime/std", "sp-std/std", ] +try-runtime = [ + 'frame-support/try-runtime', + 'frame-system/try-runtime', +] diff --git a/pallets/vesting/src/benchmarking.rs b/pallets/vesting/src/benchmarking.rs index 424552152..04fb8224b 100644 --- a/pallets/vesting/src/benchmarking.rs +++ b/pallets/vesting/src/benchmarking.rs @@ -30,7 +30,7 @@ const SEED: u32 = 0; // existential deposit multiplier const ED_MULTIPLIER: u32 = 100; -fn assert_has_event(generic_event: ::Event) { +fn assert_has_event(generic_event: ::RuntimeEvent) { frame_system::Pallet::::assert_has_event(generic_event.into()); } diff --git a/pallets/vesting/src/lib.rs b/pallets/vesting/src/lib.rs index 0a6a8d5c2..edae3a28c 100644 --- a/pallets/vesting/src/lib.rs +++ b/pallets/vesting/src/lib.rs @@ -56,7 +56,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { /// The overarching event type. - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// The currency trait. type Currency: LockableCurrency; diff --git a/pallets/vesting/src/mock.rs b/pallets/vesting/src/mock.rs index 6572fddd7..40cd37bb8 100644 --- a/pallets/vesting/src/mock.rs +++ b/pallets/vesting/src/mock.rs @@ -46,7 +46,7 @@ frame_support::construct_runtime!( parameter_types! { pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(1024); + frame_system::limits::BlockWeights::simple_max(Weight::from_ref_time(1024)); } impl frame_system::Config for Test { type AccountData = pallet_balances::AccountData; @@ -56,9 +56,9 @@ impl frame_system::Config for Test { type BlockLength = (); type BlockNumber = BlockNumber; type BlockWeights = (); - type Call = Call; + type RuntimeCall = RuntimeCall; type DbWeight = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Hash = H256; type Hashing = BlakeTwo256; type Header = Header; @@ -67,7 +67,7 @@ impl frame_system::Config for Test { type OnKilledAccount = (); type OnNewAccount = (); type OnSetCode = (); - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type PalletInfo = PalletInfo; type SS58Prefix = (); type SystemWeightInfo = (); @@ -79,7 +79,7 @@ impl pallet_balances::Config for Test { type AccountStore = System; type Balance = Balance; type DustRemoval = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = ExistentialDeposit; type MaxLocks = ConstU32<10>; type MaxReserves = (); @@ -104,7 +104,7 @@ parameter_types! { } impl Config for Test { type Currency = Balances; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Timestamp = Timestamp; type MinVestedTransfer = MinVestedTransfer; type MaxScheduleLength = MaxScheduleLength; diff --git a/pallets/vesting/src/tests.rs b/pallets/vesting/src/tests.rs index ccbd6586f..a82c4e52e 100644 --- a/pallets/vesting/src/tests.rs +++ b/pallets/vesting/src/tests.rs @@ -17,7 +17,7 @@ use super::{Event as PalletEvent, *}; use chrono::prelude::*; use frame_support::{assert_noop, assert_ok}; -use mock::{Event as MockEvent, *}; +use mock::{RuntimeEvent as MockEvent, *}; #[test] fn alice_vesting_for_bob_should_work() { @@ -28,7 +28,7 @@ fn alice_vesting_for_bob_should_work() { // Cannot vest tokens that is less than expected. assert_noop!( CalamariVesting::vested_transfer( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), BOB, MinVestedTransfer::get() - 1 ), @@ -37,20 +37,24 @@ fn alice_vesting_for_bob_should_work() { // Signer cannot vest tokens that exceeds all he has. assert_noop!( - CalamariVesting::vested_transfer(Origin::signed(ALICE), BOB, ALICE_DEPOSIT + 1), + CalamariVesting::vested_transfer( + RuntimeOrigin::signed(ALICE), + BOB, + ALICE_DEPOSIT + 1 + ), Error::::BalanceLow ); let unvested = 100; assert_ok!(CalamariVesting::vested_transfer( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), BOB, unvested )); // Cannot vest tokens the same user more than twice. assert_noop!( - CalamariVesting::vested_transfer(Origin::signed(ALICE), BOB, unvested), + CalamariVesting::vested_transfer(RuntimeOrigin::signed(ALICE), BOB, unvested), Error::::ExistingVestingSchedule ); @@ -60,7 +64,7 @@ fn alice_vesting_for_bob_should_work() { // Now Bob cannot claim any token. assert_noop!( - CalamariVesting::vest(Origin::signed(BOB)), + CalamariVesting::vest(RuntimeOrigin::signed(BOB)), Error::::ClaimTooEarly, ); @@ -76,7 +80,7 @@ fn alice_vesting_for_bob_should_work() { let now = VestingSchedule::::get()[first_round].1 * 1000 + 1; Timestamp::set_timestamp(now); - assert_ok!(CalamariVesting::vest(Origin::signed(BOB))); + assert_ok!(CalamariVesting::vest(RuntimeOrigin::signed(BOB))); assert_eq!(Balances::free_balance(BOB), unvested); // BOB cannot transfer more than 1th round of vested tokens. @@ -89,11 +93,15 @@ fn alice_vesting_for_bob_should_work() { ))); assert_noop!( - Balances::transfer(Origin::signed(BOB), ALICE, vested + 1), + Balances::transfer(RuntimeOrigin::signed(BOB), ALICE, vested + 1), pallet_balances::Error::::LiquidityRestrictions, ); - assert_ok!(Balances::transfer(Origin::signed(BOB), ALICE, vested)); + assert_ok!(Balances::transfer( + RuntimeOrigin::signed(BOB), + ALICE, + vested + )); assert_eq!( Balances::free_balance(ALICE), ALICE_DEPOSIT - unvested + vested @@ -106,7 +114,7 @@ fn alice_vesting_for_bob_should_work() { let now = VestingSchedule::::get()[last_round].1 * 1000 + 1; Timestamp::set_timestamp(now); - assert_ok!(CalamariVesting::vest(Origin::signed(BOB))); + assert_ok!(CalamariVesting::vest(RuntimeOrigin::signed(BOB))); assert_eq!(Balances::free_balance(BOB), unvested - vested); // Check vested done event @@ -116,7 +124,7 @@ fn alice_vesting_for_bob_should_work() { // Now, Bob can transfer all his tokens. assert_ok!(Balances::transfer( - Origin::signed(BOB), + RuntimeOrigin::signed(BOB), ALICE, unvested - vested )); @@ -136,7 +144,7 @@ fn alice_vesting_for_bob_claim_slowly_should_work() { .execute_with(|| { let unvested = 100; assert_ok!(CalamariVesting::vested_transfer( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), BOB, unvested )); @@ -146,7 +154,7 @@ fn alice_vesting_for_bob_claim_slowly_should_work() { // Now Bob cannot claim any token. assert_noop!( - CalamariVesting::vest(Origin::signed(BOB)), + CalamariVesting::vest(RuntimeOrigin::signed(BOB)), Error::::ClaimTooEarly, ); @@ -161,7 +169,7 @@ fn alice_vesting_for_bob_claim_slowly_should_work() { let now = VestingSchedule::::get()[fourth_round].1 * 1000 + 1; Timestamp::set_timestamp(now); - assert_ok!(CalamariVesting::vest(Origin::signed(BOB))); + assert_ok!(CalamariVesting::vest(RuntimeOrigin::signed(BOB))); assert_eq!(Balances::free_balance(BOB), unvested); // Calculate how many tokens that have been vested. @@ -171,11 +179,15 @@ fn alice_vesting_for_bob_claim_slowly_should_work() { .fold(Percent::from_percent(0), |acc, p| acc.saturating_add(p)) * unvested; assert_noop!( - Balances::transfer(Origin::signed(BOB), ALICE, vested + 1), + Balances::transfer(RuntimeOrigin::signed(BOB), ALICE, vested + 1), pallet_balances::Error::::LiquidityRestrictions, ); - assert_ok!(Balances::transfer(Origin::signed(BOB), ALICE, vested)); + assert_ok!(Balances::transfer( + RuntimeOrigin::signed(BOB), + ALICE, + vested + )); assert_eq!( Balances::free_balance(ALICE), ALICE_DEPOSIT - unvested + vested @@ -192,7 +204,7 @@ fn alice_vesting_for_bob_claim_arbitrarily_should_work() { .execute_with(|| { let unvested = 100; assert_ok!(CalamariVesting::vested_transfer( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), BOB, unvested )); @@ -207,7 +219,7 @@ fn alice_vesting_for_bob_claim_arbitrarily_should_work() { let now = VestingSchedule::::get()[first_round].1 * 1000 + 1; Timestamp::set_timestamp(now); - assert_ok!(CalamariVesting::vest(Origin::signed(BOB))); + assert_ok!(CalamariVesting::vest(RuntimeOrigin::signed(BOB))); assert_eq!(Balances::free_balance(BOB), unvested); // BOB cannot transfer more than 1th round of vested tokens. @@ -220,11 +232,15 @@ fn alice_vesting_for_bob_claim_arbitrarily_should_work() { ))); assert_noop!( - Balances::transfer(Origin::signed(BOB), ALICE, vested_1 + 1), + Balances::transfer(RuntimeOrigin::signed(BOB), ALICE, vested_1 + 1), pallet_balances::Error::::LiquidityRestrictions, ); - assert_ok!(Balances::transfer(Origin::signed(BOB), ALICE, vested_1)); + assert_ok!(Balances::transfer( + RuntimeOrigin::signed(BOB), + ALICE, + vested_1 + )); assert_eq!( Balances::free_balance(ALICE), ALICE_DEPOSIT - unvested + vested_1 @@ -237,7 +253,7 @@ fn alice_vesting_for_bob_claim_arbitrarily_should_work() { let now = VestingSchedule::::get()[sixth_round].1 * 1000 + 1; Timestamp::set_timestamp(now); - assert_ok!(CalamariVesting::vest(Origin::signed(BOB))); + assert_ok!(CalamariVesting::vest(RuntimeOrigin::signed(BOB))); // All vested for 5th round. let vested_0_to_4 = VestingSchedule::::get()[..=sixth_round] @@ -246,7 +262,11 @@ fn alice_vesting_for_bob_claim_arbitrarily_should_work() { .fold(Percent::from_percent(0), |acc, p| acc.saturating_add(p)) * unvested; assert_noop!( - Balances::transfer(Origin::signed(BOB), ALICE, vested_0_to_4 + 1 - vested_1), + Balances::transfer( + RuntimeOrigin::signed(BOB), + ALICE, + vested_0_to_4 + 1 - vested_1 + ), pallet_balances::Error::::LiquidityRestrictions, ); @@ -263,7 +283,7 @@ fn alice_vesting_for_bob_claim_arbitrarily_should_work() { ); assert_ok!(Balances::transfer( - Origin::signed(BOB), + RuntimeOrigin::signed(BOB), ALICE, vested_0_to_4 - vested_1 )); @@ -280,7 +300,7 @@ fn vesting_complete_should_work() { .execute_with(|| { let unvested = 100; assert_ok!(CalamariVesting::vested_transfer( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), BOB, unvested )); @@ -289,7 +309,7 @@ fn vesting_complete_should_work() { // Now Bob cannot claim any token. assert_noop!( - CalamariVesting::vest(Origin::signed(BOB)), + CalamariVesting::vest(RuntimeOrigin::signed(BOB)), Error::::ClaimTooEarly, ); @@ -300,7 +320,7 @@ fn vesting_complete_should_work() { // Now Bob cannot transfer locked tokens. assert_noop!( - Balances::transfer(Origin::signed(BOB), ALICE, 1), + Balances::transfer(RuntimeOrigin::signed(BOB), ALICE, 1), pallet_balances::Error::::LiquidityRestrictions, ); @@ -310,7 +330,7 @@ fn vesting_complete_should_work() { let now = VestingSchedule::::get()[last_round].1 * 1000 + 1; Timestamp::set_timestamp(now); - assert_ok!(CalamariVesting::vest(Origin::signed(BOB))); + assert_ok!(CalamariVesting::vest(RuntimeOrigin::signed(BOB))); assert_eq!(Balances::free_balance(BOB), unvested); // Check vested done event @@ -320,7 +340,11 @@ fn vesting_complete_should_work() { let vested = unvested; // Now, Bob can transfer all his tokens. - assert_ok!(Balances::transfer(Origin::signed(BOB), ALICE, vested)); + assert_ok!(Balances::transfer( + RuntimeOrigin::signed(BOB), + ALICE, + vested + )); assert_eq!(Balances::free_balance(ALICE), ALICE_DEPOSIT); assert_eq!(Balances::free_balance(BOB), 0); @@ -364,7 +388,7 @@ fn partially_update_vesting_schedule_should_work() { .unwrap_or_default(); assert_ok!(CalamariVesting::update_vesting_schedule( - Origin::root(), + RuntimeOrigin::root(), new_schedule.clone() )); // Check storage @@ -402,7 +426,7 @@ fn update_brand_new_vesting_schedule_should_work() { ) .unwrap_or_default(); assert_ok!(CalamariVesting::update_vesting_schedule( - Origin::root(), + RuntimeOrigin::root(), new_schedule.clone() )); // Check storage @@ -430,7 +454,10 @@ fn invalid_schedule_should_not_be_updated() { let wrong_length_schedule: BoundedVec::MaxScheduleLength> = BoundedVec::try_from(vec![1, 2, 3, 4, 5, 6, 7]).unwrap_or_default(); assert_noop!( - CalamariVesting::update_vesting_schedule(Origin::root(), wrong_length_schedule), + CalamariVesting::update_vesting_schedule( + RuntimeOrigin::root(), + wrong_length_schedule + ), Error::::InvalidScheduleLength, ); @@ -438,7 +465,10 @@ fn invalid_schedule_should_not_be_updated() { let wrong_length_schedule: BoundedVec::MaxScheduleLength> = BoundedVec::try_from(vec![1, 2, 3, 4, 5]).unwrap_or_default(); assert_noop!( - CalamariVesting::update_vesting_schedule(Origin::root(), wrong_length_schedule), + CalamariVesting::update_vesting_schedule( + RuntimeOrigin::root(), + wrong_length_schedule + ), Error::::InvalidScheduleLength, ); @@ -446,7 +476,7 @@ fn invalid_schedule_should_not_be_updated() { let invalid_schedule: BoundedVec::MaxScheduleLength> = BoundedVec::try_from(vec![1, 2, 9, 4, 8, 6]).unwrap_or_default(); assert_noop!( - CalamariVesting::update_vesting_schedule(Origin::root(), invalid_schedule), + CalamariVesting::update_vesting_schedule(RuntimeOrigin::root(), invalid_schedule), Error::::UnsortedSchedule, ); @@ -478,7 +508,7 @@ fn invalid_schedule_should_not_be_updated() { .unwrap_or_default(); assert_noop!( - CalamariVesting::update_vesting_schedule(Origin::root(), invalid_schedule), + CalamariVesting::update_vesting_schedule(RuntimeOrigin::root(), invalid_schedule), Error::::InvalidSchedule, ); }); diff --git a/pallets/vesting/src/weights.rs b/pallets/vesting/src/weights.rs index 3d386ca7b..35f5fbe29 100644 --- a/pallets/vesting/src/weights.rs +++ b/pallets/vesting/src/weights.rs @@ -56,9 +56,9 @@ impl WeightInfo for SubstrateWeight { // Storage: CalamariVesting VestingSchedule (r:1 w:1) // Storage: Timestamp Now (r:1 w:0) fn update_vesting_schedule() -> Weight { - (18_103_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(18_103_000) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Timestamp Now (r:1 w:0) // Storage: CalamariVesting VestingSchedule (r:1 w:0) @@ -66,9 +66,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn vest() -> Weight { - (37_818_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(37_818_000) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) } // Storage: CalamariVesting VestingBalances (r:1 w:1) // Storage: System Account (r:1 w:1) @@ -76,9 +76,9 @@ impl WeightInfo for SubstrateWeight { // Storage: CalamariVesting VestingSchedule (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn vested_transfer() -> Weight { - (66_814_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(66_814_000) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) } } @@ -87,9 +87,9 @@ impl WeightInfo for () { // Storage: CalamariVesting VestingSchedule (r:1 w:1) // Storage: Timestamp Now (r:1 w:0) fn update_vesting_schedule() -> Weight { - (18_103_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(18_103_000) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: Timestamp Now (r:1 w:0) // Storage: CalamariVesting VestingSchedule (r:1 w:0) @@ -97,9 +97,9 @@ impl WeightInfo for () { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn vest() -> Weight { - (37_818_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(37_818_000) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().writes(3_u64)) } // Storage: CalamariVesting VestingBalances (r:1 w:1) // Storage: System Account (r:1 w:1) @@ -107,8 +107,8 @@ impl WeightInfo for () { // Storage: CalamariVesting VestingSchedule (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn vested_transfer() -> Weight { - (66_814_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(66_814_000) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().writes(3_u64)) } } diff --git a/primitives/manta/Cargo.toml b/primitives/manta/Cargo.toml index c3842b45a..a3fe87bf1 100644 --- a/primitives/manta/Cargo.toml +++ b/primitives/manta/Cargo.toml @@ -11,27 +11,27 @@ version = '4.0.7' targets = ['x86_64-unknown-linux-gnu'] [dependencies] -codec = { package = "parity-scale-codec", version = '3.1.2', default-features = false } +codec = { package = "parity-scale-codec", version = '3.4.0', default-features = false } log = "0.4.16" scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } smallvec = "1.8.0" # Substrate primitives -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28", default-features = false, optional = true } -frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-io = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" } -xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" } -xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37", default-features = false, optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-core = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-io = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37" } +xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37" } +xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37" } [features] default = ["std"] runtime-benchmarks = [ - 'frame-benchmarking', + 'frame-benchmarking/runtime-benchmarks', 'frame-support/runtime-benchmarks', 'frame-system/runtime-benchmarks', 'xcm-builder/runtime-benchmarks', diff --git a/primitives/manta/src/constants.rs b/primitives/manta/src/constants.rs index 669eb352e..1287f3473 100644 --- a/primitives/manta/src/constants.rs +++ b/primitives/manta/src/constants.rs @@ -17,11 +17,7 @@ //! Manta Protocol Constants use crate::types::Balance; -use frame_support::{ - parameter_types, - weights::{RuntimeDbWeight, Weight}, - PalletId, -}; +use frame_support::{parameter_types, weights::RuntimeDbWeight, PalletId}; /// Calamari SS58 Prefix pub const CALAMARI_SS58PREFIX: u8 = 78; @@ -107,13 +103,13 @@ pub const TEST_DEFAULT_ASSET_ED: Balance = 1; pub const TEST_DEFAULT_ASSET_ED2: Balance = 2; /// 1_000_000_000_000 -pub const WEIGHT_PER_SECOND: Weight = 1_000_000_000_000; +pub const WEIGHT_PER_SECOND: u64 = 1_000_000_000_000; /// 1_000_000_000 -pub const WEIGHT_PER_MILLIS: Weight = WEIGHT_PER_SECOND / 1000; +pub const WEIGHT_PER_MILLIS: u64 = WEIGHT_PER_SECOND / 1000; /// 1_000_000 -pub const WEIGHT_PER_MICROS: Weight = WEIGHT_PER_MILLIS / 1000; +pub const WEIGHT_PER_MICROS: u64 = WEIGHT_PER_MILLIS / 1000; /// 1_000 -pub const WEIGHT_PER_NANOS: Weight = WEIGHT_PER_MICROS / 1000; +pub const WEIGHT_PER_NANOS: u64 = WEIGHT_PER_MICROS / 1000; parameter_types! { /// By default, Substrate uses RocksDB, so this will be the weight used throughout @@ -141,10 +137,10 @@ mod constants_tests { #[test] fn sanity_check_weight_per_time_constants() { use frame_support::weights::constants::{ - WEIGHT_PER_MICROS as IMPORTED_WEIGHT_PER_MICROS, - WEIGHT_PER_MILLIS as IMPORTED_WEIGHT_PER_MILLIS, - WEIGHT_PER_NANOS as IMPORTED_WEIGHT_PER_NANOS, - WEIGHT_PER_SECOND as IMPORTED_WEIGHT_PER_SECOND, + WEIGHT_REF_TIME_PER_MICROS as IMPORTED_WEIGHT_PER_MICROS, + WEIGHT_REF_TIME_PER_MILLIS as IMPORTED_WEIGHT_PER_MILLIS, + WEIGHT_REF_TIME_PER_NANOS as IMPORTED_WEIGHT_PER_NANOS, + WEIGHT_REF_TIME_PER_SECOND as IMPORTED_WEIGHT_PER_SECOND, }; assert_eq!(WEIGHT_PER_SECOND, IMPORTED_WEIGHT_PER_SECOND); diff --git a/primitives/manta/src/xcm.rs b/primitives/manta/src/xcm.rs index fbe9d7cd5..1c1731689 100644 --- a/primitives/manta/src/xcm.rs +++ b/primitives/manta/src/xcm.rs @@ -28,7 +28,6 @@ use crate::assets::{AssetIdLocationMap, UnitsPerSecond}; use frame_support::{ pallet_prelude::Get, traits::{fungibles::Mutate, tokens::ExistenceRequirement}, - weights::Weight, }; use frame_system::Config; use xcm::{ @@ -116,7 +115,7 @@ where R: TakeRevenue, { /// Weight - weight: Weight, + weight: u64, /// Refund Cache refund_cache: Option<(MultiLocation, u128, u128)>, @@ -134,7 +133,7 @@ where #[inline] fn new() -> Self { Self { - weight: Zero::zero(), + weight: 0, refund_cache: None, __: PhantomData, } @@ -143,7 +142,7 @@ where /// Buys weight for XCM execution. We always return the [`TooExpensive`](Error::TooExpensive) /// error if this fails. #[inline] - fn buy_weight(&mut self, weight: Weight, payment: Assets) -> Result { + fn buy_weight(&mut self, weight: u64, payment: Assets) -> Result { log::debug!( target: "FirstAssetTrader::buy_weight", "weight: {:?}, payment: {:?}", @@ -247,7 +246,7 @@ where /// #[inline] - fn refund_weight(&mut self, weight: Weight) -> Option { + fn refund_weight(&mut self, weight: u64) -> Option { if let Some((id, prev_amount, units_per_second)) = &mut self.refund_cache { let weight = weight.min(self.weight); self.weight = self.weight.saturating_sub(weight); diff --git a/primitives/session-keys/Cargo.toml b/primitives/session-keys/Cargo.toml index feda65fe3..464d8c837 100644 --- a/primitives/session-keys/Cargo.toml +++ b/primitives/session-keys/Cargo.toml @@ -8,13 +8,13 @@ version = '4.0.7' [dependencies] manta-primitives = { path = "../manta", default-features = false } -nimbus-primitives = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.1", default-features = false } -parity-scale-codec = { version = "3.1.2", default-features = false, features = ["derive"] } +nimbus-primitives = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.7", default-features = false } +parity-scale-codec = { version = "3.4.0", default-features = false, features = ["derive"] } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-application-crypto = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" } -sp-core = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false } +sp-application-crypto = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.37" } +sp-core = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.37" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false } [features] default = ["std"] diff --git a/runtime/calamari/Cargo.toml b/runtime/calamari/Cargo.toml index f8e9f27e1..85f9265f2 100644 --- a/runtime/calamari/Cargo.toml +++ b/runtime/calamari/Cargo.toml @@ -8,7 +8,7 @@ repository = 'https://github.com/Manta-Network/Manta/' version = '4.0.7' [dependencies] -codec = { package = "parity-scale-codec", version = '3.1.2', default-features = false, features = ["derive", "max-encoded-len"] } +codec = { package = "parity-scale-codec", version = '3.4.0', default-features = false, features = ["derive", "max-encoded-len"] } hex-literal = { version = '0.3.4', optional = true } log = { version = "0.4.16", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } @@ -16,77 +16,77 @@ serde = { version = "1.0.140", features = ['derive'], optional = true } smallvec = "1.8.0" # Substrate primitives -sp-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-application-crypto = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-arithmetic = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-inherents = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-io = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-offchain = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-version = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } +sp-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-application-crypto = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-arithmetic = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-core = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-inherents = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-io = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-offchain = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-version = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } # Substrate frames -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.28" } -frame-executive = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.28" } -frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -frame-try-runtime = { git = "https://github.com/paritytech/substrate.git", default-features = false, optional = true, branch = "polkadot-v0.9.28" } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.37" } +frame-executive = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.37" } +frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +frame-try-runtime = { git = "https://github.com/paritytech/substrate.git", default-features = false, optional = true, branch = "polkadot-v0.9.37" } # Substrate pallets -pallet-assets = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" } -pallet-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-collective = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" } -pallet-democracy = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" } -pallet-membership = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" } -pallet-multisig = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-preimage = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" } -pallet-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-treasury = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" } -pallet-utility = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -substrate-fixed = { git = "https://github.com/Manta-Network/substrate-fixed.git", tag = "v0.5.9", default-features = false } +pallet-assets = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.37" } +pallet-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-collective = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.37" } +pallet-democracy = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.37" } +pallet-membership = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.37" } +pallet-multisig = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-preimage = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.37" } +pallet-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-treasury = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.37" } +pallet-utility = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +substrate-fixed = { git = "https://github.com/Manta-Network/substrate-fixed.git", default-features = false } # Cumulus dependencies -cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } -cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } -cumulus-pallet-session-benchmarking = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, optional = true, branch = "polkadot-v0.9.28" } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } -cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } -cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } -cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } -cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } -parachain-info = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } +cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } +cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } +cumulus-pallet-session-benchmarking = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, optional = true, branch = "polkadot-v0.9.37" } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } +cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } +cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } +cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } +cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } +parachain-info = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } # Nimbus Dependencies -nimbus-primitives = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.1", default-features = false } -pallet-aura-style-filter = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.1", default-features = false } -pallet-author-inherent = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.1", default-features = false } +nimbus-primitives = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.7", default-features = false } +pallet-aura-style-filter = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.7", default-features = false } +pallet-author-inherent = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.7", default-features = false } # Polkadot dependencies -pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" } -pallet-xcm-benchmarks = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28", optional = true } -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" } -polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" } -xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" } -xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" } -xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" } +pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37" } +pallet-xcm-benchmarks = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37", optional = true } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37" } +polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37" } +xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37" } +xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37" } +xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37" } # Third party (vendored) dependencies -orml-traits = { git = 'https://github.com/manta-network/open-runtime-module-library.git', default-features = false, branch = "polkadot-v0.9.28" } -orml-xtokens = { git = 'https://github.com/manta-network/open-runtime-module-library.git', default-features = false, branch = "polkadot-v0.9.28" } +orml-traits = { git = 'https://github.com/manta-network/open-runtime-module-library.git', default-features = false, branch = "polkadot-v0.9.37" } +orml-xtokens = { git = 'https://github.com/manta-network/open-runtime-module-library.git', default-features = false, branch = "polkadot-v0.9.37" } # Self dependencies calamari-vesting = { path = '../../pallets/vesting', default-features = false } @@ -105,54 +105,53 @@ session-key-primitives = { path = '../../primitives/session-keys', default-featu targets = ['x86_64-unknown-linux-gnu'] [build-dependencies] -substrate-wasm-builder = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } +substrate-wasm-builder = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } [dev-dependencies] lazy_static = "1.4.0" -reqwest = { version = "0.11", features = ["blocking"] } +reqwest = { version = "0.11.6", features = ["blocking"] } serde_json = "1.0" # 3rd dependencies -codec = { package = "parity-scale-codec", version = "3.1.2" } +codec = { package = "parity-scale-codec", version = "3.4.0" } scale-info = { version = "2.1.2", features = ["derive"] } # Substrate dependencies -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -pallet-utility = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +pallet-utility = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } # Polkadot dependencies -pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } -polkadot-core-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } -polkadot-runtime-parachains = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } -xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } -xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } -xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } -xcm-simulator = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } +pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } +polkadot-core-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } +polkadot-runtime-parachains = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } +xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } +xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } +xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } +xcm-simulator = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } # Cumulus dependencies -cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" } -cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" } -cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.28" } -cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.28" } -parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" } +cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.37" } +cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.37" } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.37" } +cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.37" } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.37" } +cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.37" } +parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.37" } # Orml dependencies -orml-traits = { git = "https://github.com/manta-network/open-runtime-module-library.git", branch = "polkadot-v0.9.28" } -orml-xtokens = { git = "https://github.com/manta-network/open-runtime-module-library.git", branch = "polkadot-v0.9.28" } +orml-traits = { git = "https://github.com/manta-network/open-runtime-module-library.git", branch = "polkadot-v0.9.37" } +orml-xtokens = { git = "https://github.com/manta-network/open-runtime-module-library.git", branch = "polkadot-v0.9.37" } # Self dependencies pallet-asset-manager = { path = '../../pallets/asset-manager' } runtime-common = { path = '../common', features = ["test-helpers"] } - [features] default = ['std'] runtime-benchmarks = [ @@ -160,8 +159,8 @@ runtime-benchmarks = [ 'hex-literal', 'sp-runtime/runtime-benchmarks', 'xcm-builder/runtime-benchmarks', - 'frame-benchmarking', - 'frame-system-benchmarking', + 'frame-benchmarking/runtime-benchmarks', + 'frame-system-benchmarking/runtime-benchmarks', 'frame-support/runtime-benchmarks', 'frame-system/runtime-benchmarks', 'manta-collator-selection/runtime-benchmarks', @@ -187,13 +186,15 @@ runtime-benchmarks = [ 'cumulus-pallet-xcmp-queue/runtime-benchmarks', 'cumulus-pallet-parachain-system/runtime-benchmarks', 'pallet-manta-pay/runtime-benchmarks', + 'pallet-xcm-benchmarks/runtime-benchmarks', 'pallet-manta-sbt/runtime-benchmarks', - 'pallet-xcm-benchmarks', ] try-runtime = [ - 'frame-executive/try-runtime', 'frame-try-runtime', + 'frame-executive/try-runtime', 'frame-system/try-runtime', + 'frame-support/try-runtime', + 'pallet-aura/try-runtime', 'pallet-authorship/try-runtime', 'pallet-balances/try-runtime', 'pallet-parachain-staking/try-runtime', @@ -211,7 +212,20 @@ try-runtime = [ 'pallet-assets/try-runtime', 'pallet-tx-pause/try-runtime', 'pallet-asset-manager/try-runtime', + 'pallet-xcm/try-runtime', 'runtime-common/try-runtime', + 'parachain-info/try-runtime', + 'cumulus-pallet-parachain-system/try-runtime', + 'cumulus-pallet-xcmp-queue/try-runtime', + 'cumulus-pallet-dmp-queue/try-runtime', + 'pallet-aura-style-filter/try-runtime', + 'pallet-author-inherent/try-runtime', + 'manta-collator-selection/try-runtime', + 'cumulus-pallet-xcm/try-runtime', + 'orml-xtokens/try-runtime', + 'pallet-manta-pay/try-runtime', + 'calamari-vesting/try-runtime', + 'pallet-manta-sbt/try-runtime', ] # Set timing constants (e.g. session period) to faster versions to speed up testing. fast-runtime = [] @@ -236,6 +250,7 @@ std = [ 'frame-system/std', 'frame-system-rpc-runtime-api/std', 'frame-try-runtime/std', + 'frame-system-benchmarking/std', 'pallet-authorship/std', 'pallet-balances/std', 'pallet-multisig/std', @@ -260,12 +275,12 @@ std = [ 'cumulus-pallet-parachain-system/std', 'cumulus-pallet-dmp-queue/std', "cumulus-pallet-xcmp-queue/std", - "cumulus-pallet-xcm/std", - "cumulus-primitives-core/std", - "cumulus-primitives-timestamp/std", - "cumulus-primitives-utility/std", - "pallet-author-inherent/std", - "pallet-aura-style-filter/std", + 'cumulus-pallet-xcm/std', + 'cumulus-primitives-core/std', + 'cumulus-primitives-timestamp/std', + 'cumulus-primitives-utility/std', + 'pallet-author-inherent/std', + 'pallet-aura-style-filter/std', 'session-key-primitives/std', 'xcm/std', 'xcm-builder/std', diff --git a/runtime/calamari/src/assets_config.rs b/runtime/calamari/src/assets_config.rs index a3794d011..af9101956 100644 --- a/runtime/calamari/src/assets_config.rs +++ b/runtime/calamari/src/assets_config.rs @@ -15,8 +15,9 @@ // along with Manta. If not, see . use super::{ - weights, xcm_config::SelfReserve, AssetManager, Assets, Balances, Event, - NativeTokenExistentialDeposit, Origin, Runtime, TechnicalCollective, Timestamp, KMA, + weights, xcm_config::SelfReserve, AssetManager, Assets, Balances, + NativeTokenExistentialDeposit, Runtime, RuntimeEvent, RuntimeOrigin, TechnicalCollective, + Timestamp, KMA, }; use manta_primitives::{ @@ -34,7 +35,8 @@ use manta_primitives::{ use frame_support::{ pallet_prelude::DispatchResult, parameter_types, - traits::{ConstU128, ConstU16, ConstU32, ConstU64, EitherOfDiverse}, + traits::{AsEnsureOriginWithArg, ConstU128, ConstU16, ConstU32, EitherOfDiverse}, + weights::Weight, PalletId, }; @@ -52,7 +54,7 @@ parameter_types! { } impl pallet_assets::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CalamariAssetId; type Currency = Balances; @@ -66,6 +68,15 @@ impl pallet_assets::Config for Runtime { type Freezer = (); type Extra = (); type WeightInfo = weights::pallet_assets::SubstrateWeight; + type RemoveItemsLimit = ConstU32<1000>; + type AssetIdParameter = CalamariAssetId; + #[cfg(feature = "runtime-benchmarks")] + type CreateOrigin = AsEnsureOriginWithArg>; + #[cfg(not(feature = "runtime-benchmarks"))] + type CreateOrigin = AsEnsureOriginWithArg>; + type CallbackHandle = (); + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); } pub struct CalamariAssetRegistry; @@ -86,7 +97,7 @@ impl AssetRegistry for CalamariAssetRegistry { is_sufficient: bool, ) -> DispatchResult { Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), asset_id, sp_runtime::MultiAddress::Id(AssetManager::account_id()), is_sufficient, @@ -94,7 +105,7 @@ impl AssetRegistry for CalamariAssetRegistry { )?; Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), asset_id, metadata.name, metadata.symbol, @@ -108,7 +119,7 @@ impl AssetRegistry for CalamariAssetRegistry { metadata: AssetStorageMetadata, ) -> DispatchResult { Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), *asset_id, metadata.name, metadata.symbol, @@ -163,7 +174,7 @@ impl AssetConfig for CalamariAssetConfig { } impl pallet_asset_manager::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AssetId = CalamariAssetId; type Balance = Balance; type Location = AssetLocation; @@ -178,7 +189,7 @@ parameter_types! { } impl pallet_manta_pay::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_manta_pay::SubstrateWeight; type AssetConfig = CalamariAssetConfig; type PalletId = MantaPayPalletId; @@ -186,10 +197,11 @@ impl pallet_manta_pay::Config for Runtime { parameter_types! { pub const MantaSbtPalletId: PalletId = MANTA_SBT_PALLET_ID; + pub const MinimumWeightRemainInBlock: Weight = Weight::from_ref_time(25 * WEIGHT_PER_MILLIS); } impl pallet_manta_sbt::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type PalletId = MantaSbtPalletId; type Currency = Balances; type MintsPerReserve = ConstU16<5>; @@ -200,7 +212,7 @@ impl pallet_manta_sbt::Config for Runtime { EnsureRoot, pallet_collective::EnsureProportionAtLeast, >; - type MinimumWeightRemainInBlock = ConstU64<{ 25 * WEIGHT_PER_MILLIS }>; + type MinimumWeightRemainInBlock = MinimumWeightRemainInBlock; type Now = Timestamp; type WeightInfo = weights::pallet_manta_sbt::SubstrateWeight; } diff --git a/runtime/calamari/src/fee.rs b/runtime/calamari/src/fee.rs index 0531a5f56..ebfe232be 100644 --- a/runtime/calamari/src/fee.rs +++ b/runtime/calamari/src/fee.rs @@ -47,7 +47,7 @@ mod multiplier_tests { sp_api_hidden_includes_construct_runtime::hidden_include::traits::Hooks, Runtime, RuntimeBlockWeights as BlockWeights, System, TransactionPayment, KMA, }; - use frame_support::{dispatch::DispatchInfo, weights::DispatchClass}; + use frame_support::dispatch::{DispatchClass, DispatchInfo}; use manta_primitives::constants::time::DAYS; use pallet_transaction_payment::Multiplier; use runtime_common::MinimumMultiplier; diff --git a/runtime/calamari/src/lib.rs b/runtime/calamari/src/lib.rs index d350846d3..c5b654cf4 100644 --- a/runtime/calamari/src/lib.rs +++ b/runtime/calamari/src/lib.rs @@ -40,12 +40,14 @@ use sp_version::NativeVersion; use sp_version::RuntimeVersion; use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, + dispatch::DispatchClass, + parameter_types, traits::{ - ConstU128, ConstU16, ConstU32, ConstU8, Contains, Currency, EitherOfDiverse, Get, IsInVec, + ConstU128, ConstU32, ConstU8, Contains, Currency, EitherOfDiverse, IsInVec, NeverEnsureOrigin, PrivilegeCmp, }, - weights::{ConstantMultiplier, DispatchClass, Weight}, + weights::{ConstantMultiplier, Weight}, PalletId, }; use frame_system::{ @@ -153,7 +155,9 @@ pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(70); /// We allow for 0.5 seconds of compute with a 6 second average block time. -pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2; +pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_ref_time(WEIGHT_PER_SECOND) + .saturating_div(2) + .set_proof_size(cumulus_primitives_core::relay_chain::v2::MAX_POV_SIZE as u64); parameter_types! { pub const Version: RuntimeVersion = VERSION; @@ -185,8 +189,8 @@ parameter_types! { } impl pallet_tx_pause::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type MaxCallNames = ConstU32<25>; type PauseOrigin = EitherOfDiverse< EnsureRoot, @@ -199,11 +203,11 @@ impl pallet_tx_pause::Config for Runtime { // Don't allow permission-less asset creation. pub struct BaseFilter; -impl Contains for BaseFilter { - fn contains(call: &Call) -> bool { +impl Contains for BaseFilter { + fn contains(call: &RuntimeCall) -> bool { if matches!( call, - Call::Timestamp(_) | Call::ParachainSystem(_) | Call::System(_) + RuntimeCall::Timestamp(_) | RuntimeCall::ParachainSystem(_) | RuntimeCall::System(_) ) { // always allow core call // pallet-timestamp and parachainSystem could not be filtered because @@ -220,29 +224,29 @@ impl Contains for BaseFilter { // keep CallFilter with explicit true/false for documentation match call { // Explicitly DISALLOWED calls ( Pallet user extrinsics we don't want used WITH REASONING ) - | Call::Assets(_) // Filter Assets. Assets should only be accessed by AssetManager. + | RuntimeCall::Assets(_) // Filter Assets. Assets should only be accessed by AssetManager. // It's a call only for vesting crowdloan contributors' token, normal user should not use it. - | Call::CalamariVesting(calamari_vesting::Call::vested_transfer {..}) + | RuntimeCall::CalamariVesting(calamari_vesting::Call::vested_transfer {..}) // For now disallow public proposal workflows, treasury workflows. - | Call::Democracy( + | RuntimeCall::Democracy( pallet_democracy::Call::propose {..} | pallet_democracy::Call::second {..} | pallet_democracy::Call::cancel_proposal {..} | pallet_democracy::Call::clear_public_proposals {..}) - | Call::Treasury(_) // Treasury calls are filtered while it is accumulating funds. + | RuntimeCall::Treasury(_) // Treasury calls are filtered while it is accumulating funds. // Everything except transfer() is filtered out until it is practically needed: - | Call::XTokens( + | RuntimeCall::XTokens( orml_xtokens::Call::transfer_with_fee {..} | orml_xtokens::Call::transfer_multiasset {..} | orml_xtokens::Call::transfer_multiasset_with_fee {..} | orml_xtokens::Call::transfer_multiassets {..}) // Filter callables from XCM pallets, we use XTokens exclusively - | Call::XcmpQueue(_) | Call::PolkadotXcm(_) | Call::DmpQueue(_) => false, + | RuntimeCall::XcmpQueue(_) | RuntimeCall::PolkadotXcm(_) | RuntimeCall::DmpQueue(_) => false, // Explicitly ALLOWED calls - | Call::Authorship(_) - | Call::Multisig(_) - | Call::Democracy(pallet_democracy::Call::vote {..} + | RuntimeCall::Authorship(_) + | RuntimeCall::Multisig(_) + | RuntimeCall::Democracy(pallet_democracy::Call::vote {..} | pallet_democracy::Call::emergency_cancel {..} | pallet_democracy::Call::external_propose {..} | pallet_democracy::Call::external_propose_default {..} @@ -250,28 +254,21 @@ impl Contains for BaseFilter { | pallet_democracy::Call::fast_track {..} | pallet_democracy::Call::veto_external {..} | pallet_democracy::Call::cancel_referendum {..} - | pallet_democracy::Call::cancel_queued {..} | pallet_democracy::Call::delegate {..} | pallet_democracy::Call::undelegate {..} - | pallet_democracy::Call::note_preimage {..} - | pallet_democracy::Call::note_preimage_operational {..} - | pallet_democracy::Call::note_imminent_preimage {..} - | pallet_democracy::Call::note_imminent_preimage_operational {..} - | pallet_democracy::Call::reap_preimage {..} | pallet_democracy::Call::unlock {..} | pallet_democracy::Call::remove_vote {..} | pallet_democracy::Call::remove_other_vote {..} - | pallet_democracy::Call::enact_proposal {..} | pallet_democracy::Call::blacklist {..}) - | Call::Council(_) - | Call::TechnicalCommittee(_) - | Call::CouncilMembership(_) - | Call::TechnicalMembership(_) - | Call::Scheduler(_) - | Call::CalamariVesting(_) - | Call::Session(_) // User must be able to set their session key when applying for a collator - | Call::AuthorInherent(pallet_author_inherent::Call::kick_off_authorship_validation {..}) // executes unsigned on every block - | Call::ParachainStaking( + | RuntimeCall::Council(_) + | RuntimeCall::TechnicalCommittee(_) + | RuntimeCall::CouncilMembership(_) + | RuntimeCall::TechnicalMembership(_) + | RuntimeCall::Scheduler(_) + | RuntimeCall::CalamariVesting(_) + | RuntimeCall::Session(_) // User must be able to set their session key when applying for a collator + | RuntimeCall::AuthorInherent(pallet_author_inherent::Call::kick_off_authorship_validation {..}) // executes unsigned on every block + | RuntimeCall::ParachainStaking( // Collator extrinsics pallet_parachain_staking::Call::join_candidates{..} | pallet_parachain_staking::Call::schedule_leave_candidates{..} @@ -293,14 +290,14 @@ impl Contains for BaseFilter { | pallet_parachain_staking::Call::schedule_delegator_bond_less{..} | pallet_parachain_staking::Call::execute_delegation_request{..} | pallet_parachain_staking::Call::cancel_delegation_request{..}) - | Call::Balances(_) - | Call::Preimage(_) - | Call::MantaPay(_) - | Call::MantaSbt(_) - | Call::XTokens(orml_xtokens::Call::transfer {..} + | RuntimeCall::Balances(_) + | RuntimeCall::Preimage(_) + | RuntimeCall::MantaPay(_) + | RuntimeCall::MantaSbt(_) + | RuntimeCall::XTokens(orml_xtokens::Call::transfer {..} | orml_xtokens::Call::transfer_multicurrencies {..}) - | Call::TransactionPause(_) - | Call::Utility(_) => true, + | RuntimeCall::TransactionPause(_) + | RuntimeCall::Utility(_) => true, // DISALLOW anything else | _ => false @@ -314,15 +311,15 @@ impl frame_system::Config for Runtime { type BlockWeights = RuntimeBlockWeights; type BlockLength = RuntimeBlockLength; type AccountId = AccountId; - type Call = Call; + type RuntimeCall = RuntimeCall; type Lookup = AccountIdLookup; type Index = Index; type BlockNumber = BlockNumber; type Hash = Hash; type Hashing = BlakeTwo256; type Header = Header; - type Event = Event; - type Origin = Origin; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; type BlockHashCount = BlockHashCount; type DbWeight = RocksDbWeight; type Version = Version; @@ -364,7 +361,7 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type Balance = Balance; type DustRemoval = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = NativeTokenExistentialDeposit; type AccountStore = frame_system::Pallet; type WeightInfo = weights::pallet_balances::SubstrateWeight; @@ -382,7 +379,7 @@ impl pallet_transaction_payment::Config for Runtime { type LengthToFee = ConstantMultiplier; type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; type OperationalFeeMultiplier = ConstU8<5>; - type Event = Event; + type RuntimeEvent = RuntimeEvent; } parameter_types! { @@ -393,18 +390,18 @@ parameter_types! { } impl pallet_multisig::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Currency = Balances; type DepositBase = DepositBase; type DepositFactor = DepositFactor; - type MaxSignatories = ConstU16<100>; + type MaxSignatories = ConstU32<100>; type WeightInfo = weights::pallet_multisig::SubstrateWeight; } impl pallet_utility::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type PalletsOrigin = OriginCaller; type WeightInfo = weights::pallet_utility::SubstrateWeight; } @@ -421,8 +418,7 @@ parameter_types! { } impl pallet_democracy::Config for Runtime { - type Proposal = Call; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type EnactmentPeriod = EnactmentPeriod; type VoteLockingPeriod = EnactmentPeriod; @@ -461,14 +457,15 @@ impl pallet_democracy::Config for Runtime { // only do it once and it lasts only for the cool-off period. type VetoOrigin = pallet_collective::EnsureMember; type CooloffPeriod = CooloffPeriod; - type PreimageByteDeposit = PreimageByteDeposit; - type OperationalPreimageOrigin = pallet_collective::EnsureMember; type Slash = (); type Scheduler = Scheduler; type PalletsOrigin = OriginCaller; type MaxVotes = ConstU32<100>; type WeightInfo = weights::pallet_democracy::SubstrateWeight; type MaxProposals = ConstU32<100>; + type Preimages = Preimage; + type MaxDeposits = ConstU32<100>; + type MaxBlacklisted = ConstU32<100>; } parameter_types! { @@ -479,9 +476,9 @@ parameter_types! { type CouncilCollective = pallet_collective::Instance1; impl pallet_collective::Config for Runtime { - type Origin = Origin; - type Proposal = Call; - type Event = Event; + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; type MotionDuration = CouncilMotionDuration; type MaxProposals = ConstU32<100>; type MaxMembers = ConstU32<100>; @@ -496,7 +493,7 @@ pub type EnsureRootOrThreeFourthsCouncil = EitherOfDiverse< type CouncilMembershipInstance = pallet_membership::Instance1; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrThreeFourthsCouncil; type RemoveOrigin = EnsureRootOrThreeFourthsCouncil; type SwapOrigin = EnsureRootOrThreeFourthsCouncil; @@ -514,9 +511,9 @@ parameter_types! { type TechnicalCollective = pallet_collective::Instance2; impl pallet_collective::Config for Runtime { - type Origin = Origin; - type Proposal = Call; - type Event = Event; + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; type MotionDuration = TechnicalMotionDuration; type MaxProposals = ConstU32<100>; type MaxMembers = ConstU32<100>; @@ -526,7 +523,7 @@ impl pallet_collective::Config for Runtime { type TechnicalMembershipInstance = pallet_membership::Instance2; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrThreeFourthsCouncil; type RemoveOrigin = EnsureRootOrThreeFourthsCouncil; type SwapOrigin = EnsureRootOrThreeFourthsCouncil; @@ -562,7 +559,7 @@ impl pallet_treasury::Config for Runtime { type Currency = Balances; type ApproveOrigin = EnsureRootOrThreeFifthsCouncil; type RejectOrigin = EnsureRootOrMoreThanHalfCouncil; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnSlash = Treasury; type ProposalBond = ProposalBond; type ProposalBondMinimum = ProposalBondMinimum; @@ -593,7 +590,7 @@ parameter_types! { pub LeaveDelayRounds: BlockNumber = prod_or_fast!(28,1,"CALAMARI_LEAVEDELAYROUNDS"); // == 7 * DAYS / 6 * HOURS } impl pallet_parachain_staking::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type BlockAuthor = AuthorInherent; type MonetaryGovernanceOrigin = EnsureRoot; @@ -678,17 +675,16 @@ impl PrivilegeCmp for OriginPrivilegeCmp { } impl pallet_scheduler::Config for Runtime { - type Event = Event; - type Origin = Origin; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; type PalletsOrigin = OriginCaller; - type Call = Call; + type RuntimeCall = RuntimeCall; type MaximumWeight = MaximumSchedulerWeight; type ScheduleOrigin = ScheduleOrigin; type MaxScheduledPerBlock = ConstU32<50>; // 50 scheduled calls at most in the queue for a single block. type WeightInfo = weights::pallet_scheduler::SubstrateWeight; type OriginPrivilegeCmp = OriginPrivilegeCmp; - type PreimageProvider = Preimage; - type NoPreimagePostponement = NoPreimagePostponement; + type Preimages = Preimage; } parameter_types! { @@ -700,10 +696,9 @@ parameter_types! { impl pallet_preimage::Config for Runtime { type WeightInfo = weights::pallet_preimage::SubstrateWeight; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type ManagerOrigin = EnsureRoot; - type MaxSize = PreimageMaxSize; // The sum of the below 2 amounts will get reserved every time someone submits a preimage. // Their sum will be unreserved when the preimage is requested, i.e. when it is going to be used. type BaseDeposit = PreimageBaseDeposit; @@ -727,7 +722,7 @@ impl ShouldEndSession for NeverEndSession { } impl pallet_session::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorId = ::AccountId; // we don't have stash and controller, thus we don't need the convert as well. type ValidatorIdOf = IdentityCollator; @@ -762,7 +757,7 @@ pub type CollatorSelectionUpdateOrigin = EitherOfDiverse< >; impl manta_collator_selection::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type UpdateOrigin = CollatorSelectionUpdateOrigin; type PotId = PotId; @@ -785,7 +780,7 @@ parameter_types! { impl calamari_vesting::Config for Runtime { type Currency = Balances; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Timestamp = Timestamp; type MinVestedTransfer = MinVestedTransfer; type MaxScheduleLength = ConstU32<6>; @@ -880,9 +875,10 @@ pub type SignedExtra = ( pallet_transaction_payment::ChargeTransactionPayment, ); /// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic; /// Extrinsic type that has already been checked. -pub type CheckedExtrinsic = generic::CheckedExtrinsic; +pub type CheckedExtrinsic = generic::CheckedExtrinsic; /// Types for runtime upgrading. /// Each type should implement trait `OnRuntimeUpgrade`. @@ -893,7 +889,7 @@ pub type Executive = frame_executive::Executive< Block, frame_system::ChainContext, Runtime, - AllPalletsReversedWithSystemFirst, + AllPalletsWithSystem, OnRuntimeUpgradeHooks, >; @@ -918,10 +914,7 @@ mod benches { [pallet_scheduler, Scheduler] [pallet_session, SessionBench::] [pallet_assets, Assets] - // XCM - [cumulus_pallet_xcmp_queue, XcmpQueue] - [pallet_xcm_benchmarks::fungible, pallet_xcm_benchmarks::fungible::Pallet::] - [pallet_xcm_benchmarks::generic, pallet_xcm_benchmarks::generic::Pallet::] + // Manta pallets [calamari_vesting, CalamariVesting] [pallet_tx_pause, TransactionPause] @@ -930,6 +923,11 @@ mod benches { [pallet_parachain_staking, ParachainStaking] [pallet_manta_pay, MantaPay] [pallet_manta_sbt, MantaSbt] + // XCM + [cumulus_pallet_xcmp_queue, XcmpQueue] + [pallet_xcm_benchmarks::fungible, pallet_xcm_benchmarks::fungible::Pallet::] + [pallet_xcm_benchmarks::generic, pallet_xcm_benchmarks::generic::Pallet::] + // Nimbus pallets [pallet_author_inherent, AuthorInherent] ); @@ -1038,17 +1036,17 @@ impl_runtime_apis! { } } - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi for Runtime { fn query_call_info( - call: Call, + call: RuntimeCall, len: u32, ) -> pallet_transaction_payment::RuntimeDispatchInfo { TransactionPayment::query_call_info(call, len) } fn query_call_fee_details( - call: Call, + call: RuntimeCall, len: u32, ) -> pallet_transaction_payment::FeeDetails { TransactionPayment::query_call_fee_details(call, len) @@ -1118,13 +1116,18 @@ impl_runtime_apis! { #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { - fn on_runtime_upgrade() -> (Weight, Weight) { - let weight = Executive::try_runtime_upgrade().unwrap(); + fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { + let weight = Executive::try_runtime_upgrade(checks).unwrap(); (weight, RuntimeBlockWeights::get().max_block) } - fn execute_block_no_check(block: Block) -> Weight { - Executive::execute_block_no_check(block) + fn execute_block( + block: Block, + state_root_check: bool, + signature_check: bool, + select: frame_try_runtime::TryStateSelect + ) -> Weight { + Executive::try_execute_block(block, state_root_check, signature_check, select).expect("try_execute_block failed") } } @@ -1142,7 +1145,7 @@ impl_runtime_apis! { let mut list = Vec::::new(); list_benchmarks!(list, extra); - let storage_info = AllPalletsReversedWithSystemFirst::storage_info(); + let storage_info = AllPalletsWithSystem::storage_info(); (list, storage_info) } @@ -1224,7 +1227,7 @@ impl_runtime_apis! { } impl pallet_xcm_benchmarks::generic::Config for Runtime { - type Call = Call; + type RuntimeCall = RuntimeCall; fn worst_case_response() -> (u64, Response) { (0u64, Response::Version(Default::default())) diff --git a/runtime/calamari/src/migrations/asset_id.rs b/runtime/calamari/src/migrations/asset_id.rs index 5fe14a59d..c87dacf9a 100644 --- a/runtime/calamari/src/migrations/asset_id.rs +++ b/runtime/calamari/src/migrations/asset_id.rs @@ -104,6 +104,21 @@ pub struct OldAssetRegistrarMetadata { pub is_sufficient: bool, } +type PreUpgradeTypes = ( + Vec<(OldAssetId, AssetLocation)>, + Vec<(AssetLocation, OldAssetId)>, + Vec<(OldAssetId, OldAssetRegistrarMetadata)>, + Vec<(OldAssetId, u128)>, + u32, + Vec>, + Vec<( + OldAssetId, + ::AccountId, + AssetAccountOf, + )>, + Vec>, +); + pub const INITIAL_PALLET_ASSETS_MANAGER_VERSION: u16 = 1; pub const INITIAL_PALLET_ASSETS_VERSION: u16 = 0; @@ -125,7 +140,7 @@ where || assets_storage_version != INITIAL_PALLET_ASSETS_VERSION { log::info!("Aborting migration due to unexpected on-chain storage versions for pallet-assets-manager: {:?} and pallet-assets: {:?}. Expectation was: {:?} and {:?}.", asset_manager_storage_version, assets_storage_version, INITIAL_PALLET_ASSETS_MANAGER_VERSION, INITIAL_PALLET_ASSETS_VERSION ); - return T::DbWeight::get().reads(num_reads as Weight); + return T::DbWeight::get().reads(num_reads); } // AssetIdLocation @@ -253,8 +268,8 @@ where Some(value) => value, None => { return T::DbWeight::get() - .reads(num_reads as Weight) - .saturating_add(T::DbWeight::get().writes(num_writes as Weight)); + .reads(num_reads) + .saturating_add(T::DbWeight::get().writes(num_writes as u64)); } }; let new_value: NewAssetId = value as NewAssetId; @@ -350,14 +365,12 @@ where log::info!(target: "assets", "✅ Storage migration for Assets has been executed successfully and storage version has been update to: {:?}.", INITIAL_PALLET_ASSETS_VERSION + 1); T::DbWeight::get() - .reads(num_reads as Weight) - .saturating_add(T::DbWeight::get().writes(num_writes as Weight)) + .reads(num_reads) + .saturating_add(T::DbWeight::get().writes(num_writes as u64)) } #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result<(), &'static str> { - use frame_support::traits::OnRuntimeUpgradeHelpersExt; - + fn pre_upgrade() -> Result, &'static str> { let asset_manager_storage_version = as GetStorageVersion>::on_chain_storage_version(); if asset_manager_storage_version != INITIAL_PALLET_ASSETS_MANAGER_VERSION { @@ -390,13 +403,12 @@ where .count(), 0 ); - let stored_data_old: Vec<_> = + let asset_id_location_stored_data_old: Vec<_> = storage_key_iter::( pallet_prefix, storage_item_prefix, ) .collect(); - Self::set_temp_storage(stored_data_old, "asset_id_location_stored_data_old"); // LocationAssetId @@ -410,13 +422,12 @@ where .count(), 0 ); - let stored_data_old: Vec<_> = + let location_asset_id_stored_data_old: Vec<_> = storage_key_iter::( pallet_prefix, storage_item_prefix, ) .collect(); - Self::set_temp_storage(stored_data_old, "location_asset_id_stored_data_old"); // AssetIdMetadata @@ -430,13 +441,12 @@ where .count(), 0 ); - let stored_data_old: Vec<_> = storage_key_iter::< - OldAssetId, - OldAssetRegistrarMetadata, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .collect(); - Self::set_temp_storage(stored_data_old, "asset_id_metadata_stored_data_old"); + let asset_id_metadata_stored_data_old: Vec<_> = + storage_key_iter::( + pallet_prefix, + storage_item_prefix, + ) + .collect(); // UnitsPerSecond @@ -450,21 +460,20 @@ where .count(), 0 ); - let stored_data_old: Vec<_> = storage_key_iter::( - pallet_prefix, - storage_item_prefix, - ) + let units_per_sec_stored_data_old: Vec<_> = storage_key_iter::< + OldAssetId, + u128, + Blake2_128Concat, + >(pallet_prefix, storage_item_prefix) .collect(); - Self::set_temp_storage(stored_data_old, "units_per_sec_stored_data_old"); // NextAssetId let pallet_prefix: &[u8] = b"AssetManager"; let storage_item_prefix: &[u8] = b"NextAssetId"; assert!(get_storage_value::(pallet_prefix, storage_item_prefix, &[]).is_none()); - let next_asset_id: OldAssetId = + let old_next_asset_id: OldAssetId = get_storage_value::(pallet_prefix, storage_item_prefix, &[]).unwrap(); - Self::set_temp_storage(next_asset_id, "next_asset_id"); // Asset @@ -483,7 +492,7 @@ where .count(), 0 ); - let stored_data_old: Vec<_> = storage_key_iter::< + let asset_map_stored_data_old: Vec<_> = storage_key_iter::< OldAssetId, pallet_assets::AssetDetails< ::Balance, @@ -493,7 +502,6 @@ where Blake2_128Concat, >(pallet_prefix, storage_item_prefix) .collect(); - Self::set_temp_storage(stored_data_old, "asset_map_stored_data_old"); // Account @@ -502,11 +510,10 @@ where stored_data_new.push(kvp); }); assert_eq!(stored_data_new.len(), 0); - let mut stored_data_old: Vec<_> = Vec::new(); + let mut account_map_stored_data_old: Vec<_> = Vec::new(); old::Account::::iter().for_each(|kvp| { - stored_data_old.push(kvp); + account_map_stored_data_old.push(kvp); }); - Self::set_temp_storage(stored_data_old, "account_map_stored_data_old"); // Metadata @@ -524,7 +531,7 @@ where .count(), 0 ); - let stored_data_old: Vec<_> = storage_key_iter::< + let metadata_map_stored_data_old: Vec<_> = storage_key_iter::< OldAssetId, pallet_assets::AssetMetadata< DepositBalanceOf, @@ -533,15 +540,22 @@ where Blake2_128Concat, >(pallet_prefix, storage_item_prefix) .collect(); - Self::set_temp_storage(stored_data_old, "metadata_map_stored_data_old"); - Ok(()) + Ok(( + asset_id_location_stored_data_old, + location_asset_id_stored_data_old, + asset_id_metadata_stored_data_old, + units_per_sec_stored_data_old, + old_next_asset_id, + asset_map_stored_data_old, + account_map_stored_data_old, + metadata_map_stored_data_old, + ) + .encode()) } #[cfg(feature = "try-runtime")] - fn post_upgrade() -> Result<(), &'static str> { - use frame_support::traits::OnRuntimeUpgradeHelpersExt; - + fn post_upgrade(state: Vec) -> Result<(), &'static str> { let asset_manager_storage_version = as GetStorageVersion>::on_chain_storage_version(); if asset_manager_storage_version != INITIAL_PALLET_ASSETS_MANAGER_VERSION + 1 { @@ -562,6 +576,17 @@ where // with the old storage keys, as the new u128 asset-id // would still decode into the old u32 values. + let ( + asset_id_location_stored_data_old, + location_asset_id_stored_data_old, + asset_id_metadata_stored_data_old, + units_per_sec_stored_data_old, + old_next_asset_id, + asset_map_stored_data_old, + account_map_stored_data_old, + metadata_map_stored_data_old, + ): PreUpgradeTypes = + Decode::decode(&mut &state[..]).expect("pre_upgrade provides a valid state; qed"); // AssetIdLocation let pallet_prefix: &[u8] = b"AssetManager"; @@ -572,13 +597,16 @@ where storage_item_prefix, ) .collect(); - let stored_data_old: Vec<(OldAssetId, AssetLocation)> = - Self::get_temp_storage("asset_id_location_stored_data_old").unwrap(); - assert_eq!(stored_data_old.len(), stored_data_new.len()); - stored_data_old.iter().for_each(|(key, value)| { - let check = (*key as NewAssetId, value.clone()); - assert!(stored_data_new.contains(&check)); - }); + assert_eq!( + asset_id_location_stored_data_old.len(), + stored_data_new.len() + ); + asset_id_location_stored_data_old + .iter() + .for_each(|(key, value)| { + let check = (*key as NewAssetId, value.clone()); + assert!(stored_data_new.contains(&check)); + }); log::info!("✅ Storage migration for AssetManager's AssetIdLocation storage item has been executed successfully."); let pallet_prefix: &[u8] = b"AssetManager"; @@ -589,13 +617,16 @@ where storage_item_prefix, ) .collect(); - let stored_data_old: Vec<(AssetLocation, OldAssetId)> = - Self::get_temp_storage("location_asset_id_stored_data_old").unwrap(); - assert_eq!(stored_data_old.len(), stored_data_new.len()); - stored_data_old.iter().for_each(|(key, value)| { - let check = (key.clone(), *value as NewAssetId); - assert!(stored_data_new.contains(&check)); - }); + assert_eq!( + location_asset_id_stored_data_old.len(), + stored_data_new.len() + ); + location_asset_id_stored_data_old + .iter() + .for_each(|(key, value)| { + let check = (key.clone(), *value as NewAssetId); + assert!(stored_data_new.contains(&check)); + }); log::info!("✅ Storage migration for AssetManager's LocationAssetId storage item has been executed successfully."); // AssetIdMetadata @@ -608,25 +639,28 @@ where Blake2_128Concat, >(pallet_prefix, storage_item_prefix) .collect(); - let stored_data_old: Vec<(OldAssetId, OldAssetRegistrarMetadata)> = - Self::get_temp_storage("asset_id_metadata_stored_data_old").unwrap(); - assert_eq!(stored_data_old.len(), stored_data_new.len()); - stored_data_old.iter().for_each(|(key, value)| { - let new_storage = ( - *key as NewAssetId, - AssetRegistryMetadata { - metadata: AssetStorageMetadata { - name: value.name.clone(), - symbol: value.symbol.clone(), - decimals: value.decimals, - is_frozen: value.is_frozen, + assert_eq!( + asset_id_metadata_stored_data_old.len(), + stored_data_new.len() + ); + asset_id_metadata_stored_data_old + .iter() + .for_each(|(key, value)| { + let new_storage = ( + *key as NewAssetId, + AssetRegistryMetadata { + metadata: AssetStorageMetadata { + name: value.name.clone(), + symbol: value.symbol.clone(), + decimals: value.decimals, + is_frozen: value.is_frozen, + }, + min_balance: value.min_balance, + is_sufficient: value.is_sufficient, }, - min_balance: value.min_balance, - is_sufficient: value.is_sufficient, - }, - ); - assert!(stored_data_new.contains(&new_storage)); - }); + ); + assert!(stored_data_new.contains(&new_storage)); + }); log::info!("✅ Storage migration for AssetManager's AssetIdMetadata storage item has been executed successfully."); // UnitsPerSecond @@ -638,13 +672,13 @@ where storage_item_prefix, ) .collect(); - let stored_data_old: Vec<(OldAssetId, u128)> = - Self::get_temp_storage("units_per_sec_stored_data_old").unwrap(); - assert_eq!(stored_data_old.len(), stored_data_new.len()); - stored_data_old.iter().for_each(|(key, value)| { - let check = (*key as NewAssetId, *value); - assert!(stored_data_new.contains(&check)); - }); + assert_eq!(units_per_sec_stored_data_old.len(), stored_data_new.len()); + units_per_sec_stored_data_old + .iter() + .for_each(|(key, value)| { + let check = (*key as NewAssetId, *value); + assert!(stored_data_new.contains(&check)); + }); log::info!("✅ Storage migration for AssetManager's UnitsPerSecond storage item has been executed successfully."); // NextAssetId @@ -653,7 +687,6 @@ where let storage_item_prefix: &[u8] = b"NextAssetId"; let next_asset_id: NewAssetId = get_storage_value::(pallet_prefix, storage_item_prefix, &[]).unwrap(); - let old_next_asset_id: u32 = Self::get_temp_storage("next_asset_id").unwrap(); assert_eq!(old_next_asset_id as u128, next_asset_id); log::info!("✅ Storage migration for AssetManager's NextAssetId storage item has been executed successfully."); @@ -671,10 +704,8 @@ where Blake2_128Concat, >(pallet_prefix, storage_item_prefix) .collect(); - let stored_data_old: Vec> = - Self::get_temp_storage("asset_map_stored_data_old").unwrap(); - assert_eq!(stored_data_old.len(), stored_data_new.len()); - stored_data_old.iter().for_each(|(key, value)| { + assert_eq!(asset_map_stored_data_old.len(), stored_data_new.len()); + asset_map_stored_data_old.iter().for_each(|(key, value)| { let check = (*key as NewAssetId, value.clone()); assert!(stored_data_new.contains(&check)); }); @@ -688,13 +719,8 @@ where Account::::iter().for_each(|(asset_id_key, account_id_key, value)| { stored_data_new.push((asset_id_key, account_id_key, value)); }); - let stored_data_old: Vec<( - OldAssetId, - ::AccountId, - AssetAccountOf, - )> = Self::get_temp_storage("account_map_stored_data_old").unwrap(); - assert_eq!(stored_data_old.len(), stored_data_new.len()); - stored_data_old + assert_eq!(account_map_stored_data_old.len(), stored_data_new.len()); + account_map_stored_data_old .iter() .for_each(|(asset_id_key, account_id_key, value)| { let check = ( @@ -721,13 +747,13 @@ where Blake2_128Concat, >(pallet_prefix, storage_item_prefix) .collect(); - let stored_data_old: Vec> = - Self::get_temp_storage("metadata_map_stored_data_old").unwrap(); - assert_eq!(stored_data_old.len(), stored_data_new.len()); - stored_data_old.iter().for_each(|(key, value)| { - let check = (*key as NewAssetId, value.clone()); - assert!(stored_data_new.contains(&check)); - }); + assert_eq!(metadata_map_stored_data_old.len(), stored_data_new.len()); + metadata_map_stored_data_old + .iter() + .for_each(|(key, value)| { + let check = (*key as NewAssetId, value.clone()); + assert!(stored_data_new.contains(&check)); + }); log::info!( "✅ Storage migration for Assets' Metadata storage item has been executed successfully." ); diff --git a/runtime/calamari/src/migrations/init_sbt_counter.rs b/runtime/calamari/src/migrations/init_sbt_counter.rs index 492cf42bc..ed0cee603 100644 --- a/runtime/calamari/src/migrations/init_sbt_counter.rs +++ b/runtime/calamari/src/migrations/init_sbt_counter.rs @@ -16,6 +16,7 @@ use frame_support::{pallet_prelude::*, traits::OnRuntimeUpgrade}; use sp_runtime::traits::PhantomData; +use sp_std::vec::Vec; pub struct InitializeSbtCounter(PhantomData); @@ -38,17 +39,17 @@ where } #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result<(), &'static str> { + fn pre_upgrade() -> Result, &'static str> { let storage_version = pallet_manta_sbt::Pallet::::on_chain_storage_version(); if storage_version == 0 { - Ok(()) + Ok(Vec::new()) } else { Err("Storage version has already been migrated") } } #[cfg(feature = "try-runtime")] - fn post_upgrade() -> Result<(), &'static str> { + fn post_upgrade(_state: Vec) -> Result<(), &'static str> { let storage_version = pallet_manta_sbt::Pallet::::on_chain_storage_version(); if storage_version == 1 { Ok(()) diff --git a/runtime/calamari/src/migrations/staking.rs b/runtime/calamari/src/migrations/staking.rs index 03690d64e..c6fab80ca 100644 --- a/runtime/calamari/src/migrations/staking.rs +++ b/runtime/calamari/src/migrations/staking.rs @@ -16,12 +16,10 @@ use crate::{ sp_api_hidden_includes_construct_runtime::hidden_include::traits::{Currency, OriginTrait}, - Balance, Get, Vec, Weight, + Balance, Vec, Weight, }; use core::marker::PhantomData; -use frame_support::traits::OnRuntimeUpgrade; -#[cfg(feature = "try-runtime")] -use frame_support::traits::OnRuntimeUpgradeHelpersExt; +use frame_support::traits::{Get, OnRuntimeUpgrade}; use sp_runtime::traits::UniqueSaturatedInto; /// Migration to move old invulnerables to the staking set on upgrade @@ -33,7 +31,7 @@ where + pallet_parachain_staking::Config + pallet_session::Config + manta_collator_selection::Config, - <::Origin as OriginTrait>::AccountId: + <::RuntimeOrigin as OriginTrait>::AccountId: From<::AccountId>, pallet_parachain_staking::BalanceOf: Into + From, <::Currency as Currency< @@ -46,7 +44,7 @@ where { fn on_runtime_upgrade() -> Weight where - <::Origin as OriginTrait>::AccountId: + <::RuntimeOrigin as OriginTrait>::AccountId: From<::AccountId>, pallet_parachain_staking::BalanceOf: Into + From, { @@ -61,7 +59,7 @@ where // 2. Clear the invulnerables list let _ = manta_collator_selection::Pallet::::set_invulnerables( - ::Origin::root(), + ::RuntimeOrigin::root(), Vec::new(), ); @@ -72,14 +70,14 @@ where let desired_candidates = manta_collator_selection::Pallet::::desired_candidates(); if new_n_of_candidates > desired_candidates { let _ = manta_collator_selection::Pallet::::set_desired_candidates( - ::Origin::root(), + ::RuntimeOrigin::root(), new_n_of_candidates, ); } // 3.2 Ensure the candidacy bond for collator_selection is actually 400k // NOTE: This is needed to migrate already deployed testnets like Baikal let _ = manta_collator_selection::Pallet::::set_candidacy_bond( - ::Origin::root(), + ::RuntimeOrigin::root(), T::MinWhitelistCandidateStk::get().unique_saturated_into(), ); @@ -91,7 +89,7 @@ where ::Currency::free_balance(&invuln) ); let _ = manta_collator_selection::Pallet::::register_candidate( - ::Origin::root(), + ::RuntimeOrigin::root(), invuln.clone(), ); log::info!( @@ -121,7 +119,7 @@ where // Setting total_selected will take effect at the beginning of the next round, so for the first 6 hours // our invulnerables will be the only collators let _ = pallet_parachain_staking::Pallet::::set_total_selected( - ::Origin::root(), + ::RuntimeOrigin::root(), INITIAL_MAX_ACTIVE_COLLATORS, ); @@ -129,7 +127,7 @@ where } #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result<(), &'static str> { + fn pre_upgrade() -> Result, &'static str> { // Before beginning the migration invulnerables must have 400k KMA in free balance let invulnerables = manta_collator_selection::Pallet::::invulnerables(); for invulnerable in invulnerables.clone() { @@ -146,15 +144,13 @@ where as u32 ); - Self::set_temp_storage(invulnerables, "invulnerables"); - Ok(()) + Ok(Vec::new()) } #[cfg(feature = "try-runtime")] - fn post_upgrade() -> Result<(), &'static str> { + fn post_upgrade(_state: Vec) -> Result<(), &'static str> { // Invulnerables were migrated correctly - let invulnerables: Vec = - Self::get_temp_storage("invulnerables").expect("must exist"); + let invulnerables = manta_collator_selection::Pallet::::invulnerables(); for invuln in invulnerables { assert!( !manta_collator_selection::Pallet::::candidates() diff --git a/runtime/calamari/src/migrations/sudo.rs b/runtime/calamari/src/migrations/sudo.rs index 8577c3180..36f9b544d 100644 --- a/runtime/calamari/src/migrations/sudo.rs +++ b/runtime/calamari/src/migrations/sudo.rs @@ -24,6 +24,8 @@ use frame_support::{ pallet_prelude::Weight, traits::{Get, OnRuntimeUpgrade}, }; +use sp_std::vec::Vec; + pub struct RemoveSudo(PhantomData); impl OnRuntimeUpgrade for RemoveSudo { fn on_runtime_upgrade() -> Weight { @@ -35,26 +37,26 @@ impl OnRuntimeUpgrade for RemoveSudo { log::info!(target: "OnRuntimeUpgrade", "✅ Sudo key has been removed."); log::info!(target: "OnRuntimeUpgrade", "✅ The pallet version has been removed."); T::DbWeight::get() - .reads(1 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .reads(1) + .saturating_add(T::DbWeight::get().writes(1_u64)) } else { - T::DbWeight::get().reads(1 as Weight) + T::DbWeight::get().reads(1) } } #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result<(), &'static str> { + fn pre_upgrade() -> Result, &'static str> { if have_storage_value(b"Sudo", b"Key", b"") { log::info!(target: "OnRuntimeUpgrade", "✅ Sudo key will be removed soon."); log::info!(target: "OnRuntimeUpgrade", "✅ The pallet version will be removed soon."); - Ok(()) + Ok(Vec::new()) } else { Err("Sudo doesn't exist.") } } #[cfg(feature = "try-runtime")] - fn post_upgrade() -> Result<(), &'static str> { + fn post_upgrade(_state: Vec) -> Result<(), &'static str> { if have_storage_value(b"Sudo", b"Key", b"") { Err("Failed to remove sudo module.") } else { diff --git a/runtime/calamari/src/weights/calamari_vesting.rs b/runtime/calamari/src/weights/calamari_vesting.rs index efedce766..607a5e512 100644 --- a/runtime/calamari/src/weights/calamari_vesting.rs +++ b/runtime/calamari/src/weights/calamari_vesting.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for calamari_vesting //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -54,62 +54,68 @@ pub trait WeightInfo { /// Weights for calamari_vesting using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl calamari_vesting::WeightInfo for SubstrateWeight { - // Storage: CalamariVesting VestingSchedule (r:1 w:1) - // Storage: Timestamp Now (r:1 w:0) - fn update_vesting_schedule() -> Weight { - (17_284_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Timestamp Now (r:1 w:0) - // Storage: CalamariVesting VestingSchedule (r:1 w:0) - // Storage: CalamariVesting VestingBalances (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn vest() -> Weight { - (39_773_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: CalamariVesting VestingBalances (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: Timestamp Now (r:1 w:0) - // Storage: CalamariVesting VestingSchedule (r:1 w:0) - // Storage: Balances Locks (r:1 w:1) - fn vested_transfer() -> Weight { - (60_699_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } + // Storage: CalamariVesting VestingSchedule (r:1 w:1) + // Storage: Timestamp Now (r:1 w:0) + fn update_vesting_schedule() -> Weight { + // Minimum execution time: 19_552 nanoseconds. + Weight::from_ref_time(20_046_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Timestamp Now (r:1 w:0) + // Storage: CalamariVesting VestingSchedule (r:1 w:0) + // Storage: CalamariVesting VestingBalances (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn vest() -> Weight { + // Minimum execution time: 44_504 nanoseconds. + Weight::from_ref_time(46_208_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: CalamariVesting VestingBalances (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: Timestamp Now (r:1 w:0) + // Storage: CalamariVesting VestingSchedule (r:1 w:0) + // Storage: Balances Locks (r:1 w:1) + fn vested_transfer() -> Weight { + // Minimum execution time: 63_004 nanoseconds. + Weight::from_ref_time(69_262_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: CalamariVesting VestingSchedule (r:1 w:1) - // Storage: Timestamp Now (r:1 w:0) - fn update_vesting_schedule() -> Weight { - (17_284_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Timestamp Now (r:1 w:0) - // Storage: CalamariVesting VestingSchedule (r:1 w:0) - // Storage: CalamariVesting VestingBalances (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn vest() -> Weight { - (39_773_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: CalamariVesting VestingBalances (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: Timestamp Now (r:1 w:0) - // Storage: CalamariVesting VestingSchedule (r:1 w:0) - // Storage: Balances Locks (r:1 w:1) - fn vested_transfer() -> Weight { - (60_699_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } + // Storage: CalamariVesting VestingSchedule (r:1 w:1) + // Storage: Timestamp Now (r:1 w:0) + fn update_vesting_schedule() -> Weight { + // Minimum execution time: 19_552 nanoseconds. + Weight::from_ref_time(20_046_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Timestamp Now (r:1 w:0) + // Storage: CalamariVesting VestingSchedule (r:1 w:0) + // Storage: CalamariVesting VestingBalances (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn vest() -> Weight { + // Minimum execution time: 44_504 nanoseconds. + Weight::from_ref_time(46_208_000) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: CalamariVesting VestingBalances (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: Timestamp Now (r:1 w:0) + // Storage: CalamariVesting VestingSchedule (r:1 w:0) + // Storage: Balances Locks (r:1 w:1) + fn vested_transfer() -> Weight { + // Minimum execution time: 63_004 nanoseconds. + Weight::from_ref_time(69_262_000) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(3)) + } } diff --git a/runtime/calamari/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/calamari/src/weights/cumulus_pallet_xcmp_queue.rs index 42f1a5d81..e6c2b3433 100644 --- a/runtime/calamari/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/calamari/src/weights/cumulus_pallet_xcmp_queue.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for cumulus_pallet_xcmp_queue //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -53,32 +53,36 @@ pub trait WeightInfo { /// Weights for cumulus_pallet_xcmp_queue using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl cumulus_pallet_xcmp_queue::WeightInfo for SubstrateWeight { - // Storage: XcmpQueue QueueConfig (r:1 w:1) - fn set_config_with_u32() -> Weight { - (11_412_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: XcmpQueue QueueConfig (r:1 w:1) - fn set_config_with_weight() -> Weight { - (7_520_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } + // Storage: XcmpQueue QueueConfig (r:1 w:1) + fn set_config_with_u32() -> Weight { + // Minimum execution time: 7_150 nanoseconds. + Weight::from_ref_time(7_370_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: XcmpQueue QueueConfig (r:1 w:1) + fn set_config_with_weight() -> Weight { + // Minimum execution time: 7_200 nanoseconds. + Weight::from_ref_time(7_542_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: XcmpQueue QueueConfig (r:1 w:1) - fn set_config_with_u32() -> Weight { - (11_412_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: XcmpQueue QueueConfig (r:1 w:1) - fn set_config_with_weight() -> Weight { - (7_520_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } + // Storage: XcmpQueue QueueConfig (r:1 w:1) + fn set_config_with_u32() -> Weight { + // Minimum execution time: 7_150 nanoseconds. + Weight::from_ref_time(7_370_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: XcmpQueue QueueConfig (r:1 w:1) + fn set_config_with_weight() -> Weight { + // Minimum execution time: 7_200 nanoseconds. + Weight::from_ref_time(7_542_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } } diff --git a/runtime/calamari/src/weights/frame_system.rs b/runtime/calamari/src/weights/frame_system.rs index 8324afd5c..3c7874a1a 100644 --- a/runtime/calamari/src/weights/frame_system.rs +++ b/runtime/calamari/src/weights/frame_system.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for frame_system //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -57,80 +57,106 @@ pub trait WeightInfo { /// Weights for frame_system using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl frame_system::WeightInfo for SubstrateWeight { - fn remark(_b: u32, ) -> Weight { - (4_241_000 as Weight) - } - fn remark_with_event(b: u32, ) -> Weight { - (3_858_000 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) - } - // Storage: System Digest (r:1 w:1) - // Storage: unknown [0x3a686561707061676573] (r:0 w:1) - fn set_heap_pages() -> Weight { - (5_726_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Skipped Metadata (r:0 w:0) - fn set_storage(i: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 2_000 - .saturating_add((706_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) - } - // Storage: Skipped Metadata (r:0 w:0) - fn kill_storage(i: u32, ) -> Weight { - (630_000 as Weight) - // Standard Error: 1_000 - .saturating_add((584_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) - } - // Storage: Skipped Metadata (r:0 w:0) - fn kill_prefix(p: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 2_000 - .saturating_add((1_232_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) - } + /// The range of component `b` is `[0, 3670016]`. + fn remark(b: u32, ) -> Weight { + // Minimum execution time: 10_424 nanoseconds. + Weight::from_ref_time(24_498_861) + // Standard Error: 0 + .saturating_add(Weight::from_ref_time(459).saturating_mul(b.into())) + } + /// The range of component `b` is `[0, 3670016]`. + fn remark_with_event(b: u32, ) -> Weight { + // Minimum execution time: 13_312 nanoseconds. + Weight::from_ref_time(29_735_014) + // Standard Error: 3 + .saturating_add(Weight::from_ref_time(2_044).saturating_mul(b.into())) + } + // Storage: System Digest (r:1 w:1) + // Storage: unknown [0x3a686561707061676573] (r:0 w:1) + fn set_heap_pages() -> Weight { + // Minimum execution time: 8_111 nanoseconds. + Weight::from_ref_time(8_453_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[0, 1000]`. + fn set_storage(i: u32, ) -> Weight { + // Minimum execution time: 11_253 nanoseconds. + Weight::from_ref_time(11_577_000) + // Standard Error: 2_364 + .saturating_add(Weight::from_ref_time(709_099).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[0, 1000]`. + fn kill_storage(i: u32, ) -> Weight { + // Minimum execution time: 3_775 nanoseconds. + Weight::from_ref_time(3_848_000) + // Standard Error: 850 + .saturating_add(Weight::from_ref_time(523_682).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `p` is `[0, 1000]`. + fn kill_prefix(p: u32, ) -> Weight { + // Minimum execution time: 5_572 nanoseconds. + Weight::from_ref_time(5_763_000) + // Standard Error: 1_115 + .saturating_add(Weight::from_ref_time(1_123_410).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + } } // For backwards compatibility and tests impl WeightInfo for () { - fn remark(_b: u32, ) -> Weight { - (4_241_000 as Weight) - } - fn remark_with_event(b: u32, ) -> Weight { - (3_858_000 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) - } - // Storage: System Digest (r:1 w:1) - // Storage: unknown [0x3a686561707061676573] (r:0 w:1) - fn set_heap_pages() -> Weight { - (5_726_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Skipped Metadata (r:0 w:0) - fn set_storage(i: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 2_000 - .saturating_add((706_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) - } - // Storage: Skipped Metadata (r:0 w:0) - fn kill_storage(i: u32, ) -> Weight { - (630_000 as Weight) - // Standard Error: 1_000 - .saturating_add((584_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) - } - // Storage: Skipped Metadata (r:0 w:0) - fn kill_prefix(p: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 2_000 - .saturating_add((1_232_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) - } + /// The range of component `b` is `[0, 3670016]`. + fn remark(b: u32, ) -> Weight { + // Minimum execution time: 10_424 nanoseconds. + Weight::from_ref_time(24_498_861) + // Standard Error: 0 + .saturating_add(Weight::from_ref_time(459).saturating_mul(b.into())) + } + /// The range of component `b` is `[0, 3670016]`. + fn remark_with_event(b: u32, ) -> Weight { + // Minimum execution time: 13_312 nanoseconds. + Weight::from_ref_time(29_735_014) + // Standard Error: 3 + .saturating_add(Weight::from_ref_time(2_044).saturating_mul(b.into())) + } + // Storage: System Digest (r:1 w:1) + // Storage: unknown [0x3a686561707061676573] (r:0 w:1) + fn set_heap_pages() -> Weight { + // Minimum execution time: 8_111 nanoseconds. + Weight::from_ref_time(8_453_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[0, 1000]`. + fn set_storage(i: u32, ) -> Weight { + // Minimum execution time: 11_253 nanoseconds. + Weight::from_ref_time(11_577_000) + // Standard Error: 2_364 + .saturating_add(Weight::from_ref_time(709_099).saturating_mul(i.into())) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[0, 1000]`. + fn kill_storage(i: u32, ) -> Weight { + // Minimum execution time: 3_775 nanoseconds. + Weight::from_ref_time(3_848_000) + // Standard Error: 850 + .saturating_add(Weight::from_ref_time(523_682).saturating_mul(i.into())) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `p` is `[0, 1000]`. + fn kill_prefix(p: u32, ) -> Weight { + // Minimum execution time: 5_572 nanoseconds. + Weight::from_ref_time(5_763_000) + // Standard Error: 1_115 + .saturating_add(Weight::from_ref_time(1_123_410).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(p.into()))) + } } diff --git a/runtime/calamari/src/weights/manta_collator_selection.rs b/runtime/calamari/src/weights/manta_collator_selection.rs index db977025d..f98b73f93 100644 --- a/runtime/calamari/src/weights/manta_collator_selection.rs +++ b/runtime/calamari/src/weights/manta_collator_selection.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for manta_collator_selection //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -62,194 +62,224 @@ pub trait WeightInfo { /// Weights for manta_collator_selection using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl manta_collator_selection::WeightInfo for SubstrateWeight { - // Storage: CollatorSelection Invulnerables (r:0 w:1) - fn set_invulnerables(b: u32, ) -> Weight { - (13_073_000 as Weight) - // Standard Error: 7_000 - .saturating_add((90_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection DesiredCandidates (r:0 w:1) - fn set_desired_candidates() -> Weight { - (14_526_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection CandidacyBond (r:0 w:1) - fn set_candidacy_bond() -> Weight { - (12_303_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection EvictionBaseline (r:0 w:1) - fn set_eviction_baseline() -> Weight { - (12_023_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection EvictionTolerance (r:0 w:1) - fn set_eviction_tolerance() -> Weight { - (12_320_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:1) - // Storage: CollatorSelection DesiredCandidates (r:1 w:0) - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: Session NextKeys (r:1 w:0) - // Storage: CollatorSelection CandidacyBond (r:1 w:0) - fn register_as_candidate(c: u32, ) -> Weight { - (44_850_000 as Weight) - // Standard Error: 8_000 - .saturating_add((321_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:1) - fn leave_intent(c: u32, ) -> Weight { - (31_324_000 as Weight) - // Standard Error: 7_000 - .saturating_add((281_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: CollatorSelection Candidates (r:1 w:1) - fn remove_collator(c: u32, ) -> Weight { - (34_599_000 as Weight) - // Standard Error: 8_000 - .saturating_add((262_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:1) - // Storage: CollatorSelection DesiredCandidates (r:1 w:0) - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: Session NextKeys (r:1 w:0) - // Storage: CollatorSelection CandidacyBond (r:1 w:0) - fn register_candidate(c: u32, ) -> Weight { - (45_013_000 as Weight) - // Standard Error: 8_000 - .saturating_add((251_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:2 w:2) - // Storage: CollatorSelection BlocksPerCollatorThisSession (r:1 w:1) - // Storage: System BlockWeight (r:1 w:1) - fn note_author() -> Weight { - (37_348_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:0) - // Storage: CollatorSelection EvictionBaseline (r:1 w:0) - // Storage: CollatorSelection EvictionTolerance (r:1 w:0) - // Storage: CollatorSelection BlocksPerCollatorThisSession (r:2 w:2) - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: System BlockWeight (r:1 w:1) - // Storage: Session Validators (r:1 w:0) - // Storage: System Account (r:1 w:1) - fn new_session(c: u32, ) -> Weight { - (17_894_000 as Weight) - // Standard Error: 74_000 - .saturating_add((23_805_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) - } + // Storage: CollatorSelection Invulnerables (r:0 w:1) + /// The range of component `b` is `[1, 5]`. + fn set_invulnerables(_b: u32, ) -> Weight { + // Minimum execution time: 14_077 nanoseconds. + Weight::from_ref_time(21_428_265) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection DesiredCandidates (r:0 w:1) + fn set_desired_candidates() -> Weight { + // Minimum execution time: 15_784 nanoseconds. + Weight::from_ref_time(16_110_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection CandidacyBond (r:0 w:1) + fn set_candidacy_bond() -> Weight { + // Minimum execution time: 13_660 nanoseconds. + Weight::from_ref_time(13_937_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection EvictionBaseline (r:0 w:1) + fn set_eviction_baseline() -> Weight { + // Minimum execution time: 13_208 nanoseconds. + Weight::from_ref_time(13_679_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection EvictionTolerance (r:0 w:1) + fn set_eviction_tolerance() -> Weight { + // Minimum execution time: 39_431 nanoseconds. + Weight::from_ref_time(41_373_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection DesiredCandidates (r:1 w:0) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: Session NextKeys (r:1 w:0) + // Storage: CollatorSelection CandidacyBond (r:1 w:0) + /// The range of component `c` is `[1, 50]`. + fn register_as_candidate(c: u32, ) -> Weight { + // Minimum execution time: 47_645 nanoseconds. + Weight::from_ref_time(52_808_340) + // Standard Error: 8_883 + .saturating_add(Weight::from_ref_time(217_900).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection Candidates (r:1 w:1) + /// The range of component `c` is `[1, 50]`. + fn leave_intent(c: u32, ) -> Weight { + // Minimum execution time: 32_596 nanoseconds. + Weight::from_ref_time(35_459_885) + // Standard Error: 3_535 + .saturating_add(Weight::from_ref_time(207_582).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: CollatorSelection Candidates (r:1 w:1) + /// The range of component `c` is `[1, 50]`. + fn remove_collator(c: u32, ) -> Weight { + // Minimum execution time: 33_709 nanoseconds. + Weight::from_ref_time(37_706_741) + // Standard Error: 4_488 + .saturating_add(Weight::from_ref_time(242_333).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection DesiredCandidates (r:1 w:0) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: Session NextKeys (r:1 w:0) + // Storage: CollatorSelection CandidacyBond (r:1 w:0) + /// The range of component `c` is `[1, 50]`. + fn register_candidate(c: u32, ) -> Weight { + // Minimum execution time: 46_609 nanoseconds. + Weight::from_ref_time(52_131_919) + // Standard Error: 5_659 + .saturating_add(Weight::from_ref_time(242_814).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: System Account (r:2 w:2) + // Storage: CollatorSelection BlocksPerCollatorThisSession (r:1 w:1) + // Storage: System BlockWeight (r:1 w:1) + fn note_author() -> Weight { + // Minimum execution time: 34_313 nanoseconds. + Weight::from_ref_time(37_803_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: CollatorSelection Candidates (r:1 w:0) + // Storage: CollatorSelection EvictionBaseline (r:1 w:0) + // Storage: CollatorSelection EvictionTolerance (r:1 w:0) + // Storage: CollatorSelection BlocksPerCollatorThisSession (r:2 w:2) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: System BlockWeight (r:1 w:1) + // Storage: Session Validators (r:1 w:0) + // Storage: System Account (r:1 w:1) + /// The range of component `c` is `[1, 50]`. + fn new_session(c: u32, ) -> Weight { + // Minimum execution time: 36_377 nanoseconds. + Weight::from_ref_time(30_928_079) + // Standard Error: 76_074 + .saturating_add(Weight::from_ref_time(22_275_107).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: CollatorSelection Invulnerables (r:0 w:1) - fn set_invulnerables(b: u32, ) -> Weight { - (13_073_000 as Weight) - // Standard Error: 7_000 - .saturating_add((90_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection DesiredCandidates (r:0 w:1) - fn set_desired_candidates() -> Weight { - (14_526_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection CandidacyBond (r:0 w:1) - fn set_candidacy_bond() -> Weight { - (12_303_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection EvictionBaseline (r:0 w:1) - fn set_eviction_baseline() -> Weight { - (12_023_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection EvictionTolerance (r:0 w:1) - fn set_eviction_tolerance() -> Weight { - (12_320_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:1) - // Storage: CollatorSelection DesiredCandidates (r:1 w:0) - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: Session NextKeys (r:1 w:0) - // Storage: CollatorSelection CandidacyBond (r:1 w:0) - fn register_as_candidate(c: u32, ) -> Weight { - (44_850_000 as Weight) - // Standard Error: 8_000 - .saturating_add((321_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:1) - fn leave_intent(c: u32, ) -> Weight { - (31_324_000 as Weight) - // Standard Error: 7_000 - .saturating_add((281_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: CollatorSelection Candidates (r:1 w:1) - fn remove_collator(c: u32, ) -> Weight { - (34_599_000 as Weight) - // Standard Error: 8_000 - .saturating_add((262_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:1) - // Storage: CollatorSelection DesiredCandidates (r:1 w:0) - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: Session NextKeys (r:1 w:0) - // Storage: CollatorSelection CandidacyBond (r:1 w:0) - fn register_candidate(c: u32, ) -> Weight { - (45_013_000 as Weight) - // Standard Error: 8_000 - .saturating_add((251_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:2 w:2) - // Storage: CollatorSelection BlocksPerCollatorThisSession (r:1 w:1) - // Storage: System BlockWeight (r:1 w:1) - fn note_author() -> Weight { - (37_348_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:0) - // Storage: CollatorSelection EvictionBaseline (r:1 w:0) - // Storage: CollatorSelection EvictionTolerance (r:1 w:0) - // Storage: CollatorSelection BlocksPerCollatorThisSession (r:2 w:2) - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: System BlockWeight (r:1 w:1) - // Storage: Session Validators (r:1 w:0) - // Storage: System Account (r:1 w:1) - fn new_session(c: u32, ) -> Weight { - (17_894_000 as Weight) - // Standard Error: 74_000 - .saturating_add((23_805_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) - } + // Storage: CollatorSelection Invulnerables (r:0 w:1) + /// The range of component `b` is `[1, 5]`. + fn set_invulnerables(_b: u32, ) -> Weight { + // Minimum execution time: 14_077 nanoseconds. + Weight::from_ref_time(21_428_265) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection DesiredCandidates (r:0 w:1) + fn set_desired_candidates() -> Weight { + // Minimum execution time: 15_784 nanoseconds. + Weight::from_ref_time(16_110_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection CandidacyBond (r:0 w:1) + fn set_candidacy_bond() -> Weight { + // Minimum execution time: 13_660 nanoseconds. + Weight::from_ref_time(13_937_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection EvictionBaseline (r:0 w:1) + fn set_eviction_baseline() -> Weight { + // Minimum execution time: 13_208 nanoseconds. + Weight::from_ref_time(13_679_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection EvictionTolerance (r:0 w:1) + fn set_eviction_tolerance() -> Weight { + // Minimum execution time: 39_431 nanoseconds. + Weight::from_ref_time(41_373_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection DesiredCandidates (r:1 w:0) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: Session NextKeys (r:1 w:0) + // Storage: CollatorSelection CandidacyBond (r:1 w:0) + /// The range of component `c` is `[1, 50]`. + fn register_as_candidate(c: u32, ) -> Weight { + // Minimum execution time: 47_645 nanoseconds. + Weight::from_ref_time(52_808_340) + // Standard Error: 8_883 + .saturating_add(Weight::from_ref_time(217_900).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection Candidates (r:1 w:1) + /// The range of component `c` is `[1, 50]`. + fn leave_intent(c: u32, ) -> Weight { + // Minimum execution time: 32_596 nanoseconds. + Weight::from_ref_time(35_459_885) + // Standard Error: 3_535 + .saturating_add(Weight::from_ref_time(207_582).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: CollatorSelection Candidates (r:1 w:1) + /// The range of component `c` is `[1, 50]`. + fn remove_collator(c: u32, ) -> Weight { + // Minimum execution time: 33_709 nanoseconds. + Weight::from_ref_time(37_706_741) + // Standard Error: 4_488 + .saturating_add(Weight::from_ref_time(242_333).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection DesiredCandidates (r:1 w:0) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: Session NextKeys (r:1 w:0) + // Storage: CollatorSelection CandidacyBond (r:1 w:0) + /// The range of component `c` is `[1, 50]`. + fn register_candidate(c: u32, ) -> Weight { + // Minimum execution time: 46_609 nanoseconds. + Weight::from_ref_time(52_131_919) + // Standard Error: 5_659 + .saturating_add(Weight::from_ref_time(242_814).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: System Account (r:2 w:2) + // Storage: CollatorSelection BlocksPerCollatorThisSession (r:1 w:1) + // Storage: System BlockWeight (r:1 w:1) + fn note_author() -> Weight { + // Minimum execution time: 34_313 nanoseconds. + Weight::from_ref_time(37_803_000) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(4)) + } + // Storage: CollatorSelection Candidates (r:1 w:0) + // Storage: CollatorSelection EvictionBaseline (r:1 w:0) + // Storage: CollatorSelection EvictionTolerance (r:1 w:0) + // Storage: CollatorSelection BlocksPerCollatorThisSession (r:2 w:2) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: System BlockWeight (r:1 w:1) + // Storage: Session Validators (r:1 w:0) + // Storage: System Account (r:1 w:1) + /// The range of component `c` is `[1, 50]`. + fn new_session(c: u32, ) -> Weight { + // Minimum execution time: 36_377 nanoseconds. + Weight::from_ref_time(30_928_079) + // Standard Error: 76_074 + .saturating_add(Weight::from_ref_time(22_275_107).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(6)) + .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(c.into()))) + .saturating_add(RocksDbWeight::get().writes(3)) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(c.into()))) + } } diff --git a/runtime/calamari/src/weights/pallet_asset_manager.rs b/runtime/calamari/src/weights/pallet_asset_manager.rs index 63702c9e2..5ae28f55c 100644 --- a/runtime/calamari/src/weights/pallet_asset_manager.rs +++ b/runtime/calamari/src/weights/pallet_asset_manager.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_asset_manager //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -57,104 +57,116 @@ pub trait WeightInfo { /// Weights for pallet_asset_manager using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_asset_manager::WeightInfo for SubstrateWeight { - // Storage: AssetManager LocationAssetId (r:1 w:1) - // Storage: AssetManager NextAssetId (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Metadata (r:1 w:1) - // Storage: AssetManager AssetIdMetadata (r:0 w:1) - // Storage: AssetManager AssetIdLocation (r:0 w:1) - fn register_asset() -> Weight { - (50_204_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:0) - // Storage: AssetManager UnitsPerSecond (r:0 w:1) - fn set_units_per_second() -> Weight { - (55_447_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:1) - // Storage: AssetManager LocationAssetId (r:1 w:2) - // Storage: AssetManager AllowedDestParaIds (r:2 w:2) - fn update_asset_location() -> Weight { - (77_718_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:0) - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - // Storage: AssetManager AssetIdMetadata (r:0 w:1) - fn update_asset_metadata() -> Weight { - (76_361_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:0) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - fn mint_asset() -> Weight { - (84_202_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: AssetManager MinXcmFee (r:0 w:1) - fn set_min_xcm_fee() -> Weight { - (50_142_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } + // Storage: AssetManager LocationAssetId (r:1 w:1) + // Storage: AssetManager NextAssetId (r:1 w:1) + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Metadata (r:1 w:1) + // Storage: AssetManager AssetIdMetadata (r:0 w:1) + // Storage: AssetManager AssetIdLocation (r:0 w:1) + fn register_asset() -> Weight { + // Minimum execution time: 51_367 nanoseconds. + Weight::from_ref_time(52_084_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(6)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: AssetManager UnitsPerSecond (r:0 w:1) + fn set_units_per_second() -> Weight { + // Minimum execution time: 58_012 nanoseconds. + Weight::from_ref_time(59_964_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:1) + // Storage: AssetManager LocationAssetId (r:1 w:2) + // Storage: AssetManager AllowedDestParaIds (r:2 w:2) + fn update_asset_location() -> Weight { + // Minimum execution time: 75_616 nanoseconds. + Weight::from_ref_time(77_423_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(5)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + // Storage: AssetManager AssetIdMetadata (r:0 w:1) + fn update_asset_metadata() -> Weight { + // Minimum execution time: 72_946 nanoseconds. + Weight::from_ref_time(76_324_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:1) + fn mint_asset() -> Weight { + // Minimum execution time: 81_450 nanoseconds. + Weight::from_ref_time(83_166_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: AssetManager MinXcmFee (r:0 w:1) + fn set_min_xcm_fee() -> Weight { + // Minimum execution time: 46_913 nanoseconds. + Weight::from_ref_time(49_639_000) + .saturating_add(T::DbWeight::get().writes(1)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: AssetManager LocationAssetId (r:1 w:1) - // Storage: AssetManager NextAssetId (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Metadata (r:1 w:1) - // Storage: AssetManager AssetIdMetadata (r:0 w:1) - // Storage: AssetManager AssetIdLocation (r:0 w:1) - fn register_asset() -> Weight { - (50_204_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:0) - // Storage: AssetManager UnitsPerSecond (r:0 w:1) - fn set_units_per_second() -> Weight { - (55_447_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:1) - // Storage: AssetManager LocationAssetId (r:1 w:2) - // Storage: AssetManager AllowedDestParaIds (r:2 w:2) - fn update_asset_location() -> Weight { - (77_718_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:0) - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - // Storage: AssetManager AssetIdMetadata (r:0 w:1) - fn update_asset_metadata() -> Weight { - (76_361_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:0) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - fn mint_asset() -> Weight { - (84_202_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: AssetManager MinXcmFee (r:0 w:1) - fn set_min_xcm_fee() -> Weight { - (50_142_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } + // Storage: AssetManager LocationAssetId (r:1 w:1) + // Storage: AssetManager NextAssetId (r:1 w:1) + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Metadata (r:1 w:1) + // Storage: AssetManager AssetIdMetadata (r:0 w:1) + // Storage: AssetManager AssetIdLocation (r:0 w:1) + fn register_asset() -> Weight { + // Minimum execution time: 51_367 nanoseconds. + Weight::from_ref_time(52_084_000) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(6)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: AssetManager UnitsPerSecond (r:0 w:1) + fn set_units_per_second() -> Weight { + // Minimum execution time: 58_012 nanoseconds. + Weight::from_ref_time(59_964_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:1) + // Storage: AssetManager LocationAssetId (r:1 w:2) + // Storage: AssetManager AllowedDestParaIds (r:2 w:2) + fn update_asset_location() -> Weight { + // Minimum execution time: 75_616 nanoseconds. + Weight::from_ref_time(77_423_000) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(5)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + // Storage: AssetManager AssetIdMetadata (r:0 w:1) + fn update_asset_metadata() -> Weight { + // Minimum execution time: 72_946 nanoseconds. + Weight::from_ref_time(76_324_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:1) + fn mint_asset() -> Weight { + // Minimum execution time: 81_450 nanoseconds. + Weight::from_ref_time(83_166_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: AssetManager MinXcmFee (r:0 w:1) + fn set_min_xcm_fee() -> Weight { + // Minimum execution time: 46_913 nanoseconds. + Weight::from_ref_time(49_639_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } } diff --git a/runtime/calamari/src/weights/pallet_assets.rs b/runtime/calamari/src/weights/pallet_assets.rs index e833a4304..95b2d64b2 100644 --- a/runtime/calamari/src/weights/pallet_assets.rs +++ b/runtime/calamari/src/weights/pallet_assets.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_assets //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -48,7 +48,10 @@ use manta_primitives::constants::RocksDbWeight; pub trait WeightInfo { fn create() -> Weight; fn force_create() -> Weight; - fn destroy(c: u32, s: u32, a: u32, ) -> Weight; + fn start_destroy() -> Weight; + fn destroy_accounts(c: u32, ) -> Weight; + fn destroy_approvals(a: u32, ) -> Weight; + fn finish_destroy() -> Weight; fn mint() -> Weight; fn burn() -> Weight; fn transfer() -> Weight; @@ -74,370 +77,458 @@ pub trait WeightInfo { /// Weights for pallet_assets using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_assets::WeightInfo for SubstrateWeight { - // Storage: Assets Asset (r:1 w:1) - fn create() -> Weight { - (17_016_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn force_create() -> Weight { - (15_379_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:5002 w:5001) - // Storage: System Account (r:5000 w:5000) - // Storage: Assets Metadata (r:1 w:0) - // Storage: Assets Approvals (r:501 w:500) - fn destroy(c: u32, s: u32, a: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 42_000 - .saturating_add((18_314_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 42_000 - .saturating_add((21_124_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 423_000 - .saturating_add((13_050_000 as Weight).saturating_mul(a as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(a as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight))) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - fn mint() -> Weight { - (32_624_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - fn burn() -> Weight { - (36_891_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn transfer() -> Weight { - (48_686_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn transfer_keep_alive() -> Weight { - (44_406_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn force_transfer() -> Weight { - (52_797_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Account (r:1 w:1) - fn freeze() -> Weight { - (20_792_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Account (r:1 w:1) - fn thaw() -> Weight { - (19_669_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn freeze_asset() -> Weight { - (16_550_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn thaw_asset() -> Weight { - (17_489_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Metadata (r:1 w:0) - fn transfer_ownership() -> Weight { - (19_181_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn set_team() -> Weight { - (17_374_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn set_metadata(n: u32, _s: u32, ) -> Weight { - (20_714_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_000 as Weight).saturating_mul(n as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn clear_metadata() -> Weight { - (19_423_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn force_set_metadata(n: u32, s: u32, ) -> Weight { - (18_870_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 1_000 - .saturating_add((1_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn force_clear_metadata() -> Weight { - (20_370_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn force_asset_status() -> Weight { - (16_311_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) - fn approve_transfer() -> Weight { - (24_649_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Approvals (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn transfer_approved() -> Weight { - (59_419_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) - fn cancel_approval() -> Weight { - (25_807_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) - fn force_cancel_approval() -> Weight { - (24_409_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } + // Storage: Assets Asset (r:1 w:1) + fn create() -> Weight { + // Minimum execution time: 18_128 nanoseconds. + Weight::from_ref_time(18_717_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn force_create() -> Weight { + // Minimum execution time: 52_014 nanoseconds. + Weight::from_ref_time(54_040_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn start_destroy() -> Weight { + // Minimum execution time: 39_470 nanoseconds. + Weight::from_ref_time(40_547_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:0) + // Storage: System Account (r:20 w:20) + /// The range of component `c` is `[0, 1000]`. + fn destroy_accounts(c: u32, ) -> Weight { + // Minimum execution time: 31_655 nanoseconds. + Weight::from_ref_time(31_900_000) + // Standard Error: 9_271 + .saturating_add(Weight::from_ref_time(14_634_419).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(c.into()))) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:0) + /// The range of component `a` is `[0, 1000]`. + fn destroy_approvals(a: u32, ) -> Weight { + // Minimum execution time: 48_640 nanoseconds. + Weight::from_ref_time(49_248_000) + // Standard Error: 7_203 + .saturating_add(Weight::from_ref_time(7_496_376).saturating_mul(a.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into()))) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Metadata (r:1 w:0) + fn finish_destroy() -> Weight { + // Minimum execution time: 19_799 nanoseconds. + Weight::from_ref_time(20_264_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:1) + fn mint() -> Weight { + // Minimum execution time: 33_854 nanoseconds. + Weight::from_ref_time(34_561_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:1) + fn burn() -> Weight { + // Minimum execution time: 41_433 nanoseconds. + Weight::from_ref_time(42_167_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn transfer() -> Weight { + // Minimum execution time: 49_805 nanoseconds. + Weight::from_ref_time(54_273_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn transfer_keep_alive() -> Weight { + // Minimum execution time: 46_008 nanoseconds. + Weight::from_ref_time(46_837_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn force_transfer() -> Weight { + // Minimum execution time: 52_361 nanoseconds. + Weight::from_ref_time(54_556_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Account (r:1 w:1) + fn freeze() -> Weight { + // Minimum execution time: 71_397 nanoseconds. + Weight::from_ref_time(73_121_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Account (r:1 w:1) + fn thaw() -> Weight { + // Minimum execution time: 47_577 nanoseconds. + Weight::from_ref_time(48_449_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn freeze_asset() -> Weight { + // Minimum execution time: 26_170 nanoseconds. + Weight::from_ref_time(26_833_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn thaw_asset() -> Weight { + // Minimum execution time: 19_122 nanoseconds. + Weight::from_ref_time(20_008_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Metadata (r:1 w:0) + fn transfer_ownership() -> Weight { + // Minimum execution time: 21_177 nanoseconds. + Weight::from_ref_time(21_446_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn set_team() -> Weight { + // Minimum execution time: 59_296 nanoseconds. + Weight::from_ref_time(61_127_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + /// The range of component `n` is `[0, 50]`. + /// The range of component `s` is `[0, 50]`. + fn set_metadata(_n: u32, _s: u32, ) -> Weight { + // Minimum execution time: 20_747 nanoseconds. + Weight::from_ref_time(37_560_925) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + fn clear_metadata() -> Weight { + // Minimum execution time: 22_659 nanoseconds. + Weight::from_ref_time(23_147_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + /// The range of component `n` is `[0, 50]`. + /// The range of component `s` is `[0, 50]`. + fn force_set_metadata(n: u32, s: u32, ) -> Weight { + // Minimum execution time: 19_030 nanoseconds. + Weight::from_ref_time(23_971_431) + // Standard Error: 33_307 + .saturating_add(Weight::from_ref_time(100_049).saturating_mul(n.into())) + // Standard Error: 33_307 + .saturating_add(Weight::from_ref_time(74_167).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + fn force_clear_metadata() -> Weight { + // Minimum execution time: 25_345 nanoseconds. + Weight::from_ref_time(25_619_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn force_asset_status() -> Weight { + // Minimum execution time: 18_897 nanoseconds. + Weight::from_ref_time(19_287_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + fn approve_transfer() -> Weight { + // Minimum execution time: 25_606 nanoseconds. + Weight::from_ref_time(26_580_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn transfer_approved() -> Weight { + // Minimum execution time: 61_287 nanoseconds. + Weight::from_ref_time(63_781_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + fn cancel_approval() -> Weight { + // Minimum execution time: 28_724 nanoseconds. + Weight::from_ref_time(29_059_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + fn force_cancel_approval() -> Weight { + // Minimum execution time: 29_023 nanoseconds. + Weight::from_ref_time(29_282_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Assets Asset (r:1 w:1) - fn create() -> Weight { - (17_016_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn force_create() -> Weight { - (15_379_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:5002 w:5001) - // Storage: System Account (r:5000 w:5000) - // Storage: Assets Metadata (r:1 w:0) - // Storage: Assets Approvals (r:501 w:500) - fn destroy(c: u32, s: u32, a: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 42_000 - .saturating_add((18_314_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 42_000 - .saturating_add((21_124_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 423_000 - .saturating_add((13_050_000 as Weight).saturating_mul(a as Weight)) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(a as Weight))) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(a as Weight))) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - fn mint() -> Weight { - (32_624_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - fn burn() -> Weight { - (36_891_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn transfer() -> Weight { - (48_686_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn transfer_keep_alive() -> Weight { - (44_406_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn force_transfer() -> Weight { - (52_797_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Account (r:1 w:1) - fn freeze() -> Weight { - (20_792_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Account (r:1 w:1) - fn thaw() -> Weight { - (19_669_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn freeze_asset() -> Weight { - (16_550_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn thaw_asset() -> Weight { - (17_489_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Metadata (r:1 w:0) - fn transfer_ownership() -> Weight { - (19_181_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn set_team() -> Weight { - (17_374_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn set_metadata(n: u32, _s: u32, ) -> Weight { - (20_714_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_000 as Weight).saturating_mul(n as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn clear_metadata() -> Weight { - (19_423_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn force_set_metadata(n: u32, s: u32, ) -> Weight { - (18_870_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 1_000 - .saturating_add((1_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn force_clear_metadata() -> Weight { - (20_370_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn force_asset_status() -> Weight { - (16_311_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) - fn approve_transfer() -> Weight { - (24_649_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Approvals (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn transfer_approved() -> Weight { - (59_419_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) - fn cancel_approval() -> Weight { - (25_807_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) - fn force_cancel_approval() -> Weight { - (24_409_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } + // Storage: Assets Asset (r:1 w:1) + fn create() -> Weight { + // Minimum execution time: 18_128 nanoseconds. + Weight::from_ref_time(18_717_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn force_create() -> Weight { + // Minimum execution time: 52_014 nanoseconds. + Weight::from_ref_time(54_040_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn start_destroy() -> Weight { + // Minimum execution time: 39_470 nanoseconds. + Weight::from_ref_time(40_547_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:0) + // Storage: System Account (r:20 w:20) + /// The range of component `c` is `[0, 1000]`. + fn destroy_accounts(c: u32, ) -> Weight { + // Minimum execution time: 31_655 nanoseconds. + Weight::from_ref_time(31_900_000) + // Standard Error: 9_271 + .saturating_add(Weight::from_ref_time(14_634_419).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(c.into()))) + .saturating_add(RocksDbWeight::get().writes(1)) + .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(c.into()))) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:0) + /// The range of component `a` is `[0, 1000]`. + fn destroy_approvals(a: u32, ) -> Weight { + // Minimum execution time: 48_640 nanoseconds. + Weight::from_ref_time(49_248_000) + // Standard Error: 7_203 + .saturating_add(Weight::from_ref_time(7_496_376).saturating_mul(a.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(a.into()))) + .saturating_add(RocksDbWeight::get().writes(1)) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(a.into()))) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Metadata (r:1 w:0) + fn finish_destroy() -> Weight { + // Minimum execution time: 19_799 nanoseconds. + Weight::from_ref_time(20_264_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:1) + fn mint() -> Weight { + // Minimum execution time: 33_854 nanoseconds. + Weight::from_ref_time(34_561_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:1) + fn burn() -> Weight { + // Minimum execution time: 41_433 nanoseconds. + Weight::from_ref_time(42_167_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn transfer() -> Weight { + // Minimum execution time: 49_805 nanoseconds. + Weight::from_ref_time(54_273_000) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(4)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn transfer_keep_alive() -> Weight { + // Minimum execution time: 46_008 nanoseconds. + Weight::from_ref_time(46_837_000) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(4)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn force_transfer() -> Weight { + // Minimum execution time: 52_361 nanoseconds. + Weight::from_ref_time(54_556_000) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(4)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Account (r:1 w:1) + fn freeze() -> Weight { + // Minimum execution time: 71_397 nanoseconds. + Weight::from_ref_time(73_121_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Account (r:1 w:1) + fn thaw() -> Weight { + // Minimum execution time: 47_577 nanoseconds. + Weight::from_ref_time(48_449_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn freeze_asset() -> Weight { + // Minimum execution time: 26_170 nanoseconds. + Weight::from_ref_time(26_833_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn thaw_asset() -> Weight { + // Minimum execution time: 19_122 nanoseconds. + Weight::from_ref_time(20_008_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Metadata (r:1 w:0) + fn transfer_ownership() -> Weight { + // Minimum execution time: 21_177 nanoseconds. + Weight::from_ref_time(21_446_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn set_team() -> Weight { + // Minimum execution time: 59_296 nanoseconds. + Weight::from_ref_time(61_127_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + /// The range of component `n` is `[0, 50]`. + /// The range of component `s` is `[0, 50]`. + fn set_metadata(_n: u32, _s: u32, ) -> Weight { + // Minimum execution time: 20_747 nanoseconds. + Weight::from_ref_time(37_560_925) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + fn clear_metadata() -> Weight { + // Minimum execution time: 22_659 nanoseconds. + Weight::from_ref_time(23_147_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + /// The range of component `n` is `[0, 50]`. + /// The range of component `s` is `[0, 50]`. + fn force_set_metadata(n: u32, s: u32, ) -> Weight { + // Minimum execution time: 19_030 nanoseconds. + Weight::from_ref_time(23_971_431) + // Standard Error: 33_307 + .saturating_add(Weight::from_ref_time(100_049).saturating_mul(n.into())) + // Standard Error: 33_307 + .saturating_add(Weight::from_ref_time(74_167).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + fn force_clear_metadata() -> Weight { + // Minimum execution time: 25_345 nanoseconds. + Weight::from_ref_time(25_619_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn force_asset_status() -> Weight { + // Minimum execution time: 18_897 nanoseconds. + Weight::from_ref_time(19_287_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + fn approve_transfer() -> Weight { + // Minimum execution time: 25_606 nanoseconds. + Weight::from_ref_time(26_580_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn transfer_approved() -> Weight { + // Minimum execution time: 61_287 nanoseconds. + Weight::from_ref_time(63_781_000) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(5)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + fn cancel_approval() -> Weight { + // Minimum execution time: 28_724 nanoseconds. + Weight::from_ref_time(29_059_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + fn force_cancel_approval() -> Weight { + // Minimum execution time: 29_023 nanoseconds. + Weight::from_ref_time(29_282_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } } diff --git a/runtime/calamari/src/weights/pallet_author_inherent.rs b/runtime/calamari/src/weights/pallet_author_inherent.rs index 57079b147..097587fe1 100644 --- a/runtime/calamari/src/weights/pallet_author_inherent.rs +++ b/runtime/calamari/src/weights/pallet_author_inherent.rs @@ -57,9 +57,9 @@ impl pallet_author_inherent::WeightInfo for SubstrateWe // Storage: AuthorInherent Author (r:1 w:0) // Storage: ParachainStaking SelectedCandidates (r:1 w:0) fn kick_off_authorship_validation() -> Weight { - (12_995_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(13_031_000) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } } @@ -70,8 +70,8 @@ impl WeightInfo for () { // Storage: AuthorInherent Author (r:1 w:0) // Storage: ParachainStaking SelectedCandidates (r:1 w:0) fn kick_off_authorship_validation() -> Weight { - (12_995_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(13_031_000) + .saturating_add(RocksDbWeight::get().reads(4_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } } diff --git a/runtime/calamari/src/weights/pallet_balances.rs b/runtime/calamari/src/weights/pallet_balances.rs index 041c564ee..28759bdcf 100644 --- a/runtime/calamari/src/weights/pallet_balances.rs +++ b/runtime/calamari/src/weights/pallet_balances.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_balances //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -58,92 +58,106 @@ pub trait WeightInfo { /// Weights for pallet_balances using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_balances::WeightInfo for SubstrateWeight { - // Storage: System Account (r:1 w:1) - fn transfer() -> Weight { - (47_356_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn transfer_keep_alive() -> Weight { - (33_288_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn set_balance_creating() -> Weight { - (22_912_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn set_balance_killing() -> Weight { - (26_862_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:2 w:2) - fn force_transfer() -> Weight { - (43_415_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn transfer_all() -> Weight { - (42_004_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn force_unreserve() -> Weight { - (20_210_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } + // Storage: System Account (r:1 w:1) + fn transfer() -> Weight { + // Minimum execution time: 46_896 nanoseconds. + Weight::from_ref_time(48_191_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn transfer_keep_alive() -> Weight { + // Minimum execution time: 35_881 nanoseconds. + Weight::from_ref_time(36_392_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn set_balance_creating() -> Weight { + // Minimum execution time: 24_909 nanoseconds. + Weight::from_ref_time(25_372_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn set_balance_killing() -> Weight { + // Minimum execution time: 28_018 nanoseconds. + Weight::from_ref_time(28_830_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: System Account (r:2 w:2) + fn force_transfer() -> Weight { + // Minimum execution time: 46_070 nanoseconds. + Weight::from_ref_time(48_219_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: System Account (r:1 w:1) + fn transfer_all() -> Weight { + // Minimum execution time: 41_607 nanoseconds. + Weight::from_ref_time(42_391_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn force_unreserve() -> Weight { + // Minimum execution time: 21_413 nanoseconds. + Weight::from_ref_time(21_770_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: System Account (r:1 w:1) - fn transfer() -> Weight { - (47_356_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn transfer_keep_alive() -> Weight { - (33_288_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn set_balance_creating() -> Weight { - (22_912_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn set_balance_killing() -> Weight { - (26_862_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:2 w:2) - fn force_transfer() -> Weight { - (43_415_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn transfer_all() -> Weight { - (42_004_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn force_unreserve() -> Weight { - (20_210_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } + // Storage: System Account (r:1 w:1) + fn transfer() -> Weight { + // Minimum execution time: 46_896 nanoseconds. + Weight::from_ref_time(48_191_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn transfer_keep_alive() -> Weight { + // Minimum execution time: 35_881 nanoseconds. + Weight::from_ref_time(36_392_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn set_balance_creating() -> Weight { + // Minimum execution time: 24_909 nanoseconds. + Weight::from_ref_time(25_372_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn set_balance_killing() -> Weight { + // Minimum execution time: 28_018 nanoseconds. + Weight::from_ref_time(28_830_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: System Account (r:2 w:2) + fn force_transfer() -> Weight { + // Minimum execution time: 46_070 nanoseconds. + Weight::from_ref_time(48_219_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: System Account (r:1 w:1) + fn transfer_all() -> Weight { + // Minimum execution time: 41_607 nanoseconds. + Weight::from_ref_time(42_391_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn force_unreserve() -> Weight { + // Minimum execution time: 21_413 nanoseconds. + Weight::from_ref_time(21_770_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } } diff --git a/runtime/calamari/src/weights/pallet_collective.rs b/runtime/calamari/src/weights/pallet_collective.rs index ffc30f212..3c79907eb 100644 --- a/runtime/calamari/src/weights/pallet_collective.rs +++ b/runtime/calamari/src/weights/pallet_collective.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_collective //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -61,266 +61,314 @@ pub trait WeightInfo { /// Weights for pallet_collective using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_collective::WeightInfo for SubstrateWeight { - // Storage: Council Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: Council Voting (r:100 w:100) - // Storage: Council Prime (r:0 w:1) - fn set_members(m: u32, n: u32, p: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 10_000 - .saturating_add((12_294_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 10_000 - .saturating_add((115_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 10_000 - .saturating_add((15_674_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(p as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) - } - // Storage: Council Members (r:1 w:0) - fn execute(b: u32, m: u32, ) -> Weight { - (19_140_000 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 1_000 - .saturating_add((16_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - } - // Storage: Council Members (r:1 w:0) - // Storage: Council ProposalOf (r:1 w:0) - fn propose_execute(b: u32, m: u32, ) -> Weight { - (21_134_000 as Weight) - // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 1_000 - .saturating_add((35_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - } - // Storage: Council Members (r:1 w:0) - // Storage: Council ProposalOf (r:1 w:1) - // Storage: Council Proposals (r:1 w:1) - // Storage: Council ProposalCount (r:1 w:1) - // Storage: Council Voting (r:0 w:1) - fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (23_899_000 as Weight) - // Standard Error: 0 - .saturating_add((9_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 2_000 - .saturating_add((31_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 2_000 - .saturating_add((206_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - // Storage: Council Members (r:1 w:0) - // Storage: Council Voting (r:1 w:1) - fn vote(m: u32, ) -> Weight { - (35_238_000 as Weight) - // Standard Error: 2_000 - .saturating_add((56_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Council Voting (r:1 w:1) - // Storage: Council Members (r:1 w:0) - // Storage: Council Proposals (r:1 w:1) - // Storage: Council ProposalOf (r:0 w:1) - fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (35_709_000 as Weight) - // Standard Error: 2_000 - .saturating_add((13_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 2_000 - .saturating_add((138_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Council Voting (r:1 w:1) - // Storage: Council Members (r:1 w:0) - // Storage: Council ProposalOf (r:1 w:1) - // Storage: Council Proposals (r:1 w:1) - fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (36_338_000 as Weight) - // Standard Error: 0 - .saturating_add((8_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 2_000 - .saturating_add((52_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 2_000 - .saturating_add((200_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Council Voting (r:1 w:1) - // Storage: Council Members (r:1 w:0) - // Storage: Council Prime (r:1 w:0) - // Storage: Council Proposals (r:1 w:1) - // Storage: Council ProposalOf (r:0 w:1) - fn close_disapproved(m: u32, p: u32, ) -> Weight { - (39_150_000 as Weight) - // Standard Error: 3_000 - .saturating_add((16_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 2_000 - .saturating_add((126_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Council Voting (r:1 w:1) - // Storage: Council Members (r:1 w:0) - // Storage: Council Prime (r:1 w:0) - // Storage: Council ProposalOf (r:1 w:1) - // Storage: Council Proposals (r:1 w:1) - fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (38_344_000 as Weight) - // Standard Error: 0 - .saturating_add((8_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 2_000 - .saturating_add((61_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 2_000 - .saturating_add((200_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Council Proposals (r:1 w:1) - // Storage: Council Voting (r:0 w:1) - // Storage: Council ProposalOf (r:0 w:1) - fn disapprove_proposal(p: u32, ) -> Weight { - (20_578_000 as Weight) - // Standard Error: 1_000 - .saturating_add((198_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } + // Storage: Council Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: Council Prime (r:0 w:1) + // Storage: Council Voting (r:100 w:100) + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { + // Minimum execution time: 19_626 nanoseconds. + Weight::from_ref_time(19_913_000) + // Standard Error: 73_912 + .saturating_add(Weight::from_ref_time(5_932_920).saturating_mul(m.into())) + // Standard Error: 73_912 + .saturating_add(Weight::from_ref_time(8_505_202).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()))) + } + // Storage: Council Members (r:1 w:0) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn execute(b: u32, _m: u32, ) -> Weight { + // Minimum execution time: 21_224 nanoseconds. + Weight::from_ref_time(26_759_706) + // Standard Error: 1_601 + .saturating_add(Weight::from_ref_time(7_701).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(1)) + } + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:0) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn propose_execute(_b: u32, _m: u32, ) -> Weight { + // Minimum execution time: 24_752 nanoseconds. + Weight::from_ref_time(37_239_236) + .saturating_add(T::DbWeight::get().reads(2)) + } + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalCount (r:1 w:1) + // Storage: Council Voting (r:0 w:1) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[2, 100]`. + /// The range of component `p` is `[1, 100]`. + fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { + // Minimum execution time: 30_103 nanoseconds. + Weight::from_ref_time(32_334_071) + // Standard Error: 210 + .saturating_add(Weight::from_ref_time(4_321).saturating_mul(b.into())) + // Standard Error: 2_196 + .saturating_add(Weight::from_ref_time(27_240).saturating_mul(m.into())) + // Standard Error: 2_168 + .saturating_add(Weight::from_ref_time(155_793).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: Council Members (r:1 w:0) + // Storage: Council Voting (r:1 w:1) + /// The range of component `m` is `[5, 100]`. + fn vote(m: u32, ) -> Weight { + // Minimum execution time: 34_374 nanoseconds. + Weight::from_ref_time(35_497_372) + // Standard Error: 823 + .saturating_add(Weight::from_ref_time(44_599).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalOf (r:0 w:1) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_disapproved(m: u32, p: u32, ) -> Weight { + // Minimum execution time: 32_974 nanoseconds. + Weight::from_ref_time(36_852_048) + // Standard Error: 1_681 + .saturating_add(Weight::from_ref_time(22_190).saturating_mul(m.into())) + // Standard Error: 1_640 + .saturating_add(Weight::from_ref_time(147_927).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: Council Proposals (r:1 w:1) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Minimum execution time: 45_028 nanoseconds. + Weight::from_ref_time(47_711_944) + // Standard Error: 164 + .saturating_add(Weight::from_ref_time(2_826).saturating_mul(b.into())) + // Standard Error: 1_736 + .saturating_add(Weight::from_ref_time(23_704).saturating_mul(m.into())) + // Standard Error: 1_692 + .saturating_add(Weight::from_ref_time(166_436).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Prime (r:1 w:0) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalOf (r:0 w:1) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_disapproved(m: u32, p: u32, ) -> Weight { + // Minimum execution time: 35_666 nanoseconds. + Weight::from_ref_time(39_143_611) + // Standard Error: 1_682 + .saturating_add(Weight::from_ref_time(32_686).saturating_mul(m.into())) + // Standard Error: 1_640 + .saturating_add(Weight::from_ref_time(146_961).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Prime (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: Council Proposals (r:1 w:1) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Minimum execution time: 47_984 nanoseconds. + Weight::from_ref_time(51_494_740) + // Standard Error: 293 + .saturating_add(Weight::from_ref_time(3_220).saturating_mul(b.into())) + // Standard Error: 3_105 + .saturating_add(Weight::from_ref_time(22_392).saturating_mul(m.into())) + // Standard Error: 3_026 + .saturating_add(Weight::from_ref_time(151_908).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Council Proposals (r:1 w:1) + // Storage: Council Voting (r:0 w:1) + // Storage: Council ProposalOf (r:0 w:1) + /// The range of component `p` is `[1, 100]`. + fn disapprove_proposal(p: u32, ) -> Weight { + // Minimum execution time: 20_327 nanoseconds. + Weight::from_ref_time(24_983_794) + // Standard Error: 1_978 + .saturating_add(Weight::from_ref_time(151_542).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(3)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Council Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: Council Voting (r:100 w:100) - // Storage: Council Prime (r:0 w:1) - fn set_members(m: u32, n: u32, p: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 10_000 - .saturating_add((12_294_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 10_000 - .saturating_add((115_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 10_000 - .saturating_add((15_674_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(p as Weight))) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) - } - // Storage: Council Members (r:1 w:0) - fn execute(b: u32, m: u32, ) -> Weight { - (19_140_000 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 1_000 - .saturating_add((16_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - } - // Storage: Council Members (r:1 w:0) - // Storage: Council ProposalOf (r:1 w:0) - fn propose_execute(b: u32, m: u32, ) -> Weight { - (21_134_000 as Weight) - // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 1_000 - .saturating_add((35_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - } - // Storage: Council Members (r:1 w:0) - // Storage: Council ProposalOf (r:1 w:1) - // Storage: Council Proposals (r:1 w:1) - // Storage: Council ProposalCount (r:1 w:1) - // Storage: Council Voting (r:0 w:1) - fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (23_899_000 as Weight) - // Standard Error: 0 - .saturating_add((9_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 2_000 - .saturating_add((31_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 2_000 - .saturating_add((206_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - // Storage: Council Members (r:1 w:0) - // Storage: Council Voting (r:1 w:1) - fn vote(m: u32, ) -> Weight { - (35_238_000 as Weight) - // Standard Error: 2_000 - .saturating_add((56_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Council Voting (r:1 w:1) - // Storage: Council Members (r:1 w:0) - // Storage: Council Proposals (r:1 w:1) - // Storage: Council ProposalOf (r:0 w:1) - fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (35_709_000 as Weight) - // Standard Error: 2_000 - .saturating_add((13_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 2_000 - .saturating_add((138_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Council Voting (r:1 w:1) - // Storage: Council Members (r:1 w:0) - // Storage: Council ProposalOf (r:1 w:1) - // Storage: Council Proposals (r:1 w:1) - fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (36_338_000 as Weight) - // Standard Error: 0 - .saturating_add((8_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 2_000 - .saturating_add((52_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 2_000 - .saturating_add((200_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Council Voting (r:1 w:1) - // Storage: Council Members (r:1 w:0) - // Storage: Council Prime (r:1 w:0) - // Storage: Council Proposals (r:1 w:1) - // Storage: Council ProposalOf (r:0 w:1) - fn close_disapproved(m: u32, p: u32, ) -> Weight { - (39_150_000 as Weight) - // Standard Error: 3_000 - .saturating_add((16_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 2_000 - .saturating_add((126_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Council Voting (r:1 w:1) - // Storage: Council Members (r:1 w:0) - // Storage: Council Prime (r:1 w:0) - // Storage: Council ProposalOf (r:1 w:1) - // Storage: Council Proposals (r:1 w:1) - fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (38_344_000 as Weight) - // Standard Error: 0 - .saturating_add((8_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 2_000 - .saturating_add((61_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 2_000 - .saturating_add((200_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Council Proposals (r:1 w:1) - // Storage: Council Voting (r:0 w:1) - // Storage: Council ProposalOf (r:0 w:1) - fn disapprove_proposal(p: u32, ) -> Weight { - (20_578_000 as Weight) - // Standard Error: 1_000 - .saturating_add((198_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } + // Storage: Council Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: Council Prime (r:0 w:1) + // Storage: Council Voting (r:100 w:100) + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { + // Minimum execution time: 19_626 nanoseconds. + Weight::from_ref_time(19_913_000) + // Standard Error: 73_912 + .saturating_add(Weight::from_ref_time(5_932_920).saturating_mul(m.into())) + // Standard Error: 73_912 + .saturating_add(Weight::from_ref_time(8_505_202).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(RocksDbWeight::get().writes(2)) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(p.into()))) + } + // Storage: Council Members (r:1 w:0) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn execute(b: u32, _m: u32, ) -> Weight { + // Minimum execution time: 21_224 nanoseconds. + Weight::from_ref_time(26_759_706) + // Standard Error: 1_601 + .saturating_add(Weight::from_ref_time(7_701).saturating_mul(b.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + } + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:0) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn propose_execute(_b: u32, _m: u32, ) -> Weight { + // Minimum execution time: 24_752 nanoseconds. + Weight::from_ref_time(37_239_236) + .saturating_add(RocksDbWeight::get().reads(2)) + } + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalCount (r:1 w:1) + // Storage: Council Voting (r:0 w:1) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[2, 100]`. + /// The range of component `p` is `[1, 100]`. + fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { + // Minimum execution time: 30_103 nanoseconds. + Weight::from_ref_time(32_334_071) + // Standard Error: 210 + .saturating_add(Weight::from_ref_time(4_321).saturating_mul(b.into())) + // Standard Error: 2_196 + .saturating_add(Weight::from_ref_time(27_240).saturating_mul(m.into())) + // Standard Error: 2_168 + .saturating_add(Weight::from_ref_time(155_793).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(4)) + } + // Storage: Council Members (r:1 w:0) + // Storage: Council Voting (r:1 w:1) + /// The range of component `m` is `[5, 100]`. + fn vote(m: u32, ) -> Weight { + // Minimum execution time: 34_374 nanoseconds. + Weight::from_ref_time(35_497_372) + // Standard Error: 823 + .saturating_add(Weight::from_ref_time(44_599).saturating_mul(m.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalOf (r:0 w:1) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_disapproved(m: u32, p: u32, ) -> Weight { + // Minimum execution time: 32_974 nanoseconds. + Weight::from_ref_time(36_852_048) + // Standard Error: 1_681 + .saturating_add(Weight::from_ref_time(22_190).saturating_mul(m.into())) + // Standard Error: 1_640 + .saturating_add(Weight::from_ref_time(147_927).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: Council Proposals (r:1 w:1) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Minimum execution time: 45_028 nanoseconds. + Weight::from_ref_time(47_711_944) + // Standard Error: 164 + .saturating_add(Weight::from_ref_time(2_826).saturating_mul(b.into())) + // Standard Error: 1_736 + .saturating_add(Weight::from_ref_time(23_704).saturating_mul(m.into())) + // Standard Error: 1_692 + .saturating_add(Weight::from_ref_time(166_436).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Prime (r:1 w:0) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalOf (r:0 w:1) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_disapproved(m: u32, p: u32, ) -> Weight { + // Minimum execution time: 35_666 nanoseconds. + Weight::from_ref_time(39_143_611) + // Standard Error: 1_682 + .saturating_add(Weight::from_ref_time(32_686).saturating_mul(m.into())) + // Standard Error: 1_640 + .saturating_add(Weight::from_ref_time(146_961).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Prime (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: Council Proposals (r:1 w:1) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Minimum execution time: 47_984 nanoseconds. + Weight::from_ref_time(51_494_740) + // Standard Error: 293 + .saturating_add(Weight::from_ref_time(3_220).saturating_mul(b.into())) + // Standard Error: 3_105 + .saturating_add(Weight::from_ref_time(22_392).saturating_mul(m.into())) + // Standard Error: 3_026 + .saturating_add(Weight::from_ref_time(151_908).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Council Proposals (r:1 w:1) + // Storage: Council Voting (r:0 w:1) + // Storage: Council ProposalOf (r:0 w:1) + /// The range of component `p` is `[1, 100]`. + fn disapprove_proposal(p: u32, ) -> Weight { + // Minimum execution time: 20_327 nanoseconds. + Weight::from_ref_time(24_983_794) + // Standard Error: 1_978 + .saturating_add(Weight::from_ref_time(151_542).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(3)) + } } diff --git a/runtime/calamari/src/weights/pallet_democracy.rs b/runtime/calamari/src/weights/pallet_democracy.rs index b30a4f2ad..2d6280bbd 100644 --- a/runtime/calamari/src/weights/pallet_democracy.rs +++ b/runtime/calamari/src/weights/pallet_democracy.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_democracy //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -47,27 +47,23 @@ use manta_primitives::constants::RocksDbWeight; /// Weight functions needed for pallet_democracy. pub trait WeightInfo { fn propose() -> Weight; - fn second(s: u32, ) -> Weight; - fn vote_new(r: u32, ) -> Weight; - fn vote_existing(r: u32, ) -> Weight; + fn second() -> Weight; + fn vote_new() -> Weight; + fn vote_existing() -> Weight; fn emergency_cancel() -> Weight; - fn blacklist(p: u32, ) -> Weight; - fn external_propose(v: u32, ) -> Weight; + fn blacklist() -> Weight; + fn external_propose() -> Weight; fn external_propose_majority() -> Weight; fn external_propose_default() -> Weight; fn fast_track() -> Weight; - fn veto_external(v: u32, ) -> Weight; - fn cancel_proposal(p: u32, ) -> Weight; + fn veto_external() -> Weight; + fn cancel_proposal() -> Weight; fn cancel_referendum() -> Weight; - fn cancel_queued(r: u32, ) -> Weight; fn on_initialize_base(r: u32, ) -> Weight; fn on_initialize_base_with_launch_period(r: u32, ) -> Weight; fn delegate(r: u32, ) -> Weight; fn undelegate(r: u32, ) -> Weight; fn clear_public_proposals() -> Weight; - fn note_preimage(b: u32, ) -> Weight; - fn note_imminent_preimage(b: u32, ) -> Weight; - fn reap_preimage(b: u32, ) -> Weight; fn unlock_remove(r: u32, ) -> Weight; fn unlock_set(r: u32, ) -> Weight; fn remove_vote(r: u32, ) -> Weight; @@ -77,474 +73,438 @@ pub trait WeightInfo { /// Weights for pallet_democracy using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_democracy::WeightInfo for SubstrateWeight { - // Storage: Democracy PublicPropCount (r:1 w:1) - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:0) - // Storage: Democracy DepositOf (r:0 w:1) - fn propose() -> Weight { - (50_207_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy DepositOf (r:1 w:1) - fn second(s: u32, ) -> Weight { - (31_673_000 as Weight) - // Standard Error: 1_000 - .saturating_add((119_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - fn vote_new(r: u32, ) -> Weight { - (41_497_000 as Weight) - // Standard Error: 2_000 - .saturating_add((153_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - fn vote_existing(r: u32, ) -> Weight { - (41_815_000 as Weight) - // Standard Error: 3_000 - .saturating_add((134_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy Cancellations (r:1 w:1) - fn emergency_cancel() -> Weight { - (20_497_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy Blacklist (r:0 w:1) - // Storage: Democracy DepositOf (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn blacklist(p: u32, ) -> Weight { - (51_917_000 as Weight) - // Standard Error: 6_000 - .saturating_add((223_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) - } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:0) - fn external_propose(v: u32, ) -> Weight { - (11_416_000 as Weight) - // Standard Error: 0 - .saturating_add((23_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy NextExternal (r:0 w:1) - fn external_propose_majority() -> Weight { - (4_017_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy NextExternal (r:0 w:1) - fn external_propose_default() -> Weight { - (4_044_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:1) - // Storage: Democracy ReferendumInfoOf (r:0 w:1) - fn fast_track() -> Weight { - (20_425_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:1) - fn veto_external(v: u32, ) -> Weight { - (21_517_000 as Weight) - // Standard Error: 1_000 - .saturating_add((42_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy DepositOf (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn cancel_proposal(p: u32, ) -> Weight { - (39_741_000 as Weight) - // Standard Error: 3_000 - .saturating_add((196_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:0 w:1) - fn cancel_referendum() -> Weight { - (13_310_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - fn cancel_queued(r: u32, ) -> Weight { - (23_829_000 as Weight) - // Standard Error: 4_000 - .saturating_add((1_238_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy LowestUnbaked (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:0) - // Storage: Democracy ReferendumInfoOf (r:1 w:0) - fn on_initialize_base(r: u32, ) -> Weight { - (3_683_000 as Weight) - // Standard Error: 8_000 - .saturating_add((3_404_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy LowestUnbaked (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:0) - // Storage: Democracy LastTabledWasExternal (r:1 w:0) - // Storage: Democracy NextExternal (r:1 w:0) - // Storage: Democracy PublicProps (r:1 w:0) - // Storage: Democracy ReferendumInfoOf (r:1 w:0) - fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - (8_918_000 as Weight) - // Standard Error: 10_000 - .saturating_add((3_415_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy VotingOf (r:3 w:3) - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - fn delegate(r: u32, ) -> Weight { - (42_100_000 as Weight) - // Standard Error: 8_000 - .saturating_add((4_528_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) - } - // Storage: Democracy VotingOf (r:2 w:2) - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - fn undelegate(r: u32, ) -> Weight { - (21_523_000 as Weight) - // Standard Error: 8_000 - .saturating_add((4_614_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) - } - // Storage: Democracy PublicProps (r:0 w:1) - fn clear_public_proposals() -> Weight { - (4_839_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy Preimages (r:1 w:1) - fn note_preimage(b: u32, ) -> Weight { - (29_065_000 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy Preimages (r:1 w:1) - fn note_imminent_preimage(b: u32, ) -> Weight { - (20_452_000 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy Preimages (r:1 w:1) - // Storage: System Account (r:1 w:0) - fn reap_preimage(b: u32, ) -> Weight { - (29_055_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn unlock_remove(r: u32, ) -> Weight { - (27_460_000 as Weight) - // Standard Error: 2_000 - .saturating_add((52_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn unlock_set(r: u32, ) -> Weight { - (26_539_000 as Weight) - // Standard Error: 2_000 - .saturating_add((110_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - fn remove_vote(r: u32, ) -> Weight { - (16_581_000 as Weight) - // Standard Error: 2_000 - .saturating_add((134_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - fn remove_other_vote(r: u32, ) -> Weight { - (16_808_000 as Weight) - // Standard Error: 2_000 - .saturating_add((107_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } + // Storage: Democracy PublicPropCount (r:1 w:1) + // Storage: Democracy PublicProps (r:1 w:1) + // Storage: Democracy Blacklist (r:1 w:0) + // Storage: Democracy DepositOf (r:0 w:1) + fn propose() -> Weight { + // Minimum execution time: 52_057 nanoseconds. + Weight::from_ref_time(53_508_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Democracy DepositOf (r:1 w:1) + fn second() -> Weight { + // Minimum execution time: 44_680 nanoseconds. + Weight::from_ref_time(45_771_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + fn vote_new() -> Weight { + // Minimum execution time: 60_105 nanoseconds. + Weight::from_ref_time(60_887_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + fn vote_existing() -> Weight { + // Minimum execution time: 60_228 nanoseconds. + Weight::from_ref_time(61_503_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy Cancellations (r:1 w:1) + fn emergency_cancel() -> Weight { + // Minimum execution time: 23_498 nanoseconds. + Weight::from_ref_time(24_194_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Democracy PublicProps (r:1 w:1) + // Storage: Democracy DepositOf (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy Blacklist (r:0 w:1) + fn blacklist() -> Weight { + // Minimum execution time: 84_589 nanoseconds. + Weight::from_ref_time(86_311_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(6)) + } + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy Blacklist (r:1 w:0) + fn external_propose() -> Weight { + // Minimum execution time: 18_333 nanoseconds. + Weight::from_ref_time(18_673_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Democracy NextExternal (r:0 w:1) + fn external_propose_majority() -> Weight { + // Minimum execution time: 15_870 nanoseconds. + Weight::from_ref_time(16_466_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Democracy NextExternal (r:0 w:1) + fn external_propose_default() -> Weight { + // Minimum execution time: 10_807 nanoseconds. + Weight::from_ref_time(11_081_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy ReferendumCount (r:1 w:1) + // Storage: Democracy ReferendumInfoOf (r:0 w:1) + fn fast_track() -> Weight { + // Minimum execution time: 32_693 nanoseconds. + Weight::from_ref_time(33_156_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy Blacklist (r:1 w:1) + fn veto_external() -> Weight { + // Minimum execution time: 28_601 nanoseconds. + Weight::from_ref_time(30_727_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Democracy PublicProps (r:1 w:1) + // Storage: Democracy DepositOf (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn cancel_proposal() -> Weight { + // Minimum execution time: 71_255 nanoseconds. + Weight::from_ref_time(74_838_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Democracy ReferendumInfoOf (r:0 w:1) + fn cancel_referendum() -> Weight { + // Minimum execution time: 14_729 nanoseconds. + Weight::from_ref_time(15_174_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Democracy LowestUnbaked (r:1 w:1) + // Storage: Democracy ReferendumCount (r:1 w:0) + // Storage: Democracy ReferendumInfoOf (r:2 w:0) + /// The range of component `r` is `[0, 99]`. + fn on_initialize_base(r: u32, ) -> Weight { + // Minimum execution time: 7_376 nanoseconds. + Weight::from_ref_time(11_919_150) + // Standard Error: 9_702 + .saturating_add(Weight::from_ref_time(2_520_010).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Democracy LowestUnbaked (r:1 w:1) + // Storage: Democracy ReferendumCount (r:1 w:0) + // Storage: Democracy LastTabledWasExternal (r:1 w:0) + // Storage: Democracy NextExternal (r:1 w:0) + // Storage: Democracy PublicProps (r:1 w:0) + // Storage: Democracy ReferendumInfoOf (r:2 w:0) + /// The range of component `r` is `[0, 99]`. + fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { + // Minimum execution time: 10_018 nanoseconds. + Weight::from_ref_time(16_471_661) + // Standard Error: 11_288 + .saturating_add(Weight::from_ref_time(2_475_431).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Democracy VotingOf (r:3 w:3) + // Storage: Balances Locks (r:1 w:1) + // Storage: Democracy ReferendumInfoOf (r:2 w:2) + /// The range of component `r` is `[0, 99]`. + fn delegate(r: u32, ) -> Weight { + // Minimum execution time: 45_506 nanoseconds. + Weight::from_ref_time(56_361_394) + // Standard Error: 11_208 + .saturating_add(Weight::from_ref_time(3_591_582).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) + } + // Storage: Democracy VotingOf (r:2 w:2) + // Storage: Democracy ReferendumInfoOf (r:2 w:2) + /// The range of component `r` is `[0, 99]`. + fn undelegate(r: u32, ) -> Weight { + // Minimum execution time: 28_390 nanoseconds. + Weight::from_ref_time(32_325_302) + // Standard Error: 10_265 + .saturating_add(Weight::from_ref_time(3_593_970).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) + } + // Storage: Democracy PublicProps (r:0 w:1) + fn clear_public_proposals() -> Weight { + // Minimum execution time: 5_289 nanoseconds. + Weight::from_ref_time(5_481_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + /// The range of component `r` is `[0, 99]`. + fn unlock_remove(r: u32, ) -> Weight { + // Minimum execution time: 28_086 nanoseconds. + Weight::from_ref_time(35_762_563) + // Standard Error: 4_505 + .saturating_add(Weight::from_ref_time(48_763).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + /// The range of component `r` is `[0, 99]`. + fn unlock_set(r: u32, ) -> Weight { + // Minimum execution time: 32_125 nanoseconds. + Weight::from_ref_time(34_051_347) + // Standard Error: 1_813 + .saturating_add(Weight::from_ref_time(114_508).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + /// The range of component `r` is `[1, 100]`. + fn remove_vote(r: u32, ) -> Weight { + // Minimum execution time: 18_371 nanoseconds. + Weight::from_ref_time(20_730_924) + // Standard Error: 1_902 + .saturating_add(Weight::from_ref_time(110_212).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + /// The range of component `r` is `[1, 100]`. + fn remove_other_vote(r: u32, ) -> Weight { + // Minimum execution time: 17_823 nanoseconds. + Weight::from_ref_time(20_420_530) + // Standard Error: 1_327 + .saturating_add(Weight::from_ref_time(111_156).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Democracy PublicPropCount (r:1 w:1) - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:0) - // Storage: Democracy DepositOf (r:0 w:1) - fn propose() -> Weight { - (50_207_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy DepositOf (r:1 w:1) - fn second(s: u32, ) -> Weight { - (31_673_000 as Weight) - // Standard Error: 1_000 - .saturating_add((119_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - fn vote_new(r: u32, ) -> Weight { - (41_497_000 as Weight) - // Standard Error: 2_000 - .saturating_add((153_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - fn vote_existing(r: u32, ) -> Weight { - (41_815_000 as Weight) - // Standard Error: 3_000 - .saturating_add((134_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy Cancellations (r:1 w:1) - fn emergency_cancel() -> Weight { - (20_497_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy Blacklist (r:0 w:1) - // Storage: Democracy DepositOf (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn blacklist(p: u32, ) -> Weight { - (51_917_000 as Weight) - // Standard Error: 6_000 - .saturating_add((223_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) - } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:0) - fn external_propose(v: u32, ) -> Weight { - (11_416_000 as Weight) - // Standard Error: 0 - .saturating_add((23_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy NextExternal (r:0 w:1) - fn external_propose_majority() -> Weight { - (4_017_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy NextExternal (r:0 w:1) - fn external_propose_default() -> Weight { - (4_044_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:1) - // Storage: Democracy ReferendumInfoOf (r:0 w:1) - fn fast_track() -> Weight { - (20_425_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:1) - fn veto_external(v: u32, ) -> Weight { - (21_517_000 as Weight) - // Standard Error: 1_000 - .saturating_add((42_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy DepositOf (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn cancel_proposal(p: u32, ) -> Weight { - (39_741_000 as Weight) - // Standard Error: 3_000 - .saturating_add((196_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:0 w:1) - fn cancel_referendum() -> Weight { - (13_310_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - fn cancel_queued(r: u32, ) -> Weight { - (23_829_000 as Weight) - // Standard Error: 4_000 - .saturating_add((1_238_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy LowestUnbaked (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:0) - // Storage: Democracy ReferendumInfoOf (r:1 w:0) - fn on_initialize_base(r: u32, ) -> Weight { - (3_683_000 as Weight) - // Standard Error: 8_000 - .saturating_add((3_404_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy LowestUnbaked (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:0) - // Storage: Democracy LastTabledWasExternal (r:1 w:0) - // Storage: Democracy NextExternal (r:1 w:0) - // Storage: Democracy PublicProps (r:1 w:0) - // Storage: Democracy ReferendumInfoOf (r:1 w:0) - fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - (8_918_000 as Weight) - // Standard Error: 10_000 - .saturating_add((3_415_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy VotingOf (r:3 w:3) - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - fn delegate(r: u32, ) -> Weight { - (42_100_000 as Weight) - // Standard Error: 8_000 - .saturating_add((4_528_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) - } - // Storage: Democracy VotingOf (r:2 w:2) - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - fn undelegate(r: u32, ) -> Weight { - (21_523_000 as Weight) - // Standard Error: 8_000 - .saturating_add((4_614_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) - } - // Storage: Democracy PublicProps (r:0 w:1) - fn clear_public_proposals() -> Weight { - (4_839_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy Preimages (r:1 w:1) - fn note_preimage(b: u32, ) -> Weight { - (29_065_000 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy Preimages (r:1 w:1) - fn note_imminent_preimage(b: u32, ) -> Weight { - (20_452_000 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy Preimages (r:1 w:1) - // Storage: System Account (r:1 w:0) - fn reap_preimage(b: u32, ) -> Weight { - (29_055_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn unlock_remove(r: u32, ) -> Weight { - (27_460_000 as Weight) - // Standard Error: 2_000 - .saturating_add((52_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn unlock_set(r: u32, ) -> Weight { - (26_539_000 as Weight) - // Standard Error: 2_000 - .saturating_add((110_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - fn remove_vote(r: u32, ) -> Weight { - (16_581_000 as Weight) - // Standard Error: 2_000 - .saturating_add((134_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - fn remove_other_vote(r: u32, ) -> Weight { - (16_808_000 as Weight) - // Standard Error: 2_000 - .saturating_add((107_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } + // Storage: Democracy PublicPropCount (r:1 w:1) + // Storage: Democracy PublicProps (r:1 w:1) + // Storage: Democracy Blacklist (r:1 w:0) + // Storage: Democracy DepositOf (r:0 w:1) + fn propose() -> Weight { + // Minimum execution time: 52_057 nanoseconds. + Weight::from_ref_time(53_508_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Democracy DepositOf (r:1 w:1) + fn second() -> Weight { + // Minimum execution time: 44_680 nanoseconds. + Weight::from_ref_time(45_771_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + fn vote_new() -> Weight { + // Minimum execution time: 60_105 nanoseconds. + Weight::from_ref_time(60_887_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + fn vote_existing() -> Weight { + // Minimum execution time: 60_228 nanoseconds. + Weight::from_ref_time(61_503_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy Cancellations (r:1 w:1) + fn emergency_cancel() -> Weight { + // Minimum execution time: 23_498 nanoseconds. + Weight::from_ref_time(24_194_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Democracy PublicProps (r:1 w:1) + // Storage: Democracy DepositOf (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy Blacklist (r:0 w:1) + fn blacklist() -> Weight { + // Minimum execution time: 84_589 nanoseconds. + Weight::from_ref_time(86_311_000) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(6)) + } + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy Blacklist (r:1 w:0) + fn external_propose() -> Weight { + // Minimum execution time: 18_333 nanoseconds. + Weight::from_ref_time(18_673_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Democracy NextExternal (r:0 w:1) + fn external_propose_majority() -> Weight { + // Minimum execution time: 15_870 nanoseconds. + Weight::from_ref_time(16_466_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Democracy NextExternal (r:0 w:1) + fn external_propose_default() -> Weight { + // Minimum execution time: 10_807 nanoseconds. + Weight::from_ref_time(11_081_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy ReferendumCount (r:1 w:1) + // Storage: Democracy ReferendumInfoOf (r:0 w:1) + fn fast_track() -> Weight { + // Minimum execution time: 32_693 nanoseconds. + Weight::from_ref_time(33_156_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy Blacklist (r:1 w:1) + fn veto_external() -> Weight { + // Minimum execution time: 28_601 nanoseconds. + Weight::from_ref_time(30_727_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Democracy PublicProps (r:1 w:1) + // Storage: Democracy DepositOf (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn cancel_proposal() -> Weight { + // Minimum execution time: 71_255 nanoseconds. + Weight::from_ref_time(74_838_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Democracy ReferendumInfoOf (r:0 w:1) + fn cancel_referendum() -> Weight { + // Minimum execution time: 14_729 nanoseconds. + Weight::from_ref_time(15_174_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Democracy LowestUnbaked (r:1 w:1) + // Storage: Democracy ReferendumCount (r:1 w:0) + // Storage: Democracy ReferendumInfoOf (r:2 w:0) + /// The range of component `r` is `[0, 99]`. + fn on_initialize_base(r: u32, ) -> Weight { + // Minimum execution time: 7_376 nanoseconds. + Weight::from_ref_time(11_919_150) + // Standard Error: 9_702 + .saturating_add(Weight::from_ref_time(2_520_010).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Democracy LowestUnbaked (r:1 w:1) + // Storage: Democracy ReferendumCount (r:1 w:0) + // Storage: Democracy LastTabledWasExternal (r:1 w:0) + // Storage: Democracy NextExternal (r:1 w:0) + // Storage: Democracy PublicProps (r:1 w:0) + // Storage: Democracy ReferendumInfoOf (r:2 w:0) + /// The range of component `r` is `[0, 99]`. + fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { + // Minimum execution time: 10_018 nanoseconds. + Weight::from_ref_time(16_471_661) + // Standard Error: 11_288 + .saturating_add(Weight::from_ref_time(2_475_431).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Democracy VotingOf (r:3 w:3) + // Storage: Balances Locks (r:1 w:1) + // Storage: Democracy ReferendumInfoOf (r:2 w:2) + /// The range of component `r` is `[0, 99]`. + fn delegate(r: u32, ) -> Weight { + // Minimum execution time: 45_506 nanoseconds. + Weight::from_ref_time(56_361_394) + // Standard Error: 11_208 + .saturating_add(Weight::from_ref_time(3_591_582).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(RocksDbWeight::get().writes(4)) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into()))) + } + // Storage: Democracy VotingOf (r:2 w:2) + // Storage: Democracy ReferendumInfoOf (r:2 w:2) + /// The range of component `r` is `[0, 99]`. + fn undelegate(r: u32, ) -> Weight { + // Minimum execution time: 28_390 nanoseconds. + Weight::from_ref_time(32_325_302) + // Standard Error: 10_265 + .saturating_add(Weight::from_ref_time(3_593_970).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(RocksDbWeight::get().writes(2)) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into()))) + } + // Storage: Democracy PublicProps (r:0 w:1) + fn clear_public_proposals() -> Weight { + // Minimum execution time: 5_289 nanoseconds. + Weight::from_ref_time(5_481_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + /// The range of component `r` is `[0, 99]`. + fn unlock_remove(r: u32, ) -> Weight { + // Minimum execution time: 28_086 nanoseconds. + Weight::from_ref_time(35_762_563) + // Standard Error: 4_505 + .saturating_add(Weight::from_ref_time(48_763).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + /// The range of component `r` is `[0, 99]`. + fn unlock_set(r: u32, ) -> Weight { + // Minimum execution time: 32_125 nanoseconds. + Weight::from_ref_time(34_051_347) + // Standard Error: 1_813 + .saturating_add(Weight::from_ref_time(114_508).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + /// The range of component `r` is `[1, 100]`. + fn remove_vote(r: u32, ) -> Weight { + // Minimum execution time: 18_371 nanoseconds. + Weight::from_ref_time(20_730_924) + // Standard Error: 1_902 + .saturating_add(Weight::from_ref_time(110_212).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + /// The range of component `r` is `[1, 100]`. + fn remove_other_vote(r: u32, ) -> Weight { + // Minimum execution time: 17_823 nanoseconds. + Weight::from_ref_time(20_420_530) + // Standard Error: 1_327 + .saturating_add(Weight::from_ref_time(111_156).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } } diff --git a/runtime/calamari/src/weights/pallet_manta_pay.rs b/runtime/calamari/src/weights/pallet_manta_pay.rs index 6929bcd1c..6b2f11f34 100644 --- a/runtime/calamari/src/weights/pallet_manta_pay.rs +++ b/runtime/calamari/src/weights/pallet_manta_pay.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_manta_pay //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -55,100 +55,108 @@ pub trait WeightInfo { /// Weights for pallet_manta_pay using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_manta_pay::WeightInfo for SubstrateWeight { - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: MantaPay UtxoSet (r:1 w:1) - // Storage: MantaPay NullifierSetSize (r:1 w:0) - // Storage: MantaPay ShardTrees (r:1 w:1) - // Storage: MantaPay UtxoAccumulatorOutputs (r:0 w:1) - // Storage: MantaPay Shards (r:0 w:1) - fn to_private() -> Weight { - (39_401_269_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: MantaPay UtxoAccumulatorOutputs (r:2 w:1) - // Storage: MantaPay NullifierCommitmentSet (r:2 w:2) - // Storage: MantaPay UtxoSet (r:1 w:1) - // Storage: MantaPay NullifierSetSize (r:1 w:1) - // Storage: MantaPay ShardTrees (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: MantaPay NullifierSetInsertionOrder (r:0 w:2) - // Storage: MantaPay Shards (r:0 w:1) - fn to_public() -> Weight { - (52_849_232_000 as Weight) - .saturating_add(T::DbWeight::get().reads(11 as Weight)) - .saturating_add(T::DbWeight::get().writes(13 as Weight)) - } - // Storage: MantaPay UtxoAccumulatorOutputs (r:2 w:2) - // Storage: MantaPay NullifierCommitmentSet (r:2 w:2) - // Storage: MantaPay UtxoSet (r:2 w:2) - // Storage: MantaPay NullifierSetSize (r:1 w:1) - // Storage: MantaPay ShardTrees (r:2 w:2) - // Storage: MantaPay NullifierSetInsertionOrder (r:0 w:2) - // Storage: MantaPay Shards (r:0 w:2) - fn private_transfer() -> Weight { - (69_999_747_000 as Weight) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().writes(13 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - fn public_transfer() -> Weight { - (45_900_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: MantaPay UtxoSet (r:1 w:1) + // Storage: MantaPay NullifierSetSize (r:1 w:0) + // Storage: MantaPay ShardTrees (r:1 w:1) + // Storage: MantaPay UtxoAccumulatorOutputs (r:0 w:1) + // Storage: MantaPay Shards (r:0 w:1) + fn to_private() -> Weight { + // Minimum execution time: 39_358_686 nanoseconds. + Weight::from_ref_time(39_445_523_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(7)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: MantaPay UtxoAccumulatorOutputs (r:2 w:1) + // Storage: MantaPay NullifierCommitmentSet (r:2 w:2) + // Storage: MantaPay UtxoSet (r:1 w:1) + // Storage: MantaPay NullifierSetSize (r:1 w:1) + // Storage: MantaPay ShardTrees (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: MantaPay NullifierSetInsertionOrder (r:0 w:2) + // Storage: MantaPay Shards (r:0 w:1) + fn to_public() -> Weight { + // Minimum execution time: 52_503_782 nanoseconds. + Weight::from_ref_time(52_623_987_000) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(13)) + } + // Storage: MantaPay UtxoAccumulatorOutputs (r:2 w:2) + // Storage: MantaPay NullifierCommitmentSet (r:2 w:2) + // Storage: MantaPay UtxoSet (r:2 w:2) + // Storage: MantaPay NullifierSetSize (r:1 w:1) + // Storage: MantaPay ShardTrees (r:2 w:2) + // Storage: MantaPay NullifierSetInsertionOrder (r:0 w:2) + // Storage: MantaPay Shards (r:0 w:2) + fn private_transfer() -> Weight { + // Minimum execution time: 69_717_034 nanoseconds. + Weight::from_ref_time(69_825_809_000) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(13)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + fn public_transfer() -> Weight { + // Minimum execution time: 64_398 nanoseconds. + Weight::from_ref_time(98_068_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: MantaPay UtxoSet (r:1 w:1) - // Storage: MantaPay NullifierSetSize (r:1 w:0) - // Storage: MantaPay ShardTrees (r:1 w:1) - // Storage: MantaPay UtxoAccumulatorOutputs (r:0 w:1) - // Storage: MantaPay Shards (r:0 w:1) - fn to_private() -> Weight { - (39_401_269_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(7 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: MantaPay UtxoAccumulatorOutputs (r:2 w:1) - // Storage: MantaPay NullifierCommitmentSet (r:2 w:2) - // Storage: MantaPay UtxoSet (r:1 w:1) - // Storage: MantaPay NullifierSetSize (r:1 w:1) - // Storage: MantaPay ShardTrees (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: MantaPay NullifierSetInsertionOrder (r:0 w:2) - // Storage: MantaPay Shards (r:0 w:1) - fn to_public() -> Weight { - (52_849_232_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(11 as Weight)) - .saturating_add(RocksDbWeight::get().writes(13 as Weight)) - } - // Storage: MantaPay UtxoAccumulatorOutputs (r:2 w:2) - // Storage: MantaPay NullifierCommitmentSet (r:2 w:2) - // Storage: MantaPay UtxoSet (r:2 w:2) - // Storage: MantaPay NullifierSetSize (r:1 w:1) - // Storage: MantaPay ShardTrees (r:2 w:2) - // Storage: MantaPay NullifierSetInsertionOrder (r:0 w:2) - // Storage: MantaPay Shards (r:0 w:2) - fn private_transfer() -> Weight { - (69_999_747_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(9 as Weight)) - .saturating_add(RocksDbWeight::get().writes(13 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - fn public_transfer() -> Weight { - (45_900_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: MantaPay UtxoSet (r:1 w:1) + // Storage: MantaPay NullifierSetSize (r:1 w:0) + // Storage: MantaPay ShardTrees (r:1 w:1) + // Storage: MantaPay UtxoAccumulatorOutputs (r:0 w:1) + // Storage: MantaPay Shards (r:0 w:1) + fn to_private() -> Weight { + // Minimum execution time: 39_358_686 nanoseconds. + Weight::from_ref_time(39_445_523_000) + .saturating_add(RocksDbWeight::get().reads(6)) + .saturating_add(RocksDbWeight::get().writes(7)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: MantaPay UtxoAccumulatorOutputs (r:2 w:1) + // Storage: MantaPay NullifierCommitmentSet (r:2 w:2) + // Storage: MantaPay UtxoSet (r:1 w:1) + // Storage: MantaPay NullifierSetSize (r:1 w:1) + // Storage: MantaPay ShardTrees (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: MantaPay NullifierSetInsertionOrder (r:0 w:2) + // Storage: MantaPay Shards (r:0 w:1) + fn to_public() -> Weight { + // Minimum execution time: 52_503_782 nanoseconds. + Weight::from_ref_time(52_623_987_000) + .saturating_add(RocksDbWeight::get().reads(11)) + .saturating_add(RocksDbWeight::get().writes(13)) + } + // Storage: MantaPay UtxoAccumulatorOutputs (r:2 w:2) + // Storage: MantaPay NullifierCommitmentSet (r:2 w:2) + // Storage: MantaPay UtxoSet (r:2 w:2) + // Storage: MantaPay NullifierSetSize (r:1 w:1) + // Storage: MantaPay ShardTrees (r:2 w:2) + // Storage: MantaPay NullifierSetInsertionOrder (r:0 w:2) + // Storage: MantaPay Shards (r:0 w:2) + fn private_transfer() -> Weight { + // Minimum execution time: 69_717_034 nanoseconds. + Weight::from_ref_time(69_825_809_000) + .saturating_add(RocksDbWeight::get().reads(9)) + .saturating_add(RocksDbWeight::get().writes(13)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + fn public_transfer() -> Weight { + // Minimum execution time: 64_398 nanoseconds. + Weight::from_ref_time(98_068_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } } diff --git a/runtime/calamari/src/weights/pallet_manta_sbt.rs b/runtime/calamari/src/weights/pallet_manta_sbt.rs index d11791c82..1d2e769bd 100644 --- a/runtime/calamari/src/weights/pallet_manta_sbt.rs +++ b/runtime/calamari/src/weights/pallet_manta_sbt.rs @@ -65,22 +65,23 @@ impl pallet_manta_sbt::WeightInfo for SubstrateWeight Weight { - (39_392_276_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(30_118_417_000) + .saturating_add(T::DbWeight::get().reads(3u64)) + .saturating_add(T::DbWeight::get().writes(6u64)) } // Storage: System Account (r:1 w:1) // Storage: MantaSbt NextSbtId (r:1 w:1) // Storage: MantaSbt ReservedIds (r:0 w:1) fn reserve_sbt() -> Weight { - (51_535_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(48_730_000) + .saturating_add(T::DbWeight::get().reads(2u64)) + .saturating_add(T::DbWeight::get().writes(3u64)) } - // Storage: MantaSbt AllowlistAccount (r:0 w:1) + + fn change_allowlist_account() -> Weight { - (14_344_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(13_553_000) + .saturating_add(T::DbWeight::get().writes(1u64)) } // Storage: MantaSbt MintIdRegistry (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) @@ -88,22 +89,22 @@ impl pallet_manta_sbt::WeightInfo for SubstrateWeight Weight { - (29_510_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(28_472_000) + .saturating_add(T::DbWeight::get().reads(5u64)) + .saturating_add(T::DbWeight::get().writes(2u64)) } // Storage: MantaSbt NextMintId (r:1 w:1) // Storage: MantaSbt MintIdRegistry (r:0 w:1) fn new_mint_info() -> Weight { - (15_845_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(15_471_000) + .saturating_add(T::DbWeight::get().reads(1u64)) + .saturating_add(T::DbWeight::get().writes(2u64)) } // Storage: MantaSbt MintIdRegistry (r:1 w:1) fn update_mint_info() -> Weight { - (17_710_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(16_570_000) + .saturating_add(T::DbWeight::get().reads(1u64)) + .saturating_add(T::DbWeight::get().writes(1u64)) } // Storage: MantaSbt MintIdRegistry (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) @@ -115,9 +116,9 @@ impl pallet_manta_sbt::WeightInfo for SubstrateWeight Weight { - (39_423_381_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(30_190_491_000) + .saturating_add(T::DbWeight::get().reads(6u64)) + .saturating_add(T::DbWeight::get().writes(6u64)) } } @@ -130,22 +131,23 @@ impl WeightInfo for () { // Storage: MantaSbt Shards (r:0 w:1) // Storage: MantaSbt SbtMetadataV2 (r:0 w:1) fn to_private() -> Weight { - (39_392_276_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(30_118_417_000) + .saturating_add(RocksDbWeight::get().reads(3u64)) + .saturating_add(RocksDbWeight::get().writes(6u64)) } // Storage: System Account (r:1 w:1) // Storage: MantaSbt NextSbtId (r:1 w:1) // Storage: MantaSbt ReservedIds (r:0 w:1) fn reserve_sbt() -> Weight { - (51_535_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(48_730_000) + .saturating_add(RocksDbWeight::get().reads(2u64)) + .saturating_add(RocksDbWeight::get().writes(3u64)) } - // Storage: MantaSbt AllowlistAccount (r:0 w:1) + + fn change_allowlist_account() -> Weight { - (14_344_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(13_553_000) + .saturating_add(RocksDbWeight::get().writes(1u64)) } // Storage: MantaSbt MintIdRegistry (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) @@ -153,22 +155,22 @@ impl WeightInfo for () { // Storage: MantaSbt EvmAccountAllowlist (r:1 w:1) // Storage: MantaSbt NextSbtId (r:1 w:1) fn allowlist_evm_account() -> Weight { - (29_510_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(28_472_000u64) + .saturating_add(RocksDbWeight::get().reads(5u64)) + .saturating_add(RocksDbWeight::get().writes(2u64)) } // Storage: MantaSbt NextMintId (r:1 w:1) // Storage: MantaSbt MintIdRegistry (r:0 w:1) fn new_mint_info() -> Weight { - (15_845_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(15_471_000u64) + .saturating_add(RocksDbWeight::get().reads(1u64)) + .saturating_add(RocksDbWeight::get().writes(2u64)) } // Storage: MantaSbt MintIdRegistry (r:1 w:1) fn update_mint_info() -> Weight { - (17_710_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(16_570_000u64) + .saturating_add(RocksDbWeight::get().reads(1u64)) + .saturating_add(RocksDbWeight::get().writes(1u64)) } // Storage: MantaSbt MintIdRegistry (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) @@ -180,8 +182,8 @@ impl WeightInfo for () { // Storage: MantaSbt Shards (r:0 w:1) // Storage: MantaSbt SbtMetadataV2 (r:0 w:1) fn mint_sbt_eth() -> Weight { - (39_423_381_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(30_190_491_000u64) + .saturating_add(RocksDbWeight::get().reads(6u64)) + .saturating_add(RocksDbWeight::get().writes(6u64)) } } diff --git a/runtime/calamari/src/weights/pallet_membership.rs b/runtime/calamari/src/weights/pallet_membership.rs index ab5e5adf6..ade6cab12 100644 --- a/runtime/calamari/src/weights/pallet_membership.rs +++ b/runtime/calamari/src/weights/pallet_membership.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_membership //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -58,162 +58,182 @@ pub trait WeightInfo { /// Weights for pallet_membership using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_membership::WeightInfo for SubstrateWeight { - // Storage: CouncilMembership Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: Council Members (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn add_member(m: u32, ) -> Weight { - (20_633_000 as Weight) - // Standard Error: 1_000 - .saturating_add((51_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: CouncilMembership Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: CouncilMembership Prime (r:1 w:0) - // Storage: Council Members (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn remove_member(m: u32, ) -> Weight { - (24_148_000 as Weight) - // Standard Error: 1_000 - .saturating_add((51_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: CouncilMembership Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: CouncilMembership Prime (r:1 w:0) - // Storage: Council Members (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn swap_member(m: u32, ) -> Weight { - (24_338_000 as Weight) - // Standard Error: 1_000 - .saturating_add((55_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: CouncilMembership Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: CouncilMembership Prime (r:1 w:0) - // Storage: Council Members (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn reset_member(m: u32, ) -> Weight { - (23_649_000 as Weight) - // Standard Error: 2_000 - .saturating_add((186_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: CouncilMembership Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: CouncilMembership Prime (r:1 w:1) - // Storage: Council Members (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn change_key(m: u32, ) -> Weight { - (24_819_000 as Weight) - // Standard Error: 1_000 - .saturating_add((57_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - // Storage: CouncilMembership Members (r:1 w:0) - // Storage: CouncilMembership Prime (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn set_prime(m: u32, ) -> Weight { - (8_197_000 as Weight) - // Standard Error: 2_000 - .saturating_add((28_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: CouncilMembership Prime (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn clear_prime(m: u32, ) -> Weight { - (4_893_000 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[1, 99]`. + fn add_member(m: u32, ) -> Weight { + // Minimum execution time: 22_273 nanoseconds. + Weight::from_ref_time(26_905_591) + // Standard Error: 9_235 + .saturating_add(Weight::from_ref_time(2_849).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[2, 100]`. + fn remove_member(m: u32, ) -> Weight { + // Minimum execution time: 24_470 nanoseconds. + Weight::from_ref_time(26_936_997) + // Standard Error: 14_846 + .saturating_add(Weight::from_ref_time(80_188).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[2, 100]`. + fn swap_member(m: u32, ) -> Weight { + // Minimum execution time: 26_156 nanoseconds. + Weight::from_ref_time(29_893_998) + // Standard Error: 7_644 + .saturating_add(Weight::from_ref_time(18_646).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. + fn reset_member(m: u32, ) -> Weight { + // Minimum execution time: 25_674 nanoseconds. + Weight::from_ref_time(27_068_374) + // Standard Error: 1_168 + .saturating_add(Weight::from_ref_time(177_390).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:1) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. + fn change_key(m: u32, ) -> Weight { + // Minimum execution time: 25_800 nanoseconds. + Weight::from_ref_time(27_581_292) + // Standard Error: 6_346 + .saturating_add(Weight::from_ref_time(67_140).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: CouncilMembership Members (r:1 w:0) + // Storage: CouncilMembership Prime (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. + fn set_prime(_m: u32, ) -> Weight { + // Minimum execution time: 10_297 nanoseconds. + Weight::from_ref_time(14_062_547) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: CouncilMembership Prime (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. + fn clear_prime(_m: u32, ) -> Weight { + // Minimum execution time: 5_202 nanoseconds. + Weight::from_ref_time(9_266_452) + .saturating_add(T::DbWeight::get().writes(2)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: CouncilMembership Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: Council Members (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn add_member(m: u32, ) -> Weight { - (20_633_000 as Weight) - // Standard Error: 1_000 - .saturating_add((51_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: CouncilMembership Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: CouncilMembership Prime (r:1 w:0) - // Storage: Council Members (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn remove_member(m: u32, ) -> Weight { - (24_148_000 as Weight) - // Standard Error: 1_000 - .saturating_add((51_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: CouncilMembership Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: CouncilMembership Prime (r:1 w:0) - // Storage: Council Members (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn swap_member(m: u32, ) -> Weight { - (24_338_000 as Weight) - // Standard Error: 1_000 - .saturating_add((55_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: CouncilMembership Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: CouncilMembership Prime (r:1 w:0) - // Storage: Council Members (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn reset_member(m: u32, ) -> Weight { - (23_649_000 as Weight) - // Standard Error: 2_000 - .saturating_add((186_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: CouncilMembership Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: CouncilMembership Prime (r:1 w:1) - // Storage: Council Members (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn change_key(m: u32, ) -> Weight { - (24_819_000 as Weight) - // Standard Error: 1_000 - .saturating_add((57_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - // Storage: CouncilMembership Members (r:1 w:0) - // Storage: CouncilMembership Prime (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn set_prime(m: u32, ) -> Weight { - (8_197_000 as Weight) - // Standard Error: 2_000 - .saturating_add((28_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: CouncilMembership Prime (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn clear_prime(m: u32, ) -> Weight { - (4_893_000 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[1, 99]`. + fn add_member(m: u32, ) -> Weight { + // Minimum execution time: 22_273 nanoseconds. + Weight::from_ref_time(26_905_591) + // Standard Error: 9_235 + .saturating_add(Weight::from_ref_time(2_849).saturating_mul(m.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[2, 100]`. + fn remove_member(m: u32, ) -> Weight { + // Minimum execution time: 24_470 nanoseconds. + Weight::from_ref_time(26_936_997) + // Standard Error: 14_846 + .saturating_add(Weight::from_ref_time(80_188).saturating_mul(m.into())) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[2, 100]`. + fn swap_member(m: u32, ) -> Weight { + // Minimum execution time: 26_156 nanoseconds. + Weight::from_ref_time(29_893_998) + // Standard Error: 7_644 + .saturating_add(Weight::from_ref_time(18_646).saturating_mul(m.into())) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. + fn reset_member(m: u32, ) -> Weight { + // Minimum execution time: 25_674 nanoseconds. + Weight::from_ref_time(27_068_374) + // Standard Error: 1_168 + .saturating_add(Weight::from_ref_time(177_390).saturating_mul(m.into())) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:1) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. + fn change_key(m: u32, ) -> Weight { + // Minimum execution time: 25_800 nanoseconds. + Weight::from_ref_time(27_581_292) + // Standard Error: 6_346 + .saturating_add(Weight::from_ref_time(67_140).saturating_mul(m.into())) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(4)) + } + // Storage: CouncilMembership Members (r:1 w:0) + // Storage: CouncilMembership Prime (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. + fn set_prime(_m: u32, ) -> Weight { + // Minimum execution time: 10_297 nanoseconds. + Weight::from_ref_time(14_062_547) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: CouncilMembership Prime (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. + fn clear_prime(_m: u32, ) -> Weight { + // Minimum execution time: 5_202 nanoseconds. + Weight::from_ref_time(9_266_452) + .saturating_add(RocksDbWeight::get().writes(2)) + } } diff --git a/runtime/calamari/src/weights/pallet_multisig.rs b/runtime/calamari/src/weights/pallet_multisig.rs index 0765b7ad1..1cb6e81b8 100644 --- a/runtime/calamari/src/weights/pallet_multisig.rs +++ b/runtime/calamari/src/weights/pallet_multisig.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_multisig //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -48,217 +48,176 @@ use manta_primitives::constants::RocksDbWeight; pub trait WeightInfo { fn as_multi_threshold_1(z: u32, ) -> Weight; fn as_multi_create(s: u32, z: u32, ) -> Weight; - fn as_multi_create_store(s: u32, z: u32, ) -> Weight; fn as_multi_approve(s: u32, z: u32, ) -> Weight; - fn as_multi_approve_store(s: u32, z: u32, ) -> Weight; fn as_multi_complete(s: u32, z: u32, ) -> Weight; fn approve_as_multi_create(s: u32, ) -> Weight; fn approve_as_multi_approve(s: u32, ) -> Weight; - fn approve_as_multi_complete(s: u32, ) -> Weight; fn cancel_as_multi(s: u32, ) -> Weight; } /// Weights for pallet_multisig using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_multisig::WeightInfo for SubstrateWeight { - fn as_multi_threshold_1(z: u32, ) -> Weight { - (21_339_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn as_multi_create(s: u32, z: u32, ) -> Weight { - (39_518_000 as Weight) - // Standard Error: 2_000 - .saturating_add((112_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (43_925_000 as Weight) - // Standard Error: 2_000 - .saturating_add((91_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (24_847_000 as Weight) - // Standard Error: 2_000 - .saturating_add((99_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (40_970_000 as Weight) - // Standard Error: 2_000 - .saturating_add((110_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (52_713_000 as Weight) - // Standard Error: 2_000 - .saturating_add((119_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn approve_as_multi_create(s: u32, ) -> Weight { - (35_191_000 as Weight) - // Standard Error: 2_000 - .saturating_add((135_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:0) - fn approve_as_multi_approve(s: u32, ) -> Weight { - (22_053_000 as Weight) - // Standard Error: 1_000 - .saturating_add((118_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn approve_as_multi_complete(s: u32, ) -> Weight { - (63_231_000 as Weight) - // Standard Error: 3_000 - .saturating_add((147_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - fn cancel_as_multi(s: u32, ) -> Weight { - (50_736_000 as Weight) - // Standard Error: 3_000 - .saturating_add((133_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } + /// The range of component `z` is `[0, 10000]`. + fn as_multi_threshold_1(z: u32, ) -> Weight { + // Minimum execution time: 18_730 nanoseconds. + Weight::from_ref_time(19_262_905) + // Standard Error: 10 + .saturating_add(Weight::from_ref_time(652).saturating_mul(z.into())) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_create(s: u32, z: u32, ) -> Weight { + // Minimum execution time: 51_798 nanoseconds. + Weight::from_ref_time(41_132_414) + // Standard Error: 3_437 + .saturating_add(Weight::from_ref_time(132_838).saturating_mul(s.into())) + // Standard Error: 33 + .saturating_add(Weight::from_ref_time(1_817).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Multisig Multisigs (r:1 w:1) + /// The range of component `s` is `[3, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_approve(s: u32, z: u32, ) -> Weight { + // Minimum execution time: 39_756 nanoseconds. + Weight::from_ref_time(28_662_316) + // Standard Error: 1_979 + .saturating_add(Weight::from_ref_time(124_314).saturating_mul(s.into())) + // Standard Error: 19 + .saturating_add(Weight::from_ref_time(1_806).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: System Account (r:1 w:1) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_complete(s: u32, z: u32, ) -> Weight { + // Minimum execution time: 55_683 nanoseconds. + Weight::from_ref_time(43_604_197) + // Standard Error: 1_882 + .saturating_add(Weight::from_ref_time(138_142).saturating_mul(s.into())) + // Standard Error: 18 + .saturating_add(Weight::from_ref_time(1_763).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. + fn approve_as_multi_create(s: u32, ) -> Weight { + // Minimum execution time: 35_587 nanoseconds. + Weight::from_ref_time(38_568_188) + // Standard Error: 2_304 + .saturating_add(Weight::from_ref_time(142_555).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Multisig Multisigs (r:1 w:1) + /// The range of component `s` is `[2, 100]`. + fn approve_as_multi_approve(s: u32, ) -> Weight { + // Minimum execution time: 25_120 nanoseconds. + Weight::from_ref_time(26_537_869) + // Standard Error: 1_549 + .saturating_add(Weight::from_ref_time(129_206).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) + /// The range of component `s` is `[2, 100]`. + fn cancel_as_multi(s: u32, ) -> Weight { + // Minimum execution time: 36_495 nanoseconds. + Weight::from_ref_time(38_414_852) + // Standard Error: 2_129 + .saturating_add(Weight::from_ref_time(128_615).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } // For backwards compatibility and tests impl WeightInfo for () { - fn as_multi_threshold_1(z: u32, ) -> Weight { - (21_339_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn as_multi_create(s: u32, z: u32, ) -> Weight { - (39_518_000 as Weight) - // Standard Error: 2_000 - .saturating_add((112_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (43_925_000 as Weight) - // Standard Error: 2_000 - .saturating_add((91_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (24_847_000 as Weight) - // Standard Error: 2_000 - .saturating_add((99_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (40_970_000 as Weight) - // Standard Error: 2_000 - .saturating_add((110_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (52_713_000 as Weight) - // Standard Error: 2_000 - .saturating_add((119_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn approve_as_multi_create(s: u32, ) -> Weight { - (35_191_000 as Weight) - // Standard Error: 2_000 - .saturating_add((135_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:0) - fn approve_as_multi_approve(s: u32, ) -> Weight { - (22_053_000 as Weight) - // Standard Error: 1_000 - .saturating_add((118_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn approve_as_multi_complete(s: u32, ) -> Weight { - (63_231_000 as Weight) - // Standard Error: 3_000 - .saturating_add((147_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - fn cancel_as_multi(s: u32, ) -> Weight { - (50_736_000 as Weight) - // Standard Error: 3_000 - .saturating_add((133_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } + /// The range of component `z` is `[0, 10000]`. + fn as_multi_threshold_1(z: u32, ) -> Weight { + // Minimum execution time: 18_730 nanoseconds. + Weight::from_ref_time(19_262_905) + // Standard Error: 10 + .saturating_add(Weight::from_ref_time(652).saturating_mul(z.into())) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_create(s: u32, z: u32, ) -> Weight { + // Minimum execution time: 51_798 nanoseconds. + Weight::from_ref_time(41_132_414) + // Standard Error: 3_437 + .saturating_add(Weight::from_ref_time(132_838).saturating_mul(s.into())) + // Standard Error: 33 + .saturating_add(Weight::from_ref_time(1_817).saturating_mul(z.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Multisig Multisigs (r:1 w:1) + /// The range of component `s` is `[3, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_approve(s: u32, z: u32, ) -> Weight { + // Minimum execution time: 39_756 nanoseconds. + Weight::from_ref_time(28_662_316) + // Standard Error: 1_979 + .saturating_add(Weight::from_ref_time(124_314).saturating_mul(s.into())) + // Standard Error: 19 + .saturating_add(Weight::from_ref_time(1_806).saturating_mul(z.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: System Account (r:1 w:1) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_complete(s: u32, z: u32, ) -> Weight { + // Minimum execution time: 55_683 nanoseconds. + Weight::from_ref_time(43_604_197) + // Standard Error: 1_882 + .saturating_add(Weight::from_ref_time(138_142).saturating_mul(s.into())) + // Standard Error: 18 + .saturating_add(Weight::from_ref_time(1_763).saturating_mul(z.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. + fn approve_as_multi_create(s: u32, ) -> Weight { + // Minimum execution time: 35_587 nanoseconds. + Weight::from_ref_time(38_568_188) + // Standard Error: 2_304 + .saturating_add(Weight::from_ref_time(142_555).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Multisig Multisigs (r:1 w:1) + /// The range of component `s` is `[2, 100]`. + fn approve_as_multi_approve(s: u32, ) -> Weight { + // Minimum execution time: 25_120 nanoseconds. + Weight::from_ref_time(26_537_869) + // Standard Error: 1_549 + .saturating_add(Weight::from_ref_time(129_206).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Multisig Multisigs (r:1 w:1) + /// The range of component `s` is `[2, 100]`. + fn cancel_as_multi(s: u32, ) -> Weight { + // Minimum execution time: 36_495 nanoseconds. + Weight::from_ref_time(38_414_852) + // Standard Error: 2_129 + .saturating_add(Weight::from_ref_time(128_615).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } } diff --git a/runtime/calamari/src/weights/pallet_parachain_staking.rs b/runtime/calamari/src/weights/pallet_parachain_staking.rs index 0cb449980..1d5c4548a 100644 --- a/runtime/calamari/src/weights/pallet_parachain_staking.rs +++ b/runtime/calamari/src/weights/pallet_parachain_staking.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_parachain_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -82,598 +82,680 @@ pub trait WeightInfo { /// Weights for pallet_parachain_staking using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_parachain_staking::WeightInfo for SubstrateWeight { - // Storage: ParachainStaking InflationConfig (r:1 w:1) - fn set_staking_expectations() -> Weight { - (16_882_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking InflationConfig (r:1 w:1) - fn set_inflation() -> Weight { - (63_977_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) - fn set_parachain_bond_account() -> Weight { - (16_915_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) - fn set_parachain_bond_reserve_percent() -> Weight { - (16_538_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking TotalSelected (r:1 w:1) - fn set_total_selected() -> Weight { - (19_028_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking CollatorCommission (r:1 w:1) - fn set_collator_commission() -> Weight { - (15_303_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking TotalSelected (r:1 w:0) - // Storage: ParachainStaking InflationConfig (r:1 w:1) - fn set_blocks_per_round() -> Weight { - (67_858_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking DelegatorState (r:1 w:0) - // Storage: CollatorSelection Candidates (r:1 w:0) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:0 w:1) - // Storage: ParachainStaking BottomDelegations (r:0 w:1) - fn join_candidates(x: u32, ) -> Weight { - (74_674_000 as Weight) - // Standard Error: 1_000 - .saturating_add((65_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn schedule_leave_candidates(x: u32, ) -> Weight { - (63_056_000 as Weight) - // Standard Error: 1_000 - .saturating_add((38_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: Balances Locks (r:2 w:2) - // Storage: System Account (r:2 w:2) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - // Storage: ParachainStaking BottomDelegations (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - fn execute_leave_candidates(x: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 53_000 - .saturating_add((25_722_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(x as Weight))) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(x as Weight))) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn cancel_leave_candidates(x: u32, ) -> Weight { - (51_351_000 as Weight) - // Standard Error: 1_000 - .saturating_add((54_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn go_offline() -> Weight { - (24_450_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn go_online() -> Weight { - (23_722_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn candidate_bond_more() -> Weight { - (42_708_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - fn schedule_candidate_bond_less() -> Weight { - (24_262_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn execute_candidate_bond_less() -> Weight { - (60_002_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - fn cancel_candidate_bond_less() -> Weight { - (20_795_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - fn delegate(x: u32, y: u32, ) -> Weight { - (67_324_000 as Weight) - // Standard Error: 6_000 - .saturating_add((519_000 as Weight).saturating_mul(x as Weight)) - // Standard Error: 1_000 - .saturating_add((299_000 as Weight).saturating_mul(y as Weight)) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn schedule_leave_delegators() -> Weight { - (30_242_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn execute_leave_delegators(x: u32, ) -> Weight { - (37_420_000 as Weight) - // Standard Error: 28_000 - .saturating_add((23_820_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(x as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(x as Weight))) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn cancel_leave_delegators() -> Weight { - (27_589_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn schedule_revoke_delegation() -> Weight { - (28_558_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:0) - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - fn delegator_bond_more() -> Weight { - (59_767_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn schedule_delegator_bond_less() -> Weight { - (28_619_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - fn execute_revoke_delegation() -> Weight { - (86_485_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - fn execute_delegator_bond_less() -> Weight { - (77_778_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn cancel_revoke_delegation() -> Weight { - (26_692_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn cancel_delegator_bond_less() -> Weight { - (31_861_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking Points (r:1 w:0) - // Storage: ParachainStaking Staked (r:1 w:2) - // Storage: ParachainStaking InflationConfig (r:1 w:0) - // Storage: ParachainStaking ParachainBondInfo (r:1 w:0) - // Storage: ParachainStaking CollatorCommission (r:1 w:0) - // Storage: ParachainStaking CandidatePool (r:1 w:0) - // Storage: ParachainStaking TotalSelected (r:1 w:0) - // Storage: ParachainStaking CandidateInfo (r:9 w:0) - // Storage: ParachainStaking DelegationScheduledRequests (r:9 w:0) - // Storage: ParachainStaking TopDelegations (r:9 w:0) - // Storage: ParachainStaking Total (r:1 w:0) - // Storage: ParachainStaking AwardedPts (r:2 w:1) - // Storage: ParachainStaking AtStake (r:1 w:10) - // Storage: System Account (r:101 w:101) - // Storage: ParachainStaking SelectedCandidates (r:0 w:1) - // Storage: ParachainStaking DelayedPayouts (r:0 w:1) - fn round_transition_on_initialize(x: u32, _y: u32, ) -> Weight { - (1_549_930_000 as Weight) - // Standard Error: 362_000 - .saturating_add((3_929_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(119 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(x as Weight))) - .saturating_add(T::DbWeight::get().writes(113 as Weight)) - } - // Storage: ParachainStaking DelayedPayouts (r:1 w:0) - // Storage: ParachainStaking Points (r:1 w:0) - // Storage: ParachainStaking AwardedPts (r:2 w:1) - // Storage: ParachainStaking AtStake (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn pay_one_collator_reward(y: u32, ) -> Weight { - (48_076_000 as Weight) - // Standard Error: 10_000 - .saturating_add((13_235_000 as Weight).saturating_mul(y as Weight)) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(y as Weight))) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(y as Weight))) - } - fn base_on_initialize() -> Weight { - (3_550_000 as Weight) - } + // Storage: ParachainStaking InflationConfig (r:1 w:1) + fn set_staking_expectations() -> Weight { + // Minimum execution time: 19_898 nanoseconds. + Weight::from_ref_time(20_479_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: ParachainStaking InflationConfig (r:1 w:1) + fn set_inflation() -> Weight { + // Minimum execution time: 65_935 nanoseconds. + Weight::from_ref_time(66_557_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) + fn set_parachain_bond_account() -> Weight { + // Minimum execution time: 19_621 nanoseconds. + Weight::from_ref_time(20_625_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) + fn set_parachain_bond_reserve_percent() -> Weight { + // Minimum execution time: 19_169 nanoseconds. + Weight::from_ref_time(19_528_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: ParachainStaking TotalSelected (r:1 w:1) + fn set_total_selected() -> Weight { + // Minimum execution time: 64_181 nanoseconds. + Weight::from_ref_time(65_510_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: ParachainStaking CollatorCommission (r:1 w:1) + fn set_collator_commission() -> Weight { + // Minimum execution time: 35_985 nanoseconds. + Weight::from_ref_time(37_303_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: ParachainStaking TotalSelected (r:1 w:0) + // Storage: ParachainStaking InflationConfig (r:1 w:1) + fn set_blocks_per_round() -> Weight { + // Minimum execution time: 93_232 nanoseconds. + Weight::from_ref_time(93_912_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking DelegatorState (r:1 w:0) + // Storage: CollatorSelection Candidates (r:1 w:0) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:0 w:1) + // Storage: ParachainStaking BottomDelegations (r:0 w:1) + /// The range of component `x` is `[3, 1000]`. + fn join_candidates(x: u32, ) -> Weight { + // Minimum execution time: 56_568 nanoseconds. + Weight::from_ref_time(68_735_283) + // Standard Error: 830 + .saturating_add(Weight::from_ref_time(92_287).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(7)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + /// The range of component `x` is `[3, 1000]`. + fn schedule_leave_candidates(x: u32, ) -> Weight { + // Minimum execution time: 34_644 nanoseconds. + Weight::from_ref_time(38_257_713) + // Standard Error: 818 + .saturating_add(Weight::from_ref_time(79_787).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: Balances Locks (r:2 w:2) + // Storage: System Account (r:2 w:2) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + // Storage: ParachainStaking BottomDelegations (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + /// The range of component `x` is `[2, 150]`. + fn execute_leave_candidates(x: u32, ) -> Weight { + // Minimum execution time: 97_511 nanoseconds. + Weight::from_ref_time(98_261_000) + // Standard Error: 41_692 + .saturating_add(Weight::from_ref_time(20_660_404).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(x.into()))) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(x.into()))) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + /// The range of component `x` is `[3, 1000]`. + fn cancel_leave_candidates(x: u32, ) -> Weight { + // Minimum execution time: 29_255 nanoseconds. + Weight::from_ref_time(34_131_612) + // Standard Error: 793 + .saturating_add(Weight::from_ref_time(85_688).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + fn go_offline() -> Weight { + // Minimum execution time: 38_857 nanoseconds. + Weight::from_ref_time(58_051_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + fn go_online() -> Weight { + // Minimum execution time: 29_705 nanoseconds. + Weight::from_ref_time(30_229_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + fn candidate_bond_more() -> Weight { + // Minimum execution time: 47_485 nanoseconds. + Weight::from_ref_time(51_260_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + fn schedule_candidate_bond_less() -> Weight { + // Minimum execution time: 27_428 nanoseconds. + Weight::from_ref_time(28_352_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + fn execute_candidate_bond_less() -> Weight { + // Minimum execution time: 60_073 nanoseconds. + Weight::from_ref_time(61_223_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + fn cancel_candidate_bond_less() -> Weight { + // Minimum execution time: 23_563 nanoseconds. + Weight::from_ref_time(25_362_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + /// The range of component `x` is `[3, 25]`. + /// The range of component `y` is `[2, 100]`. + fn delegate(x: u32, y: u32, ) -> Weight { + // Minimum execution time: 83_164 nanoseconds. + Weight::from_ref_time(77_725_004) + // Standard Error: 6_920 + .saturating_add(Weight::from_ref_time(296_635).saturating_mul(x.into())) + // Standard Error: 1_595 + .saturating_add(Weight::from_ref_time(164_015).saturating_mul(y.into())) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(7)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn schedule_leave_delegators() -> Weight { + // Minimum execution time: 33_081 nanoseconds. + Weight::from_ref_time(33_705_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + /// The range of component `x` is `[2, 25]`. + fn execute_leave_delegators(x: u32, ) -> Weight { + // Minimum execution time: 85_673 nanoseconds. + Weight::from_ref_time(50_265_593) + // Standard Error: 23_168 + .saturating_add(Weight::from_ref_time(19_134_171).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(x.into()))) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(x.into()))) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn cancel_leave_delegators() -> Weight { + // Minimum execution time: 31_955 nanoseconds. + Weight::from_ref_time(44_446_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn schedule_revoke_delegation() -> Weight { + // Minimum execution time: 31_662 nanoseconds. + Weight::from_ref_time(33_182_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:0) + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + fn delegator_bond_more() -> Weight { + // Minimum execution time: 68_434 nanoseconds. + Weight::from_ref_time(73_975_000) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(7)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn schedule_delegator_bond_less() -> Weight { + // Minimum execution time: 30_543 nanoseconds. + Weight::from_ref_time(32_834_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + fn execute_revoke_delegation() -> Weight { + // Minimum execution time: 88_104 nanoseconds. + Weight::from_ref_time(89_906_000) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(8)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + fn execute_delegator_bond_less() -> Weight { + // Minimum execution time: 80_688 nanoseconds. + Weight::from_ref_time(82_560_000) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(8)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn cancel_revoke_delegation() -> Weight { + // Minimum execution time: 29_873 nanoseconds. + Weight::from_ref_time(30_540_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn cancel_delegator_bond_less() -> Weight { + // Minimum execution time: 36_739 nanoseconds. + Weight::from_ref_time(37_385_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainStaking Points (r:1 w:0) + // Storage: ParachainStaking Staked (r:1 w:2) + // Storage: ParachainStaking InflationConfig (r:1 w:0) + // Storage: ParachainStaking ParachainBondInfo (r:1 w:0) + // Storage: ParachainStaking CollatorCommission (r:1 w:0) + // Storage: ParachainStaking CandidatePool (r:1 w:0) + // Storage: ParachainStaking TotalSelected (r:1 w:0) + // Storage: ParachainStaking CandidateInfo (r:9 w:0) + // Storage: ParachainStaking DelegationScheduledRequests (r:9 w:0) + // Storage: ParachainStaking TopDelegations (r:9 w:0) + // Storage: ParachainStaking Total (r:1 w:0) + // Storage: ParachainStaking AwardedPts (r:2 w:1) + // Storage: ParachainStaking AtStake (r:1 w:10) + // Storage: System Account (r:101 w:101) + // Storage: ParachainStaking SelectedCandidates (r:0 w:1) + // Storage: ParachainStaking DelayedPayouts (r:0 w:1) + /// The range of component `x` is `[8, 100]`. + /// The range of component `y` is `[0, 10000]`. + fn round_transition_on_initialize(x: u32, _y: u32, ) -> Weight { + // Minimum execution time: 717_672 nanoseconds. + Weight::from_ref_time(1_371_254_655) + // Standard Error: 325_640 + .saturating_add(Weight::from_ref_time(1_720_347).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(119)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(x.into()))) + .saturating_add(T::DbWeight::get().writes(113)) + } + // Storage: ParachainStaking DelayedPayouts (r:1 w:0) + // Storage: ParachainStaking Points (r:1 w:0) + // Storage: ParachainStaking AwardedPts (r:2 w:1) + // Storage: ParachainStaking AtStake (r:1 w:1) + // Storage: System Account (r:1 w:1) + /// The range of component `y` is `[0, 100]`. + fn pay_one_collator_reward(y: u32, ) -> Weight { + // Minimum execution time: 54_703 nanoseconds. + Weight::from_ref_time(64_324_136) + // Standard Error: 18_790 + .saturating_add(Weight::from_ref_time(11_539_826).saturating_mul(y.into())) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(y.into()))) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(y.into()))) + } + fn base_on_initialize() -> Weight { + // Minimum execution time: 6_483 nanoseconds. + Weight::from_ref_time(6_824_000) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: ParachainStaking InflationConfig (r:1 w:1) - fn set_staking_expectations() -> Weight { - (16_882_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking InflationConfig (r:1 w:1) - fn set_inflation() -> Weight { - (63_977_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) - fn set_parachain_bond_account() -> Weight { - (16_915_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) - fn set_parachain_bond_reserve_percent() -> Weight { - (16_538_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking TotalSelected (r:1 w:1) - fn set_total_selected() -> Weight { - (19_028_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking CollatorCommission (r:1 w:1) - fn set_collator_commission() -> Weight { - (15_303_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking TotalSelected (r:1 w:0) - // Storage: ParachainStaking InflationConfig (r:1 w:1) - fn set_blocks_per_round() -> Weight { - (67_858_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking DelegatorState (r:1 w:0) - // Storage: CollatorSelection Candidates (r:1 w:0) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:0 w:1) - // Storage: ParachainStaking BottomDelegations (r:0 w:1) - fn join_candidates(x: u32, ) -> Weight { - (74_674_000 as Weight) - // Standard Error: 1_000 - .saturating_add((65_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(7 as Weight)) - .saturating_add(RocksDbWeight::get().writes(7 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn schedule_leave_candidates(x: u32, ) -> Weight { - (63_056_000 as Weight) - // Standard Error: 1_000 - .saturating_add((38_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: Balances Locks (r:2 w:2) - // Storage: System Account (r:2 w:2) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - // Storage: ParachainStaking BottomDelegations (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - fn execute_leave_candidates(x: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 53_000 - .saturating_add((25_722_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(x as Weight))) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(x as Weight))) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn cancel_leave_candidates(x: u32, ) -> Weight { - (51_351_000 as Weight) - // Standard Error: 1_000 - .saturating_add((54_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn go_offline() -> Weight { - (24_450_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn go_online() -> Weight { - (23_722_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn candidate_bond_more() -> Weight { - (42_708_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - fn schedule_candidate_bond_less() -> Weight { - (24_262_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn execute_candidate_bond_less() -> Weight { - (60_002_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - fn cancel_candidate_bond_less() -> Weight { - (20_795_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - fn delegate(x: u32, y: u32, ) -> Weight { - (67_324_000 as Weight) - // Standard Error: 6_000 - .saturating_add((519_000 as Weight).saturating_mul(x as Weight)) - // Standard Error: 1_000 - .saturating_add((299_000 as Weight).saturating_mul(y as Weight)) - .saturating_add(RocksDbWeight::get().reads(7 as Weight)) - .saturating_add(RocksDbWeight::get().writes(7 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn schedule_leave_delegators() -> Weight { - (30_242_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn execute_leave_delegators(x: u32, ) -> Weight { - (37_420_000 as Weight) - // Standard Error: 28_000 - .saturating_add((23_820_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(x as Weight))) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(x as Weight))) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn cancel_leave_delegators() -> Weight { - (27_589_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn schedule_revoke_delegation() -> Weight { - (28_558_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:0) - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - fn delegator_bond_more() -> Weight { - (59_767_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(8 as Weight)) - .saturating_add(RocksDbWeight::get().writes(7 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn schedule_delegator_bond_less() -> Weight { - (28_619_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - fn execute_revoke_delegation() -> Weight { - (86_485_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(8 as Weight)) - .saturating_add(RocksDbWeight::get().writes(8 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - fn execute_delegator_bond_less() -> Weight { - (77_778_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(8 as Weight)) - .saturating_add(RocksDbWeight::get().writes(8 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn cancel_revoke_delegation() -> Weight { - (26_692_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn cancel_delegator_bond_less() -> Weight { - (31_861_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking Points (r:1 w:0) - // Storage: ParachainStaking Staked (r:1 w:2) - // Storage: ParachainStaking InflationConfig (r:1 w:0) - // Storage: ParachainStaking ParachainBondInfo (r:1 w:0) - // Storage: ParachainStaking CollatorCommission (r:1 w:0) - // Storage: ParachainStaking CandidatePool (r:1 w:0) - // Storage: ParachainStaking TotalSelected (r:1 w:0) - // Storage: ParachainStaking CandidateInfo (r:9 w:0) - // Storage: ParachainStaking DelegationScheduledRequests (r:9 w:0) - // Storage: ParachainStaking TopDelegations (r:9 w:0) - // Storage: ParachainStaking Total (r:1 w:0) - // Storage: ParachainStaking AwardedPts (r:2 w:1) - // Storage: ParachainStaking AtStake (r:1 w:10) - // Storage: System Account (r:101 w:101) - // Storage: ParachainStaking SelectedCandidates (r:0 w:1) - // Storage: ParachainStaking DelayedPayouts (r:0 w:1) - fn round_transition_on_initialize(x: u32, _y: u32, ) -> Weight { - (1_549_930_000 as Weight) - // Standard Error: 362_000 - .saturating_add((3_929_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(119 as Weight)) - .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(x as Weight))) - .saturating_add(RocksDbWeight::get().writes(113 as Weight)) - } - // Storage: ParachainStaking DelayedPayouts (r:1 w:0) - // Storage: ParachainStaking Points (r:1 w:0) - // Storage: ParachainStaking AwardedPts (r:2 w:1) - // Storage: ParachainStaking AtStake (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn pay_one_collator_reward(y: u32, ) -> Weight { - (48_076_000 as Weight) - // Standard Error: 10_000 - .saturating_add((13_235_000 as Weight).saturating_mul(y as Weight)) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(y as Weight))) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(y as Weight))) - } - fn base_on_initialize() -> Weight { - (3_550_000 as Weight) - } + // Storage: ParachainStaking InflationConfig (r:1 w:1) + fn set_staking_expectations() -> Weight { + // Minimum execution time: 19_898 nanoseconds. + Weight::from_ref_time(20_479_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: ParachainStaking InflationConfig (r:1 w:1) + fn set_inflation() -> Weight { + // Minimum execution time: 65_935 nanoseconds. + Weight::from_ref_time(66_557_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) + fn set_parachain_bond_account() -> Weight { + // Minimum execution time: 19_621 nanoseconds. + Weight::from_ref_time(20_625_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) + fn set_parachain_bond_reserve_percent() -> Weight { + // Minimum execution time: 19_169 nanoseconds. + Weight::from_ref_time(19_528_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: ParachainStaking TotalSelected (r:1 w:1) + fn set_total_selected() -> Weight { + // Minimum execution time: 64_181 nanoseconds. + Weight::from_ref_time(65_510_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: ParachainStaking CollatorCommission (r:1 w:1) + fn set_collator_commission() -> Weight { + // Minimum execution time: 35_985 nanoseconds. + Weight::from_ref_time(37_303_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: ParachainStaking TotalSelected (r:1 w:0) + // Storage: ParachainStaking InflationConfig (r:1 w:1) + fn set_blocks_per_round() -> Weight { + // Minimum execution time: 93_232 nanoseconds. + Weight::from_ref_time(93_912_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking DelegatorState (r:1 w:0) + // Storage: CollatorSelection Candidates (r:1 w:0) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:0 w:1) + // Storage: ParachainStaking BottomDelegations (r:0 w:1) + /// The range of component `x` is `[3, 1000]`. + fn join_candidates(x: u32, ) -> Weight { + // Minimum execution time: 56_568 nanoseconds. + Weight::from_ref_time(68_735_283) + // Standard Error: 830 + .saturating_add(Weight::from_ref_time(92_287).saturating_mul(x.into())) + .saturating_add(RocksDbWeight::get().reads(7)) + .saturating_add(RocksDbWeight::get().writes(7)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + /// The range of component `x` is `[3, 1000]`. + fn schedule_leave_candidates(x: u32, ) -> Weight { + // Minimum execution time: 34_644 nanoseconds. + Weight::from_ref_time(38_257_713) + // Standard Error: 818 + .saturating_add(Weight::from_ref_time(79_787).saturating_mul(x.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: Balances Locks (r:2 w:2) + // Storage: System Account (r:2 w:2) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + // Storage: ParachainStaking BottomDelegations (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + /// The range of component `x` is `[2, 150]`. + fn execute_leave_candidates(x: u32, ) -> Weight { + // Minimum execution time: 97_511 nanoseconds. + Weight::from_ref_time(98_261_000) + // Standard Error: 41_692 + .saturating_add(Weight::from_ref_time(20_660_404).saturating_mul(x.into())) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(x.into()))) + .saturating_add(RocksDbWeight::get().writes(4)) + .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(x.into()))) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + /// The range of component `x` is `[3, 1000]`. + fn cancel_leave_candidates(x: u32, ) -> Weight { + // Minimum execution time: 29_255 nanoseconds. + Weight::from_ref_time(34_131_612) + // Standard Error: 793 + .saturating_add(Weight::from_ref_time(85_688).saturating_mul(x.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + fn go_offline() -> Weight { + // Minimum execution time: 38_857 nanoseconds. + Weight::from_ref_time(58_051_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + fn go_online() -> Weight { + // Minimum execution time: 29_705 nanoseconds. + Weight::from_ref_time(30_229_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + fn candidate_bond_more() -> Weight { + // Minimum execution time: 47_485 nanoseconds. + Weight::from_ref_time(51_260_000) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(5)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + fn schedule_candidate_bond_less() -> Weight { + // Minimum execution time: 27_428 nanoseconds. + Weight::from_ref_time(28_352_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + fn execute_candidate_bond_less() -> Weight { + // Minimum execution time: 60_073 nanoseconds. + Weight::from_ref_time(61_223_000) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(5)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + fn cancel_candidate_bond_less() -> Weight { + // Minimum execution time: 23_563 nanoseconds. + Weight::from_ref_time(25_362_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + /// The range of component `x` is `[3, 25]`. + /// The range of component `y` is `[2, 100]`. + fn delegate(x: u32, y: u32, ) -> Weight { + // Minimum execution time: 83_164 nanoseconds. + Weight::from_ref_time(77_725_004) + // Standard Error: 6_920 + .saturating_add(Weight::from_ref_time(296_635).saturating_mul(x.into())) + // Standard Error: 1_595 + .saturating_add(Weight::from_ref_time(164_015).saturating_mul(y.into())) + .saturating_add(RocksDbWeight::get().reads(7)) + .saturating_add(RocksDbWeight::get().writes(7)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn schedule_leave_delegators() -> Weight { + // Minimum execution time: 33_081 nanoseconds. + Weight::from_ref_time(33_705_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + /// The range of component `x` is `[2, 25]`. + fn execute_leave_delegators(x: u32, ) -> Weight { + // Minimum execution time: 85_673 nanoseconds. + Weight::from_ref_time(50_265_593) + // Standard Error: 23_168 + .saturating_add(Weight::from_ref_time(19_134_171).saturating_mul(x.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(x.into()))) + .saturating_add(RocksDbWeight::get().writes(2)) + .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(x.into()))) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn cancel_leave_delegators() -> Weight { + // Minimum execution time: 31_955 nanoseconds. + Weight::from_ref_time(44_446_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn schedule_revoke_delegation() -> Weight { + // Minimum execution time: 31_662 nanoseconds. + Weight::from_ref_time(33_182_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:0) + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + fn delegator_bond_more() -> Weight { + // Minimum execution time: 68_434 nanoseconds. + Weight::from_ref_time(73_975_000) + .saturating_add(RocksDbWeight::get().reads(8)) + .saturating_add(RocksDbWeight::get().writes(7)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn schedule_delegator_bond_less() -> Weight { + // Minimum execution time: 30_543 nanoseconds. + Weight::from_ref_time(32_834_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + fn execute_revoke_delegation() -> Weight { + // Minimum execution time: 88_104 nanoseconds. + Weight::from_ref_time(89_906_000) + .saturating_add(RocksDbWeight::get().reads(8)) + .saturating_add(RocksDbWeight::get().writes(8)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + fn execute_delegator_bond_less() -> Weight { + // Minimum execution time: 80_688 nanoseconds. + Weight::from_ref_time(82_560_000) + .saturating_add(RocksDbWeight::get().reads(8)) + .saturating_add(RocksDbWeight::get().writes(8)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn cancel_revoke_delegation() -> Weight { + // Minimum execution time: 29_873 nanoseconds. + Weight::from_ref_time(30_540_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn cancel_delegator_bond_less() -> Weight { + // Minimum execution time: 36_739 nanoseconds. + Weight::from_ref_time(37_385_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: ParachainStaking Points (r:1 w:0) + // Storage: ParachainStaking Staked (r:1 w:2) + // Storage: ParachainStaking InflationConfig (r:1 w:0) + // Storage: ParachainStaking ParachainBondInfo (r:1 w:0) + // Storage: ParachainStaking CollatorCommission (r:1 w:0) + // Storage: ParachainStaking CandidatePool (r:1 w:0) + // Storage: ParachainStaking TotalSelected (r:1 w:0) + // Storage: ParachainStaking CandidateInfo (r:9 w:0) + // Storage: ParachainStaking DelegationScheduledRequests (r:9 w:0) + // Storage: ParachainStaking TopDelegations (r:9 w:0) + // Storage: ParachainStaking Total (r:1 w:0) + // Storage: ParachainStaking AwardedPts (r:2 w:1) + // Storage: ParachainStaking AtStake (r:1 w:10) + // Storage: System Account (r:101 w:101) + // Storage: ParachainStaking SelectedCandidates (r:0 w:1) + // Storage: ParachainStaking DelayedPayouts (r:0 w:1) + /// The range of component `x` is `[8, 100]`. + /// The range of component `y` is `[0, 10000]`. + fn round_transition_on_initialize(x: u32, _y: u32, ) -> Weight { + // Minimum execution time: 717_672 nanoseconds. + Weight::from_ref_time(1_371_254_655) + // Standard Error: 325_640 + .saturating_add(Weight::from_ref_time(1_720_347).saturating_mul(x.into())) + .saturating_add(RocksDbWeight::get().reads(119)) + .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(x.into()))) + .saturating_add(RocksDbWeight::get().writes(113)) + } + // Storage: ParachainStaking DelayedPayouts (r:1 w:0) + // Storage: ParachainStaking Points (r:1 w:0) + // Storage: ParachainStaking AwardedPts (r:2 w:1) + // Storage: ParachainStaking AtStake (r:1 w:1) + // Storage: System Account (r:1 w:1) + /// The range of component `y` is `[0, 100]`. + fn pay_one_collator_reward(y: u32, ) -> Weight { + // Minimum execution time: 54_703 nanoseconds. + Weight::from_ref_time(64_324_136) + // Standard Error: 18_790 + .saturating_add(Weight::from_ref_time(11_539_826).saturating_mul(y.into())) + .saturating_add(RocksDbWeight::get().reads(6)) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(y.into()))) + .saturating_add(RocksDbWeight::get().writes(3)) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(y.into()))) + } + fn base_on_initialize() -> Weight { + // Minimum execution time: 6_483 nanoseconds. + Weight::from_ref_time(6_824_000) + } } diff --git a/runtime/calamari/src/weights/pallet_preimage.rs b/runtime/calamari/src/weights/pallet_preimage.rs index e25a337cd..097e47d16 100644 --- a/runtime/calamari/src/weights/pallet_preimage.rs +++ b/runtime/calamari/src/weights/pallet_preimage.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_preimage //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -63,178 +63,206 @@ pub trait WeightInfo { /// Weights for pallet_preimage using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_preimage::WeightInfo for SubstrateWeight { - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - fn note_preimage(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:0) - fn note_requested_preimage(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:0) - fn note_no_deposit_preimage(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unnote_preimage() -> Weight { - (36_918_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unnote_no_deposit_preimage() -> Weight { - (23_010_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_preimage() -> Weight { - (34_651_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_no_deposit_preimage() -> Weight { - (21_598_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_unnoted_preimage() -> Weight { - (17_834_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_requested_preimage() -> Weight { - (7_371_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unrequest_preimage() -> Weight { - (22_781_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unrequest_unnoted_preimage() -> Weight { - (17_668_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn unrequest_multi_referenced_preimage() -> Weight { - (7_135_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + /// The range of component `s` is `[0, 4194304]`. + fn note_preimage(s: u32, ) -> Weight { + // Minimum execution time: 33_840 nanoseconds. + Weight::from_ref_time(34_380_000) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_745).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + /// The range of component `s` is `[0, 4194304]`. + fn note_requested_preimage(s: u32, ) -> Weight { + // Minimum execution time: 22_637 nanoseconds. + Weight::from_ref_time(22_886_000) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(2_751).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + /// The range of component `s` is `[0, 4194304]`. + fn note_no_deposit_preimage(s: u32, ) -> Weight { + // Minimum execution time: 43_612 nanoseconds. + Weight::from_ref_time(44_087_000) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(2_747).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + fn unnote_preimage() -> Weight { + // Minimum execution time: 41_798 nanoseconds. + Weight::from_ref_time(42_123_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + fn unnote_no_deposit_preimage() -> Weight { + // Minimum execution time: 28_421 nanoseconds. + Weight::from_ref_time(29_152_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_preimage() -> Weight { + // Minimum execution time: 27_252 nanoseconds. + Weight::from_ref_time(27_816_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_no_deposit_preimage() -> Weight { + // Minimum execution time: 15_144 nanoseconds. + Weight::from_ref_time(15_619_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_unnoted_preimage() -> Weight { + // Minimum execution time: 20_997 nanoseconds. + Weight::from_ref_time(21_719_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_requested_preimage() -> Weight { + // Minimum execution time: 9_712 nanoseconds. + Weight::from_ref_time(9_996_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + fn unrequest_preimage() -> Weight { + // Minimum execution time: 27_565 nanoseconds. + Weight::from_ref_time(28_288_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn unrequest_unnoted_preimage() -> Weight { + // Minimum execution time: 9_651 nanoseconds. + Weight::from_ref_time(9_863_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn unrequest_multi_referenced_preimage() -> Weight { + // Minimum execution time: 9_448 nanoseconds. + Weight::from_ref_time(9_723_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - fn note_preimage(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:0) - fn note_requested_preimage(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:0) - fn note_no_deposit_preimage(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unnote_preimage() -> Weight { - (36_918_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unnote_no_deposit_preimage() -> Weight { - (23_010_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_preimage() -> Weight { - (34_651_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_no_deposit_preimage() -> Weight { - (21_598_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_unnoted_preimage() -> Weight { - (17_834_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_requested_preimage() -> Weight { - (7_371_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unrequest_preimage() -> Weight { - (22_781_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unrequest_unnoted_preimage() -> Weight { - (17_668_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn unrequest_multi_referenced_preimage() -> Weight { - (7_135_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + /// The range of component `s` is `[0, 4194304]`. + fn note_preimage(s: u32, ) -> Weight { + // Minimum execution time: 33_840 nanoseconds. + Weight::from_ref_time(34_380_000) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_745).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + /// The range of component `s` is `[0, 4194304]`. + fn note_requested_preimage(s: u32, ) -> Weight { + // Minimum execution time: 22_637 nanoseconds. + Weight::from_ref_time(22_886_000) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(2_751).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + /// The range of component `s` is `[0, 4194304]`. + fn note_no_deposit_preimage(s: u32, ) -> Weight { + // Minimum execution time: 43_612 nanoseconds. + Weight::from_ref_time(44_087_000) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(2_747).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + fn unnote_preimage() -> Weight { + // Minimum execution time: 41_798 nanoseconds. + Weight::from_ref_time(42_123_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + fn unnote_no_deposit_preimage() -> Weight { + // Minimum execution time: 28_421 nanoseconds. + Weight::from_ref_time(29_152_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_preimage() -> Weight { + // Minimum execution time: 27_252 nanoseconds. + Weight::from_ref_time(27_816_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_no_deposit_preimage() -> Weight { + // Minimum execution time: 15_144 nanoseconds. + Weight::from_ref_time(15_619_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_unnoted_preimage() -> Weight { + // Minimum execution time: 20_997 nanoseconds. + Weight::from_ref_time(21_719_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_requested_preimage() -> Weight { + // Minimum execution time: 9_712 nanoseconds. + Weight::from_ref_time(9_996_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + fn unrequest_preimage() -> Weight { + // Minimum execution time: 27_565 nanoseconds. + Weight::from_ref_time(28_288_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn unrequest_unnoted_preimage() -> Weight { + // Minimum execution time: 9_651 nanoseconds. + Weight::from_ref_time(9_863_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn unrequest_multi_referenced_preimage() -> Weight { + // Minimum execution time: 9_448 nanoseconds. + Weight::from_ref_time(9_723_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } } diff --git a/runtime/calamari/src/weights/pallet_scheduler.rs b/runtime/calamari/src/weights/pallet_scheduler.rs index 4af5f19f2..750ace0b1 100644 --- a/runtime/calamari/src/weights/pallet_scheduler.rs +++ b/runtime/calamari/src/weights/pallet_scheduler.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_scheduler //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -46,16 +46,14 @@ use manta_primitives::constants::RocksDbWeight; /// Weight functions needed for pallet_scheduler. pub trait WeightInfo { - fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight; - fn on_initialize_named_resolved(s: u32, ) -> Weight; - fn on_initialize_periodic_resolved(s: u32, ) -> Weight; - fn on_initialize_resolved(s: u32, ) -> Weight; - fn on_initialize_named_aborted(s: u32, ) -> Weight; - fn on_initialize_aborted(s: u32, ) -> Weight; - fn on_initialize_periodic_named(s: u32, ) -> Weight; - fn on_initialize_periodic(s: u32, ) -> Weight; - fn on_initialize_named(s: u32, ) -> Weight; - fn on_initialize(s: u32, ) -> Weight; + fn service_agendas_base() -> Weight; + fn service_agenda_base(s: u32, ) -> Weight; + fn service_task_base() -> Weight; + fn service_task_fetched(s: u32, ) -> Weight; + fn service_task_named() -> Weight; + fn service_task_periodic() -> Weight; + fn execute_dispatch_signed() -> Weight; + fn execute_dispatch_unsigned() -> Weight; fn schedule(s: u32, ) -> Weight; fn cancel(s: u32, ) -> Weight; fn schedule_named(s: u32, ) -> Weight; @@ -65,300 +63,194 @@ pub trait WeightInfo { /// Weights for pallet_scheduler using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_scheduler::WeightInfo for SubstrateWeight { - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight { - (14_352_000 as Weight) - // Standard Error: 49_000 - .saturating_add((24_272_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_named_resolved(s: u32, ) -> Weight { - (12_183_000 as Weight) - // Standard Error: 45_000 - .saturating_add((19_362_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - fn on_initialize_periodic_resolved(s: u32, ) -> Weight { - (15_270_000 as Weight) - // Standard Error: 51_000 - .saturating_add((21_237_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - fn on_initialize_resolved(s: u32, ) -> Weight { - (13_410_000 as Weight) - // Standard Error: 45_000 - .saturating_add((18_031_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:0) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_named_aborted(s: u32, ) -> Weight { - (5_685_000 as Weight) - // Standard Error: 24_000 - .saturating_add((7_598_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:0) - fn on_initialize_aborted(s: u32, ) -> Weight { - (6_772_000 as Weight) - // Standard Error: 16_000 - .saturating_add((4_759_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_periodic_named(s: u32, ) -> Weight { - (15_436_000 as Weight) - // Standard Error: 38_000 - .saturating_add((13_102_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - fn on_initialize_periodic(s: u32, ) -> Weight { - (14_835_000 as Weight) - // Standard Error: 32_000 - .saturating_add((10_060_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_named(s: u32, ) -> Weight { - (13_960_000 as Weight) - // Standard Error: 27_000 - .saturating_add((8_190_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - fn on_initialize(s: u32, ) -> Weight { - (13_361_000 as Weight) - // Standard Error: 24_000 - .saturating_add((7_002_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Scheduler Agenda (r:1 w:1) - fn schedule(s: u32, ) -> Weight { - (18_953_000 as Weight) - // Standard Error: 2_000 - .saturating_add((101_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - fn cancel(s: u32, ) -> Weight { - (19_282_000 as Weight) - // Standard Error: 6_000 - .saturating_add((1_228_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - fn schedule_named(s: u32, ) -> Weight { - (22_424_000 as Weight) - // Standard Error: 3_000 - .saturating_add((132_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - fn cancel_named(s: u32, ) -> Weight { - (20_288_000 as Weight) - // Standard Error: 6_000 - .saturating_add((1_265_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } + // Storage: Scheduler IncompleteSince (r:1 w:1) + fn service_agendas_base() -> Weight { + // Minimum execution time: 4_846 nanoseconds. + Weight::from_ref_time(4_967_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[0, 50]`. + fn service_agenda_base(s: u32, ) -> Weight { + // Minimum execution time: 4_233 nanoseconds. + Weight::from_ref_time(9_835_467) + // Standard Error: 9_112 + .saturating_add(Weight::from_ref_time(617_079).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_task_base() -> Weight { + // Minimum execution time: 10_708 nanoseconds. + Weight::from_ref_time(10_955_000) + } + // Storage: Preimage PreimageFor (r:1 w:1) + // Storage: Preimage StatusFor (r:1 w:1) + /// The range of component `s` is `[128, 4194304]`. + fn service_task_fetched(s: u32, ) -> Weight { + // Minimum execution time: 25_069 nanoseconds. + Weight::from_ref_time(25_386_000) + // Standard Error: 14 + .saturating_add(Weight::from_ref_time(1_958).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Scheduler Lookup (r:0 w:1) + fn service_task_named() -> Weight { + // Minimum execution time: 12_186 nanoseconds. + Weight::from_ref_time(12_524_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_task_periodic() -> Weight { + // Minimum execution time: 32_273 nanoseconds. + Weight::from_ref_time(32_827_000) + } + fn execute_dispatch_signed() -> Weight { + // Minimum execution time: 9_321 nanoseconds. + Weight::from_ref_time(14_240_000) + } + fn execute_dispatch_unsigned() -> Weight { + // Minimum execution time: 9_274 nanoseconds. + Weight::from_ref_time(9_533_000) + } + // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[0, 49]`. + fn schedule(s: u32, ) -> Weight { + // Minimum execution time: 23_031 nanoseconds. + Weight::from_ref_time(27_483_198) + // Standard Error: 15_261 + .saturating_add(Weight::from_ref_time(578_305).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Scheduler Agenda (r:1 w:1) + // Storage: Scheduler Lookup (r:0 w:1) + /// The range of component `s` is `[1, 50]`. + fn cancel(s: u32, ) -> Weight { + // Minimum execution time: 23_124 nanoseconds. + Weight::from_ref_time(24_173_951) + // Standard Error: 5_953 + .saturating_add(Weight::from_ref_time(1_177_510).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Scheduler Lookup (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[0, 49]`. + fn schedule_named(s: u32, ) -> Weight { + // Minimum execution time: 21_834 nanoseconds. + Weight::from_ref_time(29_220_907) + // Standard Error: 14_381 + .saturating_add(Weight::from_ref_time(679_288).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Scheduler Lookup (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[1, 50]`. + fn cancel_named(s: u32, ) -> Weight { + // Minimum execution time: 25_250 nanoseconds. + Weight::from_ref_time(26_423_006) + // Standard Error: 6_154 + .saturating_add(Weight::from_ref_time(1_202_190).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight { - (14_352_000 as Weight) - // Standard Error: 49_000 - .saturating_add((24_272_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_named_resolved(s: u32, ) -> Weight { - (12_183_000 as Weight) - // Standard Error: 45_000 - .saturating_add((19_362_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - fn on_initialize_periodic_resolved(s: u32, ) -> Weight { - (15_270_000 as Weight) - // Standard Error: 51_000 - .saturating_add((21_237_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - fn on_initialize_resolved(s: u32, ) -> Weight { - (13_410_000 as Weight) - // Standard Error: 45_000 - .saturating_add((18_031_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:0) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_named_aborted(s: u32, ) -> Weight { - (5_685_000 as Weight) - // Standard Error: 24_000 - .saturating_add((7_598_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:0) - fn on_initialize_aborted(s: u32, ) -> Weight { - (6_772_000 as Weight) - // Standard Error: 16_000 - .saturating_add((4_759_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_periodic_named(s: u32, ) -> Weight { - (15_436_000 as Weight) - // Standard Error: 38_000 - .saturating_add((13_102_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - fn on_initialize_periodic(s: u32, ) -> Weight { - (14_835_000 as Weight) - // Standard Error: 32_000 - .saturating_add((10_060_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_named(s: u32, ) -> Weight { - (13_960_000 as Weight) - // Standard Error: 27_000 - .saturating_add((8_190_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - fn on_initialize(s: u32, ) -> Weight { - (13_361_000 as Weight) - // Standard Error: 24_000 - .saturating_add((7_002_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Scheduler Agenda (r:1 w:1) - fn schedule(s: u32, ) -> Weight { - (18_953_000 as Weight) - // Standard Error: 2_000 - .saturating_add((101_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - fn cancel(s: u32, ) -> Weight { - (19_282_000 as Weight) - // Standard Error: 6_000 - .saturating_add((1_228_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - fn schedule_named(s: u32, ) -> Weight { - (22_424_000 as Weight) - // Standard Error: 3_000 - .saturating_add((132_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - fn cancel_named(s: u32, ) -> Weight { - (20_288_000 as Weight) - // Standard Error: 6_000 - .saturating_add((1_265_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } + // Storage: Scheduler IncompleteSince (r:1 w:1) + fn service_agendas_base() -> Weight { + // Minimum execution time: 4_846 nanoseconds. + Weight::from_ref_time(4_967_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[0, 50]`. + fn service_agenda_base(s: u32, ) -> Weight { + // Minimum execution time: 4_233 nanoseconds. + Weight::from_ref_time(9_835_467) + // Standard Error: 9_112 + .saturating_add(Weight::from_ref_time(617_079).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + fn service_task_base() -> Weight { + // Minimum execution time: 10_708 nanoseconds. + Weight::from_ref_time(10_955_000) + } + // Storage: Preimage PreimageFor (r:1 w:1) + // Storage: Preimage StatusFor (r:1 w:1) + /// The range of component `s` is `[128, 4194304]`. + fn service_task_fetched(s: u32, ) -> Weight { + // Minimum execution time: 25_069 nanoseconds. + Weight::from_ref_time(25_386_000) + // Standard Error: 14 + .saturating_add(Weight::from_ref_time(1_958).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Scheduler Lookup (r:0 w:1) + fn service_task_named() -> Weight { + // Minimum execution time: 12_186 nanoseconds. + Weight::from_ref_time(12_524_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + fn service_task_periodic() -> Weight { + // Minimum execution time: 32_273 nanoseconds. + Weight::from_ref_time(32_827_000) + } + fn execute_dispatch_signed() -> Weight { + // Minimum execution time: 9_321 nanoseconds. + Weight::from_ref_time(14_240_000) + } + fn execute_dispatch_unsigned() -> Weight { + // Minimum execution time: 9_274 nanoseconds. + Weight::from_ref_time(9_533_000) + } + // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[0, 49]`. + fn schedule(s: u32, ) -> Weight { + // Minimum execution time: 23_031 nanoseconds. + Weight::from_ref_time(27_483_198) + // Standard Error: 15_261 + .saturating_add(Weight::from_ref_time(578_305).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Scheduler Agenda (r:1 w:1) + // Storage: Scheduler Lookup (r:0 w:1) + /// The range of component `s` is `[1, 50]`. + fn cancel(s: u32, ) -> Weight { + // Minimum execution time: 23_124 nanoseconds. + Weight::from_ref_time(24_173_951) + // Standard Error: 5_953 + .saturating_add(Weight::from_ref_time(1_177_510).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Scheduler Lookup (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[0, 49]`. + fn schedule_named(s: u32, ) -> Weight { + // Minimum execution time: 21_834 nanoseconds. + Weight::from_ref_time(29_220_907) + // Standard Error: 14_381 + .saturating_add(Weight::from_ref_time(679_288).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Scheduler Lookup (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[1, 50]`. + fn cancel_named(s: u32, ) -> Weight { + // Minimum execution time: 25_250 nanoseconds. + Weight::from_ref_time(26_423_006) + // Standard Error: 6_154 + .saturating_add(Weight::from_ref_time(1_202_190).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } } diff --git a/runtime/calamari/src/weights/pallet_session.rs b/runtime/calamari/src/weights/pallet_session.rs index 1e7c60154..edf9db66b 100644 --- a/runtime/calamari/src/weights/pallet_session.rs +++ b/runtime/calamari/src/weights/pallet_session.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_session //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -53,36 +53,40 @@ pub trait WeightInfo { /// Weights for pallet_session using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_session::WeightInfo for SubstrateWeight { - // Storage: Session NextKeys (r:1 w:1) - // Storage: Session KeyOwner (r:3 w:3) - fn set_keys() -> Weight { - (27_510_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - // Storage: Session NextKeys (r:1 w:1) - // Storage: Session KeyOwner (r:0 w:3) - fn purge_keys() -> Weight { - (17_390_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } + // Storage: Session NextKeys (r:1 w:1) + // Storage: Session KeyOwner (r:3 w:3) + fn set_keys() -> Weight { + // Minimum execution time: 31_015 nanoseconds. + Weight::from_ref_time(31_534_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: Session NextKeys (r:1 w:1) + // Storage: Session KeyOwner (r:0 w:3) + fn purge_keys() -> Weight { + // Minimum execution time: 21_650 nanoseconds. + Weight::from_ref_time(23_534_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(4)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Session NextKeys (r:1 w:1) - // Storage: Session KeyOwner (r:3 w:3) - fn set_keys() -> Weight { - (27_510_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - // Storage: Session NextKeys (r:1 w:1) - // Storage: Session KeyOwner (r:0 w:3) - fn purge_keys() -> Weight { - (17_390_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } + // Storage: Session NextKeys (r:1 w:1) + // Storage: Session KeyOwner (r:3 w:3) + fn set_keys() -> Weight { + // Minimum execution time: 31_015 nanoseconds. + Weight::from_ref_time(31_534_000) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(4)) + } + // Storage: Session NextKeys (r:1 w:1) + // Storage: Session KeyOwner (r:0 w:3) + fn purge_keys() -> Weight { + // Minimum execution time: 21_650 nanoseconds. + Weight::from_ref_time(23_534_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(4)) + } } diff --git a/runtime/calamari/src/weights/pallet_timestamp.rs b/runtime/calamari/src/weights/pallet_timestamp.rs index 61ef10ef5..e83f2881e 100644 --- a/runtime/calamari/src/weights/pallet_timestamp.rs +++ b/runtime/calamari/src/weights/pallet_timestamp.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_timestamp //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -53,26 +53,30 @@ pub trait WeightInfo { /// Weights for pallet_timestamp using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_timestamp::WeightInfo for SubstrateWeight { - // Storage: Timestamp Now (r:1 w:1) - fn set() -> Weight { - (7_794_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - fn on_finalize() -> Weight { - (3_014_000 as Weight) - } + // Storage: Timestamp Now (r:1 w:1) + fn set() -> Weight { + // Minimum execution time: 8_155 nanoseconds. + Weight::from_ref_time(8_486_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn on_finalize() -> Weight { + // Minimum execution time: 4_802 nanoseconds. + Weight::from_ref_time(4_925_000) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Timestamp Now (r:1 w:1) - fn set() -> Weight { - (7_794_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - fn on_finalize() -> Weight { - (3_014_000 as Weight) - } + // Storage: Timestamp Now (r:1 w:1) + fn set() -> Weight { + // Minimum execution time: 8_155 nanoseconds. + Weight::from_ref_time(8_486_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + fn on_finalize() -> Weight { + // Minimum execution time: 4_802 nanoseconds. + Weight::from_ref_time(4_925_000) + } } diff --git a/runtime/calamari/src/weights/pallet_treasury.rs b/runtime/calamari/src/weights/pallet_treasury.rs index fce6dc4bf..eff17202f 100644 --- a/runtime/calamari/src/weights/pallet_treasury.rs +++ b/runtime/calamari/src/weights/pallet_treasury.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_treasury //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -57,96 +57,116 @@ pub trait WeightInfo { /// Weights for pallet_treasury using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_treasury::WeightInfo for SubstrateWeight { - fn spend() -> Weight { - (165_000 as Weight) - } - // Storage: Treasury ProposalCount (r:1 w:1) - // Storage: Treasury Proposals (r:0 w:1) - fn propose_spend() -> Weight { - (29_245_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Treasury Proposals (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn reject_proposal() -> Weight { - (50_619_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Treasury Proposals (r:1 w:0) - // Storage: Treasury Approvals (r:1 w:1) - fn approve_proposal(p: u32, ) -> Weight { - (12_562_000 as Weight) - // Standard Error: 0 - .saturating_add((124_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Treasury Approvals (r:1 w:1) - fn remove_approval() -> Weight { - (8_049_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Treasury Approvals (r:1 w:1) - // Storage: Treasury Proposals (r:2 w:2) - // Storage: System Account (r:4 w:4) - fn on_initialize_proposals(p: u32, ) -> Weight { - (29_000_000 as Weight) - // Standard Error: 29_000 - .saturating_add((32_746_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(p as Weight))) - } + fn spend() -> Weight { + // Minimum execution time: 220 nanoseconds. + Weight::from_ref_time(231_000) + } + // Storage: Treasury ProposalCount (r:1 w:1) + // Storage: Treasury Proposals (r:0 w:1) + fn propose_spend() -> Weight { + // Minimum execution time: 31_616 nanoseconds. + Weight::from_ref_time(32_846_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Treasury Proposals (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn reject_proposal() -> Weight { + // Minimum execution time: 48_888 nanoseconds. + Weight::from_ref_time(53_638_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Treasury Proposals (r:1 w:0) + // Storage: Treasury Approvals (r:1 w:1) + /// The range of component `p` is `[0, 99]`. + fn approve_proposal(p: u32, ) -> Weight { + // Minimum execution time: 11_054 nanoseconds. + Weight::from_ref_time(15_860_574) + // Standard Error: 1_654 + .saturating_add(Weight::from_ref_time(98_326).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Treasury Approvals (r:1 w:1) + fn remove_approval() -> Weight { + // Minimum execution time: 10_116 nanoseconds. + Weight::from_ref_time(10_506_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Treasury Deactivated (r:1 w:1) + // Storage: Balances InactiveIssuance (r:1 w:1) + // Storage: Treasury Approvals (r:1 w:1) + // Storage: Treasury Proposals (r:2 w:2) + // Storage: System Account (r:4 w:4) + /// The range of component `p` is `[0, 100]`. + fn on_initialize_proposals(p: u32, ) -> Weight { + // Minimum execution time: 38_038 nanoseconds. + Weight::from_ref_time(58_552_746) + // Standard Error: 34_355 + .saturating_add(Weight::from_ref_time(29_344_938).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((3_u64).saturating_mul(p.into()))) + } } // For backwards compatibility and tests impl WeightInfo for () { - fn spend() -> Weight { - (165_000 as Weight) - } - // Storage: Treasury ProposalCount (r:1 w:1) - // Storage: Treasury Proposals (r:0 w:1) - fn propose_spend() -> Weight { - (29_245_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Treasury Proposals (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn reject_proposal() -> Weight { - (50_619_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Treasury Proposals (r:1 w:0) - // Storage: Treasury Approvals (r:1 w:1) - fn approve_proposal(p: u32, ) -> Weight { - (12_562_000 as Weight) - // Standard Error: 0 - .saturating_add((124_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Treasury Approvals (r:1 w:1) - fn remove_approval() -> Weight { - (8_049_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Treasury Approvals (r:1 w:1) - // Storage: Treasury Proposals (r:2 w:2) - // Storage: System Account (r:4 w:4) - fn on_initialize_proposals(p: u32, ) -> Weight { - (29_000_000 as Weight) - // Standard Error: 29_000 - .saturating_add((32_746_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(p as Weight))) - } + fn spend() -> Weight { + // Minimum execution time: 220 nanoseconds. + Weight::from_ref_time(231_000) + } + // Storage: Treasury ProposalCount (r:1 w:1) + // Storage: Treasury Proposals (r:0 w:1) + fn propose_spend() -> Weight { + // Minimum execution time: 31_616 nanoseconds. + Weight::from_ref_time(32_846_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Treasury Proposals (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn reject_proposal() -> Weight { + // Minimum execution time: 48_888 nanoseconds. + Weight::from_ref_time(53_638_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Treasury Proposals (r:1 w:0) + // Storage: Treasury Approvals (r:1 w:1) + /// The range of component `p` is `[0, 99]`. + fn approve_proposal(p: u32, ) -> Weight { + // Minimum execution time: 11_054 nanoseconds. + Weight::from_ref_time(15_860_574) + // Standard Error: 1_654 + .saturating_add(Weight::from_ref_time(98_326).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Treasury Approvals (r:1 w:1) + fn remove_approval() -> Weight { + // Minimum execution time: 10_116 nanoseconds. + Weight::from_ref_time(10_506_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Treasury Deactivated (r:1 w:1) + // Storage: Balances InactiveIssuance (r:1 w:1) + // Storage: Treasury Approvals (r:1 w:1) + // Storage: Treasury Proposals (r:2 w:2) + // Storage: System Account (r:4 w:4) + /// The range of component `p` is `[0, 100]`. + fn on_initialize_proposals(p: u32, ) -> Weight { + // Minimum execution time: 38_038 nanoseconds. + Weight::from_ref_time(58_552_746) + // Standard Error: 34_355 + .saturating_add(Weight::from_ref_time(29_344_938).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(p.into()))) + .saturating_add(RocksDbWeight::get().writes(3)) + .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(p.into()))) + } } diff --git a/runtime/calamari/src/weights/pallet_tx_pause.rs b/runtime/calamari/src/weights/pallet_tx_pause.rs index 637ca94b2..f9bf5974e 100644 --- a/runtime/calamari/src/weights/pallet_tx_pause.rs +++ b/runtime/calamari/src/weights/pallet_tx_pause.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_tx_pause //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -53,32 +53,36 @@ pub trait WeightInfo { /// Weights for pallet_tx_pause using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_tx_pause::WeightInfo for SubstrateWeight { - // Storage: TransactionPause PausedTransactions (r:1 w:1) - fn pause_transaction() -> Weight { - (17_873_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: TransactionPause PausedTransactions (r:1 w:1) - fn unpause_transaction() -> Weight { - (17_759_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } + // Storage: TransactionPause PausedTransactions (r:1 w:1) + fn pause_transaction() -> Weight { + // Minimum execution time: 19_015 nanoseconds. + Weight::from_ref_time(19_535_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: TransactionPause PausedTransactions (r:1 w:1) + fn unpause_transaction() -> Weight { + // Minimum execution time: 20_397 nanoseconds. + Weight::from_ref_time(20_842_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: TransactionPause PausedTransactions (r:1 w:1) - fn pause_transaction() -> Weight { - (17_873_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: TransactionPause PausedTransactions (r:1 w:1) - fn unpause_transaction() -> Weight { - (17_759_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } + // Storage: TransactionPause PausedTransactions (r:1 w:1) + fn pause_transaction() -> Weight { + // Minimum execution time: 19_015 nanoseconds. + Weight::from_ref_time(19_535_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: TransactionPause PausedTransactions (r:1 w:1) + fn unpause_transaction() -> Weight { + // Minimum execution time: 20_397 nanoseconds. + Weight::from_ref_time(20_842_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } } diff --git a/runtime/calamari/src/weights/pallet_utility.rs b/runtime/calamari/src/weights/pallet_utility.rs index 8d1f271a8..dc56854fe 100644 --- a/runtime/calamari/src/weights/pallet_utility.rs +++ b/runtime/calamari/src/weights/pallet_utility.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_utility //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -56,50 +56,66 @@ pub trait WeightInfo { /// Weights for pallet_utility using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_utility::WeightInfo for SubstrateWeight { - fn batch(c: u32, ) -> Weight { - (26_254_000 as Weight) - // Standard Error: 5_000 - .saturating_add((4_850_000 as Weight).saturating_mul(c as Weight)) - } - fn as_derivative() -> Weight { - (6_160_000 as Weight) - } - fn batch_all(c: u32, ) -> Weight { - (38_604_000 as Weight) - // Standard Error: 5_000 - .saturating_add((5_043_000 as Weight).saturating_mul(c as Weight)) - } - fn dispatch_as() -> Weight { - (13_868_000 as Weight) - } - fn force_batch(c: u32, ) -> Weight { - (27_186_000 as Weight) - // Standard Error: 5_000 - .saturating_add((4_859_000 as Weight).saturating_mul(c as Weight)) - } + /// The range of component `c` is `[0, 1000]`. + fn batch(c: u32, ) -> Weight { + // Minimum execution time: 12_646 nanoseconds. + Weight::from_ref_time(44_551_907) + // Standard Error: 6_853 + .saturating_add(Weight::from_ref_time(4_504_303).saturating_mul(c.into())) + } + fn as_derivative() -> Weight { + // Minimum execution time: 7_642 nanoseconds. + Weight::from_ref_time(7_863_000) + } + /// The range of component `c` is `[0, 1000]`. + fn batch_all(c: u32, ) -> Weight { + // Minimum execution time: 14_100 nanoseconds. + Weight::from_ref_time(56_552_464) + // Standard Error: 4_706 + .saturating_add(Weight::from_ref_time(4_794_210).saturating_mul(c.into())) + } + fn dispatch_as() -> Weight { + // Minimum execution time: 16_253 nanoseconds. + Weight::from_ref_time(16_745_000) + } + /// The range of component `c` is `[0, 1000]`. + fn force_batch(c: u32, ) -> Weight { + // Minimum execution time: 14_094 nanoseconds. + Weight::from_ref_time(44_345_993) + // Standard Error: 4_888 + .saturating_add(Weight::from_ref_time(4_635_190).saturating_mul(c.into())) + } } // For backwards compatibility and tests impl WeightInfo for () { - fn batch(c: u32, ) -> Weight { - (26_254_000 as Weight) - // Standard Error: 5_000 - .saturating_add((4_850_000 as Weight).saturating_mul(c as Weight)) - } - fn as_derivative() -> Weight { - (6_160_000 as Weight) - } - fn batch_all(c: u32, ) -> Weight { - (38_604_000 as Weight) - // Standard Error: 5_000 - .saturating_add((5_043_000 as Weight).saturating_mul(c as Weight)) - } - fn dispatch_as() -> Weight { - (13_868_000 as Weight) - } - fn force_batch(c: u32, ) -> Weight { - (27_186_000 as Weight) - // Standard Error: 5_000 - .saturating_add((4_859_000 as Weight).saturating_mul(c as Weight)) - } + /// The range of component `c` is `[0, 1000]`. + fn batch(c: u32, ) -> Weight { + // Minimum execution time: 12_646 nanoseconds. + Weight::from_ref_time(44_551_907) + // Standard Error: 6_853 + .saturating_add(Weight::from_ref_time(4_504_303).saturating_mul(c.into())) + } + fn as_derivative() -> Weight { + // Minimum execution time: 7_642 nanoseconds. + Weight::from_ref_time(7_863_000) + } + /// The range of component `c` is `[0, 1000]`. + fn batch_all(c: u32, ) -> Weight { + // Minimum execution time: 14_100 nanoseconds. + Weight::from_ref_time(56_552_464) + // Standard Error: 4_706 + .saturating_add(Weight::from_ref_time(4_794_210).saturating_mul(c.into())) + } + fn dispatch_as() -> Weight { + // Minimum execution time: 16_253 nanoseconds. + Weight::from_ref_time(16_745_000) + } + /// The range of component `c` is `[0, 1000]`. + fn force_batch(c: u32, ) -> Weight { + // Minimum execution time: 14_094 nanoseconds. + Weight::from_ref_time(44_345_993) + // Standard Error: 4_888 + .saturating_add(Weight::from_ref_time(4_635_190).saturating_mul(c.into())) + } } diff --git a/runtime/calamari/src/weights/xcm/mod.rs b/runtime/calamari/src/weights/xcm/mod.rs index 2cacb6ae9..f4c056304 100644 --- a/runtime/calamari/src/weights/xcm/mod.rs +++ b/runtime/calamari/src/weights/xcm/mod.rs @@ -20,103 +20,108 @@ mod pallet_xcm_benchmarks_generic; use crate::Runtime; use frame_support::weights::Weight; use sp_std::cmp; -use xcm::{latest::prelude::*, DoubleEncoded}; +use xcm::{ + latest::{prelude::*, Weight as XCMWeight}, + DoubleEncoded, +}; use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; trait WeighMultiAssets { - fn weigh_multi_assets(&self, weight: Weight) -> Weight; + fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight; } const MAX_ASSETS: u32 = 100; impl WeighMultiAssets for MultiAssetFilter { - fn weigh_multi_assets(&self, weight: Weight) -> Weight { - match self { + fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight { + let weight = match self { Self::Definite(assets) => { - // NOTE: We charge fees for at least 1 asset even if 0 were requested to punish spam - (assets.inner().iter().count().max(1) as Weight).saturating_mul(weight) + weight.saturating_mul(assets.inner().iter().count().max(1) as u64) } - Self::Wild(_) => (MAX_ASSETS as Weight).saturating_mul(weight), - } + Self::Wild(_) => weight.saturating_mul(MAX_ASSETS as u64), + }; + weight.ref_time() } } impl WeighMultiAssets for MultiAssets { - fn weigh_multi_assets(&self, weight: Weight) -> Weight { - (self.inner().iter().count().max(1) as Weight).saturating_mul(weight) + fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight { + weight + .saturating_mul(self.inner().iter().count().max(1) as u64) + .ref_time() } } pub struct CalamariXcmWeight(core::marker::PhantomData); impl XcmWeightInfo for CalamariXcmWeight { - fn withdraw_asset(assets: &MultiAssets) -> Weight { + fn withdraw_asset(assets: &MultiAssets) -> XCMWeight { assets.weigh_multi_assets(XcmFungibleWeight::::withdraw_asset()) } - fn reserve_asset_deposited(assets: &MultiAssets) -> Weight { + fn reserve_asset_deposited(assets: &MultiAssets) -> XCMWeight { assets.weigh_multi_assets(XcmFungibleWeight::::reserve_asset_deposited()) } - fn receive_teleported_asset(_assets: &MultiAssets) -> Weight { - u64::MAX // disable teleport + fn receive_teleported_asset(_assets: &MultiAssets) -> XCMWeight { + Weight::MAX.ref_time() // disable teleport } - fn query_response(_query_id: &u64, _response: &Response, _max_weight: &u64) -> Weight { - XcmGeneric::::query_response() + fn query_response(_query_id: &u64, _response: &Response, _max_weight: &u64) -> XCMWeight { + XcmGeneric::::query_response().ref_time() } - fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> Weight { + fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> XCMWeight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_asset()) } fn transfer_reserve_asset( assets: &MultiAssets, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> Weight { + ) -> XCMWeight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_reserve_asset()) } fn transact( _origin_type: &OriginKind, _require_weight_at_most: &u64, _call: &DoubleEncoded, - ) -> Weight { - XcmGeneric::::transact() + ) -> XCMWeight { + XcmGeneric::::transact().ref_time() } fn hrmp_new_channel_open_request( _sender: &u32, _max_message_size: &u32, _max_capacity: &u32, - ) -> Weight { + ) -> XCMWeight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX + Weight::MAX.ref_time() } - fn hrmp_channel_accepted(_recipient: &u32) -> Weight { + fn hrmp_channel_accepted(_recipient: &u32) -> XCMWeight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX + Weight::MAX.ref_time() } - fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> Weight { + fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> XCMWeight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX + Weight::MAX.ref_time() } - fn clear_origin() -> Weight { - XcmGeneric::::clear_origin() + fn clear_origin() -> XCMWeight { + XcmGeneric::::clear_origin().ref_time() } - fn descend_origin(_who: &InteriorMultiLocation) -> Weight { - XcmGeneric::::descend_origin() + fn descend_origin(_who: &InteriorMultiLocation) -> XCMWeight { + XcmGeneric::::descend_origin().ref_time() } fn report_error( _query_id: &QueryId, _dest: &MultiLocation, _max_response_weight: &u64, - ) -> Weight { - XcmGeneric::::report_error() + ) -> XCMWeight { + XcmGeneric::::report_error().ref_time() } fn deposit_asset( assets: &MultiAssetFilter, _max_assets: &u32, _dest: &MultiLocation, - ) -> Weight { + ) -> XCMWeight { // Hardcoded until better understanding how to deal with worst case scenario of holding register - let hardcoded_weight: u64 = 1_000_000_000; + let hardcoded_weight = Weight::from_ref_time(1_000_000_000_u64).ref_time(); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()); cmp::min(hardcoded_weight, weight) } @@ -125,23 +130,23 @@ impl XcmWeightInfo for CalamariXcmWeight { _max_assets: &u32, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> Weight { + ) -> XCMWeight { // Hardcoded until better understanding how to deal with worst case scenario of holding register - let hardcoded_weight: u64 = 1_000_000_000; + let hardcoded_weight = Weight::from_ref_time(1_000_000_000_u64).ref_time(); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()); cmp::min(hardcoded_weight, weight) } - fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets) -> Weight { - Weight::MAX + fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets) -> XCMWeight { + Weight::MAX.ref_time() } fn initiate_reserve_withdraw( assets: &MultiAssetFilter, _reserve: &MultiLocation, _xcm: &Xcm<()>, - ) -> Weight { + ) -> XCMWeight { // Hardcoded until better understanding how to deal with worst case scenario of holding register - let hardcoded_weight: u64 = 1_000_000_000; + let hardcoded_weight = Weight::from_ref_time(1_000_000_000_u64).ref_time(); let weight = assets.weigh_multi_assets(XcmGeneric::::initiate_reserve_withdraw()); cmp::min(hardcoded_weight, weight) } @@ -149,9 +154,9 @@ impl XcmWeightInfo for CalamariXcmWeight { assets: &MultiAssetFilter, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> Weight { + ) -> XCMWeight { // Hardcoded until better understanding how to deal with worst case scenario of holding register - let hardcoded_weight: u64 = 1_000_000_000; + let hardcoded_weight = Weight::from_ref_time(1_000_000_000_u64).ref_time(); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::initiate_teleport()); cmp::min(hardcoded_weight, weight) } @@ -160,37 +165,37 @@ impl XcmWeightInfo for CalamariXcmWeight { _dest: &MultiLocation, _assets: &MultiAssetFilter, _max_response_weight: &u64, - ) -> Weight { + ) -> XCMWeight { // Hardcoded until better understanding how to deal with worst case scenario of holding register - let hardcoded_weight: u64 = 1_000_000_000; - let weight = XcmGeneric::::query_holding(); + let hardcoded_weight = Weight::from_ref_time(1_000_000_000_u64).ref_time(); + let weight = XcmGeneric::::query_holding().ref_time(); cmp::min(hardcoded_weight, weight) } - fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> Weight { - XcmGeneric::::buy_execution() + fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> XCMWeight { + XcmGeneric::::buy_execution().ref_time() } - fn refund_surplus() -> Weight { - XcmGeneric::::refund_surplus() + fn refund_surplus() -> XCMWeight { + XcmGeneric::::refund_surplus().ref_time() } - fn set_error_handler(_xcm: &Xcm) -> Weight { - XcmGeneric::::set_error_handler() + fn set_error_handler(_xcm: &Xcm) -> XCMWeight { + XcmGeneric::::set_error_handler().ref_time() } - fn set_appendix(_xcm: &Xcm) -> Weight { - XcmGeneric::::set_appendix() + fn set_appendix(_xcm: &Xcm) -> XCMWeight { + XcmGeneric::::set_appendix().ref_time() } - fn clear_error() -> Weight { - XcmGeneric::::clear_error() + fn clear_error() -> XCMWeight { + XcmGeneric::::clear_error().ref_time() } - fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight { - XcmGeneric::::claim_asset() + fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> XCMWeight { + XcmGeneric::::claim_asset().ref_time() } - fn trap(_code: &u64) -> Weight { - XcmGeneric::::trap() + fn trap(_code: &u64) -> XCMWeight { + XcmGeneric::::trap().ref_time() } - fn subscribe_version(_query_id: &QueryId, _max_response_weight: &u64) -> Weight { - XcmGeneric::::subscribe_version() + fn subscribe_version(_query_id: &QueryId, _max_response_weight: &u64) -> XCMWeight { + XcmGeneric::::subscribe_version().ref_time() } - fn unsubscribe_version() -> Weight { - XcmGeneric::::unsubscribe_version() + fn unsubscribe_version() -> XCMWeight { + XcmGeneric::::unsubscribe_version().ref_time() } } diff --git a/runtime/calamari/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/runtime/calamari/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index 4f37820af..3d039da83 100644 --- a/runtime/calamari/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/runtime/calamari/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -17,8 +17,8 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::fungible` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-27-134`, CPU: `Intel(R) Xeon(R) Platinum 8275CL CPU @ 3.00GHz` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-90-64`, CPU: `Intel(R) Xeon(R) Platinum 8275CL CPU @ 3.00GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -50,17 +50,17 @@ impl WeightInfo { // Storage: AssetManager LocationAssetId (r:1 w:0) // Storage: System Account (r:1 w:1) pub(crate) fn withdraw_asset() -> Weight { - (37_074_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(47_910_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: AssetManager LocationAssetId (r:1 w:0) // Storage: System Account (r:2 w:2) pub(crate) fn transfer_asset() -> Weight { - (54_904_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(59_611_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: AssetManager LocationAssetId (r:1 w:0) @@ -71,20 +71,20 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn transfer_reserve_asset() -> Weight { - (71_007_000 as Weight) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(77_829_000) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) } pub(crate) fn reserve_asset_deposited() -> Weight { - (1_582_000 as Weight) + Weight::from_ref_time(1_764_000) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: AssetManager LocationAssetId (r:1 w:0) // Storage: System Account (r:1 w:1) pub(crate) fn deposit_asset() -> Weight { - (37_231_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(61_851_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: AssetManager LocationAssetId (r:1 w:0) @@ -95,9 +95,9 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn deposit_reserve_asset() -> Weight { - (55_992_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(68_545_000) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -106,8 +106,8 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn initiate_teleport() -> Weight { - (24_242_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(28_688_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) } } \ No newline at end of file diff --git a/runtime/calamari/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/runtime/calamari/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 356f04aa5..f2927dff5 100644 --- a/runtime/calamari/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/runtime/calamari/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -17,8 +17,8 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-27-134`, CPU: `Intel(R) Xeon(R) Platinum 8275CL CPU @ 3.00GHz` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-90-64`, CPU: `Intel(R) Xeon(R) Platinum 8275CL CPU @ 3.00GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -53,38 +53,38 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn query_holding() -> Weight { - (873_694_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(951_237_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) } pub(crate) fn buy_execution() -> Weight { - (4_164_000 as Weight) + Weight::from_ref_time(4_722_000) } // Storage: PolkadotXcm Queries (r:1 w:0) pub(crate) fn query_response() -> Weight { - (11_572_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) + Weight::from_ref_time(14_392_000) + .saturating_add(T::DbWeight::get().reads(1)) } pub(crate) fn transact() -> Weight { - (14_911_000 as Weight) + Weight::from_ref_time(16_599_000) } pub(crate) fn refund_surplus() -> Weight { - (3_917_000 as Weight) + Weight::from_ref_time(4_705_000) } pub(crate) fn set_error_handler() -> Weight { - (834_000 as Weight) + Weight::from_ref_time(836_000) } pub(crate) fn set_appendix() -> Weight { - (796_000 as Weight) + Weight::from_ref_time(2_678_000) } pub(crate) fn clear_error() -> Weight { - (775_000 as Weight) + Weight::from_ref_time(2_566_000) } pub(crate) fn descend_origin() -> Weight { - (2_124_000 as Weight) + Weight::from_ref_time(7_044_000) } pub(crate) fn clear_origin() -> Weight { - (812_000 as Weight) + Weight::from_ref_time(1_867_000) } // Storage: PolkadotXcm SupportedVersion (r:1 w:0) // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) @@ -92,18 +92,18 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn report_error() -> Weight { - (13_274_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(24_924_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: PolkadotXcm AssetTraps (r:1 w:1) pub(crate) fn claim_asset() -> Weight { - (6_326_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(39_192_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } pub(crate) fn trap() -> Weight { - (787_000 as Weight) + Weight::from_ref_time(2_596_000) } // Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -112,14 +112,14 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn subscribe_version() -> Weight { - (17_488_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(51_630_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: PolkadotXcm VersionNotifyTargets (r:0 w:1) pub(crate) fn unsubscribe_version() -> Weight { - (2_975_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(5_226_000) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -128,8 +128,8 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn initiate_reserve_withdraw() -> Weight { - (1_116_863_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(1_211_909_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) } } \ No newline at end of file diff --git a/runtime/calamari/src/xcm_config.rs b/runtime/calamari/src/xcm_config.rs index 28dfe1558..a21836a64 100644 --- a/runtime/calamari/src/xcm_config.rs +++ b/runtime/calamari/src/xcm_config.rs @@ -15,9 +15,9 @@ // along with Manta. If not, see . use super::{ - assets_config::CalamariAssetConfig, AssetManager, Assets, Balances, Call, DmpQueue, - EnsureRootOrMoreThanHalfCouncil, Event, Origin, ParachainInfo, ParachainSystem, PolkadotXcm, - Runtime, Treasury, XcmpQueue, MAXIMUM_BLOCK_WEIGHT, + assets_config::CalamariAssetConfig, AssetManager, Assets, Balances, DmpQueue, + EnsureRootOrMoreThanHalfCouncil, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, + RuntimeCall, RuntimeEvent, RuntimeOrigin, Treasury, XcmpQueue, MAXIMUM_BLOCK_WEIGHT, }; use codec::{Decode, Encode}; use core::marker::PhantomData; @@ -56,12 +56,12 @@ use xcm_executor::{traits::JustTry, Config, XcmExecutor}; pub use sp_runtime::BuildStorage; parameter_types! { - pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; - pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; + pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); } impl cumulus_pallet_parachain_system::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type SelfParaId = parachain_info::Pallet; type DmpMessageHandler = DmpQueue; type ReservedDmpWeight = ReservedDmpWeight; @@ -76,7 +76,7 @@ impl parachain_info::Config for Runtime {} parameter_types! { pub const RelayNetwork: NetworkId = NetworkId::Kusama; - pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); + pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); pub SelfReserve: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into()))); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); @@ -102,26 +102,26 @@ pub type XcmOriginToCallOrigin = ( // Sovereign account converter; this attempts to derive an `AccountId` from the origin location // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for // foreign chains who want to have a local sovereign account on this chain which they control. - SovereignSignedViaLocation, + SovereignSignedViaLocation, // Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when // recognised. - RelayChainAsNative, + RelayChainAsNative, // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when // recognised. - SiblingParachainAsNative, + SiblingParachainAsNative, // Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a // transaction from the Root origin. - ParentAsSuperuser, + ParentAsSuperuser, // If the incoming XCM origin is of type `AccountId32` and the Network is Network::Any // or `RelayNetwork`, convert it to a Native 32 byte account. - SignedAccountId32AsNative, + SignedAccountId32AsNative, // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. - XcmPassthrough, + XcmPassthrough, ); parameter_types! { /// One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. - pub UnitWeightCost: Weight = 1_000_000_000; + pub UnitWeightCost: u64 = 1_000_000_000; /// Used in native traders /// This might be able to skipped. /// We have to use `here()` because of reanchoring logic @@ -213,7 +213,7 @@ pub type XcmFeesToAccount = manta_primitives::xcm::XcmFeesToAccount< pub struct XcmExecutorConfig; impl Config for XcmExecutorConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; // Defines how to Withdraw and Deposit instruction work type AssetTransactor = MultiAssetTransactor; @@ -223,8 +223,11 @@ impl Config for XcmExecutorConfig { type IsTeleporter = (); type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = - WeightInfoBounds, Call, MaxInstructions>; + type Weigher = WeightInfoBounds< + crate::weights::xcm::CalamariXcmWeight, + RuntimeCall, + MaxInstructions, + >; // Trader is the means to purchasing weight credit for XCM execution. // We define two traders: // The first one will charge parachain's native currency, who's `MultiLocation` @@ -257,31 +260,34 @@ pub type XcmRouter = ( impl pallet_xcm::Config for Runtime { const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - type Origin = Origin; - type Call = Call; - type Event = Event; - type SendXcmOrigin = EnsureXcmOrigin; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; - type ExecuteXcmOrigin = EnsureXcmOrigin; + type ExecuteXcmOrigin = EnsureXcmOrigin; /// This means that no location will pass XcmExecuteFilter, so a dispatched `execute` message will be filtered. /// This shouldn't be reachable since `LocalOriginToLocation = ();`, but let's be on the safe side. type XcmExecuteFilter = Nothing; type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Nothing; type XcmReserveTransferFilter = Nothing; - type Weigher = - WeightInfoBounds, Call, MaxInstructions>; + type Weigher = WeightInfoBounds< + crate::weights::xcm::CalamariXcmWeight, + RuntimeCall, + MaxInstructions, + >; type LocationInverter = LocationInverter; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } impl cumulus_pallet_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; } impl cumulus_pallet_xcmp_queue::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; @@ -292,7 +298,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { } impl cumulus_pallet_dmp_queue::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; type ExecuteOverweightOrigin = EnsureRoot; } @@ -323,13 +329,13 @@ where } parameter_types! { - pub const BaseXcmWeight: Weight = 100_000_000; + pub const BaseXcmWeight: u64 = 100_000_000; pub const MaxAssetsForTransfer: usize = 2; } // The XCM message wrapper wrapper impl orml_xtokens::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type CurrencyId = CurrencyId; type AccountIdToMultiLocation = AccountIdToMultiLocation; @@ -343,8 +349,11 @@ impl orml_xtokens::Config for Runtime { /// It uses the Weigher configuration to calculate weights for the user callable /// extrinsics on this chain, as well as weights for execution on the destination /// chain. Both based on the composed xcm messages. - type Weigher = - WeightInfoBounds, Call, MaxInstructions>; + type Weigher = WeightInfoBounds< + crate::weights::xcm::CalamariXcmWeight, + RuntimeCall, + MaxInstructions, + >; type BaseXcmWeight = BaseXcmWeight; type LocationInverter = LocationInverter; diff --git a/runtime/calamari/tests/integrations_mock/integration_tests.rs b/runtime/calamari/tests/integrations_mock/integration_tests.rs index b99fe355b..26258fa7f 100644 --- a/runtime/calamari/tests/integrations_mock/integration_tests.rs +++ b/runtime/calamari/tests/integrations_mock/integration_tests.rs @@ -27,8 +27,8 @@ pub use calamari_runtime::{ fee::{FEES_PERCENTAGE_TO_AUTHOR, FEES_PERCENTAGE_TO_TREASURY}, xcm_config::{XcmExecutorConfig, XcmFeesAccount}, AssetManager, Assets, Authorship, Balances, CalamariVesting, Council, DefaultBlocksPerRound, - Democracy, EnactmentPeriod, Event, LaunchPeriod, LeaveDelayRounds, - NativeTokenExistentialDeposit, Origin, ParachainStaking, Period, PolkadotXcm, Runtime, + Democracy, EnactmentPeriod, LaunchPeriod, LeaveDelayRounds, NativeTokenExistentialDeposit, + ParachainStaking, Period, PolkadotXcm, Preimage, Runtime, RuntimeEvent as Event, RuntimeOrigin, TechnicalCommittee, Timestamp, TransactionPause, Treasury, Utility, VotingPeriod, }; @@ -37,7 +37,9 @@ use frame_support::{ assert_err, assert_noop, assert_ok, codec::Encode, dispatch::Dispatchable, - traits::{tokens::ExistenceRequirement, Get, PalletInfo, StorageInfo, StorageInfoTrait}, + traits::{ + tokens::ExistenceRequirement, Get, PalletInfo, StorageInfo, StorageInfoTrait, StorePreimage, + }, StorageHasher, Twox128, }; use runtime_common::test_helpers::{ @@ -74,20 +76,20 @@ use sp_runtime::{ DispatchError, ModuleError, Percent, }; -fn note_preimage(proposer: &AccountId, proposal_call: &Call) -> H256 { +fn note_preimage(proposer: &AccountId, proposal_call: &RuntimeCall) -> H256 { let preimage = proposal_call.encode(); let preimage_hash = BlakeTwo256::hash(&preimage[..]); - assert_ok!(Democracy::note_preimage( - Origin::signed(proposer.clone()), + assert_ok!(Preimage::note_preimage( + RuntimeOrigin::signed(proposer.clone()), preimage )); preimage_hash } -fn propose_council_motion(council_motion: &Call, proposer: &AccountId) -> H256 { +fn propose_council_motion(council_motion: &RuntimeCall, proposer: &AccountId) -> H256 { let council_motion_len: u32 = council_motion.using_encoded(|p| p.len() as u32); assert_ok!(Council::propose( - Origin::signed(proposer.clone()), + RuntimeOrigin::signed(proposer.clone()), 1, Box::new(council_motion.clone()), council_motion_len @@ -98,10 +100,9 @@ fn propose_council_motion(council_motion: &Call, proposer: &AccountId) -> H256 { fn start_supermajority_against_governance_assertions(proposer: &AccountId) -> H256 { // Setup the preimage and preimage hash - let preimage_hash = note_preimage( - proposer, - &Call::System(frame_system::Call::remark { remark: vec![0] }), - ); + let runtime_call = RuntimeCall::System(frame_system::Call::remark { remark: vec![0] }); + let preimage_hash = note_preimage(proposer, &runtime_call); + let proposal = Preimage::bound(runtime_call).unwrap(); // Setup the Council and Technical Committee assert_ok!(Council::set_members( @@ -119,14 +120,13 @@ fn start_supermajority_against_governance_assertions(proposer: &AccountId) -> H2 // Setup and propose the Council motion for external_propose_default routine // No voting required because there's only 1 seat. - let council_motion = Call::Democracy(pallet_democracy::Call::external_propose_default { - proposal_hash: preimage_hash, - }); + let council_motion = + RuntimeCall::Democracy(pallet_democracy::Call::external_propose_default { proposal }); let council_motion_hash = propose_council_motion(&council_motion, proposer); assert_eq!( last_event(), - calamari_runtime::Event::Council(pallet_collective::Event::Executed { + calamari_runtime::RuntimeEvent::Council(pallet_collective::Event::Executed { proposal_hash: council_motion_hash, result: Ok(()) }) @@ -136,10 +136,12 @@ fn start_supermajority_against_governance_assertions(proposer: &AccountId) -> H2 } fn start_majority_carries_governance_assertions(proposer: &AccountId) -> H256 { + let democracy_proposal = RuntimeCall::System(frame_system::Call::remark { remark: vec![0] }); + // Setup the preimage and preimage hash let preimage_hash = note_preimage( proposer, - &Call::System(frame_system::Call::remark { remark: vec![0] }), + &RuntimeCall::System(frame_system::Call::remark { remark: vec![0] }), ); // Setup the Council and Technical Committee @@ -156,16 +158,18 @@ fn start_majority_carries_governance_assertions(proposer: &AccountId) -> H256 { 0 )); + let bounded_democracy_proposal = Preimage::bound(democracy_proposal).unwrap(); // Setup and propose the Council motion for external_propose_default routine // No voting required because there's only 1 seat. - let council_motion = Call::Democracy(pallet_democracy::Call::external_propose_majority { - proposal_hash: preimage_hash, - }); + let council_motion = + RuntimeCall::Democracy(pallet_democracy::Call::external_propose_majority { + proposal: bounded_democracy_proposal, + }); let council_motion_hash = propose_council_motion(&council_motion, proposer); assert_eq!( last_event(), - calamari_runtime::Event::Council(pallet_collective::Event::Executed { + calamari_runtime::RuntimeEvent::Council(pallet_collective::Event::Executed { proposal_hash: council_motion_hash, result: Ok(()) }) @@ -183,7 +187,7 @@ fn end_governance_assertions(referendum_index: u32, end_of_referendum: u32, enac run_to_block(end_of_referendum); assert_eq!( last_event(), - calamari_runtime::Event::Scheduler(pallet_scheduler::Event::Scheduled { + calamari_runtime::RuntimeEvent::Scheduler(pallet_scheduler::Event::Scheduled { when: time_of_enactment, index: referendum_index }) @@ -193,20 +197,23 @@ fn end_governance_assertions(referendum_index: u32, end_of_referendum: u32, enac run_to_block(time_of_enactment); assert_eq!( last_event(), - calamari_runtime::Event::Scheduler(pallet_scheduler::Event::Dispatched { + calamari_runtime::RuntimeEvent::Scheduler(pallet_scheduler::Event::Dispatched { task: (time_of_enactment, referendum_index), - id: Some(vec![100, 101, 109, 111, 99, 114, 97, 99, 0, 0, 0, 0]), + id: Some([ + 100, 101, 109, 111, 99, 114, 97, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0 + ]), result: Ok(()) }) ); } -fn assert_proposal_is_filtered(proposer: &AccountId, motion: &Call) { +fn assert_proposal_is_filtered(proposer: &AccountId, motion: &RuntimeCall) { let council_motion_hash = propose_council_motion(motion, proposer); assert_eq!( last_event(), - calamari_runtime::Event::Council(pallet_collective::Event::Executed { + calamari_runtime::RuntimeEvent::Council(pallet_collective::Event::Executed { proposal_hash: council_motion_hash, result: Err(DispatchError::Module(ModuleError { index: 0, @@ -277,14 +284,14 @@ fn slow_majority_carries_governance_works() { run_to_block(start_of_referendum); assert_eq!( last_event(), - calamari_runtime::Event::Democracy(pallet_democracy::Event::Started { + calamari_runtime::RuntimeEvent::Democracy(pallet_democracy::Event::Started { ref_index: referendum_index, threshold: pallet_democracy::VoteThreshold::SimpleMajority }) ); // Time to vote for the referendum with some amount assert_ok!(Democracy::vote( - Origin::signed(ALICE.clone()), + RuntimeOrigin::signed(ALICE.clone()), 0, pallet_democracy::AccountVote::Standard { vote: pallet_democracy::Vote { @@ -318,14 +325,14 @@ fn slow_supermajority_against_governance_works() { run_to_block(start_of_referendum); assert_eq!( last_event(), - calamari_runtime::Event::Democracy(pallet_democracy::Event::Started { + calamari_runtime::RuntimeEvent::Democracy(pallet_democracy::Event::Started { ref_index: referendum_index, threshold: pallet_democracy::VoteThreshold::SuperMajorityAgainst }) ); // Time to vote for the referendum with some amount assert_ok!(Democracy::vote( - Origin::signed(ALICE.clone()), + RuntimeOrigin::signed(ALICE.clone()), 0, pallet_democracy::AccountVote::Standard { vote: pallet_democracy::Vote { @@ -356,7 +363,7 @@ fn fast_track_governance_works() { // Setup and propose the Technical Committee motion for the fast_track routine // No voting required because there's only 1 seat. // Voting and delay periods of 5 blocks so this should be enacted on block 11 - let tech_committee_motion = Call::Democracy(pallet_democracy::Call::fast_track { + let tech_committee_motion = RuntimeCall::Democracy(pallet_democracy::Call::fast_track { proposal_hash: preimage_hash, voting_period, delay: enactment_period, @@ -365,7 +372,7 @@ fn fast_track_governance_works() { tech_committee_motion.using_encoded(|p| p.len() as u32); let tech_committee_motion_hash = BlakeTwo256::hash_of(&tech_committee_motion); assert_ok!(TechnicalCommittee::propose( - Origin::signed(ALICE.clone()), + RuntimeOrigin::signed(ALICE.clone()), 1, Box::new(tech_committee_motion), tech_committee_motion_len @@ -373,15 +380,17 @@ fn fast_track_governance_works() { // Make sure the motion was actually executed assert_eq!( last_event(), - calamari_runtime::Event::TechnicalCommittee(pallet_collective::Event::Executed { - proposal_hash: tech_committee_motion_hash, - result: Ok(()) - }) + calamari_runtime::RuntimeEvent::TechnicalCommittee( + pallet_collective::Event::Executed { + proposal_hash: tech_committee_motion_hash, + result: Ok(()) + } + ) ); // Time to vote for the referendum with some amount assert_ok!(Democracy::vote( - Origin::signed(ALICE.clone()), + RuntimeOrigin::signed(ALICE.clone()), referendum_index, pallet_democracy::AccountVote::Standard { vote: pallet_democracy::Vote { @@ -407,10 +416,8 @@ fn governance_filters_work() { ExtBuilder::default().build().execute_with(|| { // Setup the preimage and preimage hash - let preimage_hash = note_preimage( - &ALICE, - &Call::System(frame_system::Call::remark { remark: vec![0] }), - ); + let runtime_call = RuntimeCall::System(frame_system::Call::remark { remark: vec![0] }); + let proposal = Preimage::bound(runtime_call).unwrap(); // Setup the Council assert_ok!(Council::set_members( @@ -423,8 +430,8 @@ fn governance_filters_work() { // Public proposals should be filtered out. assert_proposal_is_filtered( &ALICE, - &Call::Democracy(pallet_democracy::Call::propose { - proposal_hash: preimage_hash, + &RuntimeCall::Democracy(pallet_democracy::Call::propose { + proposal, value: 100 * KMA, }), ); @@ -446,7 +453,7 @@ fn balances_operations_should_work() { // Basic transfer should work assert_ok!(Balances::transfer( - Origin::signed(ALICE.clone()), + RuntimeOrigin::signed(ALICE.clone()), sp_runtime::MultiAddress::Id(CHARLIE.clone()), transfer_amount, )); @@ -472,7 +479,7 @@ fn balances_operations_should_work() { // Should not be able to transfer all with this call assert_err!( Balances::transfer_keep_alive( - Origin::signed(ALICE.clone()), + RuntimeOrigin::signed(ALICE.clone()), sp_runtime::MultiAddress::Id(CHARLIE.clone()), INITIAL_BALANCE, ), @@ -481,7 +488,7 @@ fn balances_operations_should_work() { // Transfer all down to zero assert_ok!(Balances::transfer_all( - Origin::signed(BOB.clone()), + RuntimeOrigin::signed(BOB.clone()), sp_runtime::MultiAddress::Id(CHARLIE.clone()), false )); @@ -490,7 +497,7 @@ fn balances_operations_should_work() { // Transfer all but keep alive with ED assert_ok!(Balances::transfer_all( - Origin::signed(DAVE.clone()), + RuntimeOrigin::signed(DAVE.clone()), sp_runtime::MultiAddress::Id(ALICE.clone()), true )); @@ -502,7 +509,7 @@ fn balances_operations_should_work() { // Even though keep alive is set to false alice cannot fall below the ED // because it has an outstanding consumer reference, from being a collator. assert_ok!(Balances::transfer_all( - Origin::signed(ALICE.clone()), + RuntimeOrigin::signed(ALICE.clone()), sp_runtime::MultiAddress::Id(CHARLIE.clone()), false )); @@ -557,18 +564,18 @@ fn reward_fees_to_block_author_and_treasury() { calamari_runtime::System::initialize(&1, &Default::default(), header.digest()); assert_eq!(Authorship::author().unwrap(), author); - let call = Call::Balances(pallet_balances::Call::transfer { + let call = RuntimeCall::Balances(pallet_balances::Call::transfer { dest: sp_runtime::MultiAddress::Id(CHARLIE.clone()), value: 10 * KMA, }); let len = 10; - let info = info_from_weight(100); + let info = info_from_weight(Weight::from_ref_time(100)); let maybe_pre = ChargeTransactionPayment::::from(0) .pre_dispatch(&BOB, &call, &info, len) .unwrap(); - let res = call.dispatch(Origin::signed(BOB.clone())); + let res = call.dispatch(RuntimeOrigin::signed(BOB.clone())); let post_info = match res { Ok(info) => info, @@ -628,14 +635,14 @@ fn collator_can_join_with_min_bond() { .execute_with(|| { // Create and bond session keys to Bob's account. assert_ok!(Session::set_keys( - Origin::signed(BOB.clone()), + RuntimeOrigin::signed(BOB.clone()), BOB_SESSION_KEYS.clone(), vec![] )); assert!(>::is_registered(&BOB)); assert_ok!(ParachainStaking::join_candidates( - Origin::signed(BOB.clone()), + RuntimeOrigin::signed(BOB.clone()), ::MinCandidateStk::get(), 3u32 )); @@ -664,7 +671,7 @@ fn collator_cant_join_below_standard_bond() { .execute_with(|| { assert_noop!( ParachainStaking::join_candidates( - Origin::signed(BOB.clone()), + RuntimeOrigin::signed(BOB.clone()), MIN_BOND_TO_BE_CONSIDERED_COLLATOR - 1, 6u32 ), @@ -713,7 +720,7 @@ fn collator_with_large_stake_but_too_low_self_bond_not_selected_for_block_produc FERDIE.clone(), ] { assert_ok!(ParachainStaking::candidate_bond_more( - Origin::signed(collator.clone()), + RuntimeOrigin::signed(collator.clone()), MIN_BOND_TO_BE_CONSIDERED_COLLATOR - EARLY_COLLATOR_MINIMUM_STAKE )); } @@ -721,7 +728,7 @@ fn collator_with_large_stake_but_too_low_self_bond_not_selected_for_block_produc // Delegate a large amount of tokens to EVE and ALICE for collator in vec![EVE.clone(), ALICE.clone()] { assert_ok!(ParachainStaking::delegate( - Origin::signed(USER.clone()), + RuntimeOrigin::signed(USER.clone()), collator, 100_000_000 * KMA, 50, @@ -772,7 +779,7 @@ fn collator_can_leave_if_below_standard_bond() { ]); // Attempt to leave as whitelist collator assert_ok!(ParachainStaking::schedule_leave_candidates( - Origin::signed(FERDIE.clone()), + RuntimeOrigin::signed(FERDIE.clone()), 6 )); }); @@ -817,7 +824,7 @@ fn collator_with_400k_not_selected_for_block_production() { FERDIE.clone(), ] { assert_ok!(ParachainStaking::candidate_bond_more( - Origin::signed(collator.clone()), + RuntimeOrigin::signed(collator.clone()), MIN_BOND_TO_BE_CONSIDERED_COLLATOR - EARLY_COLLATOR_MINIMUM_STAKE )); } @@ -838,7 +845,7 @@ fn calamari_vesting_works() { ExtBuilder::default().build().execute_with(|| { let unvested = 100 * KMA; assert_ok!(CalamariVesting::vested_transfer( - Origin::signed(ALICE.clone()), + RuntimeOrigin::signed(ALICE.clone()), sp_runtime::MultiAddress::Id(BOB.clone()), unvested )); @@ -853,7 +860,7 @@ fn calamari_vesting_works() { // Timestamp expects milliseconds, so multiply by 1_000 to convert from seconds. let now = schedule[period].1 * 1_000 + 1; Timestamp::set_timestamp(now); - assert_ok!(CalamariVesting::vest(Origin::signed(BOB.clone()))); + assert_ok!(CalamariVesting::vest(RuntimeOrigin::signed(BOB.clone()))); vested += schedule[period].0 * unvested; assert_eq!(Balances::usable_balance(BOB.clone()), vested); } @@ -938,6 +945,13 @@ fn verify_pallet_prefixes() { max_values: Some(1), max_size: Some(16), }, + StorageInfo { + pallet_name: b"Balances".to_vec(), + storage_name: b"InactiveIssuance".to_vec(), + prefix: prefix(b"Balances", b"InactiveIssuance"), + max_values: Some(1), + max_size: Some(16), + }, StorageInfo { pallet_name: b"Balances".to_vec(), storage_name: b"Account".to_vec(), @@ -959,13 +973,6 @@ fn verify_pallet_prefixes() { max_values: None, max_size: Some(1249), }, - StorageInfo { - pallet_name: b"Balances".to_vec(), - storage_name: b"StorageVersion".to_vec(), - prefix: prefix(b"Balances", b"StorageVersion"), - max_values: Some(1), - max_size: Some(1), - } ] ); } @@ -1572,7 +1579,7 @@ fn concrete_fungible_ledger_can_withdraw_works() { ); assert_ok!(Assets::freeze( - Origin::signed(AssetManager::account_id()), + RuntimeOrigin::signed(AssetManager::account_id()), >::StartNonNativeAssetId::get(), sp_runtime::MultiAddress::Id(ALICE.clone()), )); @@ -1592,13 +1599,13 @@ fn concrete_fungible_ledger_can_withdraw_works() { #[test] fn test_receiver_side_weights() { let weight = ::Weigher::weight( - &mut self_reserve_xcm_message_receiver_side::(), + &mut self_reserve_xcm_message_receiver_side::(), ) .unwrap(); assert!(weight <= ADVERTISED_DEST_WEIGHT); let weight = ::Weigher::weight( - &mut to_reserve_xcm_message_receiver_side::(), + &mut to_reserve_xcm_message_receiver_side::(), ) .unwrap(); assert!(weight <= ADVERTISED_DEST_WEIGHT); @@ -1606,11 +1613,11 @@ fn test_receiver_side_weights() { #[test] fn test_sender_side_xcm_weights() { - let mut msg = self_reserve_xcm_message_sender_side::(); + let mut msg = self_reserve_xcm_message_sender_side::(); let weight = ::Weigher::weight(&mut msg).unwrap(); assert!(weight < ADVERTISED_DEST_WEIGHT); - let mut msg = to_reserve_xcm_message_sender_side::(); + let mut msg = to_reserve_xcm_message_sender_side::(); let weight = ::Weigher::weight(&mut msg).unwrap(); assert!(weight < ADVERTISED_DEST_WEIGHT); } @@ -1698,7 +1705,7 @@ fn tx_pause_works() { ExtBuilder::default().build().execute_with(|| { assert_noop!( TransactionPause::pause_transaction( - Origin::signed(alice), + RuntimeOrigin::signed(alice), b"Balances".to_vec(), b"transfer".to_vec() ), diff --git a/runtime/calamari/tests/integrations_mock/mock.rs b/runtime/calamari/tests/integrations_mock/mock.rs index 17fbb9d24..4881848c8 100644 --- a/runtime/calamari/tests/integrations_mock/mock.rs +++ b/runtime/calamari/tests/integrations_mock/mock.rs @@ -20,8 +20,9 @@ use crate::integrations_mock::*; use calamari_runtime::opaque::SessionKeys; pub use calamari_runtime::{ - assets_config::CalamariAssetConfig, currency::KMA, AuthorInherent, Call, CollatorSelection, - Democracy, InflationInfo, Range, Runtime, Scheduler, Session, System, TransactionPayment, + assets_config::CalamariAssetConfig, currency::KMA, AuthorInherent, CollatorSelection, + Democracy, InflationInfo, Preimage, Range, Runtime, RuntimeCall, Scheduler, Session, System, + TransactionPayment, }; use frame_support::traits::{GenesisBuild, OnFinalize, OnInitialize}; use manta_primitives::{ @@ -194,5 +195,6 @@ pub fn run_to_block(n: u32) { ParachainStaking::on_initialize(System::block_number()); Scheduler::on_initialize(System::block_number()); Democracy::on_initialize(System::block_number()); + Preimage::on_initialize(System::block_number()); } } diff --git a/runtime/calamari/tests/integrations_mock/mod.rs b/runtime/calamari/tests/integrations_mock/mod.rs index 2a01ad17f..3e05472ab 100644 --- a/runtime/calamari/tests/integrations_mock/mod.rs +++ b/runtime/calamari/tests/integrations_mock/mod.rs @@ -23,13 +23,10 @@ use calamari_runtime::opaque::SessionKeys; pub use calamari_runtime::{ currency::KMA, staking::{EARLY_COLLATOR_MINIMUM_STAKE, MIN_BOND_TO_BE_CONSIDERED_COLLATOR}, - CollatorSelection, Event, Origin, ParachainStaking, Runtime, System, + CollatorSelection, ParachainStaking, Runtime, RuntimeEvent, RuntimeOrigin, System, }; -use frame_support::{ - assert_ok, - weights::{DispatchInfo, Weight}, -}; +use frame_support::{assert_ok, dispatch::DispatchInfo, weights::Weight}; use lazy_static::lazy_static; use manta_primitives::types::{AccountId, Balance}; use session_key_primitives::util::unchecked_account_id; @@ -65,12 +62,12 @@ pub fn info_from_weight(w: Weight) -> DispatchInfo { } } -pub fn last_event() -> Event { +pub fn last_event() -> RuntimeEvent { System::events().pop().expect("Event expected").event } -pub fn root_origin() -> ::Origin { - ::Origin::root() +pub fn root_origin() -> ::RuntimeOrigin { + ::RuntimeOrigin::root() } pub fn initialize_collators_through_whitelist(collators: Vec) { diff --git a/runtime/calamari/tests/xcm_mock/parachain.rs b/runtime/calamari/tests/xcm_mock/parachain.rs index e012a5db9..90a4f75c7 100644 --- a/runtime/calamari/tests/xcm_mock/parachain.rs +++ b/runtime/calamari/tests/xcm_mock/parachain.rs @@ -24,11 +24,11 @@ use frame_support::{ assert_ok, construct_runtime, match_types, pallet_prelude::DispatchResult, parameter_types, - traits::{ConstU32, Currency, Everything, Nothing}, + traits::{AsEnsureOriginWithArg, ConstU32, Currency, Everything, Nothing}, weights::Weight, PalletId, }; -use frame_system::EnsureRoot; +use frame_system::{EnsureNever, EnsureRoot}; use scale_info::TypeInfo; use sp_core::H256; use sp_runtime::{ @@ -70,8 +70,8 @@ parameter_types! { } impl frame_system::Config for Runtime { - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; type Hash = H256; @@ -79,7 +79,7 @@ impl frame_system::Config for Runtime { type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type BlockWeights = (); type BlockLength = (); @@ -105,7 +105,7 @@ parameter_types! { impl pallet_balances::Config for Runtime { type MaxLocks = MaxLocks; type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -115,8 +115,8 @@ impl pallet_balances::Config for Runtime { } parameter_types! { - pub const ReservedXcmpWeight: Weight = WEIGHT_PER_SECOND / 4; - pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND / 4; + pub const ReservedXcmpWeight: Weight = Weight::from_ref_time(WEIGHT_PER_SECOND.saturating_div(4)); + pub const ReservedDmpWeight: Weight = Weight::from_ref_time(WEIGHT_PER_SECOND.saturating_div(4)); } parameter_types! { @@ -137,7 +137,7 @@ parameter_types! { } impl pallet_assets::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CalamariAssetId; type Currency = Balances; @@ -151,6 +151,12 @@ impl pallet_assets::Config for Runtime { type Freezer = (); type Extra = (); type WeightInfo = pallet_assets::weights::SubstrateWeight; + type RemoveItemsLimit = ConstU32<1000>; + type AssetIdParameter = CalamariAssetId; + type CreateOrigin = AsEnsureOriginWithArg>; + type CallbackHandle = (); + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -172,19 +178,19 @@ pub type XcmOriginToCallOrigin = ( // Sovereign account converter; this attempts to derive an `AccountId` from the origin location // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for // foreign chains who want to have a local sovereign account on this chain which they control. - SovereignSignedViaLocation, + SovereignSignedViaLocation, // If the incoming XCM origin is of type `AccountId32` and the Network is Network::Any // or `RelayNetwork`, convert it to a Native 32 byte account. - SignedAccountId32AsNative, + SignedAccountId32AsNative, // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when // recognised. - SiblingParachainAsNative, + SiblingParachainAsNative, // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. - XcmPassthrough, + XcmPassthrough, ); parameter_types! { - pub const UnitWeightCost: Weight = 1_000_000_000; + pub const UnitWeightCost: u64 = 1_000_000_000; // Used in native traders // This might be able to skipped. // We have to use `here()` because of reanchoring logic @@ -279,7 +285,7 @@ pub type XcmFeesToAccount = manta_primitives::xcm::XcmFeesToAccount< pub struct XcmExecutorConfig; impl Config for XcmExecutorConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; // Defines how to Withdraw and Deposit instruction work type AssetTransactor = MultiAssetTransactor; @@ -290,8 +296,8 @@ impl Config for XcmExecutorConfig { type LocationInverter = LocationInverter; type Barrier = Barrier; type Weigher = WeightInfoBounds< - calamari_runtime::weights::xcm::CalamariXcmWeight, - Call, + calamari_runtime::weights::xcm::CalamariXcmWeight, + RuntimeCall, MaxInstructions, >; // Trader is the means to purchasing weight credit for XCM execution. @@ -312,7 +318,7 @@ impl Config for XcmExecutorConfig { } impl cumulus_pallet_xcmp_queue::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; @@ -329,8 +335,8 @@ pub mod mock_msg_queue { #[pallet::config] pub trait Config: frame_system::Config { - type Event: From> + IsType<::Event>; - type XcmExecutor: ExecuteXcm; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + type XcmExecutor: ExecuteXcm; } #[pallet::call] @@ -349,7 +355,7 @@ pub mod mock_msg_queue { #[pallet::storage] #[pallet::getter(fn received_dmp)] /// A queue of received DMP messages - pub(super) type ReceivedDmp = StorageValue<_, Vec>, ValueQuery>; + pub(super) type ReceivedDmp = StorageValue<_, Vec>, ValueQuery>; impl Get for Pallet { fn get() -> ParaId { @@ -389,19 +395,23 @@ pub mod mock_msg_queue { fn handle_xcmp_message( sender: ParaId, _sent_at: RelayBlockNumber, - xcm: VersionedXcm, + xcm: VersionedXcm, max_weight: Weight, ) -> Result { let hash = Encode::using_encoded(&xcm, T::Hashing::hash); - let (result, event) = match Xcm::::try_from(xcm) { + let (result, event) = match Xcm::::try_from(xcm) { Ok(xcm) => { let location = (1, Parachain(sender.into())); - match T::XcmExecutor::execute_xcm(location, xcm, max_weight) { + match T::XcmExecutor::execute_xcm(location, xcm, max_weight.ref_time()) { Outcome::Error(e) => (Err(e), Event::Fail(Some(hash), e)), - Outcome::Complete(w) => (Ok(w), Event::Success(Some(hash))), + Outcome::Complete(w) => { + (Ok(Weight::from_ref_time(w)), Event::Success(Some(hash))) + } // As far as the caller is concerned, this was dispatched without error, so // we just report the weight used. - Outcome::Incomplete(w, e) => (Ok(w), Event::Fail(Some(hash), e)), + Outcome::Incomplete(w, e) => { + (Ok(Weight::from_ref_time(w)), Event::Fail(Some(hash), e)) + } } } Err(()) => ( @@ -426,7 +436,9 @@ pub mod mock_msg_queue { let mut remaining_fragments = data_ref; while !remaining_fragments.is_empty() { - if let Ok(xcm) = VersionedXcm::::decode(&mut remaining_fragments) { + if let Ok(xcm) = + VersionedXcm::::decode(&mut remaining_fragments) + { let _ = Self::handle_xcmp_message(sender, sent_at, xcm, max_weight); } else { debug_assert!(false, "Invalid incoming XCMP message data"); @@ -444,8 +456,8 @@ pub mod mock_msg_queue { ) -> Weight { for (_i, (_sent_at, data)) in iter.enumerate() { let id = sp_io::hashing::blake2_256(&data[..]); - let maybe_msg = - VersionedXcm::::decode(&mut &data[..]).map(Xcm::::try_from); + let maybe_msg = VersionedXcm::::decode(&mut &data[..]) + .map(Xcm::::try_from); match maybe_msg { Err(_) => { Self::deposit_event(Event::InvalidFormat(id)); @@ -454,7 +466,8 @@ pub mod mock_msg_queue { Self::deposit_event(Event::UnsupportedVersion(id)); } Ok(Ok(x)) => { - let outcome = T::XcmExecutor::execute_xcm(Parent, x.clone(), limit); + let outcome = + T::XcmExecutor::execute_xcm(Parent, x.clone(), limit.ref_time()); >::append(x); Self::deposit_event(Event::ExecutedDownward(id, outcome)); } @@ -466,12 +479,12 @@ pub mod mock_msg_queue { } impl mock_msg_queue::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; } impl cumulus_pallet_parachain_system::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type SelfParaId = parachain_info::Pallet; type DmpMessageHandler = MsgQueue; type ReservedDmpWeight = ReservedDmpWeight; @@ -485,23 +498,23 @@ impl cumulus_pallet_parachain_system::Config for Runtime { pub type LocalOriginToLocation = (); impl pallet_xcm::Config for Runtime { - type Event = Event; - type SendXcmOrigin = EnsureXcmOrigin; + type RuntimeEvent = RuntimeEvent; + type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; - type ExecuteXcmOrigin = EnsureXcmOrigin; + type ExecuteXcmOrigin = EnsureXcmOrigin; type XcmExecuteFilter = Nothing; type XcmExecutor = XcmExecutor; // Do not allow teleports type XcmTeleportFilter = Nothing; type XcmReserveTransferFilter = Nothing; type Weigher = WeightInfoBounds< - calamari_runtime::weights::xcm::CalamariXcmWeight, - Call, + calamari_runtime::weights::xcm::CalamariXcmWeight, + RuntimeCall, MaxInstructions, >; type LocationInverter = LocationInverter; - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = CurrentXcmVersion; } @@ -534,7 +547,7 @@ impl AssetRegistry for CalamariAssetRegistry { is_sufficient: bool, ) -> DispatchResult { Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), asset_id, AssetManager::account_id(), is_sufficient, @@ -542,7 +555,7 @@ impl AssetRegistry for CalamariAssetRegistry { )?; Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), asset_id, metadata.name, metadata.symbol, @@ -556,7 +569,7 @@ impl AssetRegistry for CalamariAssetRegistry { metadata: AssetStorageMetadata, ) -> DispatchResult { Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), *asset_id, metadata.name, metadata.symbol, @@ -608,7 +621,7 @@ impl AssetConfig for ParachainAssetConfig { } impl pallet_asset_manager::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AssetId = CalamariAssetId; type Balance = Balance; type Location = AssetLocation; @@ -619,7 +632,7 @@ impl pallet_asset_manager::Config for Runtime { } impl cumulus_pallet_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; } @@ -647,13 +660,13 @@ where } parameter_types! { - pub const BaseXcmWeight: Weight = 100_000_000; + pub const BaseXcmWeight: u64 = 100_000_000; pub const MaxAssetsForTransfer: usize = 3; } // The XCM message wrapper wrapper impl orml_xtokens::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type CurrencyId = CurrencyId; type AccountIdToMultiLocation = manta_primitives::xcm::AccountIdToMultiLocation; @@ -661,8 +674,8 @@ impl orml_xtokens::Config for Runtime { type XcmExecutor = XcmExecutor; type SelfLocation = SelfReserve; type Weigher = WeightInfoBounds< - calamari_runtime::weights::xcm::CalamariXcmWeight, - Call, + calamari_runtime::weights::xcm::CalamariXcmWeight, + RuntimeCall, MaxInstructions, >; type BaseXcmWeight = BaseXcmWeight; @@ -700,7 +713,7 @@ construct_runtime!( } ); -pub(crate) fn para_events() -> Vec { +pub(crate) fn para_events() -> Vec { System::events() .into_iter() .map(|r| r.event) @@ -762,7 +775,7 @@ fn insert_dummy_data( let mut next_dummy_mult_loc = dummy_mult_loc; while next_asset_id < insert_until { assert_ok!(AssetManager::register_asset( - self::Origin::root(), + self::RuntimeOrigin::root(), AssetLocation::from(next_dummy_mult_loc.clone()), dummy_asset_metadata.clone() )); @@ -808,14 +821,14 @@ where asset_id = AssetManager::next_asset_id(); assert_ok!(AssetManager::register_asset( - self::Origin::root(), + self::RuntimeOrigin::root(), source_location.clone(), asset_metadata.clone() )); if let Some((owner, min_balance, is_sufficient, is_frozen)) = mint_asset { assert_ok!(self::Assets::force_asset_status( - self::Origin::root(), + self::RuntimeOrigin::root(), asset_id, owner.clone(), owner.clone(), @@ -829,7 +842,7 @@ where if let Some(ups) = units_per_second { assert_ok!(AssetManager::set_units_per_second( - self::Origin::root(), + self::RuntimeOrigin::root(), asset_id, ups, )); diff --git a/runtime/calamari/tests/xcm_mock/relay_chain.rs b/runtime/calamari/tests/xcm_mock/relay_chain.rs index 5cbecdaa6..c445e0516 100644 --- a/runtime/calamari/tests/xcm_mock/relay_chain.rs +++ b/runtime/calamari/tests/xcm_mock/relay_chain.rs @@ -21,7 +21,6 @@ use frame_support::{ construct_runtime, parameter_types, traits::{ConstU32, Everything, Nothing}, - weights::Weight, }; use sp_core::H256; use sp_runtime::{ @@ -51,8 +50,8 @@ parameter_types! { } impl frame_system::Config for Runtime { - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; type Hash = H256; @@ -60,7 +59,7 @@ impl frame_system::Config for Runtime { type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type BlockWeights = (); type BlockLength = (); @@ -86,7 +85,7 @@ parameter_types! { impl pallet_balances::Config for Runtime { type MaxLocks = MaxLocks; type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -96,8 +95,8 @@ impl pallet_balances::Config for Runtime { } impl pallet_utility::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type WeightInfo = (); type PalletsOrigin = OriginCaller; } @@ -113,7 +112,7 @@ parameter_types! { pub const KusamaNetwork: NetworkId = NetworkId::Kusama; pub const AnyNetwork: NetworkId = NetworkId::Any; pub Ancestry: MultiLocation = Here.into(); - pub UnitWeightCost: Weight = 1_000; + pub UnitWeightCost: u64 = 1_000; } pub type SovereignAccountOf = ( @@ -125,14 +124,14 @@ pub type LocalAssetTransactor = XcmCurrencyAdapter, SovereignAccountOf, AccountId, ()>; type LocalOriginConverter = ( - SovereignSignedViaLocation, - ChildParachainAsNative, - SignedAccountId32AsNative, - ChildSystemParachainAsSuperuser, + SovereignSignedViaLocation, + ChildParachainAsNative, + SignedAccountId32AsNative, + ChildSystemParachainAsSuperuser, ); parameter_types! { - pub const BaseXcmWeight: Weight = 1_000; + pub const BaseXcmWeight: u64 = 1_000; pub KsmPerSecond: (AssetId, u128) = (Concrete(KsmLocation::get()), 1); pub const MaxInstructions: u32 = 100; } @@ -151,7 +150,7 @@ pub type Barrier = ( pub struct XcmExecutorConfig; impl Config for XcmExecutorConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; type AssetTransactor = LocalAssetTransactor; type OriginConverter = LocalOriginConverter; @@ -159,7 +158,7 @@ impl Config for XcmExecutorConfig { type IsTeleporter = (); type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type Trader = FixedRateOfFungible; type ResponseHandler = XcmPallet; type AssetTrap = XcmPallet; @@ -167,22 +166,22 @@ impl Config for XcmExecutorConfig { type SubscriptionService = XcmPallet; } -pub type LocalOriginToLocation = SignedToAccountId32; +pub type LocalOriginToLocation = SignedToAccountId32; impl pallet_xcm::Config for Runtime { - type Event = Event; - type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; + type RuntimeEvent = RuntimeEvent; + type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = XcmRouter; // Anyone can execute XCM messages locally... - type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; + type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmExecuteFilter = Nothing; type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } @@ -192,7 +191,7 @@ parameter_types! { } impl ump::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type UmpSink = ump::XcmSink, Runtime>; type FirstMessageFactorPercent = FirstMessageFactorPercent; type ExecuteOverweightOrigin = frame_system::EnsureRoot; @@ -219,7 +218,7 @@ construct_runtime!( } ); -pub(crate) fn relay_events() -> Vec { +pub(crate) fn relay_events() -> Vec { System::events() .into_iter() .map(|r| r.event) diff --git a/runtime/calamari/tests/xcm_mock/xcm_tests.rs b/runtime/calamari/tests/xcm_mock/xcm_tests.rs index c729ac68b..a32b62b99 100644 --- a/runtime/calamari/tests/xcm_mock/xcm_tests.rs +++ b/runtime/calamari/tests/xcm_mock/xcm_tests.rs @@ -75,7 +75,7 @@ fn buy_execution(fees: impl Into) -> Instruction { fn dmp() { MockNet::reset(); - let remark = parachain::Call::System( + let remark = parachain::RuntimeCall::System( frame_system::Call::::remark_with_event { remark: vec![1, 2, 3], }, @@ -93,10 +93,11 @@ fn dmp() { }); ParaA::execute_with(|| { - use parachain::{Event, System}; - assert!(System::events() - .iter() - .any(|r| matches!(r.event, Event::System(frame_system::Event::Remarked { .. })))); + use parachain::{RuntimeEvent, System}; + assert!(System::events().iter().any(|r| matches!( + r.event, + RuntimeEvent::System(frame_system::Event::Remarked { .. }) + ))); }); } @@ -104,7 +105,7 @@ fn dmp() { fn dmp_transact_from_parent_should_pass_barrier() { MockNet::reset(); - let remark = parachain::Call::System( + let remark = parachain::RuntimeCall::System( frame_system::Call::::remark_with_event { remark: vec![1, 2, 3], }, @@ -122,10 +123,11 @@ fn dmp_transact_from_parent_should_pass_barrier() { )); }); ParaA::execute_with(|| { - use parachain::{Event, System}; - assert!(System::events() - .iter() - .any(|r| matches!(r.event, Event::System(frame_system::Event::Remarked { .. })))); + use parachain::{RuntimeEvent, System}; + assert!(System::events().iter().any(|r| matches!( + r.event, + RuntimeEvent::System(frame_system::Event::Remarked { .. }) + ))); }); } @@ -133,7 +135,7 @@ fn dmp_transact_from_parent_should_pass_barrier() { fn ump() { MockNet::reset(); - let remark = relay_chain::Call::System( + let remark = relay_chain::RuntimeCall::System( frame_system::Call::::remark_with_event { remark: vec![1, 2, 3], }, @@ -151,10 +153,11 @@ fn ump() { }); Relay::execute_with(|| { - use relay_chain::{Event, System}; - assert!(System::events() - .iter() - .any(|r| matches!(r.event, Event::System(frame_system::Event::Remarked { .. })))); + use relay_chain::{RuntimeEvent, System}; + assert!(System::events().iter().any(|r| matches!( + r.event, + RuntimeEvent::System(frame_system::Event::Remarked { .. }) + ))); }); } @@ -162,7 +165,7 @@ fn ump() { fn xcmp_transact_from_sibling_parachain_blocked_by_barrier() { MockNet::reset(); - let remark = parachain::Call::System( + let remark = parachain::RuntimeCall::System( frame_system::Call::::remark_with_event { remark: vec![1, 2, 3], }, @@ -182,10 +185,11 @@ fn xcmp_transact_from_sibling_parachain_blocked_by_barrier() { // The `AllowUnpaidExecutionFrom` barrier implementation // only allows Transact instructions sent by the relay chain's governance ParaB::execute_with(|| { - use parachain::{Event, System}; - assert!(!System::events() - .iter() - .any(|r| matches!(r.event, Event::System(frame_system::Event::Remarked { .. })))); + use parachain::{RuntimeEvent, System}; + assert!(!System::events().iter().any(|r| matches!( + r.event, + RuntimeEvent::System(frame_system::Event::Remarked { .. }) + ))); }); } @@ -217,7 +221,7 @@ fn reserve_transfer_relaychain_to_parachain_a_then_back() { Relay::execute_with(|| { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( - relay_chain::Origin::signed(ALICE), + relay_chain::RuntimeOrigin::signed(ALICE), Box::new(X1(Parachain(PARA_A_ID)).into().into()), Box::new( X1(AccountId32 { @@ -261,11 +265,11 @@ fn reserve_transfer_relaychain_to_parachain_a_then_back() { ParaA::execute_with(|| { // free execution, full amount received assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(relay_asset_id), amount, Box::new(VersionedMultiLocation::V1(dest)), - weight_at_most + WeightLimit::Limited(weight_at_most) )); }); @@ -336,11 +340,11 @@ fn send_para_a_native_asset_to_para_b() { // Also tests that a sender can send all of their balance ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, Box::new(VersionedMultiLocation::V1(dest)), - ADVERTISED_DEST_WEIGHT + WeightLimit::Limited(ADVERTISED_DEST_WEIGHT) )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -422,11 +426,11 @@ fn send_para_b_asset_to_para_b() { assert_eq!(parachain::Assets::balance(b_asset_id_on_a, &ALICE), amount); assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(b_asset_id_on_a), amount, Box::new(VersionedMultiLocation::V1(dest)), - ADVERTISED_DEST_WEIGHT + WeightLimit::Limited(ADVERTISED_DEST_WEIGHT) )); assert_eq!(parachain::Assets::balance(b_asset_id_on_a, &ALICE), 0); }); @@ -494,11 +498,11 @@ fn send_para_a_native_asset_to_para_b_barriers_should_work() { assert!(weight <= ADVERTISED_DEST_WEIGHT); ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, Box::new(VersionedMultiLocation::V1(dest)), - weight + WeightLimit::Limited(weight) )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -509,10 +513,10 @@ fn send_para_a_native_asset_to_para_b_barriers_should_work() { // The `AllowTopLevelPaidExecutionFrom` barrier implementation // should not let the transfer through ParaB::execute_with(|| { - use parachain::{Event, System}; + use parachain::{RuntimeEvent, System}; assert!(System::events().iter().any(|r| matches!( r.event, - Event::XcmpQueue(cumulus_pallet_xcmp_queue::Event::Fail { + RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::Fail { message_hash: Some(_), error: xcm_simulator::XcmError::Barrier, weight: _ @@ -584,11 +588,11 @@ fn send_insufficient_asset_from_para_a_to_para_b() { // Transfer ParaA balance to B ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, Box::new(VersionedMultiLocation::V1(dest.clone())), - ADVERTISED_DEST_WEIGHT + WeightLimit::Limited(ADVERTISED_DEST_WEIGHT) )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -614,7 +618,7 @@ fn send_insufficient_asset_from_para_a_to_para_b() { // incrementing its providers counter to from 0 to 1 ParaB::execute_with(|| { assert_ok!(pallet_balances::Pallet::::set_balance( - parachain::Origin::root(), + parachain::RuntimeOrigin::root(), XcmFeesAccount::get(), 1000000000000000, 1000000000000000 @@ -623,11 +627,11 @@ fn send_insufficient_asset_from_para_a_to_para_b() { ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, Box::new(VersionedMultiLocation::V1(dest.clone())), - ADVERTISED_DEST_WEIGHT + WeightLimit::Limited(ADVERTISED_DEST_WEIGHT) )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -708,11 +712,11 @@ fn send_para_a_native_asset_to_para_b_must_fail_cases() { ParaA::execute_with(|| { assert_err!( parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount + INITIAL_BALANCE, Box::new(VersionedMultiLocation::V1(dest.clone())), - weight + WeightLimit::Limited(weight) ), orml_xtokens::Error::::XcmExecutionFailed ); @@ -722,11 +726,11 @@ fn send_para_a_native_asset_to_para_b_must_fail_cases() { // Low amount for the required weight results in TooExpensive error on the receiver side ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, Box::new(VersionedMultiLocation::V1(dest)), - weight + WeightLimit::Limited(weight) )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -735,12 +739,12 @@ fn send_para_a_native_asset_to_para_b_must_fail_cases() { }); ParaB::execute_with(|| { - use parachain::{Event, System}; + use parachain::{RuntimeEvent, System}; assert!(System::events().iter().any(|r| { matches!( r.event, - Event::XcmpQueue(cumulus_pallet_xcmp_queue::Event::Fail { + RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::Fail { message_hash: Some(_), error: xcm_simulator::XcmError::TooExpensive, weight: _ @@ -765,7 +769,7 @@ fn register_insufficient_with_zero_min_balance_should_fail() { ParaB::execute_with(|| { assert_err!( AssetManager::register_asset( - parachain::Origin::root(), + parachain::RuntimeOrigin::root(), a_source_location.clone(), a_asset_metadata_on_b.clone() ), @@ -841,17 +845,17 @@ fn send_para_a_custom_asset_to_para_b() { ParaA::execute_with(|| { // Force customized asset balance for Alice assert_ok!(parachain::Assets::mint( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), doge_currency_id_on_a, ALICE, INITIAL_BALANCE )); assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(doge_currency_id_on_a), amount, Box::new(VersionedMultiLocation::V1(alice_on_b)), - ADVERTISED_DEST_WEIGHT + WeightLimit::Limited(ADVERTISED_DEST_WEIGHT) )); assert_eq!( parachain::Assets::balance(doge_currency_id_on_a, &ALICE), @@ -927,11 +931,11 @@ fn send_para_a_native_asset_para_b_and_then_send_back() { ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, Box::new(VersionedMultiLocation::V1(alice_on_b)), - weight + WeightLimit::Limited(weight) )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -963,11 +967,11 @@ fn send_para_a_native_asset_para_b_and_then_send_back() { // Send wrapped a back to a ParaB::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_b), amount, Box::new(VersionedMultiLocation::V1(alice_on_a)), - weight + WeightLimit::Limited(weight) )); assert_eq!(parachain::Assets::balance(a_asset_id_on_b, &ALICE), 0); }); @@ -1061,11 +1065,11 @@ fn send_para_a_native_asset_from_para_b_to_para_c() { ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, Box::new(VersionedMultiLocation::V1(alice_on_b.clone())), - weight + WeightLimit::Limited(weight) )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -1096,11 +1100,11 @@ fn send_para_a_native_asset_from_para_b_to_para_c() { ParaB::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_b), amount, Box::new(VersionedMultiLocation::V1(alice_on_c)), - weight, + WeightLimit::Limited(weight), )); assert_eq!(parachain::Assets::balance(a_asset_id_on_b, &ALICE), 0); }); @@ -1156,7 +1160,7 @@ fn receive_relay_asset_with_trader_on_parachain() { Relay::execute_with(|| { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( - relay_chain::Origin::signed(ALICE), + relay_chain::RuntimeOrigin::signed(ALICE), Box::new(X1(Parachain(1)).into().into()), Box::new(VersionedMultiLocation::V1(dest)), Box::new((Here, amount).into()), @@ -1235,12 +1239,12 @@ fn send_para_a_asset_to_para_b_with_trader_and_fee() { ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer_with_fee( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, fee, Box::new(VersionedMultiLocation::V1(dest)), - ADVERTISED_DEST_WEIGHT, + WeightLimit::Limited(ADVERTISED_DEST_WEIGHT), )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -1331,12 +1335,12 @@ fn send_para_b_asset_to_para_b_with_trader_and_fee() { ); assert_ok!(parachain::XTokens::transfer_with_fee( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(b_asset_id_on_a), amount, fee, Box::new(VersionedMultiLocation::V1(dest)), - ADVERTISED_DEST_WEIGHT, + WeightLimit::Limited(ADVERTISED_DEST_WEIGHT), )); assert_eq!( parachain::Assets::balance(b_asset_id_on_a, &ALICE), @@ -1412,12 +1416,12 @@ fn send_para_a_native_asset_para_b_and_then_send_back_with_trader_and_fee() { ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer_with_fee( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, fee, Box::new(VersionedMultiLocation::V1(dest)), - ADVERTISED_DEST_WEIGHT, + WeightLimit::Limited(ADVERTISED_DEST_WEIGHT), )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -1447,11 +1451,11 @@ fn send_para_a_native_asset_para_b_and_then_send_back_with_trader_and_fee() { // Send wrapped a back to a ParaB::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_b), amount, Box::new(VersionedMultiLocation::V1(alice_on_a)), - weight + WeightLimit::Limited(weight) )); assert_eq!(parachain::Assets::balance(a_asset_id_on_b, &ALICE), 0); }); @@ -1549,11 +1553,11 @@ fn send_para_a_asset_from_para_b_to_para_c_with_trader() { assert!(amount >= fee_at_b); ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, Box::new(VersionedMultiLocation::V1(alice_on_b.clone())), - ADVERTISED_DEST_WEIGHT + WeightLimit::Limited(ADVERTISED_DEST_WEIGHT) )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -1582,11 +1586,11 @@ fn send_para_a_asset_from_para_b_to_para_c_with_trader() { assert!(amount >= fee_at_b + fee_at_a); ParaB::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_b), amount, Box::new(VersionedMultiLocation::V1(alice_on_c)), - ADVERTISED_DEST_WEIGHT + WeightLimit::Limited(ADVERTISED_DEST_WEIGHT) )); assert_eq!(parachain::Assets::balance(a_asset_id_on_b, &ALICE), 0); }); @@ -1639,7 +1643,7 @@ fn receive_relay_asset_on_parachain_with_insufficient_fee_payment_should_fail() Relay::execute_with(|| { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( - relay_chain::Origin::signed(ALICE), + relay_chain::RuntimeOrigin::signed(ALICE), Box::new(X1(Parachain(1)).into().into()), Box::new(VersionedMultiLocation::V1(dest)), Box::new((Here, amount).into()), @@ -1695,7 +1699,7 @@ fn receive_relay_should_fail_without_specifying_units_per_second() { Relay::execute_with(|| { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( - relay_chain::Origin::signed(ALICE), + relay_chain::RuntimeOrigin::signed(ALICE), Box::new(X1(Parachain(1)).into().into()), Box::new(VersionedMultiLocation::V1(dest)), Box::new((Here, amount).into()), @@ -1774,11 +1778,11 @@ fn send_para_a_asset_to_para_b_with_insufficient_fee() { // Transfer ParaA balance to B ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, Box::new(VersionedMultiLocation::V1(dest)), - dest_weight, + WeightLimit::Limited(dest_weight), )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -1849,11 +1853,11 @@ fn send_para_a_asset_to_para_b_without_specifying_units_per_second() { // Transfer ParaA balance to B ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, Box::new(VersionedMultiLocation::V1(dest)), - dest_weight, + WeightLimit::Limited(dest_weight), )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -1903,7 +1907,7 @@ fn receive_insufficient_relay_asset_on_parachain() { Relay::execute_with(|| { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( - relay_chain::Origin::signed(ALICE), + relay_chain::RuntimeOrigin::signed(ALICE), Box::new(X1(Parachain(1)).into().into()), Box::new(VersionedMultiLocation::V1(dest.clone())), Box::new((Here, amount).into()), @@ -1927,7 +1931,7 @@ fn receive_insufficient_relay_asset_on_parachain() { // Send native token to fresh_account ParaA::execute_with(|| { assert_ok!(parachain::Balances::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), new_account.into(), fresh_account_amount )); @@ -1935,7 +1939,7 @@ fn receive_insufficient_relay_asset_on_parachain() { Relay::execute_with(|| { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( - relay_chain::Origin::signed(ALICE), + relay_chain::RuntimeOrigin::signed(ALICE), Box::new(X1(Parachain(1)).into().into()), Box::new(VersionedMultiLocation::V1(dest)), Box::new((Here, amount).into()), @@ -1992,7 +1996,7 @@ fn receive_sufficient_relay_asset_on_parachain() { Relay::execute_with(|| { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( - relay_chain::Origin::signed(ALICE), + relay_chain::RuntimeOrigin::signed(ALICE), Box::new(X1(Parachain(1)).into().into()), Box::new(VersionedMultiLocation::V1(dest)), Box::new((Here, amount).into()), @@ -2157,7 +2161,7 @@ fn test_versioning_on_runtime_upgrade_with_relay() { Relay::execute_with(|| { // This sets the default version, for not known destinations assert_ok!(RelayChainPalletXcm::force_default_xcm_version( - relay_chain::Origin::root(), + relay_chain::RuntimeOrigin::root(), Some(2) )); @@ -2173,7 +2177,7 @@ fn test_versioning_on_runtime_upgrade_with_relay() { // Transfer assets. Since it is an unknown destination, it will query for version assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( - relay_chain::Origin::signed(ALICE), + relay_chain::RuntimeOrigin::signed(ALICE), Box::new(Parachain(PARA_A_ID).into().into()), Box::new(VersionedMultiLocation::V1(dest)), Box::new((Here, 123).into()), @@ -2187,7 +2191,7 @@ fn test_versioning_on_runtime_upgrade_with_relay() { assert!(RelayChainPalletXcm::query(0).is_some()); }); - let expected_supported_version: relay_chain::Event = + let expected_supported_version: relay_chain::RuntimeEvent = pallet_xcm::Event::SupportedVersionChanged( MultiLocation { parents: 0, @@ -2202,14 +2206,15 @@ fn test_versioning_on_runtime_upgrade_with_relay() { assert!(relay_chain::relay_events().contains(&expected_supported_version)); }); - let expected_version_notified: parachain::Event = pallet_xcm::Event::VersionChangeNotified( - MultiLocation { - parents: 1, - interior: Here, - }, - 2, - ) - .into(); + let expected_version_notified: parachain::RuntimeEvent = + pallet_xcm::Event::VersionChangeNotified( + MultiLocation { + parents: 1, + interior: Here, + }, + 2, + ) + .into(); // ParaA changes version to 2, and calls on_runtime_upgrade. This should notify the targets // of the new version change @@ -2225,7 +2230,7 @@ fn test_versioning_on_runtime_upgrade_with_relay() { }); // This event should have been seen in the relay - let expected_supported_version_2: relay_chain::Event = + let expected_supported_version_2: relay_chain::RuntimeEvent = pallet_xcm::Event::SupportedVersionChanged( MultiLocation { parents: 0, @@ -2299,7 +2304,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { ParaA::execute_with(|| { // This sets the default version, for not known destinations assert_ok!(ParachainPalletXcm::force_default_xcm_version( - parachain::Origin::root(), + parachain::RuntimeOrigin::root(), Some(2) )); // Wrap version, which sets VersionedStorage @@ -2314,14 +2319,15 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { assert!(ParachainPalletXcm::query(0).is_some()); }); - let expected_supported_version: parachain::Event = pallet_xcm::Event::SupportedVersionChanged( - MultiLocation { - parents: 1, - interior: X1(Parachain(PARA_B_ID)), - }, - 0, - ) - .into(); + let expected_supported_version: parachain::RuntimeEvent = + pallet_xcm::Event::SupportedVersionChanged( + MultiLocation { + parents: 1, + interior: X1(Parachain(PARA_B_ID)), + }, + 0, + ) + .into(); ParaA::execute_with(|| { // Assert that the events vector contains the version change @@ -2343,11 +2349,11 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { ParaA::execute_with(|| { // free execution, full amount received assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), 100, Box::new(VersionedMultiLocation::V1(dest)), - ADVERTISED_DEST_WEIGHT + WeightLimit::Limited(ADVERTISED_DEST_WEIGHT) )); // free execution, full amount received assert_eq!( @@ -2361,14 +2367,15 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { assert_eq!(parachain::Assets::balance(a_asset_id_on_b, &ALICE), 100); }); - let expected_version_notified: parachain::Event = pallet_xcm::Event::VersionChangeNotified( - MultiLocation { - parents: 1, - interior: X1(Parachain(PARA_A_ID)), - }, - 2, - ) - .into(); + let expected_version_notified: parachain::RuntimeEvent = + pallet_xcm::Event::VersionChangeNotified( + MultiLocation { + parents: 1, + interior: X1(Parachain(PARA_A_ID)), + }, + 2, + ) + .into(); // ParaB changes version to 2, and calls on_runtime_upgrade. This should notify the targets // of the new version change @@ -2384,7 +2391,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { }); // This event should have been seen in para A - let expected_supported_version_2: parachain::Event = + let expected_supported_version_2: parachain::RuntimeEvent = pallet_xcm::Event::SupportedVersionChanged( MultiLocation { parents: 1, @@ -2449,11 +2456,11 @@ fn filtered_multilocation_should_not_work() { ParaA::execute_with(|| { assert_noop!( parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), 100, Box::new(VersionedMultiLocation::V1(dest)), - 80 + WeightLimit::Limited(80) ), orml_xtokens::Error::::NotSupportedMultiLocation, ); @@ -2474,11 +2481,11 @@ fn filtered_multilocation_should_not_work() { ParaA::execute_with(|| { assert_noop!( parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), 100, Box::new(VersionedMultiLocation::V1(x3_dest)), - 80 + WeightLimit::Limited(80) ), orml_xtokens::Error::::NotSupportedMultiLocation, ); @@ -2495,11 +2502,11 @@ fn filtered_multilocation_should_not_work() { ParaA::execute_with(|| { assert_noop!( parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), 100, Box::new(VersionedMultiLocation::V1(parents_as_2_relay_dest)), - 80 + WeightLimit::Limited(80) ), orml_xtokens::Error::::NotSupportedMultiLocation, ); @@ -2519,11 +2526,11 @@ fn filtered_multilocation_should_not_work() { ParaA::execute_with(|| { assert_noop!( parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), 100, Box::new(VersionedMultiLocation::V1(parents_as_2_dest)), - 80 + WeightLimit::Limited(80) ), orml_xtokens::Error::::NotSupportedMultiLocation, ); @@ -2537,11 +2544,11 @@ fn filtered_multilocation_should_not_work() { ParaA::execute_with(|| { assert_noop!( parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), 100, Box::new(VersionedMultiLocation::V1(here_dest)), - 80 + WeightLimit::Limited(80) ), orml_xtokens::Error::::NotSupportedMultiLocation, ); @@ -2557,11 +2564,11 @@ fn filtered_multilocation_should_not_work() { }; ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), 100, Box::new(VersionedMultiLocation::V1(relay_dest)), - 80 + WeightLimit::Limited(80) )); }); @@ -2578,11 +2585,11 @@ fn filtered_multilocation_should_not_work() { }; ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), 100, Box::new(VersionedMultiLocation::V1(sibling_chain_dest)), - 80 + WeightLimit::Limited(80) )); }); } @@ -2648,7 +2655,7 @@ fn less_than_min_xcm_fee_should_not_work() { // Initialize some tokens for alice assert_ok!(ParaA::execute_with(|| { parachain::Assets::mint( - parachain::Origin::signed(parachain::AssetManager::account_id()), + parachain::RuntimeOrigin::signed(parachain::AssetManager::account_id()), b_asset_id_on_a, ALICE, 1000, @@ -2656,7 +2663,7 @@ fn less_than_min_xcm_fee_should_not_work() { })); assert_ok!(ParaA::execute_with(|| { parachain::Assets::mint( - parachain::Origin::signed(parachain::AssetManager::account_id()), + parachain::RuntimeOrigin::signed(parachain::AssetManager::account_id()), relay_asset_id_on_a, ALICE, 1000, @@ -2698,7 +2705,7 @@ fn less_than_min_xcm_fee_should_not_work() { ], 1, Box::new(VersionedMultiLocation::V1(dest.clone())), - 40, + WeightLimit::Limited(40), ), orml_xtokens::Error::::MinXcmFeeNotDefined ); @@ -2708,7 +2715,7 @@ fn less_than_min_xcm_fee_should_not_work() { let min_xcm_fee = 40; ParaA::execute_with(|| { assert_ok!(AssetManager::set_min_xcm_fee( - parachain::Origin::root(), + parachain::RuntimeOrigin::root(), para_b_as_reserve_chain, min_xcm_fee, )); @@ -2731,7 +2738,7 @@ fn less_than_min_xcm_fee_should_not_work() { ], 1, Box::new(VersionedMultiLocation::V1(dest.clone())), - 40, + WeightLimit::Limited(40), ), orml_xtokens::Error::::FeeNotEnough ); @@ -2753,7 +2760,7 @@ fn less_than_min_xcm_fee_should_not_work() { ], 1, Box::new(VersionedMultiLocation::V1(dest.clone())), - 40, + WeightLimit::Limited(40), )); }); } @@ -2822,7 +2829,7 @@ fn transfer_multicurrencies_should_work_scenarios() { // Initialize some relay chain tokens for alice assert_ok!(ParaA::execute_with(|| { parachain::Assets::mint( - parachain::Origin::signed(parachain::AssetManager::account_id()), + parachain::RuntimeOrigin::signed(parachain::AssetManager::account_id()), relay_asset_id_on_a, ALICE, relay_asset_amount_minted_on_a, @@ -2848,7 +2855,7 @@ fn transfer_multicurrencies_should_work_scenarios() { parachain::CurrencyId::MantaCurrency(b_asset_id_on_b), amount_to_a, Box::new(VersionedMultiLocation::V1(dest.clone())), - ADVERTISED_DEST_WEIGHT, + WeightLimit::Limited(ADVERTISED_DEST_WEIGHT), )); }); @@ -2869,7 +2876,7 @@ fn transfer_multicurrencies_should_work_scenarios() { // Send some ParaB tokens from Alice on A back to Alice on B ParaA::execute_with(|| { assert_ok!(AssetManager::set_min_xcm_fee( - parachain::Origin::root(), + parachain::RuntimeOrigin::root(), para_b_source_location, min_xcm_fee, )); @@ -2888,7 +2895,7 @@ fn transfer_multicurrencies_should_work_scenarios() { ], 1, Box::new(VersionedMultiLocation::V1(dest.clone())), - ADVERTISED_DEST_WEIGHT, + WeightLimit::Limited(ADVERTISED_DEST_WEIGHT), )); assert_eq!( @@ -3048,7 +3055,7 @@ fn transfer_multicurrencies_should_fail_scenarios() { let amount = 1000; assert_ok!(ParaA::execute_with(|| { parachain::Assets::mint( - parachain::Origin::signed(parachain::AssetManager::account_id()), + parachain::RuntimeOrigin::signed(parachain::AssetManager::account_id()), relay_asset_id_on_a, ALICE, amount, @@ -3071,7 +3078,7 @@ fn transfer_multicurrencies_should_fail_scenarios() { parachain::CurrencyId::MantaCurrency(c_asset_id_on_c), amount, Box::new(VersionedMultiLocation::V1(dest.clone())), - ADVERTISED_DEST_WEIGHT, + WeightLimit::Limited(ADVERTISED_DEST_WEIGHT), )); }); ParaB::execute_with(|| { @@ -3080,7 +3087,7 @@ fn transfer_multicurrencies_should_fail_scenarios() { parachain::CurrencyId::MantaCurrency(b_asset_id_on_b), amount, Box::new(VersionedMultiLocation::V1(dest)), - ADVERTISED_DEST_WEIGHT, + WeightLimit::Limited(ADVERTISED_DEST_WEIGHT), )); }); @@ -3101,12 +3108,12 @@ fn transfer_multicurrencies_should_fail_scenarios() { let min_xcm_fee = 10; ParaA::execute_with(|| { assert_ok!(AssetManager::set_min_xcm_fee( - parachain::Origin::root(), + parachain::RuntimeOrigin::root(), para_b_source_location.clone(), min_xcm_fee, )); assert_ok!(AssetManager::set_min_xcm_fee( - parachain::Origin::root(), + parachain::RuntimeOrigin::root(), para_c_source_location, min_xcm_fee, )); @@ -3130,7 +3137,7 @@ fn transfer_multicurrencies_should_fail_scenarios() { ], 2, Box::new(VersionedMultiLocation::V1(dest.clone())), - ADVERTISED_DEST_WEIGHT, + WeightLimit::Limited(ADVERTISED_DEST_WEIGHT), ), // Assets and fee must have the same reserve orml_xtokens::Error::::DistinctReserveForAssetAndFee @@ -3159,7 +3166,7 @@ fn transfer_multicurrencies_should_fail_scenarios() { ], 2, Box::new(VersionedMultiLocation::V1(dest.clone())), - ADVERTISED_DEST_WEIGHT, + WeightLimit::Limited(ADVERTISED_DEST_WEIGHT), ), // MaxAssetsForTransfer is set to 3 in the mock orml_xtokens::Error::::TooManyAssetsBeingSent @@ -3180,7 +3187,7 @@ fn transfer_multicurrencies_should_fail_scenarios() { ], 2, Box::new(VersionedMultiLocation::V1(dest.clone())), - ADVERTISED_DEST_WEIGHT, + WeightLimit::Limited(ADVERTISED_DEST_WEIGHT), ), orml_xtokens::Error::::AssetIndexNonExistent ); @@ -3197,7 +3204,7 @@ fn transfer_multicurrencies_should_fail_scenarios() { ], 1, Box::new(VersionedMultiLocation::V1(dest.clone())), - ADVERTISED_DEST_WEIGHT, + WeightLimit::Limited(ADVERTISED_DEST_WEIGHT), ), // 0 fees should not work orml_xtokens::Error::::ZeroAmount @@ -3215,7 +3222,7 @@ fn transfer_multicurrencies_should_fail_scenarios() { ], 1, Box::new(VersionedMultiLocation::V1(dest.clone())), - ADVERTISED_DEST_WEIGHT, + WeightLimit::Limited(ADVERTISED_DEST_WEIGHT), ), // 0 assets should not work orml_xtokens::Error::::ZeroAmount @@ -3230,7 +3237,7 @@ fn transfer_multicurrencies_should_fail_scenarios() { // Setup to succeed on the sender side, but fail on the receiver side due to not enough fees. ParaA::execute_with(|| { assert_ok!(AssetManager::set_min_xcm_fee( - parachain::Origin::root(), + parachain::RuntimeOrigin::root(), para_b_source_location, min_xcm_fee, )); @@ -3255,7 +3262,7 @@ fn transfer_multicurrencies_should_fail_scenarios() { ], 1, Box::new(VersionedMultiLocation::V1(dest.clone())), - ADVERTISED_DEST_WEIGHT, + WeightLimit::Limited(ADVERTISED_DEST_WEIGHT), )); assert_eq!( @@ -3315,13 +3322,13 @@ fn transfer_multicurrencies_should_fail_scenarios() { #[test] fn test_receiver_side_weight() { let weight = ::Weigher::weight( - &mut self_reserve_xcm_message_receiver_side::(), + &mut self_reserve_xcm_message_receiver_side::(), ) .unwrap(); assert!(weight <= ADVERTISED_DEST_WEIGHT); let weight = ::Weigher::weight( - &mut to_reserve_xcm_message_receiver_side::(), + &mut to_reserve_xcm_message_receiver_side::(), ) .unwrap(); assert!(weight <= ADVERTISED_DEST_WEIGHT); @@ -3329,12 +3336,12 @@ fn test_receiver_side_weight() { #[test] fn test_sender_side_xcm_weight() { - let mut msg = self_reserve_xcm_message_sender_side::(); + let mut msg = self_reserve_xcm_message_sender_side::(); let weight = ::Weigher::weight(&mut msg).unwrap(); assert!(weight < ADVERTISED_DEST_WEIGHT); - let mut msg = to_reserve_xcm_message_sender_side::(); + let mut msg = to_reserve_xcm_message_sender_side::(); let weight = ::Weigher::weight(&mut msg).unwrap(); assert!(weight < ADVERTISED_DEST_WEIGHT); diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index fdfe4bea4..58703163b 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -9,55 +9,55 @@ version = '4.0.7' [dependencies] # Substrate dependencies -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28", default-features = false } -pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28", default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28", default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28", default-features = false } -xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28", optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37", default-features = false } +pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37", default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37", default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37", default-features = false } +xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37", optional = true } # Self dependencies manta-primitives = { path = '../../primitives/manta', default-features = false } [dev-dependencies] lazy_static = "1.4.0" -reqwest = { version = "0.11", features = ["blocking"] } +reqwest = { version = "0.11.6", features = ["blocking"] } serde_json = "1.0" # 3rd dependencies -codec = { package = "parity-scale-codec", version = "3.1.2" } +codec = { package = "parity-scale-codec", version = "3.4.0" } scale-info = { version = "2.1.2", features = ["derive"] } # Substrate dependencies -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -pallet-utility = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +pallet-utility = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } # Polkadot dependencies -pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } -polkadot-core-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } -polkadot-runtime-parachains = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } -xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } -xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } -xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } -xcm-simulator = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } +pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } +polkadot-core-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } +polkadot-runtime-parachains = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } +xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } +xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } +xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } +xcm-simulator = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } # Cumulus dependencies -cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" } -cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" } -cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.28" } -cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.28" } -parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" } +cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.37" } +cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.37" } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.37" } +cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.37" } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.37" } +cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.37" } +parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.37" } # Orml dependencies -orml-traits = { git = "https://github.com/manta-network/open-runtime-module-library.git", branch = "polkadot-v0.9.28" } -orml-xtokens = { git = "https://github.com/manta-network/open-runtime-module-library.git", branch = "polkadot-v0.9.28" } +orml-traits = { git = "https://github.com/manta-network/open-runtime-module-library.git", branch = "polkadot-v0.9.37" } +orml-xtokens = { git = "https://github.com/manta-network/open-runtime-module-library.git", branch = "polkadot-v0.9.37" } # Self dependencies pallet-asset-manager = { path = '../../pallets/asset-manager' } diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 35bb47ffd..685c25c32 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -27,7 +27,7 @@ pub mod test_helpers; use frame_support::{parameter_types, weights::Weight}; use manta_primitives::{constants::WEIGHT_PER_NANOS, types::BlockNumber}; use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment}; -use sp_runtime::{FixedPointNumber, Perquintill}; +use sp_runtime::{traits::Bounded, FixedPointNumber, Perquintill}; // From https://github.com/paritytech/polkadot/pull/4332/files?diff=unified&w=1 @ runtime/common/src/lib.rs /// Macro to set a value (e.g. when using the `parameter_types` macro) to either a production value @@ -74,12 +74,18 @@ parameter_types! { /// that combined with `AdjustmentVariable`, we can recover from the minimum. /// See `multiplier_can_grow_from_zero`. pub MinimumMultiplier: Multiplier = Multiplier::saturating_from_rational(1, 5_000u128); + pub MaximumMultiplier: Multiplier = Bounded::max_value(); } /// Parameterized slow adjusting fee updated based on /// https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html#-2.-slow-adjusting-mechanism -pub type SlowAdjustingFeeUpdate = - TargetedFeeAdjustment; +pub type SlowAdjustingFeeUpdate = TargetedFeeAdjustment< + R, + TargetBlockFullness, + AdjustmentVariable, + MinimumMultiplier, + MaximumMultiplier, +>; parameter_types! { /// Time to execute an empty block. @@ -95,7 +101,7 @@ parameter_types! { /// 99th: 5_489_273 /// 95th: 5_433_314 /// 75th: 5_354_812 - pub const BlockExecutionWeight: Weight = 5_346_284 * WEIGHT_PER_NANOS; + pub const BlockExecutionWeight: Weight = Weight::from_ref_time(WEIGHT_PER_NANOS.saturating_mul(5_346_284)); } parameter_types! { @@ -112,7 +118,7 @@ parameter_types! { /// 99th: 86_924 /// 95th: 86_828 /// 75th: 86_347 - pub const ExtrinsicBaseWeight: Weight = 86_298 * WEIGHT_PER_NANOS; + pub const ExtrinsicBaseWeight: Weight = Weight::from_ref_time(WEIGHT_PER_NANOS.saturating_mul(98_974)); } #[cfg(test)] diff --git a/runtime/common/src/migration.rs b/runtime/common/src/migration.rs index a861d91a8..8a6150d55 100644 --- a/runtime/common/src/migration.rs +++ b/runtime/common/src/migration.rs @@ -28,7 +28,7 @@ use frame_support::{ #[cfg(feature = "try-runtime")] use frame_support::{ensure, traits::StorageVersion}; -use sp_std::marker::PhantomData; +use sp_std::{marker::PhantomData, vec::Vec}; /// MigratePalletPv2Sv means a wrapped handler to automatically upgrade our pallet /// from PalletVersion(Pv) to StorageVersion(Sv). @@ -48,17 +48,17 @@ where } #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result<(), &'static str> { + fn pre_upgrade() -> Result, &'static str> { let storage_version = StorageVersion::get::(); frame_support::debug(&"----PreUpgrade----"); frame_support::debug(&T::module_name()); frame_support::debug(&T::name()); frame_support::debug(&storage_version); - Ok(()) + Ok(Vec::new()) } #[cfg(feature = "try-runtime")] - fn post_upgrade() -> Result<(), &'static str> { + fn post_upgrade(_state: Vec) -> Result<(), &'static str> { let storage_version = StorageVersion::get::(); frame_support::debug(&"----PostUpgrade----"); frame_support::debug(&T::module_name()); @@ -145,7 +145,7 @@ mod test { StorageVersion::new(0) ); let weight = MigratePalletPv2Sv::::on_runtime_upgrade(); - assert_eq!(100_000 * 1000 * 2, weight); + assert_eq!(Weight::from_ref_time(100_000 * 1000 * 2), weight); assert!( sp_io::storage::get(&pallet_version_key(MockForMigrationTesting::name())).is_none() ); diff --git a/runtime/dolphin/Cargo.toml b/runtime/dolphin/Cargo.toml index 787b753cf..2f7e0049a 100644 --- a/runtime/dolphin/Cargo.toml +++ b/runtime/dolphin/Cargo.toml @@ -8,7 +8,7 @@ repository = 'https://github.com/Manta-Network/Manta/' version = '4.0.7' [dependencies] -codec = { package = "parity-scale-codec", version = '3.1.2', default-features = false, features = ["derive", "max-encoded-len"] } +codec = { package = "parity-scale-codec", version = '3.4.0', default-features = false, features = ["derive", "max-encoded-len"] } hex-literal = { version = '0.3.4', optional = true } log = { version = "0.4.16", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } @@ -16,73 +16,77 @@ serde = { version = "1.0.140", features = ['derive'], optional = true } smallvec = "1.8.0" # Substrate primitives -sp-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-application-crypto = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-arithmetic = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-inherents = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-io = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-offchain = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-version = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } +sp-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-application-crypto = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-arithmetic = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-core = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-inherents = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-io = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-offchain = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-version = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } # Substrate frames -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.28" } -frame-executive = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.28" } -frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -frame-try-runtime = { git = "https://github.com/paritytech/substrate.git", default-features = false, optional = true, branch = "polkadot-v0.9.28" } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.37" } +frame-executive = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.37" } +frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +frame-try-runtime = { git = "https://github.com/paritytech/substrate.git", default-features = false, optional = true, branch = "polkadot-v0.9.37" } # Substrate pallets -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-collective = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" } -pallet-democracy = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" } -pallet-membership = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" } -pallet-multisig = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-preimage = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" } -pallet-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-sudo = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-treasury = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" } -pallet-utility = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-collective = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.37" } +pallet-democracy = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.37" } +pallet-membership = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.37" } +pallet-multisig = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-preimage = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.37" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.37" } +pallet-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-sudo = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-treasury = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.37" } +pallet-utility = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } + +pallet-conviction-voting = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false } +pallet-ranked-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false } +pallet-referenda = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false } # Cumulus dependencies -cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } -cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } -cumulus-pallet-session-benchmarking = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, optional = true, branch = "polkadot-v0.9.28" } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } -cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } -cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } -cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } -cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } -parachain-info = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } +cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } +cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } +cumulus-pallet-session-benchmarking = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, optional = true, branch = "polkadot-v0.9.37" } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } +cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } +cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } +cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } +cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } +parachain-info = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } # Nimbus Dependencies -nimbus-primitives = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.1", default-features = false } -pallet-aura-style-filter = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.1", default-features = false } -pallet-author-inherent = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.1", default-features = false } +nimbus-primitives = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.7", default-features = false } +pallet-aura-style-filter = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.7", default-features = false } +pallet-author-inherent = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.7", default-features = false } # Polkadot dependencies -pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" } -pallet-xcm-benchmarks = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28", optional = true } -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" } -polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" } -xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" } -xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" } -xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" } +pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37" } +pallet-xcm-benchmarks = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37", optional = true } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37" } +polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37" } +xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37" } +xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37" } +xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37" } # Self dependencies manta-collator-selection = { path = '../../pallets/collator-selection', default-features = false } @@ -96,14 +100,14 @@ runtime-common = { path = '../common', default-features = false } session-key-primitives = { path = '../../primitives/session-keys', default-features = false } # Third party (vendored) dependencies -orml-traits = { git = 'https://github.com/manta-network/open-runtime-module-library.git', default-features = false, branch = "polkadot-v0.9.28" } -orml-xtokens = { git = 'https://github.com/manta-network/open-runtime-module-library.git', default-features = false, branch = "polkadot-v0.9.28" } +orml-traits = { git = 'https://github.com/manta-network/open-runtime-module-library.git', default-features = false, branch = "polkadot-v0.9.37" } +orml-xtokens = { git = 'https://github.com/manta-network/open-runtime-module-library.git', default-features = false, branch = "polkadot-v0.9.37" } [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] [build-dependencies] -substrate-wasm-builder = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } +substrate-wasm-builder = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } [features] default = ['std'] @@ -112,12 +116,13 @@ runtime-benchmarks = [ 'hex-literal', 'sp-runtime/runtime-benchmarks', 'xcm-builder/runtime-benchmarks', - 'frame-benchmarking', - 'frame-system-benchmarking', + 'frame-benchmarking/runtime-benchmarks', + 'frame-system-benchmarking/runtime-benchmarks', 'frame-support/runtime-benchmarks', 'frame-system/runtime-benchmarks', 'manta-collator-selection/runtime-benchmarks', 'nimbus-primitives/runtime-benchmarks', + 'pallet-aura-style-filter/runtime-benchmarks', 'pallet-author-inherent/runtime-benchmarks', 'pallet-balances/runtime-benchmarks', 'pallet-multisig/runtime-benchmarks', @@ -137,9 +142,13 @@ runtime-benchmarks = [ 'pallet-asset-manager/runtime-benchmarks', 'cumulus-pallet-xcmp-queue/runtime-benchmarks', 'cumulus-pallet-parachain-system/runtime-benchmarks', - 'pallet-xcm-benchmarks', + 'pallet-xcm-benchmarks/runtime-benchmarks', + 'pallet-ranked-collective/runtime-benchmarks', + 'pallet-referenda/runtime-benchmarks', + 'pallet-conviction-voting/runtime-benchmarks', ] try-runtime = [ + "frame-support/try-runtime", 'frame-executive/try-runtime', 'frame-try-runtime', 'frame-system/try-runtime', @@ -159,7 +168,20 @@ try-runtime = [ 'pallet-treasury/try-runtime', 'pallet-assets/try-runtime', 'pallet-tx-pause/try-runtime', + 'pallet-xcm/try-runtime', 'pallet-asset-manager/try-runtime', + 'parachain-info/try-runtime', + 'cumulus-pallet-parachain-system/try-runtime', + 'cumulus-pallet-xcmp-queue/try-runtime', + 'cumulus-pallet-dmp-queue/try-runtime', + 'pallet-aura-style-filter/try-runtime', + 'pallet-author-inherent/try-runtime', + 'manta-collator-selection/try-runtime', + 'cumulus-pallet-xcm/try-runtime', + 'orml-xtokens/try-runtime', + 'pallet-manta-pay/try-runtime', + 'pallet-manta-sbt/try-runtime', + 'pallet-sudo/try-runtime', ] # Set timing constants (e.g. session period) to faster versions to speed up testing. fast-runtime = [] @@ -185,6 +207,7 @@ std = [ 'frame-system/std', 'frame-system-rpc-runtime-api/std', 'frame-try-runtime/std', + 'frame-system-benchmarking/std', 'pallet-authorship/std', 'pallet-balances/std', 'pallet-multisig/std', @@ -212,6 +235,9 @@ std = [ "cumulus-primitives-utility/std", "pallet-author-inherent/std", "pallet-aura-style-filter/std", + 'pallet-ranked-collective/std', + 'pallet-referenda/std', + 'pallet-conviction-voting/std', 'session-key-primitives/std', 'xcm/std', 'sp-application-crypto/std', diff --git a/runtime/dolphin/src/assets_config.rs b/runtime/dolphin/src/assets_config.rs index 89d2770e2..b68cc73b2 100644 --- a/runtime/dolphin/src/assets_config.rs +++ b/runtime/dolphin/src/assets_config.rs @@ -15,8 +15,9 @@ // along with Manta. If not, see . use super::{ - weights, xcm_config::SelfReserve, AssetManager, Assets, Balances, Event, - NativeTokenExistentialDeposit, Origin, Runtime, TechnicalCollective, Timestamp, DOL, + weights, xcm_config::SelfReserve, AssetManager, Assets, Balances, + NativeTokenExistentialDeposit, Runtime, RuntimeEvent, RuntimeOrigin, TechnicalCollective, + Timestamp, DOL, }; use manta_primitives::{ @@ -34,7 +35,8 @@ use manta_primitives::{ use frame_support::{ pallet_prelude::DispatchResult, parameter_types, - traits::{ConstU128, ConstU16, ConstU32, ConstU64, EitherOfDiverse}, + traits::{AsEnsureOriginWithArg, ConstU128, ConstU16, ConstU32, EitherOfDiverse}, + weights::Weight, PalletId, }; use frame_system::EnsureRoot; @@ -50,7 +52,7 @@ parameter_types! { } impl pallet_assets::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = DolphinAssetId; type Currency = Balances; @@ -64,6 +66,15 @@ impl pallet_assets::Config for Runtime { type Freezer = (); type Extra = (); type WeightInfo = weights::pallet_assets::SubstrateWeight; + type RemoveItemsLimit = ConstU32<1000>; + type AssetIdParameter = DolphinAssetId; + #[cfg(feature = "runtime-benchmarks")] + type CreateOrigin = AsEnsureOriginWithArg>; + #[cfg(not(feature = "runtime-benchmarks"))] + type CreateOrigin = AsEnsureOriginWithArg>; + type CallbackHandle = (); + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); } pub struct MantaAssetRegistry; @@ -84,7 +95,7 @@ impl AssetRegistry for MantaAssetRegistry { is_sufficient: bool, ) -> DispatchResult { Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), asset_id, sp_runtime::MultiAddress::Id(AssetManager::account_id()), is_sufficient, @@ -92,7 +103,7 @@ impl AssetRegistry for MantaAssetRegistry { )?; Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), asset_id, metadata.name, metadata.symbol, @@ -101,7 +112,7 @@ impl AssetRegistry for MantaAssetRegistry { )?; Assets::force_asset_status( - Origin::root(), + RuntimeOrigin::root(), asset_id, AssetManager::account_id().into(), AssetManager::account_id().into(), @@ -118,7 +129,7 @@ impl AssetRegistry for MantaAssetRegistry { metadata: AssetStorageMetadata, ) -> DispatchResult { Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), *asset_id, metadata.name, metadata.symbol, @@ -173,7 +184,7 @@ impl AssetConfig for DolphinAssetConfig { } impl pallet_asset_manager::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AssetId = DolphinAssetId; type Balance = Balance; type Location = AssetLocation; @@ -188,7 +199,7 @@ parameter_types! { } impl pallet_manta_pay::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_manta_pay::SubstrateWeight; type AssetConfig = DolphinAssetConfig; type PalletId = MantaPayPalletId; @@ -196,10 +207,11 @@ impl pallet_manta_pay::Config for Runtime { parameter_types! { pub const MantaSbtPalletId: PalletId = MANTA_SBT_PALLET_ID; + pub const MinimumWeightRemainInBlock: Weight = Weight::from_ref_time(25 * WEIGHT_PER_MILLIS); } impl pallet_manta_sbt::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type PalletId = MantaSbtPalletId; type Currency = Balances; type MintsPerReserve = ConstU16<5>; @@ -210,7 +222,7 @@ impl pallet_manta_sbt::Config for Runtime { pallet_collective::EnsureMembers, >; type Now = Timestamp; - type MinimumWeightRemainInBlock = ConstU64<{ 25 * WEIGHT_PER_MILLIS }>; + type MinimumWeightRemainInBlock = MinimumWeightRemainInBlock; type RegistryBound = ConstU32<300>; type WeightInfo = (); } diff --git a/runtime/dolphin/src/lib.rs b/runtime/dolphin/src/lib.rs index 3d66728da..5779e6547 100644 --- a/runtime/dolphin/src/lib.rs +++ b/runtime/dolphin/src/lib.rs @@ -40,12 +40,14 @@ use sp_version::NativeVersion; use sp_version::RuntimeVersion; use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, + dispatch::DispatchClass, + parameter_types, traits::{ - ConstU16, ConstU32, ConstU8, Contains, Currency, EitherOfDiverse, IsInVec, - NeverEnsureOrigin, PrivilegeCmp, + ConstU32, ConstU8, Contains, Currency, EitherOfDiverse, IsInVec, NeverEnsureOrigin, + PrivilegeCmp, }, - weights::{ConstantMultiplier, DispatchClass, Weight}, + weights::{ConstantMultiplier, Weight}, PalletId, }; use frame_system::{ @@ -149,7 +151,9 @@ pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(70); /// We allow for 0.5 seconds of compute with a 6 second average block time. -pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2; +pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_ref_time(WEIGHT_PER_SECOND) + .saturating_div(2) + .set_proof_size(cumulus_primitives_core::relay_chain::v2::MAX_POV_SIZE as u64); parameter_types! { pub const Version: RuntimeVersion = VERSION; @@ -181,8 +185,8 @@ parameter_types! { } impl pallet_tx_pause::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type MaxCallNames = ConstU32<25>; type PauseOrigin = EitherOfDiverse< EnsureRoot, @@ -195,11 +199,11 @@ impl pallet_tx_pause::Config for Runtime { // Don't allow permission-less asset creation. pub struct BaseFilter; -impl Contains for BaseFilter { - fn contains(call: &Call) -> bool { +impl Contains for BaseFilter { + fn contains(call: &RuntimeCall) -> bool { if matches!( call, - Call::Timestamp(_) | Call::ParachainSystem(_) | Call::System(_) + RuntimeCall::Timestamp(_) | RuntimeCall::ParachainSystem(_) | RuntimeCall::System(_) ) { // always allow core call // pallet-timestamp and parachainSystem could not be filtered because @@ -216,63 +220,56 @@ impl Contains for BaseFilter { // keep CallFilter with explicit true/false for documentation match call { // Explicitly DISALLOWED calls - | Call::Assets(_) // Filter Assets. Assets should only be accessed by AssetManager. - | Call::AssetManager(_) // AssetManager is also filtered because all of its extrinsics + | RuntimeCall::Assets(_) // Filter Assets. Assets should only be accessed by AssetManager. + | RuntimeCall::AssetManager(_) // AssetManager is also filtered because all of its extrinsics // are callable only by Root, and Root calls skip this whole filter. // Currently, we filter `register_as_candidate` as this call is not yet ready for community. - | Call::CollatorSelection( manta_collator_selection::Call::register_as_candidate{..}) + | RuntimeCall::CollatorSelection( manta_collator_selection::Call::register_as_candidate{..}) // For now disallow public proposal workflows, treasury workflows, // as well as external_propose and external_propose_majority. // The following are filtered out: - | Call::Democracy( + | RuntimeCall::Democracy( pallet_democracy::Call::propose {..} | pallet_democracy::Call::second {..} | pallet_democracy::Call::cancel_proposal {..} | pallet_democracy::Call::clear_public_proposals {..} | pallet_democracy::Call::external_propose {..} | pallet_democracy::Call::external_propose_majority {..}) - | Call::Treasury(_) // Treasury calls are filtered while it is accumulating funds. + | RuntimeCall::Treasury(_) // Treasury calls are filtered while it is accumulating funds. // Everything except transfer() is filtered out until it is practically needed: - | Call::XTokens( + | RuntimeCall::XTokens( orml_xtokens::Call::transfer_with_fee {..} | orml_xtokens::Call::transfer_multiasset {..} | orml_xtokens::Call::transfer_multiasset_with_fee {..} | orml_xtokens::Call::transfer_multiassets {..}) // Everything except transfer() is filtered out until it is practically needed: - | Call::XcmpQueue(_) | Call::PolkadotXcm(_) | Call::DmpQueue(_) => false, + | RuntimeCall::XcmpQueue(_) | RuntimeCall::PolkadotXcm(_) | RuntimeCall::DmpQueue(_) => false, // Explicitly ALLOWED calls - | Call::Authorship(_) + | RuntimeCall::Authorship(_) // Sudo also cannot be filtered because it is used in runtime upgrade. - | Call::Sudo(_) - | Call::Multisig(_) - | Call::Democracy(pallet_democracy::Call::vote {..} + | RuntimeCall::Sudo(_) + | RuntimeCall::Multisig(_) + | RuntimeCall::Democracy(pallet_democracy::Call::vote {..} | pallet_democracy::Call::emergency_cancel {..} | pallet_democracy::Call::external_propose_default {..} | pallet_democracy::Call::fast_track {..} | pallet_democracy::Call::veto_external {..} | pallet_democracy::Call::cancel_referendum {..} - | pallet_democracy::Call::cancel_queued {..} | pallet_democracy::Call::delegate {..} | pallet_democracy::Call::undelegate {..} - | pallet_democracy::Call::note_preimage {..} - | pallet_democracy::Call::note_preimage_operational {..} - | pallet_democracy::Call::note_imminent_preimage {..} - | pallet_democracy::Call::note_imminent_preimage_operational {..} - | pallet_democracy::Call::reap_preimage {..} | pallet_democracy::Call::unlock {..} | pallet_democracy::Call::remove_vote {..} | pallet_democracy::Call::remove_other_vote {..} - | pallet_democracy::Call::enact_proposal {..} | pallet_democracy::Call::blacklist {..}) - | Call::Council(_) - | Call::TechnicalCommittee(_) - | Call::CouncilMembership(_) - | Call::TechnicalMembership(_) - | Call::Scheduler(_) - | Call::Session(_) // User must be able to set their session key when applying for a collator - | Call::AuthorInherent(pallet_author_inherent::Call::kick_off_authorship_validation {..}) // executes unsigned on every block - | Call::CollatorSelection( + | RuntimeCall::Council(_) + | RuntimeCall::TechnicalCommittee(_) + | RuntimeCall::CouncilMembership(_) + | RuntimeCall::TechnicalMembership(_) + | RuntimeCall::Scheduler(_) + | RuntimeCall::Session(_) // User must be able to set their session key when applying for a collator + | RuntimeCall::AuthorInherent(pallet_author_inherent::Call::kick_off_authorship_validation {..}) // executes unsigned on every block + | RuntimeCall::CollatorSelection( manta_collator_selection::Call::set_invulnerables{..} | manta_collator_selection::Call::set_desired_candidates{..} | manta_collator_selection::Call::set_candidacy_bond{..} @@ -281,14 +278,14 @@ impl Contains for BaseFilter { | manta_collator_selection::Call::register_candidate{..} | manta_collator_selection::Call::remove_collator{..} | manta_collator_selection::Call::leave_intent{..}) - | Call::Balances(_) - | Call::XTokens(orml_xtokens::Call::transfer {..} + | RuntimeCall::Balances(_) + | RuntimeCall::XTokens(orml_xtokens::Call::transfer {..} | orml_xtokens::Call::transfer_multicurrencies {..}) - | Call::MantaPay(_) - | Call::Preimage(_) - | Call::MantaSbt(_) - | Call::TransactionPause(_) - | Call::Utility(_) => true, + | RuntimeCall::MantaPay(_) + | RuntimeCall::Preimage(_) + | RuntimeCall::MantaSbt(_) + | RuntimeCall::TransactionPause(_) + | RuntimeCall::Utility(_) => true, // DISALLOW anything else _ => false, @@ -302,15 +299,15 @@ impl frame_system::Config for Runtime { type BlockWeights = RuntimeBlockWeights; type BlockLength = RuntimeBlockLength; type AccountId = AccountId; - type Call = Call; + type RuntimeCall = RuntimeCall; type Lookup = AccountIdLookup; type Index = Index; type BlockNumber = BlockNumber; type Hash = Hash; type Hashing = BlakeTwo256; type Header = Header; - type Event = Event; - type Origin = Origin; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; type BlockHashCount = BlockHashCount; type DbWeight = RocksDbWeight; type Version = Version; @@ -352,7 +349,7 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type Balance = Balance; type DustRemoval = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = NativeTokenExistentialDeposit; type AccountStore = frame_system::Pallet; type WeightInfo = weights::pallet_balances::SubstrateWeight; @@ -370,7 +367,7 @@ impl pallet_transaction_payment::Config for Runtime { type LengthToFee = ConstantMultiplier; type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; type OperationalFeeMultiplier = ConstU8<5>; - type Event = Event; + type RuntimeEvent = RuntimeEvent; } parameter_types! { @@ -381,25 +378,25 @@ parameter_types! { } impl pallet_multisig::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Currency = Balances; type DepositBase = DepositBase; type DepositFactor = DepositFactor; - type MaxSignatories = ConstU16<100>; + type MaxSignatories = ConstU32<100>; type WeightInfo = weights::pallet_multisig::SubstrateWeight; } impl pallet_utility::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type PalletsOrigin = OriginCaller; type WeightInfo = weights::pallet_utility::SubstrateWeight; } impl pallet_sudo::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; } parameter_types! { @@ -414,8 +411,7 @@ parameter_types! { } impl pallet_democracy::Config for Runtime { - type Proposal = Call; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type EnactmentPeriod = EnactmentPeriod; type VoteLockingPeriod = EnactmentPeriod; @@ -454,14 +450,15 @@ impl pallet_democracy::Config for Runtime { // only do it once and it lasts only for the cool-off period. type VetoOrigin = pallet_collective::EnsureMember; type CooloffPeriod = CooloffPeriod; - type PreimageByteDeposit = PreimageByteDeposit; - type OperationalPreimageOrigin = pallet_collective::EnsureMember; type Slash = (); type Scheduler = Scheduler; type PalletsOrigin = OriginCaller; type MaxVotes = ConstU32<100>; type WeightInfo = weights::pallet_democracy::SubstrateWeight; type MaxProposals = ConstU32<100>; + type Preimages = Preimage; + type MaxDeposits = ConstU32<100>; + type MaxBlacklisted = ConstU32<100>; } parameter_types! { @@ -472,9 +469,9 @@ parameter_types! { type CouncilCollective = pallet_collective::Instance1; impl pallet_collective::Config for Runtime { - type Origin = Origin; - type Proposal = Call; - type Event = Event; + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; type MotionDuration = CouncilMotionDuration; type MaxProposals = ConstU32<100>; type MaxMembers = ConstU32<100>; @@ -489,7 +486,7 @@ pub type EnsureRootOrThreeFourthsCouncil = EitherOfDiverse< type CouncilMembershipInstance = pallet_membership::Instance1; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrThreeFourthsCouncil; type RemoveOrigin = EnsureRootOrThreeFourthsCouncil; type SwapOrigin = EnsureRootOrThreeFourthsCouncil; @@ -507,9 +504,9 @@ parameter_types! { type TechnicalCollective = pallet_collective::Instance2; impl pallet_collective::Config for Runtime { - type Origin = Origin; - type Proposal = Call; - type Event = Event; + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; type MotionDuration = TechnicalMotionDuration; type MaxProposals = ConstU32<100>; type MaxMembers = ConstU32<100>; @@ -519,7 +516,7 @@ impl pallet_collective::Config for Runtime { type TechnicalMembershipInstance = pallet_membership::Instance2; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrThreeFourthsCouncil; type RemoveOrigin = EnsureRootOrThreeFourthsCouncil; type SwapOrigin = EnsureRootOrThreeFourthsCouncil; @@ -555,7 +552,7 @@ impl pallet_treasury::Config for Runtime { type Currency = Balances; type ApproveOrigin = EnsureRootOrThreeFifthsCouncil; type RejectOrigin = EnsureRootOrMoreThanHalfCouncil; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnSlash = Treasury; type ProposalBond = ProposalBond; type ProposalBondMinimum = ProposalBondMinimum; @@ -618,17 +615,16 @@ impl PrivilegeCmp for OriginPrivilegeCmp { } impl pallet_scheduler::Config for Runtime { - type Event = Event; - type Origin = Origin; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; type PalletsOrigin = OriginCaller; - type Call = Call; + type RuntimeCall = RuntimeCall; type MaximumWeight = MaximumSchedulerWeight; type ScheduleOrigin = ScheduleOrigin; type MaxScheduledPerBlock = ConstU32<50>; // 50 scheduled calls at most in the queue for a single block. type WeightInfo = weights::pallet_scheduler::SubstrateWeight; type OriginPrivilegeCmp = OriginPrivilegeCmp; - type PreimageProvider = Preimage; - type NoPreimagePostponement = NoPreimagePostponement; + type Preimages = Preimage; } parameter_types! { @@ -640,10 +636,9 @@ parameter_types! { impl pallet_preimage::Config for Runtime { type WeightInfo = weights::pallet_preimage::SubstrateWeight; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type ManagerOrigin = EnsureRoot; - type MaxSize = PreimageMaxSize; // The sum of the below 2 amounts will get reserved every time someone submits a preimage. // Their sum will be unreserved when the preimage is requested, i.e. when it is going to be used. type BaseDeposit = PreimageBaseDeposit; @@ -657,7 +652,7 @@ parameter_types! { } impl pallet_session::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorId = ::AccountId; // we don't have stash and controller, thus we don't need the convert as well. type ValidatorIdOf = IdentityCollator; @@ -692,7 +687,7 @@ pub type CollatorSelectionUpdateOrigin = EitherOfDiverse< >; impl manta_collator_selection::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type UpdateOrigin = CollatorSelectionUpdateOrigin; type PotId = PotId; @@ -792,9 +787,10 @@ pub type SignedExtra = ( pallet_transaction_payment::ChargeTransactionPayment, ); /// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic; /// Extrinsic type that has already been checked. -pub type CheckedExtrinsic = generic::CheckedExtrinsic; +pub type CheckedExtrinsic = generic::CheckedExtrinsic; /// Types for runtime upgrading. /// Each type should implement trait `OnRuntimeUpgrade`. @@ -806,7 +802,7 @@ pub type Executive = frame_executive::Executive< Block, frame_system::ChainContext, Runtime, - AllPalletsReversedWithSystemFirst, + AllPalletsWithSystem, OnRuntimeUpgradeHooks, >; @@ -949,17 +945,17 @@ impl_runtime_apis! { } } - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi for Runtime { fn query_call_info( - call: Call, + call: RuntimeCall, len: u32, ) -> pallet_transaction_payment::RuntimeDispatchInfo { TransactionPayment::query_call_info(call, len) } fn query_call_fee_details( - call: Call, + call: RuntimeCall, len: u32, ) -> pallet_transaction_payment::FeeDetails { TransactionPayment::query_call_fee_details(call, len) @@ -1006,13 +1002,18 @@ impl_runtime_apis! { #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { - fn on_runtime_upgrade() -> (Weight, Weight) { - let weight = Executive::try_runtime_upgrade().unwrap(); + fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { + let weight = Executive::try_runtime_upgrade(checks).unwrap(); (weight, RuntimeBlockWeights::get().max_block) } - fn execute_block_no_check(block: Block) -> Weight { - Executive::execute_block_no_check(block) + fn execute_block( + block: Block, + state_root_check: bool, + signature_check: bool, + select: frame_try_runtime::TryStateSelect + ) -> Weight { + Executive::try_execute_block(block, state_root_check, signature_check, select).expect("try_execute_block failed") } } @@ -1030,7 +1031,7 @@ impl_runtime_apis! { let mut list = Vec::::new(); list_benchmarks!(list, extra); - let storage_info = AllPalletsReversedWithSystemFirst::storage_info(); + let storage_info = AllPalletsWithSystem::storage_info(); (list, storage_info) } @@ -1112,7 +1113,7 @@ impl_runtime_apis! { } impl pallet_xcm_benchmarks::generic::Config for Runtime { - type Call = Call; + type RuntimeCall = RuntimeCall; fn worst_case_response() -> (u64, Response) { (0u64, Response::Version(Default::default())) diff --git a/runtime/dolphin/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/dolphin/src/weights/cumulus_pallet_xcmp_queue.rs index 69ca99559..e2095cfcf 100644 --- a/runtime/dolphin/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/dolphin/src/weights/cumulus_pallet_xcmp_queue.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for cumulus_pallet_xcmp_queue //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024 // Executed Command: @@ -40,8 +40,9 @@ #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; +use manta_primitives::constants::RocksDbWeight; /// Weight functions needed for cumulus_pallet_xcmp_queue. pub trait WeightInfo { @@ -52,32 +53,36 @@ pub trait WeightInfo { /// Weights for cumulus_pallet_xcmp_queue using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl cumulus_pallet_xcmp_queue::WeightInfo for SubstrateWeight { - // Storage: XcmpQueue QueueConfig (r:1 w:1) - fn set_config_with_u32() -> Weight { - (6_025_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: XcmpQueue QueueConfig (r:1 w:1) - fn set_config_with_weight() -> Weight { - (6_029_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } + // Storage: XcmpQueue QueueConfig (r:1 w:1) + fn set_config_with_u32() -> Weight { + // Minimum execution time: 7_151 nanoseconds. + Weight::from_ref_time(7_356_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: XcmpQueue QueueConfig (r:1 w:1) + fn set_config_with_weight() -> Weight { + // Minimum execution time: 7_115 nanoseconds. + Weight::from_ref_time(7_253_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: XcmpQueue QueueConfig (r:1 w:1) - fn set_config_with_u32() -> Weight { - (6_025_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: XcmpQueue QueueConfig (r:1 w:1) - fn set_config_with_weight() -> Weight { - (6_029_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } + // Storage: XcmpQueue QueueConfig (r:1 w:1) + fn set_config_with_u32() -> Weight { + // Minimum execution time: 7_151 nanoseconds. + Weight::from_ref_time(7_356_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: XcmpQueue QueueConfig (r:1 w:1) + fn set_config_with_weight() -> Weight { + // Minimum execution time: 7_115 nanoseconds. + Weight::from_ref_time(7_253_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } } diff --git a/runtime/dolphin/src/weights/frame_system.rs b/runtime/dolphin/src/weights/frame_system.rs index 4ae1dce8a..967d6bd03 100644 --- a/runtime/dolphin/src/weights/frame_system.rs +++ b/runtime/dolphin/src/weights/frame_system.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for frame_system //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024 // Executed Command: @@ -40,8 +40,9 @@ #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; +use manta_primitives::constants::RocksDbWeight; /// Weight functions needed for frame_system. pub trait WeightInfo { @@ -56,84 +57,106 @@ pub trait WeightInfo { /// Weights for frame_system using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl frame_system::WeightInfo for SubstrateWeight { - fn remark(b: u32, ) -> Weight { - (5_067_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) - } - fn remark_with_event(b: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) - } - // Storage: System Digest (r:1 w:1) - // Storage: unknown [0x3a686561707061676573] (r:0 w:1) - fn set_heap_pages() -> Weight { - (6_307_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Skipped Metadata (r:0 w:0) - fn set_storage(i: u32, ) -> Weight { - (1_947_000 as Weight) - // Standard Error: 1_000 - .saturating_add((702_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) - } - // Storage: Skipped Metadata (r:0 w:0) - fn kill_storage(i: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 1_000 - .saturating_add((586_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) - } - // Storage: Skipped Metadata (r:0 w:0) - fn kill_prefix(p: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 1_000 - .saturating_add((1_229_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) - } + /// The range of component `b` is `[0, 3670016]`. + fn remark(b: u32, ) -> Weight { + // Minimum execution time: 3_752 nanoseconds. + Weight::from_ref_time(42_655_264) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(452).saturating_mul(b.into())) + } + /// The range of component `b` is `[0, 3670016]`. + fn remark_with_event(b: u32, ) -> Weight { + // Minimum execution time: 13_986 nanoseconds. + Weight::from_ref_time(12_731_045) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(2_035).saturating_mul(b.into())) + } + // Storage: System Digest (r:1 w:1) + // Storage: unknown [0x3a686561707061676573] (r:0 w:1) + fn set_heap_pages() -> Weight { + // Minimum execution time: 8_931 nanoseconds. + Weight::from_ref_time(9_224_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[0, 1000]`. + fn set_storage(i: u32, ) -> Weight { + // Minimum execution time: 3_997 nanoseconds. + Weight::from_ref_time(4_084_000) + // Standard Error: 2_161 + .saturating_add(Weight::from_ref_time(715_426).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[0, 1000]`. + fn kill_storage(i: u32, ) -> Weight { + // Minimum execution time: 4_018 nanoseconds. + Weight::from_ref_time(4_143_000) + // Standard Error: 831 + .saturating_add(Weight::from_ref_time(519_031).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `p` is `[0, 1000]`. + fn kill_prefix(p: u32, ) -> Weight { + // Minimum execution time: 17_447 nanoseconds. + Weight::from_ref_time(17_836_000) + // Standard Error: 1_367 + .saturating_add(Weight::from_ref_time(1_125_803).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + } } // For backwards compatibility and tests impl WeightInfo for () { - fn remark(b: u32, ) -> Weight { - (5_067_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) - } - fn remark_with_event(b: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) - } - // Storage: System Digest (r:1 w:1) - // Storage: unknown [0x3a686561707061676573] (r:0 w:1) - fn set_heap_pages() -> Weight { - (6_307_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Skipped Metadata (r:0 w:0) - fn set_storage(i: u32, ) -> Weight { - (1_947_000 as Weight) - // Standard Error: 1_000 - .saturating_add((702_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) - } - // Storage: Skipped Metadata (r:0 w:0) - fn kill_storage(i: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 1_000 - .saturating_add((586_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) - } - // Storage: Skipped Metadata (r:0 w:0) - fn kill_prefix(p: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 1_000 - .saturating_add((1_229_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) - } + /// The range of component `b` is `[0, 3670016]`. + fn remark(b: u32, ) -> Weight { + // Minimum execution time: 3_752 nanoseconds. + Weight::from_ref_time(42_655_264) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(452).saturating_mul(b.into())) + } + /// The range of component `b` is `[0, 3670016]`. + fn remark_with_event(b: u32, ) -> Weight { + // Minimum execution time: 13_986 nanoseconds. + Weight::from_ref_time(12_731_045) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(2_035).saturating_mul(b.into())) + } + // Storage: System Digest (r:1 w:1) + // Storage: unknown [0x3a686561707061676573] (r:0 w:1) + fn set_heap_pages() -> Weight { + // Minimum execution time: 8_931 nanoseconds. + Weight::from_ref_time(9_224_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[0, 1000]`. + fn set_storage(i: u32, ) -> Weight { + // Minimum execution time: 3_997 nanoseconds. + Weight::from_ref_time(4_084_000) + // Standard Error: 2_161 + .saturating_add(Weight::from_ref_time(715_426).saturating_mul(i.into())) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[0, 1000]`. + fn kill_storage(i: u32, ) -> Weight { + // Minimum execution time: 4_018 nanoseconds. + Weight::from_ref_time(4_143_000) + // Standard Error: 831 + .saturating_add(Weight::from_ref_time(519_031).saturating_mul(i.into())) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `p` is `[0, 1000]`. + fn kill_prefix(p: u32, ) -> Weight { + // Minimum execution time: 17_447 nanoseconds. + Weight::from_ref_time(17_836_000) + // Standard Error: 1_367 + .saturating_add(Weight::from_ref_time(1_125_803).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(p.into()))) + } } diff --git a/runtime/dolphin/src/weights/manta_collator_selection.rs b/runtime/dolphin/src/weights/manta_collator_selection.rs index 4f2c346ad..f1906797f 100644 --- a/runtime/dolphin/src/weights/manta_collator_selection.rs +++ b/runtime/dolphin/src/weights/manta_collator_selection.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for manta_collator_selection //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024 // Executed Command: @@ -40,8 +40,9 @@ #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; +use manta_primitives::constants::RocksDbWeight; /// Weight functions needed for manta_collator_selection. pub trait WeightInfo { @@ -61,194 +62,228 @@ pub trait WeightInfo { /// Weights for manta_collator_selection using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl manta_collator_selection::WeightInfo for SubstrateWeight { - // Storage: CollatorSelection Invulnerables (r:0 w:1) - fn set_invulnerables(b: u32, ) -> Weight { - (9_438_000 as Weight) - // Standard Error: 15_000 - .saturating_add((74_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection DesiredCandidates (r:0 w:1) - fn set_desired_candidates() -> Weight { - (11_073_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection CandidacyBond (r:0 w:1) - fn set_candidacy_bond() -> Weight { - (9_087_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection EvictionBaseline (r:0 w:1) - fn set_eviction_baseline() -> Weight { - (8_733_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection EvictionTolerance (r:0 w:1) - fn set_eviction_tolerance() -> Weight { - (8_848_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:1) - // Storage: CollatorSelection DesiredCandidates (r:1 w:0) - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: Session NextKeys (r:1 w:0) - // Storage: CollatorSelection CandidacyBond (r:1 w:0) - fn register_as_candidate(c: u32, ) -> Weight { - (42_763_000 as Weight) - // Standard Error: 4_000 - .saturating_add((476_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:1) - fn leave_intent(c: u32, ) -> Weight { - (31_759_000 as Weight) - // Standard Error: 7_000 - .saturating_add((344_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: CollatorSelection Candidates (r:1 w:1) - fn remove_collator(c: u32, ) -> Weight { - (29_327_000 as Weight) - // Standard Error: 7_000 - .saturating_add((261_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:1) - // Storage: CollatorSelection DesiredCandidates (r:1 w:0) - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: Session NextKeys (r:1 w:0) - // Storage: CollatorSelection CandidacyBond (r:1 w:0) - fn register_candidate(c: u32, ) -> Weight { - (40_380_000 as Weight) - // Standard Error: 7_000 - .saturating_add((249_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:2 w:2) - // Storage: CollatorSelection BlocksPerCollatorThisSession (r:1 w:1) - // Storage: System BlockWeight (r:1 w:1) - fn note_author() -> Weight { - (34_340_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:0) - // Storage: CollatorSelection EvictionBaseline (r:1 w:0) - // Storage: CollatorSelection EvictionTolerance (r:1 w:0) - // Storage: CollatorSelection BlocksPerCollatorThisSession (r:2 w:2) - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: System BlockWeight (r:1 w:1) - // Storage: Session Validators (r:1 w:0) - // Storage: System Account (r:1 w:1) - fn new_session(c: u32, ) -> Weight { - (11_231_000 as Weight) - // Standard Error: 73_000 - .saturating_add((24_164_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) - } + // Storage: CollatorSelection Invulnerables (r:0 w:1) + /// The range of component `b` is `[1, 5]`. + fn set_invulnerables(b: u32, ) -> Weight { + // Minimum execution time: 14_545 nanoseconds. + Weight::from_ref_time(21_240_331) + // Standard Error: 239_450 + .saturating_add(Weight::from_ref_time(525_218).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection DesiredCandidates (r:0 w:1) + fn set_desired_candidates() -> Weight { + // Minimum execution time: 31_869 nanoseconds. + Weight::from_ref_time(32_789_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection CandidacyBond (r:0 w:1) + fn set_candidacy_bond() -> Weight { + // Minimum execution time: 19_274 nanoseconds. + Weight::from_ref_time(19_796_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection EvictionBaseline (r:0 w:1) + fn set_eviction_baseline() -> Weight { + // Minimum execution time: 18_742 nanoseconds. + Weight::from_ref_time(19_132_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection EvictionTolerance (r:0 w:1) + fn set_eviction_tolerance() -> Weight { + // Minimum execution time: 13_455 nanoseconds. + Weight::from_ref_time(13_850_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection DesiredCandidates (r:1 w:0) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: Session NextKeys (r:1 w:0) + // Storage: CollatorSelection CandidacyBond (r:1 w:0) + /// The range of component `c` is `[1, 50]`. + fn register_as_candidate(c: u32, ) -> Weight { + // Minimum execution time: 46_131 nanoseconds. + Weight::from_ref_time(51_451_793) + // Standard Error: 4_853 + .saturating_add(Weight::from_ref_time(229_252).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection Candidates (r:1 w:1) + /// The range of component `c` is `[1, 50]`. + fn leave_intent(c: u32, ) -> Weight { + // Minimum execution time: 30_878 nanoseconds. + Weight::from_ref_time(35_520_729) + // Standard Error: 5_570 + .saturating_add(Weight::from_ref_time(198_826).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: CollatorSelection Candidates (r:1 w:1) + /// The range of component `c` is `[1, 50]`. + fn remove_collator(c: u32, ) -> Weight { + // Minimum execution time: 33_826 nanoseconds. + Weight::from_ref_time(37_718_884) + // Standard Error: 3_921 + .saturating_add(Weight::from_ref_time(234_247).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection DesiredCandidates (r:1 w:0) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: Session NextKeys (r:1 w:0) + // Storage: CollatorSelection CandidacyBond (r:1 w:0) + /// The range of component `c` is `[1, 50]`. + fn register_candidate(c: u32, ) -> Weight { + // Minimum execution time: 46_110 nanoseconds. + Weight::from_ref_time(51_212_203) + // Standard Error: 5_599 + .saturating_add(Weight::from_ref_time(253_885).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: System Account (r:2 w:2) + // Storage: CollatorSelection BlocksPerCollatorThisSession (r:1 w:1) + // Storage: System BlockWeight (r:1 w:1) + fn note_author() -> Weight { + // Minimum execution time: 37_536 nanoseconds. + Weight::from_ref_time(38_010_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: CollatorSelection Candidates (r:1 w:0) + // Storage: CollatorSelection EvictionBaseline (r:1 w:0) + // Storage: CollatorSelection EvictionTolerance (r:1 w:0) + // Storage: CollatorSelection BlocksPerCollatorThisSession (r:2 w:2) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: System BlockWeight (r:1 w:1) + // Storage: Session Validators (r:1 w:0) + // Storage: System Account (r:1 w:1) + /// The range of component `c` is `[1, 50]`. + fn new_session(c: u32, ) -> Weight { + // Minimum execution time: 39_142 nanoseconds. + Weight::from_ref_time(29_909_511) + // Standard Error: 74_203 + .saturating_add(Weight::from_ref_time(22_167_911).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: CollatorSelection Invulnerables (r:0 w:1) - fn set_invulnerables(b: u32, ) -> Weight { - (9_438_000 as Weight) - // Standard Error: 15_000 - .saturating_add((74_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection DesiredCandidates (r:0 w:1) - fn set_desired_candidates() -> Weight { - (11_073_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection CandidacyBond (r:0 w:1) - fn set_candidacy_bond() -> Weight { - (9_087_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection EvictionBaseline (r:0 w:1) - fn set_eviction_baseline() -> Weight { - (8_733_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection EvictionTolerance (r:0 w:1) - fn set_eviction_tolerance() -> Weight { - (8_848_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:1) - // Storage: CollatorSelection DesiredCandidates (r:1 w:0) - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: Session NextKeys (r:1 w:0) - // Storage: CollatorSelection CandidacyBond (r:1 w:0) - fn register_as_candidate(c: u32, ) -> Weight { - (42_763_000 as Weight) - // Standard Error: 4_000 - .saturating_add((476_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:1) - fn leave_intent(c: u32, ) -> Weight { - (31_759_000 as Weight) - // Standard Error: 7_000 - .saturating_add((344_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: CollatorSelection Candidates (r:1 w:1) - fn remove_collator(c: u32, ) -> Weight { - (29_327_000 as Weight) - // Standard Error: 7_000 - .saturating_add((261_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:1) - // Storage: CollatorSelection DesiredCandidates (r:1 w:0) - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: Session NextKeys (r:1 w:0) - // Storage: CollatorSelection CandidacyBond (r:1 w:0) - fn register_candidate(c: u32, ) -> Weight { - (40_380_000 as Weight) - // Standard Error: 7_000 - .saturating_add((249_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:2 w:2) - // Storage: CollatorSelection BlocksPerCollatorThisSession (r:1 w:1) - // Storage: System BlockWeight (r:1 w:1) - fn note_author() -> Weight { - (34_340_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:0) - // Storage: CollatorSelection EvictionBaseline (r:1 w:0) - // Storage: CollatorSelection EvictionTolerance (r:1 w:0) - // Storage: CollatorSelection BlocksPerCollatorThisSession (r:2 w:2) - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: System BlockWeight (r:1 w:1) - // Storage: Session Validators (r:1 w:0) - // Storage: System Account (r:1 w:1) - fn new_session(c: u32, ) -> Weight { - (11_231_000 as Weight) - // Standard Error: 73_000 - .saturating_add((24_164_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) - } + // Storage: CollatorSelection Invulnerables (r:0 w:1) + /// The range of component `b` is `[1, 5]`. + fn set_invulnerables(b: u32, ) -> Weight { + // Minimum execution time: 14_545 nanoseconds. + Weight::from_ref_time(21_240_331) + // Standard Error: 239_450 + .saturating_add(Weight::from_ref_time(525_218).saturating_mul(b.into())) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection DesiredCandidates (r:0 w:1) + fn set_desired_candidates() -> Weight { + // Minimum execution time: 31_869 nanoseconds. + Weight::from_ref_time(32_789_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection CandidacyBond (r:0 w:1) + fn set_candidacy_bond() -> Weight { + // Minimum execution time: 19_274 nanoseconds. + Weight::from_ref_time(19_796_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection EvictionBaseline (r:0 w:1) + fn set_eviction_baseline() -> Weight { + // Minimum execution time: 18_742 nanoseconds. + Weight::from_ref_time(19_132_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection EvictionTolerance (r:0 w:1) + fn set_eviction_tolerance() -> Weight { + // Minimum execution time: 13_455 nanoseconds. + Weight::from_ref_time(13_850_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection DesiredCandidates (r:1 w:0) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: Session NextKeys (r:1 w:0) + // Storage: CollatorSelection CandidacyBond (r:1 w:0) + /// The range of component `c` is `[1, 50]`. + fn register_as_candidate(c: u32, ) -> Weight { + // Minimum execution time: 46_131 nanoseconds. + Weight::from_ref_time(51_451_793) + // Standard Error: 4_853 + .saturating_add(Weight::from_ref_time(229_252).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection Candidates (r:1 w:1) + /// The range of component `c` is `[1, 50]`. + fn leave_intent(c: u32, ) -> Weight { + // Minimum execution time: 30_878 nanoseconds. + Weight::from_ref_time(35_520_729) + // Standard Error: 5_570 + .saturating_add(Weight::from_ref_time(198_826).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: CollatorSelection Candidates (r:1 w:1) + /// The range of component `c` is `[1, 50]`. + fn remove_collator(c: u32, ) -> Weight { + // Minimum execution time: 33_826 nanoseconds. + Weight::from_ref_time(37_718_884) + // Standard Error: 3_921 + .saturating_add(Weight::from_ref_time(234_247).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection DesiredCandidates (r:1 w:0) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: Session NextKeys (r:1 w:0) + // Storage: CollatorSelection CandidacyBond (r:1 w:0) + /// The range of component `c` is `[1, 50]`. + fn register_candidate(c: u32, ) -> Weight { + // Minimum execution time: 46_110 nanoseconds. + Weight::from_ref_time(51_212_203) + // Standard Error: 5_599 + .saturating_add(Weight::from_ref_time(253_885).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: System Account (r:2 w:2) + // Storage: CollatorSelection BlocksPerCollatorThisSession (r:1 w:1) + // Storage: System BlockWeight (r:1 w:1) + fn note_author() -> Weight { + // Minimum execution time: 37_536 nanoseconds. + Weight::from_ref_time(38_010_000) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(4)) + } + // Storage: CollatorSelection Candidates (r:1 w:0) + // Storage: CollatorSelection EvictionBaseline (r:1 w:0) + // Storage: CollatorSelection EvictionTolerance (r:1 w:0) + // Storage: CollatorSelection BlocksPerCollatorThisSession (r:2 w:2) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: System BlockWeight (r:1 w:1) + // Storage: Session Validators (r:1 w:0) + // Storage: System Account (r:1 w:1) + /// The range of component `c` is `[1, 50]`. + fn new_session(c: u32, ) -> Weight { + // Minimum execution time: 39_142 nanoseconds. + Weight::from_ref_time(29_909_511) + // Standard Error: 74_203 + .saturating_add(Weight::from_ref_time(22_167_911).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(6)) + .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(c.into()))) + .saturating_add(RocksDbWeight::get().writes(3)) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(c.into()))) + } } diff --git a/runtime/dolphin/src/weights/nimbus_session_adapter.rs b/runtime/dolphin/src/weights/nimbus_session_adapter.rs new file mode 100644 index 000000000..e90566913 --- /dev/null +++ b/runtime/dolphin/src/weights/nimbus_session_adapter.rs @@ -0,0 +1,81 @@ +// Copyright 2020-2023 Manta Network. +// This file is part of Manta. +// +// Manta is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Manta 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 General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Manta. If not, see . + +//! This file contains wrappers for Nimbus to make them compatible with pallet session traits, +//! but has No-Op implementations on everything so as to not change behavior of the running chain just yet + +use crate::AccountId; +use frame_support::traits::OneSessionHandler; +use frame_system::Config; +use pallet_author_inherent::Pallet as AuthorInherent; +use session_key_primitives::vrf::VrfSessionKey; +use sp_application_crypto::BoundToRuntimeAppPublic; + +/// This adapts pallet AuthorInherent to be compatible with pallet session +/// making it suitable as a SessionKey entry +pub struct AuthorInherentWithNoOpSession(pub AuthorInherent); + +impl BoundToRuntimeAppPublic for AuthorInherentWithNoOpSession { + type Public = as BoundToRuntimeAppPublic>::Public; +} + +impl OneSessionHandler for AuthorInherentWithNoOpSession { + type Key = as BoundToRuntimeAppPublic>::Public; + + fn on_genesis_session<'a, I: 'a>(_: I) + where + I: Iterator, + { + } + + fn on_new_session<'a, I: 'a>(_: bool, _: I, _: I) + where + I: Iterator, + { + } + + fn on_disabled(_: u32) {} + + fn on_before_session_ending() {} +} + +/// This adapts VrfSessionKey to be compatible with pallet session +/// making it suitable as a SessionKey entry +pub struct VrfWithNoOpSession(pub VrfSessionKey); + +impl BoundToRuntimeAppPublic for VrfWithNoOpSession { + type Public = ::Public; +} + +impl OneSessionHandler for VrfWithNoOpSession { + type Key = ::Public; + + fn on_genesis_session<'a, I: 'a>(_: I) + where + I: Iterator, + { + } + + fn on_new_session<'a, I: 'a>(_: bool, _: I, _: I) + where + I: Iterator, + { + } + + fn on_disabled(_: u32) {} + + fn on_before_session_ending() {} +} diff --git a/runtime/dolphin/src/weights/pallet_asset_manager.rs b/runtime/dolphin/src/weights/pallet_asset_manager.rs index 0f132a417..fd9e759fe 100644 --- a/runtime/dolphin/src/weights/pallet_asset_manager.rs +++ b/runtime/dolphin/src/weights/pallet_asset_manager.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_asset_manager //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024 // Executed Command: @@ -40,8 +40,9 @@ #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; +use manta_primitives::constants::RocksDbWeight; /// Weight functions needed for pallet_asset_manager. pub trait WeightInfo { @@ -56,104 +57,116 @@ pub trait WeightInfo { /// Weights for pallet_asset_manager using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_asset_manager::WeightInfo for SubstrateWeight { - // Storage: AssetManager LocationAssetId (r:1 w:1) - // Storage: AssetManager NextAssetId (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Metadata (r:1 w:1) - // Storage: AssetManager AssetIdMetadata (r:0 w:1) - // Storage: AssetManager AssetIdLocation (r:0 w:1) - fn register_asset() -> Weight { - (52_592_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:0) - // Storage: AssetManager UnitsPerSecond (r:0 w:1) - fn set_units_per_second() -> Weight { - (55_095_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:1) - // Storage: AssetManager LocationAssetId (r:1 w:2) - // Storage: AssetManager AllowedDestParaIds (r:2 w:2) - fn update_asset_location() -> Weight { - (77_156_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:0) - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - // Storage: AssetManager AssetIdMetadata (r:0 w:1) - fn update_asset_metadata() -> Weight { - (73_515_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:0) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - fn mint_asset() -> Weight { - (84_381_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: AssetManager MinXcmFee (r:0 w:1) - fn set_min_xcm_fee() -> Weight { - (49_340_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } + // Storage: AssetManager LocationAssetId (r:1 w:1) + // Storage: AssetManager NextAssetId (r:1 w:1) + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Metadata (r:1 w:1) + // Storage: AssetManager AssetIdMetadata (r:0 w:1) + // Storage: AssetManager AssetIdLocation (r:0 w:1) + fn register_asset() -> Weight { + // Minimum execution time: 120_708 nanoseconds. + Weight::from_ref_time(122_404_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(6)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: AssetManager UnitsPerSecond (r:0 w:1) + fn set_units_per_second() -> Weight { + // Minimum execution time: 57_631 nanoseconds. + Weight::from_ref_time(60_162_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:1) + // Storage: AssetManager LocationAssetId (r:1 w:2) + // Storage: AssetManager AllowedDestParaIds (r:2 w:2) + fn update_asset_location() -> Weight { + // Minimum execution time: 77_448 nanoseconds. + Weight::from_ref_time(79_071_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(5)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + // Storage: AssetManager AssetIdMetadata (r:0 w:1) + fn update_asset_metadata() -> Weight { + // Minimum execution time: 74_765 nanoseconds. + Weight::from_ref_time(76_384_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:1) + fn mint_asset() -> Weight { + // Minimum execution time: 83_346 nanoseconds. + Weight::from_ref_time(86_076_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: AssetManager MinXcmFee (r:0 w:1) + fn set_min_xcm_fee() -> Weight { + // Minimum execution time: 45_918 nanoseconds. + Weight::from_ref_time(48_152_000) + .saturating_add(T::DbWeight::get().writes(1)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: AssetManager LocationAssetId (r:1 w:1) - // Storage: AssetManager NextAssetId (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Metadata (r:1 w:1) - // Storage: AssetManager AssetIdMetadata (r:0 w:1) - // Storage: AssetManager AssetIdLocation (r:0 w:1) - fn register_asset() -> Weight { - (52_592_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:0) - // Storage: AssetManager UnitsPerSecond (r:0 w:1) - fn set_units_per_second() -> Weight { - (55_095_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:1) - // Storage: AssetManager LocationAssetId (r:1 w:2) - // Storage: AssetManager AllowedDestParaIds (r:2 w:2) - fn update_asset_location() -> Weight { - (77_156_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:0) - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - // Storage: AssetManager AssetIdMetadata (r:0 w:1) - fn update_asset_metadata() -> Weight { - (73_515_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:0) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - fn mint_asset() -> Weight { - (84_381_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: AssetManager MinXcmFee (r:0 w:1) - fn set_min_xcm_fee() -> Weight { - (49_340_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } + // Storage: AssetManager LocationAssetId (r:1 w:1) + // Storage: AssetManager NextAssetId (r:1 w:1) + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Metadata (r:1 w:1) + // Storage: AssetManager AssetIdMetadata (r:0 w:1) + // Storage: AssetManager AssetIdLocation (r:0 w:1) + fn register_asset() -> Weight { + // Minimum execution time: 120_708 nanoseconds. + Weight::from_ref_time(122_404_000) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(6)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: AssetManager UnitsPerSecond (r:0 w:1) + fn set_units_per_second() -> Weight { + // Minimum execution time: 57_631 nanoseconds. + Weight::from_ref_time(60_162_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:1) + // Storage: AssetManager LocationAssetId (r:1 w:2) + // Storage: AssetManager AllowedDestParaIds (r:2 w:2) + fn update_asset_location() -> Weight { + // Minimum execution time: 77_448 nanoseconds. + Weight::from_ref_time(79_071_000) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(5)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + // Storage: AssetManager AssetIdMetadata (r:0 w:1) + fn update_asset_metadata() -> Weight { + // Minimum execution time: 74_765 nanoseconds. + Weight::from_ref_time(76_384_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:1) + fn mint_asset() -> Weight { + // Minimum execution time: 83_346 nanoseconds. + Weight::from_ref_time(86_076_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: AssetManager MinXcmFee (r:0 w:1) + fn set_min_xcm_fee() -> Weight { + // Minimum execution time: 45_918 nanoseconds. + Weight::from_ref_time(48_152_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } } diff --git a/runtime/dolphin/src/weights/pallet_assets.rs b/runtime/dolphin/src/weights/pallet_assets.rs index 7fc6880d7..7b52a8873 100644 --- a/runtime/dolphin/src/weights/pallet_assets.rs +++ b/runtime/dolphin/src/weights/pallet_assets.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_assets //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024 // Executed Command: @@ -40,14 +40,18 @@ #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; +use manta_primitives::constants::RocksDbWeight; /// Weight functions needed for pallet_assets. pub trait WeightInfo { fn create() -> Weight; fn force_create() -> Weight; - fn destroy(c: u32, s: u32, a: u32, ) -> Weight; + fn start_destroy() -> Weight; + fn destroy_accounts(c: u32, ) -> Weight; + fn destroy_approvals(a: u32, ) -> Weight; + fn finish_destroy() -> Weight; fn mint() -> Weight; fn burn() -> Weight; fn transfer() -> Weight; @@ -73,370 +77,458 @@ pub trait WeightInfo { /// Weights for pallet_assets using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_assets::WeightInfo for SubstrateWeight { - // Storage: Assets Asset (r:1 w:1) - fn create() -> Weight { - (18_152_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn force_create() -> Weight { - (16_519_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:5002 w:5001) - // Storage: System Account (r:5000 w:5000) - // Storage: Assets Metadata (r:1 w:0) - // Storage: Assets Approvals (r:501 w:500) - fn destroy(c: u32, s: u32, a: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 44_000 - .saturating_add((18_816_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 44_000 - .saturating_add((21_706_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 448_000 - .saturating_add((11_135_000 as Weight).saturating_mul(a as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(a as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight))) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - fn mint() -> Weight { - (31_745_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - fn burn() -> Weight { - (39_127_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn transfer() -> Weight { - (54_828_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn transfer_keep_alive() -> Weight { - (43_192_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn force_transfer() -> Weight { - (55_016_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Account (r:1 w:1) - fn freeze() -> Weight { - (22_625_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Account (r:1 w:1) - fn thaw() -> Weight { - (22_395_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn freeze_asset() -> Weight { - (18_800_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn thaw_asset() -> Weight { - (18_711_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Metadata (r:1 w:0) - fn transfer_ownership() -> Weight { - (20_124_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn set_team() -> Weight { - (18_071_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn set_metadata(_n: u32, s: u32, ) -> Weight { - (21_935_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn clear_metadata() -> Weight { - (21_791_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn force_set_metadata(n: u32, s: u32, ) -> Weight { - (19_643_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 1_000 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn force_clear_metadata() -> Weight { - (21_213_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn force_asset_status() -> Weight { - (17_060_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) - fn approve_transfer() -> Weight { - (25_204_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Approvals (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn transfer_approved() -> Weight { - (60_419_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) - fn cancel_approval() -> Weight { - (24_989_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) - fn force_cancel_approval() -> Weight { - (25_017_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } + // Storage: Assets Asset (r:1 w:1) + fn create() -> Weight { + // Minimum execution time: 18_806 nanoseconds. + Weight::from_ref_time(19_248_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn force_create() -> Weight { + // Minimum execution time: 18_068 nanoseconds. + Weight::from_ref_time(18_521_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn start_destroy() -> Weight { + // Minimum execution time: 18_874 nanoseconds. + Weight::from_ref_time(20_859_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:0) + // Storage: System Account (r:20 w:20) + /// The range of component `c` is `[0, 1000]`. + fn destroy_accounts(c: u32, ) -> Weight { + // Minimum execution time: 23_125 nanoseconds. + Weight::from_ref_time(23_268_000) + // Standard Error: 9_528 + .saturating_add(Weight::from_ref_time(14_508_977).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(c.into()))) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:0) + /// The range of component `a` is `[0, 1000]`. + fn destroy_approvals(a: u32, ) -> Weight { + // Minimum execution time: 49_387 nanoseconds. + Weight::from_ref_time(50_316_000) + // Standard Error: 7_357 + .saturating_add(Weight::from_ref_time(7_520_167).saturating_mul(a.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into()))) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Metadata (r:1 w:0) + fn finish_destroy() -> Weight { + // Minimum execution time: 20_491 nanoseconds. + Weight::from_ref_time(21_049_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:1) + fn mint() -> Weight { + // Minimum execution time: 34_181 nanoseconds. + Weight::from_ref_time(34_795_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:1) + fn burn() -> Weight { + // Minimum execution time: 40_881 nanoseconds. + Weight::from_ref_time(42_884_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn transfer() -> Weight { + // Minimum execution time: 53_759 nanoseconds. + Weight::from_ref_time(54_838_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn transfer_keep_alive() -> Weight { + // Minimum execution time: 45_601 nanoseconds. + Weight::from_ref_time(47_304_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn force_transfer() -> Weight { + // Minimum execution time: 53_442 nanoseconds. + Weight::from_ref_time(55_402_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Account (r:1 w:1) + fn freeze() -> Weight { + // Minimum execution time: 24_295 nanoseconds. + Weight::from_ref_time(24_760_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Account (r:1 w:1) + fn thaw() -> Weight { + // Minimum execution time: 48_922 nanoseconds. + Weight::from_ref_time(49_674_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn freeze_asset() -> Weight { + // Minimum execution time: 27_062 nanoseconds. + Weight::from_ref_time(27_805_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn thaw_asset() -> Weight { + // Minimum execution time: 18_779 nanoseconds. + Weight::from_ref_time(20_640_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Metadata (r:1 w:0) + fn transfer_ownership() -> Weight { + // Minimum execution time: 21_224 nanoseconds. + Weight::from_ref_time(21_701_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn set_team() -> Weight { + // Minimum execution time: 19_834 nanoseconds. + Weight::from_ref_time(20_311_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + /// The range of component `n` is `[0, 50]`. + /// The range of component `s` is `[0, 50]`. + fn set_metadata(_n: u32, _s: u32, ) -> Weight { + // Minimum execution time: 21_260 nanoseconds. + Weight::from_ref_time(29_987_799) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + fn clear_metadata() -> Weight { + // Minimum execution time: 53_151 nanoseconds. + Weight::from_ref_time(71_161_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + /// The range of component `n` is `[0, 50]`. + /// The range of component `s` is `[0, 50]`. + fn force_set_metadata(n: u32, s: u32, ) -> Weight { + // Minimum execution time: 18_701 nanoseconds. + Weight::from_ref_time(19_996_317) + // Standard Error: 32_478 + .saturating_add(Weight::from_ref_time(159_776).saturating_mul(n.into())) + // Standard Error: 32_478 + .saturating_add(Weight::from_ref_time(96_183).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + fn force_clear_metadata() -> Weight { + // Minimum execution time: 22_888 nanoseconds. + Weight::from_ref_time(23_207_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn force_asset_status() -> Weight { + // Minimum execution time: 57_930 nanoseconds. + Weight::from_ref_time(59_728_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + fn approve_transfer() -> Weight { + // Minimum execution time: 50_407 nanoseconds. + Weight::from_ref_time(51_363_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn transfer_approved() -> Weight { + // Minimum execution time: 64_283 nanoseconds. + Weight::from_ref_time(64_695_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + fn cancel_approval() -> Weight { + // Minimum execution time: 29_514 nanoseconds. + Weight::from_ref_time(30_027_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + fn force_cancel_approval() -> Weight { + // Minimum execution time: 28_997 nanoseconds. + Weight::from_ref_time(29_481_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Assets Asset (r:1 w:1) - fn create() -> Weight { - (18_152_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn force_create() -> Weight { - (16_519_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:5002 w:5001) - // Storage: System Account (r:5000 w:5000) - // Storage: Assets Metadata (r:1 w:0) - // Storage: Assets Approvals (r:501 w:500) - fn destroy(c: u32, s: u32, a: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 44_000 - .saturating_add((18_816_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 44_000 - .saturating_add((21_706_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 448_000 - .saturating_add((11_135_000 as Weight).saturating_mul(a as Weight)) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(a as Weight))) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(a as Weight))) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - fn mint() -> Weight { - (31_745_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - fn burn() -> Weight { - (39_127_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn transfer() -> Weight { - (54_828_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn transfer_keep_alive() -> Weight { - (43_192_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn force_transfer() -> Weight { - (55_016_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Account (r:1 w:1) - fn freeze() -> Weight { - (22_625_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Account (r:1 w:1) - fn thaw() -> Weight { - (22_395_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn freeze_asset() -> Weight { - (18_800_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn thaw_asset() -> Weight { - (18_711_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Metadata (r:1 w:0) - fn transfer_ownership() -> Weight { - (20_124_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn set_team() -> Weight { - (18_071_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn set_metadata(_n: u32, s: u32, ) -> Weight { - (21_935_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn clear_metadata() -> Weight { - (21_791_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn force_set_metadata(n: u32, s: u32, ) -> Weight { - (19_643_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 1_000 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn force_clear_metadata() -> Weight { - (21_213_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn force_asset_status() -> Weight { - (17_060_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) - fn approve_transfer() -> Weight { - (25_204_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Approvals (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn transfer_approved() -> Weight { - (60_419_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) - fn cancel_approval() -> Weight { - (24_989_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) - fn force_cancel_approval() -> Weight { - (25_017_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } + // Storage: Assets Asset (r:1 w:1) + fn create() -> Weight { + // Minimum execution time: 18_806 nanoseconds. + Weight::from_ref_time(19_248_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn force_create() -> Weight { + // Minimum execution time: 18_068 nanoseconds. + Weight::from_ref_time(18_521_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn start_destroy() -> Weight { + // Minimum execution time: 18_874 nanoseconds. + Weight::from_ref_time(20_859_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:0) + // Storage: System Account (r:20 w:20) + /// The range of component `c` is `[0, 1000]`. + fn destroy_accounts(c: u32, ) -> Weight { + // Minimum execution time: 23_125 nanoseconds. + Weight::from_ref_time(23_268_000) + // Standard Error: 9_528 + .saturating_add(Weight::from_ref_time(14_508_977).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(c.into()))) + .saturating_add(RocksDbWeight::get().writes(1)) + .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(c.into()))) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:0) + /// The range of component `a` is `[0, 1000]`. + fn destroy_approvals(a: u32, ) -> Weight { + // Minimum execution time: 49_387 nanoseconds. + Weight::from_ref_time(50_316_000) + // Standard Error: 7_357 + .saturating_add(Weight::from_ref_time(7_520_167).saturating_mul(a.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(a.into()))) + .saturating_add(RocksDbWeight::get().writes(1)) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(a.into()))) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Metadata (r:1 w:0) + fn finish_destroy() -> Weight { + // Minimum execution time: 20_491 nanoseconds. + Weight::from_ref_time(21_049_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:1) + fn mint() -> Weight { + // Minimum execution time: 34_181 nanoseconds. + Weight::from_ref_time(34_795_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:1) + fn burn() -> Weight { + // Minimum execution time: 40_881 nanoseconds. + Weight::from_ref_time(42_884_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn transfer() -> Weight { + // Minimum execution time: 53_759 nanoseconds. + Weight::from_ref_time(54_838_000) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(4)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn transfer_keep_alive() -> Weight { + // Minimum execution time: 45_601 nanoseconds. + Weight::from_ref_time(47_304_000) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(4)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn force_transfer() -> Weight { + // Minimum execution time: 53_442 nanoseconds. + Weight::from_ref_time(55_402_000) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(4)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Account (r:1 w:1) + fn freeze() -> Weight { + // Minimum execution time: 24_295 nanoseconds. + Weight::from_ref_time(24_760_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Account (r:1 w:1) + fn thaw() -> Weight { + // Minimum execution time: 48_922 nanoseconds. + Weight::from_ref_time(49_674_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn freeze_asset() -> Weight { + // Minimum execution time: 27_062 nanoseconds. + Weight::from_ref_time(27_805_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn thaw_asset() -> Weight { + // Minimum execution time: 18_779 nanoseconds. + Weight::from_ref_time(20_640_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Metadata (r:1 w:0) + fn transfer_ownership() -> Weight { + // Minimum execution time: 21_224 nanoseconds. + Weight::from_ref_time(21_701_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn set_team() -> Weight { + // Minimum execution time: 19_834 nanoseconds. + Weight::from_ref_time(20_311_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + /// The range of component `n` is `[0, 50]`. + /// The range of component `s` is `[0, 50]`. + fn set_metadata(_n: u32, _s: u32, ) -> Weight { + // Minimum execution time: 21_260 nanoseconds. + Weight::from_ref_time(29_987_799) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + fn clear_metadata() -> Weight { + // Minimum execution time: 53_151 nanoseconds. + Weight::from_ref_time(71_161_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + /// The range of component `n` is `[0, 50]`. + /// The range of component `s` is `[0, 50]`. + fn force_set_metadata(n: u32, s: u32, ) -> Weight { + // Minimum execution time: 18_701 nanoseconds. + Weight::from_ref_time(19_996_317) + // Standard Error: 32_478 + .saturating_add(Weight::from_ref_time(159_776).saturating_mul(n.into())) + // Standard Error: 32_478 + .saturating_add(Weight::from_ref_time(96_183).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + fn force_clear_metadata() -> Weight { + // Minimum execution time: 22_888 nanoseconds. + Weight::from_ref_time(23_207_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn force_asset_status() -> Weight { + // Minimum execution time: 57_930 nanoseconds. + Weight::from_ref_time(59_728_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + fn approve_transfer() -> Weight { + // Minimum execution time: 50_407 nanoseconds. + Weight::from_ref_time(51_363_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn transfer_approved() -> Weight { + // Minimum execution time: 64_283 nanoseconds. + Weight::from_ref_time(64_695_000) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(5)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + fn cancel_approval() -> Weight { + // Minimum execution time: 29_514 nanoseconds. + Weight::from_ref_time(30_027_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + fn force_cancel_approval() -> Weight { + // Minimum execution time: 28_997 nanoseconds. + Weight::from_ref_time(29_481_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } } diff --git a/runtime/dolphin/src/weights/pallet_author_inherent.rs b/runtime/dolphin/src/weights/pallet_author_inherent.rs index 3a8ef071e..0a53b5627 100644 --- a/runtime/dolphin/src/weights/pallet_author_inherent.rs +++ b/runtime/dolphin/src/weights/pallet_author_inherent.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_author_inherent //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024 // Executed Command: @@ -40,8 +40,9 @@ #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; +use manta_primitives::constants::RocksDbWeight; /// Weight functions needed for pallet_author_inherent. pub trait WeightInfo { @@ -51,28 +52,30 @@ pub trait WeightInfo { /// Weights for pallet_author_inherent using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_author_inherent::WeightInfo for SubstrateWeight { - // Storage: ParachainSystem ValidationData (r:1 w:0) - // Storage: AuthorInherent HighestSlotSeen (r:1 w:1) - // Storage: AuthorInherent Author (r:1 w:0) - // Storage: Session NextKeys (r:1 w:0) - // Storage: Session Validators (r:1 w:0) - fn kick_off_authorship_validation() -> Weight { - (16_985_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } + // Storage: ParachainSystem ValidationData (r:1 w:0) + // Storage: AuthorInherent HighestSlotSeen (r:1 w:1) + // Storage: AuthorInherent Author (r:1 w:0) + // Storage: Session NextKeys (r:1 w:0) + // Storage: Session Validators (r:1 w:0) + fn kick_off_authorship_validation() -> Weight { + // Minimum execution time: 20_968 nanoseconds. + Weight::from_ref_time(21_462_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(1)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: ParachainSystem ValidationData (r:1 w:0) - // Storage: AuthorInherent HighestSlotSeen (r:1 w:1) - // Storage: AuthorInherent Author (r:1 w:0) - // Storage: Session NextKeys (r:1 w:0) - // Storage: Session Validators (r:1 w:0) - fn kick_off_authorship_validation() -> Weight { - (16_985_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } + // Storage: ParachainSystem ValidationData (r:1 w:0) + // Storage: AuthorInherent HighestSlotSeen (r:1 w:1) + // Storage: AuthorInherent Author (r:1 w:0) + // Storage: Session NextKeys (r:1 w:0) + // Storage: Session Validators (r:1 w:0) + fn kick_off_authorship_validation() -> Weight { + // Minimum execution time: 20_968 nanoseconds. + Weight::from_ref_time(21_462_000) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(1)) + } } diff --git a/runtime/dolphin/src/weights/pallet_balances.rs b/runtime/dolphin/src/weights/pallet_balances.rs index 2fce2b789..62c1d3161 100644 --- a/runtime/dolphin/src/weights/pallet_balances.rs +++ b/runtime/dolphin/src/weights/pallet_balances.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_balances //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024 // Executed Command: @@ -40,8 +40,9 @@ #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; +use manta_primitives::constants::RocksDbWeight; /// Weight functions needed for pallet_balances. pub trait WeightInfo { @@ -57,92 +58,106 @@ pub trait WeightInfo { /// Weights for pallet_balances using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_balances::WeightInfo for SubstrateWeight { - // Storage: System Account (r:1 w:1) - fn transfer() -> Weight { - (43_473_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn transfer_keep_alive() -> Weight { - (35_361_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn set_balance_creating() -> Weight { - (22_443_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn set_balance_killing() -> Weight { - (26_386_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:2 w:2) - fn force_transfer() -> Weight { - (46_517_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn transfer_all() -> Weight { - (42_246_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn force_unreserve() -> Weight { - (19_676_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } + // Storage: System Account (r:1 w:1) + fn transfer() -> Weight { + // Minimum execution time: 48_091 nanoseconds. + Weight::from_ref_time(48_766_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn transfer_keep_alive() -> Weight { + // Minimum execution time: 36_041 nanoseconds. + Weight::from_ref_time(36_668_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn set_balance_creating() -> Weight { + // Minimum execution time: 25_421 nanoseconds. + Weight::from_ref_time(25_943_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn set_balance_killing() -> Weight { + // Minimum execution time: 28_801 nanoseconds. + Weight::from_ref_time(29_286_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: System Account (r:2 w:2) + fn force_transfer() -> Weight { + // Minimum execution time: 47_010 nanoseconds. + Weight::from_ref_time(47_749_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: System Account (r:1 w:1) + fn transfer_all() -> Weight { + // Minimum execution time: 42_105 nanoseconds. + Weight::from_ref_time(42_515_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn force_unreserve() -> Weight { + // Minimum execution time: 22_078 nanoseconds. + Weight::from_ref_time(22_514_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: System Account (r:1 w:1) - fn transfer() -> Weight { - (43_473_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn transfer_keep_alive() -> Weight { - (35_361_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn set_balance_creating() -> Weight { - (22_443_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn set_balance_killing() -> Weight { - (26_386_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:2 w:2) - fn force_transfer() -> Weight { - (46_517_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn transfer_all() -> Weight { - (42_246_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn force_unreserve() -> Weight { - (19_676_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } + // Storage: System Account (r:1 w:1) + fn transfer() -> Weight { + // Minimum execution time: 48_091 nanoseconds. + Weight::from_ref_time(48_766_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn transfer_keep_alive() -> Weight { + // Minimum execution time: 36_041 nanoseconds. + Weight::from_ref_time(36_668_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn set_balance_creating() -> Weight { + // Minimum execution time: 25_421 nanoseconds. + Weight::from_ref_time(25_943_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn set_balance_killing() -> Weight { + // Minimum execution time: 28_801 nanoseconds. + Weight::from_ref_time(29_286_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: System Account (r:2 w:2) + fn force_transfer() -> Weight { + // Minimum execution time: 47_010 nanoseconds. + Weight::from_ref_time(47_749_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: System Account (r:1 w:1) + fn transfer_all() -> Weight { + // Minimum execution time: 42_105 nanoseconds. + Weight::from_ref_time(42_515_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn force_unreserve() -> Weight { + // Minimum execution time: 22_078 nanoseconds. + Weight::from_ref_time(22_514_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } } diff --git a/runtime/dolphin/src/weights/pallet_collective.rs b/runtime/dolphin/src/weights/pallet_collective.rs index 1dea7abe1..f2ffbf491 100644 --- a/runtime/dolphin/src/weights/pallet_collective.rs +++ b/runtime/dolphin/src/weights/pallet_collective.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_collective //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024 // Executed Command: @@ -40,8 +40,9 @@ #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; +use manta_primitives::constants::RocksDbWeight; /// Weight functions needed for pallet_collective. pub trait WeightInfo { @@ -60,266 +61,310 @@ pub trait WeightInfo { /// Weights for pallet_collective using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_collective::WeightInfo for SubstrateWeight { - // Storage: Council Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: Council Voting (r:100 w:100) - // Storage: Council Prime (r:0 w:1) - fn set_members(m: u32, n: u32, p: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 7_000 - .saturating_add((13_737_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 7_000 - .saturating_add((33_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 7_000 - .saturating_add((17_006_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(p as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) - } - // Storage: Council Members (r:1 w:0) - fn execute(b: u32, m: u32, ) -> Weight { - (18_411_000 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 0 - .saturating_add((35_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - } - // Storage: Council Members (r:1 w:0) - // Storage: Council ProposalOf (r:1 w:0) - fn propose_execute(b: u32, m: u32, ) -> Weight { - (20_600_000 as Weight) - // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 1_000 - .saturating_add((68_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - } - // Storage: Council Members (r:1 w:0) - // Storage: Council ProposalOf (r:1 w:1) - // Storage: Council Proposals (r:1 w:1) - // Storage: Council ProposalCount (r:1 w:1) - // Storage: Council Voting (r:0 w:1) - fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (26_311_000 as Weight) - // Standard Error: 0 - .saturating_add((7_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 1_000 - .saturating_add((52_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 1_000 - .saturating_add((213_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - // Storage: Council Members (r:1 w:0) - // Storage: Council Voting (r:1 w:1) - fn vote(m: u32, ) -> Weight { - (34_738_000 as Weight) - // Standard Error: 2_000 - .saturating_add((92_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Council Voting (r:1 w:1) - // Storage: Council Members (r:1 w:0) - // Storage: Council Proposals (r:1 w:1) - // Storage: Council ProposalOf (r:0 w:1) - fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (33_338_000 as Weight) - // Standard Error: 2_000 - .saturating_add((74_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 2_000 - .saturating_add((160_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Council Voting (r:1 w:1) - // Storage: Council Members (r:1 w:0) - // Storage: Council ProposalOf (r:1 w:1) - // Storage: Council Proposals (r:1 w:1) - fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (36_217_000 as Weight) - // Standard Error: 0 - .saturating_add((7_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 1_000 - .saturating_add((89_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 1_000 - .saturating_add((207_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Council Voting (r:1 w:1) - // Storage: Council Members (r:1 w:0) - // Storage: Council Prime (r:1 w:0) - // Storage: Council Proposals (r:1 w:1) - // Storage: Council ProposalOf (r:0 w:1) - fn close_disapproved(m: u32, p: u32, ) -> Weight { - (35_604_000 as Weight) - // Standard Error: 2_000 - .saturating_add((89_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 2_000 - .saturating_add((157_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Council Voting (r:1 w:1) - // Storage: Council Members (r:1 w:0) - // Storage: Council Prime (r:1 w:0) - // Storage: Council ProposalOf (r:1 w:1) - // Storage: Council Proposals (r:1 w:1) - fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (37_220_000 as Weight) - // Standard Error: 0 - .saturating_add((8_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 2_000 - .saturating_add((99_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 1_000 - .saturating_add((215_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Council Proposals (r:1 w:1) - // Storage: Council Voting (r:0 w:1) - // Storage: Council ProposalOf (r:0 w:1) - fn disapprove_proposal(p: u32, ) -> Weight { - (21_135_000 as Weight) - // Standard Error: 1_000 - .saturating_add((212_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } + // Storage: Council Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: Council Prime (r:0 w:1) + // Storage: Council Voting (r:100 w:100) + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { + // Minimum execution time: 19_783 nanoseconds. + Weight::from_ref_time(20_193_000) + // Standard Error: 74_309 + .saturating_add(Weight::from_ref_time(6_004_496).saturating_mul(m.into())) + // Standard Error: 74_309 + .saturating_add(Weight::from_ref_time(8_543_327).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()))) + } + // Storage: Council Members (r:1 w:0) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn execute(_b: u32, _m: u32, ) -> Weight { + // Minimum execution time: 22_358 nanoseconds. + Weight::from_ref_time(41_650_455) + .saturating_add(T::DbWeight::get().reads(1)) + } + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:0) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn propose_execute(_b: u32, _m: u32, ) -> Weight { + // Minimum execution time: 24_489 nanoseconds. + Weight::from_ref_time(44_172_578) + .saturating_add(T::DbWeight::get().reads(2)) + } + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalCount (r:1 w:1) + // Storage: Council Voting (r:0 w:1) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[2, 100]`. + /// The range of component `p` is `[1, 100]`. + fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { + // Minimum execution time: 32_589 nanoseconds. + Weight::from_ref_time(32_640_194) + // Standard Error: 165 + .saturating_add(Weight::from_ref_time(4_333).saturating_mul(b.into())) + // Standard Error: 1_727 + .saturating_add(Weight::from_ref_time(25_515).saturating_mul(m.into())) + // Standard Error: 1_705 + .saturating_add(Weight::from_ref_time(156_203).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: Council Members (r:1 w:0) + // Storage: Council Voting (r:1 w:1) + /// The range of component `m` is `[5, 100]`. + fn vote(m: u32, ) -> Weight { + // Minimum execution time: 34_486 nanoseconds. + Weight::from_ref_time(35_782_615) + // Standard Error: 1_183 + .saturating_add(Weight::from_ref_time(44_412).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalOf (r:0 w:1) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_disapproved(m: u32, p: u32, ) -> Weight { + // Minimum execution time: 33_041 nanoseconds. + Weight::from_ref_time(37_085_911) + // Standard Error: 1_615 + .saturating_add(Weight::from_ref_time(21_850).saturating_mul(m.into())) + // Standard Error: 1_575 + .saturating_add(Weight::from_ref_time(146_332).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: Council Proposals (r:1 w:1) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Minimum execution time: 45_391 nanoseconds. + Weight::from_ref_time(47_310_385) + // Standard Error: 186 + .saturating_add(Weight::from_ref_time(3_241).saturating_mul(b.into())) + // Standard Error: 1_973 + .saturating_add(Weight::from_ref_time(25_555).saturating_mul(m.into())) + // Standard Error: 1_924 + .saturating_add(Weight::from_ref_time(162_460).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Prime (r:1 w:0) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalOf (r:0 w:1) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_disapproved(m: u32, p: u32, ) -> Weight { + // Minimum execution time: 35_924 nanoseconds. + Weight::from_ref_time(38_477_240) + // Standard Error: 1_649 + .saturating_add(Weight::from_ref_time(43_631).saturating_mul(m.into())) + // Standard Error: 1_608 + .saturating_add(Weight::from_ref_time(149_447).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Prime (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: Council Proposals (r:1 w:1) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Minimum execution time: 50_001 nanoseconds. + Weight::from_ref_time(51_987_088) + // Standard Error: 184 + .saturating_add(Weight::from_ref_time(2_439).saturating_mul(b.into())) + // Standard Error: 1_951 + .saturating_add(Weight::from_ref_time(15_663).saturating_mul(m.into())) + // Standard Error: 1_902 + .saturating_add(Weight::from_ref_time(166_471).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Council Proposals (r:1 w:1) + // Storage: Council Voting (r:0 w:1) + // Storage: Council ProposalOf (r:0 w:1) + /// The range of component `p` is `[1, 100]`. + fn disapprove_proposal(p: u32, ) -> Weight { + // Minimum execution time: 22_553 nanoseconds. + Weight::from_ref_time(26_103_691) + // Standard Error: 2_005 + .saturating_add(Weight::from_ref_time(147_575).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(3)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Council Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: Council Voting (r:100 w:100) - // Storage: Council Prime (r:0 w:1) - fn set_members(m: u32, n: u32, p: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 7_000 - .saturating_add((13_737_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 7_000 - .saturating_add((33_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 7_000 - .saturating_add((17_006_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(p as Weight))) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) - } - // Storage: Council Members (r:1 w:0) - fn execute(b: u32, m: u32, ) -> Weight { - (18_411_000 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 0 - .saturating_add((35_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - } - // Storage: Council Members (r:1 w:0) - // Storage: Council ProposalOf (r:1 w:0) - fn propose_execute(b: u32, m: u32, ) -> Weight { - (20_600_000 as Weight) - // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 1_000 - .saturating_add((68_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - } - // Storage: Council Members (r:1 w:0) - // Storage: Council ProposalOf (r:1 w:1) - // Storage: Council Proposals (r:1 w:1) - // Storage: Council ProposalCount (r:1 w:1) - // Storage: Council Voting (r:0 w:1) - fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (26_311_000 as Weight) - // Standard Error: 0 - .saturating_add((7_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 1_000 - .saturating_add((52_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 1_000 - .saturating_add((213_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - // Storage: Council Members (r:1 w:0) - // Storage: Council Voting (r:1 w:1) - fn vote(m: u32, ) -> Weight { - (34_738_000 as Weight) - // Standard Error: 2_000 - .saturating_add((92_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Council Voting (r:1 w:1) - // Storage: Council Members (r:1 w:0) - // Storage: Council Proposals (r:1 w:1) - // Storage: Council ProposalOf (r:0 w:1) - fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (33_338_000 as Weight) - // Standard Error: 2_000 - .saturating_add((74_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 2_000 - .saturating_add((160_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Council Voting (r:1 w:1) - // Storage: Council Members (r:1 w:0) - // Storage: Council ProposalOf (r:1 w:1) - // Storage: Council Proposals (r:1 w:1) - fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (36_217_000 as Weight) - // Standard Error: 0 - .saturating_add((7_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 1_000 - .saturating_add((89_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 1_000 - .saturating_add((207_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Council Voting (r:1 w:1) - // Storage: Council Members (r:1 w:0) - // Storage: Council Prime (r:1 w:0) - // Storage: Council Proposals (r:1 w:1) - // Storage: Council ProposalOf (r:0 w:1) - fn close_disapproved(m: u32, p: u32, ) -> Weight { - (35_604_000 as Weight) - // Standard Error: 2_000 - .saturating_add((89_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 2_000 - .saturating_add((157_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Council Voting (r:1 w:1) - // Storage: Council Members (r:1 w:0) - // Storage: Council Prime (r:1 w:0) - // Storage: Council ProposalOf (r:1 w:1) - // Storage: Council Proposals (r:1 w:1) - fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (37_220_000 as Weight) - // Standard Error: 0 - .saturating_add((8_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 2_000 - .saturating_add((99_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 1_000 - .saturating_add((215_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Council Proposals (r:1 w:1) - // Storage: Council Voting (r:0 w:1) - // Storage: Council ProposalOf (r:0 w:1) - fn disapprove_proposal(p: u32, ) -> Weight { - (21_135_000 as Weight) - // Standard Error: 1_000 - .saturating_add((212_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } + // Storage: Council Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: Council Prime (r:0 w:1) + // Storage: Council Voting (r:100 w:100) + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { + // Minimum execution time: 19_783 nanoseconds. + Weight::from_ref_time(20_193_000) + // Standard Error: 74_309 + .saturating_add(Weight::from_ref_time(6_004_496).saturating_mul(m.into())) + // Standard Error: 74_309 + .saturating_add(Weight::from_ref_time(8_543_327).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(RocksDbWeight::get().writes(2)) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(p.into()))) + } + // Storage: Council Members (r:1 w:0) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn execute(_b: u32, _m: u32, ) -> Weight { + // Minimum execution time: 22_358 nanoseconds. + Weight::from_ref_time(41_650_455) + .saturating_add(RocksDbWeight::get().reads(1)) + } + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:0) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn propose_execute(_b: u32, _m: u32, ) -> Weight { + // Minimum execution time: 24_489 nanoseconds. + Weight::from_ref_time(44_172_578) + .saturating_add(RocksDbWeight::get().reads(2)) + } + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalCount (r:1 w:1) + // Storage: Council Voting (r:0 w:1) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[2, 100]`. + /// The range of component `p` is `[1, 100]`. + fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { + // Minimum execution time: 32_589 nanoseconds. + Weight::from_ref_time(32_640_194) + // Standard Error: 165 + .saturating_add(Weight::from_ref_time(4_333).saturating_mul(b.into())) + // Standard Error: 1_727 + .saturating_add(Weight::from_ref_time(25_515).saturating_mul(m.into())) + // Standard Error: 1_705 + .saturating_add(Weight::from_ref_time(156_203).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(4)) + } + // Storage: Council Members (r:1 w:0) + // Storage: Council Voting (r:1 w:1) + /// The range of component `m` is `[5, 100]`. + fn vote(m: u32, ) -> Weight { + // Minimum execution time: 34_486 nanoseconds. + Weight::from_ref_time(35_782_615) + // Standard Error: 1_183 + .saturating_add(Weight::from_ref_time(44_412).saturating_mul(m.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalOf (r:0 w:1) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_disapproved(m: u32, p: u32, ) -> Weight { + // Minimum execution time: 33_041 nanoseconds. + Weight::from_ref_time(37_085_911) + // Standard Error: 1_615 + .saturating_add(Weight::from_ref_time(21_850).saturating_mul(m.into())) + // Standard Error: 1_575 + .saturating_add(Weight::from_ref_time(146_332).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: Council Proposals (r:1 w:1) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Minimum execution time: 45_391 nanoseconds. + Weight::from_ref_time(47_310_385) + // Standard Error: 186 + .saturating_add(Weight::from_ref_time(3_241).saturating_mul(b.into())) + // Standard Error: 1_973 + .saturating_add(Weight::from_ref_time(25_555).saturating_mul(m.into())) + // Standard Error: 1_924 + .saturating_add(Weight::from_ref_time(162_460).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Prime (r:1 w:0) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalOf (r:0 w:1) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_disapproved(m: u32, p: u32, ) -> Weight { + // Minimum execution time: 35_924 nanoseconds. + Weight::from_ref_time(38_477_240) + // Standard Error: 1_649 + .saturating_add(Weight::from_ref_time(43_631).saturating_mul(m.into())) + // Standard Error: 1_608 + .saturating_add(Weight::from_ref_time(149_447).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Prime (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: Council Proposals (r:1 w:1) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Minimum execution time: 50_001 nanoseconds. + Weight::from_ref_time(51_987_088) + // Standard Error: 184 + .saturating_add(Weight::from_ref_time(2_439).saturating_mul(b.into())) + // Standard Error: 1_951 + .saturating_add(Weight::from_ref_time(15_663).saturating_mul(m.into())) + // Standard Error: 1_902 + .saturating_add(Weight::from_ref_time(166_471).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Council Proposals (r:1 w:1) + // Storage: Council Voting (r:0 w:1) + // Storage: Council ProposalOf (r:0 w:1) + /// The range of component `p` is `[1, 100]`. + fn disapprove_proposal(p: u32, ) -> Weight { + // Minimum execution time: 22_553 nanoseconds. + Weight::from_ref_time(26_103_691) + // Standard Error: 2_005 + .saturating_add(Weight::from_ref_time(147_575).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(3)) + } } diff --git a/runtime/dolphin/src/weights/pallet_democracy.rs b/runtime/dolphin/src/weights/pallet_democracy.rs index 260adf7b0..c3d81e242 100644 --- a/runtime/dolphin/src/weights/pallet_democracy.rs +++ b/runtime/dolphin/src/weights/pallet_democracy.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_democracy //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024 // Executed Command: @@ -40,33 +40,30 @@ #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; +use manta_primitives::constants::RocksDbWeight; /// Weight functions needed for pallet_democracy. pub trait WeightInfo { fn propose() -> Weight; - fn second(s: u32, ) -> Weight; - fn vote_new(r: u32, ) -> Weight; - fn vote_existing(r: u32, ) -> Weight; + fn second() -> Weight; + fn vote_new() -> Weight; + fn vote_existing() -> Weight; fn emergency_cancel() -> Weight; - fn blacklist(p: u32, ) -> Weight; - fn external_propose(v: u32, ) -> Weight; + fn blacklist() -> Weight; + fn external_propose() -> Weight; fn external_propose_majority() -> Weight; fn external_propose_default() -> Weight; fn fast_track() -> Weight; - fn veto_external(v: u32, ) -> Weight; - fn cancel_proposal(p: u32, ) -> Weight; + fn veto_external() -> Weight; + fn cancel_proposal() -> Weight; fn cancel_referendum() -> Weight; - fn cancel_queued(r: u32, ) -> Weight; fn on_initialize_base(r: u32, ) -> Weight; fn on_initialize_base_with_launch_period(r: u32, ) -> Weight; fn delegate(r: u32, ) -> Weight; fn undelegate(r: u32, ) -> Weight; fn clear_public_proposals() -> Weight; - fn note_preimage(b: u32, ) -> Weight; - fn note_imminent_preimage(b: u32, ) -> Weight; - fn reap_preimage(b: u32, ) -> Weight; fn unlock_remove(r: u32, ) -> Weight; fn unlock_set(r: u32, ) -> Weight; fn remove_vote(r: u32, ) -> Weight; @@ -76,474 +73,438 @@ pub trait WeightInfo { /// Weights for pallet_democracy using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_democracy::WeightInfo for SubstrateWeight { - // Storage: Democracy PublicPropCount (r:1 w:1) - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:0) - // Storage: Democracy DepositOf (r:0 w:1) - fn propose() -> Weight { - (56_106_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy DepositOf (r:1 w:1) - fn second(s: u32, ) -> Weight { - (33_727_000 as Weight) - // Standard Error: 2_000 - .saturating_add((137_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - fn vote_new(r: u32, ) -> Weight { - (43_257_000 as Weight) - // Standard Error: 2_000 - .saturating_add((156_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - fn vote_existing(r: u32, ) -> Weight { - (42_486_000 as Weight) - // Standard Error: 2_000 - .saturating_add((168_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy Cancellations (r:1 w:1) - fn emergency_cancel() -> Weight { - (20_735_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy Blacklist (r:0 w:1) - // Storage: Democracy DepositOf (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn blacklist(p: u32, ) -> Weight { - (55_370_000 as Weight) - // Standard Error: 4_000 - .saturating_add((224_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) - } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:0) - fn external_propose(v: u32, ) -> Weight { - (12_403_000 as Weight) - // Standard Error: 0 - .saturating_add((41_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy NextExternal (r:0 w:1) - fn external_propose_majority() -> Weight { - (4_614_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy NextExternal (r:0 w:1) - fn external_propose_default() -> Weight { - (4_497_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:1) - // Storage: Democracy ReferendumInfoOf (r:0 w:1) - fn fast_track() -> Weight { - (22_580_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:1) - fn veto_external(v: u32, ) -> Weight { - (23_438_000 as Weight) - // Standard Error: 1_000 - .saturating_add((63_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy DepositOf (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn cancel_proposal(p: u32, ) -> Weight { - (42_438_000 as Weight) - // Standard Error: 2_000 - .saturating_add((207_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:0 w:1) - fn cancel_referendum() -> Weight { - (15_176_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - fn cancel_queued(r: u32, ) -> Weight { - (25_964_000 as Weight) - // Standard Error: 4_000 - .saturating_add((1_057_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy LowestUnbaked (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:0) - // Storage: Democracy ReferendumInfoOf (r:1 w:0) - fn on_initialize_base(r: u32, ) -> Weight { - (4_354_000 as Weight) - // Standard Error: 6_000 - .saturating_add((3_641_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy LowestUnbaked (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:0) - // Storage: Democracy LastTabledWasExternal (r:1 w:0) - // Storage: Democracy NextExternal (r:1 w:0) - // Storage: Democracy PublicProps (r:1 w:0) - // Storage: Democracy ReferendumInfoOf (r:1 w:0) - fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - (9_938_000 as Weight) - // Standard Error: 6_000 - .saturating_add((3_658_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy VotingOf (r:3 w:3) - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - fn delegate(r: u32, ) -> Weight { - (44_053_000 as Weight) - // Standard Error: 6_000 - .saturating_add((4_829_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) - } - // Storage: Democracy VotingOf (r:2 w:2) - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - fn undelegate(r: u32, ) -> Weight { - (24_146_000 as Weight) - // Standard Error: 6_000 - .saturating_add((4_854_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) - } - // Storage: Democracy PublicProps (r:0 w:1) - fn clear_public_proposals() -> Weight { - (5_458_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy Preimages (r:1 w:1) - fn note_preimage(b: u32, ) -> Weight { - (31_406_000 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy Preimages (r:1 w:1) - fn note_imminent_preimage(b: u32, ) -> Weight { - (21_708_000 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy Preimages (r:1 w:1) - // Storage: System Account (r:1 w:0) - fn reap_preimage(b: u32, ) -> Weight { - (31_062_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn unlock_remove(r: u32, ) -> Weight { - (28_341_000 as Weight) - // Standard Error: 1_000 - .saturating_add((58_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn unlock_set(r: u32, ) -> Weight { - (27_107_000 as Weight) - // Standard Error: 1_000 - .saturating_add((133_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - fn remove_vote(r: u32, ) -> Weight { - (17_424_000 as Weight) - // Standard Error: 1_000 - .saturating_add((143_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - fn remove_other_vote(r: u32, ) -> Weight { - (17_523_000 as Weight) - // Standard Error: 2_000 - .saturating_add((148_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } + // Storage: Democracy PublicPropCount (r:1 w:1) + // Storage: Democracy PublicProps (r:1 w:1) + // Storage: Democracy Blacklist (r:1 w:0) + // Storage: Democracy DepositOf (r:0 w:1) + fn propose() -> Weight { + // Minimum execution time: 51_373 nanoseconds. + Weight::from_ref_time(52_419_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Democracy DepositOf (r:1 w:1) + fn second() -> Weight { + // Minimum execution time: 45_095 nanoseconds. + Weight::from_ref_time(45_945_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + fn vote_new() -> Weight { + // Minimum execution time: 59_037 nanoseconds. + Weight::from_ref_time(60_032_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + fn vote_existing() -> Weight { + // Minimum execution time: 59_200 nanoseconds. + Weight::from_ref_time(59_999_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy Cancellations (r:1 w:1) + fn emergency_cancel() -> Weight { + // Minimum execution time: 23_929 nanoseconds. + Weight::from_ref_time(24_686_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Democracy PublicProps (r:1 w:1) + // Storage: Democracy DepositOf (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy Blacklist (r:0 w:1) + fn blacklist() -> Weight { + // Minimum execution time: 83_997 nanoseconds. + Weight::from_ref_time(86_567_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(6)) + } + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy Blacklist (r:1 w:0) + fn external_propose() -> Weight { + // Minimum execution time: 18_492 nanoseconds. + Weight::from_ref_time(18_927_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Democracy NextExternal (r:0 w:1) + fn external_propose_majority() -> Weight { + // Minimum execution time: 5_230 nanoseconds. + Weight::from_ref_time(5_392_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Democracy NextExternal (r:0 w:1) + fn external_propose_default() -> Weight { + // Minimum execution time: 16_198 nanoseconds. + Weight::from_ref_time(16_614_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy ReferendumCount (r:1 w:1) + // Storage: Democracy ReferendumInfoOf (r:0 w:1) + fn fast_track() -> Weight { + // Minimum execution time: 31_976 nanoseconds. + Weight::from_ref_time(48_402_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy Blacklist (r:1 w:1) + fn veto_external() -> Weight { + // Minimum execution time: 29_838 nanoseconds. + Weight::from_ref_time(30_851_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Democracy PublicProps (r:1 w:1) + // Storage: Democracy DepositOf (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn cancel_proposal() -> Weight { + // Minimum execution time: 70_165 nanoseconds. + Weight::from_ref_time(72_204_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Democracy ReferendumInfoOf (r:0 w:1) + fn cancel_referendum() -> Weight { + // Minimum execution time: 15_060 nanoseconds. + Weight::from_ref_time(15_739_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Democracy LowestUnbaked (r:1 w:1) + // Storage: Democracy ReferendumCount (r:1 w:0) + // Storage: Democracy ReferendumInfoOf (r:2 w:0) + /// The range of component `r` is `[0, 99]`. + fn on_initialize_base(r: u32, ) -> Weight { + // Minimum execution time: 7_318 nanoseconds. + Weight::from_ref_time(9_885_622) + // Standard Error: 8_730 + .saturating_add(Weight::from_ref_time(2_501_031).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Democracy LowestUnbaked (r:1 w:1) + // Storage: Democracy ReferendumCount (r:1 w:0) + // Storage: Democracy LastTabledWasExternal (r:1 w:0) + // Storage: Democracy NextExternal (r:1 w:0) + // Storage: Democracy PublicProps (r:1 w:0) + // Storage: Democracy ReferendumInfoOf (r:2 w:0) + /// The range of component `r` is `[0, 99]`. + fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { + // Minimum execution time: 10_118 nanoseconds. + Weight::from_ref_time(12_709_639) + // Standard Error: 8_773 + .saturating_add(Weight::from_ref_time(2_520_038).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Democracy VotingOf (r:3 w:3) + // Storage: Balances Locks (r:1 w:1) + // Storage: Democracy ReferendumInfoOf (r:2 w:2) + /// The range of component `r` is `[0, 99]`. + fn delegate(r: u32, ) -> Weight { + // Minimum execution time: 47_747 nanoseconds. + Weight::from_ref_time(55_540_686) + // Standard Error: 12_661 + .saturating_add(Weight::from_ref_time(3_545_048).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) + } + // Storage: Democracy VotingOf (r:2 w:2) + // Storage: Democracy ReferendumInfoOf (r:2 w:2) + /// The range of component `r` is `[0, 99]`. + fn undelegate(r: u32, ) -> Weight { + // Minimum execution time: 29_243 nanoseconds. + Weight::from_ref_time(33_219_372) + // Standard Error: 10_072 + .saturating_add(Weight::from_ref_time(3_526_499).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) + } + // Storage: Democracy PublicProps (r:0 w:1) + fn clear_public_proposals() -> Weight { + // Minimum execution time: 5_515 nanoseconds. + Weight::from_ref_time(5_707_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + /// The range of component `r` is `[0, 99]`. + fn unlock_remove(r: u32, ) -> Weight { + // Minimum execution time: 27_121 nanoseconds. + Weight::from_ref_time(34_441_606) + // Standard Error: 2_288 + .saturating_add(Weight::from_ref_time(62_484).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + /// The range of component `r` is `[0, 99]`. + fn unlock_set(r: u32, ) -> Weight { + // Minimum execution time: 31_811 nanoseconds. + Weight::from_ref_time(33_668_053) + // Standard Error: 1_769 + .saturating_add(Weight::from_ref_time(108_998).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + /// The range of component `r` is `[1, 100]`. + fn remove_vote(r: u32, ) -> Weight { + // Minimum execution time: 17_942 nanoseconds. + Weight::from_ref_time(20_482_622) + // Standard Error: 1_775 + .saturating_add(Weight::from_ref_time(112_720).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + /// The range of component `r` is `[1, 100]`. + fn remove_other_vote(r: u32, ) -> Weight { + // Minimum execution time: 18_134 nanoseconds. + Weight::from_ref_time(20_261_839) + // Standard Error: 1_452 + .saturating_add(Weight::from_ref_time(116_219).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Democracy PublicPropCount (r:1 w:1) - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:0) - // Storage: Democracy DepositOf (r:0 w:1) - fn propose() -> Weight { - (56_106_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy DepositOf (r:1 w:1) - fn second(s: u32, ) -> Weight { - (33_727_000 as Weight) - // Standard Error: 2_000 - .saturating_add((137_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - fn vote_new(r: u32, ) -> Weight { - (43_257_000 as Weight) - // Standard Error: 2_000 - .saturating_add((156_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - fn vote_existing(r: u32, ) -> Weight { - (42_486_000 as Weight) - // Standard Error: 2_000 - .saturating_add((168_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy Cancellations (r:1 w:1) - fn emergency_cancel() -> Weight { - (20_735_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy Blacklist (r:0 w:1) - // Storage: Democracy DepositOf (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn blacklist(p: u32, ) -> Weight { - (55_370_000 as Weight) - // Standard Error: 4_000 - .saturating_add((224_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) - } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:0) - fn external_propose(v: u32, ) -> Weight { - (12_403_000 as Weight) - // Standard Error: 0 - .saturating_add((41_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy NextExternal (r:0 w:1) - fn external_propose_majority() -> Weight { - (4_614_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy NextExternal (r:0 w:1) - fn external_propose_default() -> Weight { - (4_497_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:1) - // Storage: Democracy ReferendumInfoOf (r:0 w:1) - fn fast_track() -> Weight { - (22_580_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:1) - fn veto_external(v: u32, ) -> Weight { - (23_438_000 as Weight) - // Standard Error: 1_000 - .saturating_add((63_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy DepositOf (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn cancel_proposal(p: u32, ) -> Weight { - (42_438_000 as Weight) - // Standard Error: 2_000 - .saturating_add((207_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:0 w:1) - fn cancel_referendum() -> Weight { - (15_176_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - fn cancel_queued(r: u32, ) -> Weight { - (25_964_000 as Weight) - // Standard Error: 4_000 - .saturating_add((1_057_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy LowestUnbaked (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:0) - // Storage: Democracy ReferendumInfoOf (r:1 w:0) - fn on_initialize_base(r: u32, ) -> Weight { - (4_354_000 as Weight) - // Standard Error: 6_000 - .saturating_add((3_641_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy LowestUnbaked (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:0) - // Storage: Democracy LastTabledWasExternal (r:1 w:0) - // Storage: Democracy NextExternal (r:1 w:0) - // Storage: Democracy PublicProps (r:1 w:0) - // Storage: Democracy ReferendumInfoOf (r:1 w:0) - fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - (9_938_000 as Weight) - // Standard Error: 6_000 - .saturating_add((3_658_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy VotingOf (r:3 w:3) - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - fn delegate(r: u32, ) -> Weight { - (44_053_000 as Weight) - // Standard Error: 6_000 - .saturating_add((4_829_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) - } - // Storage: Democracy VotingOf (r:2 w:2) - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - fn undelegate(r: u32, ) -> Weight { - (24_146_000 as Weight) - // Standard Error: 6_000 - .saturating_add((4_854_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) - } - // Storage: Democracy PublicProps (r:0 w:1) - fn clear_public_proposals() -> Weight { - (5_458_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy Preimages (r:1 w:1) - fn note_preimage(b: u32, ) -> Weight { - (31_406_000 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy Preimages (r:1 w:1) - fn note_imminent_preimage(b: u32, ) -> Weight { - (21_708_000 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy Preimages (r:1 w:1) - // Storage: System Account (r:1 w:0) - fn reap_preimage(b: u32, ) -> Weight { - (31_062_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn unlock_remove(r: u32, ) -> Weight { - (28_341_000 as Weight) - // Standard Error: 1_000 - .saturating_add((58_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn unlock_set(r: u32, ) -> Weight { - (27_107_000 as Weight) - // Standard Error: 1_000 - .saturating_add((133_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - fn remove_vote(r: u32, ) -> Weight { - (17_424_000 as Weight) - // Standard Error: 1_000 - .saturating_add((143_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - fn remove_other_vote(r: u32, ) -> Weight { - (17_523_000 as Weight) - // Standard Error: 2_000 - .saturating_add((148_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } + // Storage: Democracy PublicPropCount (r:1 w:1) + // Storage: Democracy PublicProps (r:1 w:1) + // Storage: Democracy Blacklist (r:1 w:0) + // Storage: Democracy DepositOf (r:0 w:1) + fn propose() -> Weight { + // Minimum execution time: 51_373 nanoseconds. + Weight::from_ref_time(52_419_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Democracy DepositOf (r:1 w:1) + fn second() -> Weight { + // Minimum execution time: 45_095 nanoseconds. + Weight::from_ref_time(45_945_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + fn vote_new() -> Weight { + // Minimum execution time: 59_037 nanoseconds. + Weight::from_ref_time(60_032_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + fn vote_existing() -> Weight { + // Minimum execution time: 59_200 nanoseconds. + Weight::from_ref_time(59_999_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy Cancellations (r:1 w:1) + fn emergency_cancel() -> Weight { + // Minimum execution time: 23_929 nanoseconds. + Weight::from_ref_time(24_686_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Democracy PublicProps (r:1 w:1) + // Storage: Democracy DepositOf (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy Blacklist (r:0 w:1) + fn blacklist() -> Weight { + // Minimum execution time: 83_997 nanoseconds. + Weight::from_ref_time(86_567_000) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(6)) + } + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy Blacklist (r:1 w:0) + fn external_propose() -> Weight { + // Minimum execution time: 18_492 nanoseconds. + Weight::from_ref_time(18_927_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Democracy NextExternal (r:0 w:1) + fn external_propose_majority() -> Weight { + // Minimum execution time: 5_230 nanoseconds. + Weight::from_ref_time(5_392_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Democracy NextExternal (r:0 w:1) + fn external_propose_default() -> Weight { + // Minimum execution time: 16_198 nanoseconds. + Weight::from_ref_time(16_614_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy ReferendumCount (r:1 w:1) + // Storage: Democracy ReferendumInfoOf (r:0 w:1) + fn fast_track() -> Weight { + // Minimum execution time: 31_976 nanoseconds. + Weight::from_ref_time(48_402_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy Blacklist (r:1 w:1) + fn veto_external() -> Weight { + // Minimum execution time: 29_838 nanoseconds. + Weight::from_ref_time(30_851_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Democracy PublicProps (r:1 w:1) + // Storage: Democracy DepositOf (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn cancel_proposal() -> Weight { + // Minimum execution time: 70_165 nanoseconds. + Weight::from_ref_time(72_204_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Democracy ReferendumInfoOf (r:0 w:1) + fn cancel_referendum() -> Weight { + // Minimum execution time: 15_060 nanoseconds. + Weight::from_ref_time(15_739_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Democracy LowestUnbaked (r:1 w:1) + // Storage: Democracy ReferendumCount (r:1 w:0) + // Storage: Democracy ReferendumInfoOf (r:2 w:0) + /// The range of component `r` is `[0, 99]`. + fn on_initialize_base(r: u32, ) -> Weight { + // Minimum execution time: 7_318 nanoseconds. + Weight::from_ref_time(9_885_622) + // Standard Error: 8_730 + .saturating_add(Weight::from_ref_time(2_501_031).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Democracy LowestUnbaked (r:1 w:1) + // Storage: Democracy ReferendumCount (r:1 w:0) + // Storage: Democracy LastTabledWasExternal (r:1 w:0) + // Storage: Democracy NextExternal (r:1 w:0) + // Storage: Democracy PublicProps (r:1 w:0) + // Storage: Democracy ReferendumInfoOf (r:2 w:0) + /// The range of component `r` is `[0, 99]`. + fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { + // Minimum execution time: 10_118 nanoseconds. + Weight::from_ref_time(12_709_639) + // Standard Error: 8_773 + .saturating_add(Weight::from_ref_time(2_520_038).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Democracy VotingOf (r:3 w:3) + // Storage: Balances Locks (r:1 w:1) + // Storage: Democracy ReferendumInfoOf (r:2 w:2) + /// The range of component `r` is `[0, 99]`. + fn delegate(r: u32, ) -> Weight { + // Minimum execution time: 47_747 nanoseconds. + Weight::from_ref_time(55_540_686) + // Standard Error: 12_661 + .saturating_add(Weight::from_ref_time(3_545_048).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(RocksDbWeight::get().writes(4)) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into()))) + } + // Storage: Democracy VotingOf (r:2 w:2) + // Storage: Democracy ReferendumInfoOf (r:2 w:2) + /// The range of component `r` is `[0, 99]`. + fn undelegate(r: u32, ) -> Weight { + // Minimum execution time: 29_243 nanoseconds. + Weight::from_ref_time(33_219_372) + // Standard Error: 10_072 + .saturating_add(Weight::from_ref_time(3_526_499).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(RocksDbWeight::get().writes(2)) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into()))) + } + // Storage: Democracy PublicProps (r:0 w:1) + fn clear_public_proposals() -> Weight { + // Minimum execution time: 5_515 nanoseconds. + Weight::from_ref_time(5_707_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + /// The range of component `r` is `[0, 99]`. + fn unlock_remove(r: u32, ) -> Weight { + // Minimum execution time: 27_121 nanoseconds. + Weight::from_ref_time(34_441_606) + // Standard Error: 2_288 + .saturating_add(Weight::from_ref_time(62_484).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + /// The range of component `r` is `[0, 99]`. + fn unlock_set(r: u32, ) -> Weight { + // Minimum execution time: 31_811 nanoseconds. + Weight::from_ref_time(33_668_053) + // Standard Error: 1_769 + .saturating_add(Weight::from_ref_time(108_998).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + /// The range of component `r` is `[1, 100]`. + fn remove_vote(r: u32, ) -> Weight { + // Minimum execution time: 17_942 nanoseconds. + Weight::from_ref_time(20_482_622) + // Standard Error: 1_775 + .saturating_add(Weight::from_ref_time(112_720).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + /// The range of component `r` is `[1, 100]`. + fn remove_other_vote(r: u32, ) -> Weight { + // Minimum execution time: 18_134 nanoseconds. + Weight::from_ref_time(20_261_839) + // Standard Error: 1_452 + .saturating_add(Weight::from_ref_time(116_219).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } } diff --git a/runtime/dolphin/src/weights/pallet_manta_pay.rs b/runtime/dolphin/src/weights/pallet_manta_pay.rs index 74d9127a5..f94a32e48 100644 --- a/runtime/dolphin/src/weights/pallet_manta_pay.rs +++ b/runtime/dolphin/src/weights/pallet_manta_pay.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_manta_pay //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024 // Executed Command: @@ -40,8 +40,9 @@ #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; +use manta_primitives::constants::RocksDbWeight; /// Weight functions needed for pallet_manta_pay. pub trait WeightInfo { @@ -54,98 +55,108 @@ pub trait WeightInfo { /// Weights for pallet_manta_pay using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_manta_pay::WeightInfo for SubstrateWeight { - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: MantaPay UtxoSet (r:1 w:1) - // Storage: MantaPay NullifierSetSize (r:1 w:0) - // Storage: MantaPay ShardTrees (r:1 w:1) - // Storage: MantaPay UtxoAccumulatorOutputs (r:0 w:1) - // Storage: MantaPay Shards (r:0 w:1) - fn to_private() -> Weight { - (39_661_777_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: MantaPay UtxoAccumulatorOutputs (r:2 w:1) - // Storage: MantaPay NullifierCommitmentSet (r:2 w:2) - // Storage: MantaPay UtxoSet (r:1 w:1) - // Storage: MantaPay NullifierSetSize (r:1 w:1) - // Storage: MantaPay ShardTrees (r:1 w:1) - // Storage: MantaPay NullifierSetInsertionOrder (r:0 w:2) - // Storage: MantaPay Shards (r:0 w:1) - fn to_public() -> Weight { - (52_765_532_000 as Weight) - .saturating_add(T::DbWeight::get().reads(10 as Weight)) - .saturating_add(T::DbWeight::get().writes(12 as Weight)) - } - // Storage: MantaPay UtxoAccumulatorOutputs (r:2 w:2) - // Storage: MantaPay NullifierCommitmentSet (r:2 w:2) - // Storage: MantaPay UtxoSet (r:2 w:2) - // Storage: MantaPay NullifierSetSize (r:1 w:1) - // Storage: MantaPay ShardTrees (r:2 w:2) - // Storage: MantaPay NullifierSetInsertionOrder (r:0 w:2) - // Storage: MantaPay Shards (r:0 w:2) - fn private_transfer() -> Weight { - (70_741_924_000 as Weight) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().writes(13 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - fn public_transfer() -> Weight { - (44_810_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: MantaPay UtxoSet (r:1 w:1) + // Storage: MantaPay NullifierSetSize (r:1 w:0) + // Storage: MantaPay ShardTrees (r:1 w:1) + // Storage: MantaPay UtxoAccumulatorOutputs (r:0 w:1) + // Storage: MantaPay Shards (r:0 w:1) + fn to_private() -> Weight { + // Minimum execution time: 39_532_346 nanoseconds. + Weight::from_ref_time(39_546_794_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(7)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: MantaPay UtxoAccumulatorOutputs (r:2 w:1) + // Storage: MantaPay NullifierCommitmentSet (r:2 w:2) + // Storage: MantaPay UtxoSet (r:1 w:1) + // Storage: MantaPay NullifierSetSize (r:1 w:1) + // Storage: MantaPay ShardTrees (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: MantaPay NullifierSetInsertionOrder (r:0 w:2) + // Storage: MantaPay Shards (r:0 w:1) + fn to_public() -> Weight { + // Minimum execution time: 52_745_571 nanoseconds. + Weight::from_ref_time(52_762_020_000) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(13)) + } + // Storage: MantaPay UtxoAccumulatorOutputs (r:2 w:2) + // Storage: MantaPay NullifierCommitmentSet (r:2 w:2) + // Storage: MantaPay UtxoSet (r:2 w:2) + // Storage: MantaPay NullifierSetSize (r:1 w:1) + // Storage: MantaPay ShardTrees (r:2 w:2) + // Storage: MantaPay NullifierSetInsertionOrder (r:0 w:2) + // Storage: MantaPay Shards (r:0 w:2) + fn private_transfer() -> Weight { + // Minimum execution time: 70_101_552 nanoseconds. + Weight::from_ref_time(70_112_351_000) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(13)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + fn public_transfer() -> Weight { + // Minimum execution time: 49_653 nanoseconds. + Weight::from_ref_time(50_260_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: MantaPay UtxoSet (r:1 w:1) - // Storage: MantaPay NullifierSetSize (r:1 w:0) - // Storage: MantaPay ShardTrees (r:1 w:1) - // Storage: MantaPay UtxoAccumulatorOutputs (r:0 w:1) - // Storage: MantaPay Shards (r:0 w:1) - fn to_private() -> Weight { - (39_661_777_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(7 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: MantaPay UtxoAccumulatorOutputs (r:2 w:1) - // Storage: MantaPay NullifierCommitmentSet (r:2 w:2) - // Storage: MantaPay UtxoSet (r:1 w:1) - // Storage: MantaPay NullifierSetSize (r:1 w:1) - // Storage: MantaPay ShardTrees (r:1 w:1) - // Storage: MantaPay NullifierSetInsertionOrder (r:0 w:2) - // Storage: MantaPay Shards (r:0 w:1) - fn to_public() -> Weight { - (52_765_532_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(10 as Weight)) - .saturating_add(RocksDbWeight::get().writes(12 as Weight)) - } - // Storage: MantaPay UtxoAccumulatorOutputs (r:2 w:2) - // Storage: MantaPay NullifierCommitmentSet (r:2 w:2) - // Storage: MantaPay UtxoSet (r:2 w:2) - // Storage: MantaPay NullifierSetSize (r:1 w:1) - // Storage: MantaPay ShardTrees (r:2 w:2) - // Storage: MantaPay NullifierSetInsertionOrder (r:0 w:2) - // Storage: MantaPay Shards (r:0 w:2) - fn private_transfer() -> Weight { - (70_741_924_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(9 as Weight)) - .saturating_add(RocksDbWeight::get().writes(13 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - fn public_transfer() -> Weight { - (44_810_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: MantaPay UtxoSet (r:1 w:1) + // Storage: MantaPay NullifierSetSize (r:1 w:0) + // Storage: MantaPay ShardTrees (r:1 w:1) + // Storage: MantaPay UtxoAccumulatorOutputs (r:0 w:1) + // Storage: MantaPay Shards (r:0 w:1) + fn to_private() -> Weight { + // Minimum execution time: 39_532_346 nanoseconds. + Weight::from_ref_time(39_546_794_000) + .saturating_add(RocksDbWeight::get().reads(6)) + .saturating_add(RocksDbWeight::get().writes(7)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: MantaPay UtxoAccumulatorOutputs (r:2 w:1) + // Storage: MantaPay NullifierCommitmentSet (r:2 w:2) + // Storage: MantaPay UtxoSet (r:1 w:1) + // Storage: MantaPay NullifierSetSize (r:1 w:1) + // Storage: MantaPay ShardTrees (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: MantaPay NullifierSetInsertionOrder (r:0 w:2) + // Storage: MantaPay Shards (r:0 w:1) + fn to_public() -> Weight { + // Minimum execution time: 52_745_571 nanoseconds. + Weight::from_ref_time(52_762_020_000) + .saturating_add(RocksDbWeight::get().reads(11)) + .saturating_add(RocksDbWeight::get().writes(13)) + } + // Storage: MantaPay UtxoAccumulatorOutputs (r:2 w:2) + // Storage: MantaPay NullifierCommitmentSet (r:2 w:2) + // Storage: MantaPay UtxoSet (r:2 w:2) + // Storage: MantaPay NullifierSetSize (r:1 w:1) + // Storage: MantaPay ShardTrees (r:2 w:2) + // Storage: MantaPay NullifierSetInsertionOrder (r:0 w:2) + // Storage: MantaPay Shards (r:0 w:2) + fn private_transfer() -> Weight { + // Minimum execution time: 70_101_552 nanoseconds. + Weight::from_ref_time(70_112_351_000) + .saturating_add(RocksDbWeight::get().reads(9)) + .saturating_add(RocksDbWeight::get().writes(13)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + fn public_transfer() -> Weight { + // Minimum execution time: 49_653 nanoseconds. + Weight::from_ref_time(50_260_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } } diff --git a/runtime/dolphin/src/weights/pallet_manta_sbt.rs b/runtime/dolphin/src/weights/pallet_manta_sbt.rs new file mode 100644 index 000000000..55945b075 --- /dev/null +++ b/runtime/dolphin/src/weights/pallet_manta_sbt.rs @@ -0,0 +1,182 @@ +// Copyright 2020-2023 Manta Network. +// This file is part of Manta. +// +// Manta is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Manta 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 General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Manta. If not, see . + +//! Autogenerated weights for pallet_manta_sbt +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/production/manta +// benchmark +// pallet +// --chain=dolphin-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_manta_sbt +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./scripts/benchmarking/frame-weights-output/pallet_manta_sbt.rs +// --template=.github/resources/frame-weight-template.hbs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(clippy::unnecessary_cast)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; +use manta_primitives::constants::RocksDbWeight; + +/// Weight functions needed for pallet_manta_sbt. +pub trait WeightInfo { + fn to_private() -> Weight; + fn reserve_sbt() -> Weight; + fn change_allowlist_account() -> Weight; + fn allowlist_evm_account() -> Weight; + fn set_mint_chain_info() -> Weight; + fn mint_sbt_eth() -> Weight; +} + +/// Weights for pallet_manta_sbt using the Substrate node and recommended hardware. +pub struct SubstrateWeight(PhantomData); +impl pallet_manta_sbt::WeightInfo for SubstrateWeight { + // Storage: MantaSbt ReservedIds (r:1 w:1) + // Storage: MantaSbt UtxoSet (r:1 w:1) + // Storage: MantaSbt ShardTrees (r:1 w:1) + // Storage: MantaSbt UtxoAccumulatorOutputs (r:0 w:1) + // Storage: MantaSbt SbtMetadata (r:0 w:1) + // Storage: MantaSbt Shards (r:0 w:1) + fn to_private() -> Weight { + // Minimum execution time: 39_306_220 nanoseconds. + Weight::from_ref_time(39_327_198_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(6)) + } + // Storage: System Account (r:1 w:1) + // Storage: MantaSbt NextSbtId (r:1 w:1) + // Storage: MantaSbt ReservedIds (r:0 w:1) + fn reserve_sbt() -> Weight { + // Minimum execution time: 96_792 nanoseconds. + Weight::from_ref_time(98_693_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: MantaSbt AllowlistAccount (r:0 w:1) + fn change_allowlist_account() -> Weight { + // Minimum execution time: 20_853 nanoseconds. + Weight::from_ref_time(21_511_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: MantaSbt MintChainInfos (r:1 w:0) + // Storage: Timestamp Now (r:1 w:0) + // Storage: MantaSbt AllowlistAccount (r:1 w:0) + // Storage: MantaSbt EvmAddressAllowlist (r:1 w:1) + // Storage: MantaSbt NextSbtId (r:1 w:1) + fn allowlist_evm_account() -> Weight { + // Minimum execution time: 29_502 nanoseconds. + Weight::from_ref_time(30_448_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: MantaSbt MintChainInfos (r:0 w:1) + fn set_mint_chain_info() -> Weight { + // Minimum execution time: 16_745 nanoseconds. + Weight::from_ref_time(17_237_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: MantaSbt MintChainInfos (r:1 w:0) + // Storage: Timestamp Now (r:1 w:0) + // Storage: System BlockHash (r:1 w:0) + // Storage: MantaSbt EvmAddressAllowlist (r:1 w:1) + // Storage: MantaSbt UtxoSet (r:1 w:1) + // Storage: MantaSbt ShardTrees (r:1 w:1) + // Storage: MantaSbt UtxoAccumulatorOutputs (r:0 w:1) + // Storage: MantaSbt SbtMetadata (r:0 w:1) + // Storage: MantaSbt Shards (r:0 w:1) + fn mint_sbt_eth() -> Weight { + // Minimum execution time: 39_373_883 nanoseconds. + Weight::from_ref_time(39_416_396_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(6)) + } +} + +// For backwards compatibility and tests +impl WeightInfo for () { + // Storage: MantaSbt ReservedIds (r:1 w:1) + // Storage: MantaSbt UtxoSet (r:1 w:1) + // Storage: MantaSbt ShardTrees (r:1 w:1) + // Storage: MantaSbt UtxoAccumulatorOutputs (r:0 w:1) + // Storage: MantaSbt SbtMetadata (r:0 w:1) + // Storage: MantaSbt Shards (r:0 w:1) + fn to_private() -> Weight { + // Minimum execution time: 39_306_220 nanoseconds. + Weight::from_ref_time(39_327_198_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(6)) + } + // Storage: System Account (r:1 w:1) + // Storage: MantaSbt NextSbtId (r:1 w:1) + // Storage: MantaSbt ReservedIds (r:0 w:1) + fn reserve_sbt() -> Weight { + // Minimum execution time: 96_792 nanoseconds. + Weight::from_ref_time(98_693_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: MantaSbt AllowlistAccount (r:0 w:1) + fn change_allowlist_account() -> Weight { + // Minimum execution time: 20_853 nanoseconds. + Weight::from_ref_time(21_511_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: MantaSbt MintChainInfos (r:1 w:0) + // Storage: Timestamp Now (r:1 w:0) + // Storage: MantaSbt AllowlistAccount (r:1 w:0) + // Storage: MantaSbt EvmAddressAllowlist (r:1 w:1) + // Storage: MantaSbt NextSbtId (r:1 w:1) + fn allowlist_evm_account() -> Weight { + // Minimum execution time: 29_502 nanoseconds. + Weight::from_ref_time(30_448_000) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: MantaSbt MintChainInfos (r:0 w:1) + fn set_mint_chain_info() -> Weight { + // Minimum execution time: 16_745 nanoseconds. + Weight::from_ref_time(17_237_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: MantaSbt MintChainInfos (r:1 w:0) + // Storage: Timestamp Now (r:1 w:0) + // Storage: System BlockHash (r:1 w:0) + // Storage: MantaSbt EvmAddressAllowlist (r:1 w:1) + // Storage: MantaSbt UtxoSet (r:1 w:1) + // Storage: MantaSbt ShardTrees (r:1 w:1) + // Storage: MantaSbt UtxoAccumulatorOutputs (r:0 w:1) + // Storage: MantaSbt SbtMetadata (r:0 w:1) + // Storage: MantaSbt Shards (r:0 w:1) + fn mint_sbt_eth() -> Weight { + // Minimum execution time: 39_373_883 nanoseconds. + Weight::from_ref_time(39_416_396_000) + .saturating_add(RocksDbWeight::get().reads(6)) + .saturating_add(RocksDbWeight::get().writes(6)) + } +} diff --git a/runtime/dolphin/src/weights/pallet_membership.rs b/runtime/dolphin/src/weights/pallet_membership.rs index e6210d692..fbf17b3ef 100644 --- a/runtime/dolphin/src/weights/pallet_membership.rs +++ b/runtime/dolphin/src/weights/pallet_membership.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_membership //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024 // Executed Command: @@ -40,8 +40,9 @@ #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; +use manta_primitives::constants::RocksDbWeight; /// Weight functions needed for pallet_membership. pub trait WeightInfo { @@ -57,162 +58,170 @@ pub trait WeightInfo { /// Weights for pallet_membership using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_membership::WeightInfo for SubstrateWeight { - // Storage: CouncilMembership Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: Council Members (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn add_member(m: u32, ) -> Weight { - (16_269_000 as Weight) - // Standard Error: 0 - .saturating_add((66_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: CouncilMembership Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: CouncilMembership Prime (r:1 w:0) - // Storage: Council Members (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn remove_member(m: u32, ) -> Weight { - (19_294_000 as Weight) - // Standard Error: 1_000 - .saturating_add((65_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: CouncilMembership Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: CouncilMembership Prime (r:1 w:0) - // Storage: Council Members (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn swap_member(m: u32, ) -> Weight { - (19_450_000 as Weight) - // Standard Error: 1_000 - .saturating_add((74_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: CouncilMembership Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: CouncilMembership Prime (r:1 w:0) - // Storage: Council Members (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn reset_member(m: u32, ) -> Weight { - (19_260_000 as Weight) - // Standard Error: 1_000 - .saturating_add((199_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: CouncilMembership Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: CouncilMembership Prime (r:1 w:1) - // Storage: Council Members (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn change_key(m: u32, ) -> Weight { - (19_950_000 as Weight) - // Standard Error: 1_000 - .saturating_add((74_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - // Storage: CouncilMembership Members (r:1 w:0) - // Storage: CouncilMembership Prime (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn set_prime(m: u32, ) -> Weight { - (5_575_000 as Weight) - // Standard Error: 0 - .saturating_add((36_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: CouncilMembership Prime (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn clear_prime(m: u32, ) -> Weight { - (2_166_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[1, 99]`. + fn add_member(_m: u32, ) -> Weight { + // Minimum execution time: 23_362 nanoseconds. + Weight::from_ref_time(27_244_542) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[2, 100]`. + fn remove_member(m: u32, ) -> Weight { + // Minimum execution time: 25_202 nanoseconds. + Weight::from_ref_time(29_279_289) + // Standard Error: 14_514 + .saturating_add(Weight::from_ref_time(45_835).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[2, 100]`. + fn swap_member(_m: u32, ) -> Weight { + // Minimum execution time: 25_038 nanoseconds. + Weight::from_ref_time(35_760_442) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. + fn reset_member(m: u32, ) -> Weight { + // Minimum execution time: 26_324 nanoseconds. + Weight::from_ref_time(29_001_861) + // Standard Error: 18_359 + .saturating_add(Weight::from_ref_time(208_006).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:1) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. + fn change_key(_m: u32, ) -> Weight { + // Minimum execution time: 26_483 nanoseconds. + Weight::from_ref_time(34_741_915) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: CouncilMembership Members (r:1 w:0) + // Storage: CouncilMembership Prime (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. + fn set_prime(_m: u32, ) -> Weight { + // Minimum execution time: 10_464 nanoseconds. + Weight::from_ref_time(17_367_997) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: CouncilMembership Prime (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. + fn clear_prime(_m: u32, ) -> Weight { + // Minimum execution time: 5_044 nanoseconds. + Weight::from_ref_time(8_517_154) + .saturating_add(T::DbWeight::get().writes(2)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: CouncilMembership Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: Council Members (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn add_member(m: u32, ) -> Weight { - (16_269_000 as Weight) - // Standard Error: 0 - .saturating_add((66_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: CouncilMembership Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: CouncilMembership Prime (r:1 w:0) - // Storage: Council Members (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn remove_member(m: u32, ) -> Weight { - (19_294_000 as Weight) - // Standard Error: 1_000 - .saturating_add((65_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: CouncilMembership Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: CouncilMembership Prime (r:1 w:0) - // Storage: Council Members (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn swap_member(m: u32, ) -> Weight { - (19_450_000 as Weight) - // Standard Error: 1_000 - .saturating_add((74_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: CouncilMembership Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: CouncilMembership Prime (r:1 w:0) - // Storage: Council Members (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn reset_member(m: u32, ) -> Weight { - (19_260_000 as Weight) - // Standard Error: 1_000 - .saturating_add((199_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: CouncilMembership Members (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: CouncilMembership Prime (r:1 w:1) - // Storage: Council Members (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn change_key(m: u32, ) -> Weight { - (19_950_000 as Weight) - // Standard Error: 1_000 - .saturating_add((74_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - // Storage: CouncilMembership Members (r:1 w:0) - // Storage: CouncilMembership Prime (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn set_prime(m: u32, ) -> Weight { - (5_575_000 as Weight) - // Standard Error: 0 - .saturating_add((36_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: CouncilMembership Prime (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - fn clear_prime(m: u32, ) -> Weight { - (2_166_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[1, 99]`. + fn add_member(_m: u32, ) -> Weight { + // Minimum execution time: 23_362 nanoseconds. + Weight::from_ref_time(27_244_542) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[2, 100]`. + fn remove_member(m: u32, ) -> Weight { + // Minimum execution time: 25_202 nanoseconds. + Weight::from_ref_time(29_279_289) + // Standard Error: 14_514 + .saturating_add(Weight::from_ref_time(45_835).saturating_mul(m.into())) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[2, 100]`. + fn swap_member(_m: u32, ) -> Weight { + // Minimum execution time: 25_038 nanoseconds. + Weight::from_ref_time(35_760_442) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. + fn reset_member(m: u32, ) -> Weight { + // Minimum execution time: 26_324 nanoseconds. + Weight::from_ref_time(29_001_861) + // Standard Error: 18_359 + .saturating_add(Weight::from_ref_time(208_006).saturating_mul(m.into())) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:1) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. + fn change_key(_m: u32, ) -> Weight { + // Minimum execution time: 26_483 nanoseconds. + Weight::from_ref_time(34_741_915) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(4)) + } + // Storage: CouncilMembership Members (r:1 w:0) + // Storage: CouncilMembership Prime (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. + fn set_prime(_m: u32, ) -> Weight { + // Minimum execution time: 10_464 nanoseconds. + Weight::from_ref_time(17_367_997) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: CouncilMembership Prime (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. + fn clear_prime(_m: u32, ) -> Weight { + // Minimum execution time: 5_044 nanoseconds. + Weight::from_ref_time(8_517_154) + .saturating_add(RocksDbWeight::get().writes(2)) + } } diff --git a/runtime/dolphin/src/weights/pallet_multisig.rs b/runtime/dolphin/src/weights/pallet_multisig.rs index 549ec3681..f176b3f70 100644 --- a/runtime/dolphin/src/weights/pallet_multisig.rs +++ b/runtime/dolphin/src/weights/pallet_multisig.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_multisig //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024 // Executed Command: @@ -40,224 +40,184 @@ #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; +use manta_primitives::constants::RocksDbWeight; /// Weight functions needed for pallet_multisig. pub trait WeightInfo { fn as_multi_threshold_1(z: u32, ) -> Weight; fn as_multi_create(s: u32, z: u32, ) -> Weight; - fn as_multi_create_store(s: u32, z: u32, ) -> Weight; fn as_multi_approve(s: u32, z: u32, ) -> Weight; - fn as_multi_approve_store(s: u32, z: u32, ) -> Weight; fn as_multi_complete(s: u32, z: u32, ) -> Weight; fn approve_as_multi_create(s: u32, ) -> Weight; fn approve_as_multi_approve(s: u32, ) -> Weight; - fn approve_as_multi_complete(s: u32, ) -> Weight; fn cancel_as_multi(s: u32, ) -> Weight; } /// Weights for pallet_multisig using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_multisig::WeightInfo for SubstrateWeight { - fn as_multi_threshold_1(z: u32, ) -> Weight { - (20_200_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn as_multi_create(s: u32, z: u32, ) -> Weight { - (41_076_000 as Weight) - // Standard Error: 2_000 - .saturating_add((89_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (44_569_000 as Weight) - // Standard Error: 2_000 - .saturating_add((86_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (27_380_000 as Weight) - // Standard Error: 1_000 - .saturating_add((82_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (42_517_000 as Weight) - // Standard Error: 2_000 - .saturating_add((86_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (52_508_000 as Weight) - // Standard Error: 2_000 - .saturating_add((123_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn approve_as_multi_create(s: u32, ) -> Weight { - (35_263_000 as Weight) - // Standard Error: 2_000 - .saturating_add((128_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:0) - fn approve_as_multi_approve(s: u32, ) -> Weight { - (22_211_000 as Weight) - // Standard Error: 1_000 - .saturating_add((115_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn approve_as_multi_complete(s: u32, ) -> Weight { - (74_653_000 as Weight) - // Standard Error: 2_000 - .saturating_add((166_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - fn cancel_as_multi(s: u32, ) -> Weight { - (57_714_000 as Weight) - // Standard Error: 2_000 - .saturating_add((131_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } + /// The range of component `z` is `[0, 10000]`. + fn as_multi_threshold_1(z: u32, ) -> Weight { + // Minimum execution time: 17_705 nanoseconds. + Weight::from_ref_time(18_611_308) + // Standard Error: 10 + .saturating_add(Weight::from_ref_time(649).saturating_mul(z.into())) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_create(s: u32, z: u32, ) -> Weight { + // Minimum execution time: 52_394 nanoseconds. + Weight::from_ref_time(42_628_113) + // Standard Error: 7_162 + .saturating_add(Weight::from_ref_time(121_970).saturating_mul(s.into())) + // Standard Error: 70 + .saturating_add(Weight::from_ref_time(1_865).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Multisig Multisigs (r:1 w:1) + /// The range of component `s` is `[3, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_approve(s: u32, z: u32, ) -> Weight { + // Minimum execution time: 39_694 nanoseconds. + Weight::from_ref_time(29_291_452) + // Standard Error: 1_950 + .saturating_add(Weight::from_ref_time(122_175).saturating_mul(s.into())) + // Standard Error: 19 + .saturating_add(Weight::from_ref_time(1_834).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: System Account (r:1 w:1) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_complete(s: u32, z: u32, ) -> Weight { + // Minimum execution time: 55_881 nanoseconds. + Weight::from_ref_time(43_628_191) + // Standard Error: 2_030 + .saturating_add(Weight::from_ref_time(144_339).saturating_mul(s.into())) + // Standard Error: 19 + .saturating_add(Weight::from_ref_time(1_774).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. + fn approve_as_multi_create(s: u32, ) -> Weight { + // Minimum execution time: 36_420 nanoseconds. + Weight::from_ref_time(38_721_106) + // Standard Error: 6_761 + .saturating_add(Weight::from_ref_time(156_765).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Multisig Multisigs (r:1 w:1) + /// The range of component `s` is `[2, 100]`. + fn approve_as_multi_approve(s: u32, ) -> Weight { + // Minimum execution time: 26_025 nanoseconds. + Weight::from_ref_time(26_889_251) + // Standard Error: 1_653 + .saturating_add(Weight::from_ref_time(128_717).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) + /// The range of component `s` is `[2, 100]`. + fn cancel_as_multi(s: u32, ) -> Weight { + // Minimum execution time: 36_373 nanoseconds. + Weight::from_ref_time(38_800_022) + // Standard Error: 2_214 + .saturating_add(Weight::from_ref_time(131_644).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } // For backwards compatibility and tests impl WeightInfo for () { - fn as_multi_threshold_1(z: u32, ) -> Weight { - (20_200_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn as_multi_create(s: u32, z: u32, ) -> Weight { - (41_076_000 as Weight) - // Standard Error: 2_000 - .saturating_add((89_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (44_569_000 as Weight) - // Standard Error: 2_000 - .saturating_add((86_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (27_380_000 as Weight) - // Standard Error: 1_000 - .saturating_add((82_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (42_517_000 as Weight) - // Standard Error: 2_000 - .saturating_add((86_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (52_508_000 as Weight) - // Standard Error: 2_000 - .saturating_add((123_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn approve_as_multi_create(s: u32, ) -> Weight { - (35_263_000 as Weight) - // Standard Error: 2_000 - .saturating_add((128_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:0) - fn approve_as_multi_approve(s: u32, ) -> Weight { - (22_211_000 as Weight) - // Standard Error: 1_000 - .saturating_add((115_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn approve_as_multi_complete(s: u32, ) -> Weight { - (74_653_000 as Weight) - // Standard Error: 2_000 - .saturating_add((166_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - fn cancel_as_multi(s: u32, ) -> Weight { - (57_714_000 as Weight) - // Standard Error: 2_000 - .saturating_add((131_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } + /// The range of component `z` is `[0, 10000]`. + fn as_multi_threshold_1(z: u32, ) -> Weight { + // Minimum execution time: 17_705 nanoseconds. + Weight::from_ref_time(18_611_308) + // Standard Error: 10 + .saturating_add(Weight::from_ref_time(649).saturating_mul(z.into())) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_create(s: u32, z: u32, ) -> Weight { + // Minimum execution time: 52_394 nanoseconds. + Weight::from_ref_time(42_628_113) + // Standard Error: 7_162 + .saturating_add(Weight::from_ref_time(121_970).saturating_mul(s.into())) + // Standard Error: 70 + .saturating_add(Weight::from_ref_time(1_865).saturating_mul(z.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Multisig Multisigs (r:1 w:1) + /// The range of component `s` is `[3, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_approve(s: u32, z: u32, ) -> Weight { + // Minimum execution time: 39_694 nanoseconds. + Weight::from_ref_time(29_291_452) + // Standard Error: 1_950 + .saturating_add(Weight::from_ref_time(122_175).saturating_mul(s.into())) + // Standard Error: 19 + .saturating_add(Weight::from_ref_time(1_834).saturating_mul(z.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: System Account (r:1 w:1) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_complete(s: u32, z: u32, ) -> Weight { + // Minimum execution time: 55_881 nanoseconds. + Weight::from_ref_time(43_628_191) + // Standard Error: 2_030 + .saturating_add(Weight::from_ref_time(144_339).saturating_mul(s.into())) + // Standard Error: 19 + .saturating_add(Weight::from_ref_time(1_774).saturating_mul(z.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. + fn approve_as_multi_create(s: u32, ) -> Weight { + // Minimum execution time: 36_420 nanoseconds. + Weight::from_ref_time(38_721_106) + // Standard Error: 6_761 + .saturating_add(Weight::from_ref_time(156_765).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Multisig Multisigs (r:1 w:1) + /// The range of component `s` is `[2, 100]`. + fn approve_as_multi_approve(s: u32, ) -> Weight { + // Minimum execution time: 26_025 nanoseconds. + Weight::from_ref_time(26_889_251) + // Standard Error: 1_653 + .saturating_add(Weight::from_ref_time(128_717).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Multisig Multisigs (r:1 w:1) + /// The range of component `s` is `[2, 100]`. + fn cancel_as_multi(s: u32, ) -> Weight { + // Minimum execution time: 36_373 nanoseconds. + Weight::from_ref_time(38_800_022) + // Standard Error: 2_214 + .saturating_add(Weight::from_ref_time(131_644).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } } diff --git a/runtime/dolphin/src/weights/pallet_preimage.rs b/runtime/dolphin/src/weights/pallet_preimage.rs index 8798c4601..bfdddd9f3 100644 --- a/runtime/dolphin/src/weights/pallet_preimage.rs +++ b/runtime/dolphin/src/weights/pallet_preimage.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_preimage //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024 // Executed Command: @@ -40,8 +40,9 @@ #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; +use manta_primitives::constants::RocksDbWeight; /// Weight functions needed for pallet_preimage. pub trait WeightInfo { @@ -62,178 +63,206 @@ pub trait WeightInfo { /// Weights for pallet_preimage using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_preimage::WeightInfo for SubstrateWeight { - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - fn note_preimage(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:0) - fn note_requested_preimage(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:0) - fn note_no_deposit_preimage(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unnote_preimage() -> Weight { - (37_282_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unnote_no_deposit_preimage() -> Weight { - (23_250_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_preimage() -> Weight { - (34_525_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_no_deposit_preimage() -> Weight { - (22_270_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_unnoted_preimage() -> Weight { - (17_364_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_requested_preimage() -> Weight { - (8_809_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unrequest_preimage() -> Weight { - (22_721_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unrequest_unnoted_preimage() -> Weight { - (19_213_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn unrequest_multi_referenced_preimage() -> Weight { - (8_577_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + /// The range of component `s` is `[0, 4194304]`. + fn note_preimage(s: u32, ) -> Weight { + // Minimum execution time: 34_660 nanoseconds. + Weight::from_ref_time(35_111_000) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(2_752).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + /// The range of component `s` is `[0, 4194304]`. + fn note_requested_preimage(s: u32, ) -> Weight { + // Minimum execution time: 22_254 nanoseconds. + Weight::from_ref_time(22_534_000) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(2_742).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + /// The range of component `s` is `[0, 4194304]`. + fn note_no_deposit_preimage(s: u32, ) -> Weight { + // Minimum execution time: 22_626 nanoseconds. + Weight::from_ref_time(22_780_000) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(2_750).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + fn unnote_preimage() -> Weight { + // Minimum execution time: 42_247 nanoseconds. + Weight::from_ref_time(42_847_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + fn unnote_no_deposit_preimage() -> Weight { + // Minimum execution time: 28_414 nanoseconds. + Weight::from_ref_time(28_735_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_preimage() -> Weight { + // Minimum execution time: 28_410 nanoseconds. + Weight::from_ref_time(28_962_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_no_deposit_preimage() -> Weight { + // Minimum execution time: 15_177 nanoseconds. + Weight::from_ref_time(15_477_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_unnoted_preimage() -> Weight { + // Minimum execution time: 21_656 nanoseconds. + Weight::from_ref_time(21_992_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_requested_preimage() -> Weight { + // Minimum execution time: 9_905 nanoseconds. + Weight::from_ref_time(10_114_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + fn unrequest_preimage() -> Weight { + // Minimum execution time: 28_093 nanoseconds. + Weight::from_ref_time(28_806_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn unrequest_unnoted_preimage() -> Weight { + // Minimum execution time: 9_497 nanoseconds. + Weight::from_ref_time(9_999_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn unrequest_multi_referenced_preimage() -> Weight { + // Minimum execution time: 9_515 nanoseconds. + Weight::from_ref_time(9_682_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - fn note_preimage(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:0) - fn note_requested_preimage(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:0) - fn note_no_deposit_preimage(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unnote_preimage() -> Weight { - (37_282_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unnote_no_deposit_preimage() -> Weight { - (23_250_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_preimage() -> Weight { - (34_525_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_no_deposit_preimage() -> Weight { - (22_270_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_unnoted_preimage() -> Weight { - (17_364_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_requested_preimage() -> Weight { - (8_809_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unrequest_preimage() -> Weight { - (22_721_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unrequest_unnoted_preimage() -> Weight { - (19_213_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn unrequest_multi_referenced_preimage() -> Weight { - (8_577_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + /// The range of component `s` is `[0, 4194304]`. + fn note_preimage(s: u32, ) -> Weight { + // Minimum execution time: 34_660 nanoseconds. + Weight::from_ref_time(35_111_000) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(2_752).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + /// The range of component `s` is `[0, 4194304]`. + fn note_requested_preimage(s: u32, ) -> Weight { + // Minimum execution time: 22_254 nanoseconds. + Weight::from_ref_time(22_534_000) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(2_742).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + /// The range of component `s` is `[0, 4194304]`. + fn note_no_deposit_preimage(s: u32, ) -> Weight { + // Minimum execution time: 22_626 nanoseconds. + Weight::from_ref_time(22_780_000) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(2_750).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + fn unnote_preimage() -> Weight { + // Minimum execution time: 42_247 nanoseconds. + Weight::from_ref_time(42_847_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + fn unnote_no_deposit_preimage() -> Weight { + // Minimum execution time: 28_414 nanoseconds. + Weight::from_ref_time(28_735_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_preimage() -> Weight { + // Minimum execution time: 28_410 nanoseconds. + Weight::from_ref_time(28_962_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_no_deposit_preimage() -> Weight { + // Minimum execution time: 15_177 nanoseconds. + Weight::from_ref_time(15_477_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_unnoted_preimage() -> Weight { + // Minimum execution time: 21_656 nanoseconds. + Weight::from_ref_time(21_992_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_requested_preimage() -> Weight { + // Minimum execution time: 9_905 nanoseconds. + Weight::from_ref_time(10_114_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + fn unrequest_preimage() -> Weight { + // Minimum execution time: 28_093 nanoseconds. + Weight::from_ref_time(28_806_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn unrequest_unnoted_preimage() -> Weight { + // Minimum execution time: 9_497 nanoseconds. + Weight::from_ref_time(9_999_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn unrequest_multi_referenced_preimage() -> Weight { + // Minimum execution time: 9_515 nanoseconds. + Weight::from_ref_time(9_682_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } } diff --git a/runtime/dolphin/src/weights/pallet_scheduler.rs b/runtime/dolphin/src/weights/pallet_scheduler.rs index 5bab45c17..ae1add55d 100644 --- a/runtime/dolphin/src/weights/pallet_scheduler.rs +++ b/runtime/dolphin/src/weights/pallet_scheduler.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_scheduler //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024 // Executed Command: @@ -40,21 +40,20 @@ #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; +use manta_primitives::constants::RocksDbWeight; /// Weight functions needed for pallet_scheduler. pub trait WeightInfo { - fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight; - fn on_initialize_named_resolved(s: u32, ) -> Weight; - fn on_initialize_periodic_resolved(s: u32, ) -> Weight; - fn on_initialize_resolved(s: u32, ) -> Weight; - fn on_initialize_named_aborted(s: u32, ) -> Weight; - fn on_initialize_aborted(s: u32, ) -> Weight; - fn on_initialize_periodic_named(s: u32, ) -> Weight; - fn on_initialize_periodic(s: u32, ) -> Weight; - fn on_initialize_named(s: u32, ) -> Weight; - fn on_initialize(s: u32, ) -> Weight; + fn service_agendas_base() -> Weight; + fn service_agenda_base(s: u32, ) -> Weight; + fn service_task_base() -> Weight; + fn service_task_fetched(s: u32, ) -> Weight; + fn service_task_named() -> Weight; + fn service_task_periodic() -> Weight; + fn execute_dispatch_signed() -> Weight; + fn execute_dispatch_unsigned() -> Weight; fn schedule(s: u32, ) -> Weight; fn cancel(s: u32, ) -> Weight; fn schedule_named(s: u32, ) -> Weight; @@ -64,300 +63,194 @@ pub trait WeightInfo { /// Weights for pallet_scheduler using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_scheduler::WeightInfo for SubstrateWeight { - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight { - (10_983_000 as Weight) - // Standard Error: 57_000 - .saturating_add((25_335_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_named_resolved(s: u32, ) -> Weight { - (13_440_000 as Weight) - // Standard Error: 41_000 - .saturating_add((19_987_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - fn on_initialize_periodic_resolved(s: u32, ) -> Weight { - (15_179_000 as Weight) - // Standard Error: 47_000 - .saturating_add((21_898_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - fn on_initialize_resolved(s: u32, ) -> Weight { - (13_037_000 as Weight) - // Standard Error: 47_000 - .saturating_add((18_658_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:0) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_named_aborted(s: u32, ) -> Weight { - (6_126_000 as Weight) - // Standard Error: 23_000 - .saturating_add((7_745_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:0) - fn on_initialize_aborted(s: u32, ) -> Weight { - (8_129_000 as Weight) - // Standard Error: 15_000 - .saturating_add((4_872_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_periodic_named(s: u32, ) -> Weight { - (16_686_000 as Weight) - // Standard Error: 39_000 - .saturating_add((13_376_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - fn on_initialize_periodic(s: u32, ) -> Weight { - (15_234_000 as Weight) - // Standard Error: 32_000 - .saturating_add((10_428_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_named(s: u32, ) -> Weight { - (15_700_000 as Weight) - // Standard Error: 26_000 - .saturating_add((8_346_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - fn on_initialize(s: u32, ) -> Weight { - (14_920_000 as Weight) - // Standard Error: 24_000 - .saturating_add((7_193_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Scheduler Agenda (r:1 w:1) - fn schedule(s: u32, ) -> Weight { - (20_311_000 as Weight) - // Standard Error: 2_000 - .saturating_add((101_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - fn cancel(s: u32, ) -> Weight { - (20_301_000 as Weight) - // Standard Error: 5_000 - .saturating_add((1_056_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - fn schedule_named(s: u32, ) -> Weight { - (24_205_000 as Weight) - // Standard Error: 3_000 - .saturating_add((114_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - fn cancel_named(s: u32, ) -> Weight { - (23_467_000 as Weight) - // Standard Error: 13_000 - .saturating_add((1_039_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } + // Storage: Scheduler IncompleteSince (r:1 w:1) + fn service_agendas_base() -> Weight { + // Minimum execution time: 14_378 nanoseconds. + Weight::from_ref_time(14_757_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[0, 50]`. + fn service_agenda_base(s: u32, ) -> Weight { + // Minimum execution time: 9_883 nanoseconds. + Weight::from_ref_time(10_282_441) + // Standard Error: 9_387 + .saturating_add(Weight::from_ref_time(592_085).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_task_base() -> Weight { + // Minimum execution time: 11_036 nanoseconds. + Weight::from_ref_time(11_272_000) + } + // Storage: Preimage PreimageFor (r:1 w:1) + // Storage: Preimage StatusFor (r:1 w:1) + /// The range of component `s` is `[128, 4194304]`. + fn service_task_fetched(s: u32, ) -> Weight { + // Minimum execution time: 25_538 nanoseconds. + Weight::from_ref_time(25_750_000) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(1_750).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Scheduler Lookup (r:0 w:1) + fn service_task_named() -> Weight { + // Minimum execution time: 30_806 nanoseconds. + Weight::from_ref_time(39_088_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_task_periodic() -> Weight { + // Minimum execution time: 26_593 nanoseconds. + Weight::from_ref_time(27_101_000) + } + fn execute_dispatch_signed() -> Weight { + // Minimum execution time: 13_947 nanoseconds. + Weight::from_ref_time(14_393_000) + } + fn execute_dispatch_unsigned() -> Weight { + // Minimum execution time: 13_857 nanoseconds. + Weight::from_ref_time(14_408_000) + } + // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[0, 49]`. + fn schedule(s: u32, ) -> Weight { + // Minimum execution time: 24_075 nanoseconds. + Weight::from_ref_time(26_053_024) + // Standard Error: 8_085 + .saturating_add(Weight::from_ref_time(635_304).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Scheduler Agenda (r:1 w:1) + // Storage: Scheduler Lookup (r:0 w:1) + /// The range of component `s` is `[1, 50]`. + fn cancel(s: u32, ) -> Weight { + // Minimum execution time: 22_833 nanoseconds. + Weight::from_ref_time(24_256_933) + // Standard Error: 15_821 + .saturating_add(Weight::from_ref_time(1_212_772).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Scheduler Lookup (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[0, 49]`. + fn schedule_named(s: u32, ) -> Weight { + // Minimum execution time: 22_508 nanoseconds. + Weight::from_ref_time(28_006_204) + // Standard Error: 5_249 + .saturating_add(Weight::from_ref_time(730_330).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Scheduler Lookup (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[1, 50]`. + fn cancel_named(s: u32, ) -> Weight { + // Minimum execution time: 24_875 nanoseconds. + Weight::from_ref_time(27_040_277) + // Standard Error: 6_597 + .saturating_add(Weight::from_ref_time(1_178_007).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight { - (10_983_000 as Weight) - // Standard Error: 57_000 - .saturating_add((25_335_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_named_resolved(s: u32, ) -> Weight { - (13_440_000 as Weight) - // Standard Error: 41_000 - .saturating_add((19_987_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - fn on_initialize_periodic_resolved(s: u32, ) -> Weight { - (15_179_000 as Weight) - // Standard Error: 47_000 - .saturating_add((21_898_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - fn on_initialize_resolved(s: u32, ) -> Weight { - (13_037_000 as Weight) - // Standard Error: 47_000 - .saturating_add((18_658_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:0) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_named_aborted(s: u32, ) -> Weight { - (6_126_000 as Weight) - // Standard Error: 23_000 - .saturating_add((7_745_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:0) - fn on_initialize_aborted(s: u32, ) -> Weight { - (8_129_000 as Weight) - // Standard Error: 15_000 - .saturating_add((4_872_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_periodic_named(s: u32, ) -> Weight { - (16_686_000 as Weight) - // Standard Error: 39_000 - .saturating_add((13_376_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - fn on_initialize_periodic(s: u32, ) -> Weight { - (15_234_000 as Weight) - // Standard Error: 32_000 - .saturating_add((10_428_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_named(s: u32, ) -> Weight { - (15_700_000 as Weight) - // Standard Error: 26_000 - .saturating_add((8_346_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - fn on_initialize(s: u32, ) -> Weight { - (14_920_000 as Weight) - // Standard Error: 24_000 - .saturating_add((7_193_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Scheduler Agenda (r:1 w:1) - fn schedule(s: u32, ) -> Weight { - (20_311_000 as Weight) - // Standard Error: 2_000 - .saturating_add((101_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - fn cancel(s: u32, ) -> Weight { - (20_301_000 as Weight) - // Standard Error: 5_000 - .saturating_add((1_056_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - fn schedule_named(s: u32, ) -> Weight { - (24_205_000 as Weight) - // Standard Error: 3_000 - .saturating_add((114_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - fn cancel_named(s: u32, ) -> Weight { - (23_467_000 as Weight) - // Standard Error: 13_000 - .saturating_add((1_039_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } + // Storage: Scheduler IncompleteSince (r:1 w:1) + fn service_agendas_base() -> Weight { + // Minimum execution time: 14_378 nanoseconds. + Weight::from_ref_time(14_757_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[0, 50]`. + fn service_agenda_base(s: u32, ) -> Weight { + // Minimum execution time: 9_883 nanoseconds. + Weight::from_ref_time(10_282_441) + // Standard Error: 9_387 + .saturating_add(Weight::from_ref_time(592_085).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + fn service_task_base() -> Weight { + // Minimum execution time: 11_036 nanoseconds. + Weight::from_ref_time(11_272_000) + } + // Storage: Preimage PreimageFor (r:1 w:1) + // Storage: Preimage StatusFor (r:1 w:1) + /// The range of component `s` is `[128, 4194304]`. + fn service_task_fetched(s: u32, ) -> Weight { + // Minimum execution time: 25_538 nanoseconds. + Weight::from_ref_time(25_750_000) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(1_750).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Scheduler Lookup (r:0 w:1) + fn service_task_named() -> Weight { + // Minimum execution time: 30_806 nanoseconds. + Weight::from_ref_time(39_088_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + fn service_task_periodic() -> Weight { + // Minimum execution time: 26_593 nanoseconds. + Weight::from_ref_time(27_101_000) + } + fn execute_dispatch_signed() -> Weight { + // Minimum execution time: 13_947 nanoseconds. + Weight::from_ref_time(14_393_000) + } + fn execute_dispatch_unsigned() -> Weight { + // Minimum execution time: 13_857 nanoseconds. + Weight::from_ref_time(14_408_000) + } + // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[0, 49]`. + fn schedule(s: u32, ) -> Weight { + // Minimum execution time: 24_075 nanoseconds. + Weight::from_ref_time(26_053_024) + // Standard Error: 8_085 + .saturating_add(Weight::from_ref_time(635_304).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Scheduler Agenda (r:1 w:1) + // Storage: Scheduler Lookup (r:0 w:1) + /// The range of component `s` is `[1, 50]`. + fn cancel(s: u32, ) -> Weight { + // Minimum execution time: 22_833 nanoseconds. + Weight::from_ref_time(24_256_933) + // Standard Error: 15_821 + .saturating_add(Weight::from_ref_time(1_212_772).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Scheduler Lookup (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[0, 49]`. + fn schedule_named(s: u32, ) -> Weight { + // Minimum execution time: 22_508 nanoseconds. + Weight::from_ref_time(28_006_204) + // Standard Error: 5_249 + .saturating_add(Weight::from_ref_time(730_330).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Scheduler Lookup (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[1, 50]`. + fn cancel_named(s: u32, ) -> Weight { + // Minimum execution time: 24_875 nanoseconds. + Weight::from_ref_time(27_040_277) + // Standard Error: 6_597 + .saturating_add(Weight::from_ref_time(1_178_007).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } } diff --git a/runtime/dolphin/src/weights/pallet_session.rs b/runtime/dolphin/src/weights/pallet_session.rs index a9dd25bbc..1a5afbfe7 100644 --- a/runtime/dolphin/src/weights/pallet_session.rs +++ b/runtime/dolphin/src/weights/pallet_session.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_session //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024 // Executed Command: @@ -40,8 +40,9 @@ #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; +use manta_primitives::constants::RocksDbWeight; /// Weight functions needed for pallet_session. pub trait WeightInfo { @@ -52,36 +53,40 @@ pub trait WeightInfo { /// Weights for pallet_session using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_session::WeightInfo for SubstrateWeight { - // Storage: Session NextKeys (r:1 w:1) - // Storage: Session KeyOwner (r:3 w:3) - fn set_keys() -> Weight { - (26_891_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - // Storage: Session NextKeys (r:1 w:1) - // Storage: Session KeyOwner (r:0 w:3) - fn purge_keys() -> Weight { - (18_285_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } + // Storage: Session NextKeys (r:1 w:1) + // Storage: Session KeyOwner (r:3 w:3) + fn set_keys() -> Weight { + // Minimum execution time: 32_067 nanoseconds. + Weight::from_ref_time(32_520_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: Session NextKeys (r:1 w:1) + // Storage: Session KeyOwner (r:0 w:3) + fn purge_keys() -> Weight { + // Minimum execution time: 21_963 nanoseconds. + Weight::from_ref_time(24_246_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(4)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Session NextKeys (r:1 w:1) - // Storage: Session KeyOwner (r:3 w:3) - fn set_keys() -> Weight { - (26_891_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - // Storage: Session NextKeys (r:1 w:1) - // Storage: Session KeyOwner (r:0 w:3) - fn purge_keys() -> Weight { - (18_285_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } + // Storage: Session NextKeys (r:1 w:1) + // Storage: Session KeyOwner (r:3 w:3) + fn set_keys() -> Weight { + // Minimum execution time: 32_067 nanoseconds. + Weight::from_ref_time(32_520_000) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(4)) + } + // Storage: Session NextKeys (r:1 w:1) + // Storage: Session KeyOwner (r:0 w:3) + fn purge_keys() -> Weight { + // Minimum execution time: 21_963 nanoseconds. + Weight::from_ref_time(24_246_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(4)) + } } diff --git a/runtime/dolphin/src/weights/pallet_timestamp.rs b/runtime/dolphin/src/weights/pallet_timestamp.rs index f594cd9d5..da826a062 100644 --- a/runtime/dolphin/src/weights/pallet_timestamp.rs +++ b/runtime/dolphin/src/weights/pallet_timestamp.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_timestamp //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024 // Executed Command: @@ -40,8 +40,9 @@ #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; +use manta_primitives::constants::RocksDbWeight; /// Weight functions needed for pallet_timestamp. pub trait WeightInfo { @@ -52,26 +53,30 @@ pub trait WeightInfo { /// Weights for pallet_timestamp using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_timestamp::WeightInfo for SubstrateWeight { - // Storage: Timestamp Now (r:1 w:1) - fn set() -> Weight { - (7_679_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - fn on_finalize() -> Weight { - (2_812_000 as Weight) - } + // Storage: Timestamp Now (r:1 w:1) + fn set() -> Weight { + // Minimum execution time: 8_290 nanoseconds. + Weight::from_ref_time(8_548_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn on_finalize() -> Weight { + // Minimum execution time: 14_523 nanoseconds. + Weight::from_ref_time(14_909_000) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Timestamp Now (r:1 w:1) - fn set() -> Weight { - (7_679_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - fn on_finalize() -> Weight { - (2_812_000 as Weight) - } + // Storage: Timestamp Now (r:1 w:1) + fn set() -> Weight { + // Minimum execution time: 8_290 nanoseconds. + Weight::from_ref_time(8_548_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + fn on_finalize() -> Weight { + // Minimum execution time: 14_523 nanoseconds. + Weight::from_ref_time(14_909_000) + } } diff --git a/runtime/dolphin/src/weights/pallet_treasury.rs b/runtime/dolphin/src/weights/pallet_treasury.rs index 52d0fb038..163007654 100644 --- a/runtime/dolphin/src/weights/pallet_treasury.rs +++ b/runtime/dolphin/src/weights/pallet_treasury.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_treasury //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024 // Executed Command: @@ -40,8 +40,9 @@ #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; +use manta_primitives::constants::RocksDbWeight; /// Weight functions needed for pallet_treasury. pub trait WeightInfo { @@ -56,96 +57,116 @@ pub trait WeightInfo { /// Weights for pallet_treasury using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_treasury::WeightInfo for SubstrateWeight { - fn spend() -> Weight { - (145_000 as Weight) - } - // Storage: Treasury ProposalCount (r:1 w:1) - // Storage: Treasury Proposals (r:0 w:1) - fn propose_spend() -> Weight { - (27_978_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Treasury Proposals (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn reject_proposal() -> Weight { - (51_493_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Treasury Proposals (r:1 w:0) - // Storage: Treasury Approvals (r:1 w:1) - fn approve_proposal(p: u32, ) -> Weight { - (12_942_000 as Weight) - // Standard Error: 0 - .saturating_add((116_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Treasury Approvals (r:1 w:1) - fn remove_approval() -> Weight { - (8_605_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Treasury Approvals (r:1 w:1) - // Storage: Treasury Proposals (r:2 w:2) - // Storage: System Account (r:4 w:4) - fn on_initialize_proposals(p: u32, ) -> Weight { - (31_550_000 as Weight) - // Standard Error: 34_000 - .saturating_add((32_737_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(p as Weight))) - } + fn spend() -> Weight { + // Minimum execution time: 500 nanoseconds. + Weight::from_ref_time(589_000) + } + // Storage: Treasury ProposalCount (r:1 w:1) + // Storage: Treasury Proposals (r:0 w:1) + fn propose_spend() -> Weight { + // Minimum execution time: 55_321 nanoseconds. + Weight::from_ref_time(56_291_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Treasury Proposals (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn reject_proposal() -> Weight { + // Minimum execution time: 53_940 nanoseconds. + Weight::from_ref_time(62_968_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Treasury Proposals (r:1 w:0) + // Storage: Treasury Approvals (r:1 w:1) + /// The range of component `p` is `[0, 99]`. + fn approve_proposal(p: u32, ) -> Weight { + // Minimum execution time: 11_610 nanoseconds. + Weight::from_ref_time(15_662_430) + // Standard Error: 1_554 + .saturating_add(Weight::from_ref_time(89_925).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Treasury Approvals (r:1 w:1) + fn remove_approval() -> Weight { + // Minimum execution time: 9_940 nanoseconds. + Weight::from_ref_time(10_211_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Treasury Deactivated (r:1 w:1) + // Storage: Balances InactiveIssuance (r:1 w:1) + // Storage: Treasury Approvals (r:1 w:1) + // Storage: Treasury Proposals (r:2 w:2) + // Storage: System Account (r:4 w:4) + /// The range of component `p` is `[0, 100]`. + fn on_initialize_proposals(p: u32, ) -> Weight { + // Minimum execution time: 39_000 nanoseconds. + Weight::from_ref_time(61_604_307) + // Standard Error: 33_902 + .saturating_add(Weight::from_ref_time(29_822_248).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((3_u64).saturating_mul(p.into()))) + } } // For backwards compatibility and tests impl WeightInfo for () { - fn spend() -> Weight { - (145_000 as Weight) - } - // Storage: Treasury ProposalCount (r:1 w:1) - // Storage: Treasury Proposals (r:0 w:1) - fn propose_spend() -> Weight { - (27_978_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Treasury Proposals (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn reject_proposal() -> Weight { - (51_493_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Treasury Proposals (r:1 w:0) - // Storage: Treasury Approvals (r:1 w:1) - fn approve_proposal(p: u32, ) -> Weight { - (12_942_000 as Weight) - // Standard Error: 0 - .saturating_add((116_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Treasury Approvals (r:1 w:1) - fn remove_approval() -> Weight { - (8_605_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Treasury Approvals (r:1 w:1) - // Storage: Treasury Proposals (r:2 w:2) - // Storage: System Account (r:4 w:4) - fn on_initialize_proposals(p: u32, ) -> Weight { - (31_550_000 as Weight) - // Standard Error: 34_000 - .saturating_add((32_737_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(p as Weight))) - } + fn spend() -> Weight { + // Minimum execution time: 500 nanoseconds. + Weight::from_ref_time(589_000) + } + // Storage: Treasury ProposalCount (r:1 w:1) + // Storage: Treasury Proposals (r:0 w:1) + fn propose_spend() -> Weight { + // Minimum execution time: 55_321 nanoseconds. + Weight::from_ref_time(56_291_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Treasury Proposals (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn reject_proposal() -> Weight { + // Minimum execution time: 53_940 nanoseconds. + Weight::from_ref_time(62_968_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Treasury Proposals (r:1 w:0) + // Storage: Treasury Approvals (r:1 w:1) + /// The range of component `p` is `[0, 99]`. + fn approve_proposal(p: u32, ) -> Weight { + // Minimum execution time: 11_610 nanoseconds. + Weight::from_ref_time(15_662_430) + // Standard Error: 1_554 + .saturating_add(Weight::from_ref_time(89_925).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Treasury Approvals (r:1 w:1) + fn remove_approval() -> Weight { + // Minimum execution time: 9_940 nanoseconds. + Weight::from_ref_time(10_211_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Treasury Deactivated (r:1 w:1) + // Storage: Balances InactiveIssuance (r:1 w:1) + // Storage: Treasury Approvals (r:1 w:1) + // Storage: Treasury Proposals (r:2 w:2) + // Storage: System Account (r:4 w:4) + /// The range of component `p` is `[0, 100]`. + fn on_initialize_proposals(p: u32, ) -> Weight { + // Minimum execution time: 39_000 nanoseconds. + Weight::from_ref_time(61_604_307) + // Standard Error: 33_902 + .saturating_add(Weight::from_ref_time(29_822_248).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(p.into()))) + .saturating_add(RocksDbWeight::get().writes(3)) + .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(p.into()))) + } } diff --git a/runtime/dolphin/src/weights/pallet_tx_pause.rs b/runtime/dolphin/src/weights/pallet_tx_pause.rs index 433cf4ada..f8b1a27fc 100644 --- a/runtime/dolphin/src/weights/pallet_tx_pause.rs +++ b/runtime/dolphin/src/weights/pallet_tx_pause.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_tx_pause //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024 // Executed Command: @@ -40,8 +40,9 @@ #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; +use manta_primitives::constants::RocksDbWeight; /// Weight functions needed for pallet_tx_pause. pub trait WeightInfo { @@ -52,32 +53,36 @@ pub trait WeightInfo { /// Weights for pallet_tx_pause using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_tx_pause::WeightInfo for SubstrateWeight { - // Storage: TransactionPause PausedTransactions (r:1 w:1) - fn pause_transaction() -> Weight { - (17_486_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: TransactionPause PausedTransactions (r:1 w:1) - fn unpause_transaction() -> Weight { - (17_900_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } + // Storage: TransactionPause PausedTransactions (r:1 w:1) + fn pause_transaction() -> Weight { + // Minimum execution time: 40_237 nanoseconds. + Weight::from_ref_time(61_869_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: TransactionPause PausedTransactions (r:1 w:1) + fn unpause_transaction() -> Weight { + // Minimum execution time: 29_578 nanoseconds. + Weight::from_ref_time(30_118_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: TransactionPause PausedTransactions (r:1 w:1) - fn pause_transaction() -> Weight { - (17_486_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: TransactionPause PausedTransactions (r:1 w:1) - fn unpause_transaction() -> Weight { - (17_900_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } + // Storage: TransactionPause PausedTransactions (r:1 w:1) + fn pause_transaction() -> Weight { + // Minimum execution time: 40_237 nanoseconds. + Weight::from_ref_time(61_869_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: TransactionPause PausedTransactions (r:1 w:1) + fn unpause_transaction() -> Weight { + // Minimum execution time: 29_578 nanoseconds. + Weight::from_ref_time(30_118_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } } diff --git a/runtime/dolphin/src/weights/pallet_utility.rs b/runtime/dolphin/src/weights/pallet_utility.rs index 145ef8f94..b17974e5e 100644 --- a/runtime/dolphin/src/weights/pallet_utility.rs +++ b/runtime/dolphin/src/weights/pallet_utility.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_utility //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024 // Executed Command: @@ -40,8 +40,9 @@ #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; +use manta_primitives::constants::RocksDbWeight; /// Weight functions needed for pallet_utility. pub trait WeightInfo { @@ -55,50 +56,66 @@ pub trait WeightInfo { /// Weights for pallet_utility using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_utility::WeightInfo for SubstrateWeight { - fn batch(c: u32, ) -> Weight { - (22_752_000 as Weight) - // Standard Error: 3_000 - .saturating_add((4_059_000 as Weight).saturating_mul(c as Weight)) - } - fn as_derivative() -> Weight { - (5_360_000 as Weight) - } - fn batch_all(c: u32, ) -> Weight { - (30_482_000 as Weight) - // Standard Error: 3_000 - .saturating_add((4_239_000 as Weight).saturating_mul(c as Weight)) - } - fn dispatch_as() -> Weight { - (12_883_000 as Weight) - } - fn force_batch(c: u32, ) -> Weight { - (28_793_000 as Weight) - // Standard Error: 3_000 - .saturating_add((4_043_000 as Weight).saturating_mul(c as Weight)) - } + /// The range of component `c` is `[0, 1000]`. + fn batch(c: u32, ) -> Weight { + // Minimum execution time: 13_021 nanoseconds. + Weight::from_ref_time(40_489_217) + // Standard Error: 5_864 + .saturating_add(Weight::from_ref_time(4_592_627).saturating_mul(c.into())) + } + fn as_derivative() -> Weight { + // Minimum execution time: 6_809 nanoseconds. + Weight::from_ref_time(6_981_000) + } + /// The range of component `c` is `[0, 1000]`. + fn batch_all(c: u32, ) -> Weight { + // Minimum execution time: 39_817 nanoseconds. + Weight::from_ref_time(69_169_779) + // Standard Error: 6_316 + .saturating_add(Weight::from_ref_time(4_724_800).saturating_mul(c.into())) + } + fn dispatch_as() -> Weight { + // Minimum execution time: 15_308 nanoseconds. + Weight::from_ref_time(15_830_000) + } + /// The range of component `c` is `[0, 1000]`. + fn force_batch(c: u32, ) -> Weight { + // Minimum execution time: 13_200 nanoseconds. + Weight::from_ref_time(54_184_897) + // Standard Error: 5_829 + .saturating_add(Weight::from_ref_time(4_546_849).saturating_mul(c.into())) + } } // For backwards compatibility and tests impl WeightInfo for () { - fn batch(c: u32, ) -> Weight { - (22_752_000 as Weight) - // Standard Error: 3_000 - .saturating_add((4_059_000 as Weight).saturating_mul(c as Weight)) - } - fn as_derivative() -> Weight { - (5_360_000 as Weight) - } - fn batch_all(c: u32, ) -> Weight { - (30_482_000 as Weight) - // Standard Error: 3_000 - .saturating_add((4_239_000 as Weight).saturating_mul(c as Weight)) - } - fn dispatch_as() -> Weight { - (12_883_000 as Weight) - } - fn force_batch(c: u32, ) -> Weight { - (28_793_000 as Weight) - // Standard Error: 3_000 - .saturating_add((4_043_000 as Weight).saturating_mul(c as Weight)) - } + /// The range of component `c` is `[0, 1000]`. + fn batch(c: u32, ) -> Weight { + // Minimum execution time: 13_021 nanoseconds. + Weight::from_ref_time(40_489_217) + // Standard Error: 5_864 + .saturating_add(Weight::from_ref_time(4_592_627).saturating_mul(c.into())) + } + fn as_derivative() -> Weight { + // Minimum execution time: 6_809 nanoseconds. + Weight::from_ref_time(6_981_000) + } + /// The range of component `c` is `[0, 1000]`. + fn batch_all(c: u32, ) -> Weight { + // Minimum execution time: 39_817 nanoseconds. + Weight::from_ref_time(69_169_779) + // Standard Error: 6_316 + .saturating_add(Weight::from_ref_time(4_724_800).saturating_mul(c.into())) + } + fn dispatch_as() -> Weight { + // Minimum execution time: 15_308 nanoseconds. + Weight::from_ref_time(15_830_000) + } + /// The range of component `c` is `[0, 1000]`. + fn force_batch(c: u32, ) -> Weight { + // Minimum execution time: 13_200 nanoseconds. + Weight::from_ref_time(54_184_897) + // Standard Error: 5_829 + .saturating_add(Weight::from_ref_time(4_546_849).saturating_mul(c.into())) + } } diff --git a/runtime/dolphin/src/weights/xcm/mod.rs b/runtime/dolphin/src/weights/xcm/mod.rs index 4e1ebdb17..f4dbe698c 100644 --- a/runtime/dolphin/src/weights/xcm/mod.rs +++ b/runtime/dolphin/src/weights/xcm/mod.rs @@ -20,103 +20,108 @@ mod pallet_xcm_benchmarks_generic; use crate::Runtime; use frame_support::weights::Weight; use sp_std::cmp; -use xcm::{latest::prelude::*, DoubleEncoded}; +use xcm::{ + latest::{prelude::*, Weight as XCMWeight}, + DoubleEncoded, +}; use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; trait WeighMultiAssets { - fn weigh_multi_assets(&self, weight: Weight) -> Weight; + fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight; } const MAX_ASSETS: u32 = 100; impl WeighMultiAssets for MultiAssetFilter { - fn weigh_multi_assets(&self, weight: Weight) -> Weight { - match self { + fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight { + let weight = match self { Self::Definite(assets) => { - // NOTE: We charge fees for at least 1 asset even if 0 were requested to punish spam - (assets.inner().iter().count().max(1) as Weight).saturating_mul(weight) + weight.saturating_mul(assets.inner().iter().count().max(1) as u64) } - Self::Wild(_) => (MAX_ASSETS as Weight).saturating_mul(weight), - } + Self::Wild(_) => weight.saturating_mul(MAX_ASSETS as u64), + }; + weight.ref_time() } } impl WeighMultiAssets for MultiAssets { - fn weigh_multi_assets(&self, weight: Weight) -> Weight { - (self.inner().iter().count().max(1) as Weight).saturating_mul(weight) + fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight { + weight + .saturating_mul(self.inner().iter().count().max(1) as u64) + .ref_time() } } pub struct DolphinXcmWeight(core::marker::PhantomData); impl XcmWeightInfo for DolphinXcmWeight { - fn withdraw_asset(assets: &MultiAssets) -> Weight { + fn withdraw_asset(assets: &MultiAssets) -> XCMWeight { assets.weigh_multi_assets(XcmFungibleWeight::::withdraw_asset()) } - fn reserve_asset_deposited(assets: &MultiAssets) -> Weight { + fn reserve_asset_deposited(assets: &MultiAssets) -> XCMWeight { assets.weigh_multi_assets(XcmFungibleWeight::::reserve_asset_deposited()) } - fn receive_teleported_asset(_assets: &MultiAssets) -> Weight { - u64::MAX // disable teleport + fn receive_teleported_asset(_assets: &MultiAssets) -> XCMWeight { + Weight::MAX.ref_time() // disable teleport } - fn query_response(_query_id: &u64, _response: &Response, _max_weight: &u64) -> Weight { - XcmGeneric::::query_response() + fn query_response(_query_id: &u64, _response: &Response, _max_weight: &u64) -> XCMWeight { + XcmGeneric::::query_response().ref_time() } - fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> Weight { + fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> XCMWeight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_asset()) } fn transfer_reserve_asset( assets: &MultiAssets, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> Weight { + ) -> XCMWeight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_reserve_asset()) } fn transact( _origin_type: &OriginKind, _require_weight_at_most: &u64, _call: &DoubleEncoded, - ) -> Weight { - XcmGeneric::::transact() + ) -> XCMWeight { + XcmGeneric::::transact().ref_time() } fn hrmp_new_channel_open_request( _sender: &u32, _max_message_size: &u32, _max_capacity: &u32, - ) -> Weight { + ) -> XCMWeight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX + Weight::MAX.ref_time() } - fn hrmp_channel_accepted(_recipient: &u32) -> Weight { + fn hrmp_channel_accepted(_recipient: &u32) -> XCMWeight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX + Weight::MAX.ref_time() } - fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> Weight { + fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> XCMWeight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX + Weight::MAX.ref_time() } - fn clear_origin() -> Weight { - XcmGeneric::::clear_origin() + fn clear_origin() -> XCMWeight { + XcmGeneric::::clear_origin().ref_time() } - fn descend_origin(_who: &InteriorMultiLocation) -> Weight { - XcmGeneric::::descend_origin() + fn descend_origin(_who: &InteriorMultiLocation) -> XCMWeight { + XcmGeneric::::descend_origin().ref_time() } fn report_error( _query_id: &QueryId, _dest: &MultiLocation, _max_response_weight: &u64, - ) -> Weight { - XcmGeneric::::report_error() + ) -> XCMWeight { + XcmGeneric::::report_error().ref_time() } fn deposit_asset( assets: &MultiAssetFilter, _max_assets: &u32, _dest: &MultiLocation, - ) -> Weight { + ) -> XCMWeight { // Hardcoded until better understanding how to deal with worst case scenario of holding register - let hardcoded_weight: u64 = 1_000_000_000; + let hardcoded_weight = Weight::from_ref_time(1_000_000_000_u64).ref_time(); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()); cmp::min(hardcoded_weight, weight) } @@ -125,23 +130,23 @@ impl XcmWeightInfo for DolphinXcmWeight { _max_assets: &u32, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> Weight { + ) -> XCMWeight { // Hardcoded until better understanding how to deal with worst case scenario of holding register - let hardcoded_weight: u64 = 1_000_000_000; + let hardcoded_weight = Weight::from_ref_time(1_000_000_000_u64).ref_time(); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()); cmp::min(hardcoded_weight, weight) } - fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets) -> Weight { - Weight::MAX + fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets) -> XCMWeight { + Weight::MAX.ref_time() } fn initiate_reserve_withdraw( assets: &MultiAssetFilter, _reserve: &MultiLocation, _xcm: &Xcm<()>, - ) -> Weight { + ) -> XCMWeight { // Hardcoded until better understanding how to deal with worst case scenario of holding register - let hardcoded_weight: u64 = 1_000_000_000; + let hardcoded_weight = Weight::from_ref_time(1_000_000_000_u64).ref_time(); let weight = assets.weigh_multi_assets(XcmGeneric::::initiate_reserve_withdraw()); cmp::min(hardcoded_weight, weight) } @@ -149,9 +154,9 @@ impl XcmWeightInfo for DolphinXcmWeight { assets: &MultiAssetFilter, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> Weight { + ) -> XCMWeight { // Hardcoded until better understanding how to deal with worst case scenario of holding register - let hardcoded_weight: u64 = 1_000_000_000; + let hardcoded_weight = Weight::from_ref_time(1_000_000_000_u64).ref_time(); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::initiate_teleport()); cmp::min(hardcoded_weight, weight) } @@ -160,37 +165,37 @@ impl XcmWeightInfo for DolphinXcmWeight { _dest: &MultiLocation, _assets: &MultiAssetFilter, _max_response_weight: &u64, - ) -> Weight { + ) -> XCMWeight { // Hardcoded until better understanding how to deal with worst case scenario of holding register - let hardcoded_weight: u64 = 1_000_000_000; - let weight = XcmGeneric::::query_holding(); + let hardcoded_weight = Weight::from_ref_time(1_000_000_000_u64).ref_time(); + let weight = XcmGeneric::::query_holding().ref_time(); cmp::min(hardcoded_weight, weight) } - fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> Weight { - XcmGeneric::::buy_execution() + fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> XCMWeight { + XcmGeneric::::buy_execution().ref_time() } - fn refund_surplus() -> Weight { - XcmGeneric::::refund_surplus() + fn refund_surplus() -> XCMWeight { + XcmGeneric::::refund_surplus().ref_time() } - fn set_error_handler(_xcm: &Xcm) -> Weight { - XcmGeneric::::set_error_handler() + fn set_error_handler(_xcm: &Xcm) -> XCMWeight { + XcmGeneric::::set_error_handler().ref_time() } - fn set_appendix(_xcm: &Xcm) -> Weight { - XcmGeneric::::set_appendix() + fn set_appendix(_xcm: &Xcm) -> XCMWeight { + XcmGeneric::::set_appendix().ref_time() } - fn clear_error() -> Weight { - XcmGeneric::::clear_error() + fn clear_error() -> XCMWeight { + XcmGeneric::::clear_error().ref_time() } - fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight { - XcmGeneric::::claim_asset() + fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> XCMWeight { + XcmGeneric::::claim_asset().ref_time() } - fn trap(_code: &u64) -> Weight { - XcmGeneric::::trap() + fn trap(_code: &u64) -> XCMWeight { + XcmGeneric::::trap().ref_time() } - fn subscribe_version(_query_id: &QueryId, _max_response_weight: &u64) -> Weight { - XcmGeneric::::subscribe_version() + fn subscribe_version(_query_id: &QueryId, _max_response_weight: &u64) -> XCMWeight { + XcmGeneric::::subscribe_version().ref_time() } - fn unsubscribe_version() -> Weight { - XcmGeneric::::unsubscribe_version() + fn unsubscribe_version() -> XCMWeight { + XcmGeneric::::unsubscribe_version().ref_time() } } diff --git a/runtime/dolphin/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/runtime/dolphin/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index c6987cda3..375dabd81 100644 --- a/runtime/dolphin/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/runtime/dolphin/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -17,8 +17,8 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::fungible` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-24-14`, CPU: `Intel(R) Xeon(R) Platinum 8275CL CPU @ 3.00GHz` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-86-152`, CPU: `Intel(R) Xeon(R) Platinum 8275CL CPU @ 3.00GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024 // Executed Command: @@ -50,17 +50,17 @@ impl WeightInfo { // Storage: AssetManager LocationAssetId (r:1 w:0) // Storage: System Account (r:1 w:1) pub(crate) fn withdraw_asset() -> Weight { - (38_573_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(45_652_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: AssetManager LocationAssetId (r:1 w:0) // Storage: System Account (r:2 w:2) pub(crate) fn transfer_asset() -> Weight { - (56_480_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(57_952_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: AssetManager LocationAssetId (r:1 w:0) @@ -71,20 +71,20 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn transfer_reserve_asset() -> Weight { - (69_595_000 as Weight) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(75_410_000) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) } pub(crate) fn reserve_asset_deposited() -> Weight { - (1_511_000 as Weight) + Weight::from_ref_time(1_822_000) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: AssetManager LocationAssetId (r:1 w:0) // Storage: System Account (r:1 w:1) pub(crate) fn deposit_asset() -> Weight { - (38_655_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(58_935_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: AssetManager LocationAssetId (r:1 w:0) @@ -95,9 +95,9 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn deposit_reserve_asset() -> Weight { - (57_806_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(67_308_000) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -106,8 +106,8 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn initiate_teleport() -> Weight { - (24_448_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(29_399_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) } } \ No newline at end of file diff --git a/runtime/dolphin/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/runtime/dolphin/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index a501f8fbe..db85e21c9 100644 --- a/runtime/dolphin/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/runtime/dolphin/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -17,8 +17,8 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-24-14`, CPU: `Intel(R) Xeon(R) Platinum 8275CL CPU @ 3.00GHz` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-86-152`, CPU: `Intel(R) Xeon(R) Platinum 8275CL CPU @ 3.00GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024 // Executed Command: @@ -53,38 +53,38 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn query_holding() -> Weight { - (784_175_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(945_687_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) } pub(crate) fn buy_execution() -> Weight { - (3_842_000 as Weight) + Weight::from_ref_time(4_595_000) } // Storage: PolkadotXcm Queries (r:1 w:0) pub(crate) fn query_response() -> Weight { - (12_596_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) + Weight::from_ref_time(14_733_000) + .saturating_add(T::DbWeight::get().reads(1)) } pub(crate) fn transact() -> Weight { - (15_631_000 as Weight) + Weight::from_ref_time(52_237_000) } pub(crate) fn refund_surplus() -> Weight { - (3_825_000 as Weight) + Weight::from_ref_time(5_992_000) } pub(crate) fn set_error_handler() -> Weight { - (809_000 as Weight) + Weight::from_ref_time(938_000) } pub(crate) fn set_appendix() -> Weight { - (800_000 as Weight) + Weight::from_ref_time(2_853_000) } pub(crate) fn clear_error() -> Weight { - (790_000 as Weight) + Weight::from_ref_time(2_729_000) } pub(crate) fn descend_origin() -> Weight { - (1_916_000 as Weight) + Weight::from_ref_time(6_954_000) } pub(crate) fn clear_origin() -> Weight { - (779_000 as Weight) + Weight::from_ref_time(2_764_000) } // Storage: PolkadotXcm SupportedVersion (r:1 w:0) // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) @@ -92,18 +92,18 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn report_error() -> Weight { - (14_288_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(42_871_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: PolkadotXcm AssetTraps (r:1 w:1) pub(crate) fn claim_asset() -> Weight { - (6_702_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(43_231_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } pub(crate) fn trap() -> Weight { - (781_000 as Weight) + Weight::from_ref_time(1_327_000) } // Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -112,14 +112,14 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn subscribe_version() -> Weight { - (18_594_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(25_012_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: PolkadotXcm VersionNotifyTargets (r:0 w:1) pub(crate) fn unsubscribe_version() -> Weight { - (3_086_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(2_790_000) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -128,8 +128,8 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn initiate_reserve_withdraw() -> Weight { - (961_253_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(1_229_163_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) } } \ No newline at end of file diff --git a/runtime/dolphin/src/xcm_config.rs b/runtime/dolphin/src/xcm_config.rs index 98d42a6ad..a82cc993c 100644 --- a/runtime/dolphin/src/xcm_config.rs +++ b/runtime/dolphin/src/xcm_config.rs @@ -15,9 +15,9 @@ // along with Manta. If not, see . use super::{ - assets_config::DolphinAssetConfig, AssetManager, Assets, Balances, Call, DmpQueue, - EnsureRootOrMoreThanHalfCouncil, Event, Origin, ParachainInfo, ParachainSystem, PolkadotXcm, - Runtime, Treasury, XcmpQueue, MAXIMUM_BLOCK_WEIGHT, + assets_config::DolphinAssetConfig, AssetManager, Assets, Balances, DmpQueue, + EnsureRootOrMoreThanHalfCouncil, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, + RuntimeCall, RuntimeEvent, RuntimeOrigin, Treasury, XcmpQueue, MAXIMUM_BLOCK_WEIGHT, }; use codec::{Decode, Encode}; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; @@ -54,12 +54,12 @@ use xcm_executor::{traits::JustTry, Config, XcmExecutor}; pub use sp_runtime::BuildStorage; parameter_types! { - pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; - pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; + pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); } impl cumulus_pallet_parachain_system::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type SelfParaId = parachain_info::Pallet; type DmpMessageHandler = DmpQueue; type ReservedDmpWeight = ReservedDmpWeight; @@ -74,7 +74,7 @@ impl parachain_info::Config for Runtime {} parameter_types! { pub const RelayNetwork: NetworkId = NetworkId::Kusama; - pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); + pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); pub SelfReserve: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into()))); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); @@ -100,26 +100,26 @@ pub type XcmOriginToCallOrigin = ( // Sovereign account converter; this attempts to derive an `AccountId` from the origin location // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for // foreign chains who want to have a local sovereign account on this chain which they control. - SovereignSignedViaLocation, + SovereignSignedViaLocation, // Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when // recognised. - RelayChainAsNative, + RelayChainAsNative, // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when // recognised. - SiblingParachainAsNative, + SiblingParachainAsNative, // Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a // transaction from the Root origin. - ParentAsSuperuser, + ParentAsSuperuser, // If the incoming XCM origin is of type `AccountId32` and the Network is Network::Any // or `RelayNetwork`, convert it to a Native 32 byte account. - SignedAccountId32AsNative, + SignedAccountId32AsNative, // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. - XcmPassthrough, + XcmPassthrough, ); parameter_types! { // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. - pub UnitWeightCost: Weight = 1_000_000_000; + pub UnitWeightCost: u64 = 1_000_000_000; // Used in native traders // This might be able to skipped. // We have to use `here()` because of reanchoring logic @@ -211,7 +211,7 @@ pub type XcmFeesToAccount = manta_primitives::xcm::XcmFeesToAccount< pub struct XcmExecutorConfig; impl Config for XcmExecutorConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; // Defines how to Withdraw and Deposit instruction work type AssetTransactor = MultiAssetTransactor; @@ -221,8 +221,11 @@ impl Config for XcmExecutorConfig { type IsTeleporter = (); type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = - WeightInfoBounds, Call, MaxInstructions>; + type Weigher = WeightInfoBounds< + crate::weights::xcm::DolphinXcmWeight, + RuntimeCall, + MaxInstructions, + >; // Trader is the means to purchasing weight credit for XCM execution. // We define two traders: // The first one will charge parachain's native currency, who's `MultiLocation` @@ -255,31 +258,34 @@ pub type XcmRouter = ( impl pallet_xcm::Config for Runtime { const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - type Origin = Origin; - type Call = Call; - type Event = Event; - type SendXcmOrigin = EnsureXcmOrigin; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; - type ExecuteXcmOrigin = EnsureXcmOrigin; + type ExecuteXcmOrigin = EnsureXcmOrigin; /// This means that no location will pass XcmExecuteFilter, so a dispatched `execute` message will be filtered. /// This shouldn't be reachable since `LocalOriginToLocation = ();`, but let's be on the safe side. type XcmExecuteFilter = Nothing; type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Nothing; type XcmReserveTransferFilter = Nothing; - type Weigher = - WeightInfoBounds, Call, MaxInstructions>; + type Weigher = WeightInfoBounds< + crate::weights::xcm::DolphinXcmWeight, + RuntimeCall, + MaxInstructions, + >; type LocationInverter = LocationInverter; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } impl cumulus_pallet_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; } impl cumulus_pallet_xcmp_queue::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; @@ -290,7 +296,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { } impl cumulus_pallet_dmp_queue::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; type ExecuteOverweightOrigin = EnsureRoot; } @@ -319,13 +325,13 @@ where } parameter_types! { - pub const BaseXcmWeight: Weight = 100_000_000; + pub const BaseXcmWeight: u64 = 100_000_000; pub const MaxAssetsForTransfer: usize = 2; } // The XCM message wrapper wrapper impl orml_xtokens::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type CurrencyId = CurrencyId; type AccountIdToMultiLocation = AccountIdToMultiLocation; @@ -335,8 +341,11 @@ impl orml_xtokens::Config for Runtime { // Take note that this pallet does not have the typical configurable WeightInfo. // It uses the Weigher configuration to calculate weights for the user callable extrinsics on this chain, // as well as weights for execution on the destination chain. Both based on the composed xcm messages. - type Weigher = - WeightInfoBounds, Call, MaxInstructions>; + type Weigher = WeightInfoBounds< + crate::weights::xcm::DolphinXcmWeight, + RuntimeCall, + MaxInstructions, + >; type BaseXcmWeight = BaseXcmWeight; type LocationInverter = LocationInverter; type MaxAssetsForTransfer = MaxAssetsForTransfer; diff --git a/runtime/manta/Cargo.toml b/runtime/manta/Cargo.toml index 9f2ec1d02..d73438d4a 100644 --- a/runtime/manta/Cargo.toml +++ b/runtime/manta/Cargo.toml @@ -8,7 +8,7 @@ repository = 'https://github.com/Manta-Network/Manta/' version = '4.0.7' [dependencies] -codec = { package = "parity-scale-codec", version = '3.1.2', default-features = false, features = ["derive", "max-encoded-len"] } +codec = { package = "parity-scale-codec", version = '3.4.0', default-features = false, features = ["derive", "max-encoded-len"] } hex-literal = { version = '0.3.4', optional = true } log = { version = "0.4.16", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } @@ -16,73 +16,73 @@ serde = { version = "1.0.140", features = ['derive'], optional = true } smallvec = "1.8.0" # Substrate primitives -sp-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-application-crypto = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-arithmetic = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-inherents = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-io = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-offchain = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -sp-version = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } +sp-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-application-crypto = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-arithmetic = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-core = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-inherents = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-io = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-offchain = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +sp-version = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } # Substrate frames -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.28" } -frame-executive = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.28" } -frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -frame-try-runtime = { git = "https://github.com/paritytech/substrate.git", default-features = false, optional = true, branch = "polkadot-v0.9.28" } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.37" } +frame-executive = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.37" } +frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +frame-try-runtime = { git = "https://github.com/paritytech/substrate.git", default-features = false, optional = true, branch = "polkadot-v0.9.37" } # Substrate pallets -pallet-assets = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" } -pallet-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-multisig = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-preimage = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-sudo = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } -pallet-treasury = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" } -pallet-utility = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" } +pallet-assets = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.37" } +pallet-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-multisig = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-preimage = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-sudo = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } +pallet-treasury = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.37" } +pallet-utility = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.37" } # Cumulus dependencies -cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } -cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } -cumulus-pallet-session-benchmarking = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, optional = true, branch = "polkadot-v0.9.28" } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } -cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } -cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } -cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } -cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } -parachain-info = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" } +cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } +cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } +cumulus-pallet-session-benchmarking = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, optional = true, branch = "polkadot-v0.9.37" } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } +cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } +cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } +cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } +cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } +parachain-info = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.37" } # Nimbus Dependencies -nimbus-primitives = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.1", default-features = false } -pallet-aura-style-filter = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.1", default-features = false } -pallet-author-inherent = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.1", default-features = false } +nimbus-primitives = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.7", default-features = false } +pallet-aura-style-filter = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.7", default-features = false } +pallet-author-inherent = { git = "https://github.com/manta-network/nimbus.git", tag = "v4.0.7", default-features = false } # Polkadot dependencies -pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" } -pallet-xcm-benchmarks = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28", optional = true } -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" } -polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" } -xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" } -xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" } -xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" } +pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37" } +pallet-xcm-benchmarks = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37", optional = true } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37" } +polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37" } +xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37" } +xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37" } +xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.37" } # Third party (vendored) dependencies -orml-traits = { git = 'https://github.com/manta-network/open-runtime-module-library.git', default-features = false, branch = "polkadot-v0.9.28" } -orml-xtokens = { git = 'https://github.com/manta-network/open-runtime-module-library.git', default-features = false, branch = "polkadot-v0.9.28" } +orml-traits = { git = 'https://github.com/manta-network/open-runtime-module-library.git', default-features = false, branch = "polkadot-v0.9.37" } +orml-xtokens = { git = 'https://github.com/manta-network/open-runtime-module-library.git', default-features = false, branch = "polkadot-v0.9.37" } # Self dependencies manta-collator-selection = { path = '../../pallets/collator-selection', default-features = false } @@ -93,16 +93,16 @@ runtime-common = { path = '../common', default-features = false } session-key-primitives = { path = '../../primitives/session-keys', default-features = false } [dev-dependencies] -polkadot-core-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } -polkadot-runtime-parachains = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } +polkadot-core-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } +polkadot-runtime-parachains = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } runtime-common = { path = '../common', features = ["test-helpers"] } -xcm-simulator = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" } +xcm-simulator = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.37" } [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] [build-dependencies] -substrate-wasm-builder = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } +substrate-wasm-builder = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.37" } [features] default = ['std'] @@ -110,9 +110,9 @@ runtime-benchmarks = [ 'cumulus-pallet-session-benchmarking/runtime-benchmarks', 'hex-literal', 'sp-runtime/runtime-benchmarks', + 'frame-benchmarking/runtime-benchmarks', 'xcm-builder/runtime-benchmarks', - 'frame-benchmarking', - 'frame-system-benchmarking', + 'frame-system-benchmarking/runtime-benchmarks', 'frame-support/runtime-benchmarks', 'frame-system/runtime-benchmarks', 'manta-collator-selection/runtime-benchmarks', @@ -130,13 +130,15 @@ runtime-benchmarks = [ 'pallet-assets/runtime-benchmarks', 'pallet-asset-manager/runtime-benchmarks', 'cumulus-pallet-xcmp-queue/runtime-benchmarks', + 'orml-xtokens/runtime-benchmarks', 'cumulus-pallet-parachain-system/runtime-benchmarks', - 'pallet-xcm-benchmarks', + 'pallet-xcm-benchmarks/runtime-benchmarks', ] try-runtime = [ - 'frame-executive/try-runtime', 'frame-try-runtime', + 'frame-executive/try-runtime', 'frame-system/try-runtime', + "frame-support/try-runtime", 'pallet-authorship/try-runtime', 'pallet-balances/try-runtime', 'pallet-parachain-staking/try-runtime', @@ -150,6 +152,19 @@ try-runtime = [ 'pallet-assets/try-runtime', 'pallet-asset-manager/try-runtime', 'runtime-common/try-runtime', + "cumulus-pallet-parachain-system/try-runtime", + "parachain-info/try-runtime", + 'pallet-aura/try-runtime', + 'pallet-xcm/try-runtime', + "cumulus-pallet-dmp-queue/try-runtime", + 'pallet-aura-style-filter/try-runtime', + 'pallet-author-inherent/try-runtime', + 'manta-collator-selection/try-runtime', + 'pallet-sudo/try-runtime', + 'cumulus-pallet-xcmp-queue/try-runtime', + 'cumulus-pallet-xcm/try-runtime', + 'pallet-asset-manager/try-runtime', + 'orml-xtokens/try-runtime', ] # Set timing constants (e.g. session period) to faster versions to speed up testing. fast-runtime = [] @@ -174,6 +189,7 @@ std = [ 'frame-system/std', 'frame-system-rpc-runtime-api/std', 'frame-try-runtime/std', + "frame-system-benchmarking/std", 'pallet-authorship/std', 'pallet-balances/std', 'pallet-multisig/std', diff --git a/runtime/manta/src/assets_config.rs b/runtime/manta/src/assets_config.rs index 9fc795ca4..c1f1f8169 100644 --- a/runtime/manta/src/assets_config.rs +++ b/runtime/manta/src/assets_config.rs @@ -15,8 +15,8 @@ // along with Manta. If not, see . use super::{ - weights, xcm_config::SelfReserve, AssetManager, Assets, Balances, Event, - NativeTokenExistentialDeposit, Origin, Runtime, + weights, xcm_config::SelfReserve, AssetManager, Assets, Balances, + NativeTokenExistentialDeposit, Runtime, RuntimeEvent, RuntimeOrigin, }; use manta_primitives::{ @@ -28,7 +28,12 @@ use manta_primitives::{ types::{AccountId, Balance, MantaAssetId}, }; -use frame_support::{pallet_prelude::DispatchResult, parameter_types, traits::ConstU32, PalletId}; +use frame_support::{ + pallet_prelude::DispatchResult, + parameter_types, + traits::{AsEnsureOriginWithArg, ConstU32}, + PalletId, +}; use frame_system::EnsureRoot; use xcm::VersionedMultiLocation; @@ -43,7 +48,7 @@ parameter_types! { } impl pallet_assets::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = MantaAssetId; type Currency = Balances; @@ -57,6 +62,15 @@ impl pallet_assets::Config for Runtime { type Freezer = (); type Extra = (); type WeightInfo = weights::pallet_assets::SubstrateWeight; + type RemoveItemsLimit = ConstU32<1000>; + type AssetIdParameter = MantaAssetId; + #[cfg(feature = "runtime-benchmarks")] + type CreateOrigin = AsEnsureOriginWithArg>; + #[cfg(not(feature = "runtime-benchmarks"))] + type CreateOrigin = AsEnsureOriginWithArg>; + type CallbackHandle = (); + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); } pub struct MantaAssetRegistry; @@ -77,7 +91,7 @@ impl AssetRegistry for MantaAssetRegistry { is_sufficient: bool, ) -> DispatchResult { Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), asset_id, sp_runtime::MultiAddress::Id(AssetManager::account_id()), is_sufficient, @@ -85,7 +99,7 @@ impl AssetRegistry for MantaAssetRegistry { )?; Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), asset_id, metadata.name, metadata.symbol, @@ -99,7 +113,7 @@ impl AssetRegistry for MantaAssetRegistry { metadata: AssetStorageMetadata, ) -> DispatchResult { Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), *asset_id, metadata.name, metadata.symbol, @@ -154,7 +168,7 @@ impl AssetConfig for MantaAssetConfig { } impl pallet_asset_manager::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AssetId = MantaAssetId; type Balance = Balance; type Location = AssetLocation; diff --git a/runtime/manta/src/fee.rs b/runtime/manta/src/fee.rs index b2f5de3ca..7b86ef9a1 100644 --- a/runtime/manta/src/fee.rs +++ b/runtime/manta/src/fee.rs @@ -44,7 +44,7 @@ impl WeightToFeePolynomial for WeightToFee { // in Manta Parachain, we map to 1/10 of that, or 1/100 CENT // TODO, revisit here to figure out why use this polynomial let p = currency::cMANTA; - let q = 100 * Balance::from(ExtrinsicBaseWeight::get()); + let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); smallvec![WeightToFeeCoefficient { degree: 1, negative: false, diff --git a/runtime/manta/src/lib.rs b/runtime/manta/src/lib.rs index f6e473788..61576efd6 100644 --- a/runtime/manta/src/lib.rs +++ b/runtime/manta/src/lib.rs @@ -45,9 +45,11 @@ use cumulus_pallet_parachain_system::{ RelaychainBlockNumberProvider, }; use frame_support::{ - construct_runtime, parameter_types, - traits::{ConstU128, ConstU16, ConstU32, ConstU8, Contains, Currency, NeverEnsureOrigin}, - weights::{ConstantMultiplier, DispatchClass, Weight}, + construct_runtime, + dispatch::DispatchClass, + parameter_types, + traits::{ConstU128, ConstU32, ConstU8, Contains, Currency, NeverEnsureOrigin}, + weights::{ConstantMultiplier, Weight}, PalletId, }; @@ -153,7 +155,9 @@ pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(70); /// We allow for 0.5 seconds of compute with a 6 second average block time. -pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2; +pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_ref_time(WEIGHT_PER_SECOND) + .saturating_div(2) + .set_proof_size(cumulus_primitives_core::relay_chain::v2::MAX_POV_SIZE as u64); parameter_types! { pub const Version: RuntimeVersion = VERSION; @@ -182,11 +186,11 @@ parameter_types! { // Don't allow permission-less asset creation. pub struct MantaFilter; -impl Contains for MantaFilter { - fn contains(call: &Call) -> bool { +impl Contains for MantaFilter { + fn contains(call: &RuntimeCall) -> bool { if matches!( call, - Call::Timestamp(_) | Call::ParachainSystem(_) | Call::System(_) + RuntimeCall::Timestamp(_) | RuntimeCall::ParachainSystem(_) | RuntimeCall::System(_) ) { // always allow core call // pallet-timestamp and parachainSystem could not be filtered because they are used in communication between releychain and parachain. @@ -198,15 +202,15 @@ impl Contains for MantaFilter { match call { // Explicitly DISALLOWED calls ( Pallet user extrinsics we don't want used WITH REASONING ) // Explicitly ALLOWED calls - | Call::Authorship(_) + | RuntimeCall::Authorship(_) // Sudo also cannot be filtered because it is used in runtime upgrade. - | Call::Sudo(_) - | Call::Multisig(_) - | Call::AuthorInherent(pallet_author_inherent::Call::kick_off_authorship_validation {..}) // executes unsigned on every block - | Call::Balances(_) - | Call::XTokens(orml_xtokens::Call::transfer {..}) - | Call::Preimage(_) - | Call::Utility(_) => true, + | RuntimeCall::Sudo(_) + | RuntimeCall::Multisig(_) + | RuntimeCall::AuthorInherent(pallet_author_inherent::Call::kick_off_authorship_validation {..}) // executes unsigned on every block + | RuntimeCall::XTokens(orml_xtokens::Call::transfer {..}) + | RuntimeCall::Balances(_) + | RuntimeCall::Preimage(_) + | RuntimeCall::Utility(_) => true, // DISALLOW anything else | _ => false @@ -220,15 +224,15 @@ impl frame_system::Config for Runtime { type BlockWeights = RuntimeBlockWeights; type BlockLength = RuntimeBlockLength; type AccountId = AccountId; - type Call = Call; + type RuntimeCall = RuntimeCall; type Lookup = AccountIdLookup; type Index = Index; type BlockNumber = BlockNumber; type Hash = Hash; type Hashing = BlakeTwo256; type Header = Header; - type Event = Event; - type Origin = Origin; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; type BlockHashCount = BlockHashCount; type DbWeight = RocksDbWeight; type Version = Version; @@ -271,7 +275,7 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type Balance = Balance; type DustRemoval = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = NativeTokenExistentialDeposit; type AccountStore = frame_system::Pallet; type WeightInfo = weights::pallet_balances::SubstrateWeight; @@ -288,7 +292,7 @@ impl pallet_transaction_payment::Config for Runtime { type LengthToFee = ConstantMultiplier; type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; type OperationalFeeMultiplier = ConstU8<5>; - type Event = Event; + type RuntimeEvent = RuntimeEvent; } parameter_types! { @@ -299,25 +303,25 @@ parameter_types! { } impl pallet_multisig::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Currency = Balances; type DepositBase = DepositBase; type DepositFactor = DepositFactor; - type MaxSignatories = ConstU16<100>; + type MaxSignatories = ConstU32<100>; type WeightInfo = weights::pallet_multisig::SubstrateWeight; } impl pallet_utility::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type PalletsOrigin = OriginCaller; type WeightInfo = weights::pallet_utility::SubstrateWeight; } impl pallet_sudo::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; } impl pallet_aura_style_filter::Config for Runtime { @@ -335,7 +339,7 @@ parameter_types! { pub LeaveDelayRounds: BlockNumber = prod_or_fast!(28,1,"MANTA_LEAVEDELAYROUNDS"); // == 7 * DAYS / 6 * HOURS } impl pallet_parachain_staking::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type BlockAuthor = AuthorInherent; type MonetaryGovernanceOrigin = EnsureRoot; @@ -401,10 +405,9 @@ parameter_types! { impl pallet_preimage::Config for Runtime { type WeightInfo = weights::pallet_preimage::SubstrateWeight; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type ManagerOrigin = EnsureRoot; - type MaxSize = PreimageMaxSize; type BaseDeposit = PreimageBaseDeposit; type ByteDeposit = PreimageByteDeposit; } @@ -425,7 +428,7 @@ parameter_types! { pub const Offset: u32 = 0; } impl pallet_session::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorId = ::AccountId; // we don't have stash and controller, thus we don't need the convert as well. type ValidatorIdOf = IdentityCollator; @@ -453,7 +456,7 @@ parameter_types! { pub type CollatorSelectionUpdateOrigin = EnsureRoot; impl manta_collator_selection::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type UpdateOrigin = CollatorSelectionUpdateOrigin; type PotId = PotId; @@ -483,7 +486,7 @@ impl pallet_treasury::Config for Runtime { type Currency = Balances; type ApproveOrigin = EnsureRoot; type RejectOrigin = EnsureRoot; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnSlash = Treasury; type ProposalBond = ProposalBond; type ProposalBondMinimum = ProposalBondMinimum; @@ -571,9 +574,10 @@ pub type SignedExtra = ( pallet_transaction_payment::ChargeTransactionPayment, ); /// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic; /// Extrinsic type that has already been checked. -pub type CheckedExtrinsic = generic::CheckedExtrinsic; +pub type CheckedExtrinsic = generic::CheckedExtrinsic; /// Types for runtime upgrading. /// Each type should implement trait `OnRuntimeUpgrade`. @@ -584,7 +588,7 @@ pub type Executive = frame_executive::Executive< Block, frame_system::ChainContext, Runtime, - AllPalletsReversedWithSystemFirst, + AllPalletsWithSystem, OnRuntimeUpgradeHooks, >; @@ -721,17 +725,17 @@ impl_runtime_apis! { } } - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi for Runtime { fn query_call_info( - call: Call, + call: RuntimeCall, len: u32, ) -> pallet_transaction_payment::RuntimeDispatchInfo { TransactionPayment::query_call_info(call, len) } fn query_call_fee_details( - call: Call, + call: RuntimeCall, len: u32, ) -> pallet_transaction_payment::FeeDetails { TransactionPayment::query_call_fee_details(call, len) @@ -778,13 +782,18 @@ impl_runtime_apis! { #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { - fn on_runtime_upgrade() -> (Weight, Weight) { - let weight = Executive::try_runtime_upgrade().unwrap(); + fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { + let weight = Executive::try_runtime_upgrade(checks).unwrap(); (weight, RuntimeBlockWeights::get().max_block) } - fn execute_block_no_check(block: Block) -> Weight { - Executive::execute_block_no_check(block) + fn execute_block( + block: Block, + state_root_check: bool, + signature_check: bool, + select: frame_try_runtime::TryStateSelect + ) -> Weight { + Executive::try_execute_block(block, state_root_check, signature_check, select).expect("try_execute_block failed") } } @@ -802,7 +811,7 @@ impl_runtime_apis! { let mut list = Vec::::new(); list_benchmarks!(list, extra); - let storage_info = AllPalletsReversedWithSystemFirst::storage_info(); + let storage_info = AllPalletsWithSystem::storage_info(); (list, storage_info) } @@ -883,7 +892,7 @@ impl_runtime_apis! { } impl pallet_xcm_benchmarks::generic::Config for Runtime { - type Call = Call; + type RuntimeCall = RuntimeCall; fn worst_case_response() -> (u64, Response) { (0u64, Response::Version(Default::default())) diff --git a/runtime/manta/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/manta/src/weights/cumulus_pallet_xcmp_queue.rs index 4c1852424..d450919ff 100644 --- a/runtime/manta/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/manta/src/weights/cumulus_pallet_xcmp_queue.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for cumulus_pallet_xcmp_queue //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("manta-dev"), DB CACHE: 1024 // Executed Command: @@ -53,32 +53,36 @@ pub trait WeightInfo { /// Weights for cumulus_pallet_xcmp_queue using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl cumulus_pallet_xcmp_queue::WeightInfo for SubstrateWeight { - // Storage: XcmpQueue QueueConfig (r:1 w:1) - fn set_config_with_u32() -> Weight { - (5_824_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: XcmpQueue QueueConfig (r:1 w:1) - fn set_config_with_weight() -> Weight { - (5_603_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } + // Storage: XcmpQueue QueueConfig (r:1 w:1) + fn set_config_with_u32() -> Weight { + // Minimum execution time: 7_588 nanoseconds. + Weight::from_ref_time(7_969_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: XcmpQueue QueueConfig (r:1 w:1) + fn set_config_with_weight() -> Weight { + // Minimum execution time: 10_003 nanoseconds. + Weight::from_ref_time(10_661_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: XcmpQueue QueueConfig (r:1 w:1) - fn set_config_with_u32() -> Weight { - (5_824_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: XcmpQueue QueueConfig (r:1 w:1) - fn set_config_with_weight() -> Weight { - (5_603_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } + // Storage: XcmpQueue QueueConfig (r:1 w:1) + fn set_config_with_u32() -> Weight { + // Minimum execution time: 7_588 nanoseconds. + Weight::from_ref_time(7_969_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: XcmpQueue QueueConfig (r:1 w:1) + fn set_config_with_weight() -> Weight { + // Minimum execution time: 10_003 nanoseconds. + Weight::from_ref_time(10_661_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } } diff --git a/runtime/manta/src/weights/frame_system.rs b/runtime/manta/src/weights/frame_system.rs index e351730a3..9813bbb50 100644 --- a/runtime/manta/src/weights/frame_system.rs +++ b/runtime/manta/src/weights/frame_system.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for frame_system //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("manta-dev"), DB CACHE: 1024 // Executed Command: @@ -57,80 +57,106 @@ pub trait WeightInfo { /// Weights for frame_system using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl frame_system::WeightInfo for SubstrateWeight { - fn remark(_b: u32, ) -> Weight { - (8_700_000 as Weight) - } - fn remark_with_event(b: u32, ) -> Weight { - (6_500_000 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) - } - // Storage: System Digest (r:1 w:1) - // Storage: unknown [0x3a686561707061676573] (r:0 w:1) - fn set_heap_pages() -> Weight { - (5_516_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Skipped Metadata (r:0 w:0) - fn set_storage(i: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 1_000 - .saturating_add((705_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) - } - // Storage: Skipped Metadata (r:0 w:0) - fn kill_storage(i: u32, ) -> Weight { - (898_000 as Weight) - // Standard Error: 1_000 - .saturating_add((587_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) - } - // Storage: Skipped Metadata (r:0 w:0) - fn kill_prefix(p: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 2_000 - .saturating_add((1_217_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) - } + /// The range of component `b` is `[0, 3670016]`. + fn remark(b: u32, ) -> Weight { + // Minimum execution time: 3_936 nanoseconds. + Weight::from_ref_time(25_008_737) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(578).saturating_mul(b.into())) + } + /// The range of component `b` is `[0, 3670016]`. + fn remark_with_event(b: u32, ) -> Weight { + // Minimum execution time: 13_342 nanoseconds. + Weight::from_ref_time(7_908_781) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(2_160).saturating_mul(b.into())) + } + // Storage: System Digest (r:1 w:1) + // Storage: unknown [0x3a686561707061676573] (r:0 w:1) + fn set_heap_pages() -> Weight { + // Minimum execution time: 8_565 nanoseconds. + Weight::from_ref_time(8_858_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[0, 1000]`. + fn set_storage(i: u32, ) -> Weight { + // Minimum execution time: 4_142 nanoseconds. + Weight::from_ref_time(4_217_000) + // Standard Error: 2_116 + .saturating_add(Weight::from_ref_time(738_393).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[0, 1000]`. + fn kill_storage(i: u32, ) -> Weight { + // Minimum execution time: 4_093 nanoseconds. + Weight::from_ref_time(4_225_000) + // Standard Error: 1_195 + .saturating_add(Weight::from_ref_time(529_985).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `p` is `[0, 1000]`. + fn kill_prefix(p: u32, ) -> Weight { + // Minimum execution time: 5_888 nanoseconds. + Weight::from_ref_time(6_046_000) + // Standard Error: 1_033 + .saturating_add(Weight::from_ref_time(1_131_549).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + } } // For backwards compatibility and tests impl WeightInfo for () { - fn remark(_b: u32, ) -> Weight { - (8_700_000 as Weight) - } - fn remark_with_event(b: u32, ) -> Weight { - (6_500_000 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) - } - // Storage: System Digest (r:1 w:1) - // Storage: unknown [0x3a686561707061676573] (r:0 w:1) - fn set_heap_pages() -> Weight { - (5_516_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Skipped Metadata (r:0 w:0) - fn set_storage(i: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 1_000 - .saturating_add((705_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) - } - // Storage: Skipped Metadata (r:0 w:0) - fn kill_storage(i: u32, ) -> Weight { - (898_000 as Weight) - // Standard Error: 1_000 - .saturating_add((587_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) - } - // Storage: Skipped Metadata (r:0 w:0) - fn kill_prefix(p: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 2_000 - .saturating_add((1_217_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) - } + /// The range of component `b` is `[0, 3670016]`. + fn remark(b: u32, ) -> Weight { + // Minimum execution time: 3_936 nanoseconds. + Weight::from_ref_time(25_008_737) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(578).saturating_mul(b.into())) + } + /// The range of component `b` is `[0, 3670016]`. + fn remark_with_event(b: u32, ) -> Weight { + // Minimum execution time: 13_342 nanoseconds. + Weight::from_ref_time(7_908_781) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(2_160).saturating_mul(b.into())) + } + // Storage: System Digest (r:1 w:1) + // Storage: unknown [0x3a686561707061676573] (r:0 w:1) + fn set_heap_pages() -> Weight { + // Minimum execution time: 8_565 nanoseconds. + Weight::from_ref_time(8_858_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[0, 1000]`. + fn set_storage(i: u32, ) -> Weight { + // Minimum execution time: 4_142 nanoseconds. + Weight::from_ref_time(4_217_000) + // Standard Error: 2_116 + .saturating_add(Weight::from_ref_time(738_393).saturating_mul(i.into())) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[0, 1000]`. + fn kill_storage(i: u32, ) -> Weight { + // Minimum execution time: 4_093 nanoseconds. + Weight::from_ref_time(4_225_000) + // Standard Error: 1_195 + .saturating_add(Weight::from_ref_time(529_985).saturating_mul(i.into())) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `p` is `[0, 1000]`. + fn kill_prefix(p: u32, ) -> Weight { + // Minimum execution time: 5_888 nanoseconds. + Weight::from_ref_time(6_046_000) + // Standard Error: 1_033 + .saturating_add(Weight::from_ref_time(1_131_549).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(p.into()))) + } } diff --git a/runtime/manta/src/weights/manta_collator_selection.rs b/runtime/manta/src/weights/manta_collator_selection.rs index f80cb95a3..56f4c5790 100644 --- a/runtime/manta/src/weights/manta_collator_selection.rs +++ b/runtime/manta/src/weights/manta_collator_selection.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for manta_collator_selection //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("manta-dev"), DB CACHE: 1024 // Executed Command: @@ -62,194 +62,224 @@ pub trait WeightInfo { /// Weights for manta_collator_selection using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl manta_collator_selection::WeightInfo for SubstrateWeight { - // Storage: CollatorSelection Invulnerables (r:0 w:1) - fn set_invulnerables(b: u32, ) -> Weight { - (13_093_000 as Weight) - // Standard Error: 6_000 - .saturating_add((140_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection DesiredCandidates (r:0 w:1) - fn set_desired_candidates() -> Weight { - (14_962_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection CandidacyBond (r:0 w:1) - fn set_candidacy_bond() -> Weight { - (12_688_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection EvictionBaseline (r:0 w:1) - fn set_eviction_baseline() -> Weight { - (12_400_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection EvictionTolerance (r:0 w:1) - fn set_eviction_tolerance() -> Weight { - (12_220_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:1) - // Storage: CollatorSelection DesiredCandidates (r:1 w:0) - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: Session NextKeys (r:1 w:0) - // Storage: CollatorSelection CandidacyBond (r:1 w:0) - fn register_as_candidate(c: u32, ) -> Weight { - (43_147_000 as Weight) - // Standard Error: 3_000 - .saturating_add((365_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:1) - fn leave_intent(c: u32, ) -> Weight { - (31_968_000 as Weight) - // Standard Error: 6_000 - .saturating_add((251_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: CollatorSelection Candidates (r:1 w:1) - fn remove_collator(c: u32, ) -> Weight { - (34_203_000 as Weight) - // Standard Error: 6_000 - .saturating_add((223_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:1) - // Storage: CollatorSelection DesiredCandidates (r:1 w:0) - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: Session NextKeys (r:1 w:0) - // Storage: CollatorSelection CandidacyBond (r:1 w:0) - fn register_candidate(c: u32, ) -> Weight { - (44_805_000 as Weight) - // Standard Error: 7_000 - .saturating_add((220_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:2 w:2) - // Storage: CollatorSelection BlocksPerCollatorThisSession (r:1 w:1) - // Storage: System BlockWeight (r:1 w:1) - fn note_author() -> Weight { - (38_265_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:0) - // Storage: CollatorSelection EvictionBaseline (r:1 w:0) - // Storage: CollatorSelection EvictionTolerance (r:1 w:0) - // Storage: CollatorSelection BlocksPerCollatorThisSession (r:2 w:2) - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: System BlockWeight (r:1 w:1) - // Storage: Session Validators (r:1 w:0) - // Storage: System Account (r:1 w:1) - fn new_session(c: u32, ) -> Weight { - (19_157_000 as Weight) - // Standard Error: 73_000 - .saturating_add((23_880_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) - } + // Storage: CollatorSelection Invulnerables (r:0 w:1) + /// The range of component `b` is `[1, 5]`. + fn set_invulnerables(_b: u32, ) -> Weight { + // Minimum execution time: 14_377 nanoseconds. + Weight::from_ref_time(19_735_737) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection DesiredCandidates (r:0 w:1) + fn set_desired_candidates() -> Weight { + // Minimum execution time: 16_348 nanoseconds. + Weight::from_ref_time(17_326_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection CandidacyBond (r:0 w:1) + fn set_candidacy_bond() -> Weight { + // Minimum execution time: 43_280 nanoseconds. + Weight::from_ref_time(44_527_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection EvictionBaseline (r:0 w:1) + fn set_eviction_baseline() -> Weight { + // Minimum execution time: 27_793 nanoseconds. + Weight::from_ref_time(42_164_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection EvictionTolerance (r:0 w:1) + fn set_eviction_tolerance() -> Weight { + // Minimum execution time: 27_684 nanoseconds. + Weight::from_ref_time(28_345_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection DesiredCandidates (r:1 w:0) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: Session NextKeys (r:1 w:0) + // Storage: CollatorSelection CandidacyBond (r:1 w:0) + /// The range of component `c` is `[1, 50]`. + fn register_as_candidate(c: u32, ) -> Weight { + // Minimum execution time: 47_333 nanoseconds. + Weight::from_ref_time(50_627_697) + // Standard Error: 5_207 + .saturating_add(Weight::from_ref_time(246_262).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection Candidates (r:1 w:1) + /// The range of component `c` is `[1, 50]`. + fn leave_intent(c: u32, ) -> Weight { + // Minimum execution time: 32_512 nanoseconds. + Weight::from_ref_time(35_372_750) + // Standard Error: 3_719 + .saturating_add(Weight::from_ref_time(189_668).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: CollatorSelection Candidates (r:1 w:1) + /// The range of component `c` is `[1, 50]`. + fn remove_collator(c: u32, ) -> Weight { + // Minimum execution time: 32_570 nanoseconds. + Weight::from_ref_time(37_287_502) + // Standard Error: 4_225 + .saturating_add(Weight::from_ref_time(195_298).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection DesiredCandidates (r:1 w:0) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: Session NextKeys (r:1 w:0) + // Storage: CollatorSelection CandidacyBond (r:1 w:0) + /// The range of component `c` is `[1, 50]`. + fn register_candidate(c: u32, ) -> Weight { + // Minimum execution time: 47_729 nanoseconds. + Weight::from_ref_time(51_052_694) + // Standard Error: 5_304 + .saturating_add(Weight::from_ref_time(227_859).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: System Account (r:2 w:2) + // Storage: CollatorSelection BlocksPerCollatorThisSession (r:1 w:1) + // Storage: System BlockWeight (r:1 w:1) + fn note_author() -> Weight { + // Minimum execution time: 36_934 nanoseconds. + Weight::from_ref_time(37_477_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: CollatorSelection Candidates (r:1 w:0) + // Storage: CollatorSelection EvictionBaseline (r:1 w:0) + // Storage: CollatorSelection EvictionTolerance (r:1 w:0) + // Storage: CollatorSelection BlocksPerCollatorThisSession (r:2 w:2) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: System BlockWeight (r:1 w:1) + // Storage: Session Validators (r:1 w:0) + // Storage: System Account (r:1 w:1) + /// The range of component `c` is `[1, 50]`. + fn new_session(c: u32, ) -> Weight { + // Minimum execution time: 35_466 nanoseconds. + Weight::from_ref_time(31_334_699) + // Standard Error: 72_657 + .saturating_add(Weight::from_ref_time(22_124_609).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: CollatorSelection Invulnerables (r:0 w:1) - fn set_invulnerables(b: u32, ) -> Weight { - (13_093_000 as Weight) - // Standard Error: 6_000 - .saturating_add((140_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection DesiredCandidates (r:0 w:1) - fn set_desired_candidates() -> Weight { - (14_962_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection CandidacyBond (r:0 w:1) - fn set_candidacy_bond() -> Weight { - (12_688_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection EvictionBaseline (r:0 w:1) - fn set_eviction_baseline() -> Weight { - (12_400_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection EvictionTolerance (r:0 w:1) - fn set_eviction_tolerance() -> Weight { - (12_220_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:1) - // Storage: CollatorSelection DesiredCandidates (r:1 w:0) - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: Session NextKeys (r:1 w:0) - // Storage: CollatorSelection CandidacyBond (r:1 w:0) - fn register_as_candidate(c: u32, ) -> Weight { - (43_147_000 as Weight) - // Standard Error: 3_000 - .saturating_add((365_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:1) - fn leave_intent(c: u32, ) -> Weight { - (31_968_000 as Weight) - // Standard Error: 6_000 - .saturating_add((251_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: CollatorSelection Candidates (r:1 w:1) - fn remove_collator(c: u32, ) -> Weight { - (34_203_000 as Weight) - // Standard Error: 6_000 - .saturating_add((223_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:1) - // Storage: CollatorSelection DesiredCandidates (r:1 w:0) - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: Session NextKeys (r:1 w:0) - // Storage: CollatorSelection CandidacyBond (r:1 w:0) - fn register_candidate(c: u32, ) -> Weight { - (44_805_000 as Weight) - // Standard Error: 7_000 - .saturating_add((220_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:2 w:2) - // Storage: CollatorSelection BlocksPerCollatorThisSession (r:1 w:1) - // Storage: System BlockWeight (r:1 w:1) - fn note_author() -> Weight { - (38_265_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - // Storage: CollatorSelection Candidates (r:1 w:0) - // Storage: CollatorSelection EvictionBaseline (r:1 w:0) - // Storage: CollatorSelection EvictionTolerance (r:1 w:0) - // Storage: CollatorSelection BlocksPerCollatorThisSession (r:2 w:2) - // Storage: CollatorSelection Invulnerables (r:1 w:0) - // Storage: System BlockWeight (r:1 w:1) - // Storage: Session Validators (r:1 w:0) - // Storage: System Account (r:1 w:1) - fn new_session(c: u32, ) -> Weight { - (19_157_000 as Weight) - // Standard Error: 73_000 - .saturating_add((23_880_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) - } + // Storage: CollatorSelection Invulnerables (r:0 w:1) + /// The range of component `b` is `[1, 5]`. + fn set_invulnerables(_b: u32, ) -> Weight { + // Minimum execution time: 14_377 nanoseconds. + Weight::from_ref_time(19_735_737) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection DesiredCandidates (r:0 w:1) + fn set_desired_candidates() -> Weight { + // Minimum execution time: 16_348 nanoseconds. + Weight::from_ref_time(17_326_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection CandidacyBond (r:0 w:1) + fn set_candidacy_bond() -> Weight { + // Minimum execution time: 43_280 nanoseconds. + Weight::from_ref_time(44_527_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection EvictionBaseline (r:0 w:1) + fn set_eviction_baseline() -> Weight { + // Minimum execution time: 27_793 nanoseconds. + Weight::from_ref_time(42_164_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection EvictionTolerance (r:0 w:1) + fn set_eviction_tolerance() -> Weight { + // Minimum execution time: 27_684 nanoseconds. + Weight::from_ref_time(28_345_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection DesiredCandidates (r:1 w:0) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: Session NextKeys (r:1 w:0) + // Storage: CollatorSelection CandidacyBond (r:1 w:0) + /// The range of component `c` is `[1, 50]`. + fn register_as_candidate(c: u32, ) -> Weight { + // Minimum execution time: 47_333 nanoseconds. + Weight::from_ref_time(50_627_697) + // Standard Error: 5_207 + .saturating_add(Weight::from_ref_time(246_262).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection Candidates (r:1 w:1) + /// The range of component `c` is `[1, 50]`. + fn leave_intent(c: u32, ) -> Weight { + // Minimum execution time: 32_512 nanoseconds. + Weight::from_ref_time(35_372_750) + // Standard Error: 3_719 + .saturating_add(Weight::from_ref_time(189_668).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: CollatorSelection Candidates (r:1 w:1) + /// The range of component `c` is `[1, 50]`. + fn remove_collator(c: u32, ) -> Weight { + // Minimum execution time: 32_570 nanoseconds. + Weight::from_ref_time(37_287_502) + // Standard Error: 4_225 + .saturating_add(Weight::from_ref_time(195_298).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection DesiredCandidates (r:1 w:0) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: Session NextKeys (r:1 w:0) + // Storage: CollatorSelection CandidacyBond (r:1 w:0) + /// The range of component `c` is `[1, 50]`. + fn register_candidate(c: u32, ) -> Weight { + // Minimum execution time: 47_729 nanoseconds. + Weight::from_ref_time(51_052_694) + // Standard Error: 5_304 + .saturating_add(Weight::from_ref_time(227_859).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: System Account (r:2 w:2) + // Storage: CollatorSelection BlocksPerCollatorThisSession (r:1 w:1) + // Storage: System BlockWeight (r:1 w:1) + fn note_author() -> Weight { + // Minimum execution time: 36_934 nanoseconds. + Weight::from_ref_time(37_477_000) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(4)) + } + // Storage: CollatorSelection Candidates (r:1 w:0) + // Storage: CollatorSelection EvictionBaseline (r:1 w:0) + // Storage: CollatorSelection EvictionTolerance (r:1 w:0) + // Storage: CollatorSelection BlocksPerCollatorThisSession (r:2 w:2) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: System BlockWeight (r:1 w:1) + // Storage: Session Validators (r:1 w:0) + // Storage: System Account (r:1 w:1) + /// The range of component `c` is `[1, 50]`. + fn new_session(c: u32, ) -> Weight { + // Minimum execution time: 35_466 nanoseconds. + Weight::from_ref_time(31_334_699) + // Standard Error: 72_657 + .saturating_add(Weight::from_ref_time(22_124_609).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(6)) + .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(c.into()))) + .saturating_add(RocksDbWeight::get().writes(3)) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(c.into()))) + } } diff --git a/runtime/manta/src/weights/pallet_asset_manager.rs b/runtime/manta/src/weights/pallet_asset_manager.rs index dea3b4b58..a41e9500f 100644 --- a/runtime/manta/src/weights/pallet_asset_manager.rs +++ b/runtime/manta/src/weights/pallet_asset_manager.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_asset_manager //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("manta-dev"), DB CACHE: 1024 // Executed Command: @@ -57,104 +57,116 @@ pub trait WeightInfo { /// Weights for pallet_asset_manager using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_asset_manager::WeightInfo for SubstrateWeight { - // Storage: AssetManager LocationAssetId (r:1 w:1) - // Storage: AssetManager NextAssetId (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Metadata (r:1 w:1) - // Storage: AssetManager AssetIdMetadata (r:0 w:1) - // Storage: AssetManager AssetIdLocation (r:0 w:1) - fn register_asset() -> Weight { - (49_599_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:0) - // Storage: AssetManager UnitsPerSecond (r:0 w:1) - fn set_units_per_second() -> Weight { - (53_784_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:1) - // Storage: AssetManager LocationAssetId (r:1 w:2) - // Storage: AssetManager AllowedDestParaIds (r:2 w:2) - fn update_asset_location() -> Weight { - (75_667_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:0) - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - // Storage: AssetManager AssetIdMetadata (r:0 w:1) - fn update_asset_metadata() -> Weight { - (73_920_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:0) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - fn mint_asset() -> Weight { - (82_238_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: AssetManager MinXcmFee (r:0 w:1) - fn set_min_xcm_fee() -> Weight { - (43_669_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } + // Storage: AssetManager LocationAssetId (r:1 w:1) + // Storage: AssetManager NextAssetId (r:1 w:1) + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Metadata (r:1 w:1) + // Storage: AssetManager AssetIdMetadata (r:0 w:1) + // Storage: AssetManager AssetIdLocation (r:0 w:1) + fn register_asset() -> Weight { + // Minimum execution time: 51_003 nanoseconds. + Weight::from_ref_time(51_801_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(6)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: AssetManager UnitsPerSecond (r:0 w:1) + fn set_units_per_second() -> Weight { + // Minimum execution time: 61_944 nanoseconds. + Weight::from_ref_time(64_424_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:1) + // Storage: AssetManager LocationAssetId (r:1 w:2) + // Storage: AssetManager AllowedDestParaIds (r:2 w:2) + fn update_asset_location() -> Weight { + // Minimum execution time: 77_354 nanoseconds. + Weight::from_ref_time(79_857_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(5)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + // Storage: AssetManager AssetIdMetadata (r:0 w:1) + fn update_asset_metadata() -> Weight { + // Minimum execution time: 74_870 nanoseconds. + Weight::from_ref_time(77_347_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:1) + fn mint_asset() -> Weight { + // Minimum execution time: 83_670 nanoseconds. + Weight::from_ref_time(85_846_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: AssetManager MinXcmFee (r:0 w:1) + fn set_min_xcm_fee() -> Weight { + // Minimum execution time: 47_429 nanoseconds. + Weight::from_ref_time(50_365_000) + .saturating_add(T::DbWeight::get().writes(1)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: AssetManager LocationAssetId (r:1 w:1) - // Storage: AssetManager NextAssetId (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Metadata (r:1 w:1) - // Storage: AssetManager AssetIdMetadata (r:0 w:1) - // Storage: AssetManager AssetIdLocation (r:0 w:1) - fn register_asset() -> Weight { - (49_599_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:0) - // Storage: AssetManager UnitsPerSecond (r:0 w:1) - fn set_units_per_second() -> Weight { - (53_784_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:1) - // Storage: AssetManager LocationAssetId (r:1 w:2) - // Storage: AssetManager AllowedDestParaIds (r:2 w:2) - fn update_asset_location() -> Weight { - (75_667_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:0) - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - // Storage: AssetManager AssetIdMetadata (r:0 w:1) - fn update_asset_metadata() -> Weight { - (73_920_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: AssetManager AssetIdLocation (r:1 w:0) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - fn mint_asset() -> Weight { - (82_238_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: AssetManager MinXcmFee (r:0 w:1) - fn set_min_xcm_fee() -> Weight { - (43_669_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } + // Storage: AssetManager LocationAssetId (r:1 w:1) + // Storage: AssetManager NextAssetId (r:1 w:1) + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Metadata (r:1 w:1) + // Storage: AssetManager AssetIdMetadata (r:0 w:1) + // Storage: AssetManager AssetIdLocation (r:0 w:1) + fn register_asset() -> Weight { + // Minimum execution time: 51_003 nanoseconds. + Weight::from_ref_time(51_801_000) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(6)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: AssetManager UnitsPerSecond (r:0 w:1) + fn set_units_per_second() -> Weight { + // Minimum execution time: 61_944 nanoseconds. + Weight::from_ref_time(64_424_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:1) + // Storage: AssetManager LocationAssetId (r:1 w:2) + // Storage: AssetManager AllowedDestParaIds (r:2 w:2) + fn update_asset_location() -> Weight { + // Minimum execution time: 77_354 nanoseconds. + Weight::from_ref_time(79_857_000) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(5)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + // Storage: AssetManager AssetIdMetadata (r:0 w:1) + fn update_asset_metadata() -> Weight { + // Minimum execution time: 74_870 nanoseconds. + Weight::from_ref_time(77_347_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:1) + fn mint_asset() -> Weight { + // Minimum execution time: 83_670 nanoseconds. + Weight::from_ref_time(85_846_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: AssetManager MinXcmFee (r:0 w:1) + fn set_min_xcm_fee() -> Weight { + // Minimum execution time: 47_429 nanoseconds. + Weight::from_ref_time(50_365_000) + .saturating_add(RocksDbWeight::get().writes(1)) + } } diff --git a/runtime/manta/src/weights/pallet_assets.rs b/runtime/manta/src/weights/pallet_assets.rs index bdbaae7ca..6a89dc32a 100644 --- a/runtime/manta/src/weights/pallet_assets.rs +++ b/runtime/manta/src/weights/pallet_assets.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_assets //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("manta-dev"), DB CACHE: 1024 // Executed Command: @@ -48,7 +48,10 @@ use manta_primitives::constants::RocksDbWeight; pub trait WeightInfo { fn create() -> Weight; fn force_create() -> Weight; - fn destroy(c: u32, s: u32, a: u32, ) -> Weight; + fn start_destroy() -> Weight; + fn destroy_accounts(c: u32, ) -> Weight; + fn destroy_approvals(a: u32, ) -> Weight; + fn finish_destroy() -> Weight; fn mint() -> Weight; fn burn() -> Weight; fn transfer() -> Weight; @@ -74,366 +77,458 @@ pub trait WeightInfo { /// Weights for pallet_assets using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_assets::WeightInfo for SubstrateWeight { - // Storage: Assets Asset (r:1 w:1) - fn create() -> Weight { - (17_161_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn force_create() -> Weight { - (15_627_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:5002 w:5001) - // Storage: System Account (r:5000 w:5000) - // Storage: Assets Metadata (r:1 w:0) - // Storage: Assets Approvals (r:501 w:500) - fn destroy(c: u32, s: u32, a: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 47_000 - .saturating_add((18_377_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 47_000 - .saturating_add((21_491_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 474_000 - .saturating_add((11_740_000 as Weight).saturating_mul(a as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(a as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight))) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - fn mint() -> Weight { - (31_466_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - fn burn() -> Weight { - (34_120_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn transfer() -> Weight { - (51_341_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn transfer_keep_alive() -> Weight { - (43_597_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn force_transfer() -> Weight { - (51_661_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Account (r:1 w:1) - fn freeze() -> Weight { - (20_480_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Account (r:1 w:1) - fn thaw() -> Weight { - (20_265_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn freeze_asset() -> Weight { - (16_901_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn thaw_asset() -> Weight { - (15_756_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Metadata (r:1 w:0) - fn transfer_ownership() -> Weight { - (17_971_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn set_team() -> Weight { - (16_830_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn set_metadata(n: u32, s: u32, ) -> Weight { - (19_798_000 as Weight) - // Standard Error: 1_000 - .saturating_add((5_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 1_000 - .saturating_add((3_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn clear_metadata() -> Weight { - (18_582_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn force_set_metadata(_n: u32, _s: u32, ) -> Weight { - (18_303_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn force_clear_metadata() -> Weight { - (18_317_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn force_asset_status() -> Weight { - (15_862_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) - fn approve_transfer() -> Weight { - (24_307_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Approvals (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn transfer_approved() -> Weight { - (54_088_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) - fn cancel_approval() -> Weight { - (23_174_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) - fn force_cancel_approval() -> Weight { - (25_273_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } + // Storage: Assets Asset (r:1 w:1) + fn create() -> Weight { + // Minimum execution time: 18_893 nanoseconds. + Weight::from_ref_time(19_394_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn force_create() -> Weight { + // Minimum execution time: 17_961 nanoseconds. + Weight::from_ref_time(18_435_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn start_destroy() -> Weight { + // Minimum execution time: 20_142 nanoseconds. + Weight::from_ref_time(20_603_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:0) + // Storage: System Account (r:20 w:20) + /// The range of component `c` is `[0, 1000]`. + fn destroy_accounts(c: u32, ) -> Weight { + // Minimum execution time: 22_888 nanoseconds. + Weight::from_ref_time(23_168_000) + // Standard Error: 8_608 + .saturating_add(Weight::from_ref_time(14_607_223).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(c.into()))) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:0) + /// The range of component `a` is `[0, 1000]`. + fn destroy_approvals(a: u32, ) -> Weight { + // Minimum execution time: 23_534 nanoseconds. + Weight::from_ref_time(23_764_000) + // Standard Error: 6_174 + .saturating_add(Weight::from_ref_time(7_462_143).saturating_mul(a.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into()))) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Metadata (r:1 w:0) + fn finish_destroy() -> Weight { + // Minimum execution time: 18_744 nanoseconds. + Weight::from_ref_time(20_630_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:1) + fn mint() -> Weight { + // Minimum execution time: 33_432 nanoseconds. + Weight::from_ref_time(33_903_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:1) + fn burn() -> Weight { + // Minimum execution time: 86_995 nanoseconds. + Weight::from_ref_time(88_179_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn transfer() -> Weight { + // Minimum execution time: 51_961 nanoseconds. + Weight::from_ref_time(77_905_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn transfer_keep_alive() -> Weight { + // Minimum execution time: 42_913 nanoseconds. + Weight::from_ref_time(46_862_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn force_transfer() -> Weight { + // Minimum execution time: 96_728 nanoseconds. + Weight::from_ref_time(98_149_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Account (r:1 w:1) + fn freeze() -> Weight { + // Minimum execution time: 28_794 nanoseconds. + Weight::from_ref_time(29_336_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Account (r:1 w:1) + fn thaw() -> Weight { + // Minimum execution time: 23_234 nanoseconds. + Weight::from_ref_time(24_323_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn freeze_asset() -> Weight { + // Minimum execution time: 19_180 nanoseconds. + Weight::from_ref_time(20_198_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn thaw_asset() -> Weight { + // Minimum execution time: 19_863 nanoseconds. + Weight::from_ref_time(20_185_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Metadata (r:1 w:0) + fn transfer_ownership() -> Weight { + // Minimum execution time: 20_803 nanoseconds. + Weight::from_ref_time(21_348_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn set_team() -> Weight { + // Minimum execution time: 19_702 nanoseconds. + Weight::from_ref_time(20_277_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + /// The range of component `n` is `[0, 50]`. + /// The range of component `s` is `[0, 50]`. + fn set_metadata(n: u32, s: u32, ) -> Weight { + // Minimum execution time: 20_730 nanoseconds. + Weight::from_ref_time(21_271_764) + // Standard Error: 24_929 + .saturating_add(Weight::from_ref_time(92_732).saturating_mul(n.into())) + // Standard Error: 24_929 + .saturating_add(Weight::from_ref_time(51_074).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + fn clear_metadata() -> Weight { + // Minimum execution time: 22_715 nanoseconds. + Weight::from_ref_time(22_950_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + /// The range of component `n` is `[0, 50]`. + /// The range of component `s` is `[0, 50]`. + fn force_set_metadata(_n: u32, _s: u32, ) -> Weight { + // Minimum execution time: 19_338 nanoseconds. + Weight::from_ref_time(36_299_753) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + fn force_clear_metadata() -> Weight { + // Minimum execution time: 22_314 nanoseconds. + Weight::from_ref_time(22_737_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn force_asset_status() -> Weight { + // Minimum execution time: 48_752 nanoseconds. + Weight::from_ref_time(50_498_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + fn approve_transfer() -> Weight { + // Minimum execution time: 30_623 nanoseconds. + Weight::from_ref_time(45_862_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn transfer_approved() -> Weight { + // Minimum execution time: 61_225 nanoseconds. + Weight::from_ref_time(63_204_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + fn cancel_approval() -> Weight { + // Minimum execution time: 28_061 nanoseconds. + Weight::from_ref_time(28_948_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + fn force_cancel_approval() -> Weight { + // Minimum execution time: 29_339 nanoseconds. + Weight::from_ref_time(29_878_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Assets Asset (r:1 w:1) - fn create() -> Weight { - (17_161_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn force_create() -> Weight { - (15_627_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:5002 w:5001) - // Storage: System Account (r:5000 w:5000) - // Storage: Assets Metadata (r:1 w:0) - // Storage: Assets Approvals (r:501 w:500) - fn destroy(c: u32, s: u32, a: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 47_000 - .saturating_add((18_377_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 47_000 - .saturating_add((21_491_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 474_000 - .saturating_add((11_740_000 as Weight).saturating_mul(a as Weight)) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(a as Weight))) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(a as Weight))) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - fn mint() -> Weight { - (31_466_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - fn burn() -> Weight { - (34_120_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn transfer() -> Weight { - (51_341_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn transfer_keep_alive() -> Weight { - (43_597_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn force_transfer() -> Weight { - (51_661_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Account (r:1 w:1) - fn freeze() -> Weight { - (20_480_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Account (r:1 w:1) - fn thaw() -> Weight { - (20_265_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn freeze_asset() -> Weight { - (16_901_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn thaw_asset() -> Weight { - (15_756_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Metadata (r:1 w:0) - fn transfer_ownership() -> Weight { - (17_971_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn set_team() -> Weight { - (16_830_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn set_metadata(n: u32, s: u32, ) -> Weight { - (19_798_000 as Weight) - // Standard Error: 1_000 - .saturating_add((5_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 1_000 - .saturating_add((3_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn clear_metadata() -> Weight { - (18_582_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn force_set_metadata(_n: u32, _s: u32, ) -> Weight { - (18_303_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) - fn force_clear_metadata() -> Weight { - (18_317_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - fn force_asset_status() -> Weight { - (15_862_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) - fn approve_transfer() -> Weight { - (24_307_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Approvals (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn transfer_approved() -> Weight { - (54_088_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) - fn cancel_approval() -> Weight { - (23_174_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) - fn force_cancel_approval() -> Weight { - (25_273_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } + // Storage: Assets Asset (r:1 w:1) + fn create() -> Weight { + // Minimum execution time: 18_893 nanoseconds. + Weight::from_ref_time(19_394_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn force_create() -> Weight { + // Minimum execution time: 17_961 nanoseconds. + Weight::from_ref_time(18_435_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn start_destroy() -> Weight { + // Minimum execution time: 20_142 nanoseconds. + Weight::from_ref_time(20_603_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:0) + // Storage: System Account (r:20 w:20) + /// The range of component `c` is `[0, 1000]`. + fn destroy_accounts(c: u32, ) -> Weight { + // Minimum execution time: 22_888 nanoseconds. + Weight::from_ref_time(23_168_000) + // Standard Error: 8_608 + .saturating_add(Weight::from_ref_time(14_607_223).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(c.into()))) + .saturating_add(RocksDbWeight::get().writes(1)) + .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(c.into()))) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:0) + /// The range of component `a` is `[0, 1000]`. + fn destroy_approvals(a: u32, ) -> Weight { + // Minimum execution time: 23_534 nanoseconds. + Weight::from_ref_time(23_764_000) + // Standard Error: 6_174 + .saturating_add(Weight::from_ref_time(7_462_143).saturating_mul(a.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(a.into()))) + .saturating_add(RocksDbWeight::get().writes(1)) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(a.into()))) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Metadata (r:1 w:0) + fn finish_destroy() -> Weight { + // Minimum execution time: 18_744 nanoseconds. + Weight::from_ref_time(20_630_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:1) + fn mint() -> Weight { + // Minimum execution time: 33_432 nanoseconds. + Weight::from_ref_time(33_903_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:1 w:1) + fn burn() -> Weight { + // Minimum execution time: 86_995 nanoseconds. + Weight::from_ref_time(88_179_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn transfer() -> Weight { + // Minimum execution time: 51_961 nanoseconds. + Weight::from_ref_time(77_905_000) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(4)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn transfer_keep_alive() -> Weight { + // Minimum execution time: 42_913 nanoseconds. + Weight::from_ref_time(46_862_000) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(4)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn force_transfer() -> Weight { + // Minimum execution time: 96_728 nanoseconds. + Weight::from_ref_time(98_149_000) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(4)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Account (r:1 w:1) + fn freeze() -> Weight { + // Minimum execution time: 28_794 nanoseconds. + Weight::from_ref_time(29_336_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Account (r:1 w:1) + fn thaw() -> Weight { + // Minimum execution time: 23_234 nanoseconds. + Weight::from_ref_time(24_323_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn freeze_asset() -> Weight { + // Minimum execution time: 19_180 nanoseconds. + Weight::from_ref_time(20_198_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn thaw_asset() -> Weight { + // Minimum execution time: 19_863 nanoseconds. + Weight::from_ref_time(20_185_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Metadata (r:1 w:0) + fn transfer_ownership() -> Weight { + // Minimum execution time: 20_803 nanoseconds. + Weight::from_ref_time(21_348_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn set_team() -> Weight { + // Minimum execution time: 19_702 nanoseconds. + Weight::from_ref_time(20_277_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + /// The range of component `n` is `[0, 50]`. + /// The range of component `s` is `[0, 50]`. + fn set_metadata(n: u32, s: u32, ) -> Weight { + // Minimum execution time: 20_730 nanoseconds. + Weight::from_ref_time(21_271_764) + // Standard Error: 24_929 + .saturating_add(Weight::from_ref_time(92_732).saturating_mul(n.into())) + // Standard Error: 24_929 + .saturating_add(Weight::from_ref_time(51_074).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + fn clear_metadata() -> Weight { + // Minimum execution time: 22_715 nanoseconds. + Weight::from_ref_time(22_950_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + /// The range of component `n` is `[0, 50]`. + /// The range of component `s` is `[0, 50]`. + fn force_set_metadata(_n: u32, _s: u32, ) -> Weight { + // Minimum execution time: 19_338 nanoseconds. + Weight::from_ref_time(36_299_753) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:0) + // Storage: Assets Metadata (r:1 w:1) + fn force_clear_metadata() -> Weight { + // Minimum execution time: 22_314 nanoseconds. + Weight::from_ref_time(22_737_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + fn force_asset_status() -> Weight { + // Minimum execution time: 48_752 nanoseconds. + Weight::from_ref_time(50_498_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + fn approve_transfer() -> Weight { + // Minimum execution time: 30_623 nanoseconds. + Weight::from_ref_time(45_862_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn transfer_approved() -> Weight { + // Minimum execution time: 61_225 nanoseconds. + Weight::from_ref_time(63_204_000) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(5)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + fn cancel_approval() -> Weight { + // Minimum execution time: 28_061 nanoseconds. + Weight::from_ref_time(28_948_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Approvals (r:1 w:1) + fn force_cancel_approval() -> Weight { + // Minimum execution time: 29_339 nanoseconds. + Weight::from_ref_time(29_878_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } } diff --git a/runtime/manta/src/weights/pallet_author_inherent.rs b/runtime/manta/src/weights/pallet_author_inherent.rs index 9cf4c0d61..bea814ee5 100644 --- a/runtime/manta/src/weights/pallet_author_inherent.rs +++ b/runtime/manta/src/weights/pallet_author_inherent.rs @@ -57,9 +57,9 @@ impl pallet_author_inherent::WeightInfo for SubstrateWe // Storage: AuthorInherent Author (r:1 w:0) // Storage: ParachainStaking SelectedCandidates (r:1 w:0) fn kick_off_authorship_validation() -> Weight { - (12_718_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(12_325_000) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } } @@ -70,8 +70,8 @@ impl WeightInfo for () { // Storage: AuthorInherent Author (r:1 w:0) // Storage: ParachainStaking SelectedCandidates (r:1 w:0) fn kick_off_authorship_validation() -> Weight { - (12_718_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(12_325_000) + .saturating_add(RocksDbWeight::get().reads(4_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } } diff --git a/runtime/manta/src/weights/pallet_balances.rs b/runtime/manta/src/weights/pallet_balances.rs index 6b0e7c4a0..ee40f9c89 100644 --- a/runtime/manta/src/weights/pallet_balances.rs +++ b/runtime/manta/src/weights/pallet_balances.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_balances //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("manta-dev"), DB CACHE: 1024 // Executed Command: @@ -58,92 +58,106 @@ pub trait WeightInfo { /// Weights for pallet_balances using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_balances::WeightInfo for SubstrateWeight { - // Storage: System Account (r:1 w:1) - fn transfer() -> Weight { - (47_589_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn transfer_keep_alive() -> Weight { - (34_772_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn set_balance_creating() -> Weight { - (21_853_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn set_balance_killing() -> Weight { - (24_083_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:2 w:2) - fn force_transfer() -> Weight { - (47_209_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn transfer_all() -> Weight { - (38_922_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn force_unreserve() -> Weight { - (20_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } + // Storage: System Account (r:1 w:1) + fn transfer() -> Weight { + // Minimum execution time: 49_698 nanoseconds. + Weight::from_ref_time(50_460_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn transfer_keep_alive() -> Weight { + // Minimum execution time: 36_531 nanoseconds. + Weight::from_ref_time(37_025_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn set_balance_creating() -> Weight { + // Minimum execution time: 25_810 nanoseconds. + Weight::from_ref_time(26_303_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn set_balance_killing() -> Weight { + // Minimum execution time: 29_741 nanoseconds. + Weight::from_ref_time(30_197_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: System Account (r:2 w:2) + fn force_transfer() -> Weight { + // Minimum execution time: 49_732 nanoseconds. + Weight::from_ref_time(50_577_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: System Account (r:1 w:1) + fn transfer_all() -> Weight { + // Minimum execution time: 43_397 nanoseconds. + Weight::from_ref_time(43_875_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn force_unreserve() -> Weight { + // Minimum execution time: 22_749 nanoseconds. + Weight::from_ref_time(23_041_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: System Account (r:1 w:1) - fn transfer() -> Weight { - (47_589_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn transfer_keep_alive() -> Weight { - (34_772_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn set_balance_creating() -> Weight { - (21_853_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn set_balance_killing() -> Weight { - (24_083_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:2 w:2) - fn force_transfer() -> Weight { - (47_209_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn transfer_all() -> Weight { - (38_922_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - fn force_unreserve() -> Weight { - (20_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } + // Storage: System Account (r:1 w:1) + fn transfer() -> Weight { + // Minimum execution time: 49_698 nanoseconds. + Weight::from_ref_time(50_460_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn transfer_keep_alive() -> Weight { + // Minimum execution time: 36_531 nanoseconds. + Weight::from_ref_time(37_025_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn set_balance_creating() -> Weight { + // Minimum execution time: 25_810 nanoseconds. + Weight::from_ref_time(26_303_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn set_balance_killing() -> Weight { + // Minimum execution time: 29_741 nanoseconds. + Weight::from_ref_time(30_197_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: System Account (r:2 w:2) + fn force_transfer() -> Weight { + // Minimum execution time: 49_732 nanoseconds. + Weight::from_ref_time(50_577_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: System Account (r:1 w:1) + fn transfer_all() -> Weight { + // Minimum execution time: 43_397 nanoseconds. + Weight::from_ref_time(43_875_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + fn force_unreserve() -> Weight { + // Minimum execution time: 22_749 nanoseconds. + Weight::from_ref_time(23_041_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } } diff --git a/runtime/manta/src/weights/pallet_multisig.rs b/runtime/manta/src/weights/pallet_multisig.rs index ad5fa5c39..155ff3e62 100644 --- a/runtime/manta/src/weights/pallet_multisig.rs +++ b/runtime/manta/src/weights/pallet_multisig.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_multisig //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("manta-dev"), DB CACHE: 1024 // Executed Command: @@ -48,217 +48,176 @@ use manta_primitives::constants::RocksDbWeight; pub trait WeightInfo { fn as_multi_threshold_1(z: u32, ) -> Weight; fn as_multi_create(s: u32, z: u32, ) -> Weight; - fn as_multi_create_store(s: u32, z: u32, ) -> Weight; fn as_multi_approve(s: u32, z: u32, ) -> Weight; - fn as_multi_approve_store(s: u32, z: u32, ) -> Weight; fn as_multi_complete(s: u32, z: u32, ) -> Weight; fn approve_as_multi_create(s: u32, ) -> Weight; fn approve_as_multi_approve(s: u32, ) -> Weight; - fn approve_as_multi_complete(s: u32, ) -> Weight; fn cancel_as_multi(s: u32, ) -> Weight; } /// Weights for pallet_multisig using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_multisig::WeightInfo for SubstrateWeight { - fn as_multi_threshold_1(z: u32, ) -> Weight { - (21_337_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn as_multi_create(s: u32, z: u32, ) -> Weight { - (39_286_000 as Weight) - // Standard Error: 2_000 - .saturating_add((115_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (43_631_000 as Weight) - // Standard Error: 2_000 - .saturating_add((93_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (26_151_000 as Weight) - // Standard Error: 2_000 - .saturating_add((99_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (41_576_000 as Weight) - // Standard Error: 2_000 - .saturating_add((99_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (55_578_000 as Weight) - // Standard Error: 2_000 - .saturating_add((118_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn approve_as_multi_create(s: u32, ) -> Weight { - (35_985_000 as Weight) - // Standard Error: 2_000 - .saturating_add((129_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:0) - fn approve_as_multi_approve(s: u32, ) -> Weight { - (22_430_000 as Weight) - // Standard Error: 1_000 - .saturating_add((121_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn approve_as_multi_complete(s: u32, ) -> Weight { - (64_651_000 as Weight) - // Standard Error: 2_000 - .saturating_add((152_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - fn cancel_as_multi(s: u32, ) -> Weight { - (52_206_000 as Weight) - // Standard Error: 3_000 - .saturating_add((130_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } + /// The range of component `z` is `[0, 10000]`. + fn as_multi_threshold_1(z: u32, ) -> Weight { + // Minimum execution time: 18_989 nanoseconds. + Weight::from_ref_time(19_766_253) + // Standard Error: 11 + .saturating_add(Weight::from_ref_time(853).saturating_mul(z.into())) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_create(s: u32, z: u32, ) -> Weight { + // Minimum execution time: 51_000 nanoseconds. + Weight::from_ref_time(40_409_275) + // Standard Error: 2_445 + .saturating_add(Weight::from_ref_time(130_912).saturating_mul(s.into())) + // Standard Error: 23 + .saturating_add(Weight::from_ref_time(1_981).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Multisig Multisigs (r:1 w:1) + /// The range of component `s` is `[3, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_approve(s: u32, z: u32, ) -> Weight { + // Minimum execution time: 40_429 nanoseconds. + Weight::from_ref_time(28_922_822) + // Standard Error: 2_073 + .saturating_add(Weight::from_ref_time(134_104).saturating_mul(s.into())) + // Standard Error: 20 + .saturating_add(Weight::from_ref_time(2_027).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: System Account (r:1 w:1) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_complete(s: u32, z: u32, ) -> Weight { + // Minimum execution time: 56_891 nanoseconds. + Weight::from_ref_time(43_853_460) + // Standard Error: 1_898 + .saturating_add(Weight::from_ref_time(148_437).saturating_mul(s.into())) + // Standard Error: 18 + .saturating_add(Weight::from_ref_time(1_945).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. + fn approve_as_multi_create(s: u32, ) -> Weight { + // Minimum execution time: 34_863 nanoseconds. + Weight::from_ref_time(37_859_808) + // Standard Error: 2_361 + .saturating_add(Weight::from_ref_time(136_764).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Multisig Multisigs (r:1 w:1) + /// The range of component `s` is `[2, 100]`. + fn approve_as_multi_approve(s: u32, ) -> Weight { + // Minimum execution time: 24_556 nanoseconds. + Weight::from_ref_time(26_753_938) + // Standard Error: 1_776 + .saturating_add(Weight::from_ref_time(137_452).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) + /// The range of component `s` is `[2, 100]`. + fn cancel_as_multi(s: u32, ) -> Weight { + // Minimum execution time: 36_572 nanoseconds. + Weight::from_ref_time(38_768_252) + // Standard Error: 2_176 + .saturating_add(Weight::from_ref_time(140_770).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } // For backwards compatibility and tests impl WeightInfo for () { - fn as_multi_threshold_1(z: u32, ) -> Weight { - (21_337_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn as_multi_create(s: u32, z: u32, ) -> Weight { - (39_286_000 as Weight) - // Standard Error: 2_000 - .saturating_add((115_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (43_631_000 as Weight) - // Standard Error: 2_000 - .saturating_add((93_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (26_151_000 as Weight) - // Standard Error: 2_000 - .saturating_add((99_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (41_576_000 as Weight) - // Standard Error: 2_000 - .saturating_add((99_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (55_578_000 as Weight) - // Standard Error: 2_000 - .saturating_add((118_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn approve_as_multi_create(s: u32, ) -> Weight { - (35_985_000 as Weight) - // Standard Error: 2_000 - .saturating_add((129_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:0) - fn approve_as_multi_approve(s: u32, ) -> Weight { - (22_430_000 as Weight) - // Standard Error: 1_000 - .saturating_add((121_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn approve_as_multi_complete(s: u32, ) -> Weight { - (64_651_000 as Weight) - // Standard Error: 2_000 - .saturating_add((152_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - fn cancel_as_multi(s: u32, ) -> Weight { - (52_206_000 as Weight) - // Standard Error: 3_000 - .saturating_add((130_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } + /// The range of component `z` is `[0, 10000]`. + fn as_multi_threshold_1(z: u32, ) -> Weight { + // Minimum execution time: 18_989 nanoseconds. + Weight::from_ref_time(19_766_253) + // Standard Error: 11 + .saturating_add(Weight::from_ref_time(853).saturating_mul(z.into())) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_create(s: u32, z: u32, ) -> Weight { + // Minimum execution time: 51_000 nanoseconds. + Weight::from_ref_time(40_409_275) + // Standard Error: 2_445 + .saturating_add(Weight::from_ref_time(130_912).saturating_mul(s.into())) + // Standard Error: 23 + .saturating_add(Weight::from_ref_time(1_981).saturating_mul(z.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Multisig Multisigs (r:1 w:1) + /// The range of component `s` is `[3, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_approve(s: u32, z: u32, ) -> Weight { + // Minimum execution time: 40_429 nanoseconds. + Weight::from_ref_time(28_922_822) + // Standard Error: 2_073 + .saturating_add(Weight::from_ref_time(134_104).saturating_mul(s.into())) + // Standard Error: 20 + .saturating_add(Weight::from_ref_time(2_027).saturating_mul(z.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: System Account (r:1 w:1) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_complete(s: u32, z: u32, ) -> Weight { + // Minimum execution time: 56_891 nanoseconds. + Weight::from_ref_time(43_853_460) + // Standard Error: 1_898 + .saturating_add(Weight::from_ref_time(148_437).saturating_mul(s.into())) + // Standard Error: 18 + .saturating_add(Weight::from_ref_time(1_945).saturating_mul(z.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. + fn approve_as_multi_create(s: u32, ) -> Weight { + // Minimum execution time: 34_863 nanoseconds. + Weight::from_ref_time(37_859_808) + // Standard Error: 2_361 + .saturating_add(Weight::from_ref_time(136_764).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Multisig Multisigs (r:1 w:1) + /// The range of component `s` is `[2, 100]`. + fn approve_as_multi_approve(s: u32, ) -> Weight { + // Minimum execution time: 24_556 nanoseconds. + Weight::from_ref_time(26_753_938) + // Standard Error: 1_776 + .saturating_add(Weight::from_ref_time(137_452).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Multisig Multisigs (r:1 w:1) + /// The range of component `s` is `[2, 100]`. + fn cancel_as_multi(s: u32, ) -> Weight { + // Minimum execution time: 36_572 nanoseconds. + Weight::from_ref_time(38_768_252) + // Standard Error: 2_176 + .saturating_add(Weight::from_ref_time(140_770).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } } diff --git a/runtime/manta/src/weights/pallet_parachain_staking.rs b/runtime/manta/src/weights/pallet_parachain_staking.rs index 0acf822e8..ee8d265d0 100644 --- a/runtime/manta/src/weights/pallet_parachain_staking.rs +++ b/runtime/manta/src/weights/pallet_parachain_staking.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_parachain_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("manta-dev"), DB CACHE: 1024 // Executed Command: @@ -82,598 +82,680 @@ pub trait WeightInfo { /// Weights for pallet_parachain_staking using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_parachain_staking::WeightInfo for SubstrateWeight { - // Storage: ParachainStaking InflationConfig (r:1 w:1) - fn set_staking_expectations() -> Weight { - (16_517_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking InflationConfig (r:1 w:1) - fn set_inflation() -> Weight { - (58_667_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) - fn set_parachain_bond_account() -> Weight { - (16_423_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) - fn set_parachain_bond_reserve_percent() -> Weight { - (15_582_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking TotalSelected (r:1 w:1) - fn set_total_selected() -> Weight { - (17_744_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking CollatorCommission (r:1 w:1) - fn set_collator_commission() -> Weight { - (14_652_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking TotalSelected (r:1 w:0) - // Storage: ParachainStaking InflationConfig (r:1 w:1) - fn set_blocks_per_round() -> Weight { - (24_264_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking DelegatorState (r:1 w:0) - // Storage: CollatorSelection Candidates (r:1 w:0) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:0 w:1) - // Storage: ParachainStaking BottomDelegations (r:0 w:1) - fn join_candidates(x: u32, ) -> Weight { - (74_756_000 as Weight) - // Standard Error: 1_000 - .saturating_add((56_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn schedule_leave_candidates(x: u32, ) -> Weight { - (57_249_000 as Weight) - // Standard Error: 1_000 - .saturating_add((42_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: Balances Locks (r:2 w:2) - // Storage: System Account (r:2 w:2) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - // Storage: ParachainStaking BottomDelegations (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - fn execute_leave_candidates(x: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 57_000 - .saturating_add((25_589_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(x as Weight))) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(x as Weight))) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn cancel_leave_candidates(x: u32, ) -> Weight { - (56_213_000 as Weight) - // Standard Error: 1_000 - .saturating_add((43_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn go_offline() -> Weight { - (24_705_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn go_online() -> Weight { - (23_493_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn candidate_bond_more() -> Weight { - (42_515_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - fn schedule_candidate_bond_less() -> Weight { - (22_273_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn execute_candidate_bond_less() -> Weight { - (57_770_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - fn cancel_candidate_bond_less() -> Weight { - (20_135_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - fn delegate(x: u32, y: u32, ) -> Weight { - (66_920_000 as Weight) - // Standard Error: 7_000 - .saturating_add((479_000 as Weight).saturating_mul(x as Weight)) - // Standard Error: 1_000 - .saturating_add((284_000 as Weight).saturating_mul(y as Weight)) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn schedule_leave_delegators() -> Weight { - (28_043_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn execute_leave_delegators(x: u32, ) -> Weight { - (35_520_000 as Weight) - // Standard Error: 35_000 - .saturating_add((23_163_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(x as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(x as Weight))) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn cancel_leave_delegators() -> Weight { - (27_803_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn schedule_revoke_delegation() -> Weight { - (29_540_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:0) - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - fn delegator_bond_more() -> Weight { - (63_029_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn schedule_delegator_bond_less() -> Weight { - (28_234_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - fn execute_revoke_delegation() -> Weight { - (83_609_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - fn execute_delegator_bond_less() -> Weight { - (74_176_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn cancel_revoke_delegation() -> Weight { - (26_369_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn cancel_delegator_bond_less() -> Weight { - (31_999_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking Points (r:1 w:0) - // Storage: ParachainStaking Staked (r:1 w:2) - // Storage: ParachainStaking InflationConfig (r:1 w:0) - // Storage: ParachainStaking ParachainBondInfo (r:1 w:0) - // Storage: ParachainStaking CollatorCommission (r:1 w:0) - // Storage: ParachainStaking CandidatePool (r:1 w:0) - // Storage: ParachainStaking TotalSelected (r:1 w:0) - // Storage: ParachainStaking CandidateInfo (r:9 w:0) - // Storage: ParachainStaking DelegationScheduledRequests (r:9 w:0) - // Storage: ParachainStaking TopDelegations (r:9 w:0) - // Storage: ParachainStaking Total (r:1 w:0) - // Storage: ParachainStaking AwardedPts (r:2 w:1) - // Storage: ParachainStaking AtStake (r:1 w:10) - // Storage: System Account (r:101 w:101) - // Storage: ParachainStaking SelectedCandidates (r:0 w:1) - // Storage: ParachainStaking DelayedPayouts (r:0 w:1) - fn round_transition_on_initialize(x: u32, _y: u32, ) -> Weight { - (1_557_701_000 as Weight) - // Standard Error: 365_000 - .saturating_add((3_091_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(119 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(x as Weight))) - .saturating_add(T::DbWeight::get().writes(113 as Weight)) - } - // Storage: ParachainStaking DelayedPayouts (r:1 w:0) - // Storage: ParachainStaking Points (r:1 w:0) - // Storage: ParachainStaking AwardedPts (r:2 w:1) - // Storage: ParachainStaking AtStake (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn pay_one_collator_reward(y: u32, ) -> Weight { - (49_139_000 as Weight) - // Standard Error: 13_000 - .saturating_add((13_224_000 as Weight).saturating_mul(y as Weight)) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(y as Weight))) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(y as Weight))) - } - fn base_on_initialize() -> Weight { - (3_163_000 as Weight) - } + // Storage: ParachainStaking InflationConfig (r:1 w:1) + fn set_staking_expectations() -> Weight { + // Minimum execution time: 20_200 nanoseconds. + Weight::from_ref_time(20_764_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: ParachainStaking InflationConfig (r:1 w:1) + fn set_inflation() -> Weight { + // Minimum execution time: 66_384 nanoseconds. + Weight::from_ref_time(67_252_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) + fn set_parachain_bond_account() -> Weight { + // Minimum execution time: 20_280 nanoseconds. + Weight::from_ref_time(20_921_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) + fn set_parachain_bond_reserve_percent() -> Weight { + // Minimum execution time: 19_483 nanoseconds. + Weight::from_ref_time(19_933_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: ParachainStaking TotalSelected (r:1 w:1) + fn set_total_selected() -> Weight { + // Minimum execution time: 19_165 nanoseconds. + Weight::from_ref_time(20_954_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: ParachainStaking CollatorCommission (r:1 w:1) + fn set_collator_commission() -> Weight { + // Minimum execution time: 18_144 nanoseconds. + Weight::from_ref_time(18_586_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: ParachainStaking TotalSelected (r:1 w:0) + // Storage: ParachainStaking InflationConfig (r:1 w:1) + fn set_blocks_per_round() -> Weight { + // Minimum execution time: 83_125 nanoseconds. + Weight::from_ref_time(84_696_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking DelegatorState (r:1 w:0) + // Storage: CollatorSelection Candidates (r:1 w:0) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:0 w:1) + // Storage: ParachainStaking BottomDelegations (r:0 w:1) + /// The range of component `x` is `[3, 1000]`. + fn join_candidates(x: u32, ) -> Weight { + // Minimum execution time: 59_268 nanoseconds. + Weight::from_ref_time(68_433_986) + // Standard Error: 824 + .saturating_add(Weight::from_ref_time(92_208).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(7)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + /// The range of component `x` is `[3, 1000]`. + fn schedule_leave_candidates(x: u32, ) -> Weight { + // Minimum execution time: 33_131 nanoseconds. + Weight::from_ref_time(36_500_043) + // Standard Error: 861 + .saturating_add(Weight::from_ref_time(78_983).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: Balances Locks (r:2 w:2) + // Storage: System Account (r:2 w:2) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + // Storage: ParachainStaking BottomDelegations (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + /// The range of component `x` is `[2, 150]`. + fn execute_leave_candidates(x: u32, ) -> Weight { + // Minimum execution time: 95_036 nanoseconds. + Weight::from_ref_time(96_027_000) + // Standard Error: 40_358 + .saturating_add(Weight::from_ref_time(20_643_305).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(x.into()))) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(x.into()))) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + /// The range of component `x` is `[3, 1000]`. + fn cancel_leave_candidates(x: u32, ) -> Weight { + // Minimum execution time: 35_717 nanoseconds. + Weight::from_ref_time(33_420_889) + // Standard Error: 875 + .saturating_add(Weight::from_ref_time(89_616).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + fn go_offline() -> Weight { + // Minimum execution time: 29_444 nanoseconds. + Weight::from_ref_time(30_323_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + fn go_online() -> Weight { + // Minimum execution time: 28_276 nanoseconds. + Weight::from_ref_time(29_335_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + fn candidate_bond_more() -> Weight { + // Minimum execution time: 47_711 nanoseconds. + Weight::from_ref_time(51_929_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + fn schedule_candidate_bond_less() -> Weight { + // Minimum execution time: 28_345 nanoseconds. + Weight::from_ref_time(28_730_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + fn execute_candidate_bond_less() -> Weight { + // Minimum execution time: 59_341 nanoseconds. + Weight::from_ref_time(60_641_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + fn cancel_candidate_bond_less() -> Weight { + // Minimum execution time: 24_715 nanoseconds. + Weight::from_ref_time(25_422_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + /// The range of component `x` is `[3, 25]`. + /// The range of component `y` is `[2, 100]`. + fn delegate(x: u32, y: u32, ) -> Weight { + // Minimum execution time: 82_807 nanoseconds. + Weight::from_ref_time(77_201_224) + // Standard Error: 5_636 + .saturating_add(Weight::from_ref_time(296_141).saturating_mul(x.into())) + // Standard Error: 1_299 + .saturating_add(Weight::from_ref_time(173_183).saturating_mul(y.into())) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(7)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn schedule_leave_delegators() -> Weight { + // Minimum execution time: 30_356 nanoseconds. + Weight::from_ref_time(32_518_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + /// The range of component `x` is `[2, 25]`. + fn execute_leave_delegators(x: u32, ) -> Weight { + // Minimum execution time: 83_503 nanoseconds. + Weight::from_ref_time(48_779_287) + // Standard Error: 22_489 + .saturating_add(Weight::from_ref_time(19_257_624).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(x.into()))) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(x.into()))) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn cancel_leave_delegators() -> Weight { + // Minimum execution time: 34_036 nanoseconds. + Weight::from_ref_time(34_477_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn schedule_revoke_delegation() -> Weight { + // Minimum execution time: 29_991 nanoseconds. + Weight::from_ref_time(32_246_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:0) + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + fn delegator_bond_more() -> Weight { + // Minimum execution time: 70_610 nanoseconds. + Weight::from_ref_time(73_195_000) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(7)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn schedule_delegator_bond_less() -> Weight { + // Minimum execution time: 30_554 nanoseconds. + Weight::from_ref_time(32_565_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + fn execute_revoke_delegation() -> Weight { + // Minimum execution time: 87_691 nanoseconds. + Weight::from_ref_time(88_806_000) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(8)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + fn execute_delegator_bond_less() -> Weight { + // Minimum execution time: 78_646 nanoseconds. + Weight::from_ref_time(80_221_000) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(8)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn cancel_revoke_delegation() -> Weight { + // Minimum execution time: 29_686 nanoseconds. + Weight::from_ref_time(30_493_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn cancel_delegator_bond_less() -> Weight { + // Minimum execution time: 37_105 nanoseconds. + Weight::from_ref_time(37_532_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainStaking Points (r:1 w:0) + // Storage: ParachainStaking Staked (r:1 w:2) + // Storage: ParachainStaking InflationConfig (r:1 w:0) + // Storage: ParachainStaking ParachainBondInfo (r:1 w:0) + // Storage: ParachainStaking CollatorCommission (r:1 w:0) + // Storage: ParachainStaking CandidatePool (r:1 w:0) + // Storage: ParachainStaking TotalSelected (r:1 w:0) + // Storage: ParachainStaking CandidateInfo (r:9 w:0) + // Storage: ParachainStaking DelegationScheduledRequests (r:9 w:0) + // Storage: ParachainStaking TopDelegations (r:9 w:0) + // Storage: ParachainStaking Total (r:1 w:0) + // Storage: ParachainStaking AwardedPts (r:2 w:1) + // Storage: ParachainStaking AtStake (r:1 w:10) + // Storage: System Account (r:101 w:101) + // Storage: ParachainStaking SelectedCandidates (r:0 w:1) + // Storage: ParachainStaking DelayedPayouts (r:0 w:1) + /// The range of component `x` is `[8, 100]`. + /// The range of component `y` is `[0, 10000]`. + fn round_transition_on_initialize(x: u32, _y: u32, ) -> Weight { + // Minimum execution time: 732_403 nanoseconds. + Weight::from_ref_time(1_401_021_518) + // Standard Error: 335_416 + .saturating_add(Weight::from_ref_time(1_708_116).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(119)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(x.into()))) + .saturating_add(T::DbWeight::get().writes(113)) + } + // Storage: ParachainStaking DelayedPayouts (r:1 w:0) + // Storage: ParachainStaking Points (r:1 w:0) + // Storage: ParachainStaking AwardedPts (r:2 w:1) + // Storage: ParachainStaking AtStake (r:1 w:1) + // Storage: System Account (r:1 w:1) + /// The range of component `y` is `[0, 100]`. + fn pay_one_collator_reward(y: u32, ) -> Weight { + // Minimum execution time: 46_547 nanoseconds. + Weight::from_ref_time(60_801_494) + // Standard Error: 20_743 + .saturating_add(Weight::from_ref_time(12_231_444).saturating_mul(y.into())) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(y.into()))) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(y.into()))) + } + fn base_on_initialize() -> Weight { + // Minimum execution time: 5_875 nanoseconds. + Weight::from_ref_time(6_090_000) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: ParachainStaking InflationConfig (r:1 w:1) - fn set_staking_expectations() -> Weight { - (16_517_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking InflationConfig (r:1 w:1) - fn set_inflation() -> Weight { - (58_667_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) - fn set_parachain_bond_account() -> Weight { - (16_423_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) - fn set_parachain_bond_reserve_percent() -> Weight { - (15_582_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking TotalSelected (r:1 w:1) - fn set_total_selected() -> Weight { - (17_744_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking CollatorCommission (r:1 w:1) - fn set_collator_commission() -> Weight { - (14_652_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking TotalSelected (r:1 w:0) - // Storage: ParachainStaking InflationConfig (r:1 w:1) - fn set_blocks_per_round() -> Weight { - (24_264_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking DelegatorState (r:1 w:0) - // Storage: CollatorSelection Candidates (r:1 w:0) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:0 w:1) - // Storage: ParachainStaking BottomDelegations (r:0 w:1) - fn join_candidates(x: u32, ) -> Weight { - (74_756_000 as Weight) - // Standard Error: 1_000 - .saturating_add((56_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(7 as Weight)) - .saturating_add(RocksDbWeight::get().writes(7 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn schedule_leave_candidates(x: u32, ) -> Weight { - (57_249_000 as Weight) - // Standard Error: 1_000 - .saturating_add((42_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: Balances Locks (r:2 w:2) - // Storage: System Account (r:2 w:2) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - // Storage: ParachainStaking BottomDelegations (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - fn execute_leave_candidates(x: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 57_000 - .saturating_add((25_589_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(x as Weight))) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(x as Weight))) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn cancel_leave_candidates(x: u32, ) -> Weight { - (56_213_000 as Weight) - // Standard Error: 1_000 - .saturating_add((43_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn go_offline() -> Weight { - (24_705_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn go_online() -> Weight { - (23_493_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn candidate_bond_more() -> Weight { - (42_515_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - fn schedule_candidate_bond_less() -> Weight { - (22_273_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - fn execute_candidate_bond_less() -> Weight { - (57_770_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) - } - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - fn cancel_candidate_bond_less() -> Weight { - (20_135_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: System Account (r:1 w:1) - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - fn delegate(x: u32, y: u32, ) -> Weight { - (66_920_000 as Weight) - // Standard Error: 7_000 - .saturating_add((479_000 as Weight).saturating_mul(x as Weight)) - // Standard Error: 1_000 - .saturating_add((284_000 as Weight).saturating_mul(y as Weight)) - .saturating_add(RocksDbWeight::get().reads(7 as Weight)) - .saturating_add(RocksDbWeight::get().writes(7 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn schedule_leave_delegators() -> Weight { - (28_043_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn execute_leave_delegators(x: u32, ) -> Weight { - (35_520_000 as Weight) - // Standard Error: 35_000 - .saturating_add((23_163_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(x as Weight))) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(x as Weight))) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn cancel_leave_delegators() -> Weight { - (27_803_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn schedule_revoke_delegation() -> Weight { - (29_540_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:0) - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - fn delegator_bond_more() -> Weight { - (63_029_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(8 as Weight)) - .saturating_add(RocksDbWeight::get().writes(7 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn schedule_delegator_bond_less() -> Weight { - (28_234_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - fn execute_revoke_delegation() -> Weight { - (83_609_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(8 as Weight)) - .saturating_add(RocksDbWeight::get().writes(8 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - fn execute_delegator_bond_less() -> Weight { - (74_176_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(8 as Weight)) - .saturating_add(RocksDbWeight::get().writes(8 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn cancel_revoke_delegation() -> Weight { - (26_369_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - fn cancel_delegator_bond_less() -> Weight { - (31_999_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: ParachainStaking Points (r:1 w:0) - // Storage: ParachainStaking Staked (r:1 w:2) - // Storage: ParachainStaking InflationConfig (r:1 w:0) - // Storage: ParachainStaking ParachainBondInfo (r:1 w:0) - // Storage: ParachainStaking CollatorCommission (r:1 w:0) - // Storage: ParachainStaking CandidatePool (r:1 w:0) - // Storage: ParachainStaking TotalSelected (r:1 w:0) - // Storage: ParachainStaking CandidateInfo (r:9 w:0) - // Storage: ParachainStaking DelegationScheduledRequests (r:9 w:0) - // Storage: ParachainStaking TopDelegations (r:9 w:0) - // Storage: ParachainStaking Total (r:1 w:0) - // Storage: ParachainStaking AwardedPts (r:2 w:1) - // Storage: ParachainStaking AtStake (r:1 w:10) - // Storage: System Account (r:101 w:101) - // Storage: ParachainStaking SelectedCandidates (r:0 w:1) - // Storage: ParachainStaking DelayedPayouts (r:0 w:1) - fn round_transition_on_initialize(x: u32, _y: u32, ) -> Weight { - (1_557_701_000 as Weight) - // Standard Error: 365_000 - .saturating_add((3_091_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(119 as Weight)) - .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(x as Weight))) - .saturating_add(RocksDbWeight::get().writes(113 as Weight)) - } - // Storage: ParachainStaking DelayedPayouts (r:1 w:0) - // Storage: ParachainStaking Points (r:1 w:0) - // Storage: ParachainStaking AwardedPts (r:2 w:1) - // Storage: ParachainStaking AtStake (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn pay_one_collator_reward(y: u32, ) -> Weight { - (49_139_000 as Weight) - // Standard Error: 13_000 - .saturating_add((13_224_000 as Weight).saturating_mul(y as Weight)) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(y as Weight))) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(y as Weight))) - } - fn base_on_initialize() -> Weight { - (3_163_000 as Weight) - } + // Storage: ParachainStaking InflationConfig (r:1 w:1) + fn set_staking_expectations() -> Weight { + // Minimum execution time: 20_200 nanoseconds. + Weight::from_ref_time(20_764_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: ParachainStaking InflationConfig (r:1 w:1) + fn set_inflation() -> Weight { + // Minimum execution time: 66_384 nanoseconds. + Weight::from_ref_time(67_252_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) + fn set_parachain_bond_account() -> Weight { + // Minimum execution time: 20_280 nanoseconds. + Weight::from_ref_time(20_921_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) + fn set_parachain_bond_reserve_percent() -> Weight { + // Minimum execution time: 19_483 nanoseconds. + Weight::from_ref_time(19_933_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: ParachainStaking TotalSelected (r:1 w:1) + fn set_total_selected() -> Weight { + // Minimum execution time: 19_165 nanoseconds. + Weight::from_ref_time(20_954_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: ParachainStaking CollatorCommission (r:1 w:1) + fn set_collator_commission() -> Weight { + // Minimum execution time: 18_144 nanoseconds. + Weight::from_ref_time(18_586_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: ParachainStaking TotalSelected (r:1 w:0) + // Storage: ParachainStaking InflationConfig (r:1 w:1) + fn set_blocks_per_round() -> Weight { + // Minimum execution time: 83_125 nanoseconds. + Weight::from_ref_time(84_696_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking DelegatorState (r:1 w:0) + // Storage: CollatorSelection Candidates (r:1 w:0) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:0 w:1) + // Storage: ParachainStaking BottomDelegations (r:0 w:1) + /// The range of component `x` is `[3, 1000]`. + fn join_candidates(x: u32, ) -> Weight { + // Minimum execution time: 59_268 nanoseconds. + Weight::from_ref_time(68_433_986) + // Standard Error: 824 + .saturating_add(Weight::from_ref_time(92_208).saturating_mul(x.into())) + .saturating_add(RocksDbWeight::get().reads(7)) + .saturating_add(RocksDbWeight::get().writes(7)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + /// The range of component `x` is `[3, 1000]`. + fn schedule_leave_candidates(x: u32, ) -> Weight { + // Minimum execution time: 33_131 nanoseconds. + Weight::from_ref_time(36_500_043) + // Standard Error: 861 + .saturating_add(Weight::from_ref_time(78_983).saturating_mul(x.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: Balances Locks (r:2 w:2) + // Storage: System Account (r:2 w:2) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + // Storage: ParachainStaking BottomDelegations (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + /// The range of component `x` is `[2, 150]`. + fn execute_leave_candidates(x: u32, ) -> Weight { + // Minimum execution time: 95_036 nanoseconds. + Weight::from_ref_time(96_027_000) + // Standard Error: 40_358 + .saturating_add(Weight::from_ref_time(20_643_305).saturating_mul(x.into())) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(x.into()))) + .saturating_add(RocksDbWeight::get().writes(4)) + .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(x.into()))) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + /// The range of component `x` is `[3, 1000]`. + fn cancel_leave_candidates(x: u32, ) -> Weight { + // Minimum execution time: 35_717 nanoseconds. + Weight::from_ref_time(33_420_889) + // Standard Error: 875 + .saturating_add(Weight::from_ref_time(89_616).saturating_mul(x.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + fn go_offline() -> Weight { + // Minimum execution time: 29_444 nanoseconds. + Weight::from_ref_time(30_323_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + fn go_online() -> Weight { + // Minimum execution time: 28_276 nanoseconds. + Weight::from_ref_time(29_335_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + fn candidate_bond_more() -> Weight { + // Minimum execution time: 47_711 nanoseconds. + Weight::from_ref_time(51_929_000) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(5)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + fn schedule_candidate_bond_less() -> Weight { + // Minimum execution time: 28_345 nanoseconds. + Weight::from_ref_time(28_730_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + fn execute_candidate_bond_less() -> Weight { + // Minimum execution time: 59_341 nanoseconds. + Weight::from_ref_time(60_641_000) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(5)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + fn cancel_candidate_bond_less() -> Weight { + // Minimum execution time: 24_715 nanoseconds. + Weight::from_ref_time(25_422_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + /// The range of component `x` is `[3, 25]`. + /// The range of component `y` is `[2, 100]`. + fn delegate(x: u32, y: u32, ) -> Weight { + // Minimum execution time: 82_807 nanoseconds. + Weight::from_ref_time(77_201_224) + // Standard Error: 5_636 + .saturating_add(Weight::from_ref_time(296_141).saturating_mul(x.into())) + // Standard Error: 1_299 + .saturating_add(Weight::from_ref_time(173_183).saturating_mul(y.into())) + .saturating_add(RocksDbWeight::get().reads(7)) + .saturating_add(RocksDbWeight::get().writes(7)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn schedule_leave_delegators() -> Weight { + // Minimum execution time: 30_356 nanoseconds. + Weight::from_ref_time(32_518_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + /// The range of component `x` is `[2, 25]`. + fn execute_leave_delegators(x: u32, ) -> Weight { + // Minimum execution time: 83_503 nanoseconds. + Weight::from_ref_time(48_779_287) + // Standard Error: 22_489 + .saturating_add(Weight::from_ref_time(19_257_624).saturating_mul(x.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(x.into()))) + .saturating_add(RocksDbWeight::get().writes(2)) + .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(x.into()))) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn cancel_leave_delegators() -> Weight { + // Minimum execution time: 34_036 nanoseconds. + Weight::from_ref_time(34_477_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn schedule_revoke_delegation() -> Weight { + // Minimum execution time: 29_991 nanoseconds. + Weight::from_ref_time(32_246_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:0) + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + fn delegator_bond_more() -> Weight { + // Minimum execution time: 70_610 nanoseconds. + Weight::from_ref_time(73_195_000) + .saturating_add(RocksDbWeight::get().reads(8)) + .saturating_add(RocksDbWeight::get().writes(7)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn schedule_delegator_bond_less() -> Weight { + // Minimum execution time: 30_554 nanoseconds. + Weight::from_ref_time(32_565_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + fn execute_revoke_delegation() -> Weight { + // Minimum execution time: 87_691 nanoseconds. + Weight::from_ref_time(88_806_000) + .saturating_add(RocksDbWeight::get().reads(8)) + .saturating_add(RocksDbWeight::get().writes(8)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + fn execute_delegator_bond_less() -> Weight { + // Minimum execution time: 78_646 nanoseconds. + Weight::from_ref_time(80_221_000) + .saturating_add(RocksDbWeight::get().reads(8)) + .saturating_add(RocksDbWeight::get().writes(8)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn cancel_revoke_delegation() -> Weight { + // Minimum execution time: 29_686 nanoseconds. + Weight::from_ref_time(30_493_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + fn cancel_delegator_bond_less() -> Weight { + // Minimum execution time: 37_105 nanoseconds. + Weight::from_ref_time(37_532_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: ParachainStaking Points (r:1 w:0) + // Storage: ParachainStaking Staked (r:1 w:2) + // Storage: ParachainStaking InflationConfig (r:1 w:0) + // Storage: ParachainStaking ParachainBondInfo (r:1 w:0) + // Storage: ParachainStaking CollatorCommission (r:1 w:0) + // Storage: ParachainStaking CandidatePool (r:1 w:0) + // Storage: ParachainStaking TotalSelected (r:1 w:0) + // Storage: ParachainStaking CandidateInfo (r:9 w:0) + // Storage: ParachainStaking DelegationScheduledRequests (r:9 w:0) + // Storage: ParachainStaking TopDelegations (r:9 w:0) + // Storage: ParachainStaking Total (r:1 w:0) + // Storage: ParachainStaking AwardedPts (r:2 w:1) + // Storage: ParachainStaking AtStake (r:1 w:10) + // Storage: System Account (r:101 w:101) + // Storage: ParachainStaking SelectedCandidates (r:0 w:1) + // Storage: ParachainStaking DelayedPayouts (r:0 w:1) + /// The range of component `x` is `[8, 100]`. + /// The range of component `y` is `[0, 10000]`. + fn round_transition_on_initialize(x: u32, _y: u32, ) -> Weight { + // Minimum execution time: 732_403 nanoseconds. + Weight::from_ref_time(1_401_021_518) + // Standard Error: 335_416 + .saturating_add(Weight::from_ref_time(1_708_116).saturating_mul(x.into())) + .saturating_add(RocksDbWeight::get().reads(119)) + .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(x.into()))) + .saturating_add(RocksDbWeight::get().writes(113)) + } + // Storage: ParachainStaking DelayedPayouts (r:1 w:0) + // Storage: ParachainStaking Points (r:1 w:0) + // Storage: ParachainStaking AwardedPts (r:2 w:1) + // Storage: ParachainStaking AtStake (r:1 w:1) + // Storage: System Account (r:1 w:1) + /// The range of component `y` is `[0, 100]`. + fn pay_one_collator_reward(y: u32, ) -> Weight { + // Minimum execution time: 46_547 nanoseconds. + Weight::from_ref_time(60_801_494) + // Standard Error: 20_743 + .saturating_add(Weight::from_ref_time(12_231_444).saturating_mul(y.into())) + .saturating_add(RocksDbWeight::get().reads(6)) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(y.into()))) + .saturating_add(RocksDbWeight::get().writes(3)) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(y.into()))) + } + fn base_on_initialize() -> Weight { + // Minimum execution time: 5_875 nanoseconds. + Weight::from_ref_time(6_090_000) + } } diff --git a/runtime/manta/src/weights/pallet_preimage.rs b/runtime/manta/src/weights/pallet_preimage.rs index e504590df..bc3c9c16f 100644 --- a/runtime/manta/src/weights/pallet_preimage.rs +++ b/runtime/manta/src/weights/pallet_preimage.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_preimage //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("manta-dev"), DB CACHE: 1024 // Executed Command: @@ -63,178 +63,206 @@ pub trait WeightInfo { /// Weights for pallet_preimage using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_preimage::WeightInfo for SubstrateWeight { - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - fn note_preimage(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:0) - fn note_requested_preimage(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:0) - fn note_no_deposit_preimage(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unnote_preimage() -> Weight { - (36_033_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unnote_no_deposit_preimage() -> Weight { - (22_081_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_preimage() -> Weight { - (34_420_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_no_deposit_preimage() -> Weight { - (21_099_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_unnoted_preimage() -> Weight { - (17_739_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_requested_preimage() -> Weight { - (7_195_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unrequest_preimage() -> Weight { - (21_483_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unrequest_unnoted_preimage() -> Weight { - (17_430_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn unrequest_multi_referenced_preimage() -> Weight { - (7_282_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + /// The range of component `s` is `[0, 4194304]`. + fn note_preimage(s: u32, ) -> Weight { + // Minimum execution time: 32_533 nanoseconds. + Weight::from_ref_time(33_813_000) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(2_945).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + /// The range of component `s` is `[0, 4194304]`. + fn note_requested_preimage(s: u32, ) -> Weight { + // Minimum execution time: 47_872 nanoseconds. + Weight::from_ref_time(48_210_000) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(2_933).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + /// The range of component `s` is `[0, 4194304]`. + fn note_no_deposit_preimage(s: u32, ) -> Weight { + // Minimum execution time: 44_485 nanoseconds. + Weight::from_ref_time(45_056_000) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(2_937).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + fn unnote_preimage() -> Weight { + // Minimum execution time: 41_460 nanoseconds. + Weight::from_ref_time(42_397_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + fn unnote_no_deposit_preimage() -> Weight { + // Minimum execution time: 29_417 nanoseconds. + Weight::from_ref_time(29_891_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_preimage() -> Weight { + // Minimum execution time: 27_875 nanoseconds. + Weight::from_ref_time(28_338_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_no_deposit_preimage() -> Weight { + // Minimum execution time: 15_384 nanoseconds. + Weight::from_ref_time(15_792_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_unnoted_preimage() -> Weight { + // Minimum execution time: 21_329 nanoseconds. + Weight::from_ref_time(22_029_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_requested_preimage() -> Weight { + // Minimum execution time: 9_923 nanoseconds. + Weight::from_ref_time(10_171_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + fn unrequest_preimage() -> Weight { + // Minimum execution time: 28_380 nanoseconds. + Weight::from_ref_time(28_979_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn unrequest_unnoted_preimage() -> Weight { + // Minimum execution time: 9_765 nanoseconds. + Weight::from_ref_time(10_152_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn unrequest_multi_referenced_preimage() -> Weight { + // Minimum execution time: 9_930 nanoseconds. + Weight::from_ref_time(10_165_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - fn note_preimage(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:0) - fn note_requested_preimage(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:0) - fn note_no_deposit_preimage(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unnote_preimage() -> Weight { - (36_033_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unnote_no_deposit_preimage() -> Weight { - (22_081_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_preimage() -> Weight { - (34_420_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_no_deposit_preimage() -> Weight { - (21_099_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_unnoted_preimage() -> Weight { - (17_739_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn request_requested_preimage() -> Weight { - (7_195_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unrequest_preimage() -> Weight { - (21_483_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) - fn unrequest_unnoted_preimage() -> Weight { - (17_430_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Preimage StatusFor (r:1 w:1) - fn unrequest_multi_referenced_preimage() -> Weight { - (7_282_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + /// The range of component `s` is `[0, 4194304]`. + fn note_preimage(s: u32, ) -> Weight { + // Minimum execution time: 32_533 nanoseconds. + Weight::from_ref_time(33_813_000) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(2_945).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + /// The range of component `s` is `[0, 4194304]`. + fn note_requested_preimage(s: u32, ) -> Weight { + // Minimum execution time: 47_872 nanoseconds. + Weight::from_ref_time(48_210_000) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(2_933).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + /// The range of component `s` is `[0, 4194304]`. + fn note_no_deposit_preimage(s: u32, ) -> Weight { + // Minimum execution time: 44_485 nanoseconds. + Weight::from_ref_time(45_056_000) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(2_937).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + fn unnote_preimage() -> Weight { + // Minimum execution time: 41_460 nanoseconds. + Weight::from_ref_time(42_397_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + fn unnote_no_deposit_preimage() -> Weight { + // Minimum execution time: 29_417 nanoseconds. + Weight::from_ref_time(29_891_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_preimage() -> Weight { + // Minimum execution time: 27_875 nanoseconds. + Weight::from_ref_time(28_338_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_no_deposit_preimage() -> Weight { + // Minimum execution time: 15_384 nanoseconds. + Weight::from_ref_time(15_792_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_unnoted_preimage() -> Weight { + // Minimum execution time: 21_329 nanoseconds. + Weight::from_ref_time(22_029_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn request_requested_preimage() -> Weight { + // Minimum execution time: 9_923 nanoseconds. + Weight::from_ref_time(10_171_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + // Storage: Preimage PreimageFor (r:0 w:1) + fn unrequest_preimage() -> Weight { + // Minimum execution time: 28_380 nanoseconds. + Weight::from_ref_time(28_979_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn unrequest_unnoted_preimage() -> Weight { + // Minimum execution time: 9_765 nanoseconds. + Weight::from_ref_time(10_152_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Preimage StatusFor (r:1 w:1) + fn unrequest_multi_referenced_preimage() -> Weight { + // Minimum execution time: 9_930 nanoseconds. + Weight::from_ref_time(10_165_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } } diff --git a/runtime/manta/src/weights/pallet_session.rs b/runtime/manta/src/weights/pallet_session.rs index 39991faab..81ae32f37 100644 --- a/runtime/manta/src/weights/pallet_session.rs +++ b/runtime/manta/src/weights/pallet_session.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_session //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("manta-dev"), DB CACHE: 1024 // Executed Command: @@ -53,36 +53,40 @@ pub trait WeightInfo { /// Weights for pallet_session using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_session::WeightInfo for SubstrateWeight { - // Storage: Session NextKeys (r:1 w:1) - // Storage: Session KeyOwner (r:2 w:2) - fn set_keys() -> Weight { - (22_900_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Session NextKeys (r:1 w:1) - // Storage: Session KeyOwner (r:0 w:2) - fn purge_keys() -> Weight { - (14_785_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } + // Storage: Session NextKeys (r:1 w:1) + // Storage: Session KeyOwner (r:2 w:2) + fn set_keys() -> Weight { + // Minimum execution time: 27_551 nanoseconds. + Weight::from_ref_time(28_183_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: Session NextKeys (r:1 w:1) + // Storage: Session KeyOwner (r:0 w:2) + fn purge_keys() -> Weight { + // Minimum execution time: 21_645 nanoseconds. + Weight::from_ref_time(22_228_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(3)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Session NextKeys (r:1 w:1) - // Storage: Session KeyOwner (r:2 w:2) - fn set_keys() -> Weight { - (22_900_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } - // Storage: Session NextKeys (r:1 w:1) - // Storage: Session KeyOwner (r:0 w:2) - fn purge_keys() -> Weight { - (14_785_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) - } + // Storage: Session NextKeys (r:1 w:1) + // Storage: Session KeyOwner (r:2 w:2) + fn set_keys() -> Weight { + // Minimum execution time: 27_551 nanoseconds. + Weight::from_ref_time(28_183_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: Session NextKeys (r:1 w:1) + // Storage: Session KeyOwner (r:0 w:2) + fn purge_keys() -> Weight { + // Minimum execution time: 21_645 nanoseconds. + Weight::from_ref_time(22_228_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(3)) + } } diff --git a/runtime/manta/src/weights/pallet_timestamp.rs b/runtime/manta/src/weights/pallet_timestamp.rs index 13a799311..74c27163d 100644 --- a/runtime/manta/src/weights/pallet_timestamp.rs +++ b/runtime/manta/src/weights/pallet_timestamp.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_timestamp //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("manta-dev"), DB CACHE: 1024 // Executed Command: @@ -53,26 +53,30 @@ pub trait WeightInfo { /// Weights for pallet_timestamp using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_timestamp::WeightInfo for SubstrateWeight { - // Storage: Timestamp Now (r:1 w:1) - fn set() -> Weight { - (7_381_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - fn on_finalize() -> Weight { - (2_752_000 as Weight) - } + // Storage: Timestamp Now (r:1 w:1) + fn set() -> Weight { + // Minimum execution time: 8_293 nanoseconds. + Weight::from_ref_time(8_538_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn on_finalize() -> Weight { + // Minimum execution time: 13_144 nanoseconds. + Weight::from_ref_time(13_786_000) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Timestamp Now (r:1 w:1) - fn set() -> Weight { - (7_381_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - fn on_finalize() -> Weight { - (2_752_000 as Weight) - } + // Storage: Timestamp Now (r:1 w:1) + fn set() -> Weight { + // Minimum execution time: 8_293 nanoseconds. + Weight::from_ref_time(8_538_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + fn on_finalize() -> Weight { + // Minimum execution time: 13_144 nanoseconds. + Weight::from_ref_time(13_786_000) + } } diff --git a/runtime/manta/src/weights/pallet_treasury.rs b/runtime/manta/src/weights/pallet_treasury.rs index 2ac49ea35..e2a7d56f4 100644 --- a/runtime/manta/src/weights/pallet_treasury.rs +++ b/runtime/manta/src/weights/pallet_treasury.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_treasury //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("manta-dev"), DB CACHE: 1024 // Executed Command: @@ -57,96 +57,116 @@ pub trait WeightInfo { /// Weights for pallet_treasury using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_treasury::WeightInfo for SubstrateWeight { - fn spend() -> Weight { - (492_000 as Weight) - } - // Storage: Treasury ProposalCount (r:1 w:1) - // Storage: Treasury Proposals (r:0 w:1) - fn propose_spend() -> Weight { - (36_564_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Treasury Proposals (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn reject_proposal() -> Weight { - (48_458_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Treasury Proposals (r:1 w:0) - // Storage: Treasury Approvals (r:1 w:1) - fn approve_proposal(p: u32, ) -> Weight { - (12_837_000 as Weight) - // Standard Error: 0 - .saturating_add((117_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Treasury Approvals (r:1 w:1) - fn remove_approval() -> Weight { - (8_059_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Treasury Approvals (r:1 w:1) - // Storage: Treasury Proposals (r:2 w:2) - // Storage: System Account (r:4 w:4) - fn on_initialize_proposals(p: u32, ) -> Weight { - (31_344_000 as Weight) - // Standard Error: 23_000 - .saturating_add((33_028_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(p as Weight))) - } + fn spend() -> Weight { + // Minimum execution time: 166 nanoseconds. + Weight::from_ref_time(194_000) + } + // Storage: Treasury ProposalCount (r:1 w:1) + // Storage: Treasury Proposals (r:0 w:1) + fn propose_spend() -> Weight { + // Minimum execution time: 30_498 nanoseconds. + Weight::from_ref_time(32_033_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Treasury Proposals (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn reject_proposal() -> Weight { + // Minimum execution time: 51_787 nanoseconds. + Weight::from_ref_time(52_521_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Treasury Proposals (r:1 w:0) + // Storage: Treasury Approvals (r:1 w:1) + /// The range of component `p` is `[0, 99]`. + fn approve_proposal(p: u32, ) -> Weight { + // Minimum execution time: 11_818 nanoseconds. + Weight::from_ref_time(16_100_675) + // Standard Error: 1_671 + .saturating_add(Weight::from_ref_time(90_725).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Treasury Approvals (r:1 w:1) + fn remove_approval() -> Weight { + // Minimum execution time: 9_817 nanoseconds. + Weight::from_ref_time(10_091_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Treasury Deactivated (r:1 w:1) + // Storage: Balances InactiveIssuance (r:1 w:1) + // Storage: Treasury Approvals (r:1 w:1) + // Storage: Treasury Proposals (r:2 w:2) + // Storage: System Account (r:4 w:4) + /// The range of component `p` is `[0, 100]`. + fn on_initialize_proposals(p: u32, ) -> Weight { + // Minimum execution time: 37_450 nanoseconds. + Weight::from_ref_time(56_550_062) + // Standard Error: 31_311 + .saturating_add(Weight::from_ref_time(29_623_994).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((3_u64).saturating_mul(p.into()))) + } } // For backwards compatibility and tests impl WeightInfo for () { - fn spend() -> Weight { - (492_000 as Weight) - } - // Storage: Treasury ProposalCount (r:1 w:1) - // Storage: Treasury Proposals (r:0 w:1) - fn propose_spend() -> Weight { - (36_564_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Treasury Proposals (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn reject_proposal() -> Weight { - (48_458_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - // Storage: Treasury Proposals (r:1 w:0) - // Storage: Treasury Approvals (r:1 w:1) - fn approve_proposal(p: u32, ) -> Weight { - (12_837_000 as Weight) - // Standard Error: 0 - .saturating_add((117_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Treasury Approvals (r:1 w:1) - fn remove_approval() -> Weight { - (8_059_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - // Storage: Treasury Approvals (r:1 w:1) - // Storage: Treasury Proposals (r:2 w:2) - // Storage: System Account (r:4 w:4) - fn on_initialize_proposals(p: u32, ) -> Weight { - (31_344_000 as Weight) - // Standard Error: 23_000 - .saturating_add((33_028_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(p as Weight))) - } + fn spend() -> Weight { + // Minimum execution time: 166 nanoseconds. + Weight::from_ref_time(194_000) + } + // Storage: Treasury ProposalCount (r:1 w:1) + // Storage: Treasury Proposals (r:0 w:1) + fn propose_spend() -> Weight { + // Minimum execution time: 30_498 nanoseconds. + Weight::from_ref_time(32_033_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Treasury Proposals (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn reject_proposal() -> Weight { + // Minimum execution time: 51_787 nanoseconds. + Weight::from_ref_time(52_521_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: Treasury Proposals (r:1 w:0) + // Storage: Treasury Approvals (r:1 w:1) + /// The range of component `p` is `[0, 99]`. + fn approve_proposal(p: u32, ) -> Weight { + // Minimum execution time: 11_818 nanoseconds. + Weight::from_ref_time(16_100_675) + // Standard Error: 1_671 + .saturating_add(Weight::from_ref_time(90_725).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Treasury Approvals (r:1 w:1) + fn remove_approval() -> Weight { + // Minimum execution time: 9_817 nanoseconds. + Weight::from_ref_time(10_091_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: Treasury Deactivated (r:1 w:1) + // Storage: Balances InactiveIssuance (r:1 w:1) + // Storage: Treasury Approvals (r:1 w:1) + // Storage: Treasury Proposals (r:2 w:2) + // Storage: System Account (r:4 w:4) + /// The range of component `p` is `[0, 100]`. + fn on_initialize_proposals(p: u32, ) -> Weight { + // Minimum execution time: 37_450 nanoseconds. + Weight::from_ref_time(56_550_062) + // Standard Error: 31_311 + .saturating_add(Weight::from_ref_time(29_623_994).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(p.into()))) + .saturating_add(RocksDbWeight::get().writes(3)) + .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(p.into()))) + } } diff --git a/runtime/manta/src/weights/pallet_utility.rs b/runtime/manta/src/weights/pallet_utility.rs index 6fa31e0ec..4675c30e5 100644 --- a/runtime/manta/src/weights/pallet_utility.rs +++ b/runtime/manta/src/weights/pallet_utility.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_utility //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("manta-dev"), DB CACHE: 1024 // Executed Command: @@ -56,50 +56,66 @@ pub trait WeightInfo { /// Weights for pallet_utility using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_utility::WeightInfo for SubstrateWeight { - fn batch(c: u32, ) -> Weight { - (25_168_000 as Weight) - // Standard Error: 5_000 - .saturating_add((4_812_000 as Weight).saturating_mul(c as Weight)) - } - fn as_derivative() -> Weight { - (6_038_000 as Weight) - } - fn batch_all(c: u32, ) -> Weight { - (22_514_000 as Weight) - // Standard Error: 5_000 - .saturating_add((4_974_000 as Weight).saturating_mul(c as Weight)) - } - fn dispatch_as() -> Weight { - (13_644_000 as Weight) - } - fn force_batch(c: u32, ) -> Weight { - (27_816_000 as Weight) - // Standard Error: 4_000 - .saturating_add((4_795_000 as Weight).saturating_mul(c as Weight)) - } + /// The range of component `c` is `[0, 1000]`. + fn batch(c: u32, ) -> Weight { + // Minimum execution time: 13_415 nanoseconds. + Weight::from_ref_time(56_500_002) + // Standard Error: 5_190 + .saturating_add(Weight::from_ref_time(4_851_733).saturating_mul(c.into())) + } + fn as_derivative() -> Weight { + // Minimum execution time: 7_504 nanoseconds. + Weight::from_ref_time(7_775_000) + } + /// The range of component `c` is `[0, 1000]`. + fn batch_all(c: u32, ) -> Weight { + // Minimum execution time: 13_376 nanoseconds. + Weight::from_ref_time(47_092_334) + // Standard Error: 6_097 + .saturating_add(Weight::from_ref_time(5_089_323).saturating_mul(c.into())) + } + fn dispatch_as() -> Weight { + // Minimum execution time: 15_762 nanoseconds. + Weight::from_ref_time(16_080_000) + } + /// The range of component `c` is `[0, 1000]`. + fn force_batch(c: u32, ) -> Weight { + // Minimum execution time: 13_335 nanoseconds. + Weight::from_ref_time(53_757_323) + // Standard Error: 5_498 + .saturating_add(Weight::from_ref_time(4_844_872).saturating_mul(c.into())) + } } // For backwards compatibility and tests impl WeightInfo for () { - fn batch(c: u32, ) -> Weight { - (25_168_000 as Weight) - // Standard Error: 5_000 - .saturating_add((4_812_000 as Weight).saturating_mul(c as Weight)) - } - fn as_derivative() -> Weight { - (6_038_000 as Weight) - } - fn batch_all(c: u32, ) -> Weight { - (22_514_000 as Weight) - // Standard Error: 5_000 - .saturating_add((4_974_000 as Weight).saturating_mul(c as Weight)) - } - fn dispatch_as() -> Weight { - (13_644_000 as Weight) - } - fn force_batch(c: u32, ) -> Weight { - (27_816_000 as Weight) - // Standard Error: 4_000 - .saturating_add((4_795_000 as Weight).saturating_mul(c as Weight)) - } + /// The range of component `c` is `[0, 1000]`. + fn batch(c: u32, ) -> Weight { + // Minimum execution time: 13_415 nanoseconds. + Weight::from_ref_time(56_500_002) + // Standard Error: 5_190 + .saturating_add(Weight::from_ref_time(4_851_733).saturating_mul(c.into())) + } + fn as_derivative() -> Weight { + // Minimum execution time: 7_504 nanoseconds. + Weight::from_ref_time(7_775_000) + } + /// The range of component `c` is `[0, 1000]`. + fn batch_all(c: u32, ) -> Weight { + // Minimum execution time: 13_376 nanoseconds. + Weight::from_ref_time(47_092_334) + // Standard Error: 6_097 + .saturating_add(Weight::from_ref_time(5_089_323).saturating_mul(c.into())) + } + fn dispatch_as() -> Weight { + // Minimum execution time: 15_762 nanoseconds. + Weight::from_ref_time(16_080_000) + } + /// The range of component `c` is `[0, 1000]`. + fn force_batch(c: u32, ) -> Weight { + // Minimum execution time: 13_335 nanoseconds. + Weight::from_ref_time(53_757_323) + // Standard Error: 5_498 + .saturating_add(Weight::from_ref_time(4_844_872).saturating_mul(c.into())) + } } diff --git a/runtime/manta/src/weights/xcm/mod.rs b/runtime/manta/src/weights/xcm/mod.rs index 9d64cf87d..30f699c5f 100644 --- a/runtime/manta/src/weights/xcm/mod.rs +++ b/runtime/manta/src/weights/xcm/mod.rs @@ -20,103 +20,108 @@ mod pallet_xcm_benchmarks_generic; use crate::Runtime; use frame_support::weights::Weight; use sp_std::cmp; -use xcm::{latest::prelude::*, DoubleEncoded}; +use xcm::{ + latest::{prelude::*, Weight as XCMWeight}, + DoubleEncoded, +}; use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; trait WeighMultiAssets { - fn weigh_multi_assets(&self, weight: Weight) -> Weight; + fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight; } const MAX_ASSETS: u32 = 100; impl WeighMultiAssets for MultiAssetFilter { - fn weigh_multi_assets(&self, weight: Weight) -> Weight { - match self { + fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight { + let weight = match self { Self::Definite(assets) => { - // NOTE: We charge fees for at least 1 asset even if 0 were requested to punish spam - (assets.inner().iter().count().max(1) as Weight).saturating_mul(weight) + weight.saturating_mul(assets.inner().iter().count().max(1) as u64) } - Self::Wild(_) => (MAX_ASSETS as Weight).saturating_mul(weight), - } + Self::Wild(_) => weight.saturating_mul(MAX_ASSETS as u64), + }; + weight.ref_time() } } impl WeighMultiAssets for MultiAssets { - fn weigh_multi_assets(&self, weight: Weight) -> Weight { - (self.inner().iter().count().max(1) as Weight).saturating_mul(weight) + fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight { + weight + .saturating_mul(self.inner().iter().count().max(1) as u64) + .ref_time() } } pub struct MantaXcmWeight(core::marker::PhantomData); impl XcmWeightInfo for MantaXcmWeight { - fn withdraw_asset(assets: &MultiAssets) -> Weight { + fn withdraw_asset(assets: &MultiAssets) -> XCMWeight { assets.weigh_multi_assets(XcmFungibleWeight::::withdraw_asset()) } - fn reserve_asset_deposited(assets: &MultiAssets) -> Weight { + fn reserve_asset_deposited(assets: &MultiAssets) -> XCMWeight { assets.weigh_multi_assets(XcmFungibleWeight::::reserve_asset_deposited()) } - fn receive_teleported_asset(_assets: &MultiAssets) -> Weight { - u64::MAX // disable teleport + fn receive_teleported_asset(_assets: &MultiAssets) -> XCMWeight { + Weight::MAX.ref_time() // disable teleport } - fn query_response(_query_id: &u64, _response: &Response, _max_weight: &u64) -> Weight { - XcmGeneric::::query_response() + fn query_response(_query_id: &u64, _response: &Response, _max_weight: &u64) -> XCMWeight { + XcmGeneric::::query_response().ref_time() } - fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> Weight { + fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> XCMWeight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_asset()) } fn transfer_reserve_asset( assets: &MultiAssets, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> Weight { + ) -> XCMWeight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_reserve_asset()) } fn transact( _origin_type: &OriginKind, _require_weight_at_most: &u64, _call: &DoubleEncoded, - ) -> Weight { - XcmGeneric::::transact() + ) -> XCMWeight { + XcmGeneric::::transact().ref_time() } fn hrmp_new_channel_open_request( _sender: &u32, _max_message_size: &u32, _max_capacity: &u32, - ) -> Weight { + ) -> XCMWeight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX + Weight::MAX.ref_time() } - fn hrmp_channel_accepted(_recipient: &u32) -> Weight { + fn hrmp_channel_accepted(_recipient: &u32) -> XCMWeight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX + Weight::MAX.ref_time() } - fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> Weight { + fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> XCMWeight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX + Weight::MAX.ref_time() } - fn clear_origin() -> Weight { - XcmGeneric::::clear_origin() + fn clear_origin() -> XCMWeight { + XcmGeneric::::clear_origin().ref_time() } - fn descend_origin(_who: &InteriorMultiLocation) -> Weight { - XcmGeneric::::descend_origin() + fn descend_origin(_who: &InteriorMultiLocation) -> XCMWeight { + XcmGeneric::::descend_origin().ref_time() } fn report_error( _query_id: &QueryId, _dest: &MultiLocation, _max_response_weight: &u64, - ) -> Weight { - XcmGeneric::::report_error() + ) -> XCMWeight { + XcmGeneric::::report_error().ref_time() } fn deposit_asset( assets: &MultiAssetFilter, _max_assets: &u32, _dest: &MultiLocation, - ) -> Weight { + ) -> XCMWeight { // Hardcoded until better understanding how to deal with worst case scenario of holding register - let hardcoded_weight: u64 = 1_000_000_000; + let hardcoded_weight = Weight::from_ref_time(1_000_000_000_u64).ref_time(); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()); cmp::min(hardcoded_weight, weight) } @@ -125,23 +130,23 @@ impl XcmWeightInfo for MantaXcmWeight { _max_assets: &u32, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> Weight { + ) -> XCMWeight { // Hardcoded until better understanding how to deal with worst case scenario of holding register - let hardcoded_weight: u64 = 1_000_000_000; + let hardcoded_weight = Weight::from_ref_time(1_000_000_000_u64).ref_time(); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()); cmp::min(hardcoded_weight, weight) } - fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets) -> Weight { - Weight::MAX + fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets) -> XCMWeight { + Weight::MAX.ref_time() } fn initiate_reserve_withdraw( assets: &MultiAssetFilter, _reserve: &MultiLocation, _xcm: &Xcm<()>, - ) -> Weight { + ) -> XCMWeight { // Hardcoded until better understanding how to deal with worst case scenario of holding register - let hardcoded_weight: u64 = 1_000_000_000; + let hardcoded_weight = Weight::from_ref_time(1_000_000_000_u64).ref_time(); let weight = assets.weigh_multi_assets(XcmGeneric::::initiate_reserve_withdraw()); cmp::min(hardcoded_weight, weight) } @@ -149,9 +154,9 @@ impl XcmWeightInfo for MantaXcmWeight { assets: &MultiAssetFilter, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> Weight { + ) -> XCMWeight { // Hardcoded until better understanding how to deal with worst case scenario of holding register - let hardcoded_weight: u64 = 1_000_000_000; + let hardcoded_weight = Weight::from_ref_time(1_000_000_000_u64).ref_time(); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::initiate_teleport()); cmp::min(hardcoded_weight, weight) } @@ -160,37 +165,37 @@ impl XcmWeightInfo for MantaXcmWeight { _dest: &MultiLocation, _assets: &MultiAssetFilter, _max_response_weight: &u64, - ) -> Weight { + ) -> XCMWeight { // Hardcoded until better understanding how to deal with worst case scenario of holding register - let hardcoded_weight: u64 = 1_000_000_000; - let weight = XcmGeneric::::query_holding(); + let hardcoded_weight = Weight::from_ref_time(1_000_000_000_u64).ref_time(); + let weight = XcmGeneric::::query_holding().ref_time(); cmp::min(hardcoded_weight, weight) } - fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> Weight { - XcmGeneric::::buy_execution() + fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> XCMWeight { + XcmGeneric::::buy_execution().ref_time() } - fn refund_surplus() -> Weight { - XcmGeneric::::refund_surplus() + fn refund_surplus() -> XCMWeight { + XcmGeneric::::refund_surplus().ref_time() } - fn set_error_handler(_xcm: &Xcm) -> Weight { - XcmGeneric::::set_error_handler() + fn set_error_handler(_xcm: &Xcm) -> XCMWeight { + XcmGeneric::::set_error_handler().ref_time() } - fn set_appendix(_xcm: &Xcm) -> Weight { - XcmGeneric::::set_appendix() + fn set_appendix(_xcm: &Xcm) -> XCMWeight { + XcmGeneric::::set_appendix().ref_time() } - fn clear_error() -> Weight { - XcmGeneric::::clear_error() + fn clear_error() -> XCMWeight { + XcmGeneric::::clear_error().ref_time() } - fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight { - XcmGeneric::::claim_asset() + fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> XCMWeight { + XcmGeneric::::claim_asset().ref_time() } - fn trap(_code: &u64) -> Weight { - XcmGeneric::::trap() + fn trap(_code: &u64) -> XCMWeight { + XcmGeneric::::trap().ref_time() } - fn subscribe_version(_query_id: &QueryId, _max_response_weight: &u64) -> Weight { - XcmGeneric::::subscribe_version() + fn subscribe_version(_query_id: &QueryId, _max_response_weight: &u64) -> XCMWeight { + XcmGeneric::::subscribe_version().ref_time() } - fn unsubscribe_version() -> Weight { - XcmGeneric::::unsubscribe_version() + fn unsubscribe_version() -> XCMWeight { + XcmGeneric::::unsubscribe_version().ref_time() } } diff --git a/runtime/manta/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/runtime/manta/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index e2c0e1651..f19603e7d 100644 --- a/runtime/manta/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/runtime/manta/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -17,8 +17,8 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::fungible` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-90-1`, CPU: `Intel(R) Xeon(R) Platinum 8275CL CPU @ 3.00GHz` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-90-195`, CPU: `Intel(R) Xeon(R) Platinum 8275CL CPU @ 3.00GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("manta-dev"), DB CACHE: 1024 // Executed Command: @@ -50,17 +50,17 @@ impl WeightInfo { // Storage: AssetManager LocationAssetId (r:1 w:0) // Storage: System Account (r:1 w:1) pub(crate) fn withdraw_asset() -> Weight { - (35_826_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(45_199_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: AssetManager LocationAssetId (r:1 w:0) // Storage: System Account (r:2 w:2) pub(crate) fn transfer_asset() -> Weight { - (52_337_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(57_575_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: AssetManager LocationAssetId (r:1 w:0) @@ -71,20 +71,20 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn transfer_reserve_asset() -> Weight { - (64_572_000 as Weight) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(74_336_000) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) } pub(crate) fn reserve_asset_deposited() -> Weight { - (1_504_000 as Weight) + Weight::from_ref_time(2_234_000) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: AssetManager LocationAssetId (r:1 w:0) // Storage: System Account (r:1 w:1) pub(crate) fn deposit_asset() -> Weight { - (36_310_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(48_744_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: AssetManager LocationAssetId (r:1 w:0) @@ -95,9 +95,9 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn deposit_reserve_asset() -> Weight { - (54_664_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(68_533_000) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -106,8 +106,8 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn initiate_teleport() -> Weight { - (24_147_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(30_358_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) } } \ No newline at end of file diff --git a/runtime/manta/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/runtime/manta/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index ea8554a83..753dc4a41 100644 --- a/runtime/manta/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/runtime/manta/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -17,8 +17,8 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-90-1`, CPU: `Intel(R) Xeon(R) Platinum 8275CL CPU @ 3.00GHz` +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-90-195`, CPU: `Intel(R) Xeon(R) Platinum 8275CL CPU @ 3.00GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("manta-dev"), DB CACHE: 1024 // Executed Command: @@ -53,38 +53,38 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn query_holding() -> Weight { - (841_029_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(1_169_810_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) } pub(crate) fn buy_execution() -> Weight { - (4_358_000 as Weight) + Weight::from_ref_time(4_730_000) } // Storage: PolkadotXcm Queries (r:1 w:0) pub(crate) fn query_response() -> Weight { - (11_584_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) + Weight::from_ref_time(14_835_000) + .saturating_add(T::DbWeight::get().reads(1)) } pub(crate) fn transact() -> Weight { - (14_713_000 as Weight) + Weight::from_ref_time(18_040_000) } pub(crate) fn refund_surplus() -> Weight { - (4_245_000 as Weight) + Weight::from_ref_time(6_232_000) } pub(crate) fn set_error_handler() -> Weight { - (764_000 as Weight) + Weight::from_ref_time(1_090_000) } pub(crate) fn set_appendix() -> Weight { - (761_000 as Weight) + Weight::from_ref_time(3_251_000) } pub(crate) fn clear_error() -> Weight { - (726_000 as Weight) + Weight::from_ref_time(3_186_000) } pub(crate) fn descend_origin() -> Weight { - (1_981_000 as Weight) + Weight::from_ref_time(8_370_000) } pub(crate) fn clear_origin() -> Weight { - (757_000 as Weight) + Weight::from_ref_time(1_892_000) } // Storage: PolkadotXcm SupportedVersion (r:1 w:0) // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) @@ -92,18 +92,18 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn report_error() -> Weight { - (13_402_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(26_174_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: PolkadotXcm AssetTraps (r:1 w:1) pub(crate) fn claim_asset() -> Weight { - (6_486_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(36_070_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } pub(crate) fn trap() -> Weight { - (738_000 as Weight) + Weight::from_ref_time(1_366_000) } // Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -112,14 +112,14 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn subscribe_version() -> Weight { - (17_594_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(53_797_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: PolkadotXcm VersionNotifyTargets (r:0 w:1) pub(crate) fn unsubscribe_version() -> Weight { - (3_054_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(5_795_000) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -128,8 +128,8 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn initiate_reserve_withdraw() -> Weight { - (1_103_932_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(1_441_326_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) } } \ No newline at end of file diff --git a/runtime/manta/src/xcm_config.rs b/runtime/manta/src/xcm_config.rs index 9a63288d5..0fd187efa 100644 --- a/runtime/manta/src/xcm_config.rs +++ b/runtime/manta/src/xcm_config.rs @@ -15,9 +15,9 @@ // along with Manta. If not, see . use super::{ - assets_config::MantaAssetConfig, AssetManager, Assets, Balance, Balances, Call, DmpQueue, - Event, Origin, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, Treasury, XcmpQueue, - MAXIMUM_BLOCK_WEIGHT, + assets_config::MantaAssetConfig, AssetManager, Assets, Balance, Balances, DmpQueue, + ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, + Treasury, XcmpQueue, MAXIMUM_BLOCK_WEIGHT, }; use codec::{Decode, Encode}; @@ -53,25 +53,24 @@ use xcm_builder::{ use xcm_executor::{traits::JustTry, Config, XcmExecutor}; parameter_types! { - pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; - pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); } impl cumulus_pallet_parachain_system::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type SelfParaId = parachain_info::Pallet; type DmpMessageHandler = DmpQueue; type ReservedDmpWeight = ReservedDmpWeight; - type OutboundXcmpMessageSource = XcmpQueue; - type XcmpMessageHandler = XcmpQueue; - type ReservedXcmpWeight = ReservedXcmpWeight; + type OutboundXcmpMessageSource = (); + type XcmpMessageHandler = (); + type ReservedXcmpWeight = (); type OnSystemEvent = (); type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases; } - parameter_types! { pub const RelayNetwork: NetworkId = NetworkId::Polkadot; - pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); + pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); pub SelfReserve: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into()))); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); @@ -79,7 +78,7 @@ parameter_types! { /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used /// when determining ownership of accounts for asset transacting and when attempting to use XCM -/// `Transact` in order to determine the dispatch Origin. +/// `Transact` in order to determine the dispatch RuntimeOrigin. pub type LocationToAccountId = ( // The parent (Relay-chain) origin converts to the default `AccountId`. ParentIsPreset, @@ -89,34 +88,34 @@ pub type LocationToAccountId = ( AccountId32Aliases, ); -/// This is the type to convert an (incoming) XCM origin into a local `Origin` instance, +/// This is the type to convert an (incoming) XCM origin into a local `RuntimeOrigin` instance, /// ready for dispatching a transaction with Xcm's `Transact`. /// It uses some Rust magic macro to do the pattern matching sequentially. -/// There is an `OriginKind` which can biases the kind of local `Origin` it will become. +/// There is an `OriginKind` which can biases the kind of local `RuntimeOrigin` it will become. pub type XcmOriginToCallOrigin = ( // Sovereign account converter; this attempts to derive an `AccountId` from the origin location // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for // foreign chains who want to have a local sovereign account on this chain which they control. - SovereignSignedViaLocation, + SovereignSignedViaLocation, // Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when // recognised. - RelayChainAsNative, + RelayChainAsNative, // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when // recognised. - SiblingParachainAsNative, + SiblingParachainAsNative, // Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a // transaction from the Root origin. - ParentAsSuperuser, + ParentAsSuperuser, // If the incoming XCM origin is of type `AccountId32` and the Network is Network::Any // or `RelayNetwork`, convert it to a Native 32 byte account. - SignedAccountId32AsNative, + SignedAccountId32AsNative, // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. - XcmPassthrough, + XcmPassthrough, ); parameter_types! { /// One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. - pub UnitWeightCost: Weight = 1_000_000_000; + pub UnitWeightCost: u64 = 1_000_000_000; /// Used in native traders /// This might be able to skipped. /// We have to use `here()` because of reanchoring logic @@ -195,7 +194,7 @@ pub type XcmFeesToAccount = manta_primitives::xcm::XcmFeesToAccount< pub struct XcmExecutorConfig; impl Config for XcmExecutorConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; // Defines how to Withdraw and Deposit instruction work type AssetTransactor = MultiAssetTransactor; @@ -205,8 +204,11 @@ impl Config for XcmExecutorConfig { type IsTeleporter = (); type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = - WeightInfoBounds, Call, MaxInstructions>; + type Weigher = WeightInfoBounds< + crate::weights::xcm::MantaXcmWeight, + RuntimeCall, + MaxInstructions, + >; // Trader is the means to purchasing weight credit for XCM execution. // We define two traders: // The first one will charge parachain's native currency, who's `MultiLocation` @@ -238,37 +240,40 @@ pub type XcmRouter = ( impl pallet_xcm::Config for Runtime { const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - type Origin = Origin; - type Call = Call; - type Event = Event; - type SendXcmOrigin = EnsureXcmOrigin; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; - type ExecuteXcmOrigin = EnsureXcmOrigin; + type ExecuteXcmOrigin = EnsureXcmOrigin; /// This means that no location will pass XcmExecuteFilter, so a dispatched `execute` message will be filtered. /// This shouldn't be reachable since `LocalOriginToLocation = ();`, but let's be on the safe side. type XcmExecuteFilter = Nothing; type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Nothing; type XcmReserveTransferFilter = Nothing; - type Weigher = - WeightInfoBounds, Call, MaxInstructions>; + type Weigher = WeightInfoBounds< + crate::weights::xcm::MantaXcmWeight, + RuntimeCall, + MaxInstructions, + >; type LocationInverter = LocationInverter; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } impl cumulus_pallet_dmp_queue::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; type ExecuteOverweightOrigin = EnsureRoot; } impl cumulus_pallet_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; } impl cumulus_pallet_xcmp_queue::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; @@ -304,13 +309,13 @@ where } parameter_types! { - pub const BaseXcmWeight: Weight = 100_000_000; + pub const BaseXcmWeight: u64 = 100_000_000; pub const MaxAssetsForTransfer: usize = 2; } // The XCM message wrapper wrapper impl orml_xtokens::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type CurrencyId = CurrencyId; type AccountIdToMultiLocation = AccountIdToMultiLocation; @@ -323,8 +328,11 @@ impl orml_xtokens::Config for Runtime { /// It uses the Weigher configuration to calculate weights for the user callable /// extrinsics on this chain, as well as weights for execution on the destination /// chain. Both based on the composed xcm messages. - type Weigher = - WeightInfoBounds, Call, MaxInstructions>; + type Weigher = WeightInfoBounds< + crate::weights::xcm::MantaXcmWeight, + RuntimeCall, + MaxInstructions, + >; type BaseXcmWeight = BaseXcmWeight; type LocationInverter = LocationInverter; type MaxAssetsForTransfer = MaxAssetsForTransfer; diff --git a/runtime/manta/tests/xcm_mock/parachain.rs b/runtime/manta/tests/xcm_mock/parachain.rs index f493df7f2..fd0da1fd6 100644 --- a/runtime/manta/tests/xcm_mock/parachain.rs +++ b/runtime/manta/tests/xcm_mock/parachain.rs @@ -24,33 +24,33 @@ use frame_support::{ assert_ok, construct_runtime, match_types, pallet_prelude::DispatchResult, parameter_types, - traits::{ConstU32, Currency, Everything, Nothing}, + traits::{AsEnsureOriginWithArg, ConstU32, Currency, Everything, Nothing}, weights::Weight, PalletId, }; -use frame_system::EnsureRoot; -use scale_info::TypeInfo; -use sp_core::H256; -use sp_runtime::{ - traits::{BlakeTwo256, Hash, IdentityLookup}, - AccountId32, -}; -use sp_std::prelude::*; - +use frame_system::{EnsureNever, EnsureRoot}; use manta_primitives::{ assets::{ AssetConfig, AssetIdLocationConvert, AssetIdType, AssetLocation, AssetRegistry, AssetRegistryMetadata, AssetStorageMetadata, BalanceType, LocationType, NativeAndNonNative, }, - constants::{ASSET_MANAGER_PALLET_ID, MANTA_DECIMAL, WEIGHT_PER_SECOND}, + constants::{ASSET_MANAGER_PALLET_ID, MANTA_DECIMAL}, types::{BlockNumber, Header, MantaAssetId}, xcm::{FirstAssetTrader, IsNativeConcrete, MultiAssetAdapter, MultiNativeAsset}, }; +use manta_runtime::MAXIMUM_BLOCK_WEIGHT; use pallet_xcm::XcmPassthrough; use polkadot_core_primitives::BlockNumber as RelayBlockNumber; use polkadot_parachain::primitives::{ DmpMessageHandler, Id as ParaId, Sibling, XcmpMessageFormat, XcmpMessageHandler, }; +use scale_info::TypeInfo; +use sp_core::H256; +use sp_runtime::{ + traits::{BlakeTwo256, Hash, IdentityLookup}, + AccountId32, +}; +use sp_std::prelude::*; use xcm::{latest::prelude::*, Version as XcmVersion, VersionedMultiLocation, VersionedXcm}; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, @@ -70,8 +70,8 @@ parameter_types! { } impl frame_system::Config for Runtime { - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; type Hash = H256; @@ -79,7 +79,7 @@ impl frame_system::Config for Runtime { type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type BlockWeights = (); type BlockLength = (); @@ -105,7 +105,7 @@ parameter_types! { impl pallet_balances::Config for Runtime { type MaxLocks = MaxLocks; type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -115,8 +115,8 @@ impl pallet_balances::Config for Runtime { } parameter_types! { - pub const ReservedXcmpWeight: Weight = WEIGHT_PER_SECOND / 4; - pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND / 4; + pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); } parameter_types! { @@ -137,7 +137,7 @@ parameter_types! { } impl pallet_assets::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = MantaAssetId; type Currency = Balances; @@ -151,6 +151,12 @@ impl pallet_assets::Config for Runtime { type Freezer = (); type Extra = (); type WeightInfo = pallet_assets::weights::SubstrateWeight; + type RemoveItemsLimit = ConstU32<1000>; + type AssetIdParameter = MantaAssetId; + type CreateOrigin = AsEnsureOriginWithArg>; + type CallbackHandle = (); + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -172,19 +178,19 @@ pub type XcmOriginToCallOrigin = ( // Sovereign account converter; this attempts to derive an `AccountId` from the origin location // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for // foreign chains who want to have a local sovereign account on this chain which they control. - SovereignSignedViaLocation, + SovereignSignedViaLocation, // If the incoming XCM origin is of type `AccountId32` and the Network is Network::Any // or `RelayNetwork`, convert it to a Native 32 byte account. - SignedAccountId32AsNative, + SignedAccountId32AsNative, // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when // recognised. - SiblingParachainAsNative, + SiblingParachainAsNative, // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. - XcmPassthrough, + XcmPassthrough, ); parameter_types! { - pub const UnitWeightCost: Weight = 1_000_000_000; + pub const UnitWeightCost: Weight = Weight::from_ref_time(1_000_000_000); // Used in native traders // This might be able to skipped. // We have to use `here()` because of reanchoring logic @@ -269,7 +275,7 @@ pub type XcmFeesToAccount = manta_primitives::xcm::XcmFeesToAccount< pub struct XcmExecutorConfig; impl Config for XcmExecutorConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; // Defines how to Withdraw and Deposit instruction work type AssetTransactor = MultiAssetTransactor; @@ -279,8 +285,11 @@ impl Config for XcmExecutorConfig { type IsTeleporter = (); type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = - WeightInfoBounds, Call, MaxInstructions>; + type Weigher = WeightInfoBounds< + manta_runtime::weights::xcm::MantaXcmWeight, + RuntimeCall, + MaxInstructions, + >; // Trader is the means to purchasing weight credit for XCM execution. // We define two traders: // The first one will charge parachain's native currency, who's `MultiLocation` @@ -299,7 +308,7 @@ impl Config for XcmExecutorConfig { } impl cumulus_pallet_xcmp_queue::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; @@ -316,8 +325,8 @@ pub mod mock_msg_queue { #[pallet::config] pub trait Config: frame_system::Config { - type Event: From> + IsType<::Event>; - type XcmExecutor: ExecuteXcm; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + type XcmExecutor: ExecuteXcm; } #[pallet::call] @@ -336,7 +345,7 @@ pub mod mock_msg_queue { #[pallet::storage] #[pallet::getter(fn received_dmp)] /// A queue of received DMP messages - pub(super) type ReceivedDmp = StorageValue<_, Vec>, ValueQuery>; + pub(super) type ReceivedDmp = StorageValue<_, Vec>, ValueQuery>; impl Get for Pallet { fn get() -> ParaId { @@ -376,14 +385,14 @@ pub mod mock_msg_queue { fn handle_xcmp_message( sender: ParaId, _sent_at: RelayBlockNumber, - xcm: VersionedXcm, + xcm: VersionedXcm, max_weight: Weight, ) -> Result { let hash = Encode::using_encoded(&xcm, T::Hashing::hash); - let (result, event) = match Xcm::::try_from(xcm) { + let (result, event) = match Xcm::::try_from(xcm) { Ok(xcm) => { let location = (1, Parachain(sender.into())); - match T::XcmExecutor::execute_xcm(location, xcm, max_weight) { + match T::XcmExecutor::execute_xcm(location, xcm, max_weight.ref_time()) { Outcome::Error(e) => (Err(e), Event::Fail(Some(hash), e)), Outcome::Complete(w) => (Ok(w), Event::Success(Some(hash))), // As far as the caller is concerned, this was dispatched without error, so @@ -397,7 +406,7 @@ pub mod mock_msg_queue { ), }; Self::deposit_event(event); - result + Ok(Weight::from_ref_time(result?)) } } @@ -413,7 +422,9 @@ pub mod mock_msg_queue { let mut remaining_fragments = data_ref; while !remaining_fragments.is_empty() { - if let Ok(xcm) = VersionedXcm::::decode(&mut remaining_fragments) { + if let Ok(xcm) = + VersionedXcm::::decode(&mut remaining_fragments) + { let _ = Self::handle_xcmp_message(sender, sent_at, xcm, max_weight); } else { debug_assert!(false, "Invalid incoming XCMP message data"); @@ -431,8 +442,8 @@ pub mod mock_msg_queue { ) -> Weight { for (_i, (_sent_at, data)) in iter.enumerate() { let id = sp_io::hashing::blake2_256(&data[..]); - let maybe_msg = - VersionedXcm::::decode(&mut &data[..]).map(Xcm::::try_from); + let maybe_msg = VersionedXcm::::decode(&mut &data[..]) + .map(Xcm::::try_from); match maybe_msg { Err(_) => { Self::deposit_event(Event::InvalidFormat(id)); @@ -441,7 +452,8 @@ pub mod mock_msg_queue { Self::deposit_event(Event::UnsupportedVersion(id)); } Ok(Ok(x)) => { - let outcome = T::XcmExecutor::execute_xcm(Parent, x.clone(), limit); + let outcome = + T::XcmExecutor::execute_xcm(Parent, x.clone(), limit.ref_time()); >::append(x); Self::deposit_event(Event::ExecutedDownward(id, outcome)); } @@ -453,12 +465,12 @@ pub mod mock_msg_queue { } impl mock_msg_queue::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; } impl cumulus_pallet_parachain_system::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type SelfParaId = parachain_info::Pallet; type DmpMessageHandler = MsgQueue; type ReservedDmpWeight = ReservedDmpWeight; @@ -472,20 +484,23 @@ impl cumulus_pallet_parachain_system::Config for Runtime { pub type LocalOriginToLocation = (); impl pallet_xcm::Config for Runtime { - type Event = Event; - type SendXcmOrigin = EnsureXcmOrigin; + type RuntimeEvent = RuntimeEvent; + type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; - type ExecuteXcmOrigin = EnsureXcmOrigin; + type ExecuteXcmOrigin = EnsureXcmOrigin; type XcmExecuteFilter = Nothing; type XcmExecutor = XcmExecutor; // Do not allow teleports type XcmTeleportFilter = Nothing; type XcmReserveTransferFilter = Nothing; - type Weigher = - WeightInfoBounds, Call, MaxInstructions>; + type Weigher = WeightInfoBounds< + manta_runtime::weights::xcm::MantaXcmWeight, + RuntimeCall, + MaxInstructions, + >; type LocationInverter = LocationInverter; - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = CurrentXcmVersion; } @@ -518,7 +533,7 @@ impl AssetRegistry for MantaAssetRegistry { is_sufficient: bool, ) -> DispatchResult { Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), asset_id, AssetManager::account_id(), is_sufficient, @@ -526,7 +541,7 @@ impl AssetRegistry for MantaAssetRegistry { )?; Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), asset_id, metadata.name, metadata.symbol, @@ -540,7 +555,7 @@ impl AssetRegistry for MantaAssetRegistry { metadata: AssetStorageMetadata, ) -> DispatchResult { Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), *asset_id, metadata.name, metadata.symbol, @@ -592,7 +607,7 @@ impl AssetConfig for ParachainAssetConfig { } impl pallet_asset_manager::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AssetId = MantaAssetId; type Balance = Balance; type Location = AssetLocation; @@ -603,7 +618,7 @@ impl pallet_asset_manager::Config for Runtime { } impl cumulus_pallet_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; } @@ -631,21 +646,24 @@ where } parameter_types! { - pub const BaseXcmWeight: Weight = 100_000_000; + pub const BaseXcmWeight: u64 = 100_000_000; pub const MaxAssetsForTransfer: usize = 3; } // The XCM message wrapper wrapper impl orml_xtokens::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type CurrencyId = CurrencyId; type AccountIdToMultiLocation = manta_primitives::xcm::AccountIdToMultiLocation; type CurrencyIdConvert = CurrencyIdtoMultiLocation>; type XcmExecutor = XcmExecutor; type SelfLocation = SelfReserve; - type Weigher = - WeightInfoBounds, Call, MaxInstructions>; + type Weigher = WeightInfoBounds< + manta_runtime::weights::xcm::MantaXcmWeight, + RuntimeCall, + MaxInstructions, + >; type BaseXcmWeight = BaseXcmWeight; type LocationInverter = LocationInverter; type MaxAssetsForTransfer = MaxAssetsForTransfer; @@ -681,7 +699,7 @@ construct_runtime!( } ); -pub(crate) fn para_events() -> Vec { +pub(crate) fn para_events() -> Vec { System::events() .into_iter() .map(|r| r.event) @@ -743,7 +761,7 @@ fn insert_dummy_data( let mut next_dummy_mult_loc = dummy_mult_loc; while next_asset_id < insert_until { assert_ok!(AssetManager::register_asset( - self::Origin::root(), + self::RuntimeOrigin::root(), AssetLocation::from(next_dummy_mult_loc.clone()), dummy_asset_metadata.clone() )); @@ -789,14 +807,14 @@ where asset_id = AssetManager::next_asset_id(); assert_ok!(AssetManager::register_asset( - self::Origin::root(), + self::RuntimeOrigin::root(), source_location.clone(), asset_metadata.clone() )); if let Some((owner, min_balance, is_sufficient, is_frozen)) = mint_asset { assert_ok!(self::Assets::force_asset_status( - self::Origin::root(), + self::RuntimeOrigin::root(), asset_id, owner.clone(), owner.clone(), @@ -810,7 +828,7 @@ where if let Some(ups) = units_per_second { assert_ok!(AssetManager::set_units_per_second( - self::Origin::root(), + self::RuntimeOrigin::root(), asset_id, ups, )); diff --git a/runtime/manta/tests/xcm_mock/relay_chain.rs b/runtime/manta/tests/xcm_mock/relay_chain.rs index 2804e0b04..f409a5ad3 100644 --- a/runtime/manta/tests/xcm_mock/relay_chain.rs +++ b/runtime/manta/tests/xcm_mock/relay_chain.rs @@ -51,8 +51,8 @@ parameter_types! { } impl frame_system::Config for Runtime { - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; type Hash = H256; @@ -60,7 +60,7 @@ impl frame_system::Config for Runtime { type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type BlockWeights = (); type BlockLength = (); @@ -86,7 +86,7 @@ parameter_types! { impl pallet_balances::Config for Runtime { type MaxLocks = MaxLocks; type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -96,8 +96,8 @@ impl pallet_balances::Config for Runtime { } impl pallet_utility::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type WeightInfo = (); type PalletsOrigin = OriginCaller; } @@ -113,7 +113,7 @@ parameter_types! { pub const PolkadotNetwork: NetworkId = NetworkId::Polkadot; pub const AnyNetwork: NetworkId = NetworkId::Any; pub Ancestry: MultiLocation = Here.into(); - pub UnitWeightCost: Weight = 1_000; + pub UnitWeightCost: Weight = Weight::from_ref_time(1000); } pub type SovereignAccountOf = ( @@ -125,14 +125,14 @@ pub type LocalAssetTransactor = XcmCurrencyAdapter, SovereignAccountOf, AccountId, ()>; type LocalOriginConverter = ( - SovereignSignedViaLocation, - ChildParachainAsNative, - SignedAccountId32AsNative, - ChildSystemParachainAsSuperuser, + SovereignSignedViaLocation, + ChildParachainAsNative, + SignedAccountId32AsNative, + ChildSystemParachainAsSuperuser, ); parameter_types! { - pub const BaseXcmWeight: Weight = 1_000; + pub const BaseXcmWeight: u64 = 1_000; pub DotPerSecond: (AssetId, u128) = (Concrete(DotLocation::get()), 1); pub const MaxInstructions: u32 = 100; } @@ -151,7 +151,7 @@ pub type Barrier = ( pub struct XcmExecutorConfig; impl Config for XcmExecutorConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; type AssetTransactor = LocalAssetTransactor; type OriginConverter = LocalOriginConverter; @@ -159,7 +159,7 @@ impl Config for XcmExecutorConfig { type IsTeleporter = (); type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type Trader = FixedRateOfFungible; type ResponseHandler = XcmPallet; type AssetTrap = XcmPallet; @@ -167,22 +167,22 @@ impl Config for XcmExecutorConfig { type SubscriptionService = XcmPallet; } -pub type LocalOriginToLocation = SignedToAccountId32; +pub type LocalOriginToLocation = SignedToAccountId32; impl pallet_xcm::Config for Runtime { - type Event = Event; - type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; + type RuntimeEvent = RuntimeEvent; + type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = XcmRouter; // Anyone can execute XCM messages locally... - type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; + type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmExecuteFilter = Nothing; type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } @@ -192,7 +192,7 @@ parameter_types! { } impl ump::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type UmpSink = ump::XcmSink, Runtime>; type FirstMessageFactorPercent = FirstMessageFactorPercent; type ExecuteOverweightOrigin = frame_system::EnsureRoot; @@ -219,7 +219,7 @@ construct_runtime!( } ); -pub(crate) fn relay_events() -> Vec { +pub(crate) fn relay_events() -> Vec { System::events() .into_iter() .map(|r| r.event) diff --git a/runtime/manta/tests/xcm_mock/xcm_tests.rs b/runtime/manta/tests/xcm_mock/xcm_tests.rs index 787b6b19f..277388e50 100644 --- a/runtime/manta/tests/xcm_mock/xcm_tests.rs +++ b/runtime/manta/tests/xcm_mock/xcm_tests.rs @@ -75,7 +75,7 @@ fn buy_execution(fees: impl Into) -> Instruction { fn dmp() { MockNet::reset(); - let remark = parachain::Call::System( + let remark = parachain::RuntimeCall::System( frame_system::Call::::remark_with_event { remark: vec![1, 2, 3], }, @@ -93,10 +93,11 @@ fn dmp() { }); ParaA::execute_with(|| { - use parachain::{Event, System}; - assert!(System::events() - .iter() - .any(|r| matches!(r.event, Event::System(frame_system::Event::Remarked { .. })))); + use parachain::{RuntimeEvent, System}; + assert!(System::events().iter().any(|r| matches!( + r.event, + RuntimeEvent::System(frame_system::Event::Remarked { .. }) + ))); }); } @@ -104,7 +105,7 @@ fn dmp() { fn dmp_transact_from_parent_should_pass_barrier() { MockNet::reset(); - let remark = parachain::Call::System( + let remark = parachain::RuntimeCall::System( frame_system::Call::::remark_with_event { remark: vec![1, 2, 3], }, @@ -122,10 +123,11 @@ fn dmp_transact_from_parent_should_pass_barrier() { )); }); ParaA::execute_with(|| { - use parachain::{Event, System}; - assert!(System::events() - .iter() - .any(|r| matches!(r.event, Event::System(frame_system::Event::Remarked { .. })))); + use parachain::{RuntimeEvent, System}; + assert!(System::events().iter().any(|r| matches!( + r.event, + RuntimeEvent::System(frame_system::Event::Remarked { .. }) + ))); }); } @@ -133,7 +135,7 @@ fn dmp_transact_from_parent_should_pass_barrier() { fn ump() { MockNet::reset(); - let remark = relay_chain::Call::System( + let remark = relay_chain::RuntimeCall::System( frame_system::Call::::remark_with_event { remark: vec![1, 2, 3], }, @@ -151,10 +153,11 @@ fn ump() { }); Relay::execute_with(|| { - use relay_chain::{Event, System}; - assert!(System::events() - .iter() - .any(|r| matches!(r.event, Event::System(frame_system::Event::Remarked { .. })))); + use relay_chain::{RuntimeEvent, System}; + assert!(System::events().iter().any(|r| matches!( + r.event, + RuntimeEvent::System(frame_system::Event::Remarked { .. }) + ))); }); } @@ -162,7 +165,7 @@ fn ump() { fn xcmp_transact_from_sibling_parachain_blocked_by_barrier() { MockNet::reset(); - let remark = parachain::Call::System( + let remark = parachain::RuntimeCall::System( frame_system::Call::::remark_with_event { remark: vec![1, 2, 3], }, @@ -182,10 +185,11 @@ fn xcmp_transact_from_sibling_parachain_blocked_by_barrier() { // The `AllowUnpaidExecutionFrom` barrier implementation // only allows Transact instructions sent by the relay chain's governance ParaB::execute_with(|| { - use parachain::{Event, System}; - assert!(!System::events() - .iter() - .any(|r| matches!(r.event, Event::System(frame_system::Event::Remarked { .. })))); + use parachain::{RuntimeEvent, System}; + assert!(!System::events().iter().any(|r| matches!( + r.event, + RuntimeEvent::System(frame_system::Event::Remarked { .. }) + ))); }); } @@ -217,7 +221,7 @@ fn reserve_transfer_relaychain_to_parachain_a_then_back() { Relay::execute_with(|| { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( - relay_chain::Origin::signed(ALICE), + relay_chain::RuntimeOrigin::signed(ALICE), Box::new(X1(Parachain(PARA_A_ID)).into().into()), Box::new( X1(AccountId32 { @@ -261,11 +265,11 @@ fn reserve_transfer_relaychain_to_parachain_a_then_back() { ParaA::execute_with(|| { // free execution, full amount received assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(relay_asset_id), amount, Box::new(VersionedMultiLocation::V1(dest)), - weight_at_most + xcm_simulator::Limited(weight_at_most) )); }); @@ -336,11 +340,11 @@ fn send_para_a_native_asset_to_para_b() { // Also tests that a sender can send all of their balance ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, Box::new(VersionedMultiLocation::V1(dest)), - ADVERTISED_DEST_WEIGHT + xcm_simulator::Limited(ADVERTISED_DEST_WEIGHT) )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -422,11 +426,11 @@ fn send_para_b_asset_to_para_b() { assert_eq!(parachain::Assets::balance(b_asset_id_on_a, &ALICE), amount); assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(b_asset_id_on_a), amount, Box::new(VersionedMultiLocation::V1(dest)), - ADVERTISED_DEST_WEIGHT + xcm_simulator::Limited(ADVERTISED_DEST_WEIGHT) )); assert_eq!(parachain::Assets::balance(b_asset_id_on_a, &ALICE), 0); }); @@ -494,11 +498,11 @@ fn send_para_a_native_asset_to_para_b_barriers_should_work() { assert!(weight <= ADVERTISED_DEST_WEIGHT); ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, Box::new(VersionedMultiLocation::V1(dest)), - weight + xcm_simulator::Limited(weight) )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -509,10 +513,10 @@ fn send_para_a_native_asset_to_para_b_barriers_should_work() { // The `AllowTopLevelPaidExecutionFrom` barrier implementation // should not let the transfer through ParaB::execute_with(|| { - use parachain::{Event, System}; + use parachain::{RuntimeEvent, System}; assert!(System::events().iter().any(|r| matches!( r.event, - Event::XcmpQueue(cumulus_pallet_xcmp_queue::Event::Fail { + RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::Fail { message_hash: Some(_), error: xcm_simulator::XcmError::Barrier, weight: _ @@ -584,11 +588,11 @@ fn send_insufficient_asset_from_para_a_to_para_b() { // Transfer ParaA balance to B ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, Box::new(VersionedMultiLocation::V1(dest.clone())), - ADVERTISED_DEST_WEIGHT + xcm_simulator::Limited(ADVERTISED_DEST_WEIGHT) )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -614,7 +618,7 @@ fn send_insufficient_asset_from_para_a_to_para_b() { // incrementing its providers counter to from 0 to 1 ParaB::execute_with(|| { assert_ok!(pallet_balances::Pallet::::set_balance( - parachain::Origin::root(), + parachain::RuntimeOrigin::root(), XcmFeesAccount::get(), 1000000000000000, 1000000000000000 @@ -623,11 +627,11 @@ fn send_insufficient_asset_from_para_a_to_para_b() { ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, Box::new(VersionedMultiLocation::V1(dest.clone())), - ADVERTISED_DEST_WEIGHT + xcm_simulator::Limited(ADVERTISED_DEST_WEIGHT) )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -708,11 +712,11 @@ fn send_para_a_native_asset_to_para_b_must_fail_cases() { ParaA::execute_with(|| { assert_err!( parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount + INITIAL_BALANCE, Box::new(VersionedMultiLocation::V1(dest.clone())), - weight + xcm_simulator::Limited(weight) ), orml_xtokens::Error::::XcmExecutionFailed ); @@ -722,11 +726,11 @@ fn send_para_a_native_asset_to_para_b_must_fail_cases() { // Low amount for the required weight results in TooExpensive error on the receiver side ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, Box::new(VersionedMultiLocation::V1(dest)), - weight + xcm_simulator::Limited(weight) )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -735,12 +739,12 @@ fn send_para_a_native_asset_to_para_b_must_fail_cases() { }); ParaB::execute_with(|| { - use parachain::{Event, System}; + use parachain::{RuntimeEvent, System}; assert!(System::events().iter().any(|r| { matches!( r.event, - Event::XcmpQueue(cumulus_pallet_xcmp_queue::Event::Fail { + RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::Fail { message_hash: Some(_), error: xcm_simulator::XcmError::TooExpensive, weight: _ @@ -765,7 +769,7 @@ fn register_insufficient_with_zero_min_balance_should_fail() { ParaB::execute_with(|| { assert_err!( AssetManager::register_asset( - parachain::Origin::root(), + parachain::RuntimeOrigin::root(), a_source_location.clone(), a_asset_metadata_on_b.clone() ), @@ -841,17 +845,17 @@ fn send_para_a_custom_asset_to_para_b() { ParaA::execute_with(|| { // Force customized asset balance for Alice assert_ok!(parachain::Assets::mint( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), doge_currency_id_on_a, ALICE, INITIAL_BALANCE )); assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(doge_currency_id_on_a), amount, Box::new(VersionedMultiLocation::V1(alice_on_b)), - ADVERTISED_DEST_WEIGHT + xcm_simulator::Limited(ADVERTISED_DEST_WEIGHT) )); assert_eq!( parachain::Assets::balance(doge_currency_id_on_a, &ALICE), @@ -927,11 +931,11 @@ fn send_para_a_native_asset_para_b_and_then_send_back() { ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, Box::new(VersionedMultiLocation::V1(alice_on_b)), - weight + xcm_simulator::Limited(weight) )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -963,11 +967,11 @@ fn send_para_a_native_asset_para_b_and_then_send_back() { // Send wrapped a back to a ParaB::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_b), amount, Box::new(VersionedMultiLocation::V1(alice_on_a)), - weight + xcm_simulator::Limited(weight) )); assert_eq!(parachain::Assets::balance(a_asset_id_on_b, &ALICE), 0); }); @@ -1061,11 +1065,11 @@ fn send_para_a_native_asset_from_para_b_to_para_c() { ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, Box::new(VersionedMultiLocation::V1(alice_on_b.clone())), - weight + xcm_simulator::Limited(weight) )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -1096,11 +1100,11 @@ fn send_para_a_native_asset_from_para_b_to_para_c() { ParaB::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_b), amount, Box::new(VersionedMultiLocation::V1(alice_on_c)), - weight, + xcm_simulator::Limited(weight), )); assert_eq!(parachain::Assets::balance(a_asset_id_on_b, &ALICE), 0); }); @@ -1156,7 +1160,7 @@ fn receive_relay_asset_with_trader_on_parachain() { Relay::execute_with(|| { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( - relay_chain::Origin::signed(ALICE), + relay_chain::RuntimeOrigin::signed(ALICE), Box::new(X1(Parachain(1)).into().into()), Box::new(VersionedMultiLocation::V1(dest)), Box::new((Here, amount).into()), @@ -1235,12 +1239,12 @@ fn send_para_a_asset_to_para_b_with_trader_and_fee() { ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer_with_fee( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, fee, Box::new(VersionedMultiLocation::V1(dest)), - ADVERTISED_DEST_WEIGHT, + xcm_simulator::Limited(ADVERTISED_DEST_WEIGHT), )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -1331,12 +1335,12 @@ fn send_para_b_asset_to_para_b_with_trader_and_fee() { ); assert_ok!(parachain::XTokens::transfer_with_fee( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(b_asset_id_on_a), amount, fee, Box::new(VersionedMultiLocation::V1(dest)), - ADVERTISED_DEST_WEIGHT, + xcm_simulator::Limited(ADVERTISED_DEST_WEIGHT), )); assert_eq!( parachain::Assets::balance(b_asset_id_on_a, &ALICE), @@ -1412,12 +1416,12 @@ fn send_para_a_native_asset_para_b_and_then_send_back_with_trader_and_fee() { ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer_with_fee( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, fee, Box::new(VersionedMultiLocation::V1(dest)), - ADVERTISED_DEST_WEIGHT, + xcm_simulator::Limited(ADVERTISED_DEST_WEIGHT), )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -1447,11 +1451,11 @@ fn send_para_a_native_asset_para_b_and_then_send_back_with_trader_and_fee() { // Send wrapped a back to a ParaB::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_b), amount, Box::new(VersionedMultiLocation::V1(alice_on_a)), - weight + xcm_simulator::Limited(weight) )); assert_eq!(parachain::Assets::balance(a_asset_id_on_b, &ALICE), 0); }); @@ -1549,11 +1553,11 @@ fn send_para_a_asset_from_para_b_to_para_c_with_trader() { assert!(amount >= fee_at_b); ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, Box::new(VersionedMultiLocation::V1(alice_on_b.clone())), - ADVERTISED_DEST_WEIGHT + xcm_simulator::Limited(ADVERTISED_DEST_WEIGHT) )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -1582,11 +1586,11 @@ fn send_para_a_asset_from_para_b_to_para_c_with_trader() { assert!(amount >= fee_at_b + fee_at_a); ParaB::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_b), amount, Box::new(VersionedMultiLocation::V1(alice_on_c)), - ADVERTISED_DEST_WEIGHT + xcm_simulator::Limited(ADVERTISED_DEST_WEIGHT) )); assert_eq!(parachain::Assets::balance(a_asset_id_on_b, &ALICE), 0); }); @@ -1639,7 +1643,7 @@ fn receive_relay_asset_on_parachain_with_insufficient_fee_payment_should_fail() Relay::execute_with(|| { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( - relay_chain::Origin::signed(ALICE), + relay_chain::RuntimeOrigin::signed(ALICE), Box::new(X1(Parachain(1)).into().into()), Box::new(VersionedMultiLocation::V1(dest)), Box::new((Here, amount).into()), @@ -1695,7 +1699,7 @@ fn receive_relay_should_fail_without_specifying_units_per_second() { Relay::execute_with(|| { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( - relay_chain::Origin::signed(ALICE), + relay_chain::RuntimeOrigin::signed(ALICE), Box::new(X1(Parachain(1)).into().into()), Box::new(VersionedMultiLocation::V1(dest)), Box::new((Here, amount).into()), @@ -1774,11 +1778,11 @@ fn send_para_a_asset_to_para_b_with_insufficient_fee() { // Transfer ParaA balance to B ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, Box::new(VersionedMultiLocation::V1(dest)), - dest_weight, + xcm_simulator::Limited(dest_weight), )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -1849,11 +1853,11 @@ fn send_para_a_asset_to_para_b_without_specifying_units_per_second() { // Transfer ParaA balance to B ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), amount, Box::new(VersionedMultiLocation::V1(dest)), - dest_weight, + xcm_simulator::Limited(dest_weight), )); assert_eq!( parachain::Balances::free_balance(&ALICE), @@ -1903,7 +1907,7 @@ fn receive_insufficient_relay_asset_on_parachain() { Relay::execute_with(|| { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( - relay_chain::Origin::signed(ALICE), + relay_chain::RuntimeOrigin::signed(ALICE), Box::new(X1(Parachain(1)).into().into()), Box::new(VersionedMultiLocation::V1(dest.clone())), Box::new((Here, amount).into()), @@ -1927,7 +1931,7 @@ fn receive_insufficient_relay_asset_on_parachain() { // Send native token to fresh_account ParaA::execute_with(|| { assert_ok!(parachain::Balances::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), new_account.into(), fresh_account_amount )); @@ -1935,7 +1939,7 @@ fn receive_insufficient_relay_asset_on_parachain() { Relay::execute_with(|| { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( - relay_chain::Origin::signed(ALICE), + relay_chain::RuntimeOrigin::signed(ALICE), Box::new(X1(Parachain(1)).into().into()), Box::new(VersionedMultiLocation::V1(dest)), Box::new((Here, amount).into()), @@ -1992,7 +1996,7 @@ fn receive_sufficient_relay_asset_on_parachain() { Relay::execute_with(|| { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( - relay_chain::Origin::signed(ALICE), + relay_chain::RuntimeOrigin::signed(ALICE), Box::new(X1(Parachain(1)).into().into()), Box::new(VersionedMultiLocation::V1(dest)), Box::new((Here, amount).into()), @@ -2157,7 +2161,7 @@ fn test_versioning_on_runtime_upgrade_with_relay() { Relay::execute_with(|| { // This sets the default version, for not known destinations assert_ok!(RelayChainPalletXcm::force_default_xcm_version( - relay_chain::Origin::root(), + relay_chain::RuntimeOrigin::root(), Some(2) )); @@ -2173,7 +2177,7 @@ fn test_versioning_on_runtime_upgrade_with_relay() { // Transfer assets. Since it is an unknown destination, it will query for version assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( - relay_chain::Origin::signed(ALICE), + relay_chain::RuntimeOrigin::signed(ALICE), Box::new(Parachain(PARA_A_ID).into().into()), Box::new(VersionedMultiLocation::V1(dest)), Box::new((Here, 123).into()), @@ -2187,7 +2191,7 @@ fn test_versioning_on_runtime_upgrade_with_relay() { assert!(RelayChainPalletXcm::query(0).is_some()); }); - let expected_supported_version: relay_chain::Event = + let expected_supported_version: relay_chain::RuntimeEvent = pallet_xcm::Event::SupportedVersionChanged( MultiLocation { parents: 0, @@ -2202,14 +2206,15 @@ fn test_versioning_on_runtime_upgrade_with_relay() { assert!(relay_chain::relay_events().contains(&expected_supported_version)); }); - let expected_version_notified: parachain::Event = pallet_xcm::Event::VersionChangeNotified( - MultiLocation { - parents: 1, - interior: Here, - }, - 2, - ) - .into(); + let expected_version_notified: parachain::RuntimeEvent = + pallet_xcm::Event::VersionChangeNotified( + MultiLocation { + parents: 1, + interior: Here, + }, + 2, + ) + .into(); // ParaA changes version to 2, and calls on_runtime_upgrade. This should notify the targets // of the new version change @@ -2225,7 +2230,7 @@ fn test_versioning_on_runtime_upgrade_with_relay() { }); // This event should have been seen in the relay - let expected_supported_version_2: relay_chain::Event = + let expected_supported_version_2: relay_chain::RuntimeEvent = pallet_xcm::Event::SupportedVersionChanged( MultiLocation { parents: 0, @@ -2299,7 +2304,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { ParaA::execute_with(|| { // This sets the default version, for not known destinations assert_ok!(ParachainPalletXcm::force_default_xcm_version( - parachain::Origin::root(), + parachain::RuntimeOrigin::root(), Some(2) )); // Wrap version, which sets VersionedStorage @@ -2314,14 +2319,15 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { assert!(ParachainPalletXcm::query(0).is_some()); }); - let expected_supported_version: parachain::Event = pallet_xcm::Event::SupportedVersionChanged( - MultiLocation { - parents: 1, - interior: X1(Parachain(PARA_B_ID)), - }, - 0, - ) - .into(); + let expected_supported_version: parachain::RuntimeEvent = + pallet_xcm::Event::SupportedVersionChanged( + MultiLocation { + parents: 1, + interior: X1(Parachain(PARA_B_ID)), + }, + 0, + ) + .into(); ParaA::execute_with(|| { // Assert that the events vector contains the version change @@ -2343,11 +2349,11 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { ParaA::execute_with(|| { // free execution, full amount received assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), 100, Box::new(VersionedMultiLocation::V1(dest)), - ADVERTISED_DEST_WEIGHT + xcm_simulator::Limited(ADVERTISED_DEST_WEIGHT) )); // free execution, full amount received assert_eq!( @@ -2361,14 +2367,15 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { assert_eq!(parachain::Assets::balance(a_asset_id_on_b, &ALICE), 100); }); - let expected_version_notified: parachain::Event = pallet_xcm::Event::VersionChangeNotified( - MultiLocation { - parents: 1, - interior: X1(Parachain(PARA_A_ID)), - }, - 2, - ) - .into(); + let expected_version_notified: parachain::RuntimeEvent = + pallet_xcm::Event::VersionChangeNotified( + MultiLocation { + parents: 1, + interior: X1(Parachain(PARA_A_ID)), + }, + 2, + ) + .into(); // ParaB changes version to 2, and calls on_runtime_upgrade. This should notify the targets // of the new version change @@ -2384,7 +2391,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { }); // This event should have been seen in para A - let expected_supported_version_2: parachain::Event = + let expected_supported_version_2: parachain::RuntimeEvent = pallet_xcm::Event::SupportedVersionChanged( MultiLocation { parents: 1, @@ -2449,11 +2456,11 @@ fn filtered_multilocation_should_not_work() { ParaA::execute_with(|| { assert_noop!( parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), 100, Box::new(VersionedMultiLocation::V1(dest)), - 80 + xcm_simulator::Limited(80) ), orml_xtokens::Error::::NotSupportedMultiLocation, ); @@ -2474,11 +2481,11 @@ fn filtered_multilocation_should_not_work() { ParaA::execute_with(|| { assert_noop!( parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), 100, Box::new(VersionedMultiLocation::V1(x3_dest)), - 80 + xcm_simulator::Limited(80) ), orml_xtokens::Error::::NotSupportedMultiLocation, ); @@ -2495,11 +2502,11 @@ fn filtered_multilocation_should_not_work() { ParaA::execute_with(|| { assert_noop!( parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), 100, Box::new(VersionedMultiLocation::V1(parents_as_2_relay_dest)), - 80 + xcm_simulator::Limited(80) ), orml_xtokens::Error::::NotSupportedMultiLocation, ); @@ -2519,11 +2526,11 @@ fn filtered_multilocation_should_not_work() { ParaA::execute_with(|| { assert_noop!( parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), 100, Box::new(VersionedMultiLocation::V1(parents_as_2_dest)), - 80 + xcm_simulator::Limited(80) ), orml_xtokens::Error::::NotSupportedMultiLocation, ); @@ -2537,11 +2544,11 @@ fn filtered_multilocation_should_not_work() { ParaA::execute_with(|| { assert_noop!( parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), 100, Box::new(VersionedMultiLocation::V1(here_dest)), - 80 + xcm_simulator::Limited(80) ), orml_xtokens::Error::::NotSupportedMultiLocation, ); @@ -2557,11 +2564,11 @@ fn filtered_multilocation_should_not_work() { }; ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), 100, Box::new(VersionedMultiLocation::V1(relay_dest)), - 80 + xcm_simulator::Limited(80) )); }); @@ -2578,11 +2585,11 @@ fn filtered_multilocation_should_not_work() { }; ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( - parachain::Origin::signed(ALICE), + parachain::RuntimeOrigin::signed(ALICE), parachain::CurrencyId::MantaCurrency(a_asset_id_on_a), 100, Box::new(VersionedMultiLocation::V1(sibling_chain_dest)), - 80 + xcm_simulator::Limited(80) )); }); } @@ -2648,7 +2655,7 @@ fn less_than_min_xcm_fee_should_not_work() { // Initialize some tokens for alice assert_ok!(ParaA::execute_with(|| { parachain::Assets::mint( - parachain::Origin::signed(parachain::AssetManager::account_id()), + parachain::RuntimeOrigin::signed(parachain::AssetManager::account_id()), b_asset_id_on_a, ALICE, 1000, @@ -2656,7 +2663,7 @@ fn less_than_min_xcm_fee_should_not_work() { })); assert_ok!(ParaA::execute_with(|| { parachain::Assets::mint( - parachain::Origin::signed(parachain::AssetManager::account_id()), + parachain::RuntimeOrigin::signed(parachain::AssetManager::account_id()), relay_asset_id_on_a, ALICE, 1000, @@ -2698,7 +2705,7 @@ fn less_than_min_xcm_fee_should_not_work() { ], 1, Box::new(VersionedMultiLocation::V1(dest.clone())), - 40, + xcm_simulator::Limited(40), ), orml_xtokens::Error::::MinXcmFeeNotDefined ); @@ -2708,7 +2715,7 @@ fn less_than_min_xcm_fee_should_not_work() { let min_xcm_fee = 40; ParaA::execute_with(|| { assert_ok!(AssetManager::set_min_xcm_fee( - parachain::Origin::root(), + parachain::RuntimeOrigin::root(), para_b_as_reserve_chain, min_xcm_fee, )); @@ -2731,7 +2738,7 @@ fn less_than_min_xcm_fee_should_not_work() { ], 1, Box::new(VersionedMultiLocation::V1(dest.clone())), - 40, + xcm_simulator::Limited(40), ), orml_xtokens::Error::::FeeNotEnough ); @@ -2753,7 +2760,7 @@ fn less_than_min_xcm_fee_should_not_work() { ], 1, Box::new(VersionedMultiLocation::V1(dest.clone())), - 40, + xcm_simulator::Limited(40), )); }); } @@ -2822,7 +2829,7 @@ fn transfer_multicurrencies_should_work_scenarios() { // Initialize some relay chain tokens for alice assert_ok!(ParaA::execute_with(|| { parachain::Assets::mint( - parachain::Origin::signed(parachain::AssetManager::account_id()), + parachain::RuntimeOrigin::signed(parachain::AssetManager::account_id()), relay_asset_id_on_a, ALICE, relay_asset_amount_minted_on_a, @@ -2848,7 +2855,7 @@ fn transfer_multicurrencies_should_work_scenarios() { parachain::CurrencyId::MantaCurrency(b_asset_id_on_b), amount_to_a, Box::new(VersionedMultiLocation::V1(dest.clone())), - ADVERTISED_DEST_WEIGHT, + xcm_simulator::Limited(ADVERTISED_DEST_WEIGHT), )); }); @@ -2869,7 +2876,7 @@ fn transfer_multicurrencies_should_work_scenarios() { // Send some ParaB tokens from Alice on A back to Alice on B ParaA::execute_with(|| { assert_ok!(AssetManager::set_min_xcm_fee( - parachain::Origin::root(), + parachain::RuntimeOrigin::root(), para_b_source_location, min_xcm_fee, )); @@ -2888,7 +2895,7 @@ fn transfer_multicurrencies_should_work_scenarios() { ], 1, Box::new(VersionedMultiLocation::V1(dest.clone())), - ADVERTISED_DEST_WEIGHT, + xcm_simulator::Limited(ADVERTISED_DEST_WEIGHT), )); assert_eq!( @@ -3048,7 +3055,7 @@ fn transfer_multicurrencies_should_fail_scenarios() { let amount = 1000; assert_ok!(ParaA::execute_with(|| { parachain::Assets::mint( - parachain::Origin::signed(parachain::AssetManager::account_id()), + parachain::RuntimeOrigin::signed(parachain::AssetManager::account_id()), relay_asset_id_on_a, ALICE, amount, @@ -3071,7 +3078,7 @@ fn transfer_multicurrencies_should_fail_scenarios() { parachain::CurrencyId::MantaCurrency(c_asset_id_on_c), amount, Box::new(VersionedMultiLocation::V1(dest.clone())), - ADVERTISED_DEST_WEIGHT, + xcm_simulator::Limited(ADVERTISED_DEST_WEIGHT), )); }); ParaB::execute_with(|| { @@ -3080,7 +3087,7 @@ fn transfer_multicurrencies_should_fail_scenarios() { parachain::CurrencyId::MantaCurrency(b_asset_id_on_b), amount, Box::new(VersionedMultiLocation::V1(dest)), - ADVERTISED_DEST_WEIGHT, + xcm_simulator::Limited(ADVERTISED_DEST_WEIGHT), )); }); @@ -3101,12 +3108,12 @@ fn transfer_multicurrencies_should_fail_scenarios() { let min_xcm_fee = 10; ParaA::execute_with(|| { assert_ok!(AssetManager::set_min_xcm_fee( - parachain::Origin::root(), + parachain::RuntimeOrigin::root(), para_b_source_location.clone(), min_xcm_fee, )); assert_ok!(AssetManager::set_min_xcm_fee( - parachain::Origin::root(), + parachain::RuntimeOrigin::root(), para_c_source_location, min_xcm_fee, )); @@ -3130,7 +3137,7 @@ fn transfer_multicurrencies_should_fail_scenarios() { ], 2, Box::new(VersionedMultiLocation::V1(dest.clone())), - ADVERTISED_DEST_WEIGHT, + xcm_simulator::Limited(ADVERTISED_DEST_WEIGHT), ), // Assets and fee must have the same reserve orml_xtokens::Error::::DistinctReserveForAssetAndFee @@ -3159,7 +3166,7 @@ fn transfer_multicurrencies_should_fail_scenarios() { ], 2, Box::new(VersionedMultiLocation::V1(dest.clone())), - ADVERTISED_DEST_WEIGHT, + xcm_simulator::Limited(ADVERTISED_DEST_WEIGHT), ), // MaxAssetsForTransfer is set to 3 in the mock orml_xtokens::Error::::TooManyAssetsBeingSent @@ -3180,7 +3187,7 @@ fn transfer_multicurrencies_should_fail_scenarios() { ], 2, Box::new(VersionedMultiLocation::V1(dest.clone())), - ADVERTISED_DEST_WEIGHT, + xcm_simulator::Limited(ADVERTISED_DEST_WEIGHT), ), orml_xtokens::Error::::AssetIndexNonExistent ); @@ -3197,7 +3204,7 @@ fn transfer_multicurrencies_should_fail_scenarios() { ], 1, Box::new(VersionedMultiLocation::V1(dest.clone())), - ADVERTISED_DEST_WEIGHT, + xcm_simulator::Limited(ADVERTISED_DEST_WEIGHT), ), // 0 fees should not work orml_xtokens::Error::::ZeroAmount @@ -3215,7 +3222,7 @@ fn transfer_multicurrencies_should_fail_scenarios() { ], 1, Box::new(VersionedMultiLocation::V1(dest.clone())), - ADVERTISED_DEST_WEIGHT, + xcm_simulator::Limited(ADVERTISED_DEST_WEIGHT), ), // 0 assets should not work orml_xtokens::Error::::ZeroAmount @@ -3230,7 +3237,7 @@ fn transfer_multicurrencies_should_fail_scenarios() { // Setup to succeed on the sender side, but fail on the receiver side due to not enough fees. ParaA::execute_with(|| { assert_ok!(AssetManager::set_min_xcm_fee( - parachain::Origin::root(), + parachain::RuntimeOrigin::root(), para_b_source_location, min_xcm_fee, )); @@ -3255,7 +3262,7 @@ fn transfer_multicurrencies_should_fail_scenarios() { ], 1, Box::new(VersionedMultiLocation::V1(dest.clone())), - ADVERTISED_DEST_WEIGHT, + xcm_simulator::Limited(ADVERTISED_DEST_WEIGHT), )); assert_eq!( @@ -3315,13 +3322,13 @@ fn transfer_multicurrencies_should_fail_scenarios() { #[test] fn test_receiver_side_weight() { let weight = ::Weigher::weight( - &mut self_reserve_xcm_message_receiver_side::(), + &mut self_reserve_xcm_message_receiver_side::(), ) .unwrap(); assert!(weight <= ADVERTISED_DEST_WEIGHT); let weight = ::Weigher::weight( - &mut to_reserve_xcm_message_receiver_side::(), + &mut to_reserve_xcm_message_receiver_side::(), ) .unwrap(); assert!(weight <= ADVERTISED_DEST_WEIGHT); @@ -3329,12 +3336,12 @@ fn test_receiver_side_weight() { #[test] fn test_sender_side_xcm_weight() { - let mut msg = self_reserve_xcm_message_sender_side::(); + let mut msg = self_reserve_xcm_message_sender_side::(); let weight = ::Weigher::weight(&mut msg).unwrap(); assert!(weight < ADVERTISED_DEST_WEIGHT); - let mut msg = to_reserve_xcm_message_sender_side::(); + let mut msg = to_reserve_xcm_message_sender_side::(); let weight = ::Weigher::weight(&mut msg).unwrap(); assert!(weight < ADVERTISED_DEST_WEIGHT); diff --git a/tests/manta_pay.ts b/tests/manta_pay.ts index 625731220..b0270bcc3 100644 --- a/tests/manta_pay.ts +++ b/tests/manta_pay.ts @@ -65,7 +65,7 @@ function next_checkpoint( function generate_batched_utxos(per_shard_amount: number, checkpoint: Array){ const data = []; for(let shard_idx = 0; shard_idx < manta_pay_config.shard_number; ++ shard_idx) { - for(let utxo_idx = checkpoint[shard_idx]; utxo_idx < checkpoint[shard_idx] + per_shard_amount; ++ utxo_idx) { + for(let utxo_idx = checkpoint[shard_idx]; utxo_idx < checkpoint[shard_idx] + per_shard_amount; ++ utxo_idx) { const shards_storage_key = double_map_storage_key( "MantaPay", "Shards", shard_idx, 8, HashType.TwoxConcat, utxo_idx, 64, HashType.TwoxConcat); const value_str = u8aToHex(generate_shards_entry(shard_idx, utxo_idx)); @@ -106,7 +106,7 @@ async function insert_utxos_in_batches( const {data, checkpoint} = generate_batched_utxos(per_shard_amount, cur_checkpoint); cur_checkpoint = checkpoint; const callData = api.tx.system.setStorage(data); - execute_with_root_via_governance(api, keyring, callData, referendumIndexObject); + await execute_with_root_via_governance(api, keyring, callData, referendumIndexObject); await delay(5000); } @@ -163,7 +163,7 @@ async function insert_void_numbers_in_batch( console.log("start vn batch %i", batch_idx); const data = generate_vn_insertion_data(sender_idx, amount_per_batch); const callData = api.tx.system.setStorage(data); - execute_with_root_via_governance(api, keyring, callData, referendumIndexObject); + await execute_with_root_via_governance(api, keyring, callData, referendumIndexObject); sender_idx += amount_per_batch; await delay(5000); } @@ -233,9 +233,13 @@ export async function setup_storage( referendumIndexObject: any ) { const encodedCallData = extrinsicData.method.toHex(); - await api.tx.democracy.notePreimage(encodedCallData).signAndSend(keyring, {nonce: -1}); + await api.tx.preimage.notePreimage(encodedCallData).signAndSend(keyring, {nonce: -1}); let encodedCallDataHash = blake2AsHex(encodedCallData); - let externalProposeDefault = await api.tx.democracy.externalProposeDefault(encodedCallDataHash); + let externalProposeDefault = await api.tx.democracy.externalProposeDefault({ + Legacy: { + hash: encodedCallDataHash + } + }); const encodedExternalProposeDefault = externalProposeDefault.method.toHex(); await api.tx.council.propose(1, encodedExternalProposeDefault, encodedExternalProposeDefault.length).signAndSend(keyring, {nonce: -1}); let fastTrackCall = await api.tx.democracy.fastTrack(encodedCallDataHash, 1, 1); diff --git a/tests/package.json b/tests/package.json index 74f2d002b..83be317a9 100644 --- a/tests/package.json +++ b/tests/package.json @@ -14,8 +14,8 @@ "author": "", "license": "ISC", "dependencies": { - "@polkadot/api": "^7.15.1", - "@polkadot/types": "^7.15.1", + "@polkadot/api": "^9.14.2", + "@polkadot/types": "^9.14.2", "@types/minimist": "^1.2.2", "@types/yargs": "^17.0.0", "minimist": "^1.2.5", diff --git a/tests/yarn.lock b/tests/yarn.lock index 232f18043..3835c8658 100644 --- a/tests/yarn.lock +++ b/tests/yarn.lock @@ -2,12 +2,12 @@ # yarn lockfile v1 -"@babel/runtime@^7.17.8": - version "7.18.3" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.3.tgz#c7b654b57f6f63cf7f8b418ac9ca04408c4579f4" - integrity sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug== +"@babel/runtime@^7.20.13", "@babel/runtime@^7.20.6": + version "7.21.0" + resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz#5b55c9d394e5fcf304909a8b00c07dc217b56673" + integrity sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw== dependencies: - regenerator-runtime "^0.13.4" + regenerator-runtime "^0.13.11" "@cspotcode/source-map-support@^0.8.0": version "0.8.1" @@ -63,15 +63,15 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@noble/hashes@1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.0.0.tgz#d5e38bfbdaba174805a4e649f13be9a9ed3351ae" - integrity sha512-DZVbtY62kc3kkBtMHqwCOfXrT/hnoORy5BJ4+HU1IR59X0KWAOqsfzQPcUl/lQLlG7qXbe/fZ3r/emxtAl+sqg== +"@noble/hashes@1.2.0": + version "1.2.0" + resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz#a3150eeb09cc7ab207ebf6d7b9ad311a9bdbed12" + integrity sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ== -"@noble/secp256k1@1.5.5": - version "1.5.5" - resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.5.5.tgz#315ab5745509d1a8c8e90d0bdf59823ccf9bcfc3" - integrity sha512-sZ1W6gQzYnu45wPrWx8D3kwI2/U29VYTx9OjbDAd7jwRItJ0cSTMPRL/C8AWZFn9kWFLQGqEXVEE86w4Z8LpIQ== +"@noble/secp256k1@1.7.1": + version "1.7.1" + resolved "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" + integrity sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -94,335 +94,363 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@polkadot/api-augment@7.15.1": - version "7.15.1" - resolved "https://registry.yarnpkg.com/@polkadot/api-augment/-/api-augment-7.15.1.tgz#120b766feeaa96996f1c6717a5261c2e0845c1e0" - integrity sha512-7csQLS6zuYuGq7W1EkTBz1ZmxyRvx/Qpz7E7zPSwxmY8Whb7Yn2effU9XF0eCcRpyfSW8LodF8wMmLxGYs1OaQ== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/api-base" "7.15.1" - "@polkadot/rpc-augment" "7.15.1" - "@polkadot/types" "7.15.1" - "@polkadot/types-augment" "7.15.1" - "@polkadot/types-codec" "7.15.1" - "@polkadot/util" "^8.7.1" - -"@polkadot/api-base@7.15.1": - version "7.15.1" - resolved "https://registry.yarnpkg.com/@polkadot/api-base/-/api-base-7.15.1.tgz#7567595be68431cc4085c48b18ba66933ff7b4d9" - integrity sha512-UlhLdljJPDwGpm5FxOjvJNFTxXMRFaMuVNx6EklbuetbBEJ/Amihhtj0EJRodxQwtZ4ZtPKYKt+g+Dn7OJJh4g== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/rpc-core" "7.15.1" - "@polkadot/types" "7.15.1" - "@polkadot/util" "^8.7.1" - rxjs "^7.5.5" - -"@polkadot/api-derive@7.15.1": - version "7.15.1" - resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-7.15.1.tgz#450542bb7d848013225d6c8480648340e5ee6a61" - integrity sha512-CsOQppksQBaa34L1fWRzmfQQpoEBwfH0yTTQxgj3h7rFYGVPxEKGeFjo1+IgI2vXXvOO73Z8E4H/MnbxvKrs1Q== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/api" "7.15.1" - "@polkadot/api-augment" "7.15.1" - "@polkadot/api-base" "7.15.1" - "@polkadot/rpc-core" "7.15.1" - "@polkadot/types" "7.15.1" - "@polkadot/types-codec" "7.15.1" - "@polkadot/util" "^8.7.1" - "@polkadot/util-crypto" "^8.7.1" - rxjs "^7.5.5" - -"@polkadot/api@7.15.1", "@polkadot/api@^7.15.1": - version "7.15.1" - resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-7.15.1.tgz#24eaeaa8ffbc6f30ff3d9846a816a18a688ceb8b" - integrity sha512-z0z6+k8+R9ixRMWzfsYrNDnqSV5zHKmyhTCL0I7+1I081V18MJTCFUKubrh0t1gD0/FCt3U9Ibvr4IbtukYLrQ== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/api-augment" "7.15.1" - "@polkadot/api-base" "7.15.1" - "@polkadot/api-derive" "7.15.1" - "@polkadot/keyring" "^8.7.1" - "@polkadot/rpc-augment" "7.15.1" - "@polkadot/rpc-core" "7.15.1" - "@polkadot/rpc-provider" "7.15.1" - "@polkadot/types" "7.15.1" - "@polkadot/types-augment" "7.15.1" - "@polkadot/types-codec" "7.15.1" - "@polkadot/types-create" "7.15.1" - "@polkadot/types-known" "7.15.1" - "@polkadot/util" "^8.7.1" - "@polkadot/util-crypto" "^8.7.1" - eventemitter3 "^4.0.7" - rxjs "^7.5.5" - -"@polkadot/keyring@^8.7.1": - version "8.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-8.7.1.tgz#07cf6d6ee351dcf70fbf965b1d6d96c5025ae1b8" - integrity sha512-t6ZgQVC+nQT7XwbWtEhkDpiAzxKVJw8Xd/gWdww6xIrawHu7jo3SGB4QNdPgkf8TvDHYAAJiupzVQYAlOIq3GA== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/util" "8.7.1" - "@polkadot/util-crypto" "8.7.1" - -"@polkadot/networks@8.7.1", "@polkadot/networks@^8.7.1": - version "8.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-8.7.1.tgz#26c2ec6158c985bb77c510d98a3ab1c7e049f89c" - integrity sha512-8xAmhDW0ry5EKcEjp6VTuwoTm0DdDo/zHsmx88P6sVL87gupuFsL+B6TrsYLl8GcaqxujwrOlKB+CKTUg7qFKg== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/util" "8.7.1" - "@substrate/ss58-registry" "^1.17.0" - -"@polkadot/rpc-augment@7.15.1": - version "7.15.1" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-7.15.1.tgz#391a42a9c3e553335a2a544598a717b47654ad6e" - integrity sha512-sK0+mphN7nGz/eNPsshVi0qd0+N0Pqxuebwc1YkUGP0f9EkDxzSGp6UjGcSwWVaAtk9WZZ1MpK1Jwb/2GrKV7Q== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/rpc-core" "7.15.1" - "@polkadot/types" "7.15.1" - "@polkadot/types-codec" "7.15.1" - "@polkadot/util" "^8.7.1" - -"@polkadot/rpc-core@7.15.1": - version "7.15.1" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-7.15.1.tgz#47855cf05bd2f8dbf87d9f1f77343114e61c664a" - integrity sha512-4Sb0e0PWmarCOizzxQAE1NQSr5z0n+hdkrq3+aPohGu9Rh4PodG+OWeIBy7Ov/3GgdhNQyBLG+RiVtliXecM3g== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/rpc-augment" "7.15.1" - "@polkadot/rpc-provider" "7.15.1" - "@polkadot/types" "7.15.1" - "@polkadot/util" "^8.7.1" - rxjs "^7.5.5" - -"@polkadot/rpc-provider@7.15.1": - version "7.15.1" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-7.15.1.tgz#a213de907a6f4f480c3c819aa95e4e60d4247f84" - integrity sha512-n0RWfSaD/r90JXeJkKry1aGZwJeBUUiMpXUQ9Uvp6DYBbYEDs0fKtWLpdT3PdFrMbe5y3kwQmNLxwe6iF4+mzg== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/keyring" "^8.7.1" - "@polkadot/types" "7.15.1" - "@polkadot/types-support" "7.15.1" - "@polkadot/util" "^8.7.1" - "@polkadot/util-crypto" "^8.7.1" - "@polkadot/x-fetch" "^8.7.1" - "@polkadot/x-global" "^8.7.1" - "@polkadot/x-ws" "^8.7.1" - "@substrate/connect" "0.7.0-alpha.0" - eventemitter3 "^4.0.7" - mock-socket "^9.1.2" - nock "^13.2.4" - -"@polkadot/types-augment@7.15.1": - version "7.15.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-7.15.1.tgz#437047f961b8d29e5ffd4fd59cd35f0e6374750b" - integrity sha512-aqm7xT/66TCna0I2utpIekoquKo0K5pnkA/7WDzZ6gyD8he2h0IXfe8xWjVmuyhjxrT/C/7X1aUF2Z0xlOCwzQ== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/types" "7.15.1" - "@polkadot/types-codec" "7.15.1" - "@polkadot/util" "^8.7.1" - -"@polkadot/types-codec@7.15.1": - version "7.15.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-7.15.1.tgz#c0155867efd3ae35e15fea6a8aab49c2c63988fa" - integrity sha512-nI11dT7FGaeDd/fKPD8iJRFGhosOJoyjhZ0gLFFDlKCaD3AcGBRTTY8HFJpP/5QXXhZzfZsD93fVKrosnegU0Q== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/util" "^8.7.1" - -"@polkadot/types-create@7.15.1": - version "7.15.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-7.15.1.tgz#ec4cafa314a82a25a109f0f52207e9169fc9b003" - integrity sha512-+HiaHn7XOwP0kv/rVdORlVkNuMoxuvt+jd67A/CeEreJiXqRLu+S61Mdk7wi6719PTaOal1hTDFfyGrtUd8FSQ== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/types-codec" "7.15.1" - "@polkadot/util" "^8.7.1" - -"@polkadot/types-known@7.15.1": - version "7.15.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-7.15.1.tgz#71dbf0835a48cdc97d0f50b0000298687e29818d" - integrity sha512-LMcNP0CxT84DqAKV62/qDeeIVIJCR5yzE9b+9AsYhyfhE4apwxjrThqZA7K0CF56bOdQJSexAerYB/jwk2IijA== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/networks" "^8.7.1" - "@polkadot/types" "7.15.1" - "@polkadot/types-codec" "7.15.1" - "@polkadot/types-create" "7.15.1" - "@polkadot/util" "^8.7.1" - -"@polkadot/types-support@7.15.1": - version "7.15.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-7.15.1.tgz#9c274759647dd89d46ea9cf74d593bcedcd85527" - integrity sha512-FIK251ffVo+NaUXLlaJeB5OvT7idDd3uxaoBM6IwsS87rzt2CcWMyCbu0uX89AHZUhSviVx7xaBxfkGEqMePWA== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/util" "^8.7.1" - -"@polkadot/types@7.15.1", "@polkadot/types@^7.15.1": - version "7.15.1" - resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-7.15.1.tgz#fb78886f4437fbc472e01019846fb1f229d2a177" - integrity sha512-KawZVS+eLR1D6O7c/P5cSUwr6biM9Qd2KwKtJIO8l1Mrxp7r+y2tQnXSSXVAd6XPdb3wVMhnIID+NW3W99TAnQ== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/keyring" "^8.7.1" - "@polkadot/types-augment" "7.15.1" - "@polkadot/types-codec" "7.15.1" - "@polkadot/types-create" "7.15.1" - "@polkadot/util" "^8.7.1" - "@polkadot/util-crypto" "^8.7.1" - rxjs "^7.5.5" - -"@polkadot/util-crypto@8.7.1", "@polkadot/util-crypto@^8.7.1": - version "8.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-8.7.1.tgz#f9fcca2895b5f160ce1c2faa0aa3054cc7aa4655" - integrity sha512-TaSuJ2aNrB5sYK7YXszkEv24nYJKRFqjF2OrggoMg6uYxUAECvTkldFnhtgeizMweRMxJIBu6bMHlSIutbWgjw== - dependencies: - "@babel/runtime" "^7.17.8" - "@noble/hashes" "1.0.0" - "@noble/secp256k1" "1.5.5" - "@polkadot/networks" "8.7.1" - "@polkadot/util" "8.7.1" - "@polkadot/wasm-crypto" "^5.1.1" - "@polkadot/x-bigint" "8.7.1" - "@polkadot/x-randomvalues" "8.7.1" - "@scure/base" "1.0.0" +"@polkadot/api-augment@9.14.2": + version "9.14.2" + resolved "https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-9.14.2.tgz#2c49cdcfdf7057523db1dc8d7b0801391a8a2e69" + integrity sha512-19MmW8AHEcLkdcUIo3LLk0eCQgREWqNSxkUyOeWn7UiNMY1AhDOOwMStUBNCvrIDK6VL6GGc1sY7rkPCLMuKSw== + dependencies: + "@babel/runtime" "^7.20.13" + "@polkadot/api-base" "9.14.2" + "@polkadot/rpc-augment" "9.14.2" + "@polkadot/types" "9.14.2" + "@polkadot/types-augment" "9.14.2" + "@polkadot/types-codec" "9.14.2" + "@polkadot/util" "^10.4.2" + +"@polkadot/api-base@9.14.2": + version "9.14.2" + resolved "https://registry.npmjs.org/@polkadot/api-base/-/api-base-9.14.2.tgz#605b44e3692a125bd8d97eed9cea8af9d0c454e2" + integrity sha512-ky9fmzG1Tnrjr/SBZ0aBB21l0TFr+CIyQenQczoUyVgiuxVaI/2Bp6R2SFrHhG28P+PW2/RcYhn2oIAR2Z2fZQ== + dependencies: + "@babel/runtime" "^7.20.13" + "@polkadot/rpc-core" "9.14.2" + "@polkadot/types" "9.14.2" + "@polkadot/util" "^10.4.2" + rxjs "^7.8.0" + +"@polkadot/api-derive@9.14.2": + version "9.14.2" + resolved "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-9.14.2.tgz#e8fcd4ee3f2b80b9fe34d4dec96169c3bdb4214d" + integrity sha512-yw9OXucmeggmFqBTMgza0uZwhNjPxS7MaT7lSCUIRKckl1GejdV+qMhL3XFxPFeYzXwzFpdPG11zWf+qJlalqw== + dependencies: + "@babel/runtime" "^7.20.13" + "@polkadot/api" "9.14.2" + "@polkadot/api-augment" "9.14.2" + "@polkadot/api-base" "9.14.2" + "@polkadot/rpc-core" "9.14.2" + "@polkadot/types" "9.14.2" + "@polkadot/types-codec" "9.14.2" + "@polkadot/util" "^10.4.2" + "@polkadot/util-crypto" "^10.4.2" + rxjs "^7.8.0" + +"@polkadot/api@9.14.2", "@polkadot/api@^9.14.2": + version "9.14.2" + resolved "https://registry.npmjs.org/@polkadot/api/-/api-9.14.2.tgz#d5cee02236654c6063d7c4b70c78c290db5aba8d" + integrity sha512-R3eYFj2JgY1zRb+OCYQxNlJXCs2FA+AU4uIEiVcXnVLmR3M55tkRNEwYAZmiFxx0pQmegGgPMc33q7TWGdw24A== + dependencies: + "@babel/runtime" "^7.20.13" + "@polkadot/api-augment" "9.14.2" + "@polkadot/api-base" "9.14.2" + "@polkadot/api-derive" "9.14.2" + "@polkadot/keyring" "^10.4.2" + "@polkadot/rpc-augment" "9.14.2" + "@polkadot/rpc-core" "9.14.2" + "@polkadot/rpc-provider" "9.14.2" + "@polkadot/types" "9.14.2" + "@polkadot/types-augment" "9.14.2" + "@polkadot/types-codec" "9.14.2" + "@polkadot/types-create" "9.14.2" + "@polkadot/types-known" "9.14.2" + "@polkadot/util" "^10.4.2" + "@polkadot/util-crypto" "^10.4.2" + eventemitter3 "^5.0.0" + rxjs "^7.8.0" + +"@polkadot/keyring@^10.4.2": + version "10.4.2" + resolved "https://registry.npmjs.org/@polkadot/keyring/-/keyring-10.4.2.tgz#793377fdb9076df0af771df11388faa6be03c70d" + integrity sha512-7iHhJuXaHrRTG6cJDbZE9G+c1ts1dujp0qbO4RfAPmT7YUvphHvAtCKueN9UKPz5+TYDL+rP/jDEaSKU8jl/qQ== + dependencies: + "@babel/runtime" "^7.20.13" + "@polkadot/util" "10.4.2" + "@polkadot/util-crypto" "10.4.2" + +"@polkadot/networks@10.4.2", "@polkadot/networks@^10.4.2": + version "10.4.2" + resolved "https://registry.npmjs.org/@polkadot/networks/-/networks-10.4.2.tgz#d7878c6aad8173c800a21140bfe5459261724456" + integrity sha512-FAh/znrEvWBiA/LbcT5GXHsCFUl//y9KqxLghSr/CreAmAergiJNT0MVUezC7Y36nkATgmsr4ylFwIxhVtuuCw== + dependencies: + "@babel/runtime" "^7.20.13" + "@polkadot/util" "10.4.2" + "@substrate/ss58-registry" "^1.38.0" + +"@polkadot/rpc-augment@9.14.2": + version "9.14.2" + resolved "https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-9.14.2.tgz#eb70d5511463dab8d995faeb77d4edfe4952fe26" + integrity sha512-mOubRm3qbKZTbP9H01XRrfTk7k5it9WyzaWAg72DJBQBYdgPUUkGSgpPD/Srkk5/5GAQTWVWL1I2UIBKJ4TJjQ== + dependencies: + "@babel/runtime" "^7.20.13" + "@polkadot/rpc-core" "9.14.2" + "@polkadot/types" "9.14.2" + "@polkadot/types-codec" "9.14.2" + "@polkadot/util" "^10.4.2" + +"@polkadot/rpc-core@9.14.2": + version "9.14.2" + resolved "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-9.14.2.tgz#26d4f00ac7abbf880f8280e9b96235880d35794b" + integrity sha512-krA/mtQ5t9nUQEsEVC1sjkttLuzN6z6gyJxK2IlpMS3S5ncy/R6w4FOpy+Q0H18Dn83JBo0p7ZtY7Y6XkK48Kw== + dependencies: + "@babel/runtime" "^7.20.13" + "@polkadot/rpc-augment" "9.14.2" + "@polkadot/rpc-provider" "9.14.2" + "@polkadot/types" "9.14.2" + "@polkadot/util" "^10.4.2" + rxjs "^7.8.0" + +"@polkadot/rpc-provider@9.14.2": + version "9.14.2" + resolved "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-9.14.2.tgz#0dea667f3a03bf530f202cba5cd360df19b32e30" + integrity sha512-YTSywjD5PF01V47Ru5tln2LlpUwJiSOdz6rlJXPpMaY53hUp7+xMU01FVAQ1bllSBNisSD1Msv/mYHq84Oai2g== + dependencies: + "@babel/runtime" "^7.20.13" + "@polkadot/keyring" "^10.4.2" + "@polkadot/types" "9.14.2" + "@polkadot/types-support" "9.14.2" + "@polkadot/util" "^10.4.2" + "@polkadot/util-crypto" "^10.4.2" + "@polkadot/x-fetch" "^10.4.2" + "@polkadot/x-global" "^10.4.2" + "@polkadot/x-ws" "^10.4.2" + eventemitter3 "^5.0.0" + mock-socket "^9.2.1" + nock "^13.3.0" + optionalDependencies: + "@substrate/connect" "0.7.19" + +"@polkadot/types-augment@9.14.2": + version "9.14.2" + resolved "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-9.14.2.tgz#1a478e18e713b04038f3e171287ee5abe908f0aa" + integrity sha512-WO9d7RJufUeY3iFgt2Wz762kOu1tjEiGBR5TT4AHtpEchVHUeosVTrN9eycC+BhleqYu52CocKz6u3qCT/jKLg== + dependencies: + "@babel/runtime" "^7.20.13" + "@polkadot/types" "9.14.2" + "@polkadot/types-codec" "9.14.2" + "@polkadot/util" "^10.4.2" + +"@polkadot/types-codec@9.14.2": + version "9.14.2" + resolved "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-9.14.2.tgz#d625c80495d7a68237b3d5c0a60ff10d206131fa" + integrity sha512-AJ4XF7W1no4PENLBRU955V6gDxJw0h++EN3YoDgThozZ0sj3OxyFupKgNBZcZb2V23H8JxQozzIad8k+nJbO1w== + dependencies: + "@babel/runtime" "^7.20.13" + "@polkadot/util" "^10.4.2" + "@polkadot/x-bigint" "^10.4.2" + +"@polkadot/types-create@9.14.2": + version "9.14.2" + resolved "https://registry.npmjs.org/@polkadot/types-create/-/types-create-9.14.2.tgz#aec515a2d3bc7e7b7802095cdd35ece48dc442bc" + integrity sha512-nSnKpBierlmGBQT8r6/SHf6uamBIzk4WmdMsAsR4uJKJF1PtbIqx2W5PY91xWSiMSNMzjkbCppHkwaDAMwLGaw== + dependencies: + "@babel/runtime" "^7.20.13" + "@polkadot/types-codec" "9.14.2" + "@polkadot/util" "^10.4.2" + +"@polkadot/types-known@9.14.2": + version "9.14.2" + resolved "https://registry.npmjs.org/@polkadot/types-known/-/types-known-9.14.2.tgz#17fe5034a5b907bd006093a687f112b07edadf10" + integrity sha512-iM8WOCgguzJ3TLMqlm4K1gKQEwWm2zxEKT1HZZ1irs/lAbBk9MquDWDvebryiw3XsLB8xgrp3RTIBn2Q4FjB2A== + dependencies: + "@babel/runtime" "^7.20.13" + "@polkadot/networks" "^10.4.2" + "@polkadot/types" "9.14.2" + "@polkadot/types-codec" "9.14.2" + "@polkadot/types-create" "9.14.2" + "@polkadot/util" "^10.4.2" + +"@polkadot/types-support@9.14.2": + version "9.14.2" + resolved "https://registry.npmjs.org/@polkadot/types-support/-/types-support-9.14.2.tgz#d25e8d4e5ec3deef914cb55fc8bc5448431ddd18" + integrity sha512-VWCOPgXDK3XtXT7wMLyIWeNDZxUbNcw/8Pn6n6vMogs7o/n4h6WGbGMeTIQhPWyn831/RmkVs5+2DUC+2LlOhw== + dependencies: + "@babel/runtime" "^7.20.13" + "@polkadot/util" "^10.4.2" + +"@polkadot/types@9.14.2", "@polkadot/types@^9.14.2": + version "9.14.2" + resolved "https://registry.npmjs.org/@polkadot/types/-/types-9.14.2.tgz#5105f41eb9e8ea29938188d21497cbf1753268b8" + integrity sha512-hGLddTiJbvowhhUZJ3k+olmmBc1KAjWIQxujIUIYASih8FQ3/YJDKxaofGOzh0VygOKW3jxQBN2VZPofyDP9KQ== + dependencies: + "@babel/runtime" "^7.20.13" + "@polkadot/keyring" "^10.4.2" + "@polkadot/types-augment" "9.14.2" + "@polkadot/types-codec" "9.14.2" + "@polkadot/types-create" "9.14.2" + "@polkadot/util" "^10.4.2" + "@polkadot/util-crypto" "^10.4.2" + rxjs "^7.8.0" + +"@polkadot/util-crypto@10.4.2", "@polkadot/util-crypto@^10.4.2": + version "10.4.2" + resolved "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-10.4.2.tgz#871fb69c65768bd48c57bb5c1f76a85d979fb8b5" + integrity sha512-RxZvF7C4+EF3fzQv8hZOLrYCBq5+wA+2LWv98nECkroChY3C2ZZvyWDqn8+aonNULt4dCVTWDZM0QIY6y4LUAQ== + dependencies: + "@babel/runtime" "^7.20.13" + "@noble/hashes" "1.2.0" + "@noble/secp256k1" "1.7.1" + "@polkadot/networks" "10.4.2" + "@polkadot/util" "10.4.2" + "@polkadot/wasm-crypto" "^6.4.1" + "@polkadot/x-bigint" "10.4.2" + "@polkadot/x-randomvalues" "10.4.2" + "@scure/base" "1.1.1" ed2curve "^0.3.0" tweetnacl "^1.0.3" -"@polkadot/util@8.7.1", "@polkadot/util@^8.7.1": - version "8.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-8.7.1.tgz#27fe93bf7b8345276f10cfe9c0380510cd4584f6" - integrity sha512-XjY1bTo7V6OvOCe4yn8H2vifeuBciCy0gq0k5P1tlGUQLI/Yt0hvDmxcA0FEPtqg8CL+rYRG7WXGPVNjkrNvyQ== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/x-bigint" "8.7.1" - "@polkadot/x-global" "8.7.1" - "@polkadot/x-textdecoder" "8.7.1" - "@polkadot/x-textencoder" "8.7.1" - "@types/bn.js" "^5.1.0" - bn.js "^5.2.0" - ip-regex "^4.3.0" - -"@polkadot/wasm-crypto-asmjs@^5.1.1": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-5.1.1.tgz#6648e9c6f627501f61aef570e110022f2be1eff2" - integrity sha512-1WBwc2G3pZMKW1T01uXzKE30Sg22MXmF3RbbZiWWk3H2d/Er4jZQRpjumxO5YGWan+xOb7HQQdwnrUnrPgbDhg== +"@polkadot/util@10.4.2", "@polkadot/util@^10.4.2": + version "10.4.2" + resolved "https://registry.npmjs.org/@polkadot/util/-/util-10.4.2.tgz#df41805cb27f46b2b4dad24c371fa2a68761baa1" + integrity sha512-0r5MGICYiaCdWnx+7Axlpvzisy/bi1wZGXgCSw5+ZTyPTOqvsYRqM2X879yxvMsGfibxzWqNzaiVjToz1jvUaA== + dependencies: + "@babel/runtime" "^7.20.13" + "@polkadot/x-bigint" "10.4.2" + "@polkadot/x-global" "10.4.2" + "@polkadot/x-textdecoder" "10.4.2" + "@polkadot/x-textencoder" "10.4.2" + "@types/bn.js" "^5.1.1" + bn.js "^5.2.1" + +"@polkadot/wasm-bridge@6.4.1": + version "6.4.1" + resolved "https://registry.npmjs.org/@polkadot/wasm-bridge/-/wasm-bridge-6.4.1.tgz#e97915dd67ba543ec3381299c2a5b9330686e27e" + integrity sha512-QZDvz6dsUlbYsaMV5biZgZWkYH9BC5AfhT0f0/knv8+LrbAoQdP3Asbvddw8vyU9sbpuCHXrd4bDLBwUCRfrBQ== + dependencies: + "@babel/runtime" "^7.20.6" + +"@polkadot/wasm-crypto-asmjs@6.4.1": + version "6.4.1" + resolved "https://registry.npmjs.org/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-6.4.1.tgz#3cc76bbda5ea4a7a860982c64f9565907b312253" + integrity sha512-UxZTwuBZlnODGIQdCsE2Sn/jU0O2xrNQ/TkhRFELfkZXEXTNu4lw6NpaKq7Iey4L+wKd8h4lT3VPVkMcPBLOvA== + dependencies: + "@babel/runtime" "^7.20.6" + +"@polkadot/wasm-crypto-init@6.4.1": + version "6.4.1" + resolved "https://registry.npmjs.org/@polkadot/wasm-crypto-init/-/wasm-crypto-init-6.4.1.tgz#4d9ab0030db52cf177bf707ef8e77aa4ca721668" + integrity sha512-1ALagSi/nfkyFaH6JDYfy/QbicVbSn99K8PV9rctDUfxc7P06R7CoqbjGQ4OMPX6w1WYVPU7B4jPHGLYBlVuMw== + dependencies: + "@babel/runtime" "^7.20.6" + "@polkadot/wasm-bridge" "6.4.1" + "@polkadot/wasm-crypto-asmjs" "6.4.1" + "@polkadot/wasm-crypto-wasm" "6.4.1" + +"@polkadot/wasm-crypto-wasm@6.4.1": + version "6.4.1" + resolved "https://registry.npmjs.org/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-6.4.1.tgz#97180f80583b18f6a13c1054fa5f7e8da40b1028" + integrity sha512-3VV9ZGzh0ZY3SmkkSw+0TRXxIpiO0nB8lFwlRgcwaCihwrvLfRnH9GI8WE12mKsHVjWTEVR3ogzILJxccAUjDA== + dependencies: + "@babel/runtime" "^7.20.6" + "@polkadot/wasm-util" "6.4.1" + +"@polkadot/wasm-crypto@^6.4.1": + version "6.4.1" + resolved "https://registry.npmjs.org/@polkadot/wasm-crypto/-/wasm-crypto-6.4.1.tgz#79310e23ad1ca62362ba893db6a8567154c2536a" + integrity sha512-FH+dcDPdhSLJvwL0pMLtn/LIPd62QDPODZRCmDyw+pFjLOMaRBc7raomWUOqyRWJTnqVf/iscc2rLVLNMyt7ag== + dependencies: + "@babel/runtime" "^7.20.6" + "@polkadot/wasm-bridge" "6.4.1" + "@polkadot/wasm-crypto-asmjs" "6.4.1" + "@polkadot/wasm-crypto-init" "6.4.1" + "@polkadot/wasm-crypto-wasm" "6.4.1" + "@polkadot/wasm-util" "6.4.1" + +"@polkadot/wasm-util@6.4.1": + version "6.4.1" + resolved "https://registry.npmjs.org/@polkadot/wasm-util/-/wasm-util-6.4.1.tgz#74aecc85bec427a9225d9874685944ea3dc3ab76" + integrity sha512-Uwo+WpEsDmFExWC5kTNvsVhvqXMZEKf4gUHXFn4c6Xz4lmieRT5g+1bO1KJ21pl4msuIgdV3Bksfs/oiqMFqlw== + dependencies: + "@babel/runtime" "^7.20.6" + +"@polkadot/x-bigint@10.4.2", "@polkadot/x-bigint@^10.4.2": + version "10.4.2" + resolved "https://registry.npmjs.org/@polkadot/x-bigint/-/x-bigint-10.4.2.tgz#7eb2ec732259df48b5a00f07879a1331e05606ec" + integrity sha512-awRiox+/XSReLzimAU94fPldowiwnnMUkQJe8AebYhNocAj6SJU00GNoj6j6tAho6yleOwrTJXZaWFBaQVJQNg== + dependencies: + "@babel/runtime" "^7.20.13" + "@polkadot/x-global" "10.4.2" + +"@polkadot/x-fetch@^10.4.2": + version "10.4.2" + resolved "https://registry.npmjs.org/@polkadot/x-fetch/-/x-fetch-10.4.2.tgz#bc6ba70de71a252472fbe36180511ed920e05f05" + integrity sha512-Ubb64yaM4qwhogNP+4mZ3ibRghEg5UuCYRMNaCFoPgNAY8tQXuDKrHzeks3+frlmeH9YRd89o8wXLtWouwZIcw== + dependencies: + "@babel/runtime" "^7.20.13" + "@polkadot/x-global" "10.4.2" + "@types/node-fetch" "^2.6.2" + node-fetch "^3.3.0" + +"@polkadot/x-global@10.4.2", "@polkadot/x-global@^10.4.2": + version "10.4.2" + resolved "https://registry.npmjs.org/@polkadot/x-global/-/x-global-10.4.2.tgz#5662366e3deda0b4c8f024b2d902fa838f9e60a4" + integrity sha512-g6GXHD/ykZvHap3M6wh19dO70Zm43l4jEhlxf5LtTo5/0/UporFCXr2YJYZqfbn9JbQwl1AU+NroYio+vtJdiA== + dependencies: + "@babel/runtime" "^7.20.13" + +"@polkadot/x-randomvalues@10.4.2": + version "10.4.2" + resolved "https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-10.4.2.tgz#895f1220d5a4522a83d8d5014e3c1e03b129893e" + integrity sha512-mf1Wbpe7pRZHO0V3V89isPLqZOy5XGX2bCqsfUWHgb1NvV1MMx5TjVjdaYyNlGTiOkAmJKlOHshcfPU2sYWpNg== + dependencies: + "@babel/runtime" "^7.20.13" + "@polkadot/x-global" "10.4.2" + +"@polkadot/x-textdecoder@10.4.2": + version "10.4.2" + resolved "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-10.4.2.tgz#93202f3e5ad0e7f75a3fa02d2b8a3343091b341b" + integrity sha512-d3ADduOKUTU+cliz839+KCFmi23pxTlabH7qh7Vs1GZQvXOELWdqFOqakdiAjtMn68n1KVF4O14Y+OUm7gp/zA== + dependencies: + "@babel/runtime" "^7.20.13" + "@polkadot/x-global" "10.4.2" + +"@polkadot/x-textencoder@10.4.2": + version "10.4.2" + resolved "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-10.4.2.tgz#cd2e6c8a66b0b400a73f0164e99c510fb5c83501" + integrity sha512-mxcQuA1exnyv74Kasl5vxBq01QwckG088lYjc3KwmND6+pPrW2OWagbxFX5VFoDLDAE+UJtnUHsjdWyOTDhpQA== + dependencies: + "@babel/runtime" "^7.20.13" + "@polkadot/x-global" "10.4.2" + +"@polkadot/x-ws@^10.4.2": + version "10.4.2" + resolved "https://registry.npmjs.org/@polkadot/x-ws/-/x-ws-10.4.2.tgz#4e9d88f37717570ccf942c6f4f63b06260f45025" + integrity sha512-3gHSTXAWQu1EMcMVTF5QDKHhEHzKxhAArweEyDXE7VsgKUP/ixxw4hVZBrkX122iI5l5mjSiooRSnp/Zl3xqDQ== dependencies: - "@babel/runtime" "^7.17.8" - -"@polkadot/wasm-crypto-wasm@^5.1.1": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-5.1.1.tgz#dc371755a05fe93f87a2754a2bcf1ff42e4bb541" - integrity sha512-F9PZ30J2S8vUNl2oY7Myow5Xsx5z5uNVpnNlJwlmY8IXBvyucvyQ4HSdhJsrbs4W1BfFc0mHghxgp0FbBCnf/Q== - dependencies: - "@babel/runtime" "^7.17.8" - -"@polkadot/wasm-crypto@^5.1.1": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-5.1.1.tgz#d1f8a0da631028ba904c374c1e8496ab3ba4636b" - integrity sha512-JCcAVfH8DhYuEyd4oX1ouByxhou0TvpErKn8kHjtzt7+tRoFi0nzWlmK4z49vszsV3JJgXxV81i10C0BYlwTcQ== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/wasm-crypto-asmjs" "^5.1.1" - "@polkadot/wasm-crypto-wasm" "^5.1.1" - -"@polkadot/x-bigint@8.7.1": - version "8.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/x-bigint/-/x-bigint-8.7.1.tgz#a496225def32e98c430c76b91c1579f48acf501a" - integrity sha512-ClkhgdB/KqcAKk3zA6Qw8wBL6Wz67pYTPkrAtImpvoPJmR+l4RARauv+MH34JXMUNlNb3aUwqN6lq2Z1zN+mJg== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/x-global" "8.7.1" - -"@polkadot/x-fetch@^8.7.1": - version "8.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-8.7.1.tgz#dc866e7aa87c39b2e64c87f734b8fbaf1b9190e1" - integrity sha512-ygNparcalYFGbspXtdtZOHvNXZBkNgmNO+um9C0JYq74K5OY9/be93uyfJKJ8JcRJtOqBfVDsJpbiRkuJ1PRfg== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/x-global" "8.7.1" - "@types/node-fetch" "^2.6.1" - node-fetch "^2.6.7" - -"@polkadot/x-global@8.7.1", "@polkadot/x-global@^8.7.1": - version "8.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-8.7.1.tgz#b972044125a4fe059f4aef7c15a4e22d18179095" - integrity sha512-WOgUor16IihgNVdiTVGAWksYLUAlqjmODmIK1cuWrLOZtV1VBomWcb3obkO9sh5P6iWziAvCB/i+L0vnTN9ZCA== - dependencies: - "@babel/runtime" "^7.17.8" - -"@polkadot/x-randomvalues@8.7.1": - version "8.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-8.7.1.tgz#b7cc358c2a6d20f7e7798d45d1d5c7ac8c9ab4f2" - integrity sha512-njt17MlfN6yNyNEti7fL12lr5qM6A1aSGkWKVuqzc7XwSBesifJuW4km5u6r2gwhXjH2eHDv9SoQ7WXu8vrrkg== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/x-global" "8.7.1" - -"@polkadot/x-textdecoder@8.7.1": - version "8.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-8.7.1.tgz#b706ef98d5a033d02c633009fb8dab4a4f9d7d55" - integrity sha512-ia0Ie2zi4VdQdNVD2GE2FZzBMfX//hEL4w546RMJfZM2LqDS674LofHmcyrsv5zscLnnRyCxZC1+J2dt+6MDIA== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/x-global" "8.7.1" - -"@polkadot/x-textencoder@8.7.1": - version "8.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-8.7.1.tgz#7820e30081e8e0a607c1c27b9e3486d82d1a723e" - integrity sha512-XDO0A27Xy+eJCKSxENroB8Dcnl+UclGG4ZBei+P/BqZ9rsjskUyd2Vsl6peMXAcsxwOE7g0uTvujoGM8jpKOXw== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/x-global" "8.7.1" - -"@polkadot/x-ws@^8.7.1": - version "8.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-8.7.1.tgz#501c63c575e04bba68bdc32448e2c9b692f0411e" - integrity sha512-Mt0tcNzGXyKnN3DQ06alkv+JLtTfXWu6zSypFrrKHSQe3u79xMQ1nSicmpT3gWLhIa8YF+8CYJXMrqaXgCnDhw== - dependencies: - "@babel/runtime" "^7.17.8" - "@polkadot/x-global" "8.7.1" + "@babel/runtime" "^7.20.13" + "@polkadot/x-global" "10.4.2" "@types/websocket" "^1.0.5" websocket "^1.0.34" -"@scure/base@1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.0.0.tgz#109fb595021de285f05a7db6806f2f48296fcee7" - integrity sha512-gIVaYhUsy+9s58m/ETjSJVKHhKTBMmcRb9cEV5/5dwvfDlfORjKrFsDeDHWRrm6RjcPvCLZFwGJjAjLj1gg4HA== +"@scure/base@1.1.1": + version "1.1.1" + resolved "https://registry.npmjs.org/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" + integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA== -"@substrate/connect-extension-protocol@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@substrate/connect-extension-protocol/-/connect-extension-protocol-1.0.0.tgz#d452beda84b3ebfcf0e88592a4695e729a91e858" - integrity sha512-nFVuKdp71hMd/MGlllAOh+a2hAqt8m6J2G0aSsS/RcALZexxF9jodbFc62ni8RDtJboeOfXAHhenYOANvJKPIg== +"@substrate/connect-extension-protocol@^1.0.1": + version "1.0.1" + resolved "https://registry.npmjs.org/@substrate/connect-extension-protocol/-/connect-extension-protocol-1.0.1.tgz#fa5738039586c648013caa6a0c95c43265dbe77d" + integrity sha512-161JhCC1csjH3GE5mPLEd7HbWtwNSPJBg3p1Ksz9SFlTzj/bgEwudiRN2y5i0MoLGCIJRYKyKGMxVnd29PzNjg== -"@substrate/connect@0.7.0-alpha.0": - version "0.7.0-alpha.0" - resolved "https://registry.yarnpkg.com/@substrate/connect/-/connect-0.7.0-alpha.0.tgz#df605f4e808b58d146ad0272a79b2c4b870459a5" - integrity sha512-fvO7w++M8R95R/pGJFW9+cWOt8OYnnTfgswxtlPqSgzqX4tta8xcNQ51crC72FcL5agwSGkA1gc2/+eyTj7O8A== +"@substrate/connect@0.7.19": + version "0.7.19" + resolved "https://registry.npmjs.org/@substrate/connect/-/connect-0.7.19.tgz#7c879cb275bc7ac2fe9edbf797572d4ff8d8b86a" + integrity sha512-+DDRadc466gCmDU71sHrYOt1HcI2Cbhm7zdCFjZfFVHXhC/E8tOdrVSglAH2HDEHR0x2SiHRxtxOGC7ak2Zjog== dependencies: - "@substrate/connect-extension-protocol" "^1.0.0" - "@substrate/smoldot-light" "0.6.8" + "@substrate/connect-extension-protocol" "^1.0.1" + "@substrate/smoldot-light" "0.7.9" eventemitter3 "^4.0.7" -"@substrate/smoldot-light@0.6.8": - version "0.6.8" - resolved "https://registry.yarnpkg.com/@substrate/smoldot-light/-/smoldot-light-0.6.8.tgz#e626e25cd2386824f1164e7d7dda7258580c36e4" - integrity sha512-9lVwbG6wrtss0sd6013BJGe4WN4taujsGG49pwyt1Lj36USeL2Sb164TTUxmZF/g2NQEqDPwPROBdekQ2gFmgg== +"@substrate/smoldot-light@0.7.9": + version "0.7.9" + resolved "https://registry.npmjs.org/@substrate/smoldot-light/-/smoldot-light-0.7.9.tgz#68449873a25558e547e9468289686ee228a9930f" + integrity sha512-HP8iP7sFYlpSgjjbo0lqHyU+gu9lL2hbDNce6dWk5/10mFFF9jKIFGfui4zCecUY808o/Go9pan/31kMJoLbug== dependencies: - buffer "^6.0.1" pako "^2.0.4" - websocket "^1.0.32" + ws "^8.8.1" -"@substrate/ss58-registry@^1.17.0": - version "1.22.0" - resolved "https://registry.yarnpkg.com/@substrate/ss58-registry/-/ss58-registry-1.22.0.tgz#d115bc5dcab8c0f5800e05e4ef265949042b13ec" - integrity sha512-IKqrPY0B3AeIXEc5/JGgEhPZLy+SmVyQf+k0SIGcNSTqt1GLI3gQFEOFwSScJdem+iYZQUrn6YPPxC3TpdSC3A== +"@substrate/ss58-registry@^1.38.0": + version "1.39.0" + resolved "https://registry.npmjs.org/@substrate/ss58-registry/-/ss58-registry-1.39.0.tgz#eb916ff5fea7fa02e77745823fde21af979273d2" + integrity sha512-qZYpuE6n+mwew+X71dOur/CbMXj6rNW27o63JeJwdQH/GvcSKm3JLNhd+bGzwUKg0D/zD30Qc6p4JykArzM+tA== "@tsconfig/node10@^1.0.7": version "1.0.9" @@ -444,10 +472,10 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== -"@types/bn.js@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.0.tgz#32c5d271503a12653c62cf4d2b45e6eab8cebc68" - integrity sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA== +"@types/bn.js@^5.1.1": + version "5.1.1" + resolved "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" + integrity sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g== dependencies: "@types/node" "*" @@ -471,10 +499,10 @@ resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-9.1.1.tgz#e7c4f1001eefa4b8afbd1eee27a237fee3bf29c4" integrity sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw== -"@types/node-fetch@^2.6.1": - version "2.6.1" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.1.tgz#8f127c50481db65886800ef496f20bbf15518975" - integrity sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA== +"@types/node-fetch@^2.6.2": + version "2.6.2" + resolved "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.2.tgz#d1a9c5fd049d9415dce61571557104dec3ec81da" + integrity sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A== dependencies: "@types/node" "*" form-data "^3.0.0" @@ -668,19 +696,14 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base64-js@^1.3.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - binary-extensions@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -bn.js@^5.2.0: +bn.js@^5.2.1: version "5.2.1" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + resolved "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== brace-expansion@^1.1.7: @@ -710,14 +733,6 @@ browser-stdout@1.3.1: resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== -buffer@^6.0.1: - version "6.0.3" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" - integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.2.1" - bufferutil@^4.0.1: version "4.0.6" resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.6.tgz#ebd6c67c7922a0e902f053e5d8be5ec850e48433" @@ -831,6 +846,11 @@ d@1, d@^1.0.1: es5-ext "^0.10.50" type "^1.0.1" +data-uri-to-buffer@^4.0.0: + version "4.0.1" + resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" + integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== + debug@4.3.4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" @@ -1061,6 +1081,11 @@ eventemitter3@^4.0.7: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== +eventemitter3@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.0.tgz#084eb7f5b5388df1451e63f4c2aafd71b217ccb3" + integrity sha512-riuVbElZZNXLeLEoprfNYoDSwTBRR44X3mnhdI1YcnENpWTCsTTVZ2zFuqQcpoyqPQIUXdiPEU0ECAq0KQRaHg== + ext@^1.1.2: version "1.6.0" resolved "https://registry.yarnpkg.com/ext/-/ext-1.6.0.tgz#3871d50641e874cc172e2b53f919842d19db4c52" @@ -1101,6 +1126,14 @@ fastq@^1.6.0: dependencies: reusify "^1.0.4" +fetch-blob@^3.1.2, fetch-blob@^3.1.4: + version "3.2.0" + resolved "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" + integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== + dependencies: + node-domexception "^1.0.0" + web-streams-polyfill "^3.0.3" + file-entry-cache@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" @@ -1150,6 +1183,13 @@ form-data@^3.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" +formdata-polyfill@^4.0.10: + version "4.0.10" + resolved "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" + integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== + dependencies: + fetch-blob "^3.1.2" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -1242,11 +1282,6 @@ he@1.2.0: resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== -ieee754@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - ignore@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" @@ -1278,11 +1313,6 @@ inherits@2: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -ip-regex@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5" - integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q== - is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" @@ -1478,10 +1508,10 @@ mocha@^10.0.0: yargs-parser "20.2.4" yargs-unparser "2.0.0" -mock-socket@^9.1.2: - version "9.1.5" - resolved "https://registry.yarnpkg.com/mock-socket/-/mock-socket-9.1.5.tgz#2c4e44922ad556843b6dfe09d14ed8041fa2cdeb" - integrity sha512-3DeNIcsQixWHHKk6NdoBhWI4t1VMj5/HzfnI1rE/pLl5qKx7+gd4DNA07ehTaZ6MoUU053si6Hd+YtiM/tQZfg== +mock-socket@^9.2.1: + version "9.2.1" + resolved "https://registry.npmjs.org/mock-socket/-/mock-socket-9.2.1.tgz#cc9c0810aa4d0afe02d721dcb2b7e657c00e2282" + integrity sha512-aw9F9T9G2zpGipLLhSNh6ZpgUyUl4frcVmRN08uE1NWPWg43Wx6+sGPDbQ7E5iFZZDJW5b5bypMeAEHqTbIFag== ms@2.0.0: version "2.0.0" @@ -1513,22 +1543,29 @@ next-tick@^1.1.0: resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== -nock@^13.2.4: - version "13.2.6" - resolved "https://registry.yarnpkg.com/nock/-/nock-13.2.6.tgz#35e419cd9d385ffa67e59523d9699e41b29e1a03" - integrity sha512-GbyeSwSEP0FYouzETZ0l/XNm5tNcDNcXJKw3LCAb+mx8bZSwg1wEEvdL0FAyg5TkBJYiWSCtw6ag4XfmBy60FA== +nock@^13.3.0: + version "13.3.0" + resolved "https://registry.npmjs.org/nock/-/nock-13.3.0.tgz#b13069c1a03f1ad63120f994b04bfd2556925768" + integrity sha512-HHqYQ6mBeiMc+N038w8LkMpDCRquCHWeNmN3v6645P3NhN2+qXOBqvPqo7Rt1VyCMzKhJ733wZqw5B7cQVFNPg== dependencies: debug "^4.1.0" json-stringify-safe "^5.0.1" lodash "^4.17.21" propagate "^2.0.0" -node-fetch@^2.6.7: - version "2.6.7" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" - integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== +node-domexception@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" + integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== + +node-fetch@^3.3.0: + version "3.3.0" + resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.0.tgz#37e71db4ecc257057af828d523a7243d651d91e4" + integrity sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA== dependencies: - whatwg-url "^5.0.0" + data-uri-to-buffer "^4.0.0" + fetch-blob "^3.1.4" + formdata-polyfill "^4.0.10" node-gyp-build@^4.3.0: version "4.4.0" @@ -1649,10 +1686,10 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" -regenerator-runtime@^0.13.4: - version "0.13.9" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" - integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== +regenerator-runtime@^0.13.11: + version "0.13.11" + resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" + integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== regexpp@^3.2.0: version "3.2.0" @@ -1688,10 +1725,10 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -rxjs@^7.5.5: - version "7.5.5" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.5.tgz#2ebad89af0f560f460ad5cc4213219e1f7dd4e9f" - integrity sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw== +rxjs@^7.8.0: + version "7.8.0" + resolved "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz#90a938862a82888ff4c7359811a595e14e1e09a4" + integrity sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg== dependencies: tslib "^2.1.0" @@ -1778,11 +1815,6 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== - ts-node@^10.8.0: version "10.8.1" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.8.1.tgz#ea2bd3459011b52699d7e88daa55a45a1af4f066" @@ -1887,12 +1919,12 @@ v8-compile-cache@^2.0.3: resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== +web-streams-polyfill@^3.0.3: + version "3.2.1" + resolved "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6" + integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== -websocket@^1.0.32, websocket@^1.0.34: +websocket@^1.0.34: version "1.0.34" resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.34.tgz#2bdc2602c08bf2c82253b730655c0ef7dcab3111" integrity sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ== @@ -1904,14 +1936,6 @@ websocket@^1.0.32, websocket@^1.0.34: utf-8-validate "^5.0.2" yaeti "^0.0.6" -whatwg-url@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" - integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" @@ -1943,6 +1967,11 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== +ws@^8.8.1: + version "8.12.1" + resolved "https://registry.npmjs.org/ws/-/ws-8.12.1.tgz#c51e583d79140b5e42e39be48c934131942d4a8f" + integrity sha512-1qo+M9Ba+xNhPB+YTWUlK6M17brTut5EXbcBaMRN5pH5dFrXz7lzz1ChFSUq3bOUl8yEvSenhHmYUNJxFzdJew== + y18n@^5.0.5: version "5.0.8" resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"