diff --git a/.github/workflows/check-migrations.yml b/.github/workflows/check-migrations.yml index ce0dd6b7..c52e75a9 100644 --- a/.github/workflows/check-migrations.yml +++ b/.github/workflows/check-migrations.yml @@ -68,31 +68,6 @@ jobs: RUNTIME_BLOB_NAME=$(echo $PACKAGE_NAME | sed 's/-/_/g').compact.compressed.wasm RUNTIME_BLOB_PATH=./target/release/wbuild/$PACKAGE_NAME/$RUNTIME_BLOB_NAME - # When running on relay, we don't need weight checks. - EXTRA_FLAGS="" - if [[ "${{ matrix.runtime.is_relay }}" == "true" ]]; then - EXTRA_FLAGS+="--no-weight-warnings" - echo "Disabling weight checks since we are on a relay" - else - echo "Enabling weight checks since we are not on a relay" - fi - - # Disable the spec version check when we dont want to release. - if ! .github/changelog-processor.py CHANGELOG.md --should-release ; then - EXTRA_FLAGS+=" --disable-spec-version-check" - echo "Disabling the spec version check since we are not releasing" - else - echo "Enabling the spec version check since we are releasing" - fi - - # Disable idemepotency checks on Polkadot until we enact them. - if [[ "${{ matrix.runtime.name }}" == "polkadot" ]]; then - echo "Disabling the idempotency check since we are on Polkadot" - EXTRA_FLAGS+=" --disable-idempotency-checks" - else - echo "Enabling the idempotency check since we are not on Polkadot" - fi - echo "Flags: $EXTRA_FLAGS" ./try-runtime \ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43c5c52b..b27d218d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -231,7 +231,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - runtime: [ "shell", "integritee" ] + runtime: [ "integritee-kusama", "integritee-polkadot" ] steps: - uses: actions/checkout@v3 @@ -250,7 +250,7 @@ jobs: with: image: paritytech/srtool chain: ${{ matrix.runtime }} - runtime_dir: polkadot-parachains/${{ matrix.runtime }}-runtime + runtime_dir: polkadot-parachains/${{ matrix.runtime }} - name: Summary run: | @@ -321,10 +321,7 @@ jobs: fail-fast: false matrix: chain: [ integritee ] - config: [ rococo, westend, kusama, polkadot, moonbase, paseo ] - include: - - chain: shell - config: kusama-lease2 + config: [ kusama, polkadot, paseo ] steps: - name: Checkout uses: actions/checkout@v3 @@ -418,7 +415,7 @@ jobs: needs: [ "release" ] strategy: matrix: - runtime: [ "shell", "integritee" ] + runtime: [ "integritee-kusama", "integritee-polkadot" ] steps: - uses: actions/checkout@v3 - uses: actions/download-artifact@v4 @@ -436,14 +433,18 @@ jobs: runtime_ver="$(ruby -e 'require "./scripts/github/lib.rb"; puts get_runtime("${{ matrix.runtime }}")')" echo "Found version: >$runtime_ver<" echo "runtime_ver={$runtime_ver}" >> $GITHUB_OUTPUT - + - name: Set wasm filename + run: echo "WASM_FILE=${MATRIX_RUNTIME//-/_}_runtime.compact.compressed.wasm" >> $GITHUB_ENV + env: + MATRIX_RUNTIME: ${{ matrix.runtime }} + GITHUB_SHA: ${{ github.sha }} - name: Upload compressed ${{ matrix.runtime }} wasm uses: shogo82148/actions-upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.release.outputs.asset_upload_url }} - asset_path: "${{ matrix.runtime }}-runtime-${{ github.sha }}/${{ matrix.runtime }}_runtime.compact.compressed.wasm" + asset_path: "${{ matrix.runtime }}-runtime-${{ github.sha }}/${{ env.WASM_FILE }}" asset_name: ${{ matrix.runtime }}_runtime-v${{ steps.get-runtime-ver.outputs.runtime_ver }}.compact.compressed.wasm asset_content_type: application/wasm diff --git a/.github/workflows/clippy-runtime.yml b/.github/workflows/clippy-runtime.yml index 150045b4..70662425 100644 --- a/.github/workflows/clippy-runtime.yml +++ b/.github/workflows/clippy-runtime.yml @@ -4,7 +4,8 @@ on: pull_request: branches: [ master ] paths: - - 'polkadot-parachains/integritee-runtime/**' + - 'polkadot-parachains/integritee-kusama/**' + - 'polkadot-parachains/integritee-polkadot/**' # cancel previous runs concurrency: @@ -12,11 +13,14 @@ concurrency: cancel-in-progress: true jobs: - clippy: + clippy-runtimes: runs-on: ubuntu-latest + strategy: + matrix: + runtime: [ "integritee-kusama", "integritee-polkadot" ] steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set rust version via common env file run: cat .github/env >> $GITHUB_ENV - name: Install stable toolchain @@ -33,7 +37,7 @@ jobs: uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - args: --manifest-path polkadot-parachains/integritee-runtime/Cargo.toml + args: --manifest-path polkadot-parachains/${{ matrix.runtime }}/Cargo.toml env: # RUSTFLAGS: "-D warnings" # FAIL-CI SKIP_WASM_BUILD: 1 diff --git a/.github/workflows/runtimes-matrix.json b/.github/workflows/runtimes-matrix.json index 75d759d1..ac7522f0 100644 --- a/.github/workflows/runtimes-matrix.json +++ b/.github/workflows/runtimes-matrix.json @@ -1,15 +1,22 @@ [ { "name": "integritee-kusama", - "package": "integritee-runtime", - "path": "polkadot-parachains/integritee-runtime", + "package": "integritee-kusama-runtime", + "path": "polkadot-parachains/integritee-kusama", "uri": "wss://kusama.api.integritee.network:443", "is_relay": false }, + { + "name": "integritee-polkadot", + "package": "integritee-polkadot-runtime", + "path": "polkadot-parachains/integritee-polkadot", + "uri": "wss://polkadot.api.integritee.network:443", + "is_relay": false + }, { "name": "integritee-paseo", - "package": "integritee-runtime", - "path": "polkadot-parachains/integritee-runtime", + "package": "integritee-kusama-runtime", + "path": "polkadot-parachains/integritee-kusama", "uri": "wss://paseo.api.integritee.network:443", "is_relay": false } diff --git a/Cargo.lock b/Cargo.lock index 6343a4af..d1b576fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4288,7 +4288,7 @@ dependencies = [ [[package]] name = "integritee-collator" -version = "1.13.2" +version = "1.13.3" dependencies = [ "assert_cmd", "async-trait", @@ -4312,8 +4312,9 @@ dependencies = [ "frame-benchmarking-cli", "futures", "hex-literal", + "integritee-kusama-runtime", "integritee-parachains-common", - "integritee-runtime", + "integritee-polkadot-runtime", "jsonrpsee", "log", "nix 0.25.1", @@ -4343,7 +4344,6 @@ dependencies = [ "sc-transaction-pool-api", "serde", "serde_json", - "shell-runtime", "sp-api", "sp-block-builder", "sp-blockchain", @@ -4368,6 +4368,100 @@ dependencies = [ "wait-timeout", ] +[[package]] +name = "integritee-kusama-runtime" +version = "1.13.551" +dependencies = [ + "assets-common", + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", + "cumulus-pallet-session-benchmarking", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-aura", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-primitives-timestamp", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-metadata-hash-extension", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex", + "hex-literal", + "integritee-parachains-common", + "log", + "orml-traits", + "orml-xcm", + "orml-xcm-support", + "orml-xtokens", + "pallet-asset-conversion", + "pallet-asset-registry", + "pallet-assets", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-bounties", + "pallet-child-bounties", + "pallet-claims", + "pallet-collator-selection", + "pallet-collective", + "pallet-democracy", + "pallet-enclave-bridge", + "pallet-message-queue", + "pallet-multisig", + "pallet-preimage", + "pallet-proxy", + "pallet-scheduler", + "pallet-session", + "pallet-sidechain", + "pallet-teeracle", + "pallet-teerdays", + "pallet-teerex", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-vesting", + "pallet-xcm", + "pallet-xcm-transactor", + "parachains-common", + "parity-scale-codec", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-common", + "polkadot-runtime-parachains", + "primitive-types", + "scale-info", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", + "xcm-primitives", + "xcm-transactor-primitives", +] + [[package]] name = "integritee-parachains-common" version = "1.8.0" @@ -4394,8 +4488,8 @@ dependencies = [ ] [[package]] -name = "integritee-runtime" -version = "1.13.550" +name = "integritee-polkadot-runtime" +version = "1.13.551" dependencies = [ "assets-common", "cumulus-pallet-aura-ext", @@ -4445,6 +4539,7 @@ dependencies = [ "pallet-scheduler", "pallet-session", "pallet-sidechain", + "pallet-sudo", "pallet-teeracle", "pallet-teerdays", "pallet-teerex", @@ -12420,66 +12515,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "shell-runtime" -version = "1.13.18" -dependencies = [ - "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", - "cumulus-pallet-xcm", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-aura", - "cumulus-primitives-core", - "cumulus-primitives-timestamp", - "cumulus-primitives-utility", - "frame-benchmarking", - "frame-executive", - "frame-metadata-hash-extension", - "frame-support", - "frame-system", - "frame-system-rpc-runtime-api", - "frame-try-runtime", - "hex", - "hex-literal", - "integritee-parachains-common", - "log", - "pallet-aura", - "pallet-balances", - "pallet-message-queue", - "pallet-sudo", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-vesting", - "pallet-xcm", - "pallet-xcm-transactor", - "parachains-common", - "parity-scale-codec", - "polkadot-parachain-primitives", - "polkadot-runtime-common", - "scale-info", - "sp-api", - "sp-block-builder", - "sp-consensus-aura", - "sp-core", - "sp-genesis-builder", - "sp-inherents", - "sp-io", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-transaction-pool", - "sp-version", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", - "xcm-transactor-primitives", -] - [[package]] name = "shlex" version = "1.1.0" diff --git a/Cargo.toml b/Cargo.toml index af89e293..59055595 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,8 +3,8 @@ resolver = "2" members = [ "polkadot-parachains", "polkadot-parachains/common", - "polkadot-parachains/integritee-runtime", - "polkadot-parachains/shell-runtime", + "polkadot-parachains/integritee-kusama", + "polkadot-parachains/integritee-polkadot", ] [profile.release] diff --git a/README.md b/README.md index 807279f2..9fd97e90 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,18 @@ # Integritee Parachain -This is the repository to run Integritee as a parachain on Kusama and Rococo. It is forked from the [Cumulus](https://github.com/paritytech/cumulus) repository. +This is the repository to run Integritee as a parachain on Kusama and Rococo. It is forked from +the [Cumulus](https://github.com/paritytech/cumulus) repository. ## Bump Dependencies + 1. Run these commands with the suitable polkadot version. + ```bash diener update --cumulus --branch polkadot-v0.9.xx diener update --substrate --branch polkadot-v0.9.xx diener update --polkadot --branch release-v0.9.xx ``` + 2. Search and replace `integritee-network/` dependencies to point to new `polkadot-v0.9.xx` branch. 3. Search and replace `orml` dependencies to point to new `polkadot-v0.9.xx` branch. @@ -19,6 +23,7 @@ diener update --polkadot --branch release-v0.9.xx 1. Download zombienet from the releases in the [zombienet](https://github.com/paritytech/zombienet) repository. 2. Copy it to `~/.local/bin/` 3. Launch it in your terminal + ``` zombienet-linux-x64 spawn --provider native zombienet/rococo-local-with-integritee-and-shell.toml ``` @@ -30,19 +35,29 @@ zombienet-linux-x64 spawn --provider native zombienet/rococo-local-with-integrit Follow the steps provided in https://docs.substrate.io/tutorials/v3/cumulus/start-relay/ But keep the following in mind: -- Our chain has a paraid of 2015 on Rococo and Kusama (see [polkadot-parachains/src/command.rs#44-49](/polkadot-parachains/src/command.rs#44-49)) + +- Our chain has a paraid of 2015 on Rococo and Kusama ( + see [polkadot-parachains/src/command.rs#44-49](/polkadot-parachains/src/command.rs#44-49)) - For testing on rococo-local use the chain spec `integritee-rococo-local-dev` - More chain specs can be found in [polkadot-parachains/src/command.rs](/polkadot-parachains/src/command.rs) ## Runtime upgrade -Two runtimes are contained in this repository. First, the shell-runtime, which has been extended compared to the upstream shell-runtime. It has some additional modules including sudo to facilitate a -runtime upgrade with the [sudo upgrade](https://substrate.dev/docs/en/tutorials/forkless-upgrade/sudo-upgrade) method. Second, it runs with the same executor instance as the integritee-runtime, such that an eventual upgrade is simpler to perform, i.e., only the runtime -needs to be upgraded whereas the client can remain the same. Hence, all modules revolving around aura have been included, which provide data the client needs. + +Two runtimes are contained in this repository. First, the shell-runtime, which has been extended compared to the +upstream shell-runtime. It has some additional modules including sudo to facilitate a +runtime upgrade with the [sudo upgrade](https://substrate.dev/docs/en/tutorials/forkless-upgrade/sudo-upgrade) method. +Second, it runs with the same executor instance as the integritee-runtime, such that an eventual upgrade is simpler to +perform, i.e., only the runtime +needs to be upgraded whereas the client can remain the same. Hence, all modules revolving around aura have been +included, which provide data the client needs. ### Upgrade procedure -Prepare a local shell network and generate the `integritee-runtime` wasm blob, which contains the upgraded runtime to be executed after the runtime upgrade. + +Prepare a local shell network and generate the `integritee-runtime` wasm blob, which contains the upgraded runtime to be +executed after the runtime upgrade. + ```bash -# spawn local setup (NOTE: the shell-runtime parachain id needs to be changed to match the integritee-runtime's.) +# spawn local setup (NOTE: the shell-runtime parachain id needs to be changed to match the integritee-kusama's.) zombienet-linux-x64 spawn --provider native zombienet/rococo-local-with-shell.toml # generate wasm blob @@ -53,15 +68,23 @@ After the parachain starts producing blocks, a runtime upgrade can be initiated ![image](./docs/sudo-set-code.png) -If successful, a `parachainSystem.validationFunctionStored` event is thrown followed by a `parachainSystem.validationFunctionApplied` event some blocks later. After this procedure, the `Teerex` module should be available in the extrinsics tab in polkadot-js/apps. +If successful, a `parachainSystem.validationFunctionStored` event is thrown followed by a +`parachainSystem.validationFunctionApplied` event some blocks later. After this procedure, the `Teerex` module should be +available in the extrinsics tab in polkadot-js/apps. ### Caveats -* Don't forget to enable file upload if you perform drag and drop for the `genesisHead` and `validationCode`. If it is not enabled, Polkadot-js will interpret the path as a string and won't complain but the registration will fail. -* Don't forget to add the argument `--chain integritee-rococo-local-dev` for the custom chain config. This argument is omitted in the [Cumulus Workshop](https://substrate.dev/cumulus-workshop/). -* The relay chain and the collator need to be about equally recent. This might require frequent rebasing of this repository on the corresponding release branch. + +* Don't forget to enable file upload if you perform drag and drop for the `genesisHead` and `validationCode`. If it is + not enabled, Polkadot-js will interpret the path as a string and won't complain but the registration will fail. +* Don't forget to add the argument `--chain integritee-rococo-local-dev` for the custom chain config. This argument is + omitted in the [Cumulus Workshop](https://substrate.dev/cumulus-workshop/). +* The relay chain and the collator need to be about equally recent. This might require frequent rebasing of this + repository on the corresponding release branch. ## Benchmark + The current weights have been benchmarked with the following reference hardware: + * Core(TM) i7-10875H * 32GB of RAM * NVMe SSD @@ -87,14 +110,18 @@ To test runtime upgrades nvm use 20 npx @acala-network/chopsticks@latest --config integritee-kusama --wasm-override ./target/release/wbuild/integritee-runtime/integritee_runtime.compact.compressed.wasm ``` + to test XCM ``` npx @acala-network/chopsticks@latest xcm --p=karura --p=integritee-kusama ``` + see other options in chopsticks help - + ## More Resources -* Thorough Readme about Rococo and Collators in general in the original [repository](https://github.com/paritytech/cumulus) of this fork. + +* Thorough Readme about Rococo and Collators in general in the + original [repository](https://github.com/paritytech/cumulus) of this fork. * Parachains Development in the [Polkadot Wiki](https://wiki.polkadot.network/docs/build-pdk) * encointer parachain readme: https://github.com/encointer/encointer-parachain diff --git a/polkadot-parachains/Cargo.toml b/polkadot-parachains/Cargo.toml index 0cd9f27b..f6a01f56 100644 --- a/polkadot-parachains/Cargo.toml +++ b/polkadot-parachains/Cargo.toml @@ -2,7 +2,7 @@ name = "integritee-collator" description = "The Integritee parachain collator binary" # align major.minor revision with polkadot SDK. bump patch revision ad lib. make this the github release tag -version = "1.13.2" +version = "1.13.3" authors = ["Integritee AG "] homepage = "https://integritee.network/" repository = "https://github.com/integritee-network/parachain" @@ -24,9 +24,9 @@ serde = { workspace = true } serde_json = { workspace = true } # Parachain runtimes +integritee-kusama-runtime = { path = "integritee-kusama" } integritee-parachains-common = { path = "common" } -integritee-runtime = { path = "integritee-runtime" } -shell-runtime = { path = "shell-runtime" } +integritee-polkadot-runtime = { path = "integritee-polkadot" } # Substrate dependencies frame-benchmarking = { workspace = true, features = ["std"] } @@ -115,21 +115,19 @@ runtime-benchmarks = [ "cumulus-primitives-core/runtime-benchmarks", "frame-benchmarking-cli/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", - "integritee-runtime/runtime-benchmarks", + "integritee-kusama-runtime/runtime-benchmarks", "polkadot-cli/runtime-benchmarks", "polkadot-primitives/runtime-benchmarks", "sc-service/runtime-benchmarks", - "shell-runtime/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "polkadot-service/runtime-benchmarks", ] fast-runtime = [ "polkadot-service/fast-runtime", - "integritee-runtime/fast-runtime", + "integritee-kusama-runtime/fast-runtime", ] try-runtime = [ "polkadot-cli/try-runtime", "sp-runtime/try-runtime", - "integritee-runtime/try-runtime", - "shell-runtime/try-runtime", + "integritee-kusama-runtime/try-runtime", ] diff --git a/polkadot-parachains/common/src/xcm_config.rs b/polkadot-parachains/common/src/xcm_config.rs index 4e020d3f..136556ca 100644 --- a/polkadot-parachains/common/src/xcm_config.rs +++ b/polkadot-parachains/common/src/xcm_config.rs @@ -40,7 +40,7 @@ where fn contains(asset: &Asset, origin: &Location) -> bool { if let Some(ref reserve) = ReserveProvider::reserve(asset) { if reserve == origin { - return true + return true; } } false @@ -61,7 +61,7 @@ where fn matches_fungible(a: &Asset) -> Option { if let (Fungible(ref amount), AssetId(location)) = (&a.fun, &a.id) { if CurrencyIdConvert::convert(location.clone()).is_some() { - return CheckedConversion::checked_from(*amount) + return CheckedConversion::checked_from(*amount); } } None diff --git a/polkadot-parachains/integritee-runtime/Cargo.toml b/polkadot-parachains/integritee-kusama/Cargo.toml similarity index 98% rename from polkadot-parachains/integritee-runtime/Cargo.toml rename to polkadot-parachains/integritee-kusama/Cargo.toml index a501b4be..139959b0 100644 --- a/polkadot-parachains/integritee-runtime/Cargo.toml +++ b/polkadot-parachains/integritee-kusama/Cargo.toml @@ -1,8 +1,8 @@ [package] -name = "integritee-runtime" -description = "The Integritee parachain runtime" +name = "integritee-kusama-runtime" +description = "The Integritee Kusama parachain runtime" # align major.minor revision with polkadot SDK. patch revision must match runtime spec_version -version = "1.13.550" +version = "1.13.551" authors = ["Integritee AG "] homepage = "https://integritee.network/" repository = "https://github.com/integritee-network/parachain" diff --git a/polkadot-parachains/integritee-runtime/build.rs b/polkadot-parachains/integritee-kusama/build.rs similarity index 100% rename from polkadot-parachains/integritee-runtime/build.rs rename to polkadot-parachains/integritee-kusama/build.rs diff --git a/polkadot-parachains/integritee-runtime/src/helpers.rs b/polkadot-parachains/integritee-kusama/src/helpers.rs similarity index 100% rename from polkadot-parachains/integritee-runtime/src/helpers.rs rename to polkadot-parachains/integritee-kusama/src/helpers.rs diff --git a/polkadot-parachains/integritee-runtime/src/lib.rs b/polkadot-parachains/integritee-kusama/src/lib.rs similarity index 99% rename from polkadot-parachains/integritee-runtime/src/lib.rs rename to polkadot-parachains/integritee-kusama/src/lib.rs index f5ae81cc..0601aa94 100644 --- a/polkadot-parachains/integritee-runtime/src/lib.rs +++ b/polkadot-parachains/integritee-kusama/src/lib.rs @@ -120,10 +120,10 @@ impl_opaque_keys! { #[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("integritee-parachain"), + spec_name: create_runtime_str!("integritee-kusama"), impl_name: create_runtime_str!("integritee-full"), authoring_version: 2, - spec_version: 550, + spec_version: 551, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 8, @@ -1065,7 +1065,7 @@ construct_runtime!( MessageQueue: pallet_message_queue = 33, XTokens: orml_xtokens = 34, OrmlXcm: orml_xcm = 35, - XcmTransactor: pallet_xcm_transactor = 36, + //XcmTransactor: pallet_xcm_transactor = 36, // fungibles Assets: pallet_assets:: = 41, diff --git a/polkadot-parachains/integritee-runtime/src/migrations.rs b/polkadot-parachains/integritee-kusama/src/migrations.rs similarity index 99% rename from polkadot-parachains/integritee-runtime/src/migrations.rs rename to polkadot-parachains/integritee-kusama/src/migrations.rs index e2603988..32454c8a 100644 --- a/polkadot-parachains/integritee-runtime/src/migrations.rs +++ b/polkadot-parachains/integritee-kusama/src/migrations.rs @@ -102,7 +102,7 @@ pub mod scheduler { Expected version == 4, found {:?}", onchain_version, ); - return T::DbWeight::get().reads(1) + return T::DbWeight::get().reads(1); } log::info!(target: TARGET, "migrating from {:?} to 4, purging agenda", onchain_version); let purged_agendas = v1::Agenda::::clear(u32::MAX, None).unique as u64; @@ -193,7 +193,7 @@ pub mod collator_selection_init { let invulnerables_len = pallet_collator_selection::Invulnerables::::get().len(); if invulnerables_len > 0 { info!(target: TARGET, "no need to initialize invulnerables"); - return T::DbWeight::get().reads_writes(1, 0) + return T::DbWeight::get().reads_writes(1, 0); } info!(target: TARGET, "initializing the set of invulnerables"); diff --git a/polkadot-parachains/integritee-runtime/src/weights/cumulus_pallet_parachain_system.rs b/polkadot-parachains/integritee-kusama/src/weights/cumulus_pallet_parachain_system.rs similarity index 96% rename from polkadot-parachains/integritee-runtime/src/weights/cumulus_pallet_parachain_system.rs rename to polkadot-parachains/integritee-kusama/src/weights/cumulus_pallet_parachain_system.rs index 722162b0..c40550d5 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/cumulus_pallet_parachain_system.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/cumulus_pallet_parachain_system.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/cumulus_pallet_parachain_system.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/cumulus_pallet_parachain_system.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/cumulus_pallet_xcmp_queue.rs b/polkadot-parachains/integritee-kusama/src/weights/cumulus_pallet_xcmp_queue.rs similarity index 98% rename from polkadot-parachains/integritee-runtime/src/weights/cumulus_pallet_xcmp_queue.rs rename to polkadot-parachains/integritee-kusama/src/weights/cumulus_pallet_xcmp_queue.rs index f9743522..55c21c37 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/cumulus_pallet_xcmp_queue.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/cumulus_pallet_xcmp_queue.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/cumulus_pallet_xcmp_queue.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/frame_system.rs b/polkadot-parachains/integritee-kusama/src/weights/frame_system.rs similarity index 98% rename from polkadot-parachains/integritee-runtime/src/weights/frame_system.rs rename to polkadot-parachains/integritee-kusama/src/weights/frame_system.rs index 983ab4df..2be46e11 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/frame_system.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/frame_system.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/frame_system.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/frame_system.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/mod.rs b/polkadot-parachains/integritee-kusama/src/weights/mod.rs similarity index 100% rename from polkadot-parachains/integritee-runtime/src/weights/mod.rs rename to polkadot-parachains/integritee-kusama/src/weights/mod.rs diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_asset_conversion.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_asset_conversion.rs similarity index 98% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_asset_conversion.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_asset_conversion.rs index 4ba82b01..d04d28b2 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_asset_conversion.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_asset_conversion.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_asset_conversion.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_asset_conversion.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_asset_registry.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_asset_registry.rs similarity index 96% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_asset_registry.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_asset_registry.rs index d0f49c74..64ae2a81 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_asset_registry.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_asset_registry.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_asset_registry.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_asset_registry.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_assets.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_assets.rs similarity index 99% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_assets.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_assets.rs index 2cecc746..140c5824 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_assets.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_assets.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_assets.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_assets.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_balances.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_balances.rs similarity index 98% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_balances.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_balances.rs index a47667e8..4d5452ee 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_balances.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_balances.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_balances.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_balances.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_bounties.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_bounties.rs similarity index 99% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_bounties.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_bounties.rs index fc82785d..f7f5d285 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_bounties.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_bounties.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_bounties.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_bounties.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_child_bounties.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_child_bounties.rs similarity index 99% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_child_bounties.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_child_bounties.rs index fecbd090..91a65701 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_child_bounties.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_child_bounties.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_child_bounties.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_child_bounties.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_claims.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_claims.rs similarity index 98% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_claims.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_claims.rs index 317b43b5..56c5839b 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_claims.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_claims.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_claims.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_claims.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_collator_selection.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_collator_selection.rs similarity index 99% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_collator_selection.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_collator_selection.rs index c726d73f..ad895e3c 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_collator_selection.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_collator_selection.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_collator_selection.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_collator_selection.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_collective.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_collective.rs similarity index 99% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_collective.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_collective.rs index a7bdbac1..ac523f44 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_collective.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_collective.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_collective.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_collective.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_democracy.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_democracy.rs similarity index 99% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_democracy.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_democracy.rs index 045f420a..a17d5017 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_democracy.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_democracy.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_democracy.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_democracy.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_enclave_bridge.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_enclave_bridge.rs similarity index 98% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_enclave_bridge.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_enclave_bridge.rs index 742e7418..60932369 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_enclave_bridge.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_enclave_bridge.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_enclave_bridge.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_enclave_bridge.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_message_queue.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_message_queue.rs similarity index 98% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_message_queue.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_message_queue.rs index 77b93c9d..84b752ed 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_message_queue.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_message_queue.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_message_queue.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_message_queue.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_multisig.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_multisig.rs similarity index 98% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_multisig.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_multisig.rs index 4c8396a1..f9c96156 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_multisig.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_multisig.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_multisig.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_multisig.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_preimage.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_preimage.rs similarity index 99% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_preimage.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_preimage.rs index 14ff5ab1..22dddabf 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_preimage.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_preimage.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_preimage.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_preimage.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_proxy.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_proxy.rs similarity index 99% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_proxy.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_proxy.rs index a1974a2b..8da93a75 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_proxy.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_proxy.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_proxy.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_proxy.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_scheduler.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_scheduler.rs similarity index 99% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_scheduler.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_scheduler.rs index b369b1de..437a559b 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_scheduler.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_scheduler.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_scheduler.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_scheduler.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_session.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_session.rs similarity index 96% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_session.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_session.rs index 55954c09..7e397199 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_session.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_session.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_session.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_session.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_sidechain.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_sidechain.rs similarity index 96% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_sidechain.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_sidechain.rs index 58e07f00..e6946c58 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_sidechain.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_sidechain.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_sidechain.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_sidechain.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_teeracle.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_teeracle.rs similarity index 97% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_teeracle.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_teeracle.rs index b2b99195..5df8da5f 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_teeracle.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_teeracle.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_teeracle.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_teeracle.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_teerdays.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_teerdays.rs similarity index 98% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_teerdays.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_teerdays.rs index 9895d1be..0a623e44 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_teerdays.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_teerdays.rs @@ -17,7 +17,7 @@ // --pallet=pallet_teerdays // --extrinsic=* // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_teerdays.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_teerdays.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_teerex.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_teerex.rs similarity index 98% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_teerex.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_teerex.rs index 9d618c67..3d9b86c5 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_teerex.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_teerex.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_teerex.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_teerex.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_timestamp.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_timestamp.rs similarity index 95% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_timestamp.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_timestamp.rs index e69941c8..be7623d1 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_timestamp.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_timestamp.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_timestamp.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_timestamp.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_treasury.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_treasury.rs similarity index 100% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_treasury.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_treasury.rs diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_utility.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_utility.rs similarity index 97% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_utility.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_utility.rs index d6c17fdc..24669c81 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_utility.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_utility.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_utility.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_utility.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_vesting.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_vesting.rs similarity index 99% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_vesting.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_vesting.rs index 2f86a791..b9ef6239 100644 --- a/polkadot-parachains/integritee-runtime/src/weights/pallet_vesting.rs +++ b/polkadot-parachains/integritee-kusama/src/weights/pallet_vesting.rs @@ -19,7 +19,7 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./polkadot-parachains/integritee-runtime/src/weights/pallet_vesting.rs +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_vesting.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] diff --git a/polkadot-parachains/integritee-runtime/src/weights/pallet_xcm.rs b/polkadot-parachains/integritee-kusama/src/weights/pallet_xcm.rs similarity index 100% rename from polkadot-parachains/integritee-runtime/src/weights/pallet_xcm.rs rename to polkadot-parachains/integritee-kusama/src/weights/pallet_xcm.rs diff --git a/polkadot-parachains/integritee-runtime/src/xcm_config.rs b/polkadot-parachains/integritee-kusama/src/xcm_config.rs similarity index 97% rename from polkadot-parachains/integritee-runtime/src/xcm_config.rs rename to polkadot-parachains/integritee-kusama/src/xcm_config.rs index e0dcc8c1..782cc436 100644 --- a/polkadot-parachains/integritee-runtime/src/xcm_config.rs +++ b/polkadot-parachains/integritee-kusama/src/xcm_config.rs @@ -418,21 +418,6 @@ impl pallet_xcm::Config for Runtime { type RemoteLockConsumerIdentifier = (); } -parameter_types! { - pub const ShellRuntimeParaId: u32 = 2267u32; - pub const IntegriteeKsmParaId: u32 = 2015u32; -} - -impl pallet_xcm_transactor::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RelayCallBuilder = RelayCallBuilder; - type XcmSender = XcmRouter; - type SwapOrigin = EnsureRootOrMoreThanHalfCouncil; - type ShellRuntimeParaId = ShellRuntimeParaId; - type IntegriteeKsmParaId = IntegriteeKsmParaId; - type WeightInfo = (); -} - impl cumulus_pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; diff --git a/polkadot-parachains/shell-runtime/Cargo.toml b/polkadot-parachains/integritee-polkadot/Cargo.toml similarity index 52% rename from polkadot-parachains/shell-runtime/Cargo.toml rename to polkadot-parachains/integritee-polkadot/Cargo.toml index 133f6445..de6dcbfa 100644 --- a/polkadot-parachains/shell-runtime/Cargo.toml +++ b/polkadot-parachains/integritee-polkadot/Cargo.toml @@ -1,44 +1,74 @@ [package] -name = "shell-runtime" -description = "The Integritee shell parachain runtime" -# align major.minor revision with polkadot SDK. patch should match spec_version -version = "1.13.18" +name = "integritee-polkadot-runtime" +description = "The Integritee Polkadot parachain runtime" +# align major.minor revision with polkadot SDK. patch revision must match runtime spec_version +version = "1.13.551" authors = ["Integritee AG "] homepage = "https://integritee.network/" repository = "https://github.com/integritee-network/parachain" edition = "2021" [dependencies] +hex-literal = { workspace = true } +integritee-parachains-common = { path = "../common", default-features = false } log = { workspace = true } parity-scale-codec = { workspace = true } +primitive-types = { workspace = true } scale-info = { workspace = true } -integritee-parachains-common = { path = "../common", default-features = false } - # Substrate dependencies + +# pallets +assets-common = { workspace = true } cumulus-pallet-aura-ext = { workspace = true } cumulus-pallet-dmp-queue = { workspace = true } cumulus-pallet-parachain-system = { workspace = true } +cumulus-pallet-session-benchmarking = { optional = true, workspace = true } cumulus-pallet-xcm = { workspace = true } cumulus-pallet-xcmp-queue = { workspace = true } cumulus-primitives-aura = { workspace = true } cumulus-primitives-core = { workspace = true } cumulus-primitives-timestamp = { workspace = true } cumulus-primitives-utility = { workspace = true } -frame-benchmarking = { workspace = true, optional = true } frame-executive = { workspace = true } frame-metadata-hash-extension = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } frame-system-rpc-runtime-api = { workspace = true } frame-try-runtime = { workspace = true, optional = true } +orml-traits = { workspace = true } +orml-xcm = { workspace = true } +orml-xcm-support = { workspace = true } +orml-xtokens = { workspace = true } +pallet-asset-conversion = { workspace = true } +pallet-asset-registry = { workspace = true } +pallet-assets = { workspace = true } pallet-aura = { workspace = true } +pallet-authorship = { workspace = true } pallet-balances = { workspace = true } +pallet-bounties = { workspace = true } +pallet-child-bounties = { workspace = true } +pallet-claims = { workspace = true } +pallet-collator-selection = { workspace = true } +pallet-collective = { workspace = true } +pallet-democracy = { workspace = true } +pallet-enclave-bridge = { workspace = true } pallet-message-queue = { workspace = true } +pallet-multisig = { workspace = true } +pallet-preimage = { workspace = true } +pallet-proxy = { workspace = true } +pallet-scheduler = { workspace = true } +pallet-session = { workspace = true } +pallet-sidechain = { workspace = true } pallet-sudo = { workspace = true } +pallet-teeracle = { workspace = true } +pallet-teerdays = { workspace = true } +pallet-teerex = { workspace = true } pallet-timestamp = { workspace = true } pallet-transaction-payment = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } +pallet-treasury = { workspace = true } +pallet-utility = { workspace = true } pallet-vesting = { workspace = true } pallet-xcm = { workspace = true } pallet-xcm-transactor = { workspace = true } @@ -56,17 +86,26 @@ sp-offchain = { workspace = true } sp-runtime = { workspace = true } sp-session = { workspace = true } sp-std = { workspace = true } +sp-storage = { workspace = true } sp-transaction-pool = { workspace = true } sp-version = { workspace = true } staging-parachain-info = { workspace = true } staging-xcm = { workspace = true } staging-xcm-builder = { workspace = true } staging-xcm-executor = { workspace = true } +xcm-primitives = { workspace = true } xcm-transactor-primitives = { workspace = true } +# Benchmarking +frame-benchmarking = { workspace = true, optional = true } +frame-system-benchmarking = { workspace = true, optional = true } + [dev-dependencies] +cumulus-primitives-parachain-inherent = { workspace = true, features = ["std"] } hex = { workspace = true } -hex-literal = { workspace = true } + +polkadot-primitives = { workspace = true, features = ["std"] } +polkadot-runtime-parachains = { workspace = true, features = ["std"] } [build-dependencies] substrate-wasm-builder = { workspace = true, optional = true, features = ["metadata-hash"] } @@ -74,29 +113,60 @@ substrate-wasm-builder = { workspace = true, optional = true, features = ["metad [features] default = ["std"] std = [ + "assets-common/std", "cumulus-pallet-aura-ext/std", "cumulus-pallet-dmp-queue/std", "cumulus-pallet-parachain-system/std", + "cumulus-pallet-session-benchmarking?/std", "cumulus-pallet-xcm/std", "cumulus-pallet-xcmp-queue/std", "cumulus-primitives-aura/std", "cumulus-primitives-core/std", "cumulus-primitives-timestamp/std", "cumulus-primitives-utility/std", + "frame-benchmarking?/std", "frame-executive/std", "frame-metadata-hash-extension/std", "frame-support/std", + "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", "frame-system/std", + "frame-try-runtime?/std", "integritee-parachains-common/std", "log/std", + "orml-traits/std", + "orml-xcm-support/std", + "orml-xcm/std", + "orml-xtokens/std", + "pallet-assets/std", + "pallet-asset-conversion/std", + "pallet-asset-registry/std", "pallet-aura/std", + "pallet-authorship/std", "pallet-balances/std", + "pallet-bounties/std", + "pallet-child-bounties/std", + "pallet-claims/std", + "pallet-collator-selection/std", + "pallet-collective/std", + "pallet-democracy/std", + "pallet-enclave-bridge/std", "pallet-message-queue/std", + "pallet-multisig/std", + "pallet-preimage/std", + "pallet-proxy/std", + "pallet-scheduler/std", + "pallet-session/std", + "pallet-sidechain/std", "pallet-sudo/std", + "pallet-teeracle/std", + "pallet-teerdays/std", + "pallet-teerex/std", "pallet-timestamp/std", "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-payment/std", + "pallet-treasury/std", + "pallet-utility/std", "pallet-vesting/std", "pallet-xcm-transactor/std", "pallet-xcm/std", @@ -104,6 +174,7 @@ std = [ "parity-scale-codec/std", "polkadot-parachain-primitives/std", "polkadot-runtime-common/std", + "primitive-types/std", "scale-info/std", "sp-api/std", "sp-block-builder/std", @@ -116,6 +187,7 @@ std = [ "sp-runtime/std", "sp-session/std", "sp-std/std", + "sp-storage/std", "sp-transaction-pool/std", "sp-version/std", "staging-parachain-info/std", @@ -125,27 +197,50 @@ std = [ "substrate-wasm-builder", "xcm-transactor-primitives/std", ] -# Weird cargo behaviour: We have to feature gate the `runtime-benchmarks` behind -# a feature here. Otherwise the feature is automatically activated in dependencies -# when we compile the whole workspace with the `runtime-benchmarks` feature, which -# leads to compiler erros in the `shell-runtime` because the benchmarks are not -# implemented. runtime-benchmarks = [ + "assets-common/runtime-benchmarks", "cumulus-pallet-parachain-system/runtime-benchmarks", + "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "cumulus-primitives-utility/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", + "frame-system-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", + "orml-xtokens/runtime-benchmarks", + "pallet-assets/runtime-benchmarks", + "pallet-asset-conversion/runtime-benchmarks", + "pallet-asset-registry/runtime-benchmarks", "pallet-balances/runtime-benchmarks", + "pallet-bounties/runtime-benchmarks", + "pallet-child-bounties/runtime-benchmarks", + "pallet-claims/runtime-benchmarks", + "pallet-collator-selection/runtime-benchmarks", + "pallet-collective/runtime-benchmarks", + "pallet-democracy/runtime-benchmarks", + "pallet-enclave-bridge/runtime-benchmarks", "pallet-message-queue/runtime-benchmarks", + "pallet-multisig/runtime-benchmarks", + "pallet-preimage/runtime-benchmarks", + "pallet-proxy/runtime-benchmarks", + "pallet-scheduler/runtime-benchmarks", + "pallet-sidechain/runtime-benchmarks", "pallet-sudo/runtime-benchmarks", + "pallet-teeracle/runtime-benchmarks", + "pallet-teerdays/runtime-benchmarks", + "pallet-teerex/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", + "pallet-treasury/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", "pallet-vesting/runtime-benchmarks", + "pallet-xcm-transactor/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "parachains-common/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "staging-xcm-builder/runtime-benchmarks", + "staging-xcm-executor/runtime-benchmarks", ] try-runtime = [ @@ -157,13 +252,41 @@ try-runtime = [ "frame-executive/try-runtime", "frame-system/try-runtime", "frame-try-runtime/try-runtime", + "orml-xcm/try-runtime", + "orml-xtokens/try-runtime", + "pallet-assets/try-runtime", + "pallet-asset-conversion/try-runtime", + "pallet-asset-registry/try-runtime", "pallet-aura/try-runtime", + "pallet-authorship/try-runtime", "pallet-balances/try-runtime", + "pallet-bounties/try-runtime", + "pallet-child-bounties/try-runtime", + "pallet-claims/try-runtime", + "pallet-collator-selection/try-runtime", + "pallet-collective/try-runtime", + "pallet-democracy/try-runtime", + "pallet-enclave-bridge/try-runtime", "pallet-message-queue/try-runtime", + "pallet-multisig/try-runtime", + "pallet-preimage/try-runtime", + "pallet-proxy/try-runtime", + "pallet-scheduler/try-runtime", + "pallet-session/try-runtime", + "pallet-sidechain/try-runtime", + "pallet-sudo/try-runtime", + "pallet-teeracle/try-runtime", + "pallet-teerdays/try-runtime", + "pallet-teerex/try-runtime", "pallet-timestamp/try-runtime", "pallet-transaction-payment/try-runtime", + "pallet-treasury/try-runtime", + "pallet-utility/try-runtime", "pallet-vesting/try-runtime", "pallet-xcm-transactor/try-runtime", "pallet-xcm/try-runtime", + "polkadot-runtime-common/try-runtime", "staging-parachain-info/try-runtime", ] +# Set timing constants (e.g. session period) to faster versions to speed up testing. +fast-runtime = [] diff --git a/polkadot-parachains/shell-runtime/build.rs b/polkadot-parachains/integritee-polkadot/build.rs similarity index 100% rename from polkadot-parachains/shell-runtime/build.rs rename to polkadot-parachains/integritee-polkadot/build.rs diff --git a/polkadot-parachains/integritee-polkadot/src/helpers.rs b/polkadot-parachains/integritee-polkadot/src/helpers.rs new file mode 100644 index 00000000..65e992a0 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/helpers.rs @@ -0,0 +1,40 @@ +// Copyright 2021 Integritee AG and Supercomputing Systems AG +// This file is part of the "Integritee parachain" and is +// based on Cumulus from Parity Technologies (UK) Ltd. + +// Integritee parachain 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. + +// Cumulus 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 Integritee parachain. If not, see . + +//! XCM configuration for Integritee Runtime. +//! + +/// Copied from polkadot/runtime/common/src/lib.rs +/// Macro to set a value (e.g. when using the `parameter_types` macro) to either a production value +/// or to an environment variable or testing value (in case the `fast-runtime` feature is selected). +/// Note that the environment variable is evaluated _at compile time_. +/// +/// Usage: +/// ```Rust +/// parameter_types! { +/// pub const VotingPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 1 * MINUTES); +/// } +#[macro_export] +macro_rules! prod_or_fast { + ($prod:expr, $test:expr) => { + if cfg!(feature = "fast-runtime") { + $test + } else { + $prod + } + }; +} diff --git a/polkadot-parachains/integritee-polkadot/src/lib.rs b/polkadot-parachains/integritee-polkadot/src/lib.rs new file mode 100644 index 00000000..3a0a28b9 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/lib.rs @@ -0,0 +1,1430 @@ +// Copyright 2021 Integritee AG and Supercomputing Systems AG +// This file is part of the "Integritee parachain" and is +// based on Cumulus from Parity Technologies (UK) Ltd. + +// Integritee parachain 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. + +// Cumulus 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 Integritee parachain. If not, see . + +#![cfg_attr(not(feature = "std"), no_std)] +// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. +#![recursion_limit = "256"] + +// Make the WASM binary available. +#[cfg(feature = "std")] +include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); + +use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use cumulus_primitives_core::AggregateMessageOrigin; +pub use frame_support::{ + construct_runtime, + dispatch::DispatchClass, + genesis_builder_helper::{build_state, get_preset}, + pallet_prelude::Get, + parameter_types, + traits::{ + EitherOfDiverse, Everything, IsInVec, Nothing, PalletInfoAccess, Randomness, + WithdrawReasons, + }, + weights::{ + constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}, + IdentityFee, Weight, + }, + PalletId, StorageValue, +}; +use frame_support::{ + derive_impl, ord_parameter_types, + traits::{ + fungible::{Credit, HoldConsideration, NativeFromLeft, NativeOrWithId, UnionOf}, + tokens::{ + imbalance::{ResolveAssetTo, ResolveTo}, + ConversionFromAssetBalance, PayFromAccount, + }, + AsEnsureOriginWithArg, ConstBool, EnsureOriginWithArg, EqualPrivilegeOnly, Imbalance, + InstanceFilter, LinearStoragePrice, OnUnbalanced, + }, + weights::ConstantMultiplier, +}; +use frame_system::{ + limits::{BlockLength, BlockWeights}, + EnsureRoot, EnsureSignedBy, EnsureWithSuccess, +}; +use integritee_parachains_common::{ + fee::{SlowAdjustingFeeUpdate, WeightToFee}, + AuraId, AVERAGE_ON_INITIALIZE_RATIO, BLOCK_PROCESSING_VELOCITY, DAYS, HOURS, + MAXIMUM_BLOCK_WEIGHT, MINUTES, MS_PER_DAY, NORMAL_DISPATCH_RATIO, + RELAY_CHAIN_SLOT_DURATION_MILLIS, SLOT_DURATION, UNINCLUDED_SEGMENT_CAPACITY, +}; +pub use integritee_parachains_common::{ + AccountId, Address, Balance, BlockNumber, Hash, Header, Nonce, Signature, MILLISECS_PER_BLOCK, +}; +use pallet_asset_conversion::{Ascending, Chain, WithFirstAsset}; +pub use pallet_balances::Call as BalancesCall; +pub use pallet_claims; +pub use pallet_collective; +pub use pallet_enclave_bridge; +pub use pallet_sidechain; +pub use pallet_teeracle; +pub use pallet_teerex::Call as TeerexCall; +pub use pallet_timestamp::Call as TimestampCall; +use pallet_treasury::TreasuryAccountId; +use parachains_common::{message_queue::NarrowOriginToSibling, AssetIdForTrustBackedAssets}; +use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; +use scale_info::TypeInfo; +use sp_api::impl_runtime_apis; +use sp_core::{crypto::KeyTypeId, ConstU128, ConstU32, OpaqueMetadata}; +#[cfg(any(feature = "std", test))] +pub use sp_runtime::BuildStorage; +use sp_runtime::{ + create_runtime_str, generic, impl_opaque_keys, + traits::{AccountIdConversion, BlakeTwo256, Block as BlockT, ConvertInto, IdentityLookup}, + transaction_validity::{TransactionSource, TransactionValidity}, + ApplyExtrinsicResult, RuntimeDebug, +}; +pub use sp_runtime::{Perbill, Permill}; +use sp_std::prelude::*; +#[cfg(feature = "std")] +use sp_version::NativeVersion; +use sp_version::RuntimeVersion; + +mod helpers; +mod weights; + +mod migrations; +pub mod xcm_config; + +pub type SessionHandlers = (); + +/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know +/// the specifics of the runtime. They can then be made to be agnostic over specific formats +/// of data like extrinsics, allowing for them to continue syncing the network through upgrades +/// to even the core data structures. +pub mod opaque { + pub use integritee_parachains_common::opaque::*; +} + +impl_opaque_keys! { + pub struct SessionKeys { + pub aura: Aura, + } +} + +#[sp_version::runtime_version] +pub const VERSION: RuntimeVersion = RuntimeVersion { + spec_name: create_runtime_str!("integritee-polkadot"), + impl_name: create_runtime_str!("integritee-full"), + authoring_version: 2, + spec_version: 551, + impl_version: 1, + apis: RUNTIME_API_VERSIONS, + transaction_version: 8, + state_version: 0, +}; + +pub const TEER: Balance = 1_000_000_000_000; +pub const MILLITEER: Balance = 1_000_000_000; +pub const MICROTEER: Balance = 1_000_000; + +// Logic from Polkadot/Kusama. +pub const fn deposit(items: u32, bytes: u32) -> Balance { + items as Balance * 20 * TEER + (bytes as Balance) * 1_000 * MICROTEER +} + +/// A timestamp: milliseconds since the unix epoch. +pub type Moment = u64; + +/// The version information used to identify this runtime when compiled natively. +#[cfg(feature = "std")] +pub fn native_version() -> NativeVersion { + NativeVersion { runtime_version: VERSION, can_author_with: Default::default() } +} + +pub struct DealWithFees(sp_std::marker::PhantomData); + +impl OnUnbalanced>> for DealWithFees +where + R: pallet_balances::Config + pallet_authorship::Config + pallet_treasury::Config, + ::AccountId: From, + ::AccountId: Into, +{ + fn on_unbalanceds( + mut fees_then_tips: impl Iterator>>, + ) { + if let Some(fees) = fees_then_tips.next() { + // for fees, 1% to treasury, 99% burned + // TODO: apply burning function based on cumulative number of extrinsics (#32) + let mut split = fees.ration(1, 99); + + // tips (voluntary extra fees) go to the treasury entirely. no burning + if let Some(tips) = fees_then_tips.next() { + tips.merge_into(&mut split.0); + } + ResolveTo::, pallet_balances::Pallet>::on_unbalanced(split.0); + // burn remainder by not assigning imbalance to someone + } + } +} + +parameter_types! { + pub const BlockHashCount: BlockNumber = 250; + pub const Version: RuntimeVersion = VERSION; + pub RuntimeBlockLength: BlockLength = + BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); + pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder() + .base_block(BlockExecutionWeight::get()) + .for_class(DispatchClass::all(), |weights| { + weights.base_extrinsic = ExtrinsicBaseWeight::get(); + }) + .for_class(DispatchClass::Normal, |weights| { + weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT); + }) + .for_class(DispatchClass::Operational, |weights| { + weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT); + // Operational transactions have some extra reserved space, so that they + // are included even if block reached `MAXIMUM_BLOCK_WEIGHT`. + weights.reserved = Some( + MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT + ); + }) + .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO) + .build_or_panic(); + pub const SS58Prefix: u8 = 13; +} + +/// The default types are being injected by [`derive_impl`](`frame_support::derive_impl`) from +/// [`ParaChainDefaultConfig`](`struct@frame_system::config_preludes::ParaChainDefaultConfig`), +/// but overridden as needed. +#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig as frame_system::DefaultConfig)] +impl frame_system::Config for Runtime { + type BaseCallFilter = Everything; + type BlockWeights = RuntimeBlockWeights; + type BlockLength = RuntimeBlockLength; + type Block = Block; + type AccountId = AccountId; + type Nonce = Nonce; + type Hash = Hash; + type BlockHashCount = BlockHashCount; + type DbWeight = RocksDbWeight; + type Version = Version; + type AccountData = pallet_balances::AccountData; + type SystemWeightInfo = weights::frame_system::WeightInfo; + type SS58Prefix = SS58Prefix; + type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; + type MaxConsumers = frame_support::traits::ConstU32<16>; +} + +parameter_types! { + pub const MinimumPeriod: u64 = SLOT_DURATION / 2; +} + +impl pallet_timestamp::Config for Runtime { + /// A timestamp: milliseconds since the unix epoch. + type Moment = Moment; + type OnTimestampSet = (); + type MinimumPeriod = MinimumPeriod; + type WeightInfo = weights::pallet_timestamp::WeightInfo; +} + +parameter_types! { + pub const ExistentialDeposit: u128 = MILLITEER; + pub const TransferFee: u128 = MILLITEER; + pub const CreationFee: u128 = MILLITEER; + pub const TransactionByteFee: u128 = MICROTEER; + pub const MaxLocks: u32 = 50; + pub const MaxReserves: u32 = 50; + pub const OperationalFeeMultiplier: u8 = 5; +} + +impl pallet_balances::Config for Runtime { + type MaxLocks = MaxLocks; + /// The type for recording an account's balance. + type Balance = Balance; + /// The ubiquitous event type. + type RuntimeEvent = RuntimeEvent; + type DustRemoval = (); + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type WeightInfo = weights::pallet_balances::WeightInfo; + type MaxReserves = MaxReserves; + type ReserveIdentifier = [u8; 8]; + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = (); + type FreezeIdentifier = (); + type MaxFreezes = (); +} + +impl pallet_transaction_payment::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type OnChargeTransaction = + pallet_transaction_payment::FungibleAdapter>; + type WeightToFee = WeightToFee; + type LengthToFee = ConstantMultiplier; + type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; + type OperationalFeeMultiplier = OperationalFeeMultiplier; +} + +parameter_types! { + // One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes. + pub const DepositBase: Balance = deposit(1, 88); + // Additional storage item size of 32 bytes. + pub const DepositFactor: Balance = deposit(0, 32); + pub const MaxSignatories: u16 = 10; //100 +} + +impl pallet_multisig::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type Currency = Balances; + type DepositBase = DepositBase; + type DepositFactor = DepositFactor; + type MaxSignatories = MaxSignatories; + type WeightInfo = weights::pallet_multisig::WeightInfo; +} + +parameter_types! { + // One storage item; key size 32, value size 8; . + pub const ProxyDepositBase: Balance = deposit(1, 8); + // Additional storage item size of 33 bytes. + pub const ProxyDepositFactor: Balance = deposit(0, 33); + pub const MaxProxies: u16 = 32; + pub const AnnouncementDepositBase: Balance = deposit(1, 8); + pub const AnnouncementDepositFactor: Balance = deposit(0, 66); + pub const MaxPending: u16 = 32; +} + +/// The type used to represent the kinds of proxying allowed. +#[derive( + Copy, + Clone, + Eq, + PartialEq, + Ord, + PartialOrd, + Encode, + Decode, + RuntimeDebug, + MaxEncodedLen, + TypeInfo, +)] +pub enum ProxyType { + Any, // Any transactions. + NonTransfer, // Any type of transaction except balance transfers (including vested transfers) + Governance, + // Staking = 3, + // IdentityJudgement = 4, + CancelProxy, + // Auction, +} + +impl Default for ProxyType { + fn default() -> Self { + Self::Any + } +} + +impl InstanceFilter for ProxyType { + fn filter(&self, c: &RuntimeCall) -> bool { + match self { + ProxyType::Any => true, + ProxyType::NonTransfer => matches!( + c, + RuntimeCall::System {..} | + RuntimeCall::Timestamp {..} | + // Specifically omitting Indices `transfer`, `force_transfer` + // Specifically omitting the entire Balances pallet + RuntimeCall::Treasury {..} | + RuntimeCall::Bounties(..) | + RuntimeCall::ChildBounties(..) | + // EnclaveBridge contains shielding and unshielding, which qualifies as transfer + RuntimeCall::Teerex(_) | + RuntimeCall::Teeracle(_) | + RuntimeCall::Sidechain(_) | +// RuntimeCall::Vesting(pallet_vesting::Call::vest {..}) | +// Call::::Vesting(pallet_vesting::Call::vest_other {..}) | + // Specifically omitting Vesting `vested_transfer`, and `force_vested_transfer` + RuntimeCall::Proxy {..} | + RuntimeCall::Multisig {..} + ), + ProxyType::Governance => { + matches!( + c, + RuntimeCall::Treasury { .. } | + RuntimeCall::Bounties(..) | + RuntimeCall::ChildBounties(..) + ) + }, + ProxyType::CancelProxy => { + matches!(c, RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. })) + }, + } + } + fn is_superset(&self, o: &Self) -> bool { + match (self, o) { + (x, y) if x == y => true, + (ProxyType::Any, _) => true, + (_, ProxyType::Any) => false, + (ProxyType::NonTransfer, _) => true, + _ => false, + } + } +} + +impl pallet_proxy::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type Currency = Balances; + type ProxyType = ProxyType; + type ProxyDepositBase = ProxyDepositBase; + type ProxyDepositFactor = ProxyDepositFactor; + type MaxProxies = MaxProxies; + type WeightInfo = weights::pallet_proxy::WeightInfo; + type MaxPending = MaxPending; + type CallHasher = BlakeTwo256; + type AnnouncementDepositBase = AnnouncementDepositBase; + type AnnouncementDepositFactor = AnnouncementDepositFactor; +} + +parameter_types! { + pub const MinVestedTransfer: Balance = TEER; + pub UnvestedFundsAllowedWithdrawReasons: WithdrawReasons = + WithdrawReasons::except(WithdrawReasons::TRANSFER | WithdrawReasons::RESERVE); +} + +impl pallet_vesting::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type BlockNumberToBalance = ConvertInto; + type BlockNumberProvider = System; + type MinVestedTransfer = MinVestedTransfer; + type WeightInfo = weights::pallet_vesting::WeightInfo; + type UnvestedFundsAllowedWithdrawReasons = UnvestedFundsAllowedWithdrawReasons; + const MAX_VESTING_SCHEDULES: u32 = 28; +} + +parameter_types! { + pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) * + RuntimeBlockWeights::get().max_block; + pub const MaxScheduledPerBlock: u32 = 50; +} + +impl pallet_scheduler::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type PalletsOrigin = OriginCaller; + type RuntimeCall = RuntimeCall; + type MaximumWeight = MaximumSchedulerWeight; + // one schedule is the founder allocation. We only allow RootOrigin here such that it takes a democracy proposal to change this schedule + type ScheduleOrigin = EnsureRoot; + type MaxScheduledPerBlock = MaxScheduledPerBlock; + type WeightInfo = weights::pallet_scheduler::WeightInfo; + type OriginPrivilegeCmp = EqualPrivilegeOnly; + type Preimages = Preimage; +} + +impl pallet_utility::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type PalletsOrigin = OriginCaller; + type WeightInfo = weights::pallet_utility::WeightInfo; +} + +parameter_types! { + pub const PreimageBaseDeposit: Balance = TEER; + pub const PreimageByteDeposit: Balance = deposit(0, 1); + pub const PreimageHoldReason: RuntimeHoldReason = + RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage); +} + +impl pallet_preimage::Config for Runtime { + type WeightInfo = weights::pallet_preimage::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type ManagerOrigin = EnsureRoot; + type Consideration = HoldConsideration< + AccountId, + Balances, + PreimageHoldReason, + LinearStoragePrice, + >; +} + +parameter_types! { + pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; +} + +type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< + Runtime, + RELAY_CHAIN_SLOT_DURATION_MILLIS, + BLOCK_PROCESSING_VELOCITY, + UNINCLUDED_SEGMENT_CAPACITY, +>; + +impl cumulus_pallet_parachain_system::Config for Runtime { + type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type OnSystemEvent = (); + type SelfParaId = staging_parachain_info::Pallet; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; + type ReservedDmpWeight = ReservedDmpWeight; + type OutboundXcmpMessageSource = XcmpQueue; + type XcmpMessageHandler = XcmpQueue; + type ReservedXcmpWeight = ReservedXcmpWeight; + type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases; + type ConsensusHook = ConsensusHook; +} + +impl staging_parachain_info::Config for Runtime {} + +impl cumulus_pallet_aura_ext::Config for Runtime {} + +parameter_types! { + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_message_queue::WeightInfo; + #[cfg(feature = "runtime-benchmarks")] + type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor< + cumulus_primitives_core::AggregateMessageOrigin, + >; + #[cfg(not(feature = "runtime-benchmarks"))] + type MessageProcessor = staging_xcm_builder::ProcessXcmMessage< + AggregateMessageOrigin, + staging_xcm_executor::XcmExecutor, + RuntimeCall, + >; + type Size = u32; + // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: + type QueueChangeHandler = NarrowOriginToSibling; + type QueuePausedQuery = NarrowOriginToSibling; + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; + type IdleMaxServiceWeight = (); +} + +parameter_types! { + pub const AssetDeposit: Balance = TEER; + pub const ApprovalDeposit: Balance = 100 * MILLITEER; + pub const StringLimit: u32 = 50; + pub const MetadataDepositBase: Balance = TEER; + pub const MetadataDepositPerByte: Balance = 10 * MILLITEER; + pub const MaxInstructions: u32 = 100; + pub const MaxAuthorities: u32 = 100_000; +} + +impl pallet_aura::Config for Runtime { + type AuthorityId = AuraId; + type DisabledValidators = (); + type MaxAuthorities = MaxAuthorities; + type AllowMultipleBlocksPerSlot = ConstBool; + type SlotDuration = pallet_aura::MinimumPeriodTimesTwo; +} + +// Integritee pallet +parameter_types! { + pub const MomentsPerDay: Moment = 86_400_000; // [ms/d] + pub const MaxAttestationRenewalPeriod: Moment =172_800_000; // 48h +} + +impl pallet_teerex::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type MomentsPerDay = MomentsPerDay; + type MaxAttestationRenewalPeriod = MaxAttestationRenewalPeriod; + type WeightInfo = weights::pallet_teerex::WeightInfo; +} + +impl pallet_enclave_bridge::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Currency = pallet_balances::Pallet; + type WeightInfo = weights::pallet_enclave_bridge::WeightInfo; +} + +// Integritee pallet +parameter_types! { + pub const EarlyBlockProposalLenience: u64 = 100; +} + +impl pallet_sidechain::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_sidechain::WeightInfo; +} +// added by Integritee +parameter_types! { + pub const UnlockPeriod: Moment = 7 * MS_PER_DAY; +} +impl pallet_teerdays::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_teerdays::WeightInfo; + type Currency = Balances; + type CurrencyBalance = Balance; + type UnlockPeriod = UnlockPeriod; +} + +parameter_types! { + pub Prefix: &'static [u8] = b"Pay TEERs to the integriTEE account:"; +} + +// Integritee pallet +impl pallet_claims::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type VestingSchedule = Vesting; + type Prefix = Prefix; + type MoveClaimOrigin = EnsureRoot; + type WeightInfo = weights::pallet_claims::WeightInfo; +} +parameter_types! { + pub const MaxWhitelistedReleases: u32 = 10; + pub const MaxOracleBlobLen: u32 = 4096; +} + +// Integritee pallet +impl pallet_teeracle::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_teeracle::WeightInfo; + type MaxWhitelistedReleases = MaxWhitelistedReleases; + type MaxOracleBlobLen = MaxOracleBlobLen; +} + +parameter_types! { + pub const ProposalBond: Permill = Permill::from_percent(5); + pub const ProposalBondMinimum: Balance = 100 * MILLITEER; + pub const ProposalBondMaximum: Balance = 500 * TEER; + pub const SpendPeriod: BlockNumber = prod_or_fast!(6 * DAYS, 6 * MINUTES); + pub const PayoutSpendPeriod: BlockNumber = prod_or_fast!(6 * DAYS, 6 * MINUTES); + pub const Burn: Permill = Permill::from_percent(1); + pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry"); + pub const DataDepositPerByte: Balance = 100 * MILLITEER; + pub const MaxApprovals: u32 = 100; + pub const MaxBalance: Balance = Balance::max_value(); + pub TreasuryAccount: AccountId = Treasury::account_id(); +} + +pub struct NoConversion; + +impl ConversionFromAssetBalance for NoConversion { + type Error = (); + fn from_asset_balance(balance: Balance, _asset_id: ()) -> Result { + Ok(balance) + } + #[cfg(feature = "runtime-benchmarks")] + fn ensure_successful(_: ()) {} +} + +impl pallet_treasury::Config for Runtime { + type PalletId = TreasuryPalletId; + type Currency = pallet_balances::Pallet; + type ApproveOrigin = EnsureRootOrMoreThanHalfCouncil; + type RejectOrigin = EnsureRootOrMoreThanHalfCouncil; + type RuntimeEvent = RuntimeEvent; + type OnSlash = (); // No Proposal + type ProposalBond = ProposalBond; + type ProposalBondMinimum = ProposalBondMinimum; + type ProposalBondMaximum = ProposalBondMaximum; + type SpendPeriod = SpendPeriod; //Cannot be 0: Error: Thread 'tokio-runtime-worker' panicked at 'attempt to calculate the remainder with a divisor of zero + type Burn = (); //No burn + type BurnDestination = (); //No burn + type SpendFunds = Bounties; + type SpendOrigin = EnsureWithSuccess, AccountId, MaxBalance>; + type MaxApprovals = MaxApprovals; //0:cannot approve any proposal + type WeightInfo = weights::pallet_treasury::WeightInfo; + type AssetKind = (); + type Beneficiary = AccountId; + type BeneficiaryLookup = IdentityLookup; + type Paymaster = PayFromAccount; + type BalanceConverter = NoConversion; + type PayoutPeriod = PayoutSpendPeriod; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); +} + +parameter_types! { + pub const BountyDepositBase: Balance = TEER; + pub const BountyDepositPayoutDelay: BlockNumber = prod_or_fast!(4 * DAYS, 4 * MINUTES); + pub const BountyUpdatePeriod: BlockNumber = prod_or_fast!(90 * DAYS, 15 * MINUTES); + pub const MaximumReasonLength: u32 = 16384; + pub const CuratorDepositMultiplier: Permill = Permill::from_percent(50); + pub const CuratorDepositMin: Balance = TEER; + pub const CuratorDepositMax: Balance = 100 * TEER; + pub const BountyValueMinimum: Balance = 100 * TEER; +} + +impl pallet_bounties::Config for Runtime { + type BountyDepositBase = BountyDepositBase; + type BountyDepositPayoutDelay = BountyDepositPayoutDelay; + type BountyUpdatePeriod = BountyUpdatePeriod; + type CuratorDepositMultiplier = CuratorDepositMultiplier; + type CuratorDepositMin = CuratorDepositMin; + type CuratorDepositMax = CuratorDepositMax; + type BountyValueMinimum = BountyValueMinimum; + type ChildBountyManager = ChildBounties; + type DataDepositPerByte = DataDepositPerByte; + type RuntimeEvent = RuntimeEvent; + type MaximumReasonLength = MaximumReasonLength; + type WeightInfo = weights::pallet_bounties::WeightInfo; +} + +parameter_types! { + pub const MaxActiveChildBountyCount: u32 = 100; + pub const ChildBountyValueMinimum: Balance = BountyValueMinimum::get() / 10; +} + +impl pallet_child_bounties::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type MaxActiveChildBountyCount = MaxActiveChildBountyCount; + type ChildBountyValueMinimum = ChildBountyValueMinimum; + type WeightInfo = weights::pallet_child_bounties::WeightInfo; +} + +/// Council collective instance declaration. +/// The council primarly serves to optimize and balance the inclusive referendum system, +/// by being allowed to porpose external democracy proposals and controls the treasury. +pub type CouncilInstance = pallet_collective::Instance1; + +parameter_types! { + pub const CouncilMotionDuration: BlockNumber = prod_or_fast!(3 * DAYS, 2 * MINUTES); + pub const CouncilMaxProposals: u32 = 100; + pub const CouncilMaxMembers: u32 = 100; + pub MaxProposalWeight: Weight = Perbill::from_percent(50) * RuntimeBlockWeights::get().max_block; +} + +impl pallet_collective::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type MotionDuration = CouncilMotionDuration; + type MaxProposals = CouncilMaxProposals; + type MaxMembers = CouncilMaxMembers; + type DefaultVote = pallet_collective::PrimeDefaultVote; + type WeightInfo = weights::pallet_collective::WeightInfo; + type SetMembersOrigin = EnsureRootOrMoreThanHalfCouncil; + type MaxProposalWeight = MaxProposalWeight; +} + +pub type EnsureRootOrMoreThanHalfCouncil = EitherOfDiverse< + EnsureRoot, + pallet_collective::EnsureProportionMoreThan, +>; + +/// Technical committee collective instance declaration. +/// The technical committee primarly serves to safeguard against malicious referenda, implement bug +/// fixes, reverse faulty runtime updates, or add new but battle-tested features. +pub type TechnicalCommitteeInstance = pallet_collective::Instance2; + +parameter_types! { + pub const TechnicalMotionDuration: BlockNumber = prod_or_fast!(3 * DAYS, 2 * MINUTES); + pub const TechnicalMaxProposals: u32 = 100; + pub const TechnicalMaxMembers: u32 = 100; +} + +impl pallet_collective::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; + type RuntimeEvent = RuntimeEvent; + type Proposal = RuntimeCall; + /// The maximum amount of time (in blocks) for technical committee members to vote on motions. + /// Motions may end in fewer blocks if enough votes are cast to determine the result. + type MotionDuration = TechnicalMotionDuration; + /// The maximum number of Proposlas that can be open in the technical committee at once. + type MaxProposals = TechnicalMaxProposals; + /// The maximum number of technical committee members. + type MaxMembers = TechnicalMaxMembers; + type DefaultVote = pallet_collective::MoreThanMajorityThenPrimeDefaultVote; + type WeightInfo = weights::pallet_collective::WeightInfo; + type SetMembersOrigin = EnsureRootOrMoreThanHalfCouncil; + type MaxProposalWeight = MaxProposalWeight; +} + +pub type EnsureRootOrMoreThanHalfTechnicalCommittee = EitherOfDiverse< + EnsureRoot, + pallet_collective::EnsureProportionAtLeast, +>; + +pub type EnsureRootOrAllTechnicalCommittee = EitherOfDiverse< + EnsureRoot, + pallet_collective::EnsureProportionAtLeast, +>; + +parameter_types! { + pub const LaunchPeriod: BlockNumber = prod_or_fast!(5 * DAYS, 5 * MINUTES); + pub const VotingPeriod: BlockNumber = prod_or_fast!(5 * DAYS, 5 * MINUTES); + pub FastTrackVotingPeriod: BlockNumber = prod_or_fast!(3 * HOURS, 2 * MINUTES); + pub const MinimumDeposit: Balance = 100 * TEER; + pub EnactmentPeriod: BlockNumber = prod_or_fast!(2 * DAYS, 1); + pub const CooloffPeriod: BlockNumber = prod_or_fast!(7 * DAYS, MINUTES); + pub const InstantAllowed: bool = true; + pub const MaxVotes: u32 = 100; + pub const MaxProposals: u32 = 100; +} + +impl pallet_democracy::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type EnactmentPeriod = EnactmentPeriod; + type LaunchPeriod = LaunchPeriod; + type VotingPeriod = VotingPeriod; + type VoteLockingPeriod = EnactmentPeriod; + type MinimumDeposit = MinimumDeposit; + //// Origin allowed to schedule a SuperMajorityApprove (default decline) + /// referendum once it is is legal for an externally proposed referendum + type ExternalOrigin = EnsureRootOrMoreThanHalfCouncil; + /// Origin allowed to schedule a majority-carries (Simple Majority) + /// referendum once it is legal for an externally proposed referendum + type ExternalMajorityOrigin = EnsureRootOrMoreThanHalfCouncil; + /// Origin allowed to schedule a SuperMajorityAgainst (default accept) + /// referendum once it is legal for an externally proposed referendum + type ExternalDefaultOrigin = EnsureRootOrMoreThanHalfCouncil; + /// Majority of the technical committee can have an ExternalMajority/ExternalDefault vote + /// be tabled immediately and with a shorter voting/enactment period. + type FastTrackOrigin = EnsureRootOrMoreThanHalfTechnicalCommittee; + type InstantOrigin = EnsureRootOrMoreThanHalfTechnicalCommittee; + type InstantAllowed = InstantAllowed; + type FastTrackVotingPeriod = FastTrackVotingPeriod; + // To cancel a proposal which has been passed. + type CancellationOrigin = EnsureRoot; + type BlacklistOrigin = EnsureRootOrMoreThanHalfCouncil; + // To cancel a proposal before it has been passed, the technical committee must be unanimous or + // Root must agree. + type CancelProposalOrigin = EnsureRootOrAllTechnicalCommittee; + // Any single technical committee member may veto a coming council proposal, however they can + // only do it once and it lasts only for the cooloff period. + type VetoOrigin = pallet_collective::EnsureMember; + type CooloffPeriod = CooloffPeriod; + type Slash = Treasury; + type Scheduler = Scheduler; + type PalletsOrigin = OriginCaller; + type MaxVotes = MaxVotes; + type WeightInfo = weights::pallet_democracy::WeightInfo; + type MaxProposals = MaxProposals; + type Preimages = Preimage; + type MaxDeposits = ConstU32<100>; + type MaxBlacklisted = ConstU32<100>; + type SubmitOrigin = frame_system::EnsureSigned; +} + +impl orml_xcm::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type SovereignOrigin = EnsureRoot; +} + +pub type AssetBalance = Balance; + +/// always denies creation of assets +pub struct NoAssetCreators; + +impl EnsureOriginWithArg for NoAssetCreators { + type Success = AccountId; + + fn try_origin( + o: RuntimeOrigin, + _a: &AssetIdForTrustBackedAssets, + ) -> sp_std::result::Result { + Err(o) + } + + #[cfg(feature = "runtime-benchmarks")] + fn try_successful_origin(_a: &AssetIdForTrustBackedAssets) -> Result { + Err(()) + } +} + +pub type MainAssetsInstance = pallet_assets::Instance1; + +impl pallet_assets::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Balance = AssetBalance; + type RemoveItemsLimit = frame_support::traits::ConstU32<1000>; + type AssetId = AssetIdForTrustBackedAssets; + type AssetIdParameter = parity_scale_codec::Compact; + type Currency = Balances; + type CreateOrigin = NoAssetCreators; //assets can only be created by root + type ForceOrigin = EnsureRoot; + type AssetDeposit = ConstU128<{ TEER }>; + type AssetAccountDeposit = ConstU128<{ TEER }>; + type MetadataDepositBase = ConstU128<{ TEER }>; + type MetadataDepositPerByte = ConstU128<{ 10 * MILLITEER }>; + type ApprovalDeposit = ConstU128<{ 10 * MILLITEER }>; + type StringLimit = ConstU32<50>; + type Freezer = (); + type Extra = (); + type CallbackHandle = (); + type WeightInfo = weights::pallet_assets::WeightInfo; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); +} + +#[cfg(feature = "runtime-benchmarks")] +pub struct AssetRegistryBenchmarkHelper; + +#[cfg(feature = "runtime-benchmarks")] +impl pallet_asset_registry::BenchmarkHelper + for AssetRegistryBenchmarkHelper +{ + fn get_registered_asset() -> AssetIdForTrustBackedAssets { + use sp_runtime::traits::StaticLookup; + + let root = frame_system::RawOrigin::Root.into(); + let asset_id = 1; + let caller = frame_benchmarking::whitelisted_caller(); + let caller_lookup = ::Lookup::unlookup(caller); + Assets::force_create(root, asset_id.into(), caller_lookup, true, 1) + .expect("Should have been able to force create asset"); + asset_id + } +} + +impl pallet_asset_registry::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type ReserveAssetModifierOrigin = EnsureRoot; + type Assets = Assets; + type WeightInfo = weights::pallet_asset_registry::WeightInfo; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = AssetRegistryBenchmarkHelper; +} + +pub type NativeAndAssets = UnionOf< + Balances, + Assets, + NativeFromLeft, + NativeOrWithId, + AccountId, +>; + +pub type PoolIdToAccountId = pallet_asset_conversion::AccountIdConverter< + AssetConversionPalletId, + (NativeOrWithId, NativeOrWithId), +>; + +pub type AscendingLocator = + Ascending, PoolIdToAccountId>; + +pub type WithFirstAssetLocator = WithFirstAsset< + Native, + AccountId, + NativeOrWithId, + PoolIdToAccountId, +>; + +impl pallet_asset_conversion::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Balance = Balance; + type HigherPrecisionBalance = sp_core::U256; + type AssetKind = NativeOrWithId; + type Assets = NativeAndAssets; + type PoolId = (Self::AssetKind, Self::AssetKind); + type PoolLocator = Chain; + type PoolAssetId = u32; + type PoolAssets = PoolAssets; + type PoolSetupFee = ConstU128<0>; // Asset class deposit fees are sufficient to prevent spam + type PoolSetupFeeAsset = Native; + type PoolSetupFeeTarget = ResolveAssetTo; + type LiquidityWithdrawalFee = LiquidityWithdrawalFee; + type LPFee = ConstU32<3>; // 0.3% swap fee + type PalletId = AssetConversionPalletId; + type MaxSwapPathLength = ConstU32<3>; + type MintMinLiquidity = ConstU128<100>; + type WeightInfo = weights::pallet_asset_conversion::WeightInfo; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); +} + +parameter_types! { + pub AssetsPalletIndex: u32 = ::index() as u32; + pub const AssetConversionPalletId: PalletId = PalletId(*b"py/ascon"); + pub const Native: NativeOrWithId = NativeOrWithId::Native; + // we charge no fee for liquidity withdrawal + pub const LiquidityWithdrawalFee: Permill = Permill::from_perthousand(0); +} + +ord_parameter_types! { + pub const AssetConversionOrigin: sp_runtime::AccountId32 = + AccountIdConversion::::into_account_truncating(&AssetConversionPalletId::get()); +} +pub type PoolAssetsInstance = pallet_assets::Instance2; + +impl pallet_assets::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Balance = Balance; + type RemoveItemsLimit = ConstU32<1000>; + type AssetId = u32; + type AssetIdParameter = u32; + type Currency = Balances; + type CreateOrigin = + AsEnsureOriginWithArg>; + type ForceOrigin = EnsureRoot; + // Deposits are zero because creation/admin is limited to Asset Conversion pallet. + type AssetDeposit = ConstU128<0>; + type AssetAccountDeposit = ConstU128<0>; + type MetadataDepositBase = ConstU128<0>; + type MetadataDepositPerByte = ConstU128<0>; + type ApprovalDeposit = ApprovalDeposit; + type StringLimit = ConstU32<50>; + type Freezer = (); + type Extra = (); + type WeightInfo = weights::pallet_assets::WeightInfo; + type CallbackHandle = (); + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); +} + +impl pallet_authorship::Config for Runtime { + type FindAuthor = pallet_session::FindAccountFromAuthorIndex; + type EventHandler = (CollatorSelection,); +} + +parameter_types! { + pub const Period: u32 = 6 * HOURS; + pub const Offset: u32 = 0; +} +impl pallet_session::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type ValidatorId = ::AccountId; + // we don't have stash and controller, thus we don't need the convert as well. + type ValidatorIdOf = pallet_collator_selection::IdentityCollator; + type ShouldEndSession = pallet_session::PeriodicSessions; + type NextSessionRotation = pallet_session::PeriodicSessions; + type SessionManager = CollatorSelection; + // Essentially just Aura, but let's be pedantic. + type SessionHandler = ::KeyTypeIdProviders; + type Keys = SessionKeys; + type WeightInfo = weights::pallet_session::WeightInfo; +} + +parameter_types! { + pub const PotId: PalletId = PalletId(*b"PotStake"); + pub const SessionLength: BlockNumber = 6 * HOURS; +} + +impl pallet_collator_selection::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type UpdateOrigin = EnsureRootOrMoreThanHalfCouncil; + type PotId = PotId; + type MaxCandidates = ConstU32<100>; + type MinEligibleCollators = ConstU32<4>; + type MaxInvulnerables = ConstU32<20>; + // should be a multiple of session or things will get inconsistent + type KickThreshold = Period; + type ValidatorId = ::AccountId; + type ValidatorIdOf = pallet_collator_selection::IdentityCollator; + type ValidatorRegistration = Session; + type WeightInfo = weights::pallet_collator_selection::WeightInfo; +} +impl pallet_sudo::Config for Runtime { + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type WeightInfo = (); +} + +construct_runtime!( + pub enum Runtime + { + // Basic. + System: frame_system = 0, + ParachainSystem: cumulus_pallet_parachain_system = 1, + // RandomnessCollectiveFlip: pallet_randomness_collective_flip = 2, + Timestamp: pallet_timestamp = 3, + ParachainInfo: staging_parachain_info = 4, + Preimage: pallet_preimage = 5, + Multisig: pallet_multisig = 6, + Proxy: pallet_proxy = 7, + Scheduler: pallet_scheduler = 8, + Utility: pallet_utility = 9, + + // Funds and fees. + Balances: pallet_balances = 10, + TransactionPayment: pallet_transaction_payment = 11, + Vesting: pallet_vesting = 12, + + Sudo: pallet_sudo::{Pallet, Call, Storage, Config, Event} = 17, + + // Governance. + Treasury: pallet_treasury = 13, + Democracy: pallet_democracy = 14, + Council: pallet_collective:: = 15, + TechnicalCommittee: + pallet_collective:: = 16, + Bounties: pallet_bounties = 18, + ChildBounties: pallet_child_bounties = 19, + + // Consensus. + Authorship: pallet_authorship = 20, + CollatorSelection: pallet_collator_selection = 21, + Session: pallet_session = 22, + Aura: pallet_aura = 23, + AuraExt: cumulus_pallet_aura_ext = 24, + + // XCM helpers. + XcmpQueue: cumulus_pallet_xcmp_queue = 30, + PolkadotXcm: pallet_xcm = 31, + CumulusXcm: cumulus_pallet_xcm = 32, + MessageQueue: pallet_message_queue = 33, + XTokens: orml_xtokens = 34, + OrmlXcm: orml_xcm = 35, + //XcmTransactor: pallet_xcm_transactor = 36, + + // fungibles + Assets: pallet_assets:: = 41, + AssetRegistry: pallet_asset_registry = 42, + AssetConversion: pallet_asset_conversion = 43, + PoolAssets: pallet_assets:: = 44, + + // Integritee pallets. + Teerex: pallet_teerex = 50, + Claims: pallet_claims = 51, + Teeracle: pallet_teeracle = 52, + Sidechain: pallet_sidechain= 53, + EnclaveBridge: pallet_enclave_bridge = 54, + TeerDays: pallet_teerdays = 55, + } +); + +/// The SignedExtension to the basic transaction logic. +pub type SignedExtra = ( + frame_system::CheckNonZeroSender, + frame_system::CheckSpecVersion, + frame_system::CheckTxVersion, + frame_system::CheckGenesis, + frame_system::CheckEra, + frame_system::CheckNonce, + frame_system::CheckWeight, + pallet_transaction_payment::ChargeTransactionPayment, + frame_metadata_hash_extension::CheckMetadataHash, +); +/// Unchecked extrinsic type as expected by this runtime. +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic; +/// Extrinsic type that has already been checked. +pub type CheckedExtrinsic = generic::CheckedExtrinsic; +/// Block type as expected by this runtime. +pub type Block = generic::Block; +/// A Block signed with a Justification +pub type SignedBlock = generic::SignedBlock; +/// BlockId type as expected by this runtime. +pub type BlockId = generic::BlockId; + +/// Migrations to apply on runtime upgrade. +pub type Migrations = ( + migrations::scheduler::v4::PurgeV4Agenda, + migrations::collator_selection_init::v0::InitInvulnerables, + cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, + cumulus_pallet_xcmp_queue::migration::v5::MigrateV4ToV5, +); + +/// Executive: handles dispatch to the various modules. +pub type Executive = frame_executive::Executive< + Runtime, + Block, + frame_system::ChainContext, + Runtime, + AllPalletsWithSystem, // Solochain: AllPalletsReversedWithSystemFirst, Statemint: AllPallets. Which one to take? + Migrations, +>; + +#[cfg(feature = "runtime-benchmarks")] +#[macro_use] +extern crate frame_benchmarking; + +#[cfg(feature = "runtime-benchmarks")] +mod benches { + define_benchmarks!( + [frame_system, SystemBench::] + [pallet_asset_conversion, AssetConversion] + [pallet_asset_registry, AssetRegistry] + [pallet_assets, Assets] + [pallet_balances, Balances] + [pallet_bounties, Bounties] + [pallet_child_bounties, ChildBounties] + [pallet_claims, Claims] + [pallet_collator_selection, CollatorSelection] + [pallet_collective, Council] + [pallet_democracy, Democracy] + [pallet_message_queue, MessageQueue] + [pallet_multisig, Multisig] + [pallet_preimage, Preimage] + [pallet_proxy, Proxy] + [pallet_scheduler, Scheduler] + [pallet_session, SessionBench::] + [pallet_sidechain, Sidechain] + [pallet_teeracle, Teeracle] + [pallet_teerdays, TeerDays] + [pallet_teerex, Teerex] + [pallet_enclave_bridge, EnclaveBridge] + [pallet_timestamp, Timestamp] + [pallet_treasury, Treasury] + [pallet_vesting, Vesting] + [pallet_utility, Utility] + [cumulus_pallet_xcmp_queue, XcmpQueue] + [cumulus_pallet_parachain_system, ParachainSystem] + ); +} + +impl_runtime_apis! { + impl sp_consensus_aura::AuraApi for Runtime { + fn slot_duration() -> sp_consensus_aura::SlotDuration { + sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration()) + } + + fn authorities() -> Vec { + pallet_aura::Authorities::::get().into_inner() + } + } + + impl cumulus_primitives_aura::AuraUnincludedSegmentApi for Runtime { + fn can_build_upon( + included_hash: ::Hash, + slot: cumulus_primitives_aura::Slot, + ) -> bool { + ConsensusHook::can_build_upon(included_hash, slot) + } + } + + impl sp_api::Core for Runtime { + fn version() -> RuntimeVersion { + VERSION + } + + fn execute_block(block: Block) { + Executive::execute_block(block) + } + + fn initialize_block(header: &::Header) -> sp_runtime::ExtrinsicInclusionMode { + Executive::initialize_block(header) + } + } + + impl sp_api::Metadata for Runtime { + fn metadata() -> OpaqueMetadata { + OpaqueMetadata::new(Runtime::metadata().into()) + } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } + } + + impl sp_block_builder::BlockBuilder for Runtime { + fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { + Executive::apply_extrinsic(extrinsic) + } + + fn finalize_block() -> ::Header { + Executive::finalize_block() + } + + fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<::Extrinsic> { + data.create_extrinsics() + } + + fn check_inherents( + block: Block, + data: sp_inherents::InherentData, + ) -> sp_inherents::CheckInherentsResult { + data.check_extrinsics(&block) + } + } + + impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { + fn validate_transaction( + source: TransactionSource, + tx: ::Extrinsic, + block_hash: ::Hash, + ) -> TransactionValidity { + Executive::validate_transaction(source, tx, block_hash) + } + } + + impl sp_offchain::OffchainWorkerApi for Runtime { + fn offchain_worker(header: &::Header) { + Executive::offchain_worker(header) + } + } + + impl sp_session::SessionKeys for Runtime { + fn generate_session_keys(seed: Option>) -> Vec { + SessionKeys::generate(seed) + } + + fn decode_session_keys( + encoded: Vec, + ) -> Option, KeyTypeId)>> { + SessionKeys::decode_into_raw_public_keys(&encoded) + } + } + + impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { + fn account_nonce(account: AccountId) -> Nonce { + System::account_nonce(account) + } + } + + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi for Runtime { + fn query_info( + uxt: ::Extrinsic, + len: u32, + ) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo { + TransactionPayment::query_info(uxt, len) + } + fn query_fee_details( + uxt: ::Extrinsic, + len: u32, + ) -> pallet_transaction_payment::FeeDetails { + TransactionPayment::query_fee_details(uxt, len) + } + fn query_weight_to_fee(weight: Weight) -> Balance { + TransactionPayment::weight_to_fee(weight) + } + fn query_length_to_fee(length: u32) -> Balance { + TransactionPayment::length_to_fee(length) + } + } + + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi + for Runtime + { + fn query_call_info( + call: RuntimeCall, + len: u32, + ) -> pallet_transaction_payment::RuntimeDispatchInfo { + TransactionPayment::query_call_info(call, len) + } + fn query_call_fee_details( + call: RuntimeCall, + len: u32, + ) -> pallet_transaction_payment::FeeDetails { + TransactionPayment::query_call_fee_details(call, len) + } + fn query_weight_to_fee(weight: Weight) -> Balance { + TransactionPayment::weight_to_fee(weight) + } + fn query_length_to_fee(length: u32) -> Balance { + TransactionPayment::length_to_fee(length) + } + } + + impl cumulus_primitives_core::CollectCollationInfo for Runtime { + fn collect_collation_info(header: &::Header) -> cumulus_primitives_core::CollationInfo { + ParachainSystem::collect_collation_info(header) + } + } + + #[cfg(feature = "try-runtime")] + impl frame_try_runtime::TryRuntime for Runtime { + 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( + block: Block, + state_root_check: bool, + signature_check: bool, + select: frame_try_runtime::TryStateSelect, + ) -> Weight { + // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to + // have a backtrace here. + Executive::try_execute_block(block, state_root_check, signature_check, select).unwrap() + } + } + + #[cfg(feature = "runtime-benchmarks")] + impl frame_benchmarking::Benchmark for Runtime { + fn benchmark_metadata(extra: bool) -> ( + Vec, + Vec, + ) { + use frame_benchmarking::{Benchmarking, BenchmarkList}; + use frame_support::traits::StorageInfoTrait; + use frame_system_benchmarking::Pallet as SystemBench; + use cumulus_pallet_session_benchmarking::Pallet as SessionBench; + + let mut list = Vec::::new(); + list_benchmarks!(list, extra); + + let storage_info = AllPalletsWithSystem::storage_info(); + (list, storage_info) + } + + fn dispatch_benchmark( + config: frame_benchmarking::BenchmarkConfig + ) -> Result, sp_runtime::RuntimeString> { + use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; + use sp_storage::TrackedStorageKey; + use frame_system_benchmarking::Pallet as SystemBench; + use cumulus_pallet_session_benchmarking::Pallet as SessionBench; + impl cumulus_pallet_session_benchmarking::Config for Runtime {} + + impl frame_system_benchmarking::Config for Runtime { + fn setup_set_code_requirements(code: &sp_std::vec::Vec) -> Result<(), BenchmarkError> { + ParachainSystem::initialize_for_set_code_benchmark(code.len() as u32); + Ok(()) + } + + fn verify_set_code() { + System::assert_last_event(cumulus_pallet_parachain_system::Event::::ValidationFunctionStored.into()); + } + } + // Whitelisted keys to be ignored in benchmarking DB-access tracking. + // + // Reasoning: + // Previously accessed storage keys are stored in the `StorageOverlay`, i.e. the runtime cache. + // A cache with the life-time of one block. + // Accessing these keys afterwards in the same block is considered as negligible overhead. + // Hence, we whitelist storage keys that are accessed every block anyhow because accessing them + // in our pallet can be considered free. + let whitelist: Vec = vec![ + // Block Number + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), + // Total Issuance + hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(), + // Execution Phase + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(), + // Event Count + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(), + // System Events + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(), + ]; + + let mut batches = Vec::::new(); + let params = (&config, &whitelist); + add_benchmarks!(params, batches); + + if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } + Ok(batches) + } + } + + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn build_state(config: Vec) -> sp_genesis_builder::Result { + build_state::(config) + } + + fn get_preset(id: &Option) -> Option> { + get_preset::(id, |_| None) + } + + fn preset_names() -> Vec { + Default::default() + } + } +} + +cumulus_pallet_parachain_system::register_validate_block! { + Runtime = Runtime, + BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::, +} diff --git a/polkadot-parachains/integritee-polkadot/src/migrations.rs b/polkadot-parachains/integritee-polkadot/src/migrations.rs new file mode 100644 index 00000000..32454c8a --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/migrations.rs @@ -0,0 +1,282 @@ +pub mod scheduler { + // this is necessary because migrations from v0 to v3 are no longer available in the scheduler + // pallet code and migrating is only possible from v3. The strategy here is to empty the agenda + use frame_support::traits::OnRuntimeUpgrade; + use frame_system::pallet_prelude::BlockNumberFor; + use pallet_scheduler::*; + use sp_std::vec::Vec; + + #[cfg(feature = "try-runtime")] + use sp_runtime::TryRuntimeError; + + /// The log target. + const TARGET: &str = "runtime::fix::scheduler::migration"; + + pub mod v1 { + use super::*; + use frame_support::{pallet_prelude::*, traits::schedule}; + + #[cfg_attr(any(feature = "std", test), derive(PartialEq, Eq))] + #[derive(Clone, RuntimeDebug, Encode, Decode)] + pub(crate) struct ScheduledV1 { + maybe_id: Option>, + priority: schedule::Priority, + call: Call, + maybe_periodic: Option>, + } + + #[frame_support::storage_alias] + pub(crate) type Agenda = StorageMap< + Pallet, + Twox64Concat, + BlockNumberFor, + Vec::RuntimeCall, BlockNumberFor>>>, + ValueQuery, + >; + + #[frame_support::storage_alias] + pub(crate) type Lookup = + StorageMap, Twox64Concat, Vec, TaskAddress>>; + } + + pub mod v3 { + use super::*; + use frame_support::pallet_prelude::*; + + #[frame_support::storage_alias] + pub(crate) type Agenda = StorageMap< + Pallet, + Twox64Concat, + BlockNumberFor, + Vec>>, + ValueQuery, + >; + + #[frame_support::storage_alias] + pub(crate) type Lookup = + StorageMap, Twox64Concat, Vec, TaskAddress>>; + } + + pub mod v4 { + use super::*; + use frame_support::pallet_prelude::*; + + #[frame_support::storage_alias] + pub type Agenda = StorageMap< + Pallet, + Twox64Concat, + BlockNumberFor, + BoundedVec< + Option>, + ::MaxScheduledPerBlock, + >, + ValueQuery, + >; + + #[cfg(feature = "try-runtime")] + pub(crate) type TaskName = [u8; 32]; + + #[cfg(feature = "try-runtime")] + #[frame_support::storage_alias] + pub(crate) type Lookup = + StorageMap, Twox64Concat, TaskName, TaskAddress>>; + + /// brute-force empty the agenda for V4. + pub struct PurgeV4Agenda(sp_std::marker::PhantomData); + + impl OnRuntimeUpgrade for PurgeV4Agenda { + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, TryRuntimeError> { + let agendas = v1::Agenda::::iter_keys().count() as u32; + let lookups = v1::Lookup::::iter_keys().count() as u32; + log::info!(target: TARGET, "agendas present which will be dropped: {}/{}...", agendas, lookups); + Ok((agendas, lookups).encode()) + } + + fn on_runtime_upgrade() -> Weight { + let onchain_version = Pallet::::on_chain_storage_version(); + if onchain_version != 4 { + log::warn!( + target: TARGET, + "skipping migration: executed on wrong storage version.\ + Expected version == 4, found {:?}", + onchain_version, + ); + return T::DbWeight::get().reads(1); + } + log::info!(target: TARGET, "migrating from {:?} to 4, purging agenda", onchain_version); + let purged_agendas = v1::Agenda::::clear(u32::MAX, None).unique as u64; + let purged_lookups = v1::Lookup::::clear(u32::MAX, None).unique as u64; + T::DbWeight::get() + .reads_writes(purged_agendas + purged_lookups, purged_agendas + purged_lookups) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_state: Vec) -> Result<(), TryRuntimeError> { + ensure!(StorageVersion::get::>() == 4, "Must upgrade"); + + let agendas = Agenda::::iter_keys().count() as u32; + ensure!(agendas == 0, "agenda must be empty after now"); + let lookups = Lookup::::iter_keys().count() as u32; + ensure!(lookups == 0, "agenda must be empty after now"); + + Ok(()) + } + } + } +} + +pub mod collator_selection_init { + use frame_support::traits::OnRuntimeUpgrade; + #[cfg(feature = "try-runtime")] + use sp_runtime::TryRuntimeError; + + /// The log target. + const TARGET: &str = "runtime::fix::collator_selection_init"; + pub mod v0 { + use super::*; + use crate::{SessionKeys, TEER}; + use frame_support::{pallet_prelude::*, traits::Currency}; + use hex_literal::hex; + use log::info; + use parachains_common::impls::BalanceOf; + use parity_scale_codec::EncodeLike; + use sp_core::{crypto::key_types::AURA, sr25519}; + use sp_std::{vec, vec::Vec}; + + const INVULNERABLE_AURA_A: [u8; 32] = + hex!("c6c1370a5b6656f3816b2a6c32444ec18d5ac6d33103c4e5c3f359623a19dc47"); + const INVULNERABLE_AURA_B: [u8; 32] = + hex!("183490bfadaacbb875537599dfc936cb0159eadf9a4cc8a16a584f170b503509"); + const INVULNERABLE_AURA_C: [u8; 32] = + hex!("a8302634ae0c688c7c3447e4e683279ec9384c1758ec78a7a2def44064cf046c"); + const INVULNERABLE_AURA_D: [u8; 32] = + hex!("e2750081920a4a704fae7f04069df3018dd259ca2c6af51a9764df226072f75a"); + const INVULNERABLE_AURA_E: [u8; 32] = + hex!("ba492297546f3c34602551582069b03c0e13000d5de928e9b5db9d18bbd2e435"); + + const INVULNERABLE_ACCOUNT_A: [u8; 32] = + hex!("8e9f7d54e1d9bdbac609f444c9e920a87af41216ee6c9ba0c62032fb1ade0464"); + const INVULNERABLE_ACCOUNT_B: [u8; 32] = + hex!("b0a7c84862ec760d8817ab01482e955332c9abf11e4568991def6837c1e1ac7b"); + const INVULNERABLE_ACCOUNT_C: [u8; 32] = + hex!("1a65141f43b54ed8c0f76201ef374a607bd74484741243212a2accd76e315c09"); + const INVULNERABLE_ACCOUNT_D: [u8; 32] = + hex!("645553b30ea9a250dd0f38f472fdeb04e418b8204b96a2bd30ae151ef660053e"); + const INVULNERABLE_ACCOUNT_E: [u8; 32] = + hex!("e089d5404fb036a8ac795377213445f9ccebfc6773a183769503974369db7f46"); + + pub struct InitInvulnerables(sp_std::marker::PhantomData); + impl OnRuntimeUpgrade for InitInvulnerables + where + T: frame_system::Config + + pallet_collator_selection::Config + + pallet_session::Config + + pallet_balances::Config, + ::AccountId: From<[u8; 32]>, + ::ValidatorId: From<[u8; 32]>, + ::Keys: From, + ::Balance: From, + ::Balance: EncodeLike< + <::Currency as Currency< + ::AccountId, + >>::Balance, + >, + { + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, TryRuntimeError> { + let invulnerables_len = pallet_collator_selection::Invulnerables::::get().len(); + Ok((invulnerables_len as u32).encode()) + } + + fn on_runtime_upgrade() -> Weight { + let invulnerables_len = pallet_collator_selection::Invulnerables::::get().len(); + if invulnerables_len > 0 { + info!(target: TARGET, "no need to initialize invulnerables"); + return T::DbWeight::get().reads_writes(1, 0); + } + info!(target: TARGET, "initializing the set of invulnerables"); + + let raw_aura_keys: Vec<[u8; 32]> = vec![ + INVULNERABLE_AURA_A, + INVULNERABLE_AURA_B, + INVULNERABLE_AURA_C, + INVULNERABLE_AURA_D, + INVULNERABLE_AURA_E, + ]; + let raw_account_keys: Vec<[u8; 32]> = vec![ + INVULNERABLE_ACCOUNT_A, + INVULNERABLE_ACCOUNT_B, + INVULNERABLE_ACCOUNT_C, + INVULNERABLE_ACCOUNT_D, + INVULNERABLE_ACCOUNT_E, + ]; + + let validatorids: Vec<::ValidatorId> = + raw_account_keys.iter().map(|&pk| pk.into()).collect(); + + pallet_session::Validators::::put(validatorids); + + let queued_keys: Vec<( + ::ValidatorId, + ::Keys, + )> = raw_account_keys + .iter() + .zip(raw_aura_keys.iter()) + .map(|(&account, &aura)| { + ( + account.into(), + SessionKeys { aura: sr25519::Public::from_raw(aura).into() }.into(), + ) + }) + .collect(); + + pallet_session::QueuedKeys::::put(queued_keys); + + for (&account, &aura) in raw_account_keys.iter().zip(raw_aura_keys.iter()) { + pallet_session::NextKeys::::insert::< + ::ValidatorId, + ::Keys, + >( + account.into(), + SessionKeys { aura: sr25519::Public::from_raw(aura).into() }.into(), + ); + pallet_session::KeyOwner::::insert::< + _, + ::ValidatorId, + >((AURA, aura.encode()), account.into()); + } + + let mut invulnerables: Vec<::AccountId> = + raw_account_keys.iter().map(|&pk| pk.into()).collect(); + invulnerables.sort(); + let invulnerables: BoundedVec<_, T::MaxInvulnerables> = + invulnerables.try_into().unwrap(); + pallet_collator_selection::Invulnerables::::put(invulnerables); + + pallet_collator_selection::CandidacyBond::::put::>( + (500 * TEER).into(), + ); + + pallet_collator_selection::DesiredCandidates::::put::(5); + + T::DbWeight::get().reads_writes(0, 5 + 5 * 2) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(state: sp_std::vec::Vec) -> Result<(), TryRuntimeError> { + let invulnerables_len = + pallet_collator_selection::Invulnerables::::get().len() as u32; + let apriori_invulnerables_len: u32 = Decode::decode(&mut state.as_slice()).expect( + "the state parameter should be something that was generated by pre_upgrade", + ); + ensure!( + invulnerables_len > 0, + "invulnerables are empty after initialization. that should not happen" + ); + info!(target: TARGET, "apriori invulnerables: {}, aposteriori: {}", apriori_invulnerables_len, invulnerables_len); + Ok(()) + } + } + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/cumulus_pallet_parachain_system.rs b/polkadot-parachains/integritee-polkadot/src/weights/cumulus_pallet_parachain_system.rs new file mode 100644 index 00000000..c40550d5 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/cumulus_pallet_parachain_system.rs @@ -0,0 +1,59 @@ + +//! Autogenerated weights for `cumulus_pallet_parachain_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=cumulus_pallet_parachain_system +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/cumulus_pallet_parachain_system.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_parachain_system`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_parachain_system::WeightInfo for WeightInfo { + /// Storage: `ParachainSystem::LastDmqMqcHead` (r:1 w:1) + /// Proof: `ParachainSystem::LastDmqMqcHead` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::ProcessedDownwardMessages` (r:0 w:1) + /// Proof: `ParachainSystem::ProcessedDownwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::Pages` (r:0 w:1000) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + /// The range of component `n` is `[0, 1000]`. + fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `84` + // Estimated: `3517` + // Minimum execution time: 1_564_000 picoseconds. + Weight::from_parts(1_684_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + // Standard Error: 375_232 + .saturating_add(Weight::from_parts(146_504_836, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs b/polkadot-parachains/integritee-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs new file mode 100644 index 00000000..55c21c37 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs @@ -0,0 +1,137 @@ + +//! Autogenerated weights for `cumulus_pallet_xcmp_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=cumulus_pallet_xcmp_queue +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/cumulus_pallet_xcmp_queue.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_xcmp_queue`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo { + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:1) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`) + fn set_config_with_u32() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1497` + // Minimum execution time: 6_287_000 picoseconds. + Weight::from_parts(6_669_000, 0) + .saturating_add(Weight::from_parts(0, 1497)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn enqueue_xcmp_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `151` + // Estimated: `5487` + // Minimum execution time: 20_141_000 picoseconds. + Weight::from_parts(21_320_000, 0) + .saturating_add(Weight::from_parts(0, 5487)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) + fn suspend_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `2767` + // Minimum execution time: 4_098_000 picoseconds. + Weight::from_parts(4_465_000, 0) + .saturating_add(Weight::from_parts(0, 2767)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) + fn resume_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `144` + // Estimated: `2767` + // Minimum execution time: 5_044_000 picoseconds. + Weight::from_parts(5_510_000, 0) + .saturating_add(Weight::from_parts(0, 2767)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn take_first_concatenated_xcm() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 12_666_000 picoseconds. + Weight::from_parts(12_801_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn on_idle_good_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65780` + // Estimated: `69245` + // Minimum execution time: 140_131_000 picoseconds. + Weight::from_parts(146_147_000, 0) + .saturating_add(Weight::from_parts(0, 69245)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65743` + // Estimated: `69208` + // Minimum execution time: 59_608_000 picoseconds. + Weight::from_parts(60_675_000, 0) + .saturating_add(Weight::from_parts(0, 69208)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/frame_system.rs b/polkadot-parachains/integritee-polkadot/src/weights/frame_system.rs new file mode 100644 index 00000000..2be46e11 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/frame_system.rs @@ -0,0 +1,172 @@ + +//! Autogenerated weights for `frame_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=frame_system +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/frame_system.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `frame_system`. +pub struct WeightInfo(PhantomData); +impl frame_system::WeightInfo for WeightInfo { + /// The range of component `b` is `[0, 3932160]`. + fn remark(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_129_000 picoseconds. + Weight::from_parts(19_854_453, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 0 + .saturating_add(Weight::from_parts(264, 0).saturating_mul(b.into())) + } + /// The range of component `b` is `[0, 3932160]`. + fn remark_with_event(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_916_000 picoseconds. + Weight::from_parts(3_994_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 4 + .saturating_add(Weight::from_parts(1_401, 0).saturating_mul(b.into())) + } + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) + fn set_heap_pages() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 2_659_000 picoseconds. + Weight::from_parts(2_921_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `ParachainSystem::ValidationData` (r:1 w:0) + /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpgradeRestrictionSignal` (r:1 w:0) + /// Proof: `ParachainSystem::UpgradeRestrictionSignal` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingValidationCode` (r:1 w:1) + /// Proof: `ParachainSystem::PendingValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::NewValidationCode` (r:0 w:1) + /// Proof: `ParachainSystem::NewValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::DidSetValidationCode` (r:0 w:1) + /// Proof: `ParachainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_code() -> Weight { + // Proof Size summary in bytes: + // Measured: `164` + // Estimated: `1649` + // Minimum execution time: 97_427_757_000 picoseconds. + Weight::from_parts(100_968_425_000, 0) + .saturating_add(Weight::from_parts(0, 1649)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `i` is `[0, 1000]`. + fn set_storage(i: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_513_000 picoseconds. + Weight::from_parts(1_544_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 3_247 + .saturating_add(Weight::from_parts(680_182, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `i` is `[0, 1000]`. + fn kill_storage(i: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_461_000 picoseconds. + Weight::from_parts(1_601_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 2_234 + .saturating_add(Weight::from_parts(514_914, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[0, 1000]`. + fn kill_prefix(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `107 + p * (69 ±0)` + // Estimated: `110 + p * (70 ±0)` + // Minimum execution time: 3_501_000 picoseconds. + Weight::from_parts(3_576_000, 0) + .saturating_add(Weight::from_parts(0, 110)) + // Standard Error: 1_877 + .saturating_add(Weight::from_parts(946_660, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) + } + /// Storage: `System::AuthorizedUpgrade` (r:0 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + fn authorize_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_273_000 picoseconds. + Weight::from_parts(7_015_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::AuthorizedUpgrade` (r:1 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::ValidationData` (r:1 w:0) + /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpgradeRestrictionSignal` (r:1 w:0) + /// Proof: `ParachainSystem::UpgradeRestrictionSignal` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingValidationCode` (r:1 w:1) + /// Proof: `ParachainSystem::PendingValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::NewValidationCode` (r:0 w:1) + /// Proof: `ParachainSystem::NewValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::DidSetValidationCode` (r:0 w:1) + /// Proof: `ParachainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn apply_authorized_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `186` + // Estimated: `1671` + // Minimum execution time: 98_362_234_000 picoseconds. + Weight::from_parts(104_019_699_000, 0) + .saturating_add(Weight::from_parts(0, 1671)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/mod.rs b/polkadot-parachains/integritee-polkadot/src/weights/mod.rs new file mode 100644 index 00000000..553e33ad --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/mod.rs @@ -0,0 +1,33 @@ +//! The weights used in the integritee-parachain-runtime + +// the generated files do not pass clippy +#![allow(clippy::all)] + +pub mod cumulus_pallet_parachain_system; +pub mod frame_system; +pub mod pallet_asset_conversion; +pub mod pallet_asset_registry; +pub mod pallet_assets; +pub mod pallet_balances; +pub mod pallet_bounties; +pub mod pallet_child_bounties; +pub mod pallet_claims; +pub mod pallet_collator_selection; +pub mod pallet_collective; +pub mod pallet_democracy; +pub mod pallet_enclave_bridge; +pub mod pallet_message_queue; +pub mod pallet_multisig; +pub mod pallet_preimage; +pub mod pallet_proxy; +pub mod pallet_scheduler; +pub mod pallet_session; +pub mod pallet_sidechain; +pub mod pallet_teeracle; +pub mod pallet_teerdays; +pub mod pallet_teerex; +pub mod pallet_timestamp; +pub mod pallet_treasury; +pub mod pallet_utility; +pub mod pallet_vesting; +pub mod pallet_xcm; diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_asset_conversion.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_asset_conversion.rs new file mode 100644 index 00000000..d04d28b2 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_asset_conversion.rs @@ -0,0 +1,160 @@ + +//! Autogenerated weights for `pallet_asset_conversion` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_asset_conversion +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_asset_conversion.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_asset_conversion`. +pub struct WeightInfo(PhantomData); +impl pallet_asset_conversion::WeightInfo for WeightInfo { + /// Storage: `AssetConversion::Pools` (r:1 w:1) + /// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:2 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `AssetConversion::NextPoolAssetId` (r:1 w:1) + /// Proof: `AssetConversion::NextPoolAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `PoolAssets::Asset` (r:1 w:1) + /// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `PoolAssets::Account` (r:1 w:1) + /// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + fn create_pool() -> Weight { + // Proof Size summary in bytes: + // Measured: `709` + // Estimated: `6360` + // Minimum execution time: 67_248_000 picoseconds. + Weight::from_parts(68_932_000, 0) + .saturating_add(Weight::from_parts(0, 6360)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `AssetConversion::Pools` (r:1 w:0) + /// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:2 w:2) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:4 w:4) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `PoolAssets::Asset` (r:1 w:1) + /// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `PoolAssets::Account` (r:2 w:2) + /// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + fn add_liquidity() -> Weight { + // Proof Size summary in bytes: + // Measured: `1358` + // Estimated: `11426` + // Minimum execution time: 159_690_000 picoseconds. + Weight::from_parts(161_969_000, 0) + .saturating_add(Weight::from_parts(0, 11426)) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(10)) + } + /// Storage: `AssetConversion::Pools` (r:1 w:0) + /// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:2 w:2) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:4 w:4) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `PoolAssets::Asset` (r:1 w:1) + /// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `PoolAssets::Account` (r:1 w:1) + /// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + fn remove_liquidity() -> Weight { + // Proof Size summary in bytes: + // Measured: `1449` + // Estimated: `11426` + // Minimum execution time: 135_765_000 picoseconds. + Weight::from_parts(139_869_000, 0) + .saturating_add(Weight::from_parts(0, 11426)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(8)) + } + /// Storage: `Assets::Asset` (r:3 w:3) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:6 w:6) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// The range of component `n` is `[2, 3]`. + fn swap_exact_tokens_for_tokens(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `22 + n * (419 ±0)` + // Estimated: `990 + n * (5218 ±0)` + // Minimum execution time: 77_463_000 picoseconds. + Weight::from_parts(80_999_000, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 151_381 + .saturating_add(Weight::from_parts(2_658_373, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into()))) + .saturating_add(Weight::from_parts(0, 5218).saturating_mul(n.into())) + } + /// Storage: `Assets::Asset` (r:3 w:3) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:6 w:6) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// The range of component `n` is `[2, 3]`. + fn swap_tokens_for_exact_tokens(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `22 + n * (419 ±0)` + // Estimated: `990 + n * (5218 ±0)` + // Minimum execution time: 75_350_000 picoseconds. + Weight::from_parts(77_453_000, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 122_663 + .saturating_add(Weight::from_parts(1_227_074, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into()))) + .saturating_add(Weight::from_parts(0, 5218).saturating_mul(n.into())) + } + /// Storage: `AssetConversion::Pools` (r:1 w:0) + /// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:2 w:2) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `PoolAssets::Asset` (r:1 w:1) + /// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `PoolAssets::Account` (r:1 w:1) + /// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// The range of component `n` is `[0, 3]`. + fn touch(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `1422` + // Estimated: `6360` + // Minimum execution time: 39_451_000 picoseconds. + Weight::from_parts(41_932_889, 0) + .saturating_add(Weight::from_parts(0, 6360)) + // Standard Error: 91_671 + .saturating_add(Weight::from_parts(19_678_187, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into()))) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_asset_registry.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_asset_registry.rs new file mode 100644 index 00000000..64ae2a81 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_asset_registry.rs @@ -0,0 +1,65 @@ + +//! Autogenerated weights for `pallet_asset_registry` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_asset_registry +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_asset_registry.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_asset_registry`. +pub struct WeightInfo(PhantomData); +impl pallet_asset_registry::WeightInfo for WeightInfo { + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::AssetIdLocation` (r:1 w:1) + /// Proof: `AssetRegistry::AssetIdLocation` (`max_values`: None, `max_size`: Some(622), added: 3097, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::AssetLocationId` (r:0 w:1) + /// Proof: `AssetRegistry::AssetLocationId` (`max_values`: None, `max_size`: Some(622), added: 3097, mode: `MaxEncodedLen`) + fn register_reserve_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `123` + // Estimated: `4087` + // Minimum execution time: 20_421_000 picoseconds. + Weight::from_parts(21_074_000, 0) + .saturating_add(Weight::from_parts(0, 4087)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `AssetRegistry::AssetIdLocation` (r:1 w:1) + /// Proof: `AssetRegistry::AssetIdLocation` (`max_values`: None, `max_size`: Some(622), added: 3097, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::AssetLocationId` (r:0 w:1) + /// Proof: `AssetRegistry::AssetLocationId` (`max_values`: None, `max_size`: Some(622), added: 3097, mode: `MaxEncodedLen`) + fn unregister_reserve_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `107` + // Estimated: `4087` + // Minimum execution time: 14_089_000 picoseconds. + Weight::from_parts(14_749_000, 0) + .saturating_add(Weight::from_parts(0, 4087)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_assets.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_assets.rs new file mode 100644 index 00000000..140c5824 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_assets.rs @@ -0,0 +1,499 @@ + +//! Autogenerated weights for `pallet_assets` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_assets +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_assets.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_assets`. +pub struct WeightInfo(PhantomData); +impl pallet_assets::WeightInfo for WeightInfo { + fn create() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + fn force_create() -> Weight { + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `3675` + // Minimum execution time: 11_692_000 picoseconds. + Weight::from_parts(12_152_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + fn start_destroy() -> Weight { + // Proof Size summary in bytes: + // Measured: `314` + // Estimated: `3675` + // Minimum execution time: 14_875_000 picoseconds. + Weight::from_parts(15_746_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1001 w:1000) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1000 w:1000) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `c` is `[0, 1000]`. + fn destroy_accounts(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + c * (208 ±0)` + // Estimated: `3675 + c * (2609 ±0)` + // Minimum execution time: 18_699_000 picoseconds. + Weight::from_parts(18_959_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + // Standard Error: 62_085 + .saturating_add(Weight::from_parts(12_328_520, 0).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()))) + .saturating_add(Weight::from_parts(0, 2609).saturating_mul(c.into())) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Approvals` (r:1001 w:1000) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`) + /// The range of component `a` is `[0, 1000]`. + fn destroy_approvals(a: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `451 + a * (86 ±0)` + // Estimated: `3675 + a * (2623 ±0)` + // Minimum execution time: 13_091_000 picoseconds. + Weight::from_parts(13_378_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + // Standard Error: 55_270 + .saturating_add(Weight::from_parts(14_780_341, 0).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()))) + .saturating_add(Weight::from_parts(0, 2623).saturating_mul(a.into())) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Metadata` (r:1 w:0) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + fn finish_destroy() -> Weight { + // Proof Size summary in bytes: + // Measured: `280` + // Estimated: `3675` + // Minimum execution time: 12_313_000 picoseconds. + Weight::from_parts(13_058_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + fn mint() -> Weight { + // Proof Size summary in bytes: + // Measured: `280` + // Estimated: `3675` + // Minimum execution time: 22_932_000 picoseconds. + Weight::from_parts(23_478_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + fn burn() -> Weight { + // Proof Size summary in bytes: + // Measured: `388` + // Estimated: `3675` + // Minimum execution time: 31_245_000 picoseconds. + Weight::from_parts(32_290_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn transfer() -> Weight { + // Proof Size summary in bytes: + // Measured: `388` + // Estimated: `6208` + // Minimum execution time: 42_970_000 picoseconds. + Weight::from_parts(44_547_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn transfer_keep_alive() -> Weight { + // Proof Size summary in bytes: + // Measured: `388` + // Estimated: `6208` + // Minimum execution time: 38_817_000 picoseconds. + Weight::from_parts(39_996_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn force_transfer() -> Weight { + // Proof Size summary in bytes: + // Measured: `388` + // Estimated: `6208` + // Minimum execution time: 43_092_000 picoseconds. + Weight::from_parts(44_589_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + fn freeze() -> Weight { + // Proof Size summary in bytes: + // Measured: `388` + // Estimated: `3675` + // Minimum execution time: 16_353_000 picoseconds. + Weight::from_parts(16_937_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + fn thaw() -> Weight { + // Proof Size summary in bytes: + // Measured: `388` + // Estimated: `3675` + // Minimum execution time: 16_084_000 picoseconds. + Weight::from_parts(16_646_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + fn freeze_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `314` + // Estimated: `3675` + // Minimum execution time: 11_643_000 picoseconds. + Weight::from_parts(12_202_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + fn thaw_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `314` + // Estimated: `3675` + // Minimum execution time: 11_592_000 picoseconds. + Weight::from_parts(12_234_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Metadata` (r:1 w:0) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + fn transfer_ownership() -> Weight { + // Proof Size summary in bytes: + // Measured: `280` + // Estimated: `3675` + // Minimum execution time: 12_744_000 picoseconds. + Weight::from_parts(13_291_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + fn set_team() -> Weight { + // Proof Size summary in bytes: + // Measured: `280` + // Estimated: `3675` + // Minimum execution time: 11_258_000 picoseconds. + Weight::from_parts(11_553_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Metadata` (r:1 w:1) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + /// The range of component `n` is `[0, 50]`. + /// The range of component `s` is `[0, 50]`. + fn set_metadata(_n: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `280` + // Estimated: `3675` + // Minimum execution time: 22_717_000 picoseconds. + Weight::from_parts(39_847_391, 0) + .saturating_add(Weight::from_parts(0, 3675)) + // Standard Error: 16_100 + .saturating_add(Weight::from_parts(5_405, 0).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) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Metadata` (r:1 w:1) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + fn clear_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `444` + // Estimated: `3675` + // Minimum execution time: 23_874_000 picoseconds. + Weight::from_parts(24_679_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Metadata` (r:1 w:1) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + /// 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 { + // Proof Size summary in bytes: + // Measured: `119` + // Estimated: `3675` + // Minimum execution time: 9_613_000 picoseconds. + Weight::from_parts(16_756_273, 0) + .saturating_add(Weight::from_parts(0, 3675)) + // Standard Error: 9_434 + .saturating_add(Weight::from_parts(32_329, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Metadata` (r:1 w:1) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + fn force_clear_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `444` + // Estimated: `3675` + // Minimum execution time: 26_794_000 picoseconds. + Weight::from_parts(27_914_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + fn force_asset_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `280` + // Estimated: `3675` + // Minimum execution time: 10_353_000 picoseconds. + Weight::from_parts(11_049_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Approvals` (r:1 w:1) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`) + fn approve_transfer() -> Weight { + // Proof Size summary in bytes: + // Measured: `314` + // Estimated: `3675` + // Minimum execution time: 31_529_000 picoseconds. + Weight::from_parts(32_639_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Approvals` (r:1 w:1) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn transfer_approved() -> Weight { + // Proof Size summary in bytes: + // Measured: `558` + // Estimated: `6208` + // Minimum execution time: 61_641_000 picoseconds. + Weight::from_parts(63_663_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Approvals` (r:1 w:1) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`) + fn cancel_approval() -> Weight { + // Proof Size summary in bytes: + // Measured: `484` + // Estimated: `3675` + // Minimum execution time: 31_931_000 picoseconds. + Weight::from_parts(32_598_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Approvals` (r:1 w:1) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`) + fn force_cancel_approval() -> Weight { + // Proof Size summary in bytes: + // Measured: `484` + // Estimated: `3675` + // Minimum execution time: 32_312_000 picoseconds. + Weight::from_parts(32_877_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + fn set_min_balance() -> Weight { + // Proof Size summary in bytes: + // Measured: `280` + // Estimated: `3675` + // Minimum execution time: 11_273_000 picoseconds. + Weight::from_parts(11_757_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn touch() -> Weight { + // Proof Size summary in bytes: + // Measured: `420` + // Estimated: `3675` + // Minimum execution time: 30_994_000 picoseconds. + Weight::from_parts(31_625_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + fn touch_other() -> Weight { + // Proof Size summary in bytes: + // Measured: `280` + // Estimated: `3675` + // Minimum execution time: 28_892_000 picoseconds. + Weight::from_parts(29_777_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn refund() -> Weight { + // Proof Size summary in bytes: + // Measured: `546` + // Estimated: `3675` + // Minimum execution time: 29_370_000 picoseconds. + Weight::from_parts(30_226_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + fn refund_other() -> Weight { + // Proof Size summary in bytes: + // Measured: `439` + // Estimated: `3675` + // Minimum execution time: 27_453_000 picoseconds. + Weight::from_parts(28_456_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + fn block() -> Weight { + // Proof Size summary in bytes: + // Measured: `388` + // Estimated: `3675` + // Minimum execution time: 14_535_000 picoseconds. + Weight::from_parts(15_067_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_balances.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_balances.rs new file mode 100644 index 00000000..4d5452ee --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_balances.rs @@ -0,0 +1,162 @@ + +//! Autogenerated weights for `pallet_balances` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_balances +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_balances.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_balances`. +pub struct WeightInfo(PhantomData); +impl pallet_balances::WeightInfo for WeightInfo { + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn transfer_allow_death() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3593` + // Minimum execution time: 58_129_000 picoseconds. + Weight::from_parts(59_480_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn transfer_keep_alive() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3593` + // Minimum execution time: 45_851_000 picoseconds. + Weight::from_parts(46_788_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn force_set_balance_creating() -> Weight { + // Proof Size summary in bytes: + // Measured: `174` + // Estimated: `3593` + // Minimum execution time: 15_826_000 picoseconds. + Weight::from_parts(16_541_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn force_set_balance_killing() -> Weight { + // Proof Size summary in bytes: + // Measured: `174` + // Estimated: `3593` + // Minimum execution time: 21_602_000 picoseconds. + Weight::from_parts(22_714_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn force_transfer() -> Weight { + // Proof Size summary in bytes: + // Measured: `103` + // Estimated: `6196` + // Minimum execution time: 57_929_000 picoseconds. + Weight::from_parts(58_746_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn transfer_all() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3593` + // Minimum execution time: 55_270_000 picoseconds. + Weight::from_parts(56_271_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn force_unreserve() -> Weight { + // Proof Size summary in bytes: + // Measured: `174` + // Estimated: `3593` + // Minimum execution time: 18_886_000 picoseconds. + Weight::from_parts(19_577_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:999 w:999) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `u` is `[1, 1000]`. + fn upgrade_accounts(u: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + u * (136 ±0)` + // Estimated: `990 + u * (2603 ±0)` + // Minimum execution time: 17_710_000 picoseconds. + Weight::from_parts(126_198_327, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 127_941 + .saturating_add(Weight::from_parts(13_846_969, 0).saturating_mul(u.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) + .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) + } + /// Storage: `Balances::InactiveIssuance` (r:1 w:0) + /// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + fn force_adjust_total_issuance() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1501` + // Minimum execution time: 4_581_000 picoseconds. + Weight::from_parts(4_854_000, 0) + .saturating_add(Weight::from_parts(0, 1501)) + .saturating_add(T::DbWeight::get().reads(1)) + } + fn burn_allow_death() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 25_746_000 picoseconds. + Weight::from_parts(26_476_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn burn_keep_alive() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 17_465_000 picoseconds. + Weight::from_parts(18_043_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_bounties.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_bounties.rs new file mode 100644 index 00000000..f7f5d285 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_bounties.rs @@ -0,0 +1,210 @@ + +//! Autogenerated weights for `pallet_bounties` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_bounties +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_bounties.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_bounties`. +pub struct WeightInfo(PhantomData); +impl pallet_bounties::WeightInfo for WeightInfo { + /// Storage: `Bounties::BountyCount` (r:1 w:1) + /// Proof: `Bounties::BountyCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Bounties::BountyDescriptions` (r:0 w:1) + /// Proof: `Bounties::BountyDescriptions` (`max_values`: None, `max_size`: Some(16400), added: 18875, mode: `MaxEncodedLen`) + /// Storage: `Bounties::Bounties` (r:0 w:1) + /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`) + /// The range of component `d` is `[0, 16384]`. + fn propose_bounty(_d: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `143` + // Estimated: `3593` + // Minimum execution time: 29_226_000 picoseconds. + Weight::from_parts(31_988_668, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `Bounties::Bounties` (r:1 w:1) + /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`) + /// Storage: `Bounties::BountyApprovals` (r:1 w:1) + /// Proof: `Bounties::BountyApprovals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + fn approve_bounty() -> Weight { + // Proof Size summary in bytes: + // Measured: `235` + // Estimated: `3642` + // Minimum execution time: 11_126_000 picoseconds. + Weight::from_parts(11_585_000, 0) + .saturating_add(Weight::from_parts(0, 3642)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Bounties::Bounties` (r:1 w:1) + /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`) + fn propose_curator() -> Weight { + // Proof Size summary in bytes: + // Measured: `255` + // Estimated: `3642` + // Minimum execution time: 10_635_000 picoseconds. + Weight::from_parts(11_086_000, 0) + .saturating_add(Weight::from_parts(0, 3642)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Bounties::Bounties` (r:1 w:1) + /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn unassign_curator() -> Weight { + // Proof Size summary in bytes: + // Measured: `394` + // Estimated: `3642` + // Minimum execution time: 25_016_000 picoseconds. + Weight::from_parts(25_730_000, 0) + .saturating_add(Weight::from_parts(0, 3642)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Bounties::Bounties` (r:1 w:1) + /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn accept_curator() -> Weight { + // Proof Size summary in bytes: + // Measured: `390` + // Estimated: `3642` + // Minimum execution time: 24_902_000 picoseconds. + Weight::from_parts(25_928_000, 0) + .saturating_add(Weight::from_parts(0, 3642)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Bounties::Bounties` (r:1 w:1) + /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`) + /// Storage: `ChildBounties::ParentChildBounties` (r:1 w:0) + /// Proof: `ChildBounties::ParentChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`) + fn award_bounty() -> Weight { + // Proof Size summary in bytes: + // Measured: `371` + // Estimated: `3642` + // Minimum execution time: 14_758_000 picoseconds. + Weight::from_parts(15_347_000, 0) + .saturating_add(Weight::from_parts(0, 3642)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Bounties::Bounties` (r:1 w:1) + /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:3 w:3) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ChildBounties::ChildrenCuratorFees` (r:1 w:1) + /// Proof: `ChildBounties::ChildrenCuratorFees` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + /// Storage: `Bounties::BountyDescriptions` (r:0 w:1) + /// Proof: `Bounties::BountyDescriptions` (`max_values`: None, `max_size`: Some(16400), added: 18875, mode: `MaxEncodedLen`) + fn claim_bounty() -> Weight { + // Proof Size summary in bytes: + // Measured: `646` + // Estimated: `8799` + // Minimum execution time: 99_809_000 picoseconds. + Weight::from_parts(102_962_000, 0) + .saturating_add(Weight::from_parts(0, 8799)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `Bounties::Bounties` (r:1 w:1) + /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`) + /// Storage: `ChildBounties::ParentChildBounties` (r:1 w:0) + /// Proof: `ChildBounties::ParentChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Bounties::BountyDescriptions` (r:0 w:1) + /// Proof: `Bounties::BountyDescriptions` (`max_values`: None, `max_size`: Some(16400), added: 18875, mode: `MaxEncodedLen`) + fn close_bounty_proposed() -> Weight { + // Proof Size summary in bytes: + // Measured: `415` + // Estimated: `3642` + // Minimum execution time: 28_216_000 picoseconds. + Weight::from_parts(28_736_000, 0) + .saturating_add(Weight::from_parts(0, 3642)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Bounties::Bounties` (r:1 w:1) + /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`) + /// Storage: `ChildBounties::ParentChildBounties` (r:1 w:0) + /// Proof: `ChildBounties::ParentChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:3 w:3) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Bounties::BountyDescriptions` (r:0 w:1) + /// Proof: `Bounties::BountyDescriptions` (`max_values`: None, `max_size`: Some(16400), added: 18875, mode: `MaxEncodedLen`) + fn close_bounty_active() -> Weight { + // Proof Size summary in bytes: + // Measured: `716` + // Estimated: `8799` + // Minimum execution time: 69_341_000 picoseconds. + Weight::from_parts(71_361_000, 0) + .saturating_add(Weight::from_parts(0, 8799)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `Bounties::Bounties` (r:1 w:1) + /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`) + fn extend_bounty_expiry() -> Weight { + // Proof Size summary in bytes: + // Measured: `291` + // Estimated: `3642` + // Minimum execution time: 11_571_000 picoseconds. + Weight::from_parts(12_179_000, 0) + .saturating_add(Weight::from_parts(0, 3642)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Bounties::BountyApprovals` (r:1 w:1) + /// Proof: `Bounties::BountyApprovals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + /// Storage: `Bounties::Bounties` (r:100 w:100) + /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:200 w:200) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `b` is `[0, 100]`. + fn spend_funds(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + b * (296 ±0)` + // Estimated: `1887 + b * (5206 ±0)` + // Minimum execution time: 2_270_000 picoseconds. + Weight::from_parts(2_335_000, 0) + .saturating_add(Weight::from_parts(0, 1887)) + // Standard Error: 208_104 + .saturating_add(Weight::from_parts(33_071_165, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(b.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(b.into()))) + .saturating_add(Weight::from_parts(0, 5206).saturating_mul(b.into())) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_child_bounties.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_child_bounties.rs new file mode 100644 index 00000000..91a65701 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_child_bounties.rs @@ -0,0 +1,182 @@ + +//! Autogenerated weights for `pallet_child_bounties` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_child_bounties +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_child_bounties.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_child_bounties`. +pub struct WeightInfo(PhantomData); +impl pallet_child_bounties::WeightInfo for WeightInfo { + /// Storage: `ChildBounties::ParentChildBounties` (r:1 w:1) + /// Proof: `ChildBounties::ParentChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`) + /// Storage: `Bounties::Bounties` (r:1 w:0) + /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ChildBounties::ChildBountyCount` (r:1 w:1) + /// Proof: `ChildBounties::ChildBountyCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ChildBounties::ChildBountyDescriptions` (r:0 w:1) + /// Proof: `ChildBounties::ChildBountyDescriptions` (`max_values`: None, `max_size`: Some(16400), added: 18875, mode: `MaxEncodedLen`) + /// Storage: `ChildBounties::ChildBounties` (r:0 w:1) + /// Proof: `ChildBounties::ChildBounties` (`max_values`: None, `max_size`: Some(145), added: 2620, mode: `MaxEncodedLen`) + /// The range of component `d` is `[0, 16384]`. + fn add_child_bounty(_d: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `511` + // Estimated: `6196` + // Minimum execution time: 62_013_000 picoseconds. + Weight::from_parts(82_560_769, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `Bounties::Bounties` (r:1 w:0) + /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`) + /// Storage: `ChildBounties::ChildBounties` (r:1 w:1) + /// Proof: `ChildBounties::ChildBounties` (`max_values`: None, `max_size`: Some(145), added: 2620, mode: `MaxEncodedLen`) + /// Storage: `ChildBounties::ChildrenCuratorFees` (r:1 w:1) + /// Proof: `ChildBounties::ChildrenCuratorFees` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + fn propose_curator() -> Weight { + // Proof Size summary in bytes: + // Measured: `565` + // Estimated: `3642` + // Minimum execution time: 16_863_000 picoseconds. + Weight::from_parts(17_681_000, 0) + .saturating_add(Weight::from_parts(0, 3642)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Bounties::Bounties` (r:1 w:0) + /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`) + /// Storage: `ChildBounties::ChildBounties` (r:1 w:1) + /// Proof: `ChildBounties::ChildBounties` (`max_values`: None, `max_size`: Some(145), added: 2620, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn accept_curator() -> Weight { + // Proof Size summary in bytes: + // Measured: `711` + // Estimated: `3642` + // Minimum execution time: 29_811_000 picoseconds. + Weight::from_parts(31_072_000, 0) + .saturating_add(Weight::from_parts(0, 3642)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `ChildBounties::ChildBounties` (r:1 w:1) + /// Proof: `ChildBounties::ChildBounties` (`max_values`: None, `max_size`: Some(145), added: 2620, mode: `MaxEncodedLen`) + /// Storage: `Bounties::Bounties` (r:1 w:0) + /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn unassign_curator() -> Weight { + // Proof Size summary in bytes: + // Measured: `711` + // Estimated: `3642` + // Minimum execution time: 29_488_000 picoseconds. + Weight::from_parts(30_506_000, 0) + .saturating_add(Weight::from_parts(0, 3642)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Bounties::Bounties` (r:1 w:0) + /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`) + /// Storage: `ChildBounties::ChildBounties` (r:1 w:1) + /// Proof: `ChildBounties::ChildBounties` (`max_values`: None, `max_size`: Some(145), added: 2620, mode: `MaxEncodedLen`) + fn award_child_bounty() -> Weight { + // Proof Size summary in bytes: + // Measured: `608` + // Estimated: `3642` + // Minimum execution time: 17_292_000 picoseconds. + Weight::from_parts(18_088_000, 0) + .saturating_add(Weight::from_parts(0, 3642)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `ChildBounties::ChildBounties` (r:1 w:1) + /// Proof: `ChildBounties::ChildBounties` (`max_values`: None, `max_size`: Some(145), added: 2620, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:3 w:3) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ChildBounties::ParentChildBounties` (r:1 w:1) + /// Proof: `ChildBounties::ParentChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`) + /// Storage: `ChildBounties::ChildBountyDescriptions` (r:0 w:1) + /// Proof: `ChildBounties::ChildBountyDescriptions` (`max_values`: None, `max_size`: Some(16400), added: 18875, mode: `MaxEncodedLen`) + fn claim_child_bounty() -> Weight { + // Proof Size summary in bytes: + // Measured: `562` + // Estimated: `8799` + // Minimum execution time: 96_825_000 picoseconds. + Weight::from_parts(98_616_000, 0) + .saturating_add(Weight::from_parts(0, 8799)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `Bounties::Bounties` (r:1 w:0) + /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`) + /// Storage: `ChildBounties::ChildBounties` (r:1 w:1) + /// Proof: `ChildBounties::ChildBounties` (`max_values`: None, `max_size`: Some(145), added: 2620, mode: `MaxEncodedLen`) + /// Storage: `ChildBounties::ChildrenCuratorFees` (r:1 w:1) + /// Proof: `ChildBounties::ChildrenCuratorFees` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + /// Storage: `ChildBounties::ParentChildBounties` (r:1 w:1) + /// Proof: `ChildBounties::ParentChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ChildBounties::ChildBountyDescriptions` (r:0 w:1) + /// Proof: `ChildBounties::ChildBountyDescriptions` (`max_values`: None, `max_size`: Some(16400), added: 18875, mode: `MaxEncodedLen`) + fn close_child_bounty_added() -> Weight { + // Proof Size summary in bytes: + // Measured: `811` + // Estimated: `6196` + // Minimum execution time: 64_334_000 picoseconds. + Weight::from_parts(66_146_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `Bounties::Bounties` (r:1 w:0) + /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`) + /// Storage: `ChildBounties::ChildBounties` (r:1 w:1) + /// Proof: `ChildBounties::ChildBounties` (`max_values`: None, `max_size`: Some(145), added: 2620, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:3 w:3) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ChildBounties::ChildrenCuratorFees` (r:1 w:1) + /// Proof: `ChildBounties::ChildrenCuratorFees` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + /// Storage: `ChildBounties::ParentChildBounties` (r:1 w:1) + /// Proof: `ChildBounties::ParentChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`) + /// Storage: `ChildBounties::ChildBountyDescriptions` (r:0 w:1) + /// Proof: `ChildBounties::ChildBountyDescriptions` (`max_values`: None, `max_size`: Some(16400), added: 18875, mode: `MaxEncodedLen`) + fn close_child_bounty_active() -> Weight { + // Proof Size summary in bytes: + // Measured: `998` + // Estimated: `8799` + // Minimum execution time: 81_279_000 picoseconds. + Weight::from_parts(83_694_000, 0) + .saturating_add(Weight::from_parts(0, 8799)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(7)) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_claims.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_claims.rs new file mode 100644 index 00000000..56c5839b --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_claims.rs @@ -0,0 +1,151 @@ + +//! Autogenerated weights for `pallet_claims` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_claims +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_claims.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_claims`. +pub struct WeightInfo(PhantomData); +impl pallet_claims::WeightInfo for WeightInfo { + /// Storage: `Claims::Claims` (r:1 w:1) + /// Proof: `Claims::Claims` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Claims::Signing` (r:1 w:1) + /// Proof: `Claims::Signing` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Claims::Total` (r:1 w:1) + /// Proof: `Claims::Total` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Claims::Vesting` (r:1 w:1) + /// Proof: `Claims::Vesting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + fn claim() -> Weight { + // Proof Size summary in bytes: + // Measured: `363` + // Estimated: `4764` + // Minimum execution time: 154_825_000 picoseconds. + Weight::from_parts(160_132_000, 0) + .saturating_add(Weight::from_parts(0, 4764)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `Claims::Total` (r:1 w:1) + /// Proof: `Claims::Total` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Claims::Vesting` (r:0 w:1) + /// Proof: `Claims::Vesting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Claims::Claims` (r:0 w:1) + /// Proof: `Claims::Claims` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Claims::Signing` (r:0 w:1) + /// Proof: `Claims::Signing` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn mint_claim() -> Weight { + // Proof Size summary in bytes: + // Measured: `145` + // Estimated: `1630` + // Minimum execution time: 10_317_000 picoseconds. + Weight::from_parts(13_119_000, 0) + .saturating_add(Weight::from_parts(0, 1630)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `Claims::Claims` (r:1 w:1) + /// Proof: `Claims::Claims` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Claims::Signing` (r:1 w:1) + /// Proof: `Claims::Signing` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Claims::Total` (r:1 w:1) + /// Proof: `Claims::Total` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Claims::Vesting` (r:1 w:1) + /// Proof: `Claims::Vesting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + fn claim_attest() -> Weight { + // Proof Size summary in bytes: + // Measured: `363` + // Estimated: `4764` + // Minimum execution time: 157_326_000 picoseconds. + Weight::from_parts(168_515_000, 0) + .saturating_add(Weight::from_parts(0, 4764)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `Claims::Preclaims` (r:1 w:1) + /// Proof: `Claims::Preclaims` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Claims::Signing` (r:1 w:1) + /// Proof: `Claims::Signing` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Claims::Claims` (r:1 w:1) + /// Proof: `Claims::Claims` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Claims::Total` (r:1 w:1) + /// Proof: `Claims::Total` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Claims::Vesting` (r:1 w:1) + /// Proof: `Claims::Vesting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + fn attest() -> Weight { + // Proof Size summary in bytes: + // Measured: `437` + // Estimated: `4764` + // Minimum execution time: 79_030_000 picoseconds. + Weight::from_parts(83_892_000, 0) + .saturating_add(Weight::from_parts(0, 4764)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(7)) + } + /// Storage: `Claims::Claims` (r:1 w:2) + /// Proof: `Claims::Claims` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Claims::Vesting` (r:1 w:2) + /// Proof: `Claims::Vesting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Claims::Signing` (r:1 w:2) + /// Proof: `Claims::Signing` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Claims::Preclaims` (r:1 w:1) + /// Proof: `Claims::Preclaims` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn move_claim() -> Weight { + // Proof Size summary in bytes: + // Measured: `369` + // Estimated: `3834` + // Minimum execution time: 26_184_000 picoseconds. + Weight::from_parts(29_168_000, 0) + .saturating_add(Weight::from_parts(0, 3834)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(7)) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_collator_selection.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_collator_selection.rs new file mode 100644 index 00000000..ad895e3c --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_collator_selection.rs @@ -0,0 +1,265 @@ + +//! Autogenerated weights for `pallet_collator_selection` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_collator_selection +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_collator_selection.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_collator_selection`. +pub struct WeightInfo(PhantomData); +impl pallet_collator_selection::WeightInfo for WeightInfo { + /// Storage: `Session::NextKeys` (r:20 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::Invulnerables` (r:0 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 20]`. + fn set_invulnerables(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `198 + b * (79 ±0)` + // Estimated: `1189 + b * (2554 ±0)` + // Minimum execution time: 12_790_000 picoseconds. + Weight::from_parts(12_369_010, 0) + .saturating_add(Weight::from_parts(0, 1189)) + // Standard Error: 11_599 + .saturating_add(Weight::from_parts(2_851_372, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 2554).saturating_mul(b.into())) + } + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 19]`. + /// The range of component `c` is `[1, 99]`. + fn add_invulnerable(b: u32, c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `865 + b * (32 ±0) + c * (53 ±0)` + // Estimated: `6287 + b * (37 ±0) + c * (53 ±0)` + // Minimum execution time: 36_812_000 picoseconds. + Weight::from_parts(39_602_312, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 6_208 + .saturating_add(Weight::from_parts(129_158, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 53).saturating_mul(c.into())) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:0) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// The range of component `b` is `[5, 20]`. + fn remove_invulnerable(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `186 + b * (32 ±0)` + // Estimated: `6287` + // Minimum execution time: 10_029_000 picoseconds. + Weight::from_parts(8_240_097, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 9_026 + .saturating_add(Weight::from_parts(370_393, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `CollatorSelection::DesiredCandidates` (r:0 w:1) + /// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + fn set_desired_candidates() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_623_000 picoseconds. + Weight::from_parts(5_139_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:1) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:100 w:100) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:100) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[0, 100]`. + /// The range of component `k` is `[0, 100]`. + fn set_candidacy_bond(c: u32, k: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + c * (181 ±0) + k * (114 ±0)` + // Estimated: `6287 + c * (901 ±29) + k * (901 ±29)` + // Minimum execution time: 10_577_000 picoseconds. + Weight::from_parts(10_839_000, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 153_879 + .saturating_add(Weight::from_parts(5_106_068, 0).saturating_mul(c.into())) + // Standard Error: 153_879 + .saturating_add(Weight::from_parts(5_434_878, 0).saturating_mul(k.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) + .saturating_add(Weight::from_parts(0, 901).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 901).saturating_mul(k.into())) + } + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// The range of component `c` is `[3, 100]`. + fn update_bond(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `364 + c * (49 ±0)` + // Estimated: `6287` + // Minimum execution time: 23_608_000 picoseconds. + Weight::from_parts(27_058_138, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 1_307 + .saturating_add(Weight::from_parts(86_137, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[1, 99]`. + fn register_as_candidate(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `853 + c * (52 ±0)` + // Estimated: `6287 + c * (54 ±0)` + // Minimum execution time: 31_664_000 picoseconds. + Weight::from_parts(36_805_168, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 3_465 + .saturating_add(Weight::from_parts(119_103, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) + } + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:2) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[3, 100]`. + fn take_candidate_slot(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `992 + c * (52 ±0)` + // Estimated: `6287 + c * (54 ±0)` + // Minimum execution time: 47_579_000 picoseconds. + Weight::from_parts(52_306_383, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 3_843 + .saturating_add(Weight::from_parts(158_825, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[3, 100]`. + fn leave_intent(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `414 + c * (48 ±0)` + // Estimated: `6287` + // Minimum execution time: 25_908_000 picoseconds. + Weight::from_parts(29_423_202, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 1_879 + .saturating_add(Weight::from_parts(104_247, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `System::BlockWeight` (r:1 w:1) + /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + fn note_author() -> Weight { + // Proof Size summary in bytes: + // Measured: `140` + // Estimated: `6196` + // Minimum execution time: 36_513_000 picoseconds. + Weight::from_parts(37_337_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:0) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:100 w:0) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::DesiredCandidates` (r:1 w:0) + /// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `System::BlockWeight` (r:1 w:1) + /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:97 w:97) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `r` is `[1, 100]`. + /// The range of component `c` is `[1, 100]`. + fn new_session(r: u32, c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `2231 + c * (97 ±0) + r * (114 ±0)` + // Estimated: `6287 + c * (2519 ±0) + r * (2603 ±0)` + // Minimum execution time: 18_109_000 picoseconds. + Weight::from_parts(18_446_000, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 340_798 + .saturating_add(Weight::from_parts(13_454_281, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) + .saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 2603).saturating_mul(r.into())) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_collective.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_collective.rs new file mode 100644 index 00000000..ac523f44 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_collective.rs @@ -0,0 +1,287 @@ + +//! Autogenerated weights for `pallet_collective` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_collective +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_collective.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_collective`. +pub struct WeightInfo(PhantomData); +impl pallet_collective::WeightInfo for WeightInfo { + /// Storage: `Council::Members` (r:1 w:1) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:0) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Voting` (r:100 w:100) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:0 w:1) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// 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 { + // Proof Size summary in bytes: + // Measured: `0 + m * (3232 ±0) + p * (3190 ±0)` + // Estimated: `15728 + m * (1967 ±24) + p * (4332 ±24)` + // Minimum execution time: 18_216_000 picoseconds. + Weight::from_parts(18_798_000, 0) + .saturating_add(Weight::from_parts(0, 15728)) + // Standard Error: 49_281 + .saturating_add(Weight::from_parts(3_560_558, 0).saturating_mul(m.into())) + // Standard Error: 49_281 + .saturating_add(Weight::from_parts(6_802_635, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 1967).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 4332).saturating_mul(p.into())) + } + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn execute(b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `69 + m * (32 ±0)` + // Estimated: `1555 + m * (32 ±0)` + // Minimum execution time: 10_805_000 picoseconds. + Weight::from_parts(8_981_698, 0) + .saturating_add(Weight::from_parts(0, 1555)) + // Standard Error: 51 + .saturating_add(Weight::from_parts(2_754, 0).saturating_mul(b.into())) + // Standard Error: 529 + .saturating_add(Weight::from_parts(22_953, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) + } + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:1 w:0) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn propose_execute(b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `69 + m * (32 ±0)` + // Estimated: `3535 + m * (32 ±0)` + // Minimum execution time: 12_839_000 picoseconds. + Weight::from_parts(12_803_254, 0) + .saturating_add(Weight::from_parts(0, 3535)) + // Standard Error: 32 + .saturating_add(Weight::from_parts(1_142, 0).saturating_mul(b.into())) + // Standard Error: 333 + .saturating_add(Weight::from_parts(13_951, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) + } + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:1 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalCount` (r:1 w:1) + /// Proof: `Council::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Voting` (r:0 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// 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 { + // Proof Size summary in bytes: + // Measured: `359 + m * (32 ±0) + p * (36 ±0)` + // Estimated: `3751 + m * (33 ±0) + p * (36 ±0)` + // Minimum execution time: 17_637_000 picoseconds. + Weight::from_parts(18_678_046, 0) + .saturating_add(Weight::from_parts(0, 3751)) + // Standard Error: 192 + .saturating_add(Weight::from_parts(2_597, 0).saturating_mul(b.into())) + // Standard Error: 2_012 + .saturating_add(Weight::from_parts(20_909, 0).saturating_mul(m.into())) + // Standard Error: 1_987 + .saturating_add(Weight::from_parts(169_349, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 33).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) + } + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[5, 100]`. + fn vote(m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `808 + m * (64 ±0)` + // Estimated: `4272 + m * (64 ±0)` + // Minimum execution time: 18_624_000 picoseconds. + Weight::from_parts(20_848_255, 0) + .saturating_add(Weight::from_parts(0, 4272)) + // Standard Error: 634 + .saturating_add(Weight::from_parts(25_595, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) + } + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:0 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// 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 { + // Proof Size summary in bytes: + // Measured: `397 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `3842 + m * (65 ±0) + p * (36 ±0)` + // Minimum execution time: 20_538_000 picoseconds. + Weight::from_parts(21_344_840, 0) + .saturating_add(Weight::from_parts(0, 3842)) + // Standard Error: 2_003 + .saturating_add(Weight::from_parts(26_242, 0).saturating_mul(m.into())) + // Standard Error: 1_953 + .saturating_add(Weight::from_parts(170_843, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) + } + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:1 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// 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 { + // Proof Size summary in bytes: + // Measured: `699 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `4016 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` + // Minimum execution time: 28_917_000 picoseconds. + Weight::from_parts(31_136_065, 0) + .saturating_add(Weight::from_parts(0, 4016)) + // Standard Error: 188 + .saturating_add(Weight::from_parts(1_533, 0).saturating_mul(b.into())) + // Standard Error: 1_990 + .saturating_add(Weight::from_parts(6_637, 0).saturating_mul(m.into())) + // Standard Error: 1_940 + .saturating_add(Weight::from_parts(190_926, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) + } + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:1 w:0) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:0 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `417 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `3862 + m * (65 ±0) + p * (36 ±0)` + // Minimum execution time: 22_203_000 picoseconds. + Weight::from_parts(22_281_152, 0) + .saturating_add(Weight::from_parts(0, 3862)) + // Standard Error: 2_732 + .saturating_add(Weight::from_parts(47_246, 0).saturating_mul(m.into())) + // Standard Error: 2_664 + .saturating_add(Weight::from_parts(164_906, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) + } + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:1 w:0) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:1 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// 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 { + // Proof Size summary in bytes: + // Measured: `719 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `4036 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` + // Minimum execution time: 31_189_000 picoseconds. + Weight::from_parts(30_956_765, 0) + .saturating_add(Weight::from_parts(0, 4036)) + // Standard Error: 516 + .saturating_add(Weight::from_parts(2_378, 0).saturating_mul(b.into())) + // Standard Error: 5_453 + .saturating_add(Weight::from_parts(39_998, 0).saturating_mul(m.into())) + // Standard Error: 5_315 + .saturating_add(Weight::from_parts(192_314, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) + } + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Voting` (r:0 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:0 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[1, 100]`. + fn disapprove_proposal(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `226 + p * (32 ±0)` + // Estimated: `1711 + p * (32 ±0)` + // Minimum execution time: 11_393_000 picoseconds. + Weight::from_parts(12_989_743, 0) + .saturating_add(Weight::from_parts(0, 1711)) + // Standard Error: 765 + .saturating_add(Weight::from_parts(153_401, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_democracy.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_democracy.rs new file mode 100644 index 00000000..a17d5017 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_democracy.rs @@ -0,0 +1,516 @@ + +//! Autogenerated weights for `pallet_democracy` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_democracy +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_democracy.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_democracy`. +pub struct WeightInfo(PhantomData); +impl pallet_democracy::WeightInfo for WeightInfo { + /// Storage: `Democracy::PublicPropCount` (r:1 w:1) + /// Proof: `Democracy::PublicPropCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::PublicProps` (r:1 w:1) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Democracy::Blacklist` (r:1 w:0) + /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(3238), added: 5713, mode: `MaxEncodedLen`) + /// Storage: `Democracy::DepositOf` (r:0 w:1) + /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(3230), added: 5705, mode: `MaxEncodedLen`) + fn propose() -> Weight { + // Proof Size summary in bytes: + // Measured: `4734` + // Estimated: `18187` + // Minimum execution time: 43_064_000 picoseconds. + Weight::from_parts(45_177_000, 0) + .saturating_add(Weight::from_parts(0, 18187)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Democracy::DepositOf` (r:1 w:1) + /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(3230), added: 5705, mode: `MaxEncodedLen`) + fn second() -> Weight { + // Proof Size summary in bytes: + // Measured: `3489` + // Estimated: `6695` + // Minimum execution time: 34_121_000 picoseconds. + Weight::from_parts(36_600_000, 0) + .saturating_add(Weight::from_parts(0, 6695)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + fn vote_new() -> Weight { + // Proof Size summary in bytes: + // Measured: `3365` + // Estimated: `7260` + // Minimum execution time: 49_594_000 picoseconds. + Weight::from_parts(51_995_000, 0) + .saturating_add(Weight::from_parts(0, 7260)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + fn vote_existing() -> Weight { + // Proof Size summary in bytes: + // Measured: `3387` + // Estimated: `7260` + // Minimum execution time: 53_459_000 picoseconds. + Weight::from_parts(55_411_000, 0) + .saturating_add(Weight::from_parts(0, 7260)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::Cancellations` (r:1 w:1) + /// Proof: `Democracy::Cancellations` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + fn emergency_cancel() -> Weight { + // Proof Size summary in bytes: + // Measured: `299` + // Estimated: `3666` + // Minimum execution time: 20_522_000 picoseconds. + Weight::from_parts(21_342_000, 0) + .saturating_add(Weight::from_parts(0, 3666)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Democracy::PublicProps` (r:1 w:1) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Democracy::DepositOf` (r:1 w:1) + /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(3230), added: 5705, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:3 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + /// Storage: `Democracy::NextExternal` (r:1 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::Blacklist` (r:0 w:1) + /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(3238), added: 5713, mode: `MaxEncodedLen`) + fn blacklist() -> Weight { + // Proof Size summary in bytes: + // Measured: `6182` + // Estimated: `18187` + // Minimum execution time: 95_112_000 picoseconds. + Weight::from_parts(98_864_000, 0) + .saturating_add(Weight::from_parts(0, 18187)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(8)) + } + /// Storage: `Democracy::NextExternal` (r:1 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::Blacklist` (r:1 w:0) + /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(3238), added: 5713, mode: `MaxEncodedLen`) + fn external_propose() -> Weight { + // Proof Size summary in bytes: + // Measured: `3349` + // Estimated: `6703` + // Minimum execution time: 10_318_000 picoseconds. + Weight::from_parts(10_889_000, 0) + .saturating_add(Weight::from_parts(0, 6703)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Democracy::NextExternal` (r:0 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + fn external_propose_majority() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_067_000 picoseconds. + Weight::from_parts(2_185_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Democracy::NextExternal` (r:0 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + fn external_propose_default() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_012_000 picoseconds. + Weight::from_parts(2_097_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Democracy::NextExternal` (r:1 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumCount` (r:1 w:1) + /// Proof: `Democracy::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:2) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:0 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + fn fast_track() -> Weight { + // Proof Size summary in bytes: + // Measured: `219` + // Estimated: `3518` + // Minimum execution time: 19_555_000 picoseconds. + Weight::from_parts(20_574_000, 0) + .saturating_add(Weight::from_parts(0, 3518)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `Democracy::NextExternal` (r:1 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::Blacklist` (r:1 w:1) + /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(3238), added: 5713, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + fn veto_external() -> Weight { + // Proof Size summary in bytes: + // Measured: `3452` + // Estimated: `6703` + // Minimum execution time: 23_238_000 picoseconds. + Weight::from_parts(23_664_000, 0) + .saturating_add(Weight::from_parts(0, 6703)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Democracy::PublicProps` (r:1 w:1) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Democracy::DepositOf` (r:1 w:1) + /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(3230), added: 5705, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + fn cancel_proposal() -> Weight { + // Proof Size summary in bytes: + // Measured: `6093` + // Estimated: `18187` + // Minimum execution time: 78_749_000 picoseconds. + Weight::from_parts(81_951_000, 0) + .saturating_add(Weight::from_parts(0, 18187)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:0 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + fn cancel_referendum() -> Weight { + // Proof Size summary in bytes: + // Measured: `204` + // Estimated: `3518` + // Minimum execution time: 14_131_000 picoseconds. + Weight::from_parts(14_734_000, 0) + .saturating_add(Weight::from_parts(0, 3518)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Democracy::LowestUnbaked` (r:1 w:1) + /// Proof: `Democracy::LowestUnbaked` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumCount` (r:1 w:0) + /// Proof: `Democracy::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:0) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// The range of component `r` is `[0, 99]`. + fn on_initialize_base(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `177 + r * (86 ±0)` + // Estimated: `1489 + r * (2676 ±0)` + // Minimum execution time: 4_650_000 picoseconds. + Weight::from_parts(4_807_000, 0) + .saturating_add(Weight::from_parts(0, 1489)) + // Standard Error: 11_647 + .saturating_add(Weight::from_parts(3_191_733, 0).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)) + .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) + } + /// Storage: `Democracy::LowestUnbaked` (r:1 w:1) + /// Proof: `Democracy::LowestUnbaked` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumCount` (r:1 w:0) + /// Proof: `Democracy::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::LastTabledWasExternal` (r:1 w:0) + /// Proof: `Democracy::LastTabledWasExternal` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `Democracy::NextExternal` (r:1 w:0) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::PublicProps` (r:1 w:0) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:0) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// The range of component `r` is `[0, 99]`. + fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `177 + r * (86 ±0)` + // Estimated: `18187 + r * (2676 ±0)` + // Minimum execution time: 6_585_000 picoseconds. + Weight::from_parts(8_833_259, 0) + .saturating_add(Weight::from_parts(0, 18187)) + // Standard Error: 6_610 + .saturating_add(Weight::from_parts(3_057_238, 0).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)) + .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) + } + /// Storage: `Democracy::VotingOf` (r:3 w:3) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:99) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// The range of component `r` is `[0, 99]`. + fn delegate(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `729 + r * (108 ±0)` + // Estimated: `19800 + r * (2676 ±0)` + // Minimum execution time: 35_585_000 picoseconds. + Weight::from_parts(45_509_364, 0) + .saturating_add(Weight::from_parts(0, 19800)) + // Standard Error: 10_791 + .saturating_add(Weight::from_parts(3_840_027, 0).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(4)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) + } + /// Storage: `Democracy::VotingOf` (r:2 w:2) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:99) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// The range of component `r` is `[0, 99]`. + fn undelegate(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `426 + r * (108 ±0)` + // Estimated: `13530 + r * (2676 ±0)` + // Minimum execution time: 16_050_000 picoseconds. + Weight::from_parts(20_871_656, 0) + .saturating_add(Weight::from_parts(0, 13530)) + // Standard Error: 7_255 + .saturating_add(Weight::from_parts(3_811_021, 0).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()))) + .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) + } + /// Storage: `Democracy::PublicProps` (r:0 w:1) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + fn clear_public_proposals() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_152_000 picoseconds. + Weight::from_parts(2_282_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `r` is `[0, 99]`. + fn unlock_remove(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `421` + // Estimated: `7260` + // Minimum execution time: 19_178_000 picoseconds. + Weight::from_parts(30_899_088, 0) + .saturating_add(Weight::from_parts(0, 7260)) + // Standard Error: 3_214 + .saturating_add(Weight::from_parts(79_220, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `r` is `[0, 99]`. + fn unlock_set(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `422 + r * (22 ±0)` + // Estimated: `7260` + // Minimum execution time: 27_288_000 picoseconds. + Weight::from_parts(31_738_067, 0) + .saturating_add(Weight::from_parts(0, 7260)) + // Standard Error: 2_355 + .saturating_add(Weight::from_parts(99_952, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// The range of component `r` is `[1, 100]`. + fn remove_vote(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `661 + r * (26 ±0)` + // Estimated: `7260` + // Minimum execution time: 13_545_000 picoseconds. + Weight::from_parts(17_149_338, 0) + .saturating_add(Weight::from_parts(0, 7260)) + // Standard Error: 1_769 + .saturating_add(Weight::from_parts(107_398, 0).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) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// The range of component `r` is `[1, 100]`. + fn remove_other_vote(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `661 + r * (26 ±0)` + // Estimated: `7260` + // Minimum execution time: 13_866_000 picoseconds. + Weight::from_parts(17_075_745, 0) + .saturating_add(Weight::from_parts(0, 7260)) + // Standard Error: 1_486 + .saturating_add(Weight::from_parts(111_768, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Democracy::NextExternal` (r:1 w:0) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:0) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:0 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + fn set_external_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `323` + // Estimated: `3556` + // Minimum execution time: 15_114_000 picoseconds. + Weight::from_parts(15_973_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Democracy::NextExternal` (r:1 w:0) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + fn clear_external_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `219` + // Estimated: `3518` + // Minimum execution time: 12_323_000 picoseconds. + Weight::from_parts(12_833_000, 0) + .saturating_add(Weight::from_parts(0, 3518)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Democracy::PublicProps` (r:1 w:0) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:0) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:0 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + fn set_proposal_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `4855` + // Estimated: `18187` + // Minimum execution time: 36_785_000 picoseconds. + Weight::from_parts(37_524_000, 0) + .saturating_add(Weight::from_parts(0, 18187)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Democracy::PublicProps` (r:1 w:0) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + fn clear_proposal_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `4755` + // Estimated: `18187` + // Minimum execution time: 32_644_000 picoseconds. + Weight::from_parts(33_843_000, 0) + .saturating_add(Weight::from_parts(0, 18187)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:0) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:0 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + fn set_referendum_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `178` + // Estimated: `3556` + // Minimum execution time: 11_636_000 picoseconds. + Weight::from_parts(12_382_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:0) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + fn clear_referendum_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `235` + // Estimated: `3666` + // Minimum execution time: 14_619_000 picoseconds. + Weight::from_parts(15_154_000, 0) + .saturating_add(Weight::from_parts(0, 3666)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_enclave_bridge.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_enclave_bridge.rs new file mode 100644 index 00000000..60932369 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_enclave_bridge.rs @@ -0,0 +1,142 @@ + +//! Autogenerated weights for `pallet_enclave_bridge` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_enclave_bridge +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_enclave_bridge.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_enclave_bridge`. +pub struct WeightInfo(PhantomData); +impl pallet_enclave_bridge::WeightInfo for WeightInfo { + fn invoke() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 9_144_000 picoseconds. + Weight::from_parts(9_653_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `Teerex::SovereignEnclaves` (r:1 w:0) + /// Proof: `Teerex::SovereignEnclaves` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `EnclaveBridge::ShardConfigRegistry` (r:1 w:0) + /// Proof: `EnclaveBridge::ShardConfigRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `EnclaveBridge::ShardStatus` (r:1 w:1) + /// Proof: `EnclaveBridge::ShardStatus` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn confirm_processed_parentchain_block() -> Weight { + // Proof Size summary in bytes: + // Measured: `408` + // Estimated: `3873` + // Minimum execution time: 26_539_000 picoseconds. + Weight::from_parts(27_695_000, 0) + .saturating_add(Weight::from_parts(0, 3873)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn shield_funds() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3593` + // Minimum execution time: 58_771_000 picoseconds. + Weight::from_parts(59_714_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Teerex::SovereignEnclaves` (r:1 w:0) + /// Proof: `Teerex::SovereignEnclaves` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `EnclaveBridge::ShardConfigRegistry` (r:1 w:0) + /// Proof: `EnclaveBridge::ShardConfigRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `EnclaveBridge::ShardStatus` (r:1 w:1) + /// Proof: `EnclaveBridge::ShardStatus` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `EnclaveBridge::ExecutedUnshieldCalls` (r:1 w:1) + /// Proof: `EnclaveBridge::ExecutedUnshieldCalls` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn unshield_funds() -> Weight { + // Proof Size summary in bytes: + // Measured: `511` + // Estimated: `6196` + // Minimum execution time: 88_550_000 picoseconds. + Weight::from_parts(93_525_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `Teerex::SovereignEnclaves` (r:1 w:0) + /// Proof: `Teerex::SovereignEnclaves` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `EnclaveBridge::ShardStatus` (r:1 w:1) + /// Proof: `EnclaveBridge::ShardStatus` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::EventTopics` (r:6 w:6) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `l` is `[0, 100]`. + /// The range of component `t` is `[1, 5]`. + fn publish_hash(_l: u32, t: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `408` + // Estimated: `3873 + t * (2475 ±0)` + // Minimum execution time: 21_086_000 picoseconds. + Weight::from_parts(22_931_684, 0) + .saturating_add(Weight::from_parts(0, 3873)) + // Standard Error: 138_219 + .saturating_add(Weight::from_parts(2_812_119, 0).saturating_mul(t.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t.into()))) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(t.into()))) + .saturating_add(Weight::from_parts(0, 2475).saturating_mul(t.into())) + } + /// Storage: `EnclaveBridge::ShardConfigRegistry` (r:1 w:1) + /// Proof: `EnclaveBridge::ShardConfigRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Teerex::SovereignEnclaves` (r:1 w:0) + /// Proof: `Teerex::SovereignEnclaves` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `EnclaveBridge::ShardStatus` (r:1 w:1) + /// Proof: `EnclaveBridge::ShardStatus` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn update_shard_config() -> Weight { + // Proof Size summary in bytes: + // Measured: `521` + // Estimated: `3986` + // Minimum execution time: 24_839_000 picoseconds. + Weight::from_parts(25_544_000, 0) + .saturating_add(Weight::from_parts(0, 3986)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `EnclaveBridge::ShardStatus` (r:1 w:1) + /// Proof: `EnclaveBridge::ShardStatus` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn purge_enclave_from_shard_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `260` + // Estimated: `3725` + // Minimum execution time: 19_246_000 picoseconds. + Weight::from_parts(20_215_000, 0) + .saturating_add(Weight::from_parts(0, 3725)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_message_queue.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_message_queue.rs new file mode 100644 index 00000000..84b752ed --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_message_queue.rs @@ -0,0 +1,168 @@ + +//! Autogenerated weights for `pallet_message_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_message_queue +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_message_queue.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_message_queue`. +pub struct WeightInfo(PhantomData); +impl pallet_message_queue::WeightInfo for WeightInfo { + /// Storage: `MessageQueue::ServiceHead` (r:1 w:0) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:2 w:2) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + fn ready_ring_knit() -> Weight { + // Proof Size summary in bytes: + // Measured: `260` + // Estimated: `6044` + // Minimum execution time: 16_001_000 picoseconds. + Weight::from_parts(16_761_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `MessageQueue::BookStateFor` (r:2 w:2) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + fn ready_ring_unknit() -> Weight { + // Proof Size summary in bytes: + // Measured: `255` + // Estimated: `6044` + // Minimum execution time: 14_361_000 picoseconds. + Weight::from_parts(14_785_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + fn service_queue_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `3517` + // Minimum execution time: 5_375_000 picoseconds. + Weight::from_parts(5_635_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn service_page_base_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `69050` + // Minimum execution time: 7_339_000 picoseconds. + Weight::from_parts(7_804_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn service_page_base_no_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `69050` + // Minimum execution time: 7_575_000 picoseconds. + Weight::from_parts(7_932_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `MessageQueue::BookStateFor` (r:0 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn service_page_item() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 172_035_000 picoseconds. + Weight::from_parts(173_703_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:0) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + fn bump_service_head() -> Weight { + // Proof Size summary in bytes: + // Measured: `208` + // Estimated: `3517` + // Minimum execution time: 8_481_000 picoseconds. + Weight::from_parts(9_102_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn reap_page() -> Weight { + // Proof Size summary in bytes: + // Measured: `65704` + // Estimated: `69050` + // Minimum execution time: 52_734_000 picoseconds. + Weight::from_parts(53_730_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn execute_overweight_page_removed() -> Weight { + // Proof Size summary in bytes: + // Measured: `65704` + // Estimated: `69050` + // Minimum execution time: 65_078_000 picoseconds. + Weight::from_parts(66_535_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn execute_overweight_page_updated() -> Weight { + // Proof Size summary in bytes: + // Measured: `65704` + // Estimated: `69050` + // Minimum execution time: 91_678_000 picoseconds. + Weight::from_parts(94_942_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_multisig.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_multisig.rs new file mode 100644 index 00000000..f9c96156 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_multisig.rs @@ -0,0 +1,145 @@ + +//! Autogenerated weights for `pallet_multisig` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_multisig +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_multisig.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_multisig`. +pub struct WeightInfo(PhantomData); +impl pallet_multisig::WeightInfo for WeightInfo { + /// The range of component `z` is `[0, 10000]`. + fn as_multi_threshold_1(z: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_116_000 picoseconds. + Weight::from_parts(8_394_280, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 9 + .saturating_add(Weight::from_parts(155, 0).saturating_mul(z.into())) + } + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(465), added: 2940, mode: `MaxEncodedLen`) + /// The range of component `s` is `[2, 10]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_create(s: u32, z: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `192 + s * (11 ±0)` + // Estimated: `3930` + // Minimum execution time: 27_572_000 picoseconds. + Weight::from_parts(26_404_542, 0) + .saturating_add(Weight::from_parts(0, 3930)) + // Standard Error: 8_290 + .saturating_add(Weight::from_parts(271_539, 0).saturating_mul(s.into())) + // Standard Error: 7 + .saturating_add(Weight::from_parts(1_211, 0).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) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(465), added: 2940, mode: `MaxEncodedLen`) + /// The range of component `s` is `[3, 10]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_approve(_s: u32, z: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `315` + // Estimated: `3930` + // Minimum execution time: 15_133_000 picoseconds. + Weight::from_parts(18_847_329, 0) + .saturating_add(Weight::from_parts(0, 3930)) + // Standard Error: 27 + .saturating_add(Weight::from_parts(1_079, 0).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) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(465), added: 2940, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `s` is `[2, 10]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_complete(s: u32, z: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `334 + s * (43 ±0)` + // Estimated: `3930` + // Minimum execution time: 31_138_000 picoseconds. + Weight::from_parts(29_208_132, 0) + .saturating_add(Weight::from_parts(0, 3930)) + // Standard Error: 11_434 + .saturating_add(Weight::from_parts(310_928, 0).saturating_mul(s.into())) + // Standard Error: 9 + .saturating_add(Weight::from_parts(1_165, 0).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) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(465), added: 2940, mode: `MaxEncodedLen`) + /// The range of component `s` is `[2, 10]`. + fn approve_as_multi_create(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `192 + s * (11 ±0)` + // Estimated: `3930` + // Minimum execution time: 25_247_000 picoseconds. + Weight::from_parts(25_552_993, 0) + .saturating_add(Weight::from_parts(0, 3930)) + // Standard Error: 9_834 + .saturating_add(Weight::from_parts(343_089, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(465), added: 2940, mode: `MaxEncodedLen`) + /// The range of component `s` is `[2, 10]`. + fn approve_as_multi_approve(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `315` + // Estimated: `3930` + // Minimum execution time: 13_495_000 picoseconds. + Weight::from_parts(14_403_483, 0) + .saturating_add(Weight::from_parts(0, 3930)) + // Standard Error: 11_700 + .saturating_add(Weight::from_parts(116_301, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(465), added: 2940, mode: `MaxEncodedLen`) + /// The range of component `s` is `[2, 10]`. + fn cancel_as_multi(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `398 + s * (11 ±0)` + // Estimated: `3930` + // Minimum execution time: 25_840_000 picoseconds. + Weight::from_parts(27_659_734, 0) + .saturating_add(Weight::from_parts(0, 3930)) + // Standard Error: 9_802 + .saturating_add(Weight::from_parts(82_717, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_preimage.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_preimage.rs new file mode 100644 index 00000000..22dddabf --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_preimage.rs @@ -0,0 +1,250 @@ + +//! Autogenerated weights for `pallet_preimage` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_preimage +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_preimage.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_preimage`. +pub struct WeightInfo(PhantomData); +impl pallet_preimage::WeightInfo for WeightInfo { + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) + /// The range of component `s` is `[0, 4194304]`. + fn note_preimage(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `76` + // Estimated: `3556` + // Minimum execution time: 51_164_000 picoseconds. + Weight::from_parts(52_171_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + // Standard Error: 4 + .saturating_add(Weight::from_parts(1_836, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) + /// The range of component `s` is `[0, 4194304]`. + fn note_requested_preimage(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `140` + // Estimated: `3556` + // Minimum execution time: 12_280_000 picoseconds. + Weight::from_parts(12_553_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + // Standard Error: 5 + .saturating_add(Weight::from_parts(1_844, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) + /// The range of component `s` is `[0, 4194304]`. + fn note_no_deposit_preimage(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `140` + // Estimated: `3556` + // Minimum execution time: 10_985_000 picoseconds. + Weight::from_parts(11_193_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + // Standard Error: 5 + .saturating_add(Weight::from_parts(1_852, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) + fn unnote_preimage() -> Weight { + // Proof Size summary in bytes: + // Measured: `277` + // Estimated: `3556` + // Minimum execution time: 47_739_000 picoseconds. + Weight::from_parts(52_577_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) + fn unnote_no_deposit_preimage() -> Weight { + // Proof Size summary in bytes: + // Measured: `178` + // Estimated: `3556` + // Minimum execution time: 21_514_000 picoseconds. + Weight::from_parts(23_583_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + fn request_preimage() -> Weight { + // Proof Size summary in bytes: + // Measured: `222` + // Estimated: `3556` + // Minimum execution time: 18_566_000 picoseconds. + Weight::from_parts(21_882_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + fn request_no_deposit_preimage() -> Weight { + // Proof Size summary in bytes: + // Measured: `178` + // Estimated: `3556` + // Minimum execution time: 11_916_000 picoseconds. + Weight::from_parts(13_941_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + fn request_unnoted_preimage() -> Weight { + // Proof Size summary in bytes: + // Measured: `76` + // Estimated: `3556` + // Minimum execution time: 9_496_000 picoseconds. + Weight::from_parts(10_121_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + fn request_requested_preimage() -> Weight { + // Proof Size summary in bytes: + // Measured: `140` + // Estimated: `3556` + // Minimum execution time: 7_213_000 picoseconds. + Weight::from_parts(8_064_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) + fn unrequest_preimage() -> Weight { + // Proof Size summary in bytes: + // Measured: `178` + // Estimated: `3556` + // Minimum execution time: 18_260_000 picoseconds. + Weight::from_parts(21_828_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + fn unrequest_unnoted_preimage() -> Weight { + // Proof Size summary in bytes: + // Measured: `140` + // Estimated: `3556` + // Minimum execution time: 9_216_000 picoseconds. + Weight::from_parts(10_043_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + fn unrequest_multi_referenced_preimage() -> Weight { + // Proof Size summary in bytes: + // Measured: `140` + // Estimated: `3556` + // Minimum execution time: 8_059_000 picoseconds. + Weight::from_parts(8_773_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Preimage::StatusFor` (r:1023 w:1023) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1023 w:1023) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1023 w:1023) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:0 w:1023) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// The range of component `n` is `[1, 1024]`. + fn ensure_updated(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + n * (227 ±0)` + // Estimated: `990 + n * (2603 ±0)` + // Minimum execution time: 45_262_000 picoseconds. + Weight::from_parts(45_775_000, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 48_947 + .saturating_add(Weight::from_parts(49_667_294, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into()))) + .saturating_add(Weight::from_parts(0, 2603).saturating_mul(n.into())) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_proxy.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_proxy.rs new file mode 100644 index 00000000..8da93a75 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_proxy.rs @@ -0,0 +1,202 @@ + +//! Autogenerated weights for `pallet_proxy` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_proxy +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_proxy.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_proxy`. +pub struct WeightInfo(PhantomData); +impl pallet_proxy::WeightInfo for WeightInfo { + /// Storage: `Proxy::Proxies` (r:1 w:0) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) + /// The range of component `p` is `[1, 31]`. + fn proxy(_p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `194 + p * (37 ±0)` + // Estimated: `4706` + // Minimum execution time: 13_653_000 picoseconds. + Weight::from_parts(18_051_752, 0) + .saturating_add(Weight::from_parts(0, 4706)) + .saturating_add(T::DbWeight::get().reads(1)) + } + /// Storage: `Proxy::Proxies` (r:1 w:0) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. + fn proxy_announced(a: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `484 + a * (68 ±0) + p * (37 ±0)` + // Estimated: `5698` + // Minimum execution time: 32_138_000 picoseconds. + Weight::from_parts(31_801_227, 0) + .saturating_add(Weight::from_parts(0, 5698)) + // Standard Error: 7_264 + .saturating_add(Weight::from_parts(199_002, 0).saturating_mul(a.into())) + // Standard Error: 7_505 + .saturating_add(Weight::from_parts(77_583, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. + fn remove_announcement(a: u32, _p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `399 + a * (68 ±0)` + // Estimated: `5698` + // Minimum execution time: 22_193_000 picoseconds. + Weight::from_parts(23_463_254, 0) + .saturating_add(Weight::from_parts(0, 5698)) + // Standard Error: 1_987 + .saturating_add(Weight::from_parts(155_351, 0).saturating_mul(a.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. + fn reject_announcement(a: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `399 + a * (68 ±0)` + // Estimated: `5698` + // Minimum execution time: 21_747_000 picoseconds. + Weight::from_parts(22_450_504, 0) + .saturating_add(Weight::from_parts(0, 5698)) + // Standard Error: 1_633 + .saturating_add(Weight::from_parts(186_914, 0).saturating_mul(a.into())) + // Standard Error: 1_687 + .saturating_add(Weight::from_parts(15_051, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Proxy::Proxies` (r:1 w:0) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. + fn announce(a: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `416 + a * (68 ±0) + p * (37 ±0)` + // Estimated: `5698` + // Minimum execution time: 29_127_000 picoseconds. + Weight::from_parts(29_311_495, 0) + .saturating_add(Weight::from_parts(0, 5698)) + // Standard Error: 2_413 + .saturating_add(Weight::from_parts(160_677, 0).saturating_mul(a.into())) + // Standard Error: 2_493 + .saturating_add(Weight::from_parts(42_419, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) + /// The range of component `p` is `[1, 31]`. + fn add_proxy(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `194 + p * (37 ±0)` + // Estimated: `4706` + // Minimum execution time: 17_518_000 picoseconds. + Weight::from_parts(21_843_119, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 15_714 + .saturating_add(Weight::from_parts(49_582, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) + /// The range of component `p` is `[1, 31]`. + fn remove_proxy(_p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `194 + p * (37 ±0)` + // Estimated: `4706` + // Minimum execution time: 21_089_000 picoseconds. + Weight::from_parts(31_012_313, 0) + .saturating_add(Weight::from_parts(0, 4706)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) + /// The range of component `p` is `[1, 31]`. + fn remove_proxies(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `194 + p * (37 ±0)` + // Estimated: `4706` + // Minimum execution time: 19_154_000 picoseconds. + Weight::from_parts(19_990_686, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 1_354 + .saturating_add(Weight::from_parts(48_251, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) + /// The range of component `p` is `[1, 31]`. + fn create_pure(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `206` + // Estimated: `4706` + // Minimum execution time: 21_825_000 picoseconds. + Weight::from_parts(22_792_534, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 2_533 + .saturating_add(Weight::from_parts(62_926, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) + /// The range of component `p` is `[0, 30]`. + fn kill_pure(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `231 + p * (37 ±0)` + // Estimated: `4706` + // Minimum execution time: 19_918_000 picoseconds. + Weight::from_parts(21_022_926, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 3_569 + .saturating_add(Weight::from_parts(90_320, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_scheduler.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_scheduler.rs new file mode 100644 index 00000000..437a559b --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_scheduler.rs @@ -0,0 +1,272 @@ + +//! Autogenerated weights for `pallet_scheduler` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_scheduler +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_scheduler.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_scheduler`. +pub struct WeightInfo(PhantomData); +impl pallet_scheduler::WeightInfo for WeightInfo { + /// Storage: `Scheduler::IncompleteSince` (r:1 w:1) + /// Proof: `Scheduler::IncompleteSince` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + fn service_agendas_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `31` + // Estimated: `1489` + // Minimum execution time: 3_314_000 picoseconds. + Weight::from_parts(3_562_000, 0) + .saturating_add(Weight::from_parts(0, 1489)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + /// The range of component `s` is `[0, 50]`. + fn service_agenda_base(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `78 + s * (177 ±0)` + // Estimated: `42428` + // Minimum execution time: 4_050_000 picoseconds. + Weight::from_parts(7_497_137, 0) + .saturating_add(Weight::from_parts(0, 42428)) + // Standard Error: 3_050 + .saturating_add(Weight::from_parts(340_582, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_task_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_620_000 picoseconds. + Weight::from_parts(2_751_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `Preimage::PreimageFor` (r:1 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// The range of component `s` is `[128, 4194304]`. + fn service_task_fetched(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `213 + s * (1 ±0)` + // Estimated: `3678 + s * (1 ±0)` + // Minimum execution time: 15_497_000 picoseconds. + Weight::from_parts(15_738_000, 0) + .saturating_add(Weight::from_parts(0, 3678)) + // Standard Error: 11 + .saturating_add(Weight::from_parts(1_045, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into())) + } + /// Storage: `Scheduler::Lookup` (r:0 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + fn service_task_named() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_521_000 picoseconds. + Weight::from_parts(3_730_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_task_periodic() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_448_000 picoseconds. + Weight::from_parts(2_608_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn execute_dispatch_signed() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_695_000 picoseconds. + Weight::from_parts(1_761_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn execute_dispatch_unsigned() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_673_000 picoseconds. + Weight::from_parts(1_770_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + /// The range of component `s` is `[0, 49]`. + fn schedule(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `78 + s * (177 ±0)` + // Estimated: `42428` + // Minimum execution time: 7_879_000 picoseconds. + Weight::from_parts(10_736_600, 0) + .saturating_add(Weight::from_parts(0, 42428)) + // Standard Error: 1_657 + .saturating_add(Weight::from_parts(412_494, 0).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) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Lookup` (r:0 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// The range of component `s` is `[1, 50]`. + fn cancel(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `78 + s * (177 ±0)` + // Estimated: `42428` + // Minimum execution time: 13_247_000 picoseconds. + Weight::from_parts(13_323_296, 0) + .saturating_add(Weight::from_parts(0, 42428)) + // Standard Error: 2_494 + .saturating_add(Weight::from_parts(636_417, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Scheduler::Lookup` (r:1 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + /// The range of component `s` is `[0, 49]`. + fn schedule_named(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `255 + s * (185 ±0)` + // Estimated: `42428` + // Minimum execution time: 11_150_000 picoseconds. + Weight::from_parts(15_242_180, 0) + .saturating_add(Weight::from_parts(0, 42428)) + // Standard Error: 3_312 + .saturating_add(Weight::from_parts(449_340, 0).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) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + /// The range of component `s` is `[1, 50]`. + fn cancel_named(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `281 + s * (185 ±0)` + // Estimated: `42428` + // Minimum execution time: 16_563_000 picoseconds. + Weight::from_parts(16_323_718, 0) + .saturating_add(Weight::from_parts(0, 42428)) + // Standard Error: 2_245 + .saturating_add(Weight::from_parts(661_626, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + /// The range of component `s` is `[1, 50]`. + fn schedule_retry(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `118` + // Estimated: `42428` + // Minimum execution time: 7_822_000 picoseconds. + Weight::from_parts(8_233_939, 0) + .saturating_add(Weight::from_parts(0, 42428)) + // Standard Error: 525 + .saturating_add(Weight::from_parts(34_176, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Scheduler::Agenda` (r:1 w:0) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + fn set_retry() -> Weight { + // Proof Size summary in bytes: + // Measured: `8928` + // Estimated: `42428` + // Minimum execution time: 24_357_000 picoseconds. + Weight::from_parts(25_053_000, 0) + .saturating_add(Weight::from_parts(0, 42428)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Scheduler::Lookup` (r:1 w:0) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:0) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + fn set_retry_named() -> Weight { + // Proof Size summary in bytes: + // Measured: `9606` + // Estimated: `42428` + // Minimum execution time: 29_865_000 picoseconds. + Weight::from_parts(31_725_000, 0) + .saturating_add(Weight::from_parts(0, 42428)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Scheduler::Agenda` (r:1 w:0) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + fn cancel_retry() -> Weight { + // Proof Size summary in bytes: + // Measured: `8940` + // Estimated: `42428` + // Minimum execution time: 23_968_000 picoseconds. + Weight::from_parts(24_854_000, 0) + .saturating_add(Weight::from_parts(0, 42428)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Scheduler::Lookup` (r:1 w:0) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:0) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + fn cancel_retry_named() -> Weight { + // Proof Size summary in bytes: + // Measured: `9618` + // Estimated: `42428` + // Minimum execution time: 29_640_000 picoseconds. + Weight::from_parts(30_834_000, 0) + .saturating_add(Weight::from_parts(0, 42428)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_session.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_session.rs new file mode 100644 index 00000000..7e397199 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_session.rs @@ -0,0 +1,63 @@ + +//! Autogenerated weights for `pallet_session` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_session +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_session.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_session`. +pub struct WeightInfo(PhantomData); +impl pallet_session::WeightInfo for WeightInfo { + /// Storage: `Session::NextKeys` (r:1 w:1) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Session::KeyOwner` (r:1 w:1) + /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn set_keys() -> Weight { + // Proof Size summary in bytes: + // Measured: `254` + // Estimated: `3719` + // Minimum execution time: 21_156_000 picoseconds. + Weight::from_parts(22_378_000, 0) + .saturating_add(Weight::from_parts(0, 3719)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Session::NextKeys` (r:1 w:1) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Session::KeyOwner` (r:0 w:1) + /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn purge_keys() -> Weight { + // Proof Size summary in bytes: + // Measured: `277` + // Estimated: `3742` + // Minimum execution time: 15_492_000 picoseconds. + Weight::from_parts(16_178_000, 0) + .saturating_add(Weight::from_parts(0, 3742)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_sidechain.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_sidechain.rs new file mode 100644 index 00000000..e6946c58 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_sidechain.rs @@ -0,0 +1,53 @@ + +//! Autogenerated weights for `pallet_sidechain` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_sidechain +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_sidechain.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_sidechain`. +pub struct WeightInfo(PhantomData); +impl pallet_sidechain::WeightInfo for WeightInfo { + /// Storage: `Teerex::SovereignEnclaves` (r:1 w:0) + /// Proof: `Teerex::SovereignEnclaves` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `EnclaveBridge::ShardConfigRegistry` (r:1 w:0) + /// Proof: `EnclaveBridge::ShardConfigRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `EnclaveBridge::ShardStatus` (r:1 w:1) + /// Proof: `EnclaveBridge::ShardStatus` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Sidechain::LatestSidechainBlockConfirmation` (r:1 w:1) + /// Proof: `Sidechain::LatestSidechainBlockConfirmation` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn confirm_imported_sidechain_block() -> Weight { + // Proof Size summary in bytes: + // Measured: `412` + // Estimated: `3877` + // Minimum execution time: 28_270_000 picoseconds. + Weight::from_parts(29_711_000, 0) + .saturating_add(Weight::from_parts(0, 3877)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_teeracle.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_teeracle.rs new file mode 100644 index 00000000..5df8da5f --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_teeracle.rs @@ -0,0 +1,91 @@ + +//! Autogenerated weights for `pallet_teeracle` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_teeracle +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_teeracle.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_teeracle`. +pub struct WeightInfo(PhantomData); +impl pallet_teeracle::WeightInfo for WeightInfo { + /// Storage: `Teerex::SovereignEnclaves` (r:1 w:0) + /// Proof: `Teerex::SovereignEnclaves` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Teeracle::Whitelists` (r:1 w:0) + /// Proof: `Teeracle::Whitelists` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Teeracle::ExchangeRates` (r:1 w:1) + /// Proof: `Teeracle::ExchangeRates` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn update_exchange_rate() -> Weight { + // Proof Size summary in bytes: + // Measured: `529` + // Estimated: `3994` + // Minimum execution time: 24_383_000 picoseconds. + Weight::from_parts(25_910_000, 0) + .saturating_add(Weight::from_parts(0, 3994)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Teerex::SovereignEnclaves` (r:1 w:0) + /// Proof: `Teerex::SovereignEnclaves` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Teeracle::Whitelists` (r:1 w:0) + /// Proof: `Teeracle::Whitelists` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Teeracle::OracleData` (r:0 w:1) + /// Proof: `Teeracle::OracleData` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn update_oracle() -> Weight { + // Proof Size summary in bytes: + // Measured: `520` + // Estimated: `3985` + // Minimum execution time: 19_831_000 picoseconds. + Weight::from_parts(21_082_000, 0) + .saturating_add(Weight::from_parts(0, 3985)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Teeracle::Whitelists` (r:1 w:1) + /// Proof: `Teeracle::Whitelists` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn add_to_whitelist() -> Weight { + // Proof Size summary in bytes: + // Measured: `80` + // Estimated: `3545` + // Minimum execution time: 10_146_000 picoseconds. + Weight::from_parts(10_739_000, 0) + .saturating_add(Weight::from_parts(0, 3545)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Teeracle::Whitelists` (r:1 w:1) + /// Proof: `Teeracle::Whitelists` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn remove_from_whitelist() -> Weight { + // Proof Size summary in bytes: + // Measured: `182` + // Estimated: `3647` + // Minimum execution time: 13_021_000 picoseconds. + Weight::from_parts(13_675_000, 0) + .saturating_add(Weight::from_parts(0, 3647)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_teerdays.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_teerdays.rs new file mode 100644 index 00000000..0a623e44 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_teerdays.rs @@ -0,0 +1,103 @@ + +//! Autogenerated weights for `pallet_teerdays` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_teerdays +// --extrinsic=* +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_teerdays.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_teerdays`. +pub struct WeightInfo(PhantomData); +impl pallet_teerdays::WeightInfo for WeightInfo { + /// Storage: `TeerDays::TeerDayBonds` (r:1 w:1) + /// Proof: `TeerDays::TeerDayBonds` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + fn bond() -> Weight { + // Proof Size summary in bytes: + // Measured: `344` + // Estimated: `4764` + // Minimum execution time: 25_534_000 picoseconds. + Weight::from_parts(26_907_000, 0) + .saturating_add(Weight::from_parts(0, 4764)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `TeerDays::PendingUnlock` (r:1 w:1) + /// Proof: `TeerDays::PendingUnlock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TeerDays::TeerDayBonds` (r:1 w:1) + /// Proof: `TeerDays::TeerDayBonds` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + fn unbond() -> Weight { + // Proof Size summary in bytes: + // Measured: `357` + // Estimated: `3822` + // Minimum execution time: 18_153_000 picoseconds. + Weight::from_parts(18_960_000, 0) + .saturating_add(Weight::from_parts(0, 3822)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `TeerDays::TeerDayBonds` (r:1 w:1) + /// Proof: `TeerDays::TeerDayBonds` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + fn update_other() -> Weight { + // Proof Size summary in bytes: + // Measured: `357` + // Estimated: `3822` + // Minimum execution time: 12_938_000 picoseconds. + Weight::from_parts(14_024_000, 0) + .saturating_add(Weight::from_parts(0, 3822)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `TeerDays::PendingUnlock` (r:1 w:1) + /// Proof: `TeerDays::PendingUnlock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn withdraw_unbonded() -> Weight { + // Proof Size summary in bytes: + // Measured: `504` + // Estimated: `4764` + // Minimum execution time: 27_893_000 picoseconds. + Weight::from_parts(29_110_000, 0) + .saturating_add(Weight::from_parts(0, 4764)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_teerex.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_teerex.rs new file mode 100644 index 00000000..3d9b86c5 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_teerex.rs @@ -0,0 +1,124 @@ + +//! Autogenerated weights for `pallet_teerex` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_teerex +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_teerex.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_teerex`. +pub struct WeightInfo(PhantomData); +impl pallet_teerex::WeightInfo for WeightInfo { + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Teerex::SgxQuotingEnclaveRegistry` (r:1 w:0) + /// Proof: `Teerex::SgxQuotingEnclaveRegistry` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Teerex::SgxTcbInfo` (r:1 w:0) + /// Proof: `Teerex::SgxTcbInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Teerex::SgxAllowDebugMode` (r:1 w:0) + /// Proof: `Teerex::SgxAllowDebugMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Teerex::SovereignEnclaves` (r:0 w:1) + /// Proof: `Teerex::SovereignEnclaves` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn register_sgx_enclave() -> Weight { + // Proof Size summary in bytes: + // Measured: `784` + // Estimated: `4249` + // Minimum execution time: 2_941_139_000 picoseconds. + Weight::from_parts(3_178_510_000, 0) + .saturating_add(Weight::from_parts(0, 4249)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Teerex::SgxQuotingEnclaveRegistry` (r:0 w:1) + /// Proof: `Teerex::SgxQuotingEnclaveRegistry` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn register_quoting_enclave() -> Weight { + // Proof Size summary in bytes: + // Measured: `132` + // Estimated: `1493` + // Minimum execution time: 1_323_657_000 picoseconds. + Weight::from_parts(1_372_612_000, 0) + .saturating_add(Weight::from_parts(0, 1493)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Teerex::SgxTcbInfo` (r:0 w:1) + /// Proof: `Teerex::SgxTcbInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn register_tcb_info() -> Weight { + // Proof Size summary in bytes: + // Measured: `132` + // Estimated: `1493` + // Minimum execution time: 1_296_871_000 picoseconds. + Weight::from_parts(1_343_481_000, 0) + .saturating_add(Weight::from_parts(0, 1493)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Teerex::SovereignEnclaves` (r:1 w:1) + /// Proof: `Teerex::SovereignEnclaves` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + fn unregister_sovereign_enclave() -> Weight { + // Proof Size summary in bytes: + // Measured: `531` + // Estimated: `3996` + // Minimum execution time: 16_257_000 picoseconds. + Weight::from_parts(17_162_000, 0) + .saturating_add(Weight::from_parts(0, 3996)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Teerex::ProxiedEnclaves` (r:1 w:1) + /// Proof: `Teerex::ProxiedEnclaves` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + fn unregister_proxied_enclave() -> Weight { + // Proof Size summary in bytes: + // Measured: `633` + // Estimated: `4098` + // Minimum execution time: 21_207_000 picoseconds. + Weight::from_parts(21_752_000, 0) + .saturating_add(Weight::from_parts(0, 4098)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Teerex::SgxAllowDebugMode` (r:0 w:1) + /// Proof: `Teerex::SgxAllowDebugMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Teerex::AllowSkippingAttestation` (r:0 w:1) + /// Proof: `Teerex::AllowSkippingAttestation` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_security_flags() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_905_000 picoseconds. + Weight::from_parts(6_200_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_timestamp.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_timestamp.rs new file mode 100644 index 00000000..be7623d1 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_timestamp.rs @@ -0,0 +1,55 @@ + +//! Autogenerated weights for `pallet_timestamp` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_timestamp +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_timestamp.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_timestamp`. +pub struct WeightInfo(PhantomData); +impl pallet_timestamp::WeightInfo for WeightInfo { + /// Storage: `Timestamp::Now` (r:1 w:1) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + fn set() -> Weight { + // Proof Size summary in bytes: + // Measured: `80` + // Estimated: `1493` + // Minimum execution time: 5_823_000 picoseconds. + Weight::from_parts(6_036_000, 0) + .saturating_add(Weight::from_parts(0, 1493)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn on_finalize() -> Weight { + // Proof Size summary in bytes: + // Measured: `132` + // Estimated: `0` + // Minimum execution time: 4_365_000 picoseconds. + Weight::from_parts(4_512_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_treasury.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_treasury.rs new file mode 100644 index 00000000..c19a6bc2 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_treasury.rs @@ -0,0 +1,219 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot 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. + +// Polkadot 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 Polkadot. If not, see . + +//! Autogenerated weights for `pallet_treasury` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 +// --pallet=pallet_treasury +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_treasury`. +pub struct WeightInfo(PhantomData); +impl pallet_treasury::WeightInfo for WeightInfo { + /// Storage: `Treasury::ProposalCount` (r:1 w:1) + /// Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Approvals` (r:1 w:1) + /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Proposals` (r:0 w:1) + /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + fn spend_local() -> Weight { + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `1887` + // Minimum execution time: 10_093_000 picoseconds. + Weight::from_parts(10_655_000, 0) + .saturating_add(Weight::from_parts(0, 1887)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Treasury::ProposalCount` (r:1 w:1) + /// Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Proposals` (r:0 w:1) + /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + fn propose_spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `143` + // Estimated: `1489` + // Minimum execution time: 20_873_000 picoseconds. + Weight::from_parts(21_662_000, 0) + .saturating_add(Weight::from_parts(0, 1489)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Treasury::Proposals` (r:1 w:1) + /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn reject_proposal() -> Weight { + // Proof Size summary in bytes: + // Measured: `301` + // Estimated: `3593` + // Minimum execution time: 34_277_000 picoseconds. + Weight::from_parts(35_048_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Treasury::Proposals` (r:1 w:0) + /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Approvals` (r:1 w:1) + /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + /// The range of component `p` is `[0, 99]`. + fn approve_proposal(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `470 + p * (8 ±0)` + // Estimated: `3573` + // Minimum execution time: 7_220_000 picoseconds. + Weight::from_parts(11_765_443, 0) + .saturating_add(Weight::from_parts(0, 3573)) + // Standard Error: 1_732 + .saturating_add(Weight::from_parts(89_274, 0).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) + /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + fn remove_approval() -> Weight { + // Proof Size summary in bytes: + // Measured: `127` + // Estimated: `1887` + // Minimum execution time: 5_588_000 picoseconds. + Weight::from_parts(6_030_000, 0) + .saturating_add(Weight::from_parts(0, 1887)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Treasury::Deactivated` (r:1 w:1) + /// Proof: `Treasury::Deactivated` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Approvals` (r:1 w:1) + /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Proposals` (r:99 w:99) + /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:199 w:199) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Bounties::BountyApprovals` (r:1 w:1) + /// Proof: `Bounties::BountyApprovals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + /// The range of component `p` is `[0, 99]`. + fn on_initialize_proposals(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `331 + p * (251 ±0)` + // Estimated: `3593 + p * (5206 ±0)` + // Minimum execution time: 43_318_000 picoseconds. + Weight::from_parts(34_774_675, 0) + .saturating_add(Weight::from_parts(0, 3593)) + // Standard Error: 19_729 + .saturating_add(Weight::from_parts(32_072_479, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 5206).saturating_mul(p.into())) + } + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:0) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`) + /// Storage: `Treasury::SpendCount` (r:1 w:1) + /// Proof: `Treasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Spends` (r:0 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + fn spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `115` + // Estimated: `4703` + // Minimum execution time: 17_134_000 picoseconds. + Weight::from_parts(17_652_000, 0) + .saturating_add(Weight::from_parts(0, 4703)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Treasury::Spends` (r:1 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + /// Storage: `XcmPallet::QueryCounter` (r:1 w:1) + /// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0) + /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0) + /// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1) + /// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) + /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::Queries` (r:0 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn payout() -> Weight { + // Proof Size summary in bytes: + // Measured: `287` + // Estimated: `5318` + // Minimum execution time: 43_303_000 picoseconds. + Weight::from_parts(44_488_000, 0) + .saturating_add(Weight::from_parts(0, 5318)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `Treasury::Spends` (r:1 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + /// Storage: `XcmPallet::Queries` (r:1 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn check_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `206` + // Estimated: `5318` + // Minimum execution time: 22_854_000 picoseconds. + Weight::from_parts(23_185_000, 0) + .saturating_add(Weight::from_parts(0, 5318)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Treasury::Spends` (r:1 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + fn void_spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `178` + // Estimated: `5318` + // Minimum execution time: 12_421_000 picoseconds. + Weight::from_parts(12_885_000, 0) + .saturating_add(Weight::from_parts(0, 5318)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_utility.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_utility.rs new file mode 100644 index 00000000..24669c81 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_utility.rs @@ -0,0 +1,84 @@ + +//! Autogenerated weights for `pallet_utility` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_utility +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_utility.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_utility`. +pub struct WeightInfo(PhantomData); +impl pallet_utility::WeightInfo for WeightInfo { + /// The range of component `c` is `[0, 1000]`. + fn batch(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_908_000 picoseconds. + Weight::from_parts(23_849_325, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 4_939 + .saturating_add(Weight::from_parts(2_830_799, 0).saturating_mul(c.into())) + } + fn as_derivative() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_758_000 picoseconds. + Weight::from_parts(3_916_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// The range of component `c` is `[0, 1000]`. + fn batch_all(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_758_000 picoseconds. + Weight::from_parts(12_025_622, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 5_599 + .saturating_add(Weight::from_parts(3_114_569, 0).saturating_mul(c.into())) + } + fn dispatch_as() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_972_000 picoseconds. + Weight::from_parts(5_285_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// The range of component `c` is `[0, 1000]`. + fn force_batch(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_540_000 picoseconds. + Weight::from_parts(3_677_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 2_352 + .saturating_add(Weight::from_parts(2_793_705, 0).saturating_mul(c.into())) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_vesting.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_vesting.rs new file mode 100644 index 00000000..b9ef6239 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_vesting.rs @@ -0,0 +1,241 @@ + +//! Autogenerated weights for `pallet_vesting` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 39.0.0 +//! DATE: 2024-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("integritee-rococo-local-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/integritee-collator +// benchmark +// pallet +// --chain=integritee-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_vesting +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-parachains/integritee-kusama/src/weights/pallet_vesting.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_vesting`. +pub struct WeightInfo(PhantomData); +impl pallet_vesting::WeightInfo for WeightInfo { + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[1, 28]`. + fn vest_locked(l: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `205 + l * (25 ±0) + s * (36 ±0)` + // Estimated: `4764` + // Minimum execution time: 26_272_000 picoseconds. + Weight::from_parts(29_023_947, 0) + .saturating_add(Weight::from_parts(0, 4764)) + // Standard Error: 3_011 + .saturating_add(Weight::from_parts(26_178, 0).saturating_mul(l.into())) + // Standard Error: 5_357 + .saturating_add(Weight::from_parts(98_830, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[1, 28]`. + fn vest_unlocked(l: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `205 + l * (25 ±0) + s * (36 ±0)` + // Estimated: `4764` + // Minimum execution time: 27_507_000 picoseconds. + Weight::from_parts(31_309_847, 0) + .saturating_add(Weight::from_parts(0, 4764)) + // Standard Error: 2_413 + .saturating_add(Weight::from_parts(28_270, 0).saturating_mul(l.into())) + // Standard Error: 4_294 + .saturating_add(Weight::from_parts(73_373, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[1, 28]`. + fn vest_other_locked(l: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `308 + l * (25 ±0) + s * (36 ±0)` + // Estimated: `4764` + // Minimum execution time: 26_786_000 picoseconds. + Weight::from_parts(30_026_982, 0) + .saturating_add(Weight::from_parts(0, 4764)) + // Standard Error: 7_412 + .saturating_add(Weight::from_parts(32_656, 0).saturating_mul(l.into())) + // Standard Error: 13_187 + .saturating_add(Weight::from_parts(109_770, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[1, 28]`. + fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `308 + l * (25 ±0) + s * (36 ±0)` + // Estimated: `4764` + // Minimum execution time: 29_148_000 picoseconds. + Weight::from_parts(32_278_696, 0) + .saturating_add(Weight::from_parts(0, 4764)) + // Standard Error: 3_044 + .saturating_add(Weight::from_parts(28_854, 0).saturating_mul(l.into())) + // Standard Error: 5_417 + .saturating_add(Weight::from_parts(94_420, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[0, 27]`. + fn vested_transfer(l: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `308 + l * (25 ±0) + s * (36 ±0)` + // Estimated: `4764` + // Minimum execution time: 62_978_000 picoseconds. + Weight::from_parts(64_469_242, 0) + .saturating_add(Weight::from_parts(0, 4764)) + // Standard Error: 4_371 + .saturating_add(Weight::from_parts(58_787, 0).saturating_mul(l.into())) + // Standard Error: 7_777 + .saturating_add(Weight::from_parts(138_475, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[0, 27]`. + fn force_vested_transfer(l: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `411 + l * (25 ±0) + s * (36 ±0)` + // Estimated: `6196` + // Minimum execution time: 56_963_000 picoseconds. + Weight::from_parts(64_843_478, 0) + .saturating_add(Weight::from_parts(0, 6196)) + // Standard Error: 3_974 + .saturating_add(Weight::from_parts(48_440, 0).saturating_mul(l.into())) + // Standard Error: 7_071 + .saturating_add(Weight::from_parts(143_641, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[2, 28]`. + fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + l * (25 ±0) + s * (36 ±0)` + // Estimated: `4764` + // Minimum execution time: 27_142_000 picoseconds. + Weight::from_parts(29_835_566, 0) + .saturating_add(Weight::from_parts(0, 4764)) + // Standard Error: 1_895 + .saturating_add(Weight::from_parts(43_043, 0).saturating_mul(l.into())) + // Standard Error: 3_499 + .saturating_add(Weight::from_parts(125_132, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[2, 28]`. + fn unlocking_merge_schedules(_l: u32, _s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + l * (25 ±0) + s * (36 ±0)` + // Estimated: `4764` + // Minimum execution time: 30_739_000 picoseconds. + Weight::from_parts(37_570_842, 0) + .saturating_add(Weight::from_parts(0, 4764)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[2, 28]`. + fn force_remove_vesting_schedule(_l: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `308 + l * (25 ±0) + s * (36 ±0)` + // Estimated: `4764` + // Minimum execution time: 31_697_000 picoseconds. + Weight::from_parts(34_587_414, 0) + .saturating_add(Weight::from_parts(0, 4764)) + // Standard Error: 3_276 + .saturating_add(Weight::from_parts(80_552, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/polkadot-parachains/integritee-polkadot/src/weights/pallet_xcm.rs b/polkadot-parachains/integritee-polkadot/src/weights/pallet_xcm.rs new file mode 100644 index 00000000..05092323 --- /dev/null +++ b/polkadot-parachains/integritee-polkadot/src/weights/pallet_xcm.rs @@ -0,0 +1,397 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus 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. + +// Cumulus 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 Cumulus. If not, see . + +//! Autogenerated weights for `pallet_xcm` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-04-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner-f3xfxtob-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-westend-dev")`, DB CACHE: 1024 + +// Executed Command: +// target/production/polkadot-parachain +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json +// --pallet=pallet_xcm +// --chain=asset-hub-westend-dev +// --header=./cumulus/file_header.txt +// --output=./cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_xcm`. +pub struct WeightInfo(PhantomData); + +impl pallet_xcm::WeightInfo for WeightInfo { + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn send() -> Weight { + // Proof Size summary in bytes: + // Measured: `145` + // Estimated: `3610` + // Minimum execution time: 21_050_000 picoseconds. + Weight::from_parts(21_834_000, 0) + .saturating_add(Weight::from_parts(0, 3610)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn teleport_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `145` + // Estimated: `3610` + // Minimum execution time: 92_497_000 picoseconds. + Weight::from_parts(95_473_000, 0) + .saturating_add(Weight::from_parts(0, 3610)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0) + /// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0) + /// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1) + /// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn reserve_transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `367` + // Estimated: `6196` + // Minimum execution time: 120_059_000 picoseconds. + Weight::from_parts(122_894_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `496` + // Estimated: `6208` + // Minimum execution time: 141_977_000 picoseconds. + Weight::from_parts(145_981_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().writes(7)) + } + fn execute() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_426_000 picoseconds. + Weight::from_parts(7_791_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `PolkadotXcm::SupportedVersion` (r:0 w:1) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_xcm_version() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_224_000 picoseconds. + Weight::from_parts(6_793_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:0 w:1) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn force_default_xcm_version() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_812_000 picoseconds. + Weight::from_parts(2_008_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) + /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::Queries` (r:0 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_subscribe_version_notify() -> Weight { + // Proof Size summary in bytes: + // Measured: `145` + // Estimated: `3610` + // Minimum execution time: 26_586_000 picoseconds. + Weight::from_parts(27_181_000, 0) + .saturating_add(Weight::from_parts(0, 3610)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::Queries` (r:0 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_unsubscribe_version_notify() -> Weight { + // Proof Size summary in bytes: + // Measured: `363` + // Estimated: `3828` + // Minimum execution time: 28_295_000 picoseconds. + Weight::from_parts(29_280_000, 0) + .saturating_add(Weight::from_parts(0, 3828)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `PolkadotXcm::XcmExecutionSuspended` (r:0 w:1) + /// Proof: `PolkadotXcm::XcmExecutionSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn force_suspension() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_803_000 picoseconds. + Weight::from_parts(1_876_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `PolkadotXcm::SupportedVersion` (r:5 w:2) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn migrate_supported_version() -> Weight { + // Proof Size summary in bytes: + // Measured: `159` + // Estimated: `13524` + // Minimum execution time: 18_946_000 picoseconds. + Weight::from_parts(19_456_000, 0) + .saturating_add(Weight::from_parts(0, 13524)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `PolkadotXcm::VersionNotifiers` (r:5 w:2) + /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn migrate_version_notifiers() -> Weight { + // Proof Size summary in bytes: + // Measured: `163` + // Estimated: `13528` + // Minimum execution time: 19_080_000 picoseconds. + Weight::from_parts(19_498_000, 0) + .saturating_add(Weight::from_parts(0, 13528)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:6 w:0) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn already_notified_target() -> Weight { + // Proof Size summary in bytes: + // Measured: `173` + // Estimated: `16013` + // Minimum execution time: 20_637_000 picoseconds. + Weight::from_parts(21_388_000, 0) + .saturating_add(Weight::from_parts(0, 16013)) + .saturating_add(T::DbWeight::get().reads(6)) + } + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:2 w:1) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn notify_current_targets() -> Weight { + // Proof Size summary in bytes: + // Measured: `212` + // Estimated: `6152` + // Minimum execution time: 25_701_000 picoseconds. + Weight::from_parts(26_269_000, 0) + .saturating_add(Weight::from_parts(0, 6152)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:4 w:0) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn notify_target_migration_fail() -> Weight { + // Proof Size summary in bytes: + // Measured: `206` + // Estimated: `11096` + // Minimum execution time: 11_949_000 picoseconds. + Weight::from_parts(12_249_000, 0) + .saturating_add(Weight::from_parts(0, 11096)) + .saturating_add(T::DbWeight::get().reads(4)) + } + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:5 w:2) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn migrate_version_notify_targets() -> Weight { + // Proof Size summary in bytes: + // Measured: `170` + // Estimated: `13535` + // Minimum execution time: 19_278_000 picoseconds. + Weight::from_parts(19_538_000, 0) + .saturating_add(Weight::from_parts(0, 13535)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:5 w:2) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn migrate_and_notify_old_targets() -> Weight { + // Proof Size summary in bytes: + // Measured: `212` + // Estimated: `13577` + // Minimum execution time: 35_098_000 picoseconds. + Weight::from_parts(35_871_000, 0) + .saturating_add(Weight::from_parts(0, 13577)) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) + /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::Queries` (r:0 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `103` + // Estimated: `1588` + // Minimum execution time: 3_862_000 picoseconds. + Weight::from_parts(4_082_000, 0) + .saturating_add(Weight::from_parts(0, 1588)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `PolkadotXcm::Queries` (r:1 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `7740` + // Estimated: `11205` + // Minimum execution time: 25_423_000 picoseconds. + Weight::from_parts(25_872_000, 0) + .saturating_add(Weight::from_parts(0, 11205)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `PolkadotXcm::AssetTraps` (r:1 w:1) + /// Proof: `PolkadotXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn claim_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `160` + // Estimated: `3625` + // Minimum execution time: 37_148_000 picoseconds. + Weight::from_parts(37_709_000, 0) + .saturating_add(Weight::from_parts(0, 3625)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/polkadot-parachains/shell-runtime/src/xcm_config.rs b/polkadot-parachains/integritee-polkadot/src/xcm_config.rs similarity index 53% rename from polkadot-parachains/shell-runtime/src/xcm_config.rs rename to polkadot-parachains/integritee-polkadot/src/xcm_config.rs index e997a5c5..fec87776 100644 --- a/polkadot-parachains/shell-runtime/src/xcm_config.rs +++ b/polkadot-parachains/integritee-polkadot/src/xcm_config.rs @@ -19,23 +19,27 @@ //! use super::{ - AccountId, Balance, Balances, MaxInstructions, MessageQueue, ParachainInfo, ParachainSystem, - PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, XcmpQueue, TEER, + AccountId, AssetRegistry, Assets, Balance, Balances, EnsureRootOrMoreThanHalfCouncil, + MaxInstructions, MessageQueue, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, + RuntimeCall, RuntimeEvent, RuntimeOrigin, TreasuryAccount, XcmpQueue, TEER, }; +use crate::weights; use core::marker::PhantomData; use cumulus_primitives_core::{AggregateMessageOrigin, GlobalConsensus}; +use cumulus_primitives_utility::XcmFeesTo32ByteAccount; use frame_support::{ - pallet_prelude::{Get, Weight}, + pallet_prelude::{Get, PalletInfoAccess, Weight}, parameter_types, - traits::{Everything, Nothing, TransformOrigin}, - weights::IdentityFee, + traits::{Contains, ContainsPair, Everything, Nothing, TransformOrigin}, }; use frame_system::EnsureRoot; -use integritee_parachains_common::xcm_config::{ - IsNativeConcrete, MultiNativeAsset, RelativeReserveProvider, Reserve, +use integritee_parachains_common::xcm_config::IsNativeConcrete; +use orml_traits::{ + location::{RelativeReserveProvider, Reserve}, + parameter_type_with_key, }; use pallet_xcm::XcmPassthrough; -use parachains_common::message_queue::ParaIdToSibling; +use parachains_common::{message_queue::ParaIdToSibling, AssetIdForTrustBackedAssets}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_common::xcm_sender::NoPriceForMessageDelivery; @@ -49,37 +53,20 @@ use sp_std::{ use staging_xcm::latest::prelude::*; use staging_xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, - FixedWeightBounds, FrameTransactionalProcessor, FungibleAdapter, ParentAsSuperuser, - ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, DenyReserveTransferToRelayChain, + DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FixedRateOfFungible, + FixedWeightBounds, FrameTransactionalProcessor, FungibleAdapter, FungiblesAdapter, + HashedDescription, NativeAsset, NoChecking, ParentAsSuperuser, ParentIsPreset, + RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - UsingComponents, + TrailingSetTopicAsId, WithComputedOrigin, }; -use staging_xcm_executor::XcmExecutor; +use staging_xcm_executor::{traits::JustTry, XcmExecutor}; +use xcm_primitives::{AsAssetLocation, ConvertedRegisteredAssetId}; use xcm_transactor_primitives::*; -const fn teer_general_key() -> Junction { - const TEER_KEY: [u8; 32] = *b"TEER0000000000000000000000000000"; - GeneralKey { length: 4, data: TEER_KEY } -} - -const TEER_GENERAL_KEY: Junction = teer_general_key(); - -parameter_types! { - pub const RelayChainLocation: Location = Location::parent(); - pub const RelayNetwork: NetworkId = NetworkId::Kusama; - pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - // The universal location within the global consensus system - pub UniversalLocation: InteriorLocation = - [GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())].into(); - - pub SelfReserve: Location = Location { - parents:0, - interior: [TEER_GENERAL_KEY].into() - }; -} - -// Supported Currencies. +/// Supported local Currencies. Keep this to TEER, +/// other assets will be handled through AssetRegistry pallet #[derive( Encode, Decode, @@ -97,33 +84,21 @@ pub enum CurrencyId { TEER, } -/// Converts a CurrencyId into a Location, used by xtoken for XCMP. -pub struct CurrencyIdConvert; - -impl Convert> for CurrencyIdConvert { - fn convert(id: CurrencyId) -> Option { - match id { - CurrencyId::TEER => Some(Location { - parents: 1, - interior: [Parachain(ParachainInfo::parachain_id().into()), TEER_GENERAL_KEY] - .into(), - }), - } - } -} - /// Converts a Mulitloaction into a CurrencyId. Used by XCMP LocalAssetTransactor for asset filtering: /// we only accept Assets that are convertable to a "CurrencyId". +/// other assets will be handled through AssetRegistry pallet impl Convert> for CurrencyIdConvert { fn convert(location: Location) -> Option { let self_para_id: u32 = ParachainInfo::parachain_id().into(); match location.unpack() { - (1, interior) => match interior { - [Parachain(id), TEER_GENERAL_KEY] if *id == self_para_id => Some(CurrencyId::TEER), - _ => None, - }, + // that's how xTokens with Karura, Bifrost, Moonriver refers to TEER + (1, [Parachain(id), TEER_GENERAL_KEY]) if *id == self_para_id => Some(CurrencyId::TEER), + // that's how the Asset Hub refers to TEER + (1, [Parachain(id)]) if *id == self_para_id => Some(CurrencyId::TEER), + // same for local location spec. we don't care if parents is 0 or 1 (0, [TEER_GENERAL_KEY]) => Some(CurrencyId::TEER), + (0, []) => Some(CurrencyId::TEER), _ => None, } } @@ -136,14 +111,18 @@ impl Convert> for CurrencyIdConvert { } } -/// The means for routing XCM messages which are not for local execution into the right message -/// queues. -pub type XcmRouter = ( - // Two routers - use UMP to communicate with the relay chain: - cumulus_primitives_utility::ParentAsUmp, - // ..and XCMP to communicate with the sibling chains. - XcmpQueue, -); +parameter_types! { + pub const RelayChainLocation: Location = Location::parent(); + pub AssetHubLocation: Location = Location::new(1, [Parachain(1000)]); + pub const RelayNetwork: NetworkId = NetworkId::Polkadot; + pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); + // The universal location within the global consensus system + pub UniversalLocation: InteriorLocation = + [GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())].into(); + pub AssetsPalletLocation: Location = + PalletInstance(::index() as u8).into(); + pub CheckingAccount: AccountId = PolkadotXcm::check_account(); +} /// Type for specifying how a `Location` can be converted into an `AccountId`. This is used /// when determining ownership of accounts for asset transacting and when attempting to use XCM @@ -155,10 +134,12 @@ pub type LocationToAccountId = ( SiblingParachainConvertsVia, // Straight up local `AccountId32` origins just alias directly to `AccountId`. AccountId32Aliases, + // Foreign locations alias into accounts according to a hash of their standard description. + HashedDescription>, ); -/// Means for transacting assets on this chain. -pub type LocalAssetTransactor = FungibleAdapter< +/// Means for transacting TEER only. +pub type LocalNativeTransactor = FungibleAdapter< // Use this currency: Balances, // Matcher: matches concrete fungible assets whose `id` could be converted into `CurrencyId`. @@ -171,6 +152,54 @@ pub type LocalAssetTransactor = FungibleAdapter< (), >; +/// `AssetId/Balancer` converter for `TrustBackedAssets` +pub type TrustBackedAssetsConvertedConcreteId = + assets_common::TrustBackedAssetsConvertedConcreteId; + +/// Means for transacting assets besides the native currency on this chain. +/// Even if we currently don't plan to use this for arbitrary assets on our chain, +/// there is no harm in allowing asset transactions via xcm +pub type LocalFungiblesTransactor = FungiblesAdapter< + // Use this fungibles implementation: + Assets, + // Use this currency when it is a fungible asset matching the given location or name: + TrustBackedAssetsConvertedConcreteId, + // Convert an XCM Location into a local account id: + LocationToAccountId, + // Our chain's account ID type (we can't get away without mentioning it explicitly): + AccountId, + // We don't track any teleports of `Assets`. + NoChecking, + // We don't track any teleports of `Assets`, but a placeholder account is provided due to trait + // bounds. + CheckingAccount, +>; + +/// Means for transacting reserved fungible assets. +/// AsAssetLocation uses pallet_asset_registry to convert between AssetId and Location. +/// This will be used for ROC/KSM/DOT derivatives through pallet AssetRegistry +pub type ReservedFungiblesTransactor = FungiblesAdapter< + // Use this fungibles implementation: + Assets, + // Use this currency when it is a registered fungible asset matching the given location or name + // Assets not found in AssetRegistry will not be used + ConvertedRegisteredAssetId< + AssetIdForTrustBackedAssets, + Balance, + AsAssetLocation, + JustTry, + >, + // Convert an XCM Location into a local account id: + LocationToAccountId, + // Our chain's account ID type (we can't get away without mentioning it explicitly): + AccountId, + // We don't track any teleports of `Assets`. + NoChecking, + // We don't track any teleports of `Assets`, but a placeholder account is provided due to trait + // bounds. + CheckingAccount, +>; + /// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, /// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can /// biases the kind of local `Origin` it will become. @@ -195,47 +224,125 @@ pub type XcmOriginToTransactDispatchOrigin = ( XcmPassthrough, ); -/// This struct offers uses RelativeReserveProvider to output relative views of Locations -/// However, additionally accepts a Location that aims at representing the chain part -/// (parent: 1, Parachain(paraId)) of the absolute representation of our chain. -/// If a token reserve matches against this absolute view, we return Some(Location::here()) -/// This helps users by preventing errors when they try to transfer a token through xtokens -/// to our chain (either inserting the relative or the absolute value). -pub struct AbsoluteAndRelativeReserve(PhantomData); +pub struct ParentOrParentsExecutivePlurality; -impl Reserve for AbsoluteAndRelativeReserve -where - AbsoluteLocation: Get, -{ - fn reserve(asset: &Asset) -> Option { - RelativeReserveProvider::reserve(asset).map(|relative_reserve| { - if relative_reserve == AbsoluteLocation::get() { - Location::here() +impl Contains for ParentOrParentsExecutivePlurality { + fn contains(location: &Location) -> bool { + matches!(location.unpack(), (1, []) | (1, [Plurality { id: BodyId::Executive, .. }])) + } +} + +pub struct ParentOrSiblings; + +impl Contains for ParentOrSiblings { + fn contains(location: &Location) -> bool { + matches!(location.unpack(), (1, []) | (1, _)) + } +} + +// The barrier decides if we spend time executing an incoming XCM message +pub type Barrier = TrailingSetTopicAsId< + DenyThenTry< + DenyReserveTransferToRelayChain, + ( + TakeWeightCredit, + // Expected responses are OK. + AllowKnownQueryResponses, + // Allow XCMs with some computed origins to pass through. + WithComputedOrigin< + ( + // If the message is one that immediately attempts to pay for execution, then + // allow it. + AllowTopLevelPaidExecutionFrom, + // Parent, its pluralities (i.e. governance bodies), and the Fellows plurality + // get free execution. + AllowUnpaidExecutionFrom, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + ), + UniversalLocation, + ConstU32<8>, + >, + ), + >, +>; + +pub struct ReserveAssetsFrom(PhantomData); + +impl> ContainsPair for ReserveAssetsFrom { + fn contains(asset: &Asset, origin: &Location) -> bool { + let prefix = T::get(); + log::trace!(target: "xcm::AssetsFrom", "prefix: {:?}, origin: {:?}, asset: {:?}", prefix, origin, asset); + &prefix == origin + } +} + +pub struct OnlyTeleportNative; + +impl Contains<(Location, Vec)> for OnlyTeleportNative { + fn contains(t: &(Location, Vec)) -> bool { + let self_para_id: u32 = ParachainInfo::parachain_id().into(); + t.1.iter().any(|asset| { + log::trace!(target: "xcm::OnlyTeleportNative", "Asset requested to be teleported: {:?}", asset); + + if let Asset { id: AssetId(asset_loc), fun: Fungible(_a) } = asset { + match asset_loc.unpack() { + (0, []) => true, + (1, [Parachain(id)]) if *id == self_para_id => true, + _ => false, + } } else { - relative_reserve + false } }) } } +pub type Traders = ( + // for TEER + FixedRateOfFungible< + NativePerSecond, + XcmFeesTo32ByteAccount, + >, + // for TEER for XCM from Karura, Bifrost, Moonriver + FixedRateOfFungible< + NativeAliasPerSecond, + XcmFeesTo32ByteAccount, + >, + // for DOT aka RelayNative + FixedRateOfFungible< + RelayNativePerSecond, + XcmFeesTo32ByteAccount, + >, +); + parameter_types! { - // Weight for one XCM operation. Copied from moonbeam. - pub UnitWeightCost: Weight = Weight::from_parts(200_000_000u64, DEFAULT_PROOF_SIZE); - // One TEER buys 1 second of weight. - pub const WeightPrice: (Location, u128) = (Location::parent(), TEER); + pub const MaxAssetsIntoHolding: u32 = 64; + pub NativePerSecond: (AssetId, u128,u128) = (Location::new(0,Here).into(), TEER * 70, 0u128); + pub NativeAliasPerSecond: (AssetId, u128,u128) = (Location::new(0,[TEER_GENERAL_KEY]).into(), TEER * 70, 0u128); + pub RelayNativePerSecond: (AssetId, u128,u128) = (Location::new(1,Here).into(), TEER * 70, 0u128); + // Weight for one XCM operation. + pub UnitWeightCost: Weight = Weight::from_parts(1_000_000u64, DEFAULT_PROOF_SIZE); + pub const IntegriteeNative: AssetFilter = Wild(AllOf { fun: WildFungible, id: AssetId(Location::here()) }); + pub AssetHubTrustedTeleporter: (AssetFilter, Location) = (IntegriteeNative::get(), AssetHubLocation::get()); } -pub type Barrier = DenyThenTry< - DenyReserveTransferToRelayChain, - ( - TakeWeightCredit, - AllowTopLevelPaidExecutionFrom, - // Expected responses are OK. - AllowKnownQueryResponses, - // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, - ), ->; +pub type TrustedTeleporters = (staging_xcm_builder::Case,); + +pub type Reserves = (NativeAsset, ReserveAssetsFrom); + +/// The means for routing XCM messages which are not for local execution into the right message +/// queues. +pub type XcmRouter = ( + // Two routers - use UMP to communicate with the relay chain: + cumulus_primitives_utility::ParentAsUmp, + // ..and XCMP to communicate with the sibling chains. + XcmpQueue, +); + +/// Means for transacting assets on this chain. +pub type AssetTransactors = + (LocalNativeTransactor, ReservedFungiblesTransactor, LocalFungiblesTransactor); pub struct SafeCallFilter; @@ -247,24 +354,20 @@ impl frame_support::traits::Contains for SafeCallFilter { } } -parameter_types! { - pub const MaxAssetsIntoHolding: u32 = 64; -} - pub struct XcmConfig; impl staging_xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; // How to withdraw and deposit an asset. - type AssetTransactor = LocalAssetTransactor; + type AssetTransactor = AssetTransactors; type OriginConverter = XcmOriginToTransactDispatchOrigin; - type IsReserve = MultiNativeAsset>; - type IsTeleporter = (); // No teleport for now. Better be safe than sorry. + type IsReserve = Reserves; + type IsTeleporter = TrustedTeleporters; type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = FixedWeightBounds; - type Trader = UsingComponents, SelfReserve, AccountId, Balances, ()>; + type Trader = Traders; type ResponseHandler = PolkadotXcm; type SubscriptionService = PolkadotXcm; type AssetTrap = PolkadotXcm; @@ -289,8 +392,6 @@ impl staging_xcm_executor::Config for XcmConfig { // Converts a Signed Local Origin into a Location pub type LocalOriginToLocation = SignedToAccountId32; -// FIXME: We should probably update the configuration here. -// See acala and moonbeam example : https://github.com/integritee-network/parachain/issues/103 impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = EnsureXcmOrigin; // Prohibit sending arbitrary XCMs from users of this chain @@ -298,7 +399,7 @@ impl pallet_xcm::Config for Runtime { type ExecuteXcmOrigin = EnsureXcmOrigin; // Allow any local origin in XCM execution. type XcmExecuteFilter = Nothing; // Disable generic XCM execution. This does not affect Teleport or Reserve Transfer. type XcmExecutor = XcmExecutor; - type XcmTeleportFilter = Nothing; // Do not allow teleports + type XcmTeleportFilter = OnlyTeleportNative; type XcmReserveTransferFilter = Everything; // Transfer are allowed type Weigher = FixedWeightBounds; type UniversalLocation = UniversalLocation; @@ -311,38 +412,21 @@ impl pallet_xcm::Config for Runtime { type TrustedLockers = (); type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; - // TODO pallet-xcm weights - type WeightInfo = pallet_xcm::TestWeightInfo; + type WeightInfo = weights::pallet_xcm::WeightInfo; type AdminOrigin = EnsureRoot; type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); } -parameter_types! { - pub const IntegriteeKsmParaId: u32 = 2015; - pub const ShellRuntimeParaId: u32 = 2267; -} - -impl pallet_xcm_transactor::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RelayCallBuilder = RelayCallBuilder; - type XcmSender = XcmRouter; - type SwapOrigin = EnsureRoot; - type ShellRuntimeParaId = ShellRuntimeParaId; - type IntegriteeKsmParaId = IntegriteeKsmParaId; - type WeightInfo = (); -} - impl cumulus_pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; } -// FIXME: Update to PolkadotXcm. impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type ChannelInfo = ParachainSystem; - type VersionWrapper = (); + type VersionWrapper = PolkadotXcm; // Enqueue XCMP messages from siblings for later processing. type XcmpQueue = TransformOrigin; type MaxInboundSuspended = sp_core::ConstU32<1_000>; @@ -361,16 +445,111 @@ impl cumulus_pallet_xcmp_queue::migration::v5::V5Config for Runtime { type ChannelList = ParachainSystem; } +/// Copied from moonbeam: https://github.com/PureStake/moonbeam/blob/095031d171b0c163e5649ee35acbc36eef681a82/primitives/xcm/src/ethereum_xcm.rs#L34 +pub const DEFAULT_PROOF_SIZE: u64 = 1024; + +parameter_types! { + pub const BaseXcmWeight: Weight= Weight::from_parts(1_000_000u64, DEFAULT_PROOF_SIZE); + pub const MaxAssetsForTransfer: usize = 2; +} + +// What follows here are specialties only used for xToken reserve-transferring TEER to Karura, Bifrost and Moonriver + +const fn teer_general_key() -> Junction { + const TEER_KEY: [u8; 32] = *b"TEER\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; + GeneralKey { length: 4, data: TEER_KEY } +} + +const TEER_GENERAL_KEY: Junction = teer_general_key(); + +/// Converts a CurrencyId into a Location, used by xtoken for XCMP. +pub struct CurrencyIdConvert; + +impl Convert> for CurrencyIdConvert { + fn convert(id: CurrencyId) -> Option { + match id { + CurrencyId::TEER => Some(Location::new( + 1, + [Parachain(ParachainInfo::parachain_id().into()), TEER_GENERAL_KEY], + )), + } + } +} + parameter_types! { + pub SelfReserveAlias: Location = Location::new( + 0, [TEER_GENERAL_KEY] + ); // This is how we are going to detect whether the asset is a Reserve asset pub SelfLocation: Location = Location::here(); // We need this to be able to catch when someone is trying to execute a non- // cross-chain transfer in xtokens through the absolute path way - pub SelfLocationAbsolute: Location = Location { - parents:1, - interior: [Parachain(ParachainInfo::parachain_id().into())].into() + pub SelfLocationAbsolute: Location = Location::new( + 1, + [Parachain(ParachainInfo::parachain_id().into())] + ); + +} + +/// This struct offers uses RelativeReserveProvider to output relative views of Locations +/// However, additionally accepts a Location that aims at representing the chain part +/// (parent: 1, Parachain(paraId)) of the absolute representation of our chain. +/// If a token reserve matches against this absolute view, we return Some(Location::here()) +/// This helps users by preventing errors when they try to transfer a token through xtokens +/// to our chain (either inserting the relative or the absolute value). +pub struct AbsoluteAndRelativeReserve(PhantomData); + +impl Reserve for AbsoluteAndRelativeReserve +where + AbsoluteLocation: Get, +{ + fn reserve(asset: &Asset) -> Option { + RelativeReserveProvider::reserve(asset).map(|relative_reserve| { + if relative_reserve == AbsoluteLocation::get() { + Location::here() + } else { + relative_reserve + } + }) + } +} + +pub struct AccountIdToLocation; + +impl Convert for AccountIdToLocation { + fn convert(account: AccountId) -> Location { + Location::new(0, [Junction::AccountId32 { network: None, id: account.into() }]) + } +} + +// The min fee amount in fee asset is split into two parts: +// +// - fee asset sent to fee reserve chain = fee_amount - min_xcm_fee +// - fee asset sent to dest reserve chain = min_xcm_fee +// Check out for more information: +// https://github.com/open-web3-stack/open-runtime-module-library/tree/master/xtokens#transfer-multiple-currencies + +parameter_type_with_key! { + pub ParachainMinFee: |_location: Location| -> Option { + None }; } -/// Copied from moonbeam: https://github.com/PureStake/moonbeam/blob/095031d171b0c163e5649ee35acbc36eef681a82/primitives/xcm/src/ethereum_xcm.rs#L34 -pub const DEFAULT_PROOF_SIZE: u64 = 128 * 1024; +impl orml_xtokens::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Balance = Balance; + type CurrencyId = CurrencyId; + type CurrencyIdConvert = CurrencyIdConvert; + type AccountIdToLocation = AccountIdToLocation; + type SelfLocation = SelfLocation; + type XcmExecutor = XcmExecutor; + type Weigher = FixedWeightBounds; + type BaseXcmWeight = BaseXcmWeight; + type UniversalLocation = UniversalLocation; + type MaxAssetsForTransfer = MaxAssetsForTransfer; + type MinXcmFee = ParachainMinFee; + type LocationsFilter = Everything; + type ReserveProvider = AbsoluteAndRelativeReserve; + type RateLimiterId = (); + type RateLimiter = (); +} diff --git a/polkadot-parachains/shell-runtime/src/lib.rs b/polkadot-parachains/shell-runtime/src/lib.rs deleted file mode 100644 index 1735e41a..00000000 --- a/polkadot-parachains/shell-runtime/src/lib.rs +++ /dev/null @@ -1,555 +0,0 @@ -// Copyright 2021 Integritee AG and Supercomputing Systems AG -// This file is part of the "Integritee parachain" and is -// based on Cumulus from Parity Technologies (UK) Ltd. - -// Integritee parachain 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. - -// Cumulus 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 Integritee parachain. If not, see . - -#![cfg_attr(not(feature = "std"), no_std)] -// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. -#![recursion_limit = "256"] - -// Make the WASM binary available. -#[cfg(feature = "std")] -include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); - -use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; -use cumulus_primitives_core::AggregateMessageOrigin; -use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo}; -use parachains_common::message_queue::NarrowOriginToSibling; -use sp_api::impl_runtime_apis; -use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; -use sp_runtime::{ - create_runtime_str, generic, impl_opaque_keys, - traits::{Block as BlockT, ConvertInto}, - transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, -}; -use sp_std::prelude::*; -#[cfg(feature = "std")] -use sp_version::NativeVersion; -use sp_version::RuntimeVersion; -// A few exports that help ease life for downstream crates. -use frame_support::derive_impl; -pub use frame_support::{ - construct_runtime, - dispatch::DispatchClass, - genesis_builder_helper::{build_state, get_preset}, - match_types, parameter_types, - traits::{IsInVec, Randomness, WithdrawReasons}, - weights::{ - constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}, - IdentityFee, Weight, - }, - StorageValue, -}; -use frame_system::limits::{BlockLength, BlockWeights}; -pub use integritee_parachains_common::{ - AccountId, Address, Balance, BlockNumber, Hash, Header, Nonce, Signature, - BLOCK_PROCESSING_VELOCITY, MILLISECS_PER_BLOCK, RELAY_CHAIN_SLOT_DURATION_MILLIS, - UNINCLUDED_SEGMENT_CAPACITY, -}; -use integritee_parachains_common::{ - AuraId, AVERAGE_ON_INITIALIZE_RATIO, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, -}; -pub use pallet_balances::Call as BalancesCall; -#[cfg(any(feature = "std", test))] -pub use sp_runtime::BuildStorage; -pub use sp_runtime::{Perbill, Permill}; -// XCM imports -use frame_support::{ - traits::{ConstBool, Contains}, - weights::ConstantMultiplier, -}; - -pub mod xcm_config; - -pub type SessionHandlers = (); - -/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know -/// the specifics of the runtime. They can then be made to be agnostic over specific formats -/// of data like extrinsics, allowing for them to continue syncing the network through upgrades -/// to even the core data structures. -pub mod opaque { - pub use integritee_parachains_common::opaque::*; -} - -impl_opaque_keys! { - pub struct SessionKeys { - pub aura: Aura, - } -} - -/// This runtime version. -#[sp_version::runtime_version] -pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("integritee-parachain"), - impl_name: create_runtime_str!("integritee-shell"), - authoring_version: 0, - spec_version: 18, - impl_version: 0, - apis: RUNTIME_API_VERSIONS, - transaction_version: 1, - state_version: 0, -}; - -/// A timestamp: milliseconds since the unix epoch. -pub type Moment = u64; - -pub const TEER: Balance = 1_000_000_000_000; -pub const MILLITEER: Balance = 1_000_000_000; -pub const MICROTEER: Balance = 1_000_000; - -/// The version information used to identify this runtime when compiled natively. -#[cfg(feature = "std")] -pub fn native_version() -> NativeVersion { - NativeVersion { runtime_version: VERSION, can_author_with: Default::default() } -} - -parameter_types! { - pub const BlockHashCount: BlockNumber = 250; - pub const Version: RuntimeVersion = VERSION; - pub RuntimeBlockLength: BlockLength = - BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); - pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder() - .base_block(BlockExecutionWeight::get()) - .for_class(DispatchClass::all(), |weights| { - weights.base_extrinsic = ExtrinsicBaseWeight::get(); - }) - .for_class(DispatchClass::Normal, |weights| { - weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT); - }) - .for_class(DispatchClass::Operational, |weights| { - weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT); - // Operational transactions have some extra reserved space, so that they - // are included even if block reached `MAXIMUM_BLOCK_WEIGHT`. - weights.reserved = Some( - MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT - ); - }) - .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO) - .build_or_panic(); - pub const SS58Prefix: u8 = 13; -} - -pub struct DisableTokenTxFilter; - -impl Contains for DisableTokenTxFilter { - fn contains(call: &RuntimeCall) -> bool { - !matches!( - call, - RuntimeCall::Balances(_) | - RuntimeCall::Vesting(pallet_vesting::Call::vested_transfer { .. }) - ) - } -} - -/// The default types are being injected by [`derive_impl`](`frame_support::derive_impl`) from -/// [`ParaChainDefaultConfig`](`struct@frame_system::config_preludes::ParaChainDefaultConfig`), -/// but overridden as needed. -#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig as frame_system::DefaultConfig)] -impl frame_system::Config for Runtime { - type BaseCallFilter = DisableTokenTxFilter; - type BlockWeights = RuntimeBlockWeights; - type BlockLength = RuntimeBlockLength; - type Block = Block; - type AccountId = AccountId; - type Nonce = Nonce; - type Hash = Hash; - type BlockHashCount = BlockHashCount; - type DbWeight = RocksDbWeight; - type Version = Version; - type AccountData = pallet_balances::AccountData; - type SS58Prefix = SS58Prefix; - type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; - type MaxConsumers = frame_support::traits::ConstU32<16>; -} - -parameter_types! { - pub const MinimumPeriod: u64 = SLOT_DURATION / 2; -} - -impl pallet_timestamp::Config for Runtime { - /// A timestamp: milliseconds since the unix epoch. - type Moment = Moment; - type OnTimestampSet = (); - type MinimumPeriod = MinimumPeriod; - type WeightInfo = (); -} - -parameter_types! { - pub const ExistentialDeposit: u128 = MILLITEER; - pub const TransferFee: u128 = MILLITEER; - pub const CreationFee: u128 = MILLITEER; - pub const TransactionByteFee: u128 = MICROTEER; - pub const MaxLocks: u32 = 50; - pub const MaxReserves: u32 = 50; -} - -impl pallet_balances::Config for Runtime { - type MaxLocks = MaxLocks; - /// The type for recording an account's balance. - type Balance = Balance; - /// The ubiquitous event type. - type RuntimeEvent = RuntimeEvent; - type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; - type WeightInfo = (); - type MaxReserves = MaxReserves; - type ReserveIdentifier = [u8; 8]; - type FreezeIdentifier = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); - type RuntimeFreezeReason = (); -} - -impl pallet_transaction_payment::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type OnChargeTransaction = pallet_transaction_payment::FungibleAdapter; - type WeightToFee = IdentityFee; - type FeeMultiplierUpdate = (); - type LengthToFee = ConstantMultiplier; - type OperationalFeeMultiplier = (); -} - -impl pallet_sudo::Config for Runtime { - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); -} - -parameter_types! { - pub const MinVestedTransfer: Balance = 100 * TEER; - pub UnvestedFundsAllowedWithdrawReasons: WithdrawReasons = - WithdrawReasons::except(WithdrawReasons::TRANSFER | WithdrawReasons::RESERVE); -} - -impl pallet_vesting::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type BlockNumberToBalance = ConvertInto; - type BlockNumberProvider = System; - type MinVestedTransfer = MinVestedTransfer; - type WeightInfo = pallet_vesting::weights::SubstrateWeight; - type UnvestedFundsAllowedWithdrawReasons = UnvestedFundsAllowedWithdrawReasons; - const MAX_VESTING_SCHEDULES: u32 = 28; -} - -parameter_types! { - pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); - pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); - pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; -} - -type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< - Runtime, - RELAY_CHAIN_SLOT_DURATION_MILLIS, - BLOCK_PROCESSING_VELOCITY, - UNINCLUDED_SEGMENT_CAPACITY, ->; - -impl cumulus_pallet_parachain_system::Config for Runtime { - type WeightInfo = (); - type RuntimeEvent = RuntimeEvent; - type OnSystemEvent = (); - type SelfParaId = staging_parachain_info::Pallet; - type DmpQueue = frame_support::traits::EnqueueWithOrigin; - type ReservedDmpWeight = ReservedDmpWeight; - type OutboundXcmpMessageSource = XcmpQueue; - type XcmpMessageHandler = XcmpQueue; - type ReservedXcmpWeight = ReservedXcmpWeight; - type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases; - type ConsensusHook = ConsensusHook; -} - -impl staging_parachain_info::Config for Runtime {} - -impl cumulus_pallet_aura_ext::Config for Runtime {} - -parameter_types! { - pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; -} - -impl pallet_message_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); - #[cfg(feature = "runtime-benchmarks")] - type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor< - cumulus_primitives_core::AggregateMessageOrigin, - >; - #[cfg(not(feature = "runtime-benchmarks"))] - type MessageProcessor = staging_xcm_builder::ProcessXcmMessage< - AggregateMessageOrigin, - staging_xcm_executor::XcmExecutor, - RuntimeCall, - >; - type Size = u32; - // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: - type QueueChangeHandler = NarrowOriginToSibling; - type QueuePausedQuery = NarrowOriginToSibling; - type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; - type MaxStale = sp_core::ConstU32<8>; - type ServiceWeight = MessageQueueServiceWeight; - type IdleMaxServiceWeight = (); -} - -parameter_types! { - pub const AssetDeposit: Balance = TEER; - pub const ApprovalDeposit: Balance = 100 * MILLITEER; - pub const StringLimit: u32 = 50; - pub const MetadataDepositBase: Balance = TEER; - pub const MetadataDepositPerByte: Balance = 10 * MILLITEER; - pub const MaxInstructions: u32 = 100; - pub const MaxAuthorities: u32 = 100_000; -} - -impl pallet_aura::Config for Runtime { - type AuthorityId = AuraId; - type DisabledValidators = (); - type MaxAuthorities = MaxAuthorities; - type AllowMultipleBlocksPerSlot = ConstBool; - type SlotDuration = pallet_aura::MinimumPeriodTimesTwo; -} - -construct_runtime!( - pub enum Runtime - { - // System support stuff. - System: frame_system = 0, - ParachainSystem: cumulus_pallet_parachain_system = 1, - Timestamp: pallet_timestamp = 3, - ParachainInfo: staging_parachain_info = 4, - Sudo: pallet_sudo = 5, - - // Monetary stuff. - Balances: pallet_balances = 10, - TransactionPayment: pallet_transaction_payment = 11, - Vesting: pallet_vesting = 12, - - Aura: pallet_aura = 23, - AuraExt: cumulus_pallet_aura_ext = 24, - - XcmpQueue: cumulus_pallet_xcmp_queue = 30, - PolkadotXcm: pallet_xcm = 31, - CumulusXcm: cumulus_pallet_xcm = 32, - MessageQueue: pallet_message_queue = 33, - XcmTransactor: pallet_xcm_transactor = 34, - } -); - -/// The SignedExtension to the basic transaction logic. -pub type SignedExtra = ( - frame_system::CheckNonZeroSender, - frame_system::CheckSpecVersion, - frame_system::CheckTxVersion, - frame_system::CheckGenesis, - frame_system::CheckEra, - frame_system::CheckNonce, - frame_system::CheckWeight, - pallet_transaction_payment::ChargeTransactionPayment, - frame_metadata_hash_extension::CheckMetadataHash, -); -/// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = - generic::UncheckedExtrinsic; -/// Extrinsic type that has already been checked. -pub type CheckedExtrinsic = generic::CheckedExtrinsic; -/// Block type as expected by this runtime. -pub type Block = generic::Block; -/// A Block signed with a Justification -pub type SignedBlock = generic::SignedBlock; -/// BlockId type as expected by this runtime. -pub type BlockId = generic::BlockId; - -/// Executive: handles dispatch to the various modules. -pub type Executive = frame_executive::Executive< - Runtime, - Block, - frame_system::ChainContext, - Runtime, - AllPalletsWithSystem, // Solochain: AllPalletsReversedWithSystemFirst, Statemint: AllPallets. Which one to take? - (), ->; - -#[cfg(feature = "runtime-benchmarks")] -mod benches { - frame_benchmarking::define_benchmarks!( - [frame_system, SystemBench::] - [pallet_balances, Balances] - [pallet_timestamp, Timestamp] - [pallet_sudo, Sudo] - [cumulus_pallet_xcmp_queue, XcmpQueue] - ); -} - -impl_runtime_apis! { - impl sp_consensus_aura::AuraApi for Runtime { - fn slot_duration() -> sp_consensus_aura::SlotDuration { - sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration()) - } - - fn authorities() -> Vec { - pallet_aura::Authorities::::get().into_inner() - } - } - - impl cumulus_primitives_aura::AuraUnincludedSegmentApi for Runtime { - fn can_build_upon( - included_hash: ::Hash, - slot: cumulus_primitives_aura::Slot, - ) -> bool { - ConsensusHook::can_build_upon(included_hash, slot) - } - } - - impl sp_api::Core for Runtime { - fn version() -> RuntimeVersion { - VERSION - } - - fn execute_block(block: Block) { - Executive::execute_block(block) - } - - fn initialize_block(header: &::Header) -> sp_runtime::ExtrinsicInclusionMode { - Executive::initialize_block(header) - } - } - - impl sp_api::Metadata for Runtime { - fn metadata() -> OpaqueMetadata { - OpaqueMetadata::new(Runtime::metadata().into()) - } - - fn metadata_at_version(version: u32) -> Option { - Runtime::metadata_at_version(version) - } - - fn metadata_versions() -> sp_std::vec::Vec { - Runtime::metadata_versions() - } - } - - impl sp_block_builder::BlockBuilder for Runtime { - fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { - Executive::apply_extrinsic(extrinsic) - } - - fn finalize_block() -> ::Header { - Executive::finalize_block() - } - - fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<::Extrinsic> { - data.create_extrinsics() - } - - fn check_inherents( - block: Block, - data: sp_inherents::InherentData, - ) -> sp_inherents::CheckInherentsResult { - data.check_extrinsics(&block) - } - } - - impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { - fn validate_transaction( - source: TransactionSource, - tx: ::Extrinsic, - block_hash: ::Hash, - ) -> TransactionValidity { - Executive::validate_transaction(source, tx, block_hash) - } - } - - impl sp_offchain::OffchainWorkerApi for Runtime { - fn offchain_worker(header: &::Header) { - Executive::offchain_worker(header) - } - } - - impl sp_session::SessionKeys for Runtime { - fn generate_session_keys(seed: Option>) -> Vec { - SessionKeys::generate(seed) - } - - fn decode_session_keys( - encoded: Vec, - ) -> Option, KeyTypeId)>> { - SessionKeys::decode_into_raw_public_keys(&encoded) - } - } - - impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { - fn account_nonce(account: AccountId) -> Nonce { - System::account_nonce(account) - } - } - - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi for Runtime { - fn query_info(uxt: ::Extrinsic, len: u32) -> RuntimeDispatchInfo { - TransactionPayment::query_info(uxt, len) - } - fn query_fee_details(uxt: ::Extrinsic, len: u32) -> FeeDetails { - TransactionPayment::query_fee_details(uxt, len) - } - fn query_weight_to_fee(weight: Weight) -> Balance { - TransactionPayment::weight_to_fee(weight) - } - fn query_length_to_fee(length: u32) -> Balance { - TransactionPayment::length_to_fee(length) - } - } - - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi - for Runtime - { - fn query_call_info(call: RuntimeCall, len: u32) -> RuntimeDispatchInfo { - TransactionPayment::query_call_info(call, len) - } - fn query_call_fee_details(call: RuntimeCall, len: u32) -> FeeDetails { - TransactionPayment::query_call_fee_details(call, len) - } - fn query_weight_to_fee(weight: Weight) -> Balance { - TransactionPayment::weight_to_fee(weight) - } - fn query_length_to_fee(length: u32) -> Balance { - TransactionPayment::length_to_fee(length) - } - } - - impl cumulus_primitives_core::CollectCollationInfo for Runtime { - fn collect_collation_info(header: &::Header) -> cumulus_primitives_core::CollationInfo { - ParachainSystem::collect_collation_info(header) - } - } - - impl sp_genesis_builder::GenesisBuilder for Runtime { - fn build_state(config: Vec) -> sp_genesis_builder::Result { - build_state::(config) - } - - fn get_preset(id: &Option) -> Option> { - get_preset::(id, |_| None) - } - - fn preset_names() -> Vec { - vec![] - } - } -} - -cumulus_pallet_parachain_system::register_validate_block! { - Runtime = Runtime, - BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::, -} diff --git a/polkadot-parachains/src/chain_spec.rs b/polkadot-parachains/src/chain_spec.rs index b7be0e32..6d539949 100644 --- a/polkadot-parachains/src/chain_spec.rs +++ b/polkadot-parachains/src/chain_spec.rs @@ -17,8 +17,8 @@ #![allow(clippy::inconsistent_digit_grouping)] use cumulus_primitives_core::ParaId; -use integritee_parachains_common::{AccountId, AuraId}; -use integritee_runtime::TEER; +use integritee_kusama_runtime::TEER; +use integritee_parachains_common::AccountId; use parity_scale_codec::{Decode, Encode}; use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup}; use sc_service::ChainType; @@ -121,48 +121,6 @@ impl IntegriteeDevKeys { ] } } - -pub fn shell_chain_spec( - para_id: ParaId, - genesis_keys: GenesisKeys, - relay_chain: RelayChain, -) -> ChainSpec { - let mut properties = sc_chain_spec::Properties::new(); - properties.insert("tokenSymbol".into(), "TEER".into()); - properties.insert("tokenDecimals".into(), 12.into()); - properties.insert("ss58Format".into(), 13.into()); - - let (root, endowed, authorities) = match genesis_keys { - GenesisKeys::Integritee => - (IntegriteeKeys::root(), vec![IntegriteeKeys::root()], IntegriteeKeys::authorities()), - GenesisKeys::IntegriteeDev => ( - IntegriteeDevKeys::root(), - vec![IntegriteeDevKeys::root()], - IntegriteeDevKeys::authorities(), - ), - GenesisKeys::WellKnown => - (WellKnownKeys::root(), WellKnownKeys::endowed(), WellKnownKeys::authorities()), - }; - - #[allow(deprecated)] - ChainSpec::builder( - shell_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"), - Extensions { relay_chain: relay_chain.to_string(), para_id: para_id.into() }, - ) - .with_name("Integritee Shell") - .with_id(&format!("shell-{}", relay_chain.to_string())) - .with_protocol_id(relay_chain.protocol_id()) - .with_chain_type(relay_chain.chain_type()) - .with_properties(properties) - .with_genesis_config_patch(shell_genesis_config( - root.clone(), - endowed.clone(), - authorities.clone(), - para_id, - )) - .build() -} - pub fn integritee_chain_spec( para_id: ParaId, genesis_keys: GenesisKeys, @@ -186,10 +144,18 @@ pub fn integritee_chain_spec( }; #[allow(deprecated)] - ChainSpec::builder( - integritee_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"), - Extensions { relay_chain: relay_chain.to_string(), para_id: para_id.into() }, - ) + match relay_chain { + RelayChain::Polkadot | RelayChain::PolkadotLocal => ChainSpec::builder( + integritee_polkadot_runtime::WASM_BINARY + .expect("WASM binary was not built, please build it!"), + Extensions { relay_chain: relay_chain.to_string(), para_id: para_id.into() }, + ), + _ => ChainSpec::builder( + integritee_kusama_runtime::WASM_BINARY + .expect("WASM binary was not built, please build it!"), + Extensions { relay_chain: relay_chain.to_string(), para_id: para_id.into() }, + ), + } .with_name("Integritee Network") .with_id(&format!("integritee-{}", relay_chain.to_string())) .with_protocol_id(relay_chain.protocol_id()) @@ -211,19 +177,19 @@ fn integritee_genesis_config( parachain_id: ParaId, ) -> serde_json::Value { serde_json::json!({ - "collatorSelection": integritee_runtime::CollatorSelectionConfig { + "collatorSelection": integritee_kusama_runtime::CollatorSelectionConfig { invulnerables: invulnerables.clone(), candidacy_bond: 500 * TEER, ..Default::default() }, - "session": integritee_runtime::SessionConfig { + "session": integritee_kusama_runtime::SessionConfig { keys: invulnerables .into_iter() .map(|acc| { ( acc.clone(), // account id acc.clone(), // validator id - integritee_runtime::SessionKeys { aura: Decode::decode(&mut acc.encode().as_ref()).unwrap() }, // session keys + integritee_kusama_runtime::SessionKeys { aura: Decode::decode(&mut acc.encode().as_ref()).unwrap() }, // session keys ) }) .collect(), @@ -250,34 +216,6 @@ fn integritee_genesis_config( }) } -fn shell_genesis_config( - root_key: AccountId, - endowed_accounts: Vec, - initial_authorities: Vec, - parachain_id: ParaId, -) -> serde_json::Value { - serde_json::json!({ - "aura": { - "authorities": initial_authorities - .into_iter() - .map(|acc| { - Decode::decode(&mut acc.encode().as_ref()).unwrap() }, // session keys - ) - .collect::>(), - }, - "balances": { - "balances": endowed_accounts.iter().cloned().map(|k| (k, 100 * TEER)).collect::>(), - }, - "parachainInfo": { - "parachainId": parachain_id, - }, - "polkadotXcm": { - "safeXcmVersion": Some(SAFE_XCM_VERSION), - }, - "sudo": { "key": Some(root_key) } - }) -} - pub enum RelayChain { RococoLocal, WestendLocal, diff --git a/polkadot-parachains/src/command.rs b/polkadot-parachains/src/command.rs index e384c8a1..cb45bff5 100644 --- a/polkadot-parachains/src/command.rs +++ b/polkadot-parachains/src/command.rs @@ -1,21 +1,19 @@ //! //! this file DOES HAVE CUSTOMIZATIONS for integritee runtimes. Upon upgrades of polkadot-sdk, -//! look for blocks with `is_shell()` branching use crate::{ chain_spec, chain_spec::{ integritee_chain_spec, integritee_moonbase_config, integritee_paseo_config, - shell_chain_spec, shell_kusama_config, shell_kusama_lease2_config, - shell_kusama_lease3_config, shell_polkadot_config, shell_rococo_config, - shell_westend_config, GenesisKeys, RelayChain, + shell_kusama_config, shell_kusama_lease2_config, shell_kusama_lease3_config, + shell_polkadot_config, shell_rococo_config, shell_westend_config, GenesisKeys, RelayChain, }, cli::{Cli, RelayChainCli, Subcommand}, }; use cumulus_client_service::storage_proof_size::HostFunctions as ReclaimHostFunctions; use cumulus_primitives_core::ParaId; use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE}; -use integritee_runtime::Block; +use integritee_kusama_runtime::Block; use log::info; use sc_cli::{ ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams, @@ -29,7 +27,7 @@ const LOCAL_PARA_ID: u32 = 2015; const ROCOCO_PARA_ID: u32 = 2015; const WESTEND_PARA_ID: u32 = 2081; const KUSAMA_PARA_ID: u32 = 2015; -const KUSAMA_SWAP_PARA_ID: u32 = 2267; +//const KUSAMA_SWAP_PARA_ID: u32 = 2267; const POLKADOT_PARA_ID: u32 = 2039; const MOONBASE_PARA_ID: u32 = 2015; const PASEO_PARA_ID: u32 = 2015; @@ -69,12 +67,11 @@ fn load_spec( // live config initialize "integritee-rococo-fresh" => Box::new(integritee_chain_spec(ROCOCO_PARA_ID.into(), GenesisKeys::Integritee, RelayChain::Rococo)), - "integritee-westend-fresh" => Box::new(shell_chain_spec(WESTEND_PARA_ID.into(), GenesisKeys::Integritee, RelayChain::Westend)), - "integritee-kusama-fresh" => Box::new(shell_chain_spec(KUSAMA_PARA_ID.into(), GenesisKeys::Integritee, RelayChain::Kusama)), - "integritee-polkadot-fresh" => Box::new(shell_chain_spec(POLKADOT_PARA_ID.into(), GenesisKeys::Integritee, RelayChain::Polkadot)), + "integritee-westend-fresh" => Box::new(integritee_chain_spec(WESTEND_PARA_ID.into(), GenesisKeys::Integritee, RelayChain::Westend)), + "integritee-kusama-fresh" => Box::new(integritee_chain_spec(KUSAMA_PARA_ID.into(), GenesisKeys::Integritee, RelayChain::Kusama)), + "integritee-polkadot-fresh" => Box::new(integritee_chain_spec(POLKADOT_PARA_ID.into(), GenesisKeys::Integritee, RelayChain::Polkadot)), "integritee-moonbase-fresh" => Box::new(integritee_chain_spec(MOONBASE_PARA_ID.into(), GenesisKeys::IntegriteeDev, RelayChain::Moonbase)), "integritee-paseo-fresh" => Box::new(integritee_chain_spec(PASEO_PARA_ID.into(), GenesisKeys::Integritee, RelayChain::Paseo)), - "shell-kusama-fresh" => Box::new(shell_chain_spec(KUSAMA_SWAP_PARA_ID.into(), GenesisKeys::Integritee, RelayChain::Kusama)), // on-the-spot specs "integritee-rococo-local" => Box::new(integritee_chain_spec(LOCAL_PARA_ID.into(), GenesisKeys::Integritee, RelayChain::RococoLocal)), @@ -91,19 +88,7 @@ fn load_spec( "integritee-polkadot-local" => Box::new(integritee_chain_spec(LOCAL_PARA_ID.into(), GenesisKeys::Integritee, RelayChain::PolkadotLocal)), "integritee-polkadot-local-dev" => Box::new(integritee_chain_spec(LOCAL_PARA_ID.into(), GenesisKeys::WellKnown, RelayChain::PolkadotLocal)), - - "shell-rococo-local" => Box::new(shell_chain_spec(KUSAMA_SWAP_PARA_ID.into(), GenesisKeys::Integritee, RelayChain::RococoLocal)), - "shell-rococo-local-dev" => Box::new(shell_chain_spec(KUSAMA_SWAP_PARA_ID.into(), GenesisKeys::WellKnown, RelayChain::RococoLocal)), - - "shell-westend-local" => Box::new(shell_chain_spec(KUSAMA_SWAP_PARA_ID.into(), GenesisKeys::Integritee, RelayChain::WestendLocal)), - "shell-westend-local-dev" => Box::new(shell_chain_spec(KUSAMA_SWAP_PARA_ID.into(), GenesisKeys::WellKnown, RelayChain::WestendLocal)), - - "shell-kusama-local" => Box::new(shell_chain_spec(KUSAMA_SWAP_PARA_ID.into(), GenesisKeys::Integritee, RelayChain::KusamaLocal)), - "shell-kusama-local-dev" => Box::new(shell_chain_spec(KUSAMA_SWAP_PARA_ID.into(), GenesisKeys::WellKnown, RelayChain::KusamaLocal)), - - "shell-polkadot-local" => Box::new(shell_chain_spec(KUSAMA_SWAP_PARA_ID.into(), GenesisKeys::Integritee, RelayChain::PolkadotLocal)), - "shell-polkadot-local-dev" => Box::new(shell_chain_spec(KUSAMA_SWAP_PARA_ID.into(), GenesisKeys::WellKnown, RelayChain::PolkadotLocal)), - + "" => panic!("Please supply chain_spec to be loaded."), path => { let chain_spec = chain_spec::ChainSpec::from_json_file(path.into())?; @@ -188,8 +173,7 @@ impl SubstrateCli for RelayChainCli { macro_rules! construct_partials { ($config:expr, |$partials:ident| $code:expr) => { if $config.chain_spec.is_shell() { - let $partials = crate::service_shell::new_partial(&$config)?; - $code + unimplemented!() } else { let $partials = crate::service::new_partial(&$config)?; $code @@ -201,13 +185,7 @@ macro_rules! construct_async_run { (|$components:ident, $cli:ident, $cmd:ident, $config:ident| $( $code:tt )* ) => {{ let runner = $cli.create_runner($cmd)?; if runner.config().chain_spec.is_shell() { - runner.async_run(|$config| { - let $components = crate::service_shell::new_partial( - &$config, - )?; - let task_manager = $components.task_manager; - { $( $code )* }.map(|v| (v, task_manager)) - }) + unimplemented!() } else { runner.async_run(|$config| { let $components = crate::service::new_partial( @@ -360,16 +338,7 @@ pub fn run() -> Result<()> { info!("Is collating: {}", if config.role.is_authority() { "yes" } else { "no" }); if config.chain_spec.is_shell() { - crate::service_shell::start_parachain_node( - config, - polkadot_config, - collator_options, - id, - hwbench, - ) - .await - .map(|r| r.0) - .map_err(Into::into) + unimplemented!() } else { crate::service::start_parachain_node( config, diff --git a/polkadot-parachains/src/main.rs b/polkadot-parachains/src/main.rs index ed46e382..72ed283f 100644 --- a/polkadot-parachains/src/main.rs +++ b/polkadot-parachains/src/main.rs @@ -8,8 +8,6 @@ mod chain_spec; #[macro_use] mod service; -#[macro_use] -mod service_shell; mod cli; mod command; mod rpc; diff --git a/polkadot-parachains/src/service.rs b/polkadot-parachains/src/service.rs index 5b63bd23..f5c15998 100644 --- a/polkadot-parachains/src/service.rs +++ b/polkadot-parachains/src/service.rs @@ -8,8 +8,8 @@ use std::{sync::Arc, time::Duration}; use cumulus_client_cli::CollatorOptions; // Local Runtime Types +use integritee_kusama_runtime::RuntimeApi; use integritee_parachains_common::opaque::{Block, Hash}; -use integritee_runtime::RuntimeApi; // Cumulus Imports use cumulus_client_collator::service::CollatorService; diff --git a/polkadot-parachains/src/service_shell.rs b/polkadot-parachains/src/service_shell.rs deleted file mode 100644 index cc238545..00000000 --- a/polkadot-parachains/src/service_shell.rs +++ /dev/null @@ -1,411 +0,0 @@ -//! Service and ServiceFactory implementation. Specialized wrapper over substrate service. - -// Integritee customization -use substrate_prometheus_endpoint as prometheus_endpoint; - -// std -use std::{sync::Arc, time::Duration}; - -use cumulus_client_cli::CollatorOptions; -// Local Runtime Types -use integritee_parachains_common::opaque::{Block, Hash}; -use shell_runtime::RuntimeApi; - -// Cumulus Imports -use cumulus_client_collator::service::CollatorService; -use cumulus_client_consensus_aura::collators::lookahead::{self as aura, Params as AuraParams}; -use cumulus_client_consensus_common::ParachainBlockImport as TParachainBlockImport; -use cumulus_client_consensus_proposer::Proposer; -use cumulus_client_service::{ - build_network, build_relay_chain_interface, prepare_node_config, start_relay_chain_tasks, - BuildNetworkParams, CollatorSybilResistance, DARecoveryProfile, ParachainHostFunctions, - StartRelayChainTasksParams, -}; -use cumulus_primitives_core::{ - relay_chain::{CollatorPair, ValidationCode}, - ParaId, -}; -use cumulus_relay_chain_interface::{OverseerHandle, RelayChainInterface}; - -// Substrate Imports -use frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE; -use prometheus_endpoint::Registry; -use sc_client_api::Backend; -use sc_consensus::ImportQueue; -use sc_executor::{HeapAllocStrategy, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY}; -use sc_network::NetworkBlock; -use sc_network_sync::SyncingService; -use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager}; -use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle}; -use sc_transaction_pool_api::OffchainTransactionPoolFactory; -use sp_keystore::KeystorePtr; - -type ParachainExecutor = WasmExecutor; - -type ParachainClient = TFullClient; - -type ParachainBackend = TFullBackend; - -type ParachainBlockImport = TParachainBlockImport, ParachainBackend>; - -/// Assembly of PartialComponents (enough to run chain ops subcommands) -pub type Service = PartialComponents< - ParachainClient, - ParachainBackend, - (), - sc_consensus::DefaultImportQueue, - sc_transaction_pool::FullPool, - (ParachainBlockImport, Option, Option), ->; - -/// Starts a `ServiceBuilder` for a full service. -/// -/// Use this macro if you don't actually need the full service, but just the builder in order to -/// be able to perform chain operations. -pub fn new_partial(config: &Configuration) -> Result { - let telemetry = config - .telemetry_endpoints - .clone() - .filter(|x| !x.is_empty()) - .map(|endpoints| -> Result<_, sc_telemetry::Error> { - let worker = TelemetryWorker::new(16)?; - let telemetry = worker.handle().new_telemetry(endpoints); - Ok((worker, telemetry)) - }) - .transpose()?; - - let heap_pages = config - .default_heap_pages - .map_or(DEFAULT_HEAP_ALLOC_STRATEGY, |h| HeapAllocStrategy::Static { extra_pages: h as _ }); - - let executor = ParachainExecutor::builder() - .with_execution_method(config.wasm_method) - .with_onchain_heap_alloc_strategy(heap_pages) - .with_offchain_heap_alloc_strategy(heap_pages) - .with_max_runtime_instances(config.max_runtime_instances) - .with_runtime_cache_size(config.runtime_cache_size) - .build(); - - let (client, backend, keystore_container, task_manager) = - sc_service::new_full_parts_record_import::( - config, - telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()), - executor, - true, - )?; - let client = Arc::new(client); - - let telemetry_worker_handle = telemetry.as_ref().map(|(worker, _)| worker.handle()); - - let telemetry = telemetry.map(|(worker, telemetry)| { - task_manager.spawn_handle().spawn("telemetry", None, worker.run()); - telemetry - }); - - let transaction_pool = sc_transaction_pool::BasicPool::new_full( - config.transaction_pool.clone(), - config.role.is_authority().into(), - config.prometheus_registry(), - task_manager.spawn_essential_handle(), - client.clone(), - ); - - let block_import = ParachainBlockImport::new(client.clone(), backend.clone()); - - let import_queue = build_import_queue( - client.clone(), - block_import.clone(), - config, - telemetry.as_ref().map(|telemetry| telemetry.handle()), - &task_manager, - ); - - Ok(PartialComponents { - backend, - client, - import_queue, - keystore_container, - task_manager, - transaction_pool, - select_chain: (), - other: (block_import, telemetry, telemetry_worker_handle), - }) -} - -/// Build the import queue for the parachain runtime. -fn build_import_queue( - client: Arc, - block_import: ParachainBlockImport, - config: &Configuration, - telemetry: Option, - task_manager: &TaskManager, -) -> sc_consensus::DefaultImportQueue { - cumulus_client_consensus_aura::equivocation_import_queue::fully_verifying_import_queue::< - sp_consensus_aura::sr25519::AuthorityPair, - _, - _, - _, - _, - >( - client, - block_import, - move |_, _| async move { - let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); - Ok(timestamp) - }, - &task_manager.spawn_essential_handle(), - config.prometheus_registry(), - telemetry, - ) -} - -#[allow(clippy::too_many_arguments)] -fn start_consensus( - client: Arc, - backend: Arc, - block_import: ParachainBlockImport, - prometheus_registry: Option<&Registry>, - telemetry: Option, - task_manager: &TaskManager, - relay_chain_interface: Arc, - transaction_pool: Arc>, - sync_oracle: Arc>, - keystore: KeystorePtr, - relay_chain_slot_duration: Duration, - para_id: ParaId, - collator_key: CollatorPair, - overseer_handle: OverseerHandle, - announce_block: Arc>) + Send + Sync>, -) -> Result<(), sc_service::Error> { - let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( - task_manager.spawn_handle(), - client.clone(), - transaction_pool, - prometheus_registry, - telemetry.clone(), - ); - - let proposer = Proposer::new(proposer_factory); - - let collator_service = CollatorService::new( - client.clone(), - Arc::new(task_manager.spawn_handle()), - announce_block, - client.clone(), - ); - - let params = AuraParams { - create_inherent_data_providers: move |_, ()| async move { Ok(()) }, - block_import, - para_client: client.clone(), - para_backend: backend, - relay_client: relay_chain_interface, - code_hash_provider: move |block_hash| { - client.code_at(block_hash).ok().map(|c| ValidationCode::from(c).hash()) - }, - sync_oracle, - keystore, - collator_key, - para_id, - overseer_handle, - relay_chain_slot_duration, - proposer, - collator_service, - authoring_duration: Duration::from_millis(2000), - reinitialize: false, - }; - - let fut = - aura::run::( - params, - ); - task_manager.spawn_essential_handle().spawn("aura", None, fut); - - Ok(()) -} - -/// Start a node with the given parachain `Configuration` and relay chain `Configuration`. -#[sc_tracing::logging::prefix_logs_with("Parachain")] -pub async fn start_parachain_node( - parachain_config: Configuration, - polkadot_config: Configuration, - collator_options: CollatorOptions, - para_id: ParaId, - hwbench: Option, -) -> sc_service::error::Result<(TaskManager, Arc)> { - let parachain_config = prepare_node_config(parachain_config); - - let params = new_partial(¶chain_config)?; - let (block_import, mut telemetry, telemetry_worker_handle) = params.other; - let net_config = sc_network::config::FullNetworkConfiguration::< - _, - _, - sc_network::NetworkWorker, - >::new(¶chain_config.network); - - let client = params.client.clone(); - let backend = params.backend.clone(); - let mut task_manager = params.task_manager; - - let (relay_chain_interface, collator_key) = build_relay_chain_interface( - polkadot_config, - ¶chain_config, - telemetry_worker_handle, - &mut task_manager, - collator_options.clone(), - hwbench.clone(), - ) - .await - .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?; - - let validator = parachain_config.role.is_authority(); - let prometheus_registry = parachain_config.prometheus_registry().cloned(); - let transaction_pool = params.transaction_pool.clone(); - let import_queue_service = params.import_queue.service(); - - // NOTE: because we use Aura here explicitly, we can use `CollatorSybilResistance::Resistant` - // when starting the network. - let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) = - build_network(BuildNetworkParams { - parachain_config: ¶chain_config, - net_config, - client: client.clone(), - transaction_pool: transaction_pool.clone(), - para_id, - spawn_handle: task_manager.spawn_handle(), - relay_chain_interface: relay_chain_interface.clone(), - import_queue: params.import_queue, - sybil_resistance_level: CollatorSybilResistance::Resistant, // because of Aura - }) - .await?; - - if parachain_config.offchain_worker.enabled { - use futures::FutureExt; - - task_manager.spawn_handle().spawn( - "offchain-workers-runner", - "offchain-work", - sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions { - runtime_api_provider: client.clone(), - keystore: Some(params.keystore_container.keystore()), - offchain_db: backend.offchain_storage(), - transaction_pool: Some(OffchainTransactionPoolFactory::new( - transaction_pool.clone(), - )), - network_provider: Arc::new(network.clone()), - is_validator: parachain_config.role.is_authority(), - enable_http_requests: false, - custom_extensions: move |_| vec![], - }) - .run(client.clone(), task_manager.spawn_handle()) - .boxed(), - ); - } - - let rpc_builder = { - let client = client.clone(); - let transaction_pool = transaction_pool.clone(); - - Box::new(move |deny_unsafe, _| { - let deps = crate::rpc::FullDeps { - client: client.clone(), - pool: transaction_pool.clone(), - deny_unsafe, - }; - - crate::rpc::create_full(deps).map_err(Into::into) - }) - }; - - sc_service::spawn_tasks(sc_service::SpawnTasksParams { - rpc_builder, - client: client.clone(), - transaction_pool: transaction_pool.clone(), - task_manager: &mut task_manager, - config: parachain_config, - keystore: params.keystore_container.keystore(), - backend: backend.clone(), - network, - sync_service: sync_service.clone(), - system_rpc_tx, - tx_handler_controller, - telemetry: telemetry.as_mut(), - })?; - - if let Some(hwbench) = hwbench { - sc_sysinfo::print_hwbench(&hwbench); - // Here you can check whether the hardware meets your chains' requirements. Putting a link - // in there and swapping out the requirements for your own are probably a good idea. The - // requirements for a para-chain are dictated by its relay-chain. - match SUBSTRATE_REFERENCE_HARDWARE.check_hardware(&hwbench) { - Err(err) if validator => { - log::warn!( - "⚠️ The hardware does not meet the minimal requirements {} for role 'Authority'.", - err - ); - }, - _ => {}, - } - - if let Some(ref mut telemetry) = telemetry { - let telemetry_handle = telemetry.handle(); - task_manager.spawn_handle().spawn( - "telemetry_hwbench", - None, - sc_sysinfo::initialize_hwbench_telemetry(telemetry_handle, hwbench), - ); - } - } - - let announce_block = { - let sync_service = sync_service.clone(); - Arc::new(move |hash, data| sync_service.announce_block(hash, data)) - }; - - let relay_chain_slot_duration = Duration::from_secs(6); - - let overseer_handle = relay_chain_interface - .overseer_handle() - .map_err(|e| sc_service::Error::Application(Box::new(e)))?; - - start_relay_chain_tasks(StartRelayChainTasksParams { - client: client.clone(), - announce_block: announce_block.clone(), - para_id, - relay_chain_interface: relay_chain_interface.clone(), - task_manager: &mut task_manager, - da_recovery_profile: if validator { - DARecoveryProfile::Collator - } else { - DARecoveryProfile::FullNode - }, - import_queue: import_queue_service, - relay_chain_slot_duration, - recovery_handle: Box::new(overseer_handle.clone()), - sync_service: sync_service.clone(), - })?; - - if validator { - start_consensus( - client.clone(), - backend, - block_import, - prometheus_registry.as_ref(), - telemetry.as_ref().map(|t| t.handle()), - &task_manager, - relay_chain_interface, - transaction_pool, - sync_service, - params.keystore_container.keystore(), - relay_chain_slot_duration, - para_id, - collator_key.expect("Command line arguments do not allow this. qed"), - overseer_handle, - announce_block, - )?; - } - - start_network.start_network(); - - Ok((task_manager, client)) -} diff --git a/scripts/benchmark_all_pallets.sh b/scripts/benchmark_all_pallets.sh index f215199f..e52ef744 100755 --- a/scripts/benchmark_all_pallets.sh +++ b/scripts/benchmark_all_pallets.sh @@ -1,8 +1,8 @@ #!/bin/bash -# Create `WeightInfo` implementations for all the pallets and store it in the weight module of the `integritee-runtime`. +# Create `WeightInfo` implementations for all the pallets and store it in the weight module of the `integritee-kusama`. -INTEGRITEE_RUNTIME_WEIGHT_DIR=polkadot-parachains/integritee-runtime/src/weights +INTEGRITEE_RUNTIME_WEIGHT_DIR=polkadot-parachains/integritee-kusama/src/weights COLLATOR=./target/release/integritee-collator mkdir -p $INTEGRITEE_RUNTIME_WEIGHT_DIR diff --git a/scripts/github/lib.rb b/scripts/github/lib.rb index 39ad8556..b4a2b43b 100644 --- a/scripts/github/lib.rb +++ b/scripts/github/lib.rb @@ -6,7 +6,7 @@ # Optionally accepts a path that is the root of the project which defaults to # the current working directory def get_runtime(runtime, path = '.') - File.open(path + "/polkadot-parachains/#{runtime}-runtime/src/lib.rs") do |f| + File.open(path + "/polkadot-parachains/#{runtime}/src/lib.rs") do |f| f.find { |l| l =~ /spec_version/ }.match(/[0-9]+/)[0] end end diff --git a/zombienet/rococo-local-with-integritee-and-asset-hub.toml b/zombienet/rococo-local-with-integritee-and-asset-hub.toml index c1f1333a..b0ed46d8 100644 --- a/zombienet/rococo-local-with-integritee-and-asset-hub.toml +++ b/zombienet/rococo-local-with-integritee-and-asset-hub.toml @@ -29,13 +29,13 @@ chain = "integritee-rococo-local-dev" [[parachains.collators]] name = "integritee-collator-1" - command = "~/bin/integritee-collator" + command = "./target/release/integritee-collator" args = ["-lxcm=trace,runtime=debug --state-pruning=archive --blocks-pruning=archive"] ws_port = 9944 [[parachains.collators]] name = "integritee-collator-2" - command = "~/bin/integritee-collator" + command = "./target/release/integritee-collator" args = ["-lxcm=trace,runtime=debug"] ws_port = 9945