diff --git a/.github/workflows/CI-docker-gear.yml b/.github/workflows/CI-docker-gear.yml index 69ec358f421..cc552ad1fb1 100644 --- a/.github/workflows/CI-docker-gear.yml +++ b/.github/workflows/CI-docker-gear.yml @@ -16,7 +16,7 @@ jobs: runs-on: [kuberunner] steps: - uses: actions/checkout@v4 - - uses: docker/setup-buildx-action@v2 + - uses: docker/setup-buildx-action@v3 - uses: actions/cache@v3 with: @@ -25,7 +25,7 @@ jobs: restore-keys: | ${{ runner.os }}-buildx-gear - - uses: docker/login-action@v2 + - uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} @@ -38,7 +38,7 @@ jobs: echo "DOCKER_TAGS=ghcr.io/gear-tech/node:latest,ghcr.io/gear-tech/node:${{ env.RELEASE_VERSION }}" >> $GITHUB_ENV fi - - uses: docker/build-push-action@v4 + - uses: docker/build-push-action@v5 with: file: ./docker/Dockerfile-release push: true diff --git a/.github/workflows/Update-Vara-Prod.yml b/.github/workflows/Update-Vara-Prod.yml index 8c162a7b09f..1838c71c749 100644 --- a/.github/workflows/Update-Vara-Prod.yml +++ b/.github/workflows/Update-Vara-Prod.yml @@ -27,13 +27,13 @@ jobs: uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} @@ -41,7 +41,7 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./docker/Vara-Dockerfile diff --git a/.github/workflows/Update-testnet.yml b/.github/workflows/Update-testnet.yml index 8fdf955af51..d824af06b7c 100644 --- a/.github/workflows/Update-testnet.yml +++ b/.github/workflows/Update-testnet.yml @@ -30,10 +30,10 @@ jobs: run: echo ${{ needs.tag-image.outputs.image_tag }} - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} @@ -41,7 +41,7 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./docker/Dockerfile diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 47a3b076dbe..a2932cbffa8 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -39,12 +39,10 @@ jobs: - name: Run all benchmarks run: | - ./scripts/benchmarking/run_all_benchmarks.sh -c gear-dev -m - cp ./scripts/benchmarking/weights-output/* runtime/gear/src/weights - ./scripts/benchmarking/run_all_benchmarks.sh -b -c vara-dev -m # -b to skip build + ./scripts/benchmarking/run_all_benchmarks.sh -c vara-dev -m cp ./scripts/benchmarking/weights-output/* runtime/vara/src/weights # apply some patches for `pallets/gear/src/weights.rs` - cp runtime/gear/src/weights/pallet_gear.rs pallets/gear/src/weights.rs + cp runtime/vara/src/weights/pallet_gear.rs pallets/gear/src/weights.rs sed -i -E 's/\w+::WeightInfo for SubstrateWeight/WeightInfo for SubstrateWeight/' pallets/gear/src/weights.rs # clear the target directory because our benchmarking machine is not ephemeral cargo clean @@ -57,12 +55,6 @@ jobs: path: scripts/benchmarking/benchmarking_errors.txt if-no-files-found: ignore - - name: "ACTIONS: Upload artifact with updated weights (gear)" - uses: actions/upload-artifact@v3 - with: - name: weights-gear - path: runtime/gear/src/weights/ - - name: "ACTIONS: Upload artifact with updated weights (vara)" uses: actions/upload-artifact@v3 with: @@ -75,11 +67,11 @@ jobs: - name: Create commit if: ${{ inputs.change-type == 'commit' }} - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: >- chore(runtime): update weights - file_pattern: "pallets/gear/src/ runtime/gear/src/weights/ runtime/vara/src/weights/" + file_pattern: "pallets/gear/src/ runtime/vara/src/weights/" - name: Create Pull Request if: ${{ inputs.change-type == 'pull_request' }} @@ -87,7 +79,6 @@ jobs: with: add-paths: | pallets/gear/src/ - runtime/gear/src/weights/ runtime/vara/src/weights/ commit-message: update weights branch: weights/patch @@ -96,4 +87,4 @@ jobs: chore(runtime): update weights body: | `run_all_benchmarks.sh` script is applied to update weights (branch: `${{ github.ref_name }}`, commit ${{ github.sha }}) - **Note:** If CI fails, try manually updating the heuristic tests: `runtime/{gear, vara}/src/tests.rs` + **Note:** If CI fails, try manually updating the heuristic tests: `runtime/vara/src/tests.rs` diff --git a/.github/workflows/build-node-fuzzer.yaml b/.github/workflows/build-node-fuzzer.yaml index dee6607cade..6b2296bf68a 100644 --- a/.github/workflows/build-node-fuzzer.yaml +++ b/.github/workflows/build-node-fuzzer.yaml @@ -22,10 +22,10 @@ jobs: uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Log in to the github container registry uses: docker/login-action@master diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9e9855f0e6e..09ca0ceb9d8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,9 +71,6 @@ jobs: - name: "Build fuzzer" run: ./scripts/gear.sh build fuzz --locked --release - - name: "Check: Gear runtime imports" - run: ./target/release/wasm-proc --check-runtime-imports target/release/wbuild/gear-runtime/gear_runtime.compact.wasm - - name: "Check: Vara runtime imports" run: ./target/release/wasm-proc --check-runtime-imports target/release/wbuild/vara-runtime/vara_runtime.compact.wasm @@ -164,9 +161,6 @@ jobs: cd target/wasm32-unknown-unknown/release tar czvf ../../../artifact/examples.tar.gz *.wasm cd ../../.. - cp target/production/wbuild/gear-runtime/gear_runtime.compact.compressed.wasm artifact/ - cp target/production/wbuild/gear-runtime/gear_runtime.compact.wasm artifact/ - cp target/production/wbuild/gear-runtime/gear_runtime.wasm artifact/ cp target/production/wbuild/vara-runtime/vara_runtime.compact.compressed.wasm artifact/ cp target/production/wbuild/vara-runtime/vara_runtime.compact.wasm artifact/ cp target/production/wbuild/vara-runtime/vara_runtime.wasm artifact/ diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 5d0588a862e..edb648865d9 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -71,7 +71,7 @@ jobs: steps: - name: Cancel Previous Runs if: ${{ github.event_name == 'pull_request' }} - uses: styfle/cancel-workflow-action@0.11.0 + uses: styfle/cancel-workflow-action@0.12.0 with: access_token: ${{ github.token }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 38c4d7d390f..984dd6784d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,7 +65,6 @@ jobs: - name: "Environment: Export versions" run: | - echo "GEAR_SPEC=$(cat runtime/gear/src/lib.rs | grep "spec_version: " | awk -F " " '{print substr($2, 1, length($2)-1)}')" >> $GITHUB_ENV echo "VARA_SPEC=$(cat runtime/vara/src/lib.rs | grep "spec_version: " | awk -F " " '{print substr($2, 1, length($2)-1)}')" >> $GITHUB_ENV - name: "Environment: Make `artifact` directory" @@ -79,27 +78,23 @@ jobs: - name: "Build: Production `vara-runtime`" run: cargo build -p vara-runtime --profile production --no-default-features --features std - - name: "Test: Production `vara-runtime`" - run: ./wasm-proc --check-runtime-imports target/production/wbuild/vara-runtime/vara_runtime.wasm - - name: "Artifact: Production `vara-runtime`" run: cp target/production/wbuild/vara-runtime/vara_runtime.compact.compressed.wasm "artifact/vara_runtime_v$VARA_SPEC.wasm" - name: "Build: Production node with development runtimes" run: cargo build -p gear-cli --profile production - - name: "Test: Development runtimes" - run: | - ./wasm-proc --check-runtime-imports target/production/wbuild/gear-runtime/gear_runtime.wasm - ./wasm-proc --check-runtime-imports target/production/wbuild/vara-runtime/vara_runtime.wasm - - - name: "Artifact: Production node and development runtimes" + - name: "Artifact: Production node client and development `vara-runtime`" run: | - cp target/production/wbuild/gear-runtime/gear_runtime.compact.compressed.wasm "artifact/gear_devruntime_v$GEAR_SPEC.wasm" cp target/production/wbuild/vara-runtime/vara_runtime.compact.compressed.wasm "artifact/vara_devruntime_v$VARA_SPEC.wasm" cp target/production/gear artifact/gear strip artifact/gear || true + - name: "Test: Runtimes" + run: | + ./wasm-proc --check-runtime-imports --check-runtime-is-dev false "artifact/vara_runtime_v$VARA_SPEC.wasm" + ./wasm-proc --check-runtime-imports --check-runtime-is-dev true "artifact/vara_devruntime_v$VARA_SPEC.wasm" + - name: Publish uses: softprops/action-gh-release@v1 with: diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 09ca0e73dc1..67bcb54f0f4 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -36,10 +36,10 @@ jobs: run: echo ${{ needs.tag-image.outputs.image_tag }} - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} @@ -47,7 +47,7 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./docker/Dockerfile diff --git a/Cargo.lock b/Cargo.lock index f7f09b33f6e..b1334fe318a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3286,7 +3286,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "parity-scale-codec", ] @@ -3309,7 +3309,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-support", "frame-support-procedural", @@ -3334,7 +3334,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "Inflector", "array-bytes", @@ -3381,7 +3381,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -3392,7 +3392,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -3409,7 +3409,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-support", "frame-system", @@ -3450,7 +3450,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "futures", "log", @@ -3466,7 +3466,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "bitflags 1.3.2", "environmental", @@ -3499,7 +3499,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "Inflector", "cfg-expr", @@ -3514,7 +3514,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.3", @@ -3526,7 +3526,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "proc-macro2", "quote", @@ -3536,7 +3536,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-benchmarking", "frame-support", @@ -3560,7 +3560,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-support", "frame-system", @@ -3571,7 +3571,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-support", "log", @@ -3589,7 +3589,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-benchmarking", "frame-support", @@ -3604,7 +3604,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "parity-scale-codec", "sp-api", @@ -3613,7 +3613,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-support", "parity-scale-codec", @@ -3977,7 +3977,6 @@ dependencies = [ "frame-system", "futures", "gcli", - "gear-runtime", "gear-runtime-interface", "gear-runtime-primitives", "gear-service", @@ -4218,7 +4217,6 @@ dependencies = [ "futures", "futures-timer", "gear-common", - "gear-runtime", "gear-runtime-interface", "gear-runtime-primitives", "gear-service", @@ -4255,7 +4253,6 @@ dependencies = [ "clap 4.4.2", "frame-remote-externalities", "frame-system", - "gear-runtime", "gear-runtime-interface", "gear-runtime-primitives", "gear-service", @@ -4277,68 +4274,6 @@ dependencies = [ "vara-runtime", ] -[[package]] -name = "gear-runtime" -version = "1.0.1" -dependencies = [ - "const-str", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", - "gear-common", - "gear-core-processor", - "gear-lazy-pages-common", - "gear-runtime-common", - "gear-runtime-primitives", - "hex-literal", - "log", - "pallet-authorship", - "pallet-babe", - "pallet-balances", - "pallet-gear", - "pallet-gear-bank", - "pallet-gear-debug", - "pallet-gear-gas", - "pallet-gear-messenger", - "pallet-gear-payment", - "pallet-gear-program", - "pallet-gear-rpc-runtime-api", - "pallet-gear-scheduler", - "pallet-gear-staking-rewards", - "pallet-gear-staking-rewards-rpc-runtime-api", - "pallet-gear-voucher", - "pallet-grandpa", - "pallet-multisig", - "pallet-proxy", - "pallet-session", - "pallet-sudo", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-utility", - "parity-scale-codec", - "scale-info", - "sp-api", - "sp-block-builder", - "sp-consensus-babe", - "sp-core", - "sp-inherents", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std 5.0.0", - "sp-transaction-pool", - "sp-version", - "static_assertions", - "substrate-build-script-utils", - "substrate-validator-set", - "substrate-wasm-builder", -] - [[package]] name = "gear-runtime-common" version = "1.0.1" @@ -4453,7 +4388,6 @@ dependencies = [ "futures-timer", "gear-authorship", "gear-common", - "gear-runtime", "gear-runtime-common", "gear-runtime-interface", "gear-runtime-primitives", @@ -4632,7 +4566,6 @@ version = "1.0.0" dependencies = [ "clap 4.4.2", "frame-support", - "gear-runtime", "indexmap 2.0.0", "pallet-gear", "serde", @@ -4644,7 +4577,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "chrono", "frame-election-provider-support", @@ -7419,7 +7352,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-support", "frame-system", @@ -7435,7 +7368,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-support", "frame-system", @@ -7449,7 +7382,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-benchmarking", "frame-support", @@ -7473,7 +7406,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7493,7 +7426,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-benchmarking", "frame-support", @@ -7508,7 +7441,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-benchmarking", "frame-support", @@ -7526,7 +7459,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-benchmarking", "frame-support", @@ -7545,7 +7478,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "assert_matches", "frame-benchmarking", @@ -7562,7 +7495,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7585,7 +7518,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8006,7 +7939,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-benchmarking", "frame-support", @@ -8029,7 +7962,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "enumflags2 0.7.7", "frame-benchmarking", @@ -8045,7 +7978,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-benchmarking", "frame-support", @@ -8065,7 +7998,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-benchmarking", "frame-support", @@ -8081,7 +8014,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-support", "frame-system", @@ -8098,7 +8031,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -8109,7 +8042,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-support", "frame-system", @@ -8126,7 +8059,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-benchmarking", "frame-support", @@ -8143,7 +8076,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-benchmarking", "frame-support", @@ -8158,7 +8091,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-benchmarking", "frame-support", @@ -8176,7 +8109,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "assert_matches", "frame-benchmarking", @@ -8195,7 +8128,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-benchmarking", "frame-support", @@ -8212,7 +8145,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-support", "frame-system", @@ -8233,7 +8166,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8256,7 +8189,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "log", "sp-arithmetic", @@ -8265,7 +8198,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "parity-scale-codec", "sp-api", @@ -8274,7 +8207,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-support", "frame-system", @@ -8288,7 +8221,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-benchmarking", "frame-support", @@ -8306,7 +8239,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-support", "frame-system", @@ -8322,7 +8255,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "jsonrpsee 0.16.3", "pallet-transaction-payment-rpc-runtime-api", @@ -8338,7 +8271,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -8350,7 +8283,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-benchmarking", "frame-support", @@ -8367,7 +8300,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-benchmarking", "frame-support", @@ -8383,7 +8316,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-benchmarking", "frame-support", @@ -8398,7 +8331,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-benchmarking", "frame-support", @@ -9452,7 +9385,6 @@ version = "0.1.0" dependencies = [ "clap 4.4.2", "frame-support", - "gear-runtime", "junit-common", "pallet-gear", "quick-xml", @@ -9460,6 +9392,7 @@ dependencies = [ "serde_json", "tabled", "thousands", + "vara-runtime", ] [[package]] @@ -9657,7 +9590,6 @@ dependencies = [ "gear-call-gen", "gear-common", "gear-core", - "gear-runtime", "gear-runtime-primitives", "gear-utils", "gear-wasm-gen", @@ -9667,10 +9599,12 @@ dependencies = [ "pallet-balances", "pallet-gear", "pallet-gear-bank", + "pallet-im-online", "parity-scale-codec", "proptest", "rand 0.8.5", "sha-1 0.10.1", + "sp-authority-discovery", "sp-consensus-babe", "sp-consensus-grandpa", "sp-consensus-slots", @@ -9679,6 +9613,7 @@ dependencies = [ "sp-keyring", "sp-runtime", "static_assertions", + "vara-runtime", ] [[package]] @@ -9916,7 +9851,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "async-trait", "futures", @@ -9944,7 +9879,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9959,7 +9894,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -9978,7 +9913,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -9989,7 +9924,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "array-bytes", "chrono", @@ -10029,7 +9964,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "fnv", "futures", @@ -10055,7 +9990,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "hash-db", "kvdb", @@ -10081,7 +10016,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "async-trait", "futures", @@ -10106,7 +10041,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "async-trait", "fork-tree", @@ -10145,7 +10080,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "futures", "jsonrpsee 0.16.3", @@ -10167,7 +10102,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "fork-tree", "parity-scale-codec", @@ -10180,7 +10115,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "ahash 0.8.3", "array-bytes", @@ -10220,7 +10155,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "finality-grandpa", "futures", @@ -10240,7 +10175,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "async-trait", "futures", @@ -10263,7 +10198,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "lru 0.8.1", "parity-scale-codec", @@ -10287,7 +10222,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "sp-allocator", "sp-maybe-compressed-blob", @@ -10300,7 +10235,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "log", "sc-executor-common", @@ -10313,7 +10248,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "anyhow", "cfg-if", @@ -10331,7 +10266,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "ansi_term", "futures", @@ -10347,7 +10282,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "array-bytes", "async-trait", @@ -10362,7 +10297,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "array-bytes", "async-channel", @@ -10406,7 +10341,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "cid", "futures", @@ -10426,7 +10361,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "array-bytes", "async-trait", @@ -10454,7 +10389,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "ahash 0.8.3", "futures", @@ -10473,7 +10408,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "array-bytes", "futures", @@ -10495,7 +10430,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "array-bytes", "async-trait", @@ -10529,7 +10464,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "array-bytes", "futures", @@ -10549,7 +10484,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "array-bytes", "bytes", @@ -10580,7 +10515,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "futures", "libp2p", @@ -10593,7 +10528,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10602,7 +10537,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "futures", "jsonrpsee 0.16.3", @@ -10632,7 +10567,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "jsonrpsee 0.16.3", "parity-scale-codec", @@ -10651,7 +10586,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "http", "jsonrpsee 0.16.3", @@ -10666,7 +10601,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "array-bytes", "futures", @@ -10692,7 +10627,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "async-trait", "directories 4.0.1", @@ -10758,7 +10693,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "log", "parity-scale-codec", @@ -10769,7 +10704,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "clap 4.4.2", "fs4", @@ -10785,7 +10720,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "jsonrpsee 0.16.3", "parity-scale-codec", @@ -10804,7 +10739,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "futures", "libc", @@ -10823,7 +10758,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "chrono", "futures", @@ -10842,7 +10777,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "ansi_term", "atty", @@ -10873,7 +10808,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -10884,7 +10819,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "async-trait", "futures", @@ -10911,7 +10846,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "async-trait", "futures", @@ -10925,7 +10860,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "async-channel", "futures", @@ -11691,7 +11626,7 @@ dependencies = [ [[package]] name = "sp-allocator" version = "4.1.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "log", "parity-scale-codec", @@ -11702,7 +11637,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "hash-db", "log", @@ -11720,7 +11655,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "Inflector", "blake2", @@ -11734,7 +11669,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "parity-scale-codec", "scale-info", @@ -11747,7 +11682,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "integer-sqrt", "num-traits", @@ -11761,7 +11696,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "parity-scale-codec", "scale-info", @@ -11774,7 +11709,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "parity-scale-codec", "sp-api", @@ -11786,7 +11721,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "futures", "log", @@ -11804,7 +11739,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "async-trait", "futures", @@ -11819,7 +11754,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "async-trait", "parity-scale-codec", @@ -11837,7 +11772,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "async-trait", "merlin 2.0.1", @@ -11860,7 +11795,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "finality-grandpa", "log", @@ -11878,7 +11813,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "parity-scale-codec", "scale-info", @@ -11890,7 +11825,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "parity-scale-codec", "scale-info", @@ -11903,7 +11838,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "array-bytes", "base58", @@ -11947,7 +11882,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "blake2b_simd", "byteorder", @@ -11976,7 +11911,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "proc-macro2", "quote", @@ -11987,7 +11922,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -11996,7 +11931,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "proc-macro2", "quote", @@ -12006,7 +11941,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "environmental", "parity-scale-codec", @@ -12017,7 +11952,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -12032,7 +11967,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "bytes", "ed25519 1.5.3", @@ -12057,7 +11992,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "lazy_static", "sp-core", @@ -12068,7 +12003,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "async-trait", "futures", @@ -12085,7 +12020,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "thiserror", "zstd", @@ -12094,7 +12029,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "parity-scale-codec", "scale-info", @@ -12108,7 +12043,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "sp-api", "sp-core", @@ -12118,7 +12053,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "backtrace", "lazy_static", @@ -12128,7 +12063,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "rustc-hash", "serde", @@ -12138,7 +12073,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "either", "hash256-std-hasher", @@ -12160,7 +12095,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -12178,7 +12113,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "Inflector", "proc-macro-crate 1.1.3", @@ -12190,7 +12125,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "parity-scale-codec", "scale-info", @@ -12204,7 +12139,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "parity-scale-codec", "scale-info", @@ -12216,7 +12151,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "hash-db", "log", @@ -12236,7 +12171,7 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" [[package]] name = "sp-std" @@ -12247,7 +12182,7 @@ checksum = "53458e3c57df53698b3401ec0934bea8e8cfce034816873c0b0abbd83d7bac0d" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12260,7 +12195,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "async-trait", "futures-timer", @@ -12275,7 +12210,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "parity-scale-codec", "sp-std 5.0.0", @@ -12287,7 +12222,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "sp-api", "sp-runtime", @@ -12296,7 +12231,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "async-trait", "log", @@ -12312,7 +12247,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "ahash 0.8.3", "hash-db", @@ -12335,7 +12270,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12352,7 +12287,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -12363,7 +12298,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -12378,7 +12313,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface-common" version = "7.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "parity-scale-codec", "sp-std 5.0.0", @@ -12388,7 +12323,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "parity-scale-codec", "scale-info", @@ -12569,7 +12504,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "platforms 2.0.0", ] @@ -12577,7 +12512,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -12596,7 +12531,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "hyper", "log", @@ -12608,7 +12543,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "async-trait", "jsonrpsee 0.16.3", @@ -12621,7 +12556,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "jsonrpsee 0.16.3", "log", @@ -12640,7 +12575,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "array-bytes", "async-trait", @@ -12666,7 +12601,7 @@ dependencies = [ [[package]] name = "substrate-validator-set" version = "0.9.41" -source = "git+https://github.com/gear-tech/substrate-validator-set.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#e0ae86130250b18b7893d665171ea935f26971c8" +source = "git+https://github.com/gear-tech/substrate-validator-set.git?branch=gear-polkadot-v0.9.41-canary-revert-oom-changes#732fabecd211eeb99dce6aa4b60b288652a12242" dependencies = [ "frame-benchmarking", "frame-support", @@ -12686,7 +12621,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "ansi_term", "build-helper", @@ -13490,7 +13425,7 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox#87bb086be2ef49b8cfbb56ae052c94ef11d64d7b" +source = "git+https://github.com/gear-tech/substrate.git?branch=gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes#27779e0eaaa2161ba165ff8f0b0ff103bb63e5a1" dependencies = [ "async-trait", "clap 4.4.2", diff --git a/Cargo.toml b/Cargo.toml index 4e4c0a212e5..064c7f9220e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -208,7 +208,6 @@ gear-lazy-pages = { path = "lazy-pages" } gear-lazy-pages-common = { path = "lazy-pages/common", default-features = false } gear-lazy-pages-interface = { path = "lazy-pages/interface", default-features = false } gear-node-testing = { path = "node/testing" } -gear-runtime = { path = "runtime/gear", default-features = false } gear-runtime-common = { path = "runtime/common", default-features = false } gear-runtime-interface = { path = "runtime-interface", default-features = false } gear-sandbox = { path = "sandbox/sandbox", default-features = false } @@ -242,125 +241,125 @@ service = { package = "gear-service", path = "node/service", default-features = testing = { package = "gear-node-testing", path = "node/testing" } vara-runtime = { path = "runtime/vara", default-features = false } wasm-smith = { version = "0.11.4", git = "https://github.com/gear-tech/wasm-tools.git", branch = "gear-stable" } -validator-set = { package = 'substrate-validator-set', git = 'https://github.com/gear-tech/substrate-validator-set.git', branch = 'gear-polkadot-v0.9.41-canary-no-sandbox', default-features = false } +validator-set = { package = 'substrate-validator-set', git = 'https://github.com/gear-tech/substrate-validator-set.git', branch = 'gear-polkadot-v0.9.41-canary-revert-oom-changes', default-features = false } # Substrate deps -frame-benchmarking = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -frame-benchmarking-cli = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -frame-election-provider-support = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -frame-executive = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -frame-support = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -frame-support-test = { version = "3.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -frame-system = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -frame-system-benchmarking = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -frame-remote-externalities = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -frame-try-runtime = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -frame-system-rpc-runtime-api = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -generate-bags = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -pallet-authorship = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-authority-discovery = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-babe = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-bags-list = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-bounties = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-child-bounties = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-balances = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-conviction-voting = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-election-provider-multi-phase = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-grandpa = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-identity = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-im-online = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-multisig = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-nomination-pools = { version = "1.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-nomination-pools-runtime-api = { version = "1.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-offences = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-preimage = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-proxy = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-ranked-collective = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-referenda = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-scheduler = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-session = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-staking = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-staking-runtime-api = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-staking-reward-fn = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-sudo = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-timestamp = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-transaction-payment = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-treasury = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-utility = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-vesting = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -pallet-whitelist = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-authority-discovery = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-block-builder = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-consensus = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-consensus-babe = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-consensus-babe-rpc = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-consensus-epochs = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-cli = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-client-db = { version = "0.10.0-dev", features = ["rocksdb"], git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-executor-common = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-consensus-grandpa = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-consensus-grandpa-rpc = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-keystore = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-network = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-network-common = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-proposer-metrics = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-service = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-rpc = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-rpc-api = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-rpc-spec-v2 = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-sync-state-rpc = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-sysinfo = { version = "6.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sc-tracing = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -sp-allocator = { version = "4.1.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-api = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-authority-discovery = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-arithmetic = { version = "6.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-core = { version = "7.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-consensus = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-consensus-babe = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-externalities = { version = "0.13.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-consensus-grandpa = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-inherents = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-io = { version = "7.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-keyring = { version = "7.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-keystore = { version = "0.13.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-npos-elections = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-offchain = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-rpc = { version = "6.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-runtime = { version = "7.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-runtime-interface = { version = "7.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-session = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-std = { version = "5.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-state-machine = { version = "0.13.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-staking = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-storage = { version = "7.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-transaction-storage-proof = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-trie = { version = "7.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-version = { version = "5.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -sp-wasm-interface = { version = "7.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox", default-features = false } -substrate-build-script-utils = { version = "3.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -substrate-frame-rpc-system = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -substrate-rpc-client = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -substrate-state-trie-migration-rpc = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -substrate-test-client = { version = "2.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } -try-runtime-cli = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox" } +frame-benchmarking = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +frame-benchmarking-cli = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +frame-election-provider-support = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +frame-executive = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +frame-support = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +frame-support-test = { version = "3.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +frame-system = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +frame-system-benchmarking = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +frame-remote-externalities = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +frame-try-runtime = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +frame-system-rpc-runtime-api = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +generate-bags = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +pallet-authorship = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-authority-discovery = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-babe = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-bags-list = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-bounties = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-child-bounties = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-balances = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-conviction-voting = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-election-provider-multi-phase = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-grandpa = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-identity = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-im-online = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-multisig = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-nomination-pools = { version = "1.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-nomination-pools-runtime-api = { version = "1.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-offences = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-preimage = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-proxy = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-ranked-collective = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-referenda = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-scheduler = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-session = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-staking = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-staking-runtime-api = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-staking-reward-fn = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-sudo = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-timestamp = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-transaction-payment = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-treasury = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-utility = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-vesting = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +pallet-whitelist = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-authority-discovery = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-block-builder = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-consensus = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-consensus-babe = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-consensus-babe-rpc = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-consensus-epochs = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-cli = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-client-db = { version = "0.10.0-dev", features = ["rocksdb"], git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-executor = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-executor-common = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-consensus-grandpa = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-consensus-grandpa-rpc = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-keystore = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-network = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-network-common = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-proposer-metrics = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-service = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-rpc = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-rpc-api = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-rpc-spec-v2 = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-sync-state-rpc = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-sysinfo = { version = "6.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sc-tracing = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +sp-allocator = { version = "4.1.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-api = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-authority-discovery = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-arithmetic = { version = "6.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-core = { version = "7.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-consensus = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-consensus-babe = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-externalities = { version = "0.13.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-consensus-grandpa = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-inherents = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-io = { version = "7.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-keyring = { version = "7.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-keystore = { version = "0.13.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-npos-elections = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-offchain = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-rpc = { version = "6.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-runtime = { version = "7.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-runtime-interface = { version = "7.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-session = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-std = { version = "5.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-state-machine = { version = "0.13.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-staking = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-storage = { version = "7.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-transaction-storage-proof = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-trie = { version = "7.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-version = { version = "5.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +sp-wasm-interface = { version = "7.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes", default-features = false } +substrate-build-script-utils = { version = "3.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +substrate-frame-rpc-system = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +substrate-rpc-client = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +substrate-state-trie-migration-rpc = { version = "4.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +substrate-test-client = { version = "2.0.0", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } +try-runtime-cli = { version = "0.10.0-dev", git = "https://github.com/gear-tech/substrate.git", branch = "gear-polkadot-v0.9.41-canary-no-sandbox-revert-oom-changes" } # Examples test-syscalls = { path = "examples/sys-calls", default-features = false } diff --git a/Makefile b/Makefile index 2fc739d8a52..147ed020b68 100644 --- a/Makefile +++ b/Makefile @@ -68,10 +68,6 @@ gear-replay: gear-replay-vara-native: @ ./scripts/gear.sh build gear-replay --release --no-default-features --features=std,vara-native -.PHONY: gear-replay-gear-native -gear-replay-gear-native: - @ ./scripts/gear.sh build gear-replay --release --no-default-features --features=std,gear-native - # Check section .PHONY: check check: diff --git a/core/src/memory.rs b/core/src/memory.rs index 6b429b78dd7..2cce25add66 100644 --- a/core/src/memory.rs +++ b/core/src/memory.rs @@ -571,7 +571,7 @@ mod tests { fn assert_alloc_error(err: AllocError) { match err { AllocError::IncorrectAllocationData(_) | AllocError::ProgramAllocOutOfBounds => {} - err => Err(err).unwrap(), + err => panic!("{err:?}"), } } @@ -579,7 +579,7 @@ mod tests { fn assert_free_error(err: AllocError) { match err { AllocError::InvalidFree(_) => {} - err => Err(err).unwrap(), + err => panic!("{err:?}"), } } diff --git a/core/src/str.rs b/core/src/str.rs index 84f09c1e667..48ceaa08185 100644 --- a/core/src/str.rs +++ b/core/src/str.rs @@ -49,7 +49,7 @@ fn smart_truncate(s: &mut String, max_bytes: usize) { pub struct LimitedStr<'a>(Cow<'a, str>); impl<'a> LimitedStr<'a> { - const INIT_ERROR_MSG: &str = concat!( + const INIT_ERROR_MSG: &'static str = concat!( "String must be less than ", stringify!(TRIMMED_MAX_LEN), " bytes." diff --git a/examples/fungible-token/tests/benchmarks.rs b/examples/fungible-token/tests/benchmarks.rs index 589b9e15e39..9e35c867e89 100644 --- a/examples/fungible-token/tests/benchmarks.rs +++ b/examples/fungible-token/tests/benchmarks.rs @@ -40,7 +40,7 @@ async fn send_messages_in_parallel( api: &GearApi, batch_size: usize, treads_number: usize, - messages: &[(ProgramId, Vec, u64, u128, bool)], + messages: &[(ProgramId, Vec, u64, u128)], ) -> Result> { // TODO: currently have problem with transaction priorities from one user. // Fix this after loader become a lib #2781 @@ -190,9 +190,9 @@ async fn stress_test() -> Result<()> { } // Converting batch - let batch: Vec<(_, Vec, u64, _, _)> = batch + let batch: Vec<(_, Vec, u64, _)> = batch .iter() - .map(|x| (program_id, x.encode(), MAX_GAS_LIMIT, 0, false)) + .map(|x| (program_id, x.encode(), MAX_GAS_LIMIT, 0)) .collect(); // Sending batch @@ -256,9 +256,9 @@ async fn stress_transfer() -> Result<()> { )); } - let messages: Vec<(_, Vec, u64, _, _)> = actions + let messages: Vec<(_, Vec, u64, _)> = actions .into_iter() - .map(|action| (program_id, action.encode(), MAX_GAS_LIMIT, 0, false)) + .map(|action| (program_id, action.encode(), MAX_GAS_LIMIT, 0)) .collect(); let message_ids = send_messages_in_parallel(&api, BATCH_CHUNK_SIZE, 1, &messages) diff --git a/examples/signal-entry/src/wasm.rs b/examples/signal-entry/src/wasm.rs index b483538a356..302d99bbf59 100644 --- a/examples/signal-entry/src/wasm.rs +++ b/examples/signal-entry/src/wasm.rs @@ -183,7 +183,7 @@ extern "C" fn handle() { HandleAction::InvalidDebugCall => { exec::system_reserve_gas(1_000_000_000).unwrap(); - #[allow(clippy::invalid_utf8_in_unchecked)] + #[allow(invalid_from_utf8_unchecked)] let invalid_string = unsafe { core::str::from_utf8_unchecked(&[0, 159, 146, 150]) }; debug!("{}", invalid_string); } diff --git a/gcli/Cargo.toml b/gcli/Cargo.toml index 1f9c745c706..16f0dc1850a 100644 --- a/gcli/Cargo.toml +++ b/gcli/Cargo.toml @@ -60,7 +60,6 @@ which.workspace = true [features] node-key = [ "libp2p" ] -vara-testing = [ ] [package.metadata.docs.rs] all-features = true diff --git a/gcli/src/cmd/reply.rs b/gcli/src/cmd/reply.rs index ebf48079fb9..ada227ba901 100644 --- a/gcli/src/cmd/reply.rs +++ b/gcli/src/cmd/reply.rs @@ -31,7 +31,6 @@ use gsdk::signer::Signer; /// - `payload`: data expected by the original sender. /// - `gas_limit`: maximum amount of gas the program can spend before it is halted. /// - `value`: balance to be transferred to the program once it's been created. -/// - `prepaid`: a flag indicating whether the tx fee and gas are paid from a voucher. /// /// - `DispatchMessageEnqueued(H256)` when dispatch message is placed in the queue. #[derive(Parser, Debug)] @@ -47,9 +46,6 @@ pub struct Reply { /// Reply value #[arg(short, long, default_value = "0")] value: u128, - /// Use pre-issued voucher - #[arg(long)] - pub prepaid: bool, } impl Reply { @@ -63,7 +59,6 @@ impl Reply { self.payload.to_vec()?, self.gas_limit, self.value, - self.prepaid, ) .await?; diff --git a/gcli/src/cmd/send.rs b/gcli/src/cmd/send.rs index 8fee0608a0c..77521884460 100644 --- a/gcli/src/cmd/send.rs +++ b/gcli/src/cmd/send.rs @@ -35,7 +35,6 @@ use gsdk::signer::Signer; /// - `payload`: in case of a program destination, parameters of the `handle` function. /// - `gas_limit`: maximum amount of gas the program can spend before it is halted. /// - `value`: balance to be transferred to the program once it's been created. -/// - `prepaid`: a flag indicating whether the tx fee and gas are paid from a voucher. /// /// Emits the following events: /// - `DispatchMessageEnqueued(MessageInfo)` when dispatch message is placed in the queue. @@ -52,9 +51,6 @@ pub struct Send { /// Send value #[arg(short, long, default_value = "0")] pub value: u128, - /// Use pre-issued voucher - #[arg(long)] - pub prepaid: bool, } impl Send { @@ -66,7 +62,6 @@ impl Send { self.payload.to_vec()?, self.gas_limit, self.value, - self.prepaid, ) .await?; diff --git a/gcli/tests/cmd/claim.rs b/gcli/tests/cmd/claim.rs index 316eacbd1d0..7d9e57b924d 100644 --- a/gcli/tests/cmd/claim.rs +++ b/gcli/tests/cmd/claim.rs @@ -17,20 +17,40 @@ // along with this program. If not, see . //! Integration tests for command `send` -#![cfg(not(feature = "vara-testing"))] -use crate::common::{ - self, traits::NodeExec, Args, Result, ALICE_SS58_ADDRESS as ADDRESS, MESSAGER_SENT_VALUE, -}; + +use crate::common::{self, logs, traits::NodeExec, Args, Result, ALICE_SS58_ADDRESS as ADDRESS}; use gsdk::Api; const REWARD_PER_BLOCK: u128 = 75_000; // 3_000 gas * 25 value per gas #[tokio::test] async fn test_command_claim_works() -> Result<()> { + // hack to check initial alice balance + let (initial_balance, initial_stash) = { + let mut node = common::dev()?; + + node.wait_for_log_record(logs::gear_node::IMPORTING_BLOCKS)?; + + // Get balance of the testing address + let signer = Api::new(Some(&node.ws())) + .await? + .signer("//Alice//stash", None)?; + ( + signer.api().get_balance(ADDRESS).await.unwrap_or(0), + signer + .api() + .get_balance(&signer.address()) + .await + .unwrap_or(0), + ) + }; + let node = common::create_messager().await?; // Check the mailbox of the testing account - let signer = Api::new(Some(&node.ws())).await?.signer("//Alice", None)?; + let signer = Api::new(Some(&node.ws())) + .await? + .signer("//Alice//stash", None)?; let mailbox = signer .api() .mailbox(Some(common::alice_account_id()), 10) @@ -39,21 +59,18 @@ async fn test_command_claim_works() -> Result<()> { assert_eq!(mailbox.len(), 1); let id = hex::encode(mailbox[0].0.id.0); - // Claim value from message id + let burned_before = signer.api().get_balance(&signer.address()).await? - initial_stash; let before = signer.api().get_balance(ADDRESS).await?; + + // Claim value from message id let _ = node.run(Args::new("claim").message_id(id))?; + + let burned_after = signer.api().get_balance(&signer.address()).await? - initial_stash; let after = signer.api().get_balance(ADDRESS).await?; - // # TODO - // - // not using `//Alice` or estimating the reward - // before this checking. - let expected = MESSAGER_SENT_VALUE + REWARD_PER_BLOCK; - assert_eq!( - after.saturating_sub(before), - expected, - "Alice should have received the value of the message plus the reward ({expected})" - ); + assert_eq!(initial_balance - before - burned_before, REWARD_PER_BLOCK,); + + assert_eq!(initial_balance - burned_after, after); Ok(()) } diff --git a/gcli/tests/cmd/info.rs b/gcli/tests/cmd/info.rs index 544f701cee9..90360519a59 100644 --- a/gcli/tests/cmd/info.rs +++ b/gcli/tests/cmd/info.rs @@ -23,23 +23,6 @@ use crate::common::{ Args, Result, }; -#[cfg(not(feature = "vara-testing"))] -const EXPECTED_BALANCE: &str = r#" -AccountInfo { - nonce: 0, - consumers: 1, - providers: 1, - sufficients: 0, - data: AccountData { - free: 1152921504606846976, - reserved: 0, - misc_frozen: 0, - fee_frozen: 0, - }, -} -"#; - -#[cfg(feature = "vara-testing")] const EXPECTED_BALANCE: &str = r#" AccountInfo { nonce: 0, @@ -55,20 +38,12 @@ AccountInfo { } "#; -#[cfg(feature = "vara-testing")] const EXPECTED_MAILBOX: &str = r#" destination: "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d", payload: "0x", value: 0, "#; -#[cfg(not(feature = "vara-testing"))] -const EXPECTED_MAILBOX: &str = r#" - destination: "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d", - payload: "0x", - value: 5000, -"#; - #[tokio::test] async fn test_action_balance_works() -> Result<()> { common::login_as_alice().expect("login failed"); diff --git a/gcli/tests/cmd/transfer.rs b/gcli/tests/cmd/transfer.rs index 4c58dae94e0..074da2ef944 100644 --- a/gcli/tests/cmd/transfer.rs +++ b/gcli/tests/cmd/transfer.rs @@ -17,21 +17,13 @@ // along with this program. If not, see . //! Integration tests for command `deploy` -#![cfg(not(feature = "vara-testing"))] + use crate::common::{self, logs, Args, NodeExec, Result}; use gsdk::Api; // Testing account -// -// Secret phrase: tumble tenant update heavy sad draw present tray atom chunk animal exhaust -// Network ID: substrate -// Secret seed: 0xd13d64420f7e304a1bfd4a17a5cda3f14b4e98034abe2cbd4fc05214c6ba2488 -// Public key (hex): 0x62bd03f963e636deea9139b00e33e6800f3c1afebb5f69b47ed07c07be549e78 -// Account ID: 0x62bd03f963e636deea9139b00e33e6800f3c1afebb5f69b47ed07c07be549e78 -// Public key (SS58): 5EJAhWN49JDfn58DpkERvCrtJ5X3sHue93a1hH4nB9KngGSs -// SS58 Address: 5EJAhWN49JDfn58DpkERvCrtJ5X3sHue93a1hH4nB9KngGSs const SURI: &str = "tumble tenant update heavy sad draw present tray atom chunk animal exhaust"; -const ADDRESS: &str = "5EJAhWN49JDfn58DpkERvCrtJ5X3sHue93a1hH4nB9KngGSs"; +const ADDRESS: &str = "kGhmTEymraqSPa1NYjXzqbko2p4Ge1CmEfACtC1s4aC5hTPYk"; #[tokio::test] async fn test_command_transfer_works() -> Result<()> { @@ -45,14 +37,14 @@ async fn test_command_transfer_works() -> Result<()> { let before = signer.api().get_balance(ADDRESS).await.unwrap_or(0); // Run command transfer - let value = 1_000_000_000u128; + let value = 1_000_000_000_000_000u128; let _ = node.run( Args::new("transfer") .destination(ADDRESS) .amount(value.to_string()), )?; - let after = signer.api().get_balance(ADDRESS).await?; + let after = signer.api().get_balance(ADDRESS).await.unwrap_or(0); assert_eq!( after.saturating_sub(before), value, diff --git a/gcli/tests/common/args.rs b/gcli/tests/common/args.rs index 3c813cf72b5..747974ab705 100644 --- a/gcli/tests/common/args.rs +++ b/gcli/tests/common/args.rs @@ -47,7 +47,7 @@ impl Args { impl From for Vec { fn from(args: Args) -> Self { - vec![ + [ if let Some(endpoint) = args.endpoint { vec!["--endpoint".into(), endpoint] } else { diff --git a/gcli/tests/common/mod.rs b/gcli/tests/common/mod.rs index a317186e4e8..dbbafc92d1c 100644 --- a/gcli/tests/common/mod.rs +++ b/gcli/tests/common/mod.rs @@ -38,12 +38,10 @@ pub mod logs; mod result; pub mod traits; -#[cfg(not(feature = "vara-testing"))] mod prelude { pub use scale_info::scale::Encode; - pub const ALICE_SS58_ADDRESS: &str = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"; - pub const MESSAGER_SENT_VALUE: u128 = 5_000; + pub const ALICE_SS58_ADDRESS: &str = "kGkLEU3e3XXkJp2WK4eNpVmSab5xUNL9QtmLPh8QfCL2EgotW"; } #[cfg(not(feature = "vara-testing"))] @@ -73,16 +71,7 @@ pub fn gcli(args: impl IntoIterator) -> Result { /// Run the dev node pub fn dev() -> Result { - #[cfg(feature = "vara-testing")] let args = vec!["--tmp", "--dev"]; - #[cfg(not(feature = "vara-testing"))] - let args = vec![ - "--tmp", - "--chain=gear-dev", - "--alice", - "--validator", - "--reserved-only", - ]; Node::try_from_path(env::bin("gear"), args).map_err(Into::into) } @@ -107,7 +96,7 @@ pub fn program_id(bin: &[u8], salt: &[u8]) -> ProgramId { /// AccountId32 of `addr` pub fn alice_account_id() -> AccountId32 { - AccountId32::from_ss58check("5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY") + AccountId32::from_ss58check("kGkLEU3e3XXkJp2WK4eNpVmSab5xUNL9QtmLPh8QfCL2EgotW") .expect("Invalid address") } @@ -119,11 +108,6 @@ pub async fn create_messager() -> Result { let args = Args::new("upload").program(env::wasm_bin("demo_messager.opt.wasm")); - #[cfg(not(feature = "vara-testing"))] - let args = args - .payload("0x".to_owned() + &hex::encode(MESSAGER_SENT_VALUE.encode())) - .value("10000000"); - let _ = node.run(args)?; Ok(node) } diff --git a/gclient/src/api/calls.rs b/gclient/src/api/calls.rs index 5932d0e0acf..a8733d8d375 100644 --- a/gclient/src/api/calls.rs +++ b/gclient/src/api/calls.rs @@ -34,7 +34,6 @@ use gsdk::{ metadata::{ balances::Event as BalancesEvent, gear::Event as GearEvent, - gear_runtime::RuntimeCall, runtime_types::{ frame_system::pallet::Call as SystemCall, gear_common::{ @@ -48,6 +47,7 @@ use gsdk::{ }, system::Event as SystemEvent, utility::Event as UtilityEvent, + vara_runtime::RuntimeCall, Convert, Event, }, Error as GsdkError, GearGasNode, GearGasNodeId, @@ -723,14 +723,13 @@ impl GearApi { payload: impl AsRef<[u8]>, gas_limit: u64, value: u128, - prepaid: bool, ) -> Result<(MessageId, H256)> { let payload = payload.as_ref().to_vec(); let tx = self .0 .calls - .send_message(destination, payload, gas_limit, value, prepaid) + .send_message(destination, payload, gas_limit, value) .await?; for event in tx.wait_for_success().await?.iter() { @@ -756,17 +755,16 @@ impl GearApi { /// to one program. pub async fn send_message_bytes_batch( &self, - args: impl IntoIterator, u64, u128, bool)>, + args: impl IntoIterator, u64, u128)>, ) -> Result<(Vec>, H256)> { let calls: Vec<_> = args .into_iter() - .map(|(destination, payload, gas_limit, value, prepaid)| { + .map(|(destination, payload, gas_limit, value)| { RuntimeCall::Gear(GearCall::send_message { destination: destination.into(), payload: payload.as_ref().to_vec(), gas_limit, value, - prepaid, }) }) .collect(); @@ -806,9 +804,8 @@ impl GearApi { payload: impl Encode, gas_limit: u64, value: u128, - prepaid: bool, ) -> Result<(MessageId, H256)> { - self.send_message_bytes(destination, payload.encode(), gas_limit, value, prepaid) + self.send_message_bytes(destination, payload.encode(), gas_limit, value) .await } @@ -837,7 +834,6 @@ impl GearApi { payload: impl AsRef<[u8]>, gas_limit: u64, value: u128, - prepaid: bool, ) -> Result<(MessageId, u128, H256)> { let payload = payload.as_ref().to_vec(); @@ -846,7 +842,7 @@ impl GearApi { let tx = self .0 .calls - .send_reply(reply_to_id, payload, gas_limit, value, prepaid) + .send_reply(reply_to_id, payload, gas_limit, value) .await?; let events = tx.wait_for_success().await?; @@ -879,13 +875,9 @@ impl GearApi { /// program id is also returned in the resulting tuple. pub async fn send_reply_bytes_batch( &self, - args: impl IntoIterator, u64, u128, bool)> + Clone, + args: impl IntoIterator, u64, u128)> + Clone, ) -> Result<(Vec>, H256)> { - let message_ids: Vec<_> = args - .clone() - .into_iter() - .map(|(mid, _, _, _, _)| mid) - .collect(); + let message_ids: Vec<_> = args.clone().into_iter().map(|(mid, _, _, _)| mid).collect(); let messages = futures::future::try_join_all( message_ids.iter().map(|mid| self.get_mailbox_message(*mid)), @@ -900,13 +892,12 @@ impl GearApi { let calls: Vec<_> = args .into_iter() - .map(|(reply_to_id, payload, gas_limit, value, prepaid)| { + .map(|(reply_to_id, payload, gas_limit, value)| { RuntimeCall::Gear(GearCall::send_reply { reply_to_id: reply_to_id.into(), payload: payload.as_ref().to_vec(), gas_limit, value, - prepaid, }) }) .collect(); @@ -952,9 +943,8 @@ impl GearApi { payload: impl Encode, gas_limit: u64, value: u128, - prepaid: bool, ) -> Result<(MessageId, u128, H256)> { - self.send_reply_bytes(reply_to_id, payload.encode(), gas_limit, value, prepaid) + self.send_reply_bytes(reply_to_id, payload.encode(), gas_limit, value) .await } diff --git a/gclient/src/api/storage/block.rs b/gclient/src/api/storage/block.rs index 65a92e6c802..3458fe9c24f 100644 --- a/gclient/src/api/storage/block.rs +++ b/gclient/src/api/storage/block.rs @@ -18,7 +18,7 @@ use super::{GearApi, Result}; use crate::Error; -use gsdk::{config::Header, ext::sp_core::H256, metadata::gear_runtime::RuntimeEvent}; +use gsdk::{config::Header, ext::sp_core::H256, metadata::vara_runtime::RuntimeEvent}; use subxt::config::Header as _; type GearBlock = Header; diff --git a/gclient/tests/memory_dump.rs b/gclient/tests/memory_dump.rs index 3b5ce79a543..173fe1426a7 100644 --- a/gclient/tests/memory_dump.rs +++ b/gclient/tests/memory_dump.rs @@ -31,7 +31,7 @@ async fn charge_10( .calculate_handle_gas(None, program_id, payload.clone(), 0, true) .await?; let (message_id, _hash) = api - .send_message_bytes(program_id, payload, gas_info.min_limit, 0, false) + .send_message_bytes(program_id, payload, gas_info.min_limit, 0) .await?; assert!(listener.message_processed(message_id).await?.succeed()); diff --git a/gclient/tests/node.rs b/gclient/tests/node.rs index e98b10220eb..6992948d53e 100644 --- a/gclient/tests/node.rs +++ b/gclient/tests/node.rs @@ -69,7 +69,6 @@ async fn program_migrated_to_another_node() { MULTIPLICATOR_VALUE_PAYLOAD, dest_node_gas_limit, 0, - false, ) .await .expect("Unable to send message to destination program"); @@ -209,7 +208,6 @@ async fn program_with_gas_reservation_migrated_to_another_node() { demo_reserve_gas::HandleAction::ReplyFromReservation, dest_node_gas_limit, 0, - false, ) .await .expect("Unable to send message to destination program"); diff --git a/gclient/tests/state.rs b/gclient/tests/state.rs index 82783058664..d803deb917c 100644 --- a/gclient/tests/state.rs +++ b/gclient/tests/state.rs @@ -118,7 +118,6 @@ async fn get_state_request() -> anyhow::Result<()> { btree::Request::Insert(key, value).encode(), gas_limit, 0, - false, ) }); diff --git a/gclient/tests/upload.rs b/gclient/tests/upload.rs index 9878f114932..2ffd9c7268e 100644 --- a/gclient/tests/upload.rs +++ b/gclient/tests/upload.rs @@ -198,7 +198,7 @@ async fn get_mailbox() -> anyhow::Result<()> { .calculate_handle_gas(None, program_id, vec![], 0, true) .await?; - let messages = vec![(program_id, vec![], gas_info.min_limit * 10, 0, false); 5]; + let messages = vec![(program_id, vec![], gas_info.min_limit * 10, 0); 5]; let (messages, _hash) = api.send_message_bytes_batch(messages).await?; diff --git a/gcore/src/errors.rs b/gcore/src/errors.rs index a12d40b6a6c..d6e84ad05d0 100644 --- a/gcore/src/errors.rs +++ b/gcore/src/errors.rs @@ -61,9 +61,9 @@ impl From for Result<()> { fn from(value: SyscallError) -> Self { match value.0 { 0 => Ok(()), - code => { - Err(ExtError::from_u32(code).unwrap_or(ExtError::Unsupported)).map_err(Into::into) - } + code => Err(ExtError::from_u32(code) + .unwrap_or(ExtError::Unsupported) + .into()), } } } diff --git a/gcore/src/lib.rs b/gcore/src/lib.rs index dbf781c3b40..bdfcdacf8c5 100644 --- a/gcore/src/lib.rs +++ b/gcore/src/lib.rs @@ -31,6 +31,7 @@ //! //! ``` //! #![no_std] +//! #![feature(alloc_error_handler)] //! //! extern crate galloc; //! @@ -48,6 +49,12 @@ //! } //! //! # #[cfg(target = "wasm32")] +//! #[alloc_error_handler] +//! pub fn oom(_: core::alloc::Layout) -> ! { +//! core::arch::wasm32::unreachable() +//! } +//! +//! # #[cfg(target = "wasm32")] //! #[panic_handler] //! fn panic(_: &core::panic::PanicInfo) -> ! { //! core::arch::wasm32::unreachable() diff --git a/gcore/src/msg.rs b/gcore/src/msg.rs index 64045dee779..8668c630f28 100644 --- a/gcore/src/msg.rs +++ b/gcore/src/msg.rs @@ -382,7 +382,7 @@ pub fn reply_with_gas(payload: &[u8], gas_limit: u64, value: u128) -> Result ! { + /// ext::oom_panic() + /// } + /// /// #[no_mangle] /// extern "C" fn handle() { /// let layout = Layout::new::<[u8; 64 * 1024]>(); diff --git a/gsdk/Cargo.toml b/gsdk/Cargo.toml index 9ecf26935dc..35b7fdb4c22 100644 --- a/gsdk/Cargo.toml +++ b/gsdk/Cargo.toml @@ -48,4 +48,3 @@ demo-waiter = { workspace = true, features = ["std"] } [features] testing = [ "rand" ] -vara-testing = [] diff --git a/gsdk/src/metadata/generated.rs b/gsdk/src/metadata/generated.rs index 9bc5be32d20..1ee69a33e97 100644 --- a/gsdk/src/metadata/generated.rs +++ b/gsdk/src/metadata/generated.rs @@ -2485,18 +2485,11 @@ pub mod runtime_types { #[doc = "is not a program in uninitialized state. If the opposite holds true,"] #[doc = "the message is not enqueued for processing."] #[doc = ""] - #[doc = "If `prepaid` flag is set, the transaction fee and the gas cost will be"] - #[doc = "charged against a `voucher` that must have been issued for the sender"] - #[doc = "in conjunction with the `destination` program. That means that the"] - #[doc = "synthetic account corresponding to the (`AccountId`, `ProgramId`) pair must"] - #[doc = "exist and have sufficient funds in it. Otherwise, the call is invalidated."] - #[doc = ""] #[doc = "Parameters:"] #[doc = "- `destination`: the message destination."] #[doc = "- `payload`: in case of a program destination, parameters of the `handle` function."] #[doc = "- `gas_limit`: maximum amount of gas the program can spend before it is halted."] #[doc = "- `value`: balance to be transferred to the program once it's been created."] - #[doc = "- `prepaid`: a flag that indicates whether a voucher should be used."] #[doc = ""] #[doc = "Emits the following events:"] #[doc = "- `DispatchMessageEnqueued(MessageInfo)` when dispatch message is placed in the queue."] @@ -2505,7 +2498,6 @@ pub mod runtime_types { payload: ::std::vec::Vec<::core::primitive::u8>, gas_limit: ::core::primitive::u64, value: ::core::primitive::u128, - prepaid: ::core::primitive::bool, }, #[codec(index = 4)] #[doc = "Send reply on message in `Mailbox`."] @@ -2521,18 +2513,11 @@ pub mod runtime_types { #[doc = ""] #[doc = "NOTE: only user who is destination of the message, can claim value"] #[doc = "or reply on the message from mailbox."] - #[doc = ""] - #[doc = "If `prepaid` flag is set, the transaction fee and the gas cost will be"] - #[doc = "charged against a `voucher` that must have been issued for the sender"] - #[doc = "in conjunction with the mailboxed message source program. That means that the"] - #[doc = "synthetic account corresponding to the (`AccountId`, `ProgramId`) pair must"] - #[doc = "exist and have sufficient funds in it. Otherwise, the call is invalidated."] send_reply { reply_to_id: runtime_types::gear_core::ids::MessageId, payload: ::std::vec::Vec<::core::primitive::u8>, gas_limit: ::core::primitive::u64, value: ::core::primitive::u128, - prepaid: ::core::primitive::bool, }, #[codec(index = 5)] #[doc = "Claim value from message in `Mailbox`."] @@ -3281,8 +3266,8 @@ pub mod runtime_types { #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { #[codec(index = 0)] - #[doc = "Transferred to the pool from an external account."] - Refilled { amount: ::core::primitive::u128 }, + #[doc = "Deposited to the pool."] + Deposited { amount: ::core::primitive::u128 }, #[codec(index = 1)] #[doc = "Transferred from the pool to an external account."] Withdrawn { amount: ::core::primitive::u128 }, @@ -3318,6 +3303,13 @@ pub mod runtime_types { program: runtime_types::gear_core::ids::ProgramId, value: ::core::primitive::u128, }, + #[codec(index = 1)] + #[doc = "Dispatch allowed with voucher call."] + call { + call: runtime_types::pallet_gear_voucher::PrepaidCall< + ::core::primitive::u128, + >, + }, } #[derive(Debug, crate::gp::Decode, crate::gp::DecodeAsType, crate::gp::Encode)] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] @@ -3339,6 +3331,23 @@ pub mod runtime_types { }, } } + #[derive(Debug, crate::gp::Decode, crate::gp::DecodeAsType, crate::gp::Encode)] + pub enum PrepaidCall<_0> { + #[codec(index = 0)] + SendMessage { + destination: runtime_types::gear_core::ids::ProgramId, + payload: ::std::vec::Vec<::core::primitive::u8>, + gas_limit: ::core::primitive::u64, + value: _0, + }, + #[codec(index = 1)] + SendReply { + reply_to_id: runtime_types::gear_core::ids::MessageId, + payload: ::std::vec::Vec<::core::primitive::u8>, + gas_limit: ::core::primitive::u64, + value: _0, + }, + } } pub mod pallet_grandpa { use super::runtime_types; @@ -9456,12 +9465,14 @@ pub mod calls { #[doc = "Calls of pallet `GearVoucher`."] pub enum GearVoucherCall { Issue, + Call, } impl CallInfo for GearVoucherCall { const PALLET: &'static str = "GearVoucher"; fn call_name(&self) -> &'static str { match self { Self::Issue => "issue", + Self::Call => "call", } } } diff --git a/gsdk/src/metadata/impls.rs b/gsdk/src/metadata/impls.rs index 9f10d9aec80..f695436da7d 100644 --- a/gsdk/src/metadata/impls.rs +++ b/gsdk/src/metadata/impls.rs @@ -17,7 +17,6 @@ // along with this program. If not, see . use super::{ - gear_runtime::{RuntimeCall, RuntimeEvent}, runtime_types::{ frame_system::pallet::Call as SystemCall, gear_common::{ @@ -30,6 +29,7 @@ use super::{ pallet_gear::pallet::Call as GearCall, pallet_sudo::pallet::Call as SudoCall, }, + vara_runtime::{RuntimeCall, RuntimeEvent}, }; use core::ops::{Index, IndexMut}; use gear_core::{ids, message, message::UserMessage}; @@ -219,7 +219,6 @@ fn gear_call_to_scale_value(call: GearCall) -> Value { payload, gas_limit, value, - prepaid, } => Value::named_variant( "send_message", [ @@ -227,7 +226,6 @@ fn gear_call_to_scale_value(call: GearCall) -> Value { ("payload", Value::from_bytes(payload)), ("gas_limit", Value::u128(gas_limit as u128)), ("value", Value::u128(value as u128)), - ("prepaid", Value::bool(prepaid)), ], ), GearCall::send_reply { @@ -235,7 +233,6 @@ fn gear_call_to_scale_value(call: GearCall) -> Value { payload, gas_limit, value, - prepaid, } => Value::named_variant( "send_reply", [ @@ -243,7 +240,6 @@ fn gear_call_to_scale_value(call: GearCall) -> Value { ("payload", Value::from_bytes(payload)), ("gas_limit", Value::u128(gas_limit as u128)), ("value", Value::u128(value as u128)), - ("prepaid", Value::bool(prepaid)), ], ), GearCall::claim_value { message_id } => Value::named_variant( diff --git a/gsdk/src/metadata/mod.rs b/gsdk/src/metadata/mod.rs index e43b9e5292d..4a523fbefef 100644 --- a/gsdk/src/metadata/mod.rs +++ b/gsdk/src/metadata/mod.rs @@ -29,8 +29,7 @@ pub use self::{ calls::{self, CallInfo}, exports::*, runtime_types::runtime_types::{ - self, sp_runtime::DispatchError, vara_runtime as gear_runtime, - vara_runtime::RuntimeEvent as Event, + self, sp_runtime::DispatchError, vara_runtime, vara_runtime::RuntimeEvent as Event, }, storage::{self, StorageInfo}, }, diff --git a/gsdk/src/signer/calls.rs b/gsdk/src/signer/calls.rs index 3ab66b71e3c..061cdf0caad 100644 --- a/gsdk/src/signer/calls.rs +++ b/gsdk/src/signer/calls.rs @@ -22,8 +22,8 @@ use crate::{ config::GearConfig, metadata::{ calls::{BalancesCall, GearCall, SudoCall, UtilityCall}, - gear_runtime::RuntimeCall, runtime_types::sp_weights::weight_v2::Weight, + vara_runtime::RuntimeCall, }, Error, Result, TxInBlock, }; @@ -93,7 +93,6 @@ impl SignerCalls { payload: Vec, gas_limit: u64, value: u128, - prepaid: bool, ) -> Result { self.0 .run_tx( @@ -103,7 +102,6 @@ impl SignerCalls { Value::from_bytes(payload), Value::u128(gas_limit as u128), Value::u128(value), - Value::bool(prepaid), ], ) .await @@ -116,7 +114,6 @@ impl SignerCalls { payload: Vec, gas_limit: u64, value: u128, - prepaid: bool, ) -> Result { self.0 .run_tx( @@ -126,7 +123,6 @@ impl SignerCalls { Value::from_bytes(payload), Value::u128(gas_limit as u128), Value::u128(value), - Value::bool(prepaid), ], ) .await diff --git a/gsdk/src/signer/storage.rs b/gsdk/src/signer/storage.rs index 25628995559..6854c2b1afb 100644 --- a/gsdk/src/signer/storage.rs +++ b/gsdk/src/signer/storage.rs @@ -20,7 +20,6 @@ use crate::{ config::GearConfig, metadata::{ - gear_runtime::RuntimeCall, runtime_types::{ frame_system::pallet::Call, gear_common::{ActiveProgram, Program}, @@ -28,6 +27,7 @@ use crate::{ pallet_gear_bank::pallet::BankAccount, }, storage::{GearBankStorage, GearGasStorage, GearProgramStorage}, + vara_runtime::RuntimeCall, }, signer::Inner, utils::storage_address_bytes, diff --git a/gsdk/src/signer/utils.rs b/gsdk/src/signer/utils.rs index b97ce0b0d48..759d2477c63 100644 --- a/gsdk/src/signer/utils.rs +++ b/gsdk/src/signer/utils.rs @@ -23,7 +23,7 @@ use crate::{ backtrace::BacktraceStatus, config::GearConfig, metadata::{ - calls::SudoCall, gear_runtime::RuntimeCall, sudo::Event as SudoEvent, CallInfo, Event, + calls::SudoCall, sudo::Event as SudoEvent, vara_runtime::RuntimeCall, CallInfo, Event, }, result::Result, signer::SignerRpc, diff --git a/gsdk/src/storage.rs b/gsdk/src/storage.rs index f391d2d2a55..96dd567a2c7 100644 --- a/gsdk/src/storage.rs +++ b/gsdk/src/storage.rs @@ -19,7 +19,6 @@ //! Gear storage apis use crate::{ metadata::{ - gear_runtime::RuntimeEvent, runtime_types::{ frame_system::{AccountInfo, EventRecord}, gear_common::{storage::primitives::Interval, ActiveProgram, Program}, @@ -31,6 +30,7 @@ use crate::{ GearBankStorage, GearGasStorage, GearMessengerStorage, GearProgramStorage, GearStorage, SessionStorage, SystemStorage, TimestampStorage, }, + vara_runtime::RuntimeEvent, }, result::{Error, Result}, utils::storage_address_bytes, diff --git a/gsdk/tests/rpc.rs b/gsdk/tests/rpc.rs index 8a6677063ed..198eb21dc0d 100644 --- a/gsdk/tests/rpc.rs +++ b/gsdk/tests/rpc.rs @@ -109,7 +109,7 @@ async fn test_calculate_handle_gas() -> Result<()> { signer .calls - .send_message(pid, vec![], gas_info.min_limit, 0, false) + .send_message(pid, vec![], gas_info.min_limit, 0) .await?; Ok(()) @@ -146,7 +146,7 @@ async fn test_calculate_reply_gas() -> Result<()> { // 2. send wait message. signer .calls - .send_message(pid, payload.encode(), 100_000_000_000, 0, false) + .send_message(pid, payload.encode(), 100_000_000_000, 0) .await?; let mailbox = signer @@ -164,7 +164,7 @@ async fn test_calculate_reply_gas() -> Result<()> { signer .calls - .send_reply(message_id, vec![], gas_info.min_limit, 0, false) + .send_reply(message_id, vec![], gas_info.min_limit, 0) .await?; Ok(()) diff --git a/gsdk/tests/utils/mod.rs b/gsdk/tests/utils/mod.rs index 6c0696c2b28..845e67b8de5 100644 --- a/gsdk/tests/utils/mod.rs +++ b/gsdk/tests/utils/mod.rs @@ -25,16 +25,7 @@ pub fn dev_node() -> Node { // Use release build because of performance reasons. let bin_path = env!("CARGO_MANIFEST_DIR").to_owned() + "/../target/release/gear"; - #[cfg(not(feature = "vara-testing"))] let args = vec!["--tmp", "--dev"]; - #[cfg(feature = "vara-testing")] - let args = vec![ - "--tmp", - "--chain=vara-dev", - "--alice", - "--validator", - "--reserved-only", - ]; Node::try_from_path(bin_path, args) .expect("Failed to start node: Maybe it isn't built with --release flag?") diff --git a/gstd/src/async_runtime/locks.rs b/gstd/src/async_runtime/locks.rs index 6caa011f049..67834a6b75b 100644 --- a/gstd/src/async_runtime/locks.rs +++ b/gstd/src/async_runtime/locks.rs @@ -110,13 +110,13 @@ impl Lock { impl PartialOrd for Lock { fn partial_cmp(&self, other: &Self) -> Option { - self.deadline().partial_cmp(&other.deadline()) + Some(self.cmp(other)) } } impl Ord for Lock { fn cmp(&self, other: &Self) -> Ordering { - self.partial_cmp(other).unwrap_or(Ordering::Equal) + self.deadline().cmp(&other.deadline()) } } @@ -256,6 +256,6 @@ impl LocksMap { } fn message_locks(&mut self, message_id: MessageId) -> &mut BTreeMap { - self.0.entry(message_id).or_insert_with(Default::default) + self.0.entry(message_id).or_default() } } diff --git a/gstd/src/common/handlers.rs b/gstd/src/common/handlers.rs index 64006c4cc41..9f1d3064534 100644 --- a/gstd/src/common/handlers.rs +++ b/gstd/src/common/handlers.rs @@ -26,22 +26,18 @@ //! For `debug` mode it provides more extensive logging. #[cfg(target_arch = "wasm32")] -use {crate::ext, alloc::alloc::AllocErrorPanicPayload, core::panic::PanicInfo}; +use {crate::ext, core::alloc::Layout, core::panic::PanicInfo}; + +#[cfg(target_arch = "wasm32")] +#[alloc_error_handler] +pub fn oom(_: Layout) -> ! { + ext::oom_panic() +} #[cfg(not(any(feature = "debug", debug_assertions)))] #[cfg(target_arch = "wasm32")] #[panic_handler] -pub fn panic(panic_info: &PanicInfo) -> ! { - // Alloc error handling through panic message. - if panic_info - .payload() - .downcast_ref::() - .is_some() - { - ext::oom_panic() - } - - // Common panic handling. +pub fn panic(_: &PanicInfo) -> ! { ext::panic("no info") } @@ -51,16 +47,6 @@ pub fn panic(panic_info: &PanicInfo) -> ! { pub fn panic(panic_info: &PanicInfo) -> ! { use crate::prelude::format; - // Alloc error handling through panic message. - if panic_info - .payload() - .downcast_ref::() - .is_some() - { - ext::oom_panic() - } - - // Common panic handling. let msg = match (panic_info.message(), panic_info.location()) { (Some(msg), Some(loc)) => format!( "'{:?}', {}:{}:{}", diff --git a/gstd/src/lib.rs b/gstd/src/lib.rs index c0fdac04238..d6cdd51aecc 100644 --- a/gstd/src/lib.rs +++ b/gstd/src/lib.rs @@ -127,12 +127,13 @@ all(target_arch = "wasm32", any(feature = "debug", debug_assertions)), feature(panic_info_message) )] -#![cfg_attr(target_arch = "wasm32", feature(panic_oom_payload))] +#![cfg_attr(target_arch = "wasm32", feature(alloc_error_handler))] #![cfg_attr(feature = "strict", deny(warnings))] #![doc(html_logo_url = "https://docs.gear.rs/logo.svg")] #![doc(test(attr(deny(warnings), allow(unused_variables, unused_assignments))))] extern crate alloc; + #[cfg(target_arch = "wasm32")] extern crate galloc; diff --git a/gstd/src/prelude.rs b/gstd/src/prelude.rs index 17f62c53f67..f8dc00ba690 100644 --- a/gstd/src/prelude.rs +++ b/gstd/src/prelude.rs @@ -22,7 +22,7 @@ // Reexports from Rust's libraries pub use ::alloc::{ - alloc, borrow, + borrow, borrow::ToOwned, boxed, boxed::Box, diff --git a/gstd/src/sync/mod.rs b/gstd/src/sync/mod.rs index 2752a422296..3d4027dbb76 100644 --- a/gstd/src/sync/mod.rs +++ b/gstd/src/sync/mod.rs @@ -22,12 +22,11 @@ //! //! The following is an overview of the available synchronization objects: //! -//! - [`Mutex`](self::Mutex): The Mutual Exclusion mechanism guarantees that -//! during execution, only a single actor can access data at any given time. -//! - [`RwLock`](self::RwLock): Provides a mutual exclusion mechanism that -//! allows multiple readings by different actors while allowing only one -//! writer at the execution. In some cases, this can be more efficient than a -//! mutex. +//! - [`Mutex`]: The Mutual Exclusion mechanism guarantees that during +//! execution, only a single actor can access data at any given time. +//! - [`RwLock`]: Provides a mutual exclusion mechanism that allows multiple +//! readings by different actors while allowing only one writer at the +//! execution. In some cases, this can be more efficient than a mutex. mod access; diff --git a/gtest/src/system.rs b/gtest/src/system.rs index 7d1c46e512f..d2cf6348286 100644 --- a/gtest/src/system.rs +++ b/gtest/src/system.rs @@ -163,11 +163,7 @@ impl System { if !self.0.borrow().is_user(&program_id) { panic!("Mailbox available only for users"); } - self.0 - .borrow_mut() - .mailbox - .entry(program_id) - .or_insert_with(Vec::default); + self.0.borrow_mut().mailbox.entry(program_id).or_default(); Mailbox::new(program_id, &self.0) } diff --git a/node/README.md b/node/README.md index d10116cb91b..a7fb6552a71 100644 --- a/node/README.md +++ b/node/README.md @@ -154,7 +154,7 @@ Let's do the upgrade step by step: 3. Build your new node with ```bash - cargo build --release -p gear-runtime + cargo build --release -p vara-runtime ``` It will be node state that we will be upgrading to. @@ -175,7 +175,7 @@ toggle the "file upload" switch on the right-hand side of the "code" input field to the `setCode` function. Click the "code" input field, and select one of the Wasm binaries that defines the upgraded runtime: ```bash -target/release/wbuild/gear-runtime/gear_runtime.compact.wasm +target/release/wbuild/vara-runtime/vara_runtime.compact.wasm ``` Leave the value for the `weight` parameter at the default of `0x00`. Click "Submit Transaction" and then "Sign and Submit". diff --git a/node/authorship/Cargo.toml b/node/authorship/Cargo.toml index 0ea077deb9a..35d4e1b83b0 100644 --- a/node/authorship/Cargo.toml +++ b/node/authorship/Cargo.toml @@ -56,7 +56,7 @@ pallet-balances = { workspace = true, features = ["std"] } pallet-gear = { workspace = true, features = ["std"] } pallet-gear-messenger = { workspace = true, features = ["std"] } pallet-gear-program = { workspace = true, features = ["std"] } -testing = {workspace = true, features = ["vara-native"] } +testing.workspace = true vara-runtime = { workspace = true, features = ["std", "dev"] } demo-mul-by-const = { workspace = true, features = ["debug"] } env_logger.workspace = true diff --git a/node/authorship/src/tests.rs b/node/authorship/src/tests.rs index c845fbbf692..8a403f9ec22 100644 --- a/node/authorship/src/tests.rs +++ b/node/authorship/src/tests.rs @@ -55,7 +55,7 @@ use testing::{ use vara_runtime::{AccountId, Runtime, RuntimeCall, UncheckedExtrinsic, SLOT_DURATION, VERSION}; const SOURCE: TransactionSource = TransactionSource::External; -const DEFAULT_GAS_LIMIT: u64 = 865_000_000; +const DEFAULT_GAS_LIMIT: u64 = 1_000_000_000; fn chain_event(header: B::Header) -> ChainEvent where diff --git a/node/cli/Cargo.toml b/node/cli/Cargo.toml index 693b8b86db6..83ca987a440 100644 --- a/node/cli/Cargo.toml +++ b/node/cli/Cargo.toml @@ -33,7 +33,6 @@ pallet-gear-payment = { workspace = true, features = ["std"] } pallet-gear-staking-rewards = { workspace = true, optional = true, features = ["std"] } # Gear Runtimes -gear-runtime = { workspace = true, optional = true, features = ["std", "dev"] } vara-runtime = { workspace = true, optional = true, features = ["std", "dev"] } # Substrate client @@ -63,25 +62,24 @@ gcli = { workspace = true, optional = true } substrate-build-script-utils.workspace = true [features] -default = ["gear-native", "vara-native"] -gear-native = [ - "gear-runtime", - "service/gear-native", -] +default = ["vara-native"] vara-native = [ "vara-runtime", "service/vara-native", "pallet-gear-staking-rewards", ] runtime-benchmarks = [ + "vara-runtime?/runtime-benchmarks", "service/runtime-benchmarks", "frame-benchmarking", "frame-benchmarking-cli/runtime-benchmarks", ] runtime-benchmarks-checkers = [ + "vara-runtime?/runtime-benchmarks", "service/runtime-benchmarks-checkers", ] try-runtime = [ + "vara-runtime?/try-runtime", "service/try-runtime", "try-runtime-cli/try-runtime", ] diff --git a/node/cli/src/benchmarking.rs b/node/cli/src/benchmarking.rs index 85da0e72834..e49bbda4b46 100644 --- a/node/cli/src/benchmarking.rs +++ b/node/cli/src/benchmarking.rs @@ -66,41 +66,6 @@ macro_rules! with_signed_payload { } } => { match $self.$client.as_ref() { - #[cfg(feature = "gear-native")] - Client::Gear($client) => { - use gear_runtime as runtime; - - $( $setup )* - let $extra: runtime::SignedExtra = ( - frame_system::CheckNonZeroSender::::new(), - frame_system::CheckSpecVersion::::new(), - frame_system::CheckTxVersion::::new(), - frame_system::CheckGenesis::::new(), - frame_system::CheckMortality::::from( - sp_runtime::generic::Era::mortal($period, $current_block), - ), - frame_system::CheckNonce::::from($nonce), - frame_system::CheckWeight::::new(), - pallet_gear_payment::CustomChargeTransactionPayment::::from($tip), - ); - - let $raw_payload = runtime::SignedPayload::from_raw( - $call.clone(), - $extra.clone(), - ( - (), - runtime::VERSION.spec_version, - runtime::VERSION.transaction_version, - $genesis, - $best_hash, - (), - (), - (), - ), - ); - - $( $usage )* - }, #[cfg(feature = "vara-native")] Client::Vara($client) => { use vara_runtime as runtime; diff --git a/node/cli/src/command.rs b/node/cli/src/command.rs index 6e571242efc..231885232a7 100644 --- a/node/cli/src/command.rs +++ b/node/cli/src/command.rs @@ -55,28 +55,20 @@ impl SubstrateCli for Cli { // Common "dev" chain. `vara-runtime` is prioritized. #[cfg(feature = "vara-native")] "dev" => Box::new(chain_spec::vara::development_config()?), - #[cfg(all(feature = "gear-native", not(feature = "vara-native")))] - "dev" => Box::new(chain_spec::gear::development_config()?), - #[cfg(not(any(feature = "gear-native", feature = "vara-native")))] + #[cfg(not(feature = "vara-native"))] "dev" => return Err("No runtimes specified to compile."), // Specific "dev" chains. - #[cfg(feature = "gear-native")] - "gear-dev" => Box::new(chain_spec::gear::development_config()?), #[cfg(feature = "vara-native")] "vara-dev" => Box::new(chain_spec::vara::development_config()?), // Common "local" chain. `vara-runtime` is prioritized. #[cfg(feature = "vara-native")] "local" => Box::new(chain_spec::vara::local_testnet_config()?), - #[cfg(all(feature = "gear-native", not(feature = "vara-native")))] - "local" => Box::new(chain_spec::gear::local_testnet_config()?), - #[cfg(not(any(feature = "gear-native", feature = "vara-native")))] + #[cfg(not(feature = "vara-native"))] "local" => return Err("No runtimes specified to compile."), // Specific "local" chains. - #[cfg(feature = "gear-native")] - "gear-local" => Box::new(chain_spec::gear::local_testnet_config()?), #[cfg(feature = "vara-native")] "vara-local" => Box::new(chain_spec::vara::local_testnet_config()?), @@ -107,22 +99,14 @@ impl SubstrateCli for Cli { let chain_spec = Box::new(chain_spec::RawChainSpec::from_json_file(path.clone())?) as Box; - match (chain_spec.is_gear(), chain_spec.is_vara()) { - // Corner cases. - (true, true) => unreachable!("Chain spec couldn't be both of gear and vara runtime"), - (false, false) => return Err("Unable to identify chain spec as gear or vara runtime".into()), - - // Gear specs. - #[cfg(feature = "gear-runtime")] - (true, ..) => Box::new(chain_spec::gear::ChainSpec::from_json_file(path)?), - #[cfg(not(feature = "gear-runtime"))] - (true, ..) => return Err("Gear runtime is not available. Please compile the node with `-F gear-native` to enable it.".into()), - + if chain_spec.is_vara() { // Vara specs. #[cfg(feature = "vara-runtime")] - (.., true) => Box::new(chain_spec::vara::ChainSpec::from_json_file(path)?), + return Ok(Box::new(chain_spec::vara::ChainSpec::from_json_file(path)?)); #[cfg(not(feature = "vara-runtime"))] - (.., true) => return Err("Vara runtime is not available. Please compile the node with `-F vara-native` to enable it.".into()), + return Err("Vara runtime is not available. Please compile the node with `-F vara-native` to enable it.".into()); + } else { + return Err("Unable to identify chain spec as vara runtime".into()); } } }) @@ -130,8 +114,6 @@ impl SubstrateCli for Cli { fn native_runtime_version(spec: &Box) -> &'static RuntimeVersion { match spec { - #[cfg(feature = "gear-native")] - spec if spec.is_gear() => &service::gear_runtime::VERSION, #[cfg(feature = "vara-native")] spec if spec.is_vara() => &service::vara_runtime::VERSION, _ => panic!("Invalid chain spec"), @@ -147,8 +129,6 @@ macro_rules! unwrap_client { $code:expr ) => { match $client.as_ref() { - #[cfg(feature = "gear-native")] - service::Client::Gear($client) => $code, #[cfg(feature = "vara-native")] service::Client::Vara($client) => $code, #[allow(unreachable_patterns)] @@ -288,11 +268,6 @@ pub fn run() -> sc_cli::Result<()> { ); } match &config.chain_spec { - #[cfg(feature = "gear-native")] - spec if spec.is_gear() => cmd - .run::( - config, - ), #[cfg(feature = "vara-native")] spec if spec.is_vara() => cmd .run::( @@ -395,18 +370,6 @@ pub fn run() -> sc_cli::Result<()> { .map_err(|e| sc_cli::Error::Service(sc_service::Error::Prometheus(e)))?; match chain_spec { - #[cfg(feature = "gear-native")] - spec if spec.is_gear() => runner.async_run(|_| { - let info_provider = - substrate_info(gear_runtime::constants::time::SLOT_DURATION); - Ok(( - cmd.run::::ExtendHostFunctions, - >, _>(Some(info_provider)), - task_manager, - )) - }), #[cfg(feature = "vara-native")] spec if spec.is_vara() => runner.async_run(|_| { let info_provider = diff --git a/node/service/Cargo.toml b/node/service/Cargo.toml index d23b0e3d914..4512a2e40bd 100644 --- a/node/service/Cargo.toml +++ b/node/service/Cargo.toml @@ -31,7 +31,6 @@ authorship.workspace = true # Gear Runtimes common = { workspace = true, features = ["std"] } gear-runtime-common = { workspace = true, features = ["std"] } -gear-runtime = { workspace = true, optional = true, features = ["std", "dev"] } vara-runtime = { workspace = true, optional = true, features = ["std", "dev"] } # Substrate Client @@ -102,7 +101,6 @@ try-runtime-cli = { workspace = true, optional = true } substrate-build-script-utils.workspace = true [features] -gear-native = ["gear-runtime"] vara-native = [ "vara-runtime", "pallet-staking", @@ -112,15 +110,12 @@ vara-native = [ runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", "frame-benchmarking-cli/runtime-benchmarks", - "gear-runtime?/runtime-benchmarks", "vara-runtime?/runtime-benchmarks", ] runtime-benchmarks-checkers = [ - "gear-runtime?/runtime-benchmarks-checkers", "vara-runtime?/runtime-benchmarks-checkers", ] try-runtime = [ - "gear-runtime?/try-runtime", "vara-runtime?/try-runtime", "try-runtime-cli", ] diff --git a/node/service/src/chain_spec/gear.rs b/node/service/src/chain_spec/gear.rs deleted file mode 100644 index 3b0c20c7c6e..00000000000 --- a/node/service/src/chain_spec/gear.rs +++ /dev/null @@ -1,196 +0,0 @@ -// This file is part of Gear. - -// Copyright (C) 2021-2023 Gear Technologies Inc. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// This program 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. - -// This program 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 this program. If not, see . - -use crate::chain_spec::{get_account_id_from_seed, get_from_seed, AccountId, Extensions}; -use gear_runtime::{ - constants::currency::EXISTENTIAL_DEPOSIT, BabeConfig, BalancesConfig, GenesisConfig, - GrandpaConfig, SessionConfig, SessionKeys, SudoConfig, SystemConfig, ValidatorSetConfig, - WASM_BINARY, -}; -use gear_runtime_common::constants::BANK_ADDRESS; -use sc_service::ChainType; -use sp_consensus_babe::AuthorityId as BabeId; -use sp_consensus_grandpa::AuthorityId as GrandpaId; -use sp_core::sr25519; - -/// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type. -pub type ChainSpec = sc_service::GenericChainSpec; - -/// Generate authority keys. -pub fn authority_keys_from_seed(s: &str) -> (AccountId, BabeId, GrandpaId) { - ( - get_account_id_from_seed::(s), - get_from_seed::(s), - get_from_seed::(s), - ) -} - -pub fn development_config() -> Result { - let wasm_binary = WASM_BINARY.ok_or_else(|| "Development wasm not available".to_string())?; - - Ok(ChainSpec::from_genesis( - // Name - "Development", - // ID - "gear_dev", - ChainType::Development, - move || { - testnet_genesis( - wasm_binary, - // Initial PoA authorities - vec![authority_keys_from_seed("Alice")], - // Sudo account - get_account_id_from_seed::("Alice"), - // Pre-funded accounts - vec![ - get_account_id_from_seed::("Alice"), - get_account_id_from_seed::("Bob"), - get_account_id_from_seed::("Alice//stash"), - get_account_id_from_seed::("Bob//stash"), - ], - BANK_ADDRESS.into(), - true, - ) - }, - // Bootnodes - vec![], - // Telemetry - None, - // Protocol ID - None, - // Fork ID - None, - // Properties - None, - // Extensions - Default::default(), - )) -} - -pub fn local_testnet_config() -> Result { - let wasm_binary = WASM_BINARY.ok_or_else(|| "Local testnet wasm not available".to_string())?; - - Ok(ChainSpec::from_genesis( - // Name - "Gear Local Testnet", - // ID - "gear_local_testnet", - ChainType::Local, - move || { - testnet_genesis( - wasm_binary, - // Initial PoA authorities - vec![ - authority_keys_from_seed("Alice"), - authority_keys_from_seed("Bob"), - ], - // Sudo account - get_account_id_from_seed::("Alice"), - // Pre-funded accounts - vec![ - get_account_id_from_seed::("Alice"), - get_account_id_from_seed::("Bob"), - get_account_id_from_seed::("Charlie"), - get_account_id_from_seed::("Dave"), - get_account_id_from_seed::("Eve"), - get_account_id_from_seed::("Ferdie"), - get_account_id_from_seed::("Alice//stash"), - get_account_id_from_seed::("Bob//stash"), - get_account_id_from_seed::("Charlie//stash"), - get_account_id_from_seed::("Dave//stash"), - get_account_id_from_seed::("Eve//stash"), - get_account_id_from_seed::("Ferdie//stash"), - ], - BANK_ADDRESS.into(), - true, - ) - }, - // Bootnodes - vec![], - // Telemetry - None, - // Protocol ID - None, - // Fork ID - None, - // Properties - None, - // Extensions - Default::default(), - )) -} - -/// Configure initial storage state for FRAME modules. -fn testnet_genesis( - wasm_binary: &[u8], - initial_authorities: Vec<(AccountId, BabeId, GrandpaId)>, - root_key: AccountId, - endowed_accounts: Vec, - bank_account: AccountId, - _enable_println: bool, -) -> GenesisConfig { - // Configure endowed accounts with initial balance of 1 << 60. - let mut balances = endowed_accounts - .iter() - .cloned() - .map(|k| (k, 1u128 << 60)) - .collect::>(); - - balances.push((bank_account, EXISTENTIAL_DEPOSIT)); - - GenesisConfig { - system: SystemConfig { - // Add Wasm runtime to storage. - code: wasm_binary.to_vec(), - }, - balances: BalancesConfig { balances }, - validator_set: ValidatorSetConfig { - initial_validators: initial_authorities - .iter() - .map(|x| x.0.clone()) - .collect::>(), - }, - babe: BabeConfig { - authorities: Default::default(), - epoch_config: Some(gear_runtime::BABE_GENESIS_EPOCH_CONFIG), - }, - grandpa: GrandpaConfig { - authorities: Default::default(), - }, - session: SessionConfig { - keys: initial_authorities - .into_iter() - .map(|x| { - ( - x.0.clone(), - x.0, - SessionKeys { - babe: x.1, - grandpa: x.2, - }, - ) - }) - .collect::>(), - }, - sudo: SudoConfig { - // Assign network admin rights. - key: Some(root_key), - }, - transaction_payment: Default::default(), - } -} diff --git a/node/service/src/chain_spec/mod.rs b/node/service/src/chain_spec/mod.rs index e6934cd1123..1a9d149d45a 100644 --- a/node/service/src/chain_spec/mod.rs +++ b/node/service/src/chain_spec/mod.rs @@ -25,8 +25,6 @@ use sp_runtime::traits::IdentifyAccount; use serde::{Deserialize, Serialize}; -#[cfg(feature = "gear-native")] -pub mod gear; #[cfg(feature = "vara-native")] pub mod vara; diff --git a/node/service/src/client.rs b/node/service/src/client.rs index b118fe36453..e4371a885a8 100644 --- a/node/service/src/client.rs +++ b/node/service/src/client.rs @@ -40,40 +40,9 @@ pub type FullBackend = sc_service::TFullBackend; pub type FullClient = sc_service::TFullClient>; -#[cfg(not(any(feature = "gear-native", feature = "vara-native",)))] +#[cfg(not(feature = "vara-native"))] compile_error!("at least one runtime feature must be enabled"); -/// The native executor instance for default network. -#[cfg(feature = "gear-native")] -pub struct GearExecutorDispatch; - -#[cfg(feature = "gear-native")] -impl sc_executor::NativeExecutionDispatch for GearExecutorDispatch { - /// Only enable the benchmarking host functions when we actually want to benchmark. - #[cfg(feature = "runtime-benchmarks")] - type ExtendHostFunctions = ( - // Only for runtime-benchmarks host functions. - gear_ri::gear_debug::HostFunctions, - frame_benchmarking::benchmarking::HostFunctions, - gear_ri::gear_ri::HostFunctions, - gear_ri::sandbox::HostFunctions, - ); - /// Otherwise we only use the default Substrate host functions. - #[cfg(not(feature = "runtime-benchmarks"))] - type ExtendHostFunctions = ( - gear_ri::gear_ri::HostFunctions, - gear_ri::sandbox::HostFunctions, - ); - - fn dispatch(method: &str, data: &[u8]) -> Option> { - gear_runtime::api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - gear_runtime::native_version() - } -} - /// The native executor instance for standalone network. #[cfg(feature = "vara-native")] pub struct VaraExecutorDispatch; @@ -238,8 +207,6 @@ macro_rules! with_client { } } => { match $self { - #[cfg(feature = "gear-native")] - Self::Gear($client) => { $( $code )* }, #[cfg(feature = "vara-native")] Self::Vara($client) => { $( $code )* }, } @@ -249,21 +216,10 @@ macro_rules! with_client { /// A client instance of Gear. #[derive(Clone)] pub enum Client { - #[cfg(feature = "gear-native")] - Gear(Arc>), #[cfg(feature = "vara-native")] Vara(Arc>), } -#[cfg(feature = "gear-native")] -impl From>> for Client { - fn from( - client: Arc>, - ) -> Self { - Self::Gear(client) - } -} - #[cfg(feature = "vara-native")] impl From>> for Client { fn from( diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs index f2b34d07c4a..53908609161 100644 --- a/node/service/src/lib.rs +++ b/node/service/src/lib.rs @@ -43,8 +43,6 @@ pub use sc_client_api::AuxStore; use sc_consensus_babe::{self, SlotProportion}; pub use sp_blockchain::{HeaderBackend, HeaderMetadata}; -#[cfg(feature = "gear-native")] -pub use gear_runtime; #[cfg(feature = "vara-native")] pub use vara_runtime; @@ -54,17 +52,11 @@ mod client; pub mod rpc; pub trait IdentifyVariant { - /// Returns `true` if this is a configuration for gear network. - fn is_gear(&self) -> bool; - /// Returns `true` if this is a configuration for the vara network. fn is_vara(&self) -> bool; } impl IdentifyVariant for Box { - fn is_gear(&self) -> bool { - self.id().to_lowercase().starts_with("gear") - } fn is_vara(&self) -> bool { self.id().to_lowercase().starts_with("vara") } @@ -122,17 +114,6 @@ pub fn new_chain_ops( ServiceError, > { match &config.chain_spec { - #[cfg(feature = "gear-native")] - spec if spec.is_gear() => { - chain_ops!( - config, - rpc_calculations_multiplier, - rpc_max_batch_size, - gear_runtime, - GearExecutorDispatch, - Gear - ) - } #[cfg(feature = "vara-native")] spec if spec.is_vara() => { chain_ops!( @@ -669,16 +650,6 @@ pub fn new_full( rpc_max_batch_size: u64, ) -> Result { match &config.chain_spec { - #[cfg(feature = "gear-native")] - spec if spec.is_gear() => new_full_base::( - config, - disable_hardware_benchmarks, - |_, _| (), - max_gas, - rpc_calculations_multiplier, - rpc_max_batch_size, - ) - .map(|NewFullBase { task_manager, .. }| task_manager), #[cfg(feature = "vara-native")] spec if spec.is_vara() => new_full_base::( config, diff --git a/node/testing/Cargo.toml b/node/testing/Cargo.toml index e2e965ccf82..612f4249882 100644 --- a/node/testing/Cargo.toml +++ b/node/testing/Cargo.toml @@ -22,10 +22,9 @@ scale-info = { workspace = true, features = ["derive"] } runtime-primitives.workspace = true common.workspace = true pallet-gear-rpc-runtime-api.workspace = true -gear-runtime = { workspace = true, optional = true, features = ["dev"] } -vara-runtime = { workspace = true, optional = true, features = ["dev"] } +vara-runtime = { workspace = true, features = ["dev"] } gear-runtime-interface.workspace = true -service.workspace = true +service = { workspace = true, features = ["vara-native"] } # Substrate Client sc-block-builder.workspace = true @@ -55,7 +54,7 @@ frame-support.workspace = true frame-benchmarking.workspace = true [features] -default = ["std", "vara-native"] +default = ["std"] std = [ "runtime-primitives/std", "common/std", @@ -70,8 +69,5 @@ std = [ "frame-system/std", "frame-support/std", "frame-benchmarking/std", - "gear-runtime?/std", - "vara-runtime?/std", + "vara-runtime/std", ] -gear-native = ["gear-runtime", "service/gear-native"] -vara-native = ["vara-runtime", "service/vara-native"] diff --git a/node/testing/src/client.rs b/node/testing/src/client.rs index e743a263825..ef49bd5b6e3 100644 --- a/node/testing/src/client.rs +++ b/node/testing/src/client.rs @@ -18,13 +18,9 @@ //! Utilities to build a `TestClient` for gear- or vara-runtime. -#[cfg(all(not(feature = "vara-native"), feature = "gear-native"))] -use gear_runtime as runtime; -use sc_service::client; use sp_runtime::BuildStorage; /// Re-export test-client utilities. pub use substrate_test_client::*; -#[cfg(feature = "vara-native")] use vara_runtime as runtime; // A unit struct which implements `NativeExecutionDispatch` feeding in the hard-coded runtime diff --git a/node/testing/src/genesis.rs b/node/testing/src/genesis.rs index 019e3f93948..7bb246513fa 100644 --- a/node/testing/src/genesis.rs +++ b/node/testing/src/genesis.rs @@ -19,14 +19,8 @@ //! Genesis Configuration. use crate::keyring::*; -#[cfg(all(not(feature = "vara-native"), feature = "gear-native"))] -use gear_runtime::{ - constants::currency::*, AccountId, BabeConfig, BalancesConfig, GenesisConfig, GrandpaConfig, - SessionConfig, SudoConfig, SystemConfig, BABE_GENESIS_EPOCH_CONFIG, WASM_BINARY, -}; use sp_keyring::{Ed25519Keyring, Sr25519Keyring}; use sp_runtime::{Perbill, Perquintill}; -#[cfg(feature = "vara-native")] use vara_runtime::{ constants::currency::*, AccountId, BabeConfig, BalancesConfig, GenesisConfig, GrandpaConfig, SessionConfig, StakerStatus, StakingConfig, StakingRewardsConfig, SudoConfig, SystemConfig, @@ -46,7 +40,6 @@ pub fn genesis_config(code: Option<&[u8]>) -> GenesisConfig { /// Create genesis runtime configuration for tests adding some extra /// endowed accounts if needed. -#[cfg(feature = "vara-native")] pub fn config_endowed(code: Option<&[u8]>, extra_endowed: Vec) -> GenesisConfig { let mut endowed = vec![ (alice(), 111 * ECONOMIC_UNITS), @@ -134,58 +127,3 @@ pub fn config_endowed(code: Option<&[u8]>, extra_endowed: Vec) -> Gen }, } } - -#[cfg(all(not(feature = "vara-native"), feature = "gear-native"))] -pub fn config_endowed(code: Option<&[u8]>, extra_endowed: Vec) -> GenesisConfig { - let mut endowed = vec![ - (alice(), 111 * ECONOMIC_UNITS), - (bob(), 100 * ECONOMIC_UNITS), - (charlie(), 100_000_000 * ECONOMIC_UNITS), - (dave(), 111 * ECONOMIC_UNITS), - (eve(), 101 * ECONOMIC_UNITS), - (ferdie(), 100 * ECONOMIC_UNITS), - ]; - - endowed.extend( - extra_endowed - .into_iter() - .map(|endowed| (endowed, 100 * ECONOMIC_UNITS)), - ); - - GenesisConfig { - system: SystemConfig { - code: code - .map(|x| x.to_vec()) - .unwrap_or_else(|| wasm_binary().to_vec()), - }, - balances: BalancesConfig { balances: endowed }, - babe: BabeConfig { - authorities: vec![], - epoch_config: Some(BABE_GENESIS_EPOCH_CONFIG), - }, - grandpa: GrandpaConfig { - authorities: vec![], - }, - session: SessionConfig { - keys: vec![ - ( - alice(), - dave(), - to_session_keys(&Ed25519Keyring::Alice, &Sr25519Keyring::Alice), - ), - ( - bob(), - eve(), - to_session_keys(&Ed25519Keyring::Bob, &Sr25519Keyring::Bob), - ), - ( - charlie(), - ferdie(), - to_session_keys(&Ed25519Keyring::Charlie, &Sr25519Keyring::Charlie), - ), - ], - }, - sudo: Default::default(), - transaction_payment: Default::default(), - } -} diff --git a/node/testing/src/keyring.rs b/node/testing/src/keyring.rs index f0a74f264e9..3f6a6172440 100644 --- a/node/testing/src/keyring.rs +++ b/node/testing/src/keyring.rs @@ -19,14 +19,9 @@ //! Test accounts available in runtime for testing. use codec::Encode; -#[cfg(all(not(feature = "vara-native"), feature = "gear-native"))] -use gear_runtime::{ - CustomChargeTransactionPayment, RuntimeCall, SessionKeys, SignedExtra, UncheckedExtrinsic, -}; use runtime_primitives::{AccountId, Index}; use sp_keyring::{AccountKeyring, Ed25519Keyring, Sr25519Keyring}; use sp_runtime::generic::Era; -#[cfg(feature = "vara-native")] use vara_runtime::{ CustomChargeTransactionPayment, RuntimeCall, SessionKeys, SignedExtra, StakingBlackList, UncheckedExtrinsic, @@ -66,7 +61,6 @@ pub fn ferdie() -> AccountId { } /// Convert keyrings into `SessionKeys`. -#[cfg(feature = "vara-native")] pub fn to_session_keys( ed25519_keyring: &Ed25519Keyring, sr25519_keyring: &Sr25519Keyring, @@ -79,19 +73,7 @@ pub fn to_session_keys( } } -#[cfg(all(not(feature = "vara-native"), feature = "gear-native"))] -pub fn to_session_keys( - ed25519_keyring: &Ed25519Keyring, - sr25519_keyring: &Sr25519Keyring, -) -> SessionKeys { - SessionKeys { - babe: sr25519_keyring.to_owned().public().into(), - grandpa: ed25519_keyring.to_owned().public().into(), - } -} - /// Creates transaction extra. -#[cfg(feature = "vara-native")] pub fn signed_extra(nonce: Index) -> SignedExtra { ( StakingBlackList::new(), @@ -106,20 +88,6 @@ pub fn signed_extra(nonce: Index) -> SignedExtra { ) } -#[cfg(all(not(feature = "vara-native"), feature = "gear-native"))] -pub fn signed_extra(nonce: Index) -> SignedExtra { - ( - frame_system::CheckNonZeroSender::new(), - frame_system::CheckSpecVersion::new(), - frame_system::CheckTxVersion::new(), - frame_system::CheckGenesis::new(), - frame_system::CheckEra::from(Era::mortal(256, 0)), - frame_system::CheckNonce::from(nonce), - frame_system::CheckWeight::new(), - CustomChargeTransactionPayment::from(0), - ) -} - /// Sign given a `CheckedExtrinsic`. pub fn sign( xt: CheckedExtrinsic, diff --git a/pallets/gear-bank/src/tests.rs b/pallets/gear-bank/src/tests.rs index f0f0b019562..bc98568ea63 100644 --- a/pallets/gear-bank/src/tests.rs +++ b/pallets/gear-bank/src/tests.rs @@ -16,7 +16,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use crate::{mock::*, *}; +use crate::{mock::*, GasMultiplier, *}; use frame_support::{assert_noop, assert_ok}; use sp_runtime::traits::Zero; use utils::*; diff --git a/pallets/gear-debug/src/tests/mod.rs b/pallets/gear-debug/src/tests/mod.rs index bbff6e7e9ef..8777f6584d8 100644 --- a/pallets/gear-debug/src/tests/mod.rs +++ b/pallets/gear-debug/src/tests/mod.rs @@ -76,7 +76,6 @@ fn vec() { 131072i32.encode(), 10_000_000_000, 0, - false, )); run_to_next_block(None); @@ -226,7 +225,6 @@ fn debug_mode_works() { vec![], 1_000_000_000_u64, 0_u128, - false, ) .expect("Failed to send message"); @@ -238,7 +236,6 @@ fn debug_mode_works() { vec![], 1_000_000_000_u64, 0_u128, - false, ) .expect("Failed to send message"); @@ -565,7 +562,6 @@ fn check_not_allocated_pages() { vec![], 5_000_000_000_u64, 0_u128, - false, )); run_to_block(3, None); @@ -798,7 +794,6 @@ fn check_changed_pages_in_storage() { vec![], 5_000_000_000_u64, 0_u128, - false, )); run_to_block(3, None); @@ -958,7 +953,6 @@ fn disabled_program_rent() { .encode(), 20_000_000_000, 0, - false, )); run_to_next_block(None); diff --git a/pallets/gear-voucher/src/lib.rs b/pallets/gear-voucher/src/lib.rs index 7d8258ad107..81c71ea41ac 100644 --- a/pallets/gear-voucher/src/lib.rs +++ b/pallets/gear-voucher/src/lib.rs @@ -63,11 +63,11 @@ use frame_support::{ traits::{Currency, ExistenceRequirement, ReservableCurrency, StorageVersion}, PalletId, }; -use gear_core::ids::ProgramId; +use gear_core::ids::{MessageId, ProgramId}; pub use primitive_types::H256; use sp_io::hashing::blake2_256; use sp_runtime::traits::{StaticLookup, TrailingZeroInput}; -use sp_std::convert::TryInto; +use sp_std::{convert::TryInto, vec::Vec}; pub use weights::WeightInfo; pub use pallet::*; @@ -98,6 +98,11 @@ pub mod pallet { /// Weight information for extrinsics in this pallet. type WeightInfo: WeightInfo; + + type CallsDispatcher: PrepaidCallsDispatcher< + AccountId = Self::AccountId, + Balance = BalanceOf, + >; } #[pallet::pallet] @@ -170,6 +175,18 @@ pub mod pallet { Ok(().into()) } + + /// Dispatch allowed with voucher call. + #[pallet::call_index(1)] + #[pallet::weight(T::CallsDispatcher::weight(call))] + pub fn call( + origin: OriginFor, + call: PrepaidCall>, + ) -> DispatchResultWithPostInfo { + let origin = ensure_signed(origin)?; + + T::CallsDispatcher::dispatch(origin, call) + } } } @@ -191,3 +208,31 @@ impl PaymentVoucher> for Pallet Self::voucher_account_id(&who, &program) } } + +#[derive(Debug, Clone, Encode, Decode, TypeInfo, PartialEq, Eq, PartialOrd, Ord)] +pub enum PrepaidCall { + SendMessage { + destination: ProgramId, + payload: Vec, + gas_limit: u64, + value: Balance, + }, + SendReply { + reply_to_id: MessageId, + payload: Vec, + gas_limit: u64, + value: Balance, + }, +} + +pub trait PrepaidCallsDispatcher { + type AccountId; + type Balance; + + fn weight(call: &PrepaidCall) -> Weight; + + fn dispatch( + account_id: Self::AccountId, + call: PrepaidCall, + ) -> DispatchResultWithPostInfo; +} diff --git a/pallets/gear-voucher/src/mock.rs b/pallets/gear-voucher/src/mock.rs index 0b609f87d73..180772bd8c5 100644 --- a/pallets/gear-voucher/src/mock.rs +++ b/pallets/gear-voucher/src/mock.rs @@ -99,11 +99,27 @@ parameter_types! { pub const VoucherPalletId: PalletId = PalletId(*b"py/vouch"); } +impl crate::PrepaidCallsDispatcher for () { + type AccountId = AccountId; + type Balance = Balance; + + fn weight(_call: &pallet_gear_voucher::PrepaidCall) -> frame_support::weights::Weight { + unimplemented!(); + } + fn dispatch( + _account_id: Self::AccountId, + _call: pallet_gear_voucher::PrepaidCall, + ) -> frame_support::pallet_prelude::DispatchResultWithPostInfo { + unimplemented!() + } +} + impl pallet_gear_voucher::Config for Test { type RuntimeEvent = RuntimeEvent; type Currency = Balances; type PalletId = VoucherPalletId; type WeightInfo = (); + type CallsDispatcher = (); } // Build genesis storage according to the mock runtime. diff --git a/pallets/gear/src/benchmarking/mod.rs b/pallets/gear/src/benchmarking/mod.rs index 98c360084d1..8e68d3c4be8 100644 --- a/pallets/gear/src/benchmarking/mod.rs +++ b/pallets/gear/src/benchmarking/mod.rs @@ -700,10 +700,9 @@ benchmarks! { let code = benchmarking::generate_wasm2(16.into()).unwrap(); benchmarking::set_program::, _>(program_id, code, 1.into()); let payload = vec![0_u8; p as usize]; - let prepaid = false; init_block::(None); - }: _(RawOrigin::Signed(caller), program_id, payload, 100_000_000_u64, minimum_balance, prepaid) + }: _(RawOrigin::Signed(caller), program_id, payload, 100_000_000_u64, minimum_balance) verify { assert!(matches!(QueueOf::::dequeue(), Ok(Some(_)))); } @@ -733,10 +732,9 @@ benchmarks! { None, ).try_into().unwrap_or_else(|_| unreachable!("Signal message sent to user")), u32::MAX.unique_saturated_into()).expect("Error during mailbox insertion"); let payload = vec![0_u8; p as usize]; - let prepaid = false; init_block::(None); - }: _(RawOrigin::Signed(caller.clone()), original_message_id, payload, 100_000_000_u64, minimum_balance, prepaid) + }: _(RawOrigin::Signed(caller.clone()), original_message_id, payload, 100_000_000_u64, minimum_balance) verify { assert!(matches!(QueueOf::::dequeue(), Ok(Some(_)))); assert!(MailboxOf::::is_empty(&caller)) diff --git a/pallets/gear/src/benchmarking/syscalls.rs b/pallets/gear/src/benchmarking/syscalls.rs index 996394de17b..59bc501796d 100644 --- a/pallets/gear/src/benchmarking/syscalls.rs +++ b/pallets/gear/src/benchmarking/syscalls.rs @@ -1230,23 +1230,20 @@ where &[], ); - instructions.extend( - body::fallible_syscall_instr( - repetitions, - 0, - InstrI32Const(res_offset), - &[ - // get handle from send init results - Counter(err_handle_offset + ERR_LEN_SIZE, ERR_HANDLE_SIZE), - InstrI32Load(2, 0), - // input at - InstrI32Const(input_at), - // input len - InstrI32Const(input_len), - ], - ) - .into_iter(), - ); + instructions.extend(body::fallible_syscall_instr( + repetitions, + 0, + InstrI32Const(res_offset), + &[ + // get handle from send init results + Counter(err_handle_offset + ERR_LEN_SIZE, ERR_HANDLE_SIZE), + InstrI32Load(2, 0), + // input at + InstrI32Const(input_at), + // input len + InstrI32Const(input_len), + ], + )); let module = ModuleDefinition { memory: Some(ImportedMemory::max::()), diff --git a/pallets/gear/src/benchmarking/tasks.rs b/pallets/gear/src/benchmarking/tasks.rs index e1c34d65f1c..1ec61aac52d 100644 --- a/pallets/gear/src/benchmarking/tasks.rs +++ b/pallets/gear/src/benchmarking/tasks.rs @@ -236,7 +236,6 @@ where calls.encode(), 10_000_000_000, 0u32.into(), - false, ) .expect("failed to send message"); @@ -284,7 +283,6 @@ where Command::Wait(WaitSubcommand::WaitFor(delay)).encode(), 10_000_000_000, 0u32.into(), - false, ) .expect("failed to send message"); @@ -332,7 +330,6 @@ where Command::Wait(WaitSubcommand::Wait).encode(), 10_000_000_000, 0u32.into(), - false, ) .expect("failed to send message"); diff --git a/pallets/gear/src/benchmarking/tests/syscalls_integrity.rs b/pallets/gear/src/benchmarking/tests/syscalls_integrity.rs index d9629805bb1..1ad6facf9fc 100644 --- a/pallets/gear/src/benchmarking/tests/syscalls_integrity.rs +++ b/pallets/gear/src/benchmarking/tests/syscalls_integrity.rs @@ -96,21 +96,28 @@ where strings.encode(), BlockGasLimitOf::::get(), Zero::zero(), - false, ) .expect("Failed to send read_big_state append command"); utils::run_to_next_block::(None); - assert!(SystemPallet::::events().into_iter().any(|e| { - let bytes = e.event.encode(); - let Ok(gear_event): Result, _> = Event::decode(&mut bytes[1..].as_ref()) else { return false }; - let Event::MessagesDispatched { statuses, .. } = gear_event else { return false }; - - log::debug!("{statuses:?}"); - log::debug!("{next_user_mid:?}"); - matches!(statuses.get(&next_user_mid), Some(DispatchStatus::Success)) - }), "No message with expected id had succeeded"); + assert!( + SystemPallet::::events().into_iter().any(|e| { + let bytes = e.event.encode(); + let Ok(gear_event): Result, _> = Event::decode(&mut bytes[1..].as_ref()) + else { + return false; + }; + let Event::MessagesDispatched { statuses, .. } = gear_event else { + return false; + }; + + log::debug!("{statuses:?}"); + log::debug!("{next_user_mid:?}"); + matches!(statuses.get(&next_user_mid), Some(DispatchStatus::Success)) + }), + "No message with expected id had succeeded" + ); let state = Gear::::read_state_impl(pid, Default::default(), None) .expect("Failed to read state"); @@ -411,7 +418,6 @@ where b"".to_vec(), 50_000_000_000, 0u128.unique_saturated_into(), - false, // call is not prepaid by issuing a voucher ) .expect("failed to send message to test program"); utils::run_to_next_block::(None); @@ -770,7 +776,6 @@ where vec![Kind::ReplyDetails([255u8; 32], reply_code)].encode(), 50_000_000_000, 0u128.unique_saturated_into(), - false, // call is not prepaid by issuing a voucher ) .expect("triggering message send to mailbox failed"); @@ -809,7 +814,6 @@ where vec![Kind::SignalDetails].encode(), 50_000_000_000, 0u128.unique_saturated_into(), - false, // call is not prepaid by issuing a voucher ) .expect("triggering message send to mailbox failed"); @@ -929,7 +933,7 @@ where let next_mid = utils::get_next_message_id::(utils::default_account::()); let (random, expected_bn) = T::Randomness::random(next_mid.as_ref()); - // If we use gear-runtime, current epoch starts at block 0, + // If we use vara-runtime, current epoch starts at block 0, // But mock runtime will reference currently proceeding block number, // so we add to currently got value. #[cfg(feature = "std")] @@ -1039,7 +1043,6 @@ where mp.payload, 50_000_000_000, mp.value.unique_saturated_into(), - false, // call is not prepaid by issuing a voucher ) .expect("failed send message"); } @@ -1051,7 +1054,6 @@ where rp.payload, 50_000_000_000, rp.value.unique_saturated_into(), - false, // call is not prepaid by issuing a voucher ) .expect("failed send reply"); } diff --git a/pallets/gear/src/internal.rs b/pallets/gear/src/internal.rs index 1f742082195..5103771e38e 100644 --- a/pallets/gear/src/internal.rs +++ b/pallets/gear/src/internal.rs @@ -180,7 +180,7 @@ impl HoldBound { impl PartialOrd for HoldBound { fn partial_cmp(&self, other: &Self) -> Option { - self.expected.partial_cmp(&other.expected) + Some(self.cmp(other)) } } diff --git a/pallets/gear/src/lib.rs b/pallets/gear/src/lib.rs index 65a8b677357..a5064fac073 100644 --- a/pallets/gear/src/lib.rs +++ b/pallets/gear/src/lib.rs @@ -75,6 +75,7 @@ use gear_core::{ percent::Percent, }; use manager::{CodeInfo, QueuePostProcessingData}; +use pallet_gear_voucher::{PrepaidCall, PrepaidCallsDispatcher}; use primitive_types::H256; use sp_runtime::{ traits::{One, Saturating, UniqueSaturatedInto, Zero}, @@ -1451,18 +1452,11 @@ pub mod pallet { /// is not a program in uninitialized state. If the opposite holds true, /// the message is not enqueued for processing. /// - /// If `prepaid` flag is set, the transaction fee and the gas cost will be - /// charged against a `voucher` that must have been issued for the sender - /// in conjunction with the `destination` program. That means that the - /// synthetic account corresponding to the (`AccountId`, `ProgramId`) pair must - /// exist and have sufficient funds in it. Otherwise, the call is invalidated. - /// /// Parameters: /// - `destination`: the message destination. /// - `payload`: in case of a program destination, parameters of the `handle` function. /// - `gas_limit`: maximum amount of gas the program can spend before it is halted. /// - `value`: balance to be transferred to the program once it's been created. - /// - `prepaid`: a flag that indicates whether a voucher should be used. /// /// Emits the following events: /// - `DispatchMessageEnqueued(MessageInfo)` when dispatch message is placed in the queue. @@ -1474,91 +1468,11 @@ pub mod pallet { payload: Vec, gas_limit: u64, value: BalanceOf, - prepaid: bool, ) -> DispatchResultWithPostInfo { - let payload = payload - .try_into() - .map_err(|err: PayloadSizeError| DispatchError::Other(err.into()))?; + // Validating origin. let who = ensure_signed(origin)?; - let origin = who.clone().into_origin(); - - Self::check_gas_limit_and_value(gas_limit, value)?; - - let message = HandleMessage::from_packet( - Self::next_message_id(origin), - HandlePacket::new_with_gas( - destination, - payload, - gas_limit, - value.unique_saturated_into(), - ), - ); - - if Self::program_exists(destination) { - ensure!(Self::is_active(destination), Error::::InactiveProgram); - - // Message is not guaranteed to be executed, that's why value is not immediately transferred. - // That's because destination can fail to be initialized, while this dispatch message is next - // in the queue. - // Note: reservation is always made against the user's account regardless whether - // a voucher exists. The latter can only be used to pay for gas or transaction fee. - GearBank::::deposit_value(&who, value)?; - - let external_node = if prepaid { - // If voucher is used, we attempt to reserve funds on the respective account. - // If no such voucher exists, the call is invalidated. - let voucher_id = VoucherOf::::voucher_id(who.clone(), destination); - - GearBank::::deposit_gas(&voucher_id, gas_limit).map_err(|e| { - log::debug!( - "Failed to redeem voucher for user {who:?} and program {destination:?}: {e:?}" - ); - Error::::FailureRedeemingVoucher - })?; - - voucher_id - } else { - // If voucher is not used, we reserve gas limit on the user's account. - GearBank::::deposit_gas(&who, gas_limit)?; - - who.clone() - }; - - Self::create(external_node, message.id(), gas_limit, false); - - let message = message.into_stored_dispatch(ProgramId::from_origin(origin)); - - Self::deposit_event(Event::MessageQueued { - id: message.id(), - source: who, - destination: message.destination(), - entry: MessageEntry::Handle, - }); - - QueueOf::::queue(message) - .unwrap_or_else(|e| unreachable!("Messages storage corrupted: {e:?}")); - } else { - let message = message.into_stored(ProgramId::from_origin(origin)); - let message: UserMessage = message - .try_into() - .unwrap_or_else(|_| unreachable!("Signal message sent to user")); - - CurrencyOf::::transfer( - &who, - &::AccountId::from_origin( - message.destination().into_origin(), - ), - value.unique_saturated_into(), - ExistenceRequirement::AllowDeath, - )?; - - Pallet::::deposit_event(Event::UserMessageSent { - message, - expiration: None, - }); - } - Ok(().into()) + Self::send_message_impl(who, destination, payload, gas_limit, value, false) } /// Send reply on message in `Mailbox`. @@ -1574,112 +1488,19 @@ pub mod pallet { /// /// NOTE: only user who is destination of the message, can claim value /// or reply on the message from mailbox. - /// - /// If `prepaid` flag is set, the transaction fee and the gas cost will be - /// charged against a `voucher` that must have been issued for the sender - /// in conjunction with the mailboxed message source program. That means that the - /// synthetic account corresponding to the (`AccountId`, `ProgramId`) pair must - /// exist and have sufficient funds in it. Otherwise, the call is invalidated. #[pallet::call_index(4)] - #[pallet::weight(::WeightInfo::send_reply(payload.len() as u32) + if *prepaid { - Weight::zero() - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } else { - Weight::zero() - })] + #[pallet::weight(::WeightInfo::send_reply(payload.len() as u32))] pub fn send_reply( origin: OriginFor, reply_to_id: MessageId, payload: Vec, gas_limit: u64, value: BalanceOf, - prepaid: bool, ) -> DispatchResultWithPostInfo { // Validating origin. - let origin = ensure_signed(origin)?; - - let payload = payload - .try_into() - .map_err(|err: PayloadSizeError| DispatchError::Other(err.into()))?; - - // Reason for reading from mailbox. - let reason = UserMessageReadRuntimeReason::MessageReplied.into_reason(); - - // Reading message, if found, or failing extrinsic. - let mailboxed = Self::read_message(origin.clone(), reply_to_id, reason) - .ok_or(Error::::MessageNotFound)?; - - Self::check_gas_limit_and_value(gas_limit, value)?; - - let destination = mailboxed.source(); - - // Checking that program, origin replies to, is not terminated. - ensure!(Self::is_active(destination), Error::::InactiveProgram); - - let reply_id = MessageId::generate_reply(mailboxed.id()); - - // Set zero gas limit if reply deposit exists. - let gas_limit = if GasHandlerOf::::exists_and_deposit(reply_id) { - 0 - } else { - gas_limit - }; - - GearBank::::deposit_value(&origin, value)?; - - let external_node = if prepaid { - // If voucher is used, we attempt to reserve funds on the respective account. - // If no such voucher exists, the call is invalidated. - let voucher_id = VoucherOf::::voucher_id(origin.clone(), destination); - - GearBank::::deposit_gas(&voucher_id, gas_limit).map_err(|e| { - log::debug!( - "Failed to redeem voucher for user {origin:?} and program {destination:?}: {e:?}" - ); - Error::::FailureRedeemingVoucher - })?; - - voucher_id - } else { - // If voucher is not used, we reserve gas limit on the user's account. - GearBank::::deposit_gas(&origin, gas_limit)?; - - origin.clone() - }; - - // Following up with a gas node creation. - Self::create(external_node, reply_id, gas_limit, true); - - // Creating reply message. - let message = ReplyMessage::from_packet( - reply_id, - ReplyPacket::new_with_gas(payload, gas_limit, value.unique_saturated_into()), - ); - - // Converting reply message into appropriate type for queueing. - let dispatch = message.into_stored_dispatch( - ProgramId::from_origin(origin.clone().into_origin()), - destination, - mailboxed.id(), - ); - - // Pre-generating appropriate event to avoid dispatch cloning. - let event = Event::MessageQueued { - id: dispatch.id(), - source: origin, - destination: dispatch.destination(), - entry: MessageEntry::Reply(mailboxed.id()), - }; - - // Queueing dispatch. - QueueOf::::queue(dispatch) - .unwrap_or_else(|e| unreachable!("Message queue corrupted! {:?}", e)); - - // Depositing pre-generated event. - Self::deposit_event(event); + let who = ensure_signed(origin)?; - Ok(().into()) + Self::send_reply_impl(who, reply_to_id, payload, gas_limit, value, false) } /// Claim value from message in `Mailbox`. @@ -1966,6 +1787,246 @@ pub mod pallet { } } + impl Pallet + where + T::AccountId: Origin, + { + /// Underlying implementation of `GearPallet::send_message`. + pub fn send_message_impl( + origin: AccountIdOf, + destination: ProgramId, + payload: Vec, + gas_limit: u64, + value: BalanceOf, + prepaid: bool, + ) -> DispatchResultWithPostInfo { + let payload = payload + .try_into() + .map_err(|err: PayloadSizeError| DispatchError::Other(err.into()))?; + + let who = origin; + let origin = who.clone().into_origin(); + + Self::check_gas_limit_and_value(gas_limit, value)?; + + let message = HandleMessage::from_packet( + Self::next_message_id(origin), + HandlePacket::new_with_gas( + destination, + payload, + gas_limit, + value.unique_saturated_into(), + ), + ); + + if Self::program_exists(destination) { + ensure!(Self::is_active(destination), Error::::InactiveProgram); + + // Message is not guaranteed to be executed, that's why value is not immediately transferred. + // That's because destination can fail to be initialized, while this dispatch message is next + // in the queue. + // Note: reservation is always made against the user's account regardless whether + // a voucher exists. The latter can only be used to pay for gas or transaction fee. + GearBank::::deposit_value(&who, value)?; + + let external_node = if prepaid { + // If voucher is used, we attempt to reserve funds on the respective account. + // If no such voucher exists, the call is invalidated. + let voucher_id = VoucherOf::::voucher_id(who.clone(), destination); + + GearBank::::deposit_gas(&voucher_id, gas_limit).map_err(|e| { + log::debug!( + "Failed to redeem voucher for user {who:?} and program {destination:?}: {e:?}" + ); + Error::::FailureRedeemingVoucher + })?; + + voucher_id + } else { + // If voucher is not used, we reserve gas limit on the user's account. + GearBank::::deposit_gas(&who, gas_limit)?; + + who.clone() + }; + + Self::create(external_node, message.id(), gas_limit, false); + + let message = message.into_stored_dispatch(ProgramId::from_origin(origin)); + + Self::deposit_event(Event::MessageQueued { + id: message.id(), + source: who, + destination: message.destination(), + entry: MessageEntry::Handle, + }); + + QueueOf::::queue(message) + .unwrap_or_else(|e| unreachable!("Messages storage corrupted: {e:?}")); + } else { + let message = message.into_stored(ProgramId::from_origin(origin)); + let message: UserMessage = message + .try_into() + .unwrap_or_else(|_| unreachable!("Signal message sent to user")); + + CurrencyOf::::transfer( + &who, + &::AccountId::from_origin( + message.destination().into_origin(), + ), + value.unique_saturated_into(), + ExistenceRequirement::AllowDeath, + )?; + + Pallet::::deposit_event(Event::UserMessageSent { + message, + expiration: None, + }); + } + + Ok(().into()) + } + + /// Underlying implementation of `GearPallet::send_reply`. + pub fn send_reply_impl( + origin: AccountIdOf, + reply_to_id: MessageId, + payload: Vec, + gas_limit: u64, + value: BalanceOf, + prepaid: bool, + ) -> DispatchResultWithPostInfo { + let payload = payload + .try_into() + .map_err(|err: PayloadSizeError| DispatchError::Other(err.into()))?; + + // Reason for reading from mailbox. + let reason = UserMessageReadRuntimeReason::MessageReplied.into_reason(); + + // Reading message, if found, or failing extrinsic. + let mailboxed = Self::read_message(origin.clone(), reply_to_id, reason) + .ok_or(Error::::MessageNotFound)?; + + Self::check_gas_limit_and_value(gas_limit, value)?; + + let destination = mailboxed.source(); + + // Checking that program, origin replies to, is not terminated. + ensure!(Self::is_active(destination), Error::::InactiveProgram); + + let reply_id = MessageId::generate_reply(mailboxed.id()); + + // Set zero gas limit if reply deposit exists. + let gas_limit = if GasHandlerOf::::exists_and_deposit(reply_id) { + 0 + } else { + gas_limit + }; + + GearBank::::deposit_value(&origin, value)?; + + let external_node = if prepaid { + // If voucher is used, we attempt to reserve funds on the respective account. + // If no such voucher exists, the call is invalidated. + let voucher_id = VoucherOf::::voucher_id(origin.clone(), destination); + + GearBank::::deposit_gas(&voucher_id, gas_limit).map_err(|e| { + log::debug!( + "Failed to redeem voucher for user {origin:?} and program {destination:?}: {e:?}" + ); + Error::::FailureRedeemingVoucher + })?; + + voucher_id + } else { + // If voucher is not used, we reserve gas limit on the user's account. + GearBank::::deposit_gas(&origin, gas_limit)?; + + origin.clone() + }; + + // Following up with a gas node creation. + Self::create(external_node, reply_id, gas_limit, true); + + // Creating reply message. + let message = ReplyMessage::from_packet( + reply_id, + ReplyPacket::new_with_gas(payload, gas_limit, value.unique_saturated_into()), + ); + + // Converting reply message into appropriate type for queueing. + let dispatch = message.into_stored_dispatch( + ProgramId::from_origin(origin.clone().into_origin()), + destination, + mailboxed.id(), + ); + + // Pre-generating appropriate event to avoid dispatch cloning. + let event = Event::MessageQueued { + id: dispatch.id(), + source: origin, + destination: dispatch.destination(), + entry: MessageEntry::Reply(mailboxed.id()), + }; + + // Queueing dispatch. + QueueOf::::queue(dispatch) + .unwrap_or_else(|e| unreachable!("Message queue corrupted! {:?}", e)); + + // Depositing pre-generated event. + Self::deposit_event(event); + + Ok(().into()) + } + } + + impl PrepaidCallsDispatcher for Pallet + where + T::AccountId: Origin, + { + type AccountId = AccountIdOf; + type Balance = BalanceOf; + + fn weight(call: &PrepaidCall) -> Weight { + match call { + PrepaidCall::SendMessage { payload, .. } => { + ::WeightInfo::send_message(payload.len() as u32) + } + PrepaidCall::SendReply { payload, .. } => { + ::WeightInfo::send_reply(payload.len() as u32) + } + } + } + + fn dispatch( + account_id: Self::AccountId, + call: PrepaidCall, + ) -> DispatchResultWithPostInfo { + match call { + PrepaidCall::SendMessage { + destination, + payload, + gas_limit, + value, + } => Self::send_message_impl( + account_id, + destination, + payload, + gas_limit, + value, + true, + ), + PrepaidCall::SendReply { + reply_to_id, + payload, + gas_limit, + value, + } => { + Self::send_reply_impl(account_id, reply_to_id, payload, gas_limit, value, true) + } + } + } + } + impl QueueRunner for Pallet where T::AccountId: Origin, diff --git a/pallets/gear/src/manager/task.rs b/pallets/gear/src/manager/task.rs index 54f6eb85f2b..4f0026ad372 100644 --- a/pallets/gear/src/manager/task.rs +++ b/pallets/gear/src/manager/task.rs @@ -123,7 +123,10 @@ where let pages_with_data = program.pages_with_data.len() as u32; - let ProgramState::Uninitialized{ message_id: init_message_id } = program.state else { + let ProgramState::Uninitialized { + message_id: init_message_id, + } = program.state + else { // pause initialized program let gas_reservation_map = ProgramStorageOf::::pause_program(program_id, Pallet::::block_number()) diff --git a/pallets/gear/src/mock.rs b/pallets/gear/src/mock.rs index a8113a9342d..d0702ce788f 100644 --- a/pallets/gear/src/mock.rs +++ b/pallets/gear/src/mock.rs @@ -293,6 +293,7 @@ impl pallet_gear_voucher::Config for Test { type Currency = Balances; type PalletId = VoucherPalletId; type WeightInfo = (); + type CallsDispatcher = Gear; } // Build genesis storage according to the mock runtime. diff --git a/pallets/gear/src/runtime_api.rs b/pallets/gear/src/runtime_api.rs index 67984db1a93..41cbd44383a 100644 --- a/pallets/gear/src/runtime_api.rs +++ b/pallets/gear/src/runtime_api.rs @@ -83,16 +83,14 @@ where })?; } HandleKind::Handle(destination) => { - Self::send_message(who.into(), destination, payload, initial_gas, value, false) - .map_err(|e| { - format!("Internal error: send_message failed with '{e:?}'").into_bytes() - })?; + Self::send_message(who.into(), destination, payload, initial_gas, value).map_err( + |e| format!("Internal error: send_message failed with '{e:?}'").into_bytes(), + )?; } HandleKind::Reply(reply_to_id, _status_code) => { - Self::send_reply(who.into(), reply_to_id, payload, initial_gas, value, false) - .map_err(|e| { - format!("Internal error: send_reply failed with '{e:?}'").into_bytes() - })?; + Self::send_reply(who.into(), reply_to_id, payload, initial_gas, value).map_err( + |e| format!("Internal error: send_reply failed with '{e:?}'").into_bytes(), + )?; } HandleKind::Signal(_signal_from, _status_code) => { return Err(b"Gas calculation for `handle_signal` is not supported".to_vec()); diff --git a/pallets/gear/src/tests.rs b/pallets/gear/src/tests.rs index 965147d615f..a9a9b4fec66 100644 --- a/pallets/gear/src/tests.rs +++ b/pallets/gear/src/tests.rs @@ -75,6 +75,7 @@ use gear_core_backend::error::{ use gear_core_errors::*; use gear_wasm_instrument::STACK_END_EXPORT_NAME; use gstd::{collections::BTreeMap, errors::Error as GstdError}; +use pallet_gear_voucher::PrepaidCall; use sp_runtime::{traits::UniqueSaturatedInto, SaturatedConversion}; use sp_std::convert::TryFrom; pub use utils::init_logger; @@ -109,7 +110,6 @@ fn default_wait_lock_timeout() { Kind::Send.encode(), BlockGasLimitOf::::get(), 0, - false )); let mid = utils::get_last_message_id(); @@ -180,7 +180,6 @@ fn value_counter_set_correctly_for_interruptions() { Default::default(), BlockGasLimitOf::::get(), VALUE, - false )); run_to_next_block(None); @@ -278,7 +277,6 @@ fn read_big_state() { strings.encode(), BlockGasLimitOf::::get(), 0, - false, )); let mid = get_last_message_id(); @@ -317,7 +315,6 @@ fn auto_reply_sent() { EMPTY_PAYLOAD.to_vec(), BlockGasLimitOf::::get(), 10_000, - false, )); run_to_next_block(None); @@ -347,7 +344,6 @@ fn auto_reply_sent() { EMPTY_PAYLOAD.to_vec(), BlockGasLimitOf::::get(), 0, - false, )); System::reset_events(); @@ -376,7 +372,6 @@ fn auto_reply_from_user_no_mailbox() { calls.encode(), BlockGasLimitOf::::get(), 0, - false, )); run_to_next_block(None); @@ -401,7 +396,6 @@ fn auto_reply_from_user_no_mailbox() { calls.encode(), BlockGasLimitOf::::get(), 0, - false, )); run_to_next_block(None); @@ -477,7 +471,6 @@ fn auto_reply_out_of_rent_waitlist() { Command::Wait(WaitSubcommand::Wait).encode(), BlockGasLimitOf::::get(), 0, - false, )); run_to_next_block(None); @@ -526,7 +519,6 @@ fn auto_reply_out_of_rent_mailbox() { EMPTY_PAYLOAD.to_vec(), BlockGasLimitOf::::get(), 0, - false, )); let message_id = utils::get_last_message_id(); @@ -590,7 +582,6 @@ fn reply_deposit_to_program() { 10_000_000_000u64.encode(), BlockGasLimitOf::::get(), 0, - false, )); run_to_next_block(None); @@ -622,7 +613,6 @@ fn reply_deposit_to_user_auto_reply() { 10_000_000_000u64.encode(), BlockGasLimitOf::::get(), 0, - false, )); run_to_next_block(None); @@ -654,7 +644,6 @@ fn reply_deposit_panic_in_handle_reply() { 1u64.encode(), BlockGasLimitOf::::get(), 0, - false, )); run_to_next_block(None); @@ -688,7 +677,6 @@ fn reply_deposit_to_user_reply() { reply_deposit.encode(), BlockGasLimitOf::::get(), 0, - false, )); run_to_next_block(None); @@ -720,7 +708,6 @@ fn reply_deposit_to_user_reply() { vec![], BlockGasLimitOf::::get(), value, - false, )); assert_eq!(get_last_message_id(), reply_id); @@ -765,7 +752,6 @@ fn reply_deposit_to_user_claim() { reply_deposit.encode(), BlockGasLimitOf::::get(), 0, - false, )); run_to_next_block(None); @@ -832,7 +818,6 @@ fn reply_deposit_to_user_out_of_rent() { reply_deposit.encode(), BlockGasLimitOf::::get(), 0, - false, )); run_to_next_block(None); @@ -906,7 +891,6 @@ fn reply_deposit_gstd_async() { hello.to_vec(), 30_000_000_000, 0, - false, )); let handle_id = get_last_message_id(); @@ -924,7 +908,6 @@ fn reply_deposit_gstd_async() { hello_reply.to_vec(), 0, 0, - false, )); run_to_next_block(None); @@ -956,7 +939,6 @@ fn pseudo_duplicate_wake() { calls.encode(), BlockGasLimitOf::::get(), 0, - false, )); let msg_id = get_last_message_id(); run_to_next_block(None); @@ -1172,7 +1154,6 @@ fn waited_with_zero_gas() { EMPTY_PAYLOAD.to_vec(), DEFAULT_GAS_LIMIT * 100, 0, - false, )); run_to_next_block(None); @@ -1219,7 +1200,6 @@ fn terminated_program_zero_gas() { EMPTY_PAYLOAD.to_vec(), 0, 0, - false, )); run_to_next_block(None); @@ -1265,7 +1245,6 @@ fn exited_program_zero_gas() { EMPTY_PAYLOAD.to_vec(), 0, 0, - false, )); run_to_next_block(None); @@ -1296,7 +1275,6 @@ fn delayed_user_replacement() { gas_limit_to_forward.encode(), // to be forwarded as gas limit gas_limit_to_forward + DEFAULT_GAS_LIMIT * 100, 100_000_000, // before fix to be forwarded as value - false, )); let message_id = utils::get_last_message_id(); @@ -1387,7 +1365,6 @@ fn delayed_send_user_message_payment() { 0u64.encode(), DEFAULT_GAS_LIMIT * 100, 0, - false, )); let proxy_msg_id = get_last_message_id(); @@ -1488,7 +1465,6 @@ fn delayed_send_user_message_with_reservation() { 0u64.encode(), DEFAULT_GAS_LIMIT * 100, 0, - false, )); let proxy_msg_id = get_last_message_id(); @@ -1597,7 +1573,6 @@ fn delayed_send_program_message_payment() { 0u64.encode(), DEFAULT_GAS_LIMIT * 100, 0, - false, )); let proxy_msg_id = utils::get_last_message_id(); @@ -1700,7 +1675,6 @@ fn delayed_send_program_message_with_reservation() { 0u64.encode(), DEFAULT_GAS_LIMIT * 100, 0, - false, )); let proxy_msg_id = utils::get_last_message_id(); @@ -1811,7 +1785,6 @@ fn delayed_send_program_message_with_low_reservation() { 0u64.encode(), DEFAULT_GAS_LIMIT * 100, 0, - false, )); let proxy_msg_id = utils::get_last_message_id(); @@ -2008,7 +1981,6 @@ fn unstoppable_block_execution_works() { EMPTY_PAYLOAD.to_vec(), gas_for_each_execution, 0, - false, )); } @@ -2560,7 +2532,6 @@ fn mailbox_sending_instant_transfer() { payload.request(USER_2.into_origin()).encode(), gas_info.burned + gas_limit.unwrap_or_default(), 0, - false, )); utils::assert_balance( @@ -2680,7 +2651,6 @@ fn send_message_works() { EMPTY_PAYLOAD.to_vec(), DEFAULT_GAS_LIMIT, mail_value, - false, )); let message_id = get_last_message_id(); @@ -2760,7 +2730,6 @@ fn mailbox_threshold_works() { (rent - 1).encode(), BlockGasLimitOf::::get(), 0, - false, )); check_result(false); @@ -2771,7 +2740,6 @@ fn mailbox_threshold_works() { (rent).encode(), BlockGasLimitOf::::get(), 0, - false, )); let message_id = check_result(true); @@ -2782,7 +2750,6 @@ fn mailbox_threshold_works() { rent.encode(), BlockGasLimitOf::::get(), 0, - false, )); let message_id = check_result(true); @@ -2793,7 +2760,6 @@ fn mailbox_threshold_works() { (rent - 1).encode(), BlockGasLimitOf::::get(), 0, - false, )); check_result(false); }); @@ -2876,7 +2842,6 @@ fn send_message_expected_failure() { EMPTY_PAYLOAD.to_vec(), 10, value, - false, )); // And no message will be in mailbox @@ -2898,7 +2863,6 @@ fn send_message_expected_failure() { EMPTY_PAYLOAD.to_vec(), block_gas_limit + 1, 0, - false, ), Error::::GasLimitTooHigh ); @@ -2985,7 +2949,6 @@ fn unused_gas_released_back_works() { EMPTY_PAYLOAD.to_vec(), huge_send_message_gas_limit, 0, - false, )); // Spends for submit program with default gas limit and sending default message with a huge gas limit @@ -3269,7 +3232,6 @@ fn memory_access_cases() { EMPTY_PAYLOAD.to_vec(), 10_000_000_000, 0, - false, ); assert_ok!(res); @@ -3284,7 +3246,6 @@ fn memory_access_cases() { EMPTY_PAYLOAD.to_vec(), 10_000_000_000, 0, - false, ); assert_ok!(res); @@ -3370,7 +3331,6 @@ fn lazy_pages() { EMPTY_PAYLOAD.to_vec(), 10_000_000_000, 1000, - false, ); assert_ok!(res); @@ -3625,7 +3585,6 @@ fn block_gas_limit_works() { EMPTY_PAYLOAD.to_vec(), gas1.min_limit - 1, 1000, - false, )); let failed1 = get_last_message_id(); @@ -3635,7 +3594,6 @@ fn block_gas_limit_works() { EMPTY_PAYLOAD.to_vec(), gas1.min_limit, 1000, - false, )); let succeed1 = get_last_message_id(); @@ -3645,7 +3603,6 @@ fn block_gas_limit_works() { EMPTY_PAYLOAD.to_vec(), gas2.min_limit - 1, 1000, - false, )); let failed2 = get_last_message_id(); @@ -3655,7 +3612,6 @@ fn block_gas_limit_works() { EMPTY_PAYLOAD.to_vec(), gas2.min_limit, 1000, - false, )); let succeed2 = get_last_message_id(); @@ -3686,7 +3642,6 @@ fn block_gas_limit_works() { EMPTY_PAYLOAD.to_vec(), gas.min_limit, 1000, - false, )); }; @@ -4025,7 +3980,6 @@ fn send_reply_works() { EMPTY_PAYLOAD.to_vec(), 10_000_000, 1000, // `prog_id` sent message with value of 1000 (see program code) - false, )); let expected_reply_message_id = get_last_message_id(); @@ -4061,7 +4015,6 @@ fn send_reply_failure_to_claim_from_mailbox() { EMPTY_PAYLOAD.to_vec(), DEFAULT_GAS_LIMIT, 0, - false, ), Error::::MessageNotFound ); @@ -4150,7 +4103,6 @@ fn send_reply_value_claiming_works() { EMPTY_PAYLOAD.to_vec(), gas_limit_to_reply, value_to_reply, - false, )); let currently_sent = value_to_reply + gas_price(gas_limit_to_reply); @@ -4298,7 +4250,6 @@ fn uninitialized_program_zero_gas() { vec![], 0, // that triggers unreachable code atm 0, - false, )); run_to_block(3, None); @@ -4363,7 +4314,6 @@ fn distributor_distribute() { Request::Receive(10).encode(), 30_000_000_000, 0, - false, )); run_to_block(3, None); @@ -4562,7 +4512,6 @@ fn messages_to_uninitialized_program_wait() { vec![], 10_000u64, 0u128, - false, )); run_to_block(3, None); @@ -4611,7 +4560,6 @@ fn uninitialized_program_should_accept_replies() { b"PONG".to_vec(), 10_000_000_000u64, 0, - false, )); run_to_block(3, None); @@ -4652,7 +4600,6 @@ fn defer_program_initialization() { b"PONG".to_vec(), 10_000_000_000u64, 0, - false, )); run_to_block(3, None); @@ -4663,7 +4610,6 @@ fn defer_program_initialization() { vec![], 10_000_000_000u64, 0u128, - false, )); run_to_block(4, None); @@ -4709,7 +4655,6 @@ fn wake_messages_after_program_inited() { vec![], 5_000_000_000u64, 0u128, - false, )); } @@ -4726,7 +4671,6 @@ fn wake_messages_after_program_inited() { b"PONG".to_vec(), 20_000_000_000u64, 0, - false, )); run_to_block(20, None); @@ -4809,7 +4753,6 @@ fn test_different_waits_success() { payload, gas_info.burned + wl_gas + system_reservation, value, - false, )); let wait_success = get_last_message_id(); @@ -4842,7 +4785,6 @@ fn test_different_waits_success() { payload, gas_info.burned + wl_gas + system_reservation, value, - false, )); let wait_for_success = get_last_message_id(); @@ -4878,7 +4820,6 @@ fn test_different_waits_success() { payload, gas_info.burned + wl_gas + system_reservation, value, - false, )); let wait_up_to_success = get_last_message_id(); @@ -4938,7 +4879,6 @@ fn test_different_waits_fail() { payload, gas_info.burned + wl_gas + system_reservation, value, - false, )); let wait_gas = get_last_message_id(); @@ -4975,7 +4915,6 @@ fn test_different_waits_fail() { payload, gas_info.burned + wl_gas + system_reservation, value, - false, )); let wait_for_gas = get_last_message_id(); @@ -5012,7 +4951,6 @@ fn test_different_waits_fail() { payload, gas_info.burned + wl_gas + system_reservation, value, - false, )); let wait_up_to_gas = get_last_message_id(); @@ -5050,7 +4988,6 @@ fn test_different_waits_fail() { payload, gas_info.burned + wl_gas + system_reservation, value, - false, )); let wait_for_arg = get_last_message_id(); @@ -5088,7 +5025,6 @@ fn test_different_waits_fail() { payload, gas_info.burned + wl_gas + system_reservation, value, - false, )); let wait_up_to_arg = get_last_message_id(); @@ -5132,7 +5068,6 @@ fn wait_after_reply() { Command::ReplyAndWait(subcommand).encode(), BlockGasLimitOf::::get(), 0, - false, )); let message_id = utils::get_last_message_id(); @@ -5183,7 +5118,6 @@ fn test_requeue_after_wait_for_timeout() { payload, 30_000_000_000, 0, - false, )); // Fast forward blocks. @@ -5255,7 +5189,6 @@ fn test_sending_waits() { payload, 25_000_000_000, 0, - false, )); let wait_for = get_last_message_id(); @@ -5274,7 +5207,6 @@ fn test_sending_waits() { payload, 25_000_000_000, 0, - false, )); let wait_no_more = get_last_message_id(); @@ -5293,7 +5225,6 @@ fn test_sending_waits() { payload, 30_000_000_000, 0, - false, )); let wait_wait = get_last_message_id(); @@ -5312,7 +5243,6 @@ fn test_sending_waits() { vec![], 10_000_000_000, 0, - false, )); run_to_next_block(None); @@ -5354,7 +5284,6 @@ fn test_wait_timeout() { payload, 30_000_000_000, 0, - false, )); run_to_next_block(None); @@ -5368,7 +5297,6 @@ fn test_wait_timeout() { Command::Wake.encode(), 10_000_000, 0, - false, )); run_to_next_block(None); @@ -5412,7 +5340,6 @@ fn test_join_wait_timeout() { payload, 30_000_000_000, 0, - false, )); run_to_next_block(None); @@ -5471,7 +5398,6 @@ fn test_select_wait_timeout() { payload, 30_000_000_000, 0, - false, )); run_to_next_block(None); @@ -5517,7 +5443,6 @@ fn test_wait_lost() { payload, 30_000_000_000, 0, - false, )); run_to_next_block(None); @@ -5530,7 +5455,6 @@ fn test_wait_lost() { b"ping".to_vec(), 100_000_000, 0, - false, )); true @@ -5587,7 +5511,6 @@ fn test_message_processing_for_non_existing_destination() { EMPTY_PAYLOAD.to_vec(), 10_000, 1_000, - false, )); let skipped_message_id = get_last_message_id(); @@ -5628,7 +5551,6 @@ fn exit_locking_funds() { calls.encode(), 10_000_000_000, value, - false, )); let message_1 = utils::get_last_message_id(); @@ -5639,7 +5561,6 @@ fn exit_locking_funds() { calls.encode(), 10_000_000_000, 0, - false, )); let message_2 = utils::get_last_message_id(); @@ -5782,7 +5703,6 @@ fn terminated_locking_funds() { EMPTY_PAYLOAD.to_vec(), gas_spent_reply, 0, - false, )); let reply_id = get_last_message_id(); @@ -5952,7 +5872,6 @@ fn test_create_program_works() { // Calculate the gas spent after #1242. 10_000_000_000u64, 0, - false, )); run_to_next_block(None); @@ -5996,7 +5915,6 @@ fn test_create_program_no_code_hash() { CreateProgram::Default.encode(), 50_000_000_000, 0, - false, )); run_to_block(2, None); @@ -6021,7 +5939,6 @@ fn test_create_program_no_code_hash() { .encode(), 100_000_000_000, 0, - false, )); run_to_block(3, None); @@ -6052,7 +5969,6 @@ fn test_create_program_no_code_hash() { .encode(), 100_000_000_000, 0, - false, )); run_to_block(4, None); @@ -6095,7 +6011,6 @@ fn test_create_program_simple() { CreateProgram::Default.encode(), 50_000_000_000, 0, - false, )); run_to_block(3, None); @@ -6109,7 +6024,6 @@ fn test_create_program_simple() { .encode(), 10_000_000_000, 0, - false, )); run_to_block(4, None); @@ -6131,7 +6045,6 @@ fn test_create_program_simple() { .encode(), 50_000_000_000, 0, - false, )); run_to_block(5, None); @@ -6146,7 +6059,6 @@ fn test_create_program_simple() { .encode(), 50_000_000_000, 0, - false, )); run_to_block(6, None); @@ -6190,7 +6102,6 @@ fn test_pausing_programs_works() { .encode(), 50_000_000_000, 0, - false, )); let child_program_id = ProgramId::generate_from_program( @@ -6378,7 +6289,6 @@ fn state_request() { Request::Insert(key, value).encode(), 1_000_000_000, 0, - false, )); } @@ -6425,7 +6335,6 @@ fn resume_session_push_works() { request, 1_000_000_000, 0, - false, )); run_to_next_block(None); @@ -6540,7 +6449,6 @@ fn resume_program_works() { request, 10_000_000_000, 0, - false, )); run_to_next_block(None); @@ -6703,7 +6611,6 @@ fn resume_program_works() { request, 10_000_000_000, 0, - false, )); run_to_next_block(None); @@ -6737,7 +6644,6 @@ fn test_no_messages_to_paused_program() { demo_wait_wake::Request::EchoWait(10).encode(), 50_000_000_000, 0, - false, )); run_to_next_block(None); @@ -6838,7 +6744,6 @@ fn uninitialized_program_terminates_on_pause() { b"0123456789".to_vec(), 50_000_000_000, 0, - false, )); run_to_next_block(None); @@ -6930,7 +6835,6 @@ fn pay_program_rent_syscall_works() { .encode(), 20_000_000_000, 0, - false, )); run_to_next_block(None); @@ -6954,7 +6858,6 @@ fn pay_program_rent_syscall_works() { vec![Kind::PayProgramRent([0u8; 32], rent, None)].encode(), 20_000_000_000, 0, - false, )); run_to_next_block(None); @@ -6973,7 +6876,6 @@ fn pay_program_rent_syscall_works() { .encode(), 20_000_000_000, 0, - false, )); let message_id = get_last_message_id(); @@ -7019,7 +6921,6 @@ fn pay_program_rent_syscall_works() { .encode(), 20_000_000_000, Gear::rent_fee_for(u32::MAX), - false, )); let message_id = get_last_message_id(); @@ -7056,7 +6957,6 @@ fn pay_program_rent_syscall_works() { .encode(), 20_000_000_000, required_value, - false, )); let message_id = get_last_message_id(); @@ -7208,7 +7108,6 @@ fn test_create_program_duplicate() { .encode(), 20_000_000_000, 0, - false, )); run_to_block(4, None); @@ -7226,7 +7125,6 @@ fn test_create_program_duplicate() { .encode(), 20_000_000_000, 0, - false, )); run_to_block(5, None); @@ -7238,7 +7136,6 @@ fn test_create_program_duplicate() { .encode(), 20_000_000_000, 0, - false, )); run_to_block(6, None); @@ -7292,7 +7189,6 @@ fn test_create_program_duplicate_in_one_execution() { .encode(), 20_000_000_000, 0, - false, )); run_to_block(3, None); @@ -7312,7 +7208,6 @@ fn test_create_program_duplicate_in_one_execution() { .encode(), 20_000_000_000, 0, - false, )); run_to_block(4, None); @@ -7382,7 +7277,6 @@ fn test_create_program_miscellaneous() { .encode(), 50_000_000_000, 0, - false, )); run_to_block(3, None); @@ -7400,7 +7294,6 @@ fn test_create_program_miscellaneous() { .encode(), 50_000_000_000, 0, - false, )); run_to_block(4, None); @@ -7417,7 +7310,6 @@ fn test_create_program_miscellaneous() { .encode(), 50_000_000_000, 0, - false, )); run_to_block(5, None); @@ -7444,7 +7336,6 @@ fn exit_handle() { vec![], 50_000_000_000u64, 0u128, - false, )); run_to_block(3, None); @@ -7497,7 +7388,6 @@ fn no_redundant_gas_value_after_exiting() { EMPTY_PAYLOAD.to_vec(), gas_spent, 0, - false, )); let msg_id = get_last_message_id(); @@ -7559,7 +7449,6 @@ fn init_wait_reply_exit_cleaned_storage() { vec![], 10_000u64, 0u128, - false, )); } @@ -7583,7 +7472,6 @@ fn init_wait_reply_exit_cleaned_storage() { EMPTY_PAYLOAD.to_vec(), 100_000_000_000u64, 0, - false, )); assert!(!Gear::is_initialized(pid)); @@ -7767,7 +7655,6 @@ fn gas_spent_vs_balance() { request.clone(), 10_000_000_000, 0, - false, )); run_to_block(3, None); @@ -8113,7 +8000,6 @@ fn test_two_contracts_composition_works() { 100_u64.to_le_bytes().to_vec(), 60_000_000_000, 0, - false, )); run_to_block(4, None); @@ -8331,7 +8217,6 @@ fn demo_constructor_works() { calls.encode(), BlockGasLimitOf::::get(), 100_000, - false, )); let message_id = get_last_message_id(); @@ -8360,7 +8245,6 @@ fn demo_constructor_works() { calls.encode(), BlockGasLimitOf::::get(), 0, - false, )); let message_id = get_last_message_id(); @@ -8412,7 +8296,6 @@ fn demo_constructor_value_eq() { calls.encode(), BlockGasLimitOf::::get(), 100_000, - false, )); run_to_next_block(None); @@ -8426,7 +8309,6 @@ fn demo_constructor_value_eq() { calls.encode(), BlockGasLimitOf::::get(), 0, - false, )); run_to_next_block(None); @@ -8476,7 +8358,6 @@ fn demo_constructor_is_demo_ping() { b"PING".to_vec(), BlockGasLimitOf::::get(), 0, - false, )); run_to_next_block(None); @@ -8494,7 +8375,6 @@ fn demo_constructor_is_demo_ping() { vec![], BlockGasLimitOf::::get(), 0, - false, )); let reply_id = get_last_message_id(); @@ -8530,7 +8410,6 @@ fn test_reply_to_terminated_program() { payload: EMPTY_PAYLOAD.to_vec(), gas_limit: 10_000_000, value: 0, - prepaid: false, }); assert_noop!( reply_call.dispatch(RuntimeOrigin::signed(USER_1)), @@ -8648,7 +8527,6 @@ fn delayed_wake() { vec![], BlockGasLimitOf::::get(), 0, - false, )); let mid = get_last_message_id(); @@ -8668,7 +8546,6 @@ fn delayed_wake() { delay.to_le_bytes().to_vec(), BlockGasLimitOf::::get(), 0, - false, )); run_to_next_block(None); @@ -8761,7 +8638,6 @@ fn cascading_messages_with_value_do_not_overcharge() { payload, gas_reserved, value, - false, )); let gas_to_spend = gas_price(gas_to_spend); @@ -8950,7 +8826,6 @@ fn execution_over_blocks() { Package::new(expected, src).encode(), block_gas_limit, 0, - false, )); run_to_next_block(Some(MAX_BLOCK)); @@ -8963,7 +8838,6 @@ fn execution_over_blocks() { Package::new(1_024, src).encode(), block_gas_limit, 0, - false, )); let message_id = get_last_message_id(); @@ -9004,7 +8878,6 @@ fn execution_over_blocks() { Method::Start { src, id, expected }.encode(), 9_000_000_000, 0, - false, )); run_to_next_block(Some(MAX_BLOCK)); @@ -9023,7 +8896,6 @@ fn execution_over_blocks() { Method::Refuel(id).encode(), block_gas_limit, 0, - false, )); count += 1; @@ -9103,7 +8975,6 @@ fn waking_message_waiting_for_mx_lock_does_not_lead_to_deadlock() { command.encode(), BlockGasLimitOf::::get(), 0, - false, ) .unwrap_or_else(|_| panic!("Failed to send command {:?} to Waiter", command)); let msg_id = get_last_message_id(); @@ -9187,7 +9058,6 @@ fn waking_message_waiting_for_rw_lock_does_not_lead_to_deadlock() { command.encode(), BlockGasLimitOf::::get(), 0, - false, ) .unwrap_or_else(|_| panic!("Failed to send command {:?} to Waiter", command)); let msg_id = get_last_message_id(); @@ -9320,7 +9190,6 @@ fn mx_lock_ownership_exceedance() { command.encode(), BlockGasLimitOf::::get(), 0, - false, ) .unwrap_or_else(|_| panic!("Failed to send command {:?} to Waiter", command)); let msg_id = get_last_message_id(); @@ -9628,7 +9497,6 @@ fn async_sleep_for() { command.encode(), BlockGasLimitOf::::get(), 0, - false, ) .unwrap_or_else(|_| panic!("Failed to send command {:?} to Waiter", command)); let msg_id = get_last_message_id(); @@ -9889,7 +9757,6 @@ fn test_async_messages() { kind.encode(), 30_000_000_000u64, 0, - false, )); // check the message sent from the program @@ -9905,7 +9772,6 @@ fn test_async_messages() { EMPTY_PAYLOAD.to_vec(), 10_000_000_000u64, 0, - false, )); // check the reply from the program @@ -9954,7 +9820,6 @@ fn program_generator_works() { EMPTY_PAYLOAD.to_vec(), BlockGasLimitOf::::get(), 0, - false, )); let message_id = get_last_message_id(); @@ -10096,7 +9961,6 @@ fn missing_functions_are_not_executed() { EMPTY_PAYLOAD.to_vec(), 1_000_000_000, 0, - false, )); run_to_next_block(None); @@ -10123,7 +9987,6 @@ fn missing_functions_are_not_executed() { EMPTY_PAYLOAD.to_vec(), 100_000_000, reply_value, - false, )); run_to_next_block(None); @@ -10188,7 +10051,6 @@ fn missing_handle_is_not_executed() { EMPTY_PAYLOAD.to_vec(), 1_000_000_000, 0, - false, )); assert_ok!(Gear::send_message( @@ -10197,7 +10059,6 @@ fn missing_handle_is_not_executed() { EMPTY_PAYLOAD.to_vec(), 1_000_000_000, 0, - false, )); run_to_next_block(None); @@ -10271,7 +10132,6 @@ fn test_reinstrumentation_works() { vec![], 10_000_000_000, 0, - false, )); run_to_block(3, None); @@ -10286,7 +10146,6 @@ fn test_reinstrumentation_works() { vec![], 10_000_000_000, 0, - false, )); run_to_block(4, None); @@ -10381,7 +10240,6 @@ fn send_from_reservation() { HandleAction::SendToUser.encode(), 10_000_000_000, 1_000, - false, )); run_to_block(3, None); @@ -10406,7 +10264,6 @@ fn send_from_reservation() { .encode(), 10_000_000_000, 1_000, - false, )); let mid = get_last_message_id(); @@ -10431,7 +10288,6 @@ fn send_from_reservation() { HandleAction::SendToUserDelayed.encode(), 10_000_000_000, 1_000, - false, )); run_to_block(5, None); @@ -10460,7 +10316,6 @@ fn send_from_reservation() { .encode(), 10_000_000_000, 1_000, - false, )); let mid = get_last_message_id(); @@ -10518,7 +10373,6 @@ fn reply_from_reservation() { HandleAction::ReplyToUser.encode(), 30_000_000_000, 1_000, - false, )); run_to_block(3, None); @@ -10543,7 +10397,6 @@ fn reply_from_reservation() { .encode(), 30_000_000_000, 1_000, - false, )); let mid = get_last_message_id(); @@ -10589,7 +10442,6 @@ fn signal_recursion_not_occurs() { HandleAction::PanicInSignal.encode(), 10_000_000_000, 0, - false, )); let mid = get_last_message_id(); @@ -10659,7 +10511,6 @@ fn signal_during_precharge() { HandleAction::WaitWithReserveAmountAndPanic(1).encode(), 10_000_000_000, 0, - false, )); let mid = get_last_message_id(); @@ -10676,7 +10527,6 @@ fn signal_during_precharge() { EMPTY_PAYLOAD.to_vec(), 10_000_000_000, 0, - false, )); run_to_block(4, None); @@ -10730,7 +10580,6 @@ fn signal_during_prepare() { HandleAction::WaitWithReserveAmountAndPanic(program_gas).encode(), 10_000_000_000, 0, - false, )); let mid = get_last_message_id(); @@ -10747,7 +10596,6 @@ fn signal_during_prepare() { EMPTY_PAYLOAD.to_vec(), 10_000_000_000, 0, - false, )); run_to_block(4, None); @@ -10810,7 +10658,6 @@ fn signal_async_wait_works() { EMPTY_PAYLOAD.to_vec(), gas_spent, 0, - false, )); let mid = get_last_message_id(); @@ -10886,7 +10733,6 @@ fn signal_run_out_of_gas_memory_access_works() { HandleAction::SaveSignal(SimpleExecutionError::RanOutOfGas.into()).encode(), GAS_LIMIT, 0, - false, )); run_to_next_block(None); @@ -10909,7 +10755,6 @@ fn signal_run_out_of_gas_memory_access_works() { demo_signal_entry::HandleAction::MemoryAccess.encode(), min_limit - 1, 0, - false, )); let mid = get_last_message_id(); @@ -11015,7 +10860,6 @@ fn signal_removed_from_waitlist_works() { HandleAction::SaveSignal(SignalCode::RemovedFromWaitlist).encode(), GAS_LIMIT, 0, - false, )); run_to_next_block(None); @@ -11027,7 +10871,6 @@ fn signal_removed_from_waitlist_works() { HandleAction::WaitWithoutSendingMessage.encode(), GAS_LIMIT, 0, - false, )); let mid = get_last_message_id(); @@ -11090,7 +10933,6 @@ fn system_reservation_unreserve_works() { HandleAction::Simple.encode(), 10_000_000_000, 0, - false, )); let mid = get_last_message_id(); @@ -11132,7 +10974,6 @@ fn few_system_reservations_across_waits_works() { HandleAction::AcrossWaits.encode(), 30_000_000_000, 0, - false, )); let mid = get_last_message_id(); @@ -11151,7 +10992,6 @@ fn few_system_reservations_across_waits_works() { EMPTY_PAYLOAD.to_vec(), 30_000_000_000, 0, - false, )); run_to_next_block(None); @@ -11184,7 +11024,6 @@ fn system_reservation_panic_works() { HandleAction::Panic.encode(), 10_000_000_000, 0, - false, )); let mid = get_last_message_id(); @@ -11224,7 +11063,6 @@ fn system_reservation_exit_works() { HandleAction::Exit.encode(), 10_000_000_000, 0, - false, )); let mid = get_last_message_id(); @@ -11266,7 +11104,6 @@ fn system_reservation_wait_and_panic_works() { HandleAction::WaitAndPanic.encode(), 10_000_000_000, 0, - false, )); let mid = get_last_message_id(); @@ -11283,7 +11120,6 @@ fn system_reservation_wait_and_panic_works() { EMPTY_PAYLOAD.to_vec(), 10_000_000_000, 0, - false, )); run_to_block(4, None); @@ -11317,7 +11153,6 @@ fn system_reservation_wait_works() { HandleAction::Wait.encode(), 10_000_000_000, 0, - false, )); let mid = get_last_message_id(); @@ -11377,7 +11212,6 @@ fn system_reservation_wait_and_exit_works() { HandleAction::WaitAndExit.encode(), 10_000_000_000, 0, - false, )); let mid = get_last_message_id(); @@ -11394,7 +11228,6 @@ fn system_reservation_wait_and_exit_works() { EMPTY_PAYLOAD.to_vec(), 10_000_000_000, 0, - false, )); run_to_block(4, None); @@ -11432,7 +11265,6 @@ fn system_reservation_wait_and_reserve_with_panic_works() { HandleAction::WaitAndReserveWithPanic.encode(), 30_000_000_000, 0, - false, )); let mid = get_last_message_id(); @@ -11451,7 +11283,6 @@ fn system_reservation_wait_and_reserve_with_panic_works() { EMPTY_PAYLOAD.to_vec(), 10_000_000_000, 0, - false, )); run_to_block(4, None); @@ -11489,7 +11320,6 @@ fn system_reservation_accumulate_works() { HandleAction::Accumulate.encode(), 10_000_000_000, 0, - false, )); let mid = get_last_message_id(); @@ -11527,7 +11357,6 @@ fn system_reservation_zero_amount_panics() { HandleAction::ZeroReserve.encode(), 10_000_000_000, 0, - false, )); let mid = get_last_message_id(); @@ -11588,7 +11417,6 @@ fn gas_reservation_works() { HandleAction::Unreserve.encode(), spent_gas, 0, - false, )); run_to_block(3, None); @@ -11630,7 +11458,6 @@ fn gas_reservation_works() { HandleAction::Exit.encode(), 50_000_000_000, 0, - false, )); run_to_block(2 + 4, None); @@ -11679,7 +11506,6 @@ fn gas_reservations_cleaned_in_terminated_program() { ReplyAction::Panic.encode(), BlockGasLimitOf::::get(), 0, - false, )); run_to_block(3, None); @@ -11729,7 +11555,6 @@ fn gas_reservation_wait_wake_exit() { ReplyAction::Exit.encode(), BlockGasLimitOf::::get(), 0, - false, )); run_to_block(3, None); @@ -11819,7 +11644,6 @@ fn gas_reservations_existing_reserve_unreserve() { HandleAction::SendFromReservationAndUnreserve.encode(), 10_000_000_000, 0, - false, )); let mid = get_last_message_id(); @@ -11857,7 +11681,6 @@ fn custom_async_entrypoint_works() { EMPTY_PAYLOAD.to_vec(), 30_000_000_000, 0, - false, )); run_to_block(3, None); @@ -11871,7 +11694,6 @@ fn custom_async_entrypoint_works() { EMPTY_PAYLOAD.to_vec(), 30_000_000_000, 0, - false, )); run_to_block(4, None); @@ -11909,7 +11731,6 @@ fn dispatch_kind_forbidden_function() { HandleAction::ForbiddenCallInSignal(USER_1.into_origin().into()).encode(), 10_000_000_000, 0, - false, )); let mid = get_last_message_id(); @@ -11989,7 +11810,6 @@ fn system_reservation_gas_allowance_rollbacks() { HandleAction::Simple.encode(), min_limit, 0, - false, )); let mid = get_last_message_id(); @@ -12025,7 +11845,6 @@ fn system_reservation_wait_and_exit_across_executions() { HandleAction::Wait.encode(), 10_000_000_000, 0, - false, )); let mid_wait = get_last_message_id(); @@ -12040,7 +11859,6 @@ fn system_reservation_wait_and_exit_across_executions() { HandleAction::Exit.encode(), 10_000_000_000, 0, - false, )); let mid_exit = get_last_message_id(); @@ -12109,7 +11927,6 @@ fn signal_on_uninitialized_program() { EMPTY_PAYLOAD.to_vec(), 10_000_000_000, 0, - false, )); let reply_mid = get_last_message_id(); @@ -12141,7 +11958,6 @@ fn missing_block_tasks_handled() { vec![], 100_000_000, 1000, - false, )); run_to_block(N - 1, None); @@ -12215,7 +12031,6 @@ fn async_does_not_duplicate_sync() { b"async".to_vec(), BlockGasLimitOf::::get(), 0, - false, )); run_to_next_block(None); @@ -12693,7 +12508,8 @@ fn async_recursion() { let mut to_assert = (1..=arg) .rev() - .filter_map(|i| (i % 4 == 0).then(|| Assertion::Payload(i.encode()))) + .filter(|&i| i % 4 == 0) + .map(|i| Assertion::Payload(i.encode())) .collect::>(); to_assert.insert( to_assert.len() - 1, @@ -12981,7 +12797,6 @@ fn check_random_works() { EMPTY_PAYLOAD.to_vec(), 50_000_000_000, 0, - false, )); let output: ([u8; 32], BlockNumber) = @@ -13044,7 +12859,6 @@ fn reply_with_small_non_zero_gas() { payload.to_vec(), DEFAULT_GAS_LIMIT * 10, 0, - false, )); let message_id = utils::get_last_message_id(); @@ -13086,7 +12900,6 @@ fn replies_denied_in_handle_reply() { vec![], 50_000_000_000, 0, - false, )); let message_id = get_last_message_id(); @@ -13101,7 +12914,6 @@ fn replies_denied_in_handle_reply() { vec![], 50_000_000_000, 0, - false, )); let reply_id = get_last_message_id(); @@ -13159,7 +12971,6 @@ fn relay_messages() { payload.to_vec(), DEFAULT_GAS_LIMIT * 10, 0, - false, ) .is_ok(), "{}", @@ -13558,7 +13369,6 @@ fn calculate_gas_fails_when_calculation_limit_exceeded() { .encode(), BlockGasLimitOf::::get(), 0, - false, ) .expect("Making reservation failed"); } @@ -13625,7 +13435,6 @@ fn reservation_manager() { payload.encode(), BlockGasLimitOf::::get(), 0, - false, )); run_to_next_block(None); @@ -13738,13 +13547,14 @@ fn send_gasless_message_works() { // Test 1: USER_2 sends a gasless message to the program (intending to use a voucher). // Expect failure because USER_2 has no voucher. assert_noop!( - Gear::send_message( + GearVoucher::call( RuntimeOrigin::signed(USER_2), - program_id, - EMPTY_PAYLOAD.to_vec(), - DEFAULT_GAS_LIMIT, - 0, - true, + PrepaidCall::SendMessage { + destination: program_id, + payload: EMPTY_PAYLOAD.to_vec(), + gas_limit: DEFAULT_GAS_LIMIT, + value: 0 + } ), Error::::FailureRedeemingVoucher ); @@ -13778,13 +13588,14 @@ fn send_gasless_message_works() { // Test 2: USER_2 sends a gasless message to the program (intending to use a voucher). // Now that voucher is issued, the message should be sent successfully. - assert_ok!(Gear::send_message( + assert_ok!(GearVoucher::call( RuntimeOrigin::signed(USER_2), - program_id, - EMPTY_PAYLOAD.to_vec(), - DEFAULT_GAS_LIMIT, - 1_000_000_u128, - true, + PrepaidCall::SendMessage { + destination: program_id, + payload: EMPTY_PAYLOAD.to_vec(), + gas_limit: DEFAULT_GAS_LIMIT, + value: 1_000_000 + } )); // Balances check @@ -13862,13 +13673,14 @@ fn send_gasless_reply_works() { // USER_1 sends a gasless reply using a voucher let gas_limit = 10_000_000_u64; - assert_ok!(Gear::send_reply( + assert_ok!(GearVoucher::call( RuntimeOrigin::signed(USER_1), - reply_to_id, - EMPTY_PAYLOAD.to_vec(), - gas_limit, - 1000, // `prog_id` sent message with value of 1000 (see program code) - true, + PrepaidCall::SendReply { + reply_to_id, + payload: EMPTY_PAYLOAD.to_vec(), + gas_limit, + value: 1_000 + } )); let expected_reply_message_id = get_last_message_id(); @@ -13934,7 +13746,6 @@ fn double_read_works() { b"PAYLOAD".to_vec(), BlockGasLimitOf::::get(), 100_000, - false, )); run_to_next_block(None); @@ -14029,7 +13840,6 @@ fn test_gas_allowance_exceed_with_context() { calls.encode(), BlockGasLimitOf::::get(), 0, - false, )); let msg_id = get_last_message_id(); run_to_next_block(allowance); @@ -14181,7 +13991,6 @@ fn test_send_to_terminated_from_program() { EMPTY_PAYLOAD.to_vec(), BlockGasLimitOf::::get(), 0, - false, )); run_to_next_block(None); @@ -14361,7 +14170,6 @@ fn remove_from_waitlist_after_exit_reply() { vec![], 1_000_000_000, 0, - false, )); run_to_next_block(None); @@ -14636,7 +14444,6 @@ mod utils { payload, limit, value, - false, )); let message_id = get_last_message_id(); @@ -14732,7 +14539,6 @@ mod utils { Vec::new(), gas_limit, // `prog_id` program sends message in handle which sets gas limit to 10_000_000. value, - false, )); let message_id = get_last_message_id(); @@ -14830,7 +14636,6 @@ mod utils { EMPTY_PAYLOAD.to_vec(), DEFAULT_GAS_LIMIT, 0, - false, ) } @@ -14840,7 +14645,6 @@ mod utils { payload: EMPTY_PAYLOAD.to_vec(), gas_limit: DEFAULT_GAS_LIMIT, value: 0, - prepaid: false, }) } @@ -15311,7 +15115,6 @@ mod utils { payload, BlockGasLimitOf::::get(), 0, - false, )); get_last_message_id() @@ -15387,7 +15190,6 @@ mod utils { HandleAction::SaveSignal(signal_code).encode(), GAS_LIMIT, 0, - false, )); run_to_next_block(None); @@ -15399,7 +15201,6 @@ mod utils { action.encode(), GAS_LIMIT, 0, - false, )); let mid = get_last_message_id(); diff --git a/pallets/payment/src/lib.rs b/pallets/payment/src/lib.rs index 6f7fcf428f9..68e6ecaa67d 100644 --- a/pallets/payment/src/lib.rs +++ b/pallets/payment/src/lib.rs @@ -196,7 +196,7 @@ where who: &'a ::AccountId, ) -> Cow<'a, ::AccountId> { // Check if the extrinsic being called allows to charge fee payment to another account. - // The only such call at the moment is `Gear::send_message` with `prepaid == true`. + // The only such call at the moment is `GearVoucher::call`. if let Some(acc) = T::DelegateFee::delegate_fee(call, who) { Cow::Owned(acc) } else { diff --git a/pallets/payment/src/mock.rs b/pallets/payment/src/mock.rs index 414bef402ae..8b8b85077fd 100644 --- a/pallets/payment/src/mock.rs +++ b/pallets/payment/src/mock.rs @@ -271,24 +271,14 @@ pub struct DelegateFeeAccountBuilder; impl DelegateFee for DelegateFeeAccountBuilder { fn delegate_fee(call: &RuntimeCall, who: &AccountId) -> Option { match call { - RuntimeCall::Gear(pallet_gear::Call::send_message { prepaid, .. }) => { - prepaid.then_some(FEE_PAYER) - } - RuntimeCall::Gear(pallet_gear::Call::send_reply { - reply_to_id, - prepaid, - .. - }) => { - if *prepaid { - as common::storage::Mailbox>::peek(who, reply_to_id).map( - |stored_message| { - GearVoucher::voucher_account_id(who, &stored_message.source()) - }, - ) - } else { - None - } - } + RuntimeCall::GearVoucher(pallet_gear_voucher::Call::call { + call: pallet_gear_voucher::PrepaidCall::SendMessage { .. }, + }) => Some(FEE_PAYER), + RuntimeCall::GearVoucher(pallet_gear_voucher::Call::call { + call: pallet_gear_voucher::PrepaidCall::SendReply { reply_to_id, .. }, + }) => as common::storage::Mailbox>::peek(who, reply_to_id).map( + |stored_message| GearVoucher::voucher_account_id(who, &stored_message.source()), + ), _ => None, } } @@ -309,6 +299,7 @@ impl pallet_gear_voucher::Config for Test { type Currency = Balances; type PalletId = VoucherPalletId; type WeightInfo = (); + type CallsDispatcher = Gear; } // Build genesis storage according to the mock runtime. diff --git a/pallets/payment/src/tests.rs b/pallets/payment/src/tests.rs index 8f908ce0fc4..de712b3e193 100644 --- a/pallets/payment/src/tests.rs +++ b/pallets/payment/src/tests.rs @@ -218,7 +218,6 @@ fn mq_size_affecting_fee_works() { payload: Default::default(), gas_limit: 100_000, value: 0, - prepaid: false, }); let len = 100usize; @@ -399,7 +398,6 @@ fn query_info_and_fee_details_work() { payload: Default::default(), gas_limit: 100_000, value: 0, - prepaid: false, }); let call_not_affecting_mq = RuntimeCall::Gear(pallet_gear::Call::claim_value { message_id: 1.into(), @@ -571,12 +569,13 @@ fn fee_payer_replacement_works() { let program_id = ProgramId::from_origin(H256::random()); let call: &::RuntimeCall = - &RuntimeCall::Gear(pallet_gear::Call::send_message { - destination: program_id, - payload: Default::default(), - gas_limit: 100_000, - value: 0, - prepaid: true, + &RuntimeCall::GearVoucher(pallet_gear_voucher::Call::call { + call: pallet_gear_voucher::PrepaidCall::SendMessage { + destination: program_id, + payload: Default::default(), + gas_limit: 100_000, + value: 0, + }, }); let len = 100usize; @@ -660,12 +659,13 @@ fn reply_with_voucher_pays_fee_from_voucher_ok() { // Preparing a call let gas_limit = 100_000_u64; let call: &::RuntimeCall = - &RuntimeCall::Gear(pallet_gear::Call::send_reply { - reply_to_id: msg_id, - payload: vec![], - gas_limit, - value: 0, - prepaid: true, + &RuntimeCall::GearVoucher(pallet_gear_voucher::Call::call { + call: pallet_gear_voucher::PrepaidCall::SendReply { + reply_to_id: msg_id, + payload: vec![], + gas_limit, + value: 0, + }, }); let len = 100_usize; diff --git a/pallets/staking-rewards/src/lib.rs b/pallets/staking-rewards/src/lib.rs index 66fd46e05fb..71b4ba92c59 100644 --- a/pallets/staking-rewards/src/lib.rs +++ b/pallets/staking-rewards/src/lib.rs @@ -231,8 +231,8 @@ pub mod pallet { #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { - /// Transferred to the pool from an external account. - Refilled { amount: BalanceOf }, + /// Deposited to the pool. + Deposited { amount: BalanceOf }, /// Transferred from the pool to an external account. Withdrawn { amount: BalanceOf }, /// Burned from the pool. @@ -271,7 +271,7 @@ pub mod pallet { log::error!("Failed to replenish the staking rewards pool: {:?}", e); Error::::FailureToRefillPool })?; - Self::deposit_event(Event::Refilled { amount: value }); + Self::deposit_event(Event::Deposited { amount: value }); Ok(()) } @@ -295,7 +295,7 @@ pub mod pallet { log::error!("Failed to replenish the staking rewards pool: {:?}", e); Error::::FailureToRefillPool })?; - Self::deposit_event(Event::Refilled { amount: value }); + Self::deposit_event(Event::Deposited { amount: value }); Ok(()) } @@ -403,6 +403,8 @@ impl EraPayout> for Pallet { } } +/// Balance out excessive total supply whenever new tokens are minted through +/// burning the equivalent amount from the inflation offset pool impl OnUnbalanced> for Pallet { fn on_nonzero_unbalanced(minted: PositiveImbalanceOf) { let amount = minted.peek(); @@ -420,22 +422,38 @@ impl OnUnbalanced> for Pallet { Self::deposit_event(Event::Burned { amount }); } else { log::warn!( - "Staking rewards pool has insufficient balance to burn minted rewards. The currency total supply may grow." + "Staking rewards pool has insufficient balance to burn minted rewards. \ + The currency total supply may grow." ); }; } } +/// Funnel the funds-to-burn into the inflation offset pool to maintain the total supply +pub struct OffsetPool(sp_std::marker::PhantomData); +impl OnUnbalanced> for OffsetPool { + fn on_nonzero_unbalanced(amount: NegativeImbalanceOf) { + let numeric_amount = amount.peek(); + + // Should resolve into existing but resolving with creation is a safer bet anyway + T::Currency::resolve_creating(&Pallet::::account_id(), amount); + + Pallet::deposit_event(Event::::Deposited { + amount: numeric_amount, + }); + } +} + /// A type to be plugged into the Staking pallet as the `RewardRemainder` associated type. /// -/// Implements the `OnUnbalanced` trait in a way that would try to burn -/// the amount equivalent to that provided in the input `NegativeImbalance` from the rewards -/// pool in order to keep the token total supply intact. It is assumed that the subsequent -/// `OnUnbalanced` handler (e.g. Treasury) would `resolve` the imbalance and not drop it - -/// otherwise the the total supply will decrease. -pub struct RewardsStash(sp_std::marker::PhantomData<(T, U)>); - -impl OnUnbalanced> for RewardsStash +/// A wrapper around the final `RewardRemainder` destination that burns from the inflation offset +/// pool the equivalent of the provided `NegativeImbalance` value in order to balance out what has +/// been minted as a part of the staking rewards for the era but not yet attributed to any account. +/// It is assumed that the subsequent `OnUnbalanced` handler (e.g. Treasury) would `resolve` the +/// imbalance and not drop it - otherwise the the total supply will decrease. +pub struct RewardProxy(sp_std::marker::PhantomData<(T, U)>); + +impl OnUnbalanced> for RewardProxy where U: OnUnbalanced>, { diff --git a/runtime/gear/Cargo.toml b/runtime/gear/Cargo.toml deleted file mode 100644 index 0fd0e349dd7..00000000000 --- a/runtime/gear/Cargo.toml +++ /dev/null @@ -1,183 +0,0 @@ -[package] -name = "gear-runtime" -version.workspace = true -authors.workspace = true -edition.workspace = true -license.workspace = true -homepage.workspace = true -repository.workspace = true -build = "build.rs" - -[package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] - -[dependencies] -const-str.workspace = true -log.workspace = true -parity-scale-codec.workspace = true -scale-info = { workspace = true, features = ["derive"] } -static_assertions.workspace = true -validator-set.workspace = true - -# Substrate deps -frame-support.workspace = true -frame-system.workspace = true -frame-try-runtime = { workspace = true, optional = true } -frame-executive.workspace = true -pallet-authorship.workspace = true -pallet-babe.workspace = true -pallet-balances.workspace = true -pallet-grandpa.workspace = true -pallet-multisig.workspace = true -pallet-proxy.workspace = true -pallet-session.workspace = true -pallet-sudo.workspace = true -pallet-timestamp.workspace = true -pallet-transaction-payment.workspace = true -pallet-utility.workspace = true -sp-api.workspace = true -sp-block-builder.workspace = true -sp-consensus-babe.workspace = true -sp-core.workspace = true -sp-inherents.workspace = true -sp-offchain.workspace = true -sp-runtime.workspace = true -sp-session.workspace = true -sp-std.workspace = true -sp-transaction-pool.workspace = true -sp-version.workspace = true - -# Used for the node template's RPCs -frame-system-rpc-runtime-api.workspace = true -pallet-transaction-payment-rpc-runtime-api.workspace = true - -# Used for runtime benchmarking -frame-benchmarking = { workspace = true, optional = true } -frame-system-benchmarking = { workspace = true, optional = true } -hex-literal = { workspace = true, optional = true } - -# Internal deps -common.workspace = true -runtime-common.workspace = true -pallet-gear-scheduler.workspace = true -pallet-gear-messenger.workspace = true -pallet-gear-program.workspace = true -pallet-gear-bank.workspace = true -pallet-gear.workspace = true -pallet-gear-debug = { workspace = true, optional = true } -pallet-gear-gas.workspace = true -pallet-gear-payment.workspace = true -pallet-gear-voucher.workspace = true -pallet-gear-rpc-runtime-api.workspace = true -runtime-primitives.workspace = true -pallet-gear-staking-rewards.workspace = true -pallet-gear-staking-rewards-rpc-runtime-api.workspace = true - -[build-dependencies] -substrate-build-script-utils.workspace = true -substrate-wasm-builder = { workspace = true, optional = true } - -[dev-dependencies] -gear-core-processor.workspace = true -gear-lazy-pages-common.workspace = true - -[features] -default = ["std"] -std = [ - "common/std", - "frame-try-runtime?/std", - "frame-system-benchmarking?/std", - "frame-benchmarking?/std", - "frame-executive/std", - "frame-support/std", - "frame-system/std", - "frame-system-rpc-runtime-api/std", - "pallet-authorship/std", - "pallet-babe/std", - "pallet-balances/std", - "pallet-gear-program/std", - "pallet-gear-scheduler/std", - "pallet-gear-bank/std", - "pallet-gear/std", - "pallet-gear-debug?/std", - "pallet-gear-gas/std", - "pallet-gear-payment/std", - "pallet-gear-rpc-runtime-api/std", - "runtime-primitives/std", - "validator-set/std", - "pallet-grandpa/std", - "pallet-multisig/std", - "pallet-proxy/std", - "pallet-session/std", - "pallet-sudo/std", - "pallet-timestamp/std", - "pallet-transaction-payment/std", - "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-utility/std", - "runtime-common/std", - "scale-info/std", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-babe/std", - "sp-core/std", - "sp-inherents/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-transaction-pool/std", - "sp-version/std", - "substrate-wasm-builder", - "pallet-gear-staking-rewards-rpc-runtime-api/std", - "pallet-gear-staking-rewards/std", -] -runtime-benchmarks = [ - "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "frame-system-benchmarking/runtime-benchmarks", - "hex-literal", - "pallet-balances/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", - "pallet-utility/runtime-benchmarks", - "pallet-gear/runtime-benchmarks", - "pallet-gear-voucher/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", -] -fuzz = [ - "common/fuzz", - "pallet-gear/fuzz", - "pallet-gear-gas/fuzz" -] -runtime-benchmarks-checkers = [ - "pallet-gear/runtime-benchmarks-checkers", -] -try-runtime = [ - "frame-executive/try-runtime", - "frame-try-runtime", - "frame-system/try-runtime", - "frame-support/try-runtime", - "pallet-gear/try-runtime", - "pallet-gear-messenger/try-runtime", - "pallet-gear-payment/try-runtime", - "pallet-gear-program/try-runtime", - "pallet-gear-gas/try-runtime", - "pallet-gear-bank/try-runtime", - "pallet-gear-scheduler/try-runtime", - "pallet-gear-voucher/try-runtime", - "pallet-gear-debug?/try-runtime", - "pallet-authorship/try-runtime", - "pallet-babe/try-runtime", - "pallet-balances/try-runtime", - "pallet-grandpa/try-runtime", - "pallet-multisig/try-runtime", - "pallet-proxy/try-runtime", - "pallet-session/try-runtime", - "pallet-sudo/try-runtime", - "pallet-timestamp/try-runtime", - "pallet-transaction-payment/try-runtime", - "pallet-utility/try-runtime", - "validator-set/try-runtime", - "runtime-common/try-runtime", -] -dev = ["pallet-gear-debug"] diff --git a/runtime/gear/build.rs b/runtime/gear/build.rs deleted file mode 100644 index 07778f95f5c..00000000000 --- a/runtime/gear/build.rs +++ /dev/null @@ -1,29 +0,0 @@ -// This file is part of Gear. - -// Copyright (C) 2021-2023 Gear Technologies Inc. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// This program 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. - -// This program 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 this program. If not, see . - -fn main() { - substrate_build_script_utils::generate_cargo_keys(); - #[cfg(all(feature = "std", not(feature = "fuzz")))] - { - substrate_wasm_builder::WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() - .build() - } -} diff --git a/runtime/gear/src/constants.rs b/runtime/gear/src/constants.rs deleted file mode 100644 index 0b4e927003b..00000000000 --- a/runtime/gear/src/constants.rs +++ /dev/null @@ -1,77 +0,0 @@ -// This file is part of Gear. - -// Copyright (C) 2021-2023 Gear Technologies Inc. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// This program 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. - -// This program 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 this program. If not, see . - -/// Currency related constants -pub mod currency { - use runtime_primitives::Balance; - - pub const UNITS: Balance = 1_000_000_000_000; // 10^(-12) precision - - /// The existential deposit. - pub const EXISTENTIAL_DEPOSIT: Balance = 500; - - /// The program rent cost per block. - pub const RENT_COST_PER_BLOCK: Balance = 125_000_000; - - // TODO: the actual numbers, if matter, are subject to review (#2655) - pub const fn deposit(items: u32, bytes: u32) -> Balance { - items as Balance * 150 + (bytes as Balance) * 60 - } -} - -/// Time and block constants -pub mod time { - use runtime_primitives::{BlockNumber, Moment}; - - /// Since BABE is probabilistic this is the average expected block time that - /// we are targeting. Blocks will be produced at a minimum duration defined - /// by `SLOT_DURATION`, but some slots will not be allocated to any - /// authority and hence no block will be produced. We expect to have this - /// block time on average following the defined slot duration and the value - /// of `c` configured for BABE (where `1 - c` represents the probability of - /// a slot being empty). - /// This value is only used indirectly to define the unit constants below - /// that are expressed in blocks. The rest of the code should use - /// `SLOT_DURATION` instead (like the Timestamp pallet for calculating the - /// minimum period). - /// - /// If using BABE with secondary slots (default) then all of the slots will - /// always be assigned, in which case `MILLISECS_PER_BLOCK` and - /// `SLOT_DURATION` should have the same value. - /// - /// - pub const MILLISECS_PER_BLOCK: Moment = 1000; - - // NOTE: Currently it is not possible to change the slot duration after the chain has started. - // Attempting to do so will brick block production. - pub const SLOT_DURATION: Moment = MILLISECS_PER_BLOCK; - - // Time is measured by number of blocks. - pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); - pub const HOURS: BlockNumber = MINUTES * 60; - pub const DAYS: BlockNumber = HOURS * 24; - pub const WEEKS: BlockNumber = DAYS * 7; - pub const MONTHS: BlockNumber = WEEKS * 4; - - // NOTE: Currently it is not possible to change the epoch duration after the chain has started. - // Attempting to do so will brick block production. - pub const EPOCH_DURATION_IN_SLOTS: BlockNumber = 2 * HOURS; - - // 1 in 4 blocks (on average, not counting collisions) will be primary BABE blocks. - pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4); -} diff --git a/runtime/gear/src/lib.rs b/runtime/gear/src/lib.rs deleted file mode 100644 index 4a6b5a2dbb5..00000000000 --- a/runtime/gear/src/lib.rs +++ /dev/null @@ -1,818 +0,0 @@ -// This file is part of Gear. - -// Copyright (C) 2021-2023 Gear Technologies Inc. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// This program 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. - -// This program 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 this program. 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(all(feature = "std", not(feature = "fuzz")))] -include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); - -use common::storage::{Mailbox, Messenger}; -use frame_support::weights::ConstantMultiplier; -pub use frame_support::{ - codec::{Decode, Encode, MaxEncodedLen}, - construct_runtime, - dispatch::{DispatchClass, WeighData}, - parameter_types, - traits::{ - ConstU128, ConstU32, Contains, FindAuthor, InstanceFilter, KeyOwnerProofSystem, Randomness, - StorageInfo, - }, - weights::{ - constants::{ - BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_REF_TIME_PER_MILLIS, - WEIGHT_REF_TIME_PER_SECOND, - }, - Weight, - }, - PalletId, RuntimeDebug, StorageValue, -}; -use frame_system::{ - limits::{BlockLength, BlockWeights}, - EnsureRoot, -}; -pub use pallet_gear::manager::{ExtManager, HandleKind}; -pub use pallet_gear_payment::{CustomChargeTransactionPayment, DelegateFee}; -use pallet_grandpa::{ - fg_primitives, AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList, -}; -pub use pallet_transaction_payment::{CurrencyAdapter, Multiplier}; -use runtime_common::constants::BANK_ADDRESS; -pub use runtime_common::{ - constants::{ - RENT_DISABLED_DELTA_WEEK_FACTOR, RENT_FREE_PERIOD_MONTH_FACTOR, RENT_RESUME_WEEK_FACTOR, - RESUME_SESSION_DURATION_HOUR_FACTOR, - }, - impl_runtime_apis_plus_common, BlockHashCount, DealWithFees, AVERAGE_ON_INITIALIZE_RATIO, - GAS_LIMIT_MIN_PERCENTAGE_NUM, NORMAL_DISPATCH_RATIO, VALUE_PER_GAS, -}; -pub use runtime_primitives::{AccountId, Signature}; -use runtime_primitives::{Balance, BlockNumber, Hash, Index, Moment}; -use sp_api::impl_runtime_apis; -use sp_core::{crypto::KeyTypeId, ConstBool, ConstU64, OpaqueMetadata, H256}; -use sp_runtime::{ - create_runtime_str, generic, impl_opaque_keys, - traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, NumberFor, OpaqueKeys}, - transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, Percent, -}; -use sp_std::{ - convert::{TryFrom, TryInto}, - prelude::*, -}; -#[cfg(feature = "std")] -use sp_version::NativeVersion; -use sp_version::RuntimeVersion; -use static_assertions::const_assert; - -pub use frame_system::Call as SystemCall; -pub use pallet_balances::Call as BalancesCall; -pub use pallet_timestamp::Call as TimestampCall; -#[cfg(any(feature = "std", test))] -pub use sp_runtime::BuildStorage; - -pub use pallet_gear; -#[cfg(feature = "dev")] -pub use pallet_gear_debug; -pub use pallet_gear_gas; -pub use pallet_gear_payment; - -pub mod constants; - -pub use constants::{currency::*, time::*}; - -mod migrations; - -// Weights used in the runtime. -mod weights; - -// By this we inject compile time version including commit hash -// (https://github.com/paritytech/substrate/blob/297b3948f4a0f7f6504d4b654e16cb5d9201e523/utils/build-script-utils/src/version.rs#L44) -// into the WASM runtime blob. This is used by the `runtime_wasmBlobVersion` RPC call. -// The format of the version is `x.y.z-commit_hash`, where the `x.y.z` is the version of this crate, -// and the `commit_hash` is the hash of the commit from which the WASM blob was built. -#[cfg(all(target_arch = "wasm32", target_os = "unknown"))] -#[link_section = "wasm_blob_version"] -static _WASM_BLOB_VERSION: [u8; const_str::to_byte_array!(env!("SUBSTRATE_CLI_IMPL_VERSION")) - .len()] = const_str::to_byte_array!(env!("SUBSTRATE_CLI_IMPL_VERSION")); - -// The version of the runtime specification. -// -// Full node will not attempt to use its native runtime in substitute for the -// on-chain WASM runtime unless all of `spec_name`, `spec_version`, and -// `authoring_version` are the same between WASM and native. -#[sp_version::runtime_version] -pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("gear"), - impl_name: create_runtime_str!("gear"), - apis: RUNTIME_API_VERSIONS, - authoring_version: 1, - spec_version: 1010, - impl_version: 1, - transaction_version: 1, - state_version: 1, -}; - -/// The BABE epoch configuration at genesis. -pub const BABE_GENESIS_EPOCH_CONFIG: sp_consensus_babe::BabeEpochConfiguration = - sp_consensus_babe::BabeEpochConfiguration { - c: PRIMARY_PROBABILITY, - allowed_slots: sp_consensus_babe::AllowedSlots::PrimaryAndSecondaryPlainSlots, - }; - -// We'll verify that WEIGHT_REF_TIME_PER_SECOND does not overflow, -// allowing us to use the simple divide operator instead of a saturating or checked one. -const_assert!(WEIGHT_REF_TIME_PER_SECOND.checked_div(3).is_some()); - -/// We allow for 1/3 of block time for computations, with maximum proof size. -/// -/// It's 1/3 sec for gear runtime with 1 second block duration. -const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND / 3, u64::MAX); - -/// 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 Version: RuntimeVersion = VERSION; - pub const SS58Prefix: u8 = 42; - pub RuntimeBlockWeights: BlockWeights = runtime_common::block_weights_for(MAXIMUM_BLOCK_WEIGHT); - pub RuntimeBlockLength: BlockLength = - BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); -} - -// Configure FRAME pallets to include in runtime. -impl frame_system::Config for Runtime { - /// The basic call filter to use in dispatchable. - type BaseCallFilter = frame_support::traits::Everything; - /// Block & extrinsics weights: base values and limits. - type BlockWeights = RuntimeBlockWeights; - /// The maximum length of a block (in bytes). - type BlockLength = RuntimeBlockLength; - /// The identifier used to distinguish between accounts. - type AccountId = AccountId; - /// The aggregated dispatch type that is available for extrinsics. - type RuntimeCall = RuntimeCall; - /// The lookup mechanism to get account ID from whatever is passed in dispatchers. - type Lookup = AccountIdLookup; - /// The index type for storing how many extrinsics an account has signed. - type Index = Index; - /// The index type for blocks. - type BlockNumber = BlockNumber; - /// The type for hashing blocks and tries. - type Hash = Hash; - /// The hashing algorithm used. - type Hashing = BlakeTwo256; - /// The header type. - type Header = generic::Header; - /// The ubiquitous event type. - type RuntimeEvent = RuntimeEvent; - /// The ubiquitous origin type. - type RuntimeOrigin = RuntimeOrigin; - /// Maximum number of block number to block hash mappings to keep (oldest pruned first). - type BlockHashCount = BlockHashCount; - /// The weight of database operations that the runtime can invoke. - type DbWeight = RocksDbWeight; - /// Version of the runtime. - type Version = Version; - /// Converts a module to the index of the module in `construct_runtime!`. - /// - /// This type is being generated by `construct_runtime!`. - type PalletInfo = PalletInfo; - /// What to do if a new account is created. - type OnNewAccount = (); - /// What to do if an account is fully reaped from the system. - type OnKilledAccount = (); - /// The data to be stored in an account. - type AccountData = pallet_balances::AccountData; - /// Weight information for the extrinsics of this pallet. - type SystemWeightInfo = weights::frame_system::SubstrateWeight; - /// This is used as an identifier of the chain. 42 is the generic substrate prefix. - type SS58Prefix = SS58Prefix; - /// The set code logic, just the default since we're not a parachain. - type OnSetCode = (); - type MaxConsumers = ConstU32<16>; -} - -parameter_types! { - pub const EpochDuration: u64 = EPOCH_DURATION_IN_SLOTS as u64; - pub const ExpectedBlockTime: Moment = MILLISECS_PER_BLOCK; - pub const MaxAuthorities: u32 = 32; -} - -impl pallet_babe::Config for Runtime { - type EpochDuration = EpochDuration; - type ExpectedBlockTime = ExpectedBlockTime; - type EpochChangeTrigger = pallet_babe::ExternalTrigger; - type DisabledValidators = (); - type WeightInfo = (); - type MaxAuthorities = MaxAuthorities; - type KeyOwnerProof = sp_core::Void; - type EquivocationReportSystem = (); -} - -impl pallet_grandpa::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - - type MaxSetIdSessionEntries = ConstU64<0>; - - type WeightInfo = (); - type MaxAuthorities = MaxAuthorities; - type KeyOwnerProof = sp_core::Void; - type EquivocationReportSystem = (); -} - -impl pallet_authorship::Config for Runtime { - type FindAuthor = pallet_session::FindAccountFromAuthorIndex; - type EventHandler = (); -} - -parameter_types! { - pub const MinimumPeriod: Moment = SLOT_DURATION / 2; -} - -impl pallet_timestamp::Config for Runtime { - /// A timestamp: milliseconds since the unix epoch. - type Moment = Moment; - type OnTimestampSet = Babe; - type MinimumPeriod = MinimumPeriod; - type WeightInfo = weights::pallet_timestamp::SubstrateWeight; -} - -impl pallet_balances::Config for Runtime { - type MaxLocks = ConstU32<50>; - type MaxReserves = (); - type ReserveIdentifier = [u8; 8]; - /// The type for recording an account's balance. - type Balance = Balance; - /// The ubiquitous event type. - type RuntimeEvent = RuntimeEvent; - type DustRemoval = (); - type ExistentialDeposit = ConstU128; - type AccountStore = System; - type WeightInfo = weights::pallet_balances::SubstrateWeight; -} - -parameter_types! { - pub const TransactionByteFee: Balance = 1; - pub const QueueLengthStep: u128 = 1000; - pub const OperationalFeeMultiplier: u8 = 5; -} - -impl pallet_transaction_payment::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type OnChargeTransaction = CurrencyAdapter>; - type OperationalFeeMultiplier = OperationalFeeMultiplier; - type WeightToFee = ConstantMultiplier>; - type LengthToFee = ConstantMultiplier>; - type FeeMultiplierUpdate = pallet_gear_payment::GearFeeMultiplier; -} - -parameter_types! { - pub const MinAuthorities: u32 = 1; -} - -impl validator_set::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type AddRemoveOrigin = EnsureRoot; - type MinAuthorities = MinAuthorities; -} - -impl_opaque_keys! { - pub struct SessionKeys { - pub babe: Babe, - pub grandpa: Grandpa, - } -} - -impl pallet_session::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type ValidatorId = ::AccountId; - type ValidatorIdOf = validator_set::ValidatorOf; - type ShouldEndSession = Babe; - type NextSessionRotation = Babe; - type SessionManager = ValidatorSet; - type SessionHandler = ::KeyTypeIdProviders; - type Keys = SessionKeys; - type WeightInfo = pallet_session::weights::SubstrateWeight; -} - -impl pallet_sudo::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; -} - -impl pallet_utility::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type WeightInfo = weights::pallet_utility::SubstrateWeight; - type PalletsOrigin = OriginCaller; -} - -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); -} - -impl pallet_multisig::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type Currency = Balances; - type DepositBase = DepositBase; - type DepositFactor = DepositFactor; - type MaxSignatories = ConstU32<100>; - type WeightInfo = pallet_multisig::weights::SubstrateWeight; -} - -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 AnnouncementDepositBase: Balance = deposit(1, 8); - pub const AnnouncementDepositFactor: Balance = deposit(0, 66); -} - -/// The type used to represent the kinds of proxying allowed. -#[derive( - Copy, - Clone, - Eq, - PartialEq, - Ord, - PartialOrd, - Encode, - Decode, - RuntimeDebug, - MaxEncodedLen, - scale_info::TypeInfo, -)] -pub enum ProxyType { - Any, - NonTransfer, - CancelProxy, - SudoBalances, -} - -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::Balances(..) | RuntimeCall::Sudo(..)) - } - ProxyType::CancelProxy => { - matches!( - c, - RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }) - ) - } - ProxyType::SudoBalances => match c { - RuntimeCall::Sudo(pallet_sudo::Call::sudo { call: x }) => { - matches!(x.as_ref(), &RuntimeCall::Balances(..)) - } - RuntimeCall::Utility(..) => true, - _ => false, - }, - } - } - 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 = ConstU32<32>; - type WeightInfo = pallet_proxy::weights::SubstrateWeight; - type MaxPending = ConstU32<32>; - type CallHasher = BlakeTwo256; - type AnnouncementDepositBase = AnnouncementDepositBase; - type AnnouncementDepositFactor = AnnouncementDepositFactor; -} - -impl pallet_gear_program::Config for Runtime { - type Scheduler = GearScheduler; - type CurrentBlockNumber = Gear; -} - -parameter_types! { - pub const GasLimitMaxPercentage: Percent = Percent::from_percent(GAS_LIMIT_MIN_PERCENTAGE_NUM); - pub BlockGasLimit: u64 = GasLimitMaxPercentage::get() * RuntimeBlockWeights::get() - .max_block.ref_time(); - - pub const ReserveThreshold: u32 = 1; - pub const WaitlistCost: u64 = 100; - pub const MailboxCost: u64 = 100; - pub const ReservationCost: u64 = 100; - pub const DispatchHoldCost: u64 = 100; - - pub const OutgoingLimit: u32 = 1024; - pub const MailboxThreshold: u64 = 3000; - - pub const PerformanceMultiplier: u32 = 100; -} - -parameter_types! { - pub Schedule: pallet_gear::Schedule = Default::default(); - pub BankAddress: AccountId = BANK_ADDRESS.into(); - pub const GasMultiplier: common::GasMultiplier = common::GasMultiplier::ValuePerGas(VALUE_PER_GAS); -} - -impl pallet_gear_bank::Config for Runtime { - type Currency = Balances; - type BankAddress = BankAddress; - type GasMultiplier = GasMultiplier; -} - -impl pallet_gear::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Randomness = pallet_babe::RandomnessFromOneEpochAgo; - type WeightInfo = weights::pallet_gear::SubstrateWeight; - type Schedule = Schedule; - type OutgoingLimit = OutgoingLimit; - type PerformanceMultiplier = PerformanceMultiplier; - type DebugInfo = DebugInfo; - type CodeStorage = GearProgram; - type ProgramStorage = GearProgram; - type MailboxThreshold = MailboxThreshold; - type ReservationsLimit = ConstU64<256>; - type Messenger = GearMessenger; - type GasProvider = GearGas; - type BlockLimiter = GearGas; - type Scheduler = GearScheduler; - type QueueRunner = Gear; - type Voucher = GearVoucher; - type ProgramRentFreePeriod = ConstU32<{ MONTHS * RENT_FREE_PERIOD_MONTH_FACTOR }>; - type ProgramResumeMinimalRentPeriod = ConstU32<{ WEEKS * RENT_RESUME_WEEK_FACTOR }>; - type ProgramRentCostPerBlock = ConstU128; - type ProgramResumeSessionDuration = ConstU32<{ HOURS * RESUME_SESSION_DURATION_HOUR_FACTOR }>; - - #[cfg(feature = "runtime-benchmarks")] - type ProgramRentEnabled = ConstBool; - - #[cfg(not(feature = "runtime-benchmarks"))] - type ProgramRentEnabled = ConstBool; - - type ProgramRentDisabledDelta = ConstU32<{ WEEKS * RENT_DISABLED_DELTA_WEEK_FACTOR }>; -} - -#[cfg(feature = "dev")] -impl pallet_gear_debug::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = pallet_gear_debug::weights::GearSupportWeight; - type CodeStorage = GearProgram; - type ProgramStorage = GearProgram; - type Messenger = GearMessenger; -} - -impl pallet_gear_scheduler::Config for Runtime { - type BlockLimiter = GearGas; - type ReserveThreshold = ReserveThreshold; - type WaitlistCost = WaitlistCost; - type MailboxCost = MailboxCost; - type ReservationCost = ReservationCost; - type DispatchHoldCost = DispatchHoldCost; -} - -impl pallet_gear_gas::Config for Runtime { - type BlockGasLimit = BlockGasLimit; -} - -impl pallet_gear_messenger::Config for Runtime { - type BlockLimiter = GearGas; - type CurrentBlockNumber = Gear; -} - -pub struct ExtraFeeFilter; -impl Contains for ExtraFeeFilter { - fn contains(call: &RuntimeCall) -> bool { - // Calls that affect message queue and are subject to extra fee - matches!( - call, - RuntimeCall::Gear(pallet_gear::Call::create_program { .. }) - | RuntimeCall::Gear(pallet_gear::Call::upload_program { .. }) - | RuntimeCall::Gear(pallet_gear::Call::send_message { .. }) - | RuntimeCall::Gear(pallet_gear::Call::send_reply { .. }) - ) - } -} - -pub struct DelegateFeeAccountBuilder; -// TODO: in case of the `send_reply` prepaid call we have to iterate through the -// user's mailbox to dig out the stored message source `program_id` to check if it has -// issued a voucher to pay for the reply extrinsic transaction fee. -// Isn't there a better way to do that? -impl DelegateFee for DelegateFeeAccountBuilder { - fn delegate_fee(call: &RuntimeCall, who: &AccountId) -> Option { - match call { - RuntimeCall::Gear(pallet_gear::Call::send_message { - destination, - prepaid, - .. - }) => prepaid.then(|| GearVoucher::voucher_account_id(who, destination)), - RuntimeCall::Gear(pallet_gear::Call::send_reply { - reply_to_id, - prepaid, - .. - }) => { - if *prepaid { - <::Mailbox as Mailbox>::peek(who, reply_to_id).map( - |stored_message| { - GearVoucher::voucher_account_id(who, &stored_message.source()) - }, - ) - } else { - None - } - } - _ => None, - } - } -} - -impl pallet_gear_payment::Config for Runtime { - type ExtraFeeCallFilter = ExtraFeeFilter; - type Messenger = GearMessenger; - type DelegateFee = DelegateFeeAccountBuilder; -} - -parameter_types! { - pub const VoucherPalletId: PalletId = PalletId(*b"py/vouch"); -} - -impl pallet_gear_voucher::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type PalletId = VoucherPalletId; - type WeightInfo = weights::pallet_gear_voucher::SubstrateWeight; -} - -impl frame_system::offchain::SendTransactionTypes for Runtime -where - RuntimeCall: From, -{ - type Extrinsic = UncheckedExtrinsic; - type OverarchingCall = RuntimeCall; -} - -// Create the runtime by composing the FRAME pallets that were previously configured. -// -// # NOTE -// -// While updating the indexes, please update the indexes in `gsdk/src/metadata/mod.rs` -// as well, example: https://github.com/gear-tech/gear/pull/2370/commits/a82cb5ba365cf47aef2c42a285a1793a86e711c1 -#[cfg(feature = "dev")] -construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = runtime_primitives::Block, - UncheckedExtrinsic = UncheckedExtrinsic - { - System: frame_system = 0, - Timestamp: pallet_timestamp = 1, - Authorship: pallet_authorship = 2, - Babe: pallet_babe = 3, - Grandpa: pallet_grandpa = 4, - Balances: pallet_balances = 5, - TransactionPayment: pallet_transaction_payment = 6, - Session: pallet_session = 7, - Utility: pallet_utility = 8, - Proxy: pallet_proxy = 9, - Multisig: pallet_multisig = 10, - ValidatorSet: validator_set = 98, - Sudo: pallet_sudo = 99, - - // Gear pallets - GearProgram: pallet_gear_program = 100, - GearMessenger: pallet_gear_messenger = 101, - GearScheduler: pallet_gear_scheduler = 102, - GearGas: pallet_gear_gas = 103, - Gear: pallet_gear = 104, - GearPayment: pallet_gear_payment = 105, - GearVoucher: pallet_gear_voucher = 106, - GearBank: pallet_gear_bank = 107, - - // Only available with "dev" feature on - GearDebug: pallet_gear_debug = 199, - } -); - -#[cfg(not(feature = "dev"))] -construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = runtime_primitives::Block, - UncheckedExtrinsic = UncheckedExtrinsic - { - System: frame_system = 0, - Timestamp: pallet_timestamp = 1, - Authorship: pallet_authorship = 2, - Babe: pallet_babe = 3, - Grandpa: pallet_grandpa = 4, - Balances: pallet_balances = 5, - TransactionPayment: pallet_transaction_payment = 6, - Session: pallet_session = 7, - Utility: pallet_utility = 8, - Proxy: pallet_proxy = 9, - Multisig: pallet_multisig = 10, - ValidatorSet: validator_set = 98, - Sudo: pallet_sudo = 99, - - // Gear pallets - GearProgram: pallet_gear_program = 100, - GearMessenger: pallet_gear_messenger = 101, - GearScheduler: pallet_gear_scheduler = 102, - GearGas: pallet_gear_gas = 103, - Gear: pallet_gear = 104, - GearPayment: pallet_gear_payment = 105, - GearVoucher: pallet_gear_voucher = 106, - GearBank: pallet_gear_bank = 107, - } -); - -/// The address format for describing accounts. -pub type Address = sp_runtime::MultiAddress; -/// Block header type as expected by this runtime. -pub type Header = generic::Header; -/// Block type as expected by this runtime. -pub type Block = generic::Block; -/// 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, - CustomChargeTransactionPayment, -); -/// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = - generic::UncheckedExtrinsic; -/// The payload being signed in transactions. -pub type SignedPayload = generic::SignedPayload; -/// Executive: handles dispatch to the various modules. -pub type Executive = frame_executive::Executive< - Runtime, - Block, - frame_system::ChainContext, - Runtime, - AllPalletsWithSystem, - migrations::Migrations, ->; - -#[cfg(test)] -mod tests; - -#[cfg(feature = "dev")] -type DebugInfo = GearDebug; -#[cfg(not(feature = "dev"))] -type DebugInfo = (); - -#[cfg(feature = "runtime-benchmarks")] -#[macro_use] -extern crate frame_benchmarking; - -#[cfg(feature = "runtime-benchmarks")] -mod benches { - define_benchmarks!( - // Substrate pallets - [frame_system, SystemBench::] - [pallet_balances, Balances] - [pallet_timestamp, Timestamp] - [pallet_utility, Utility] - // Gear pallets - [pallet_gear, Gear] - [pallet_gear_voucher, GearVoucher] - ); -} - -impl_runtime_apis_plus_common! { - impl sp_consensus_babe::BabeApi for Runtime { - fn configuration() -> sp_consensus_babe::BabeConfiguration { - // The choice of `c` parameter (where `1 - c` represents the - // probability of a slot being empty), is done in accordance to the - // slot duration and expected target block time, for safely - // resisting network delays of maximum two seconds. - // - sp_consensus_babe::BabeConfiguration { - slot_duration: Babe::slot_duration(), - epoch_length: EpochDuration::get(), - c: BABE_GENESIS_EPOCH_CONFIG.c, - authorities: Babe::authorities().to_vec(), - randomness: Babe::randomness(), - allowed_slots: BABE_GENESIS_EPOCH_CONFIG.allowed_slots, - } - } - - fn current_epoch_start() -> sp_consensus_babe::Slot { - Babe::current_epoch_start() - } - - fn current_epoch() -> sp_consensus_babe::Epoch { - Babe::current_epoch() - } - - fn next_epoch() -> sp_consensus_babe::Epoch { - Babe::next_epoch() - } - - fn generate_key_ownership_proof( - _slot: sp_consensus_babe::Slot, - _authority_id: sp_consensus_babe::AuthorityId, - ) -> Option { - None - } - - fn submit_report_equivocation_unsigned_extrinsic( - equivocation_proof: sp_consensus_babe::EquivocationProof<::Header>, - key_owner_proof: sp_consensus_babe::OpaqueKeyOwnershipProof, - ) -> Option<()> { - let key_owner_proof = key_owner_proof.decode()?; - - Babe::submit_unsigned_equivocation_report( - equivocation_proof, - key_owner_proof, - ) - } - } - - #[cfg(feature = "try-runtime")] - impl frame_try_runtime::TryRuntime for Runtime { - fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { - // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to - // have a backtrace here. If any of the pre/post migration checks fail, we shall stop - // right here and right now. - 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 { - log::info!( - target: "node-runtime", - "try-runtime: executing block {:?} / root checks: {:?} / signature_checks: {:?} / try-state-select: {:?}", - block.header.hash(), - state_root_check, - signature_check, - select, - ); - // 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() - } - } - - impl pallet_gear_staking_rewards_rpc_runtime_api::GearStakingRewardsApi for Runtime { - fn inflation_info() -> pallet_gear_staking_rewards::InflationInfo { - unimplemented!(); - } - } -} diff --git a/runtime/gear/src/migrations.rs b/runtime/gear/src/migrations.rs deleted file mode 100644 index 248916f1fad..00000000000 --- a/runtime/gear/src/migrations.rs +++ /dev/null @@ -1,22 +0,0 @@ -// This file is part of Gear. - -// Copyright (C) 2021-2023 Gear Technologies Inc. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// This program 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. - -// This program 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 this program. If not, see . - -#[allow(unused)] -use crate::*; - -pub type Migrations = (); diff --git a/runtime/gear/src/tests.rs b/runtime/gear/src/tests.rs deleted file mode 100644 index c3ee466a2d6..00000000000 --- a/runtime/gear/src/tests.rs +++ /dev/null @@ -1,168 +0,0 @@ -// This file is part of Gear. - -// Copyright (C) 2021-2023 Gear Technologies Inc. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// This program 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. - -// This program 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 this program. If not, see . - -use super::*; -use crate::Runtime; -use gear_core_processor::configs::PageCosts; -use gear_lazy_pages_common::LazyPagesWeights; -use pallet_gear::{InstructionWeights, MemoryWeights}; -use runtime_common::weights::{check_instructions_weights, check_pages_weights}; - -#[test] -fn instruction_weights_heuristics_test() { - let weights = InstructionWeights::::default(); - - let expected_weights = InstructionWeights { - version: 0, - _phantom: core::marker::PhantomData, - - i64const: 150, - i64load: 11_575, - i32load: 8_000, - i64store: 29_000, - i32store: 20_000, - select: 7_100, - r#if: 8_000, - br: 3_300, - br_if: 6_000, - br_table: 10_900, - br_table_per_entry: 300, - - call: 4_900, - call_per_local: 0, - call_indirect: 22_100, - call_indirect_per_param: 2_000, - - local_get: 600, - local_set: 1_900, - local_tee: 1_500, - global_get: 2_000, - global_set: 3_000, - memory_current: 14_200, - - i64clz: 6_100, - i32clz: 6_100, - i64ctz: 6_700, - i32ctz: 6_700, - i64popcnt: 1_000, - i32popcnt: 800, - i64eqz: 4_000, - i32eqz: 2_400, - i32extend8s: 800, - i32extend16s: 800, - i64extend8s: 800, - i64extend16s: 800, - i64extend32s: 800, - i64extendsi32: 800, - i64extendui32: 400, - i32wrapi64: 200, - i64eq: 4_200, - i32eq: 2_200, - i64ne: 4_200, - i32ne: 2_200, - - i64lts: 4_000, - i32lts: 2_000, - i64ltu: 4_000, - i32ltu: 2_000, - i64gts: 4_000, - i32gts: 2_000, - i64gtu: 4_000, - i32gtu: 2_000, - i64les: 4_000, - i32les: 2_000, - i64leu: 4_000, - i32leu: 2_000, - - i64ges: 4_000, - i32ges: 2_000, - i64geu: 4_000, - i32geu: 2_000, - i64add: 2_500, - i32add: 1_000, - i64sub: 3_000, - i32sub: 1_000, - i64mul: 4_000, - i32mul: 2_300, - i64divs: 4_800, - i32divs: 3_800, - - i64divu: 5_200, - i32divu: 4_200, - i64rems: 21_100, - i32rems: 15_100, - i64remu: 4_300, - i32remu: 4_300, - i64and: 3_000, - i32and: 1_000, - i64or: 3_000, - i32or: 1_000, - i64xor: 3_000, - i32xor: 1_000, - - i64shl: 2_500, - i32shl: 1_000, - i64shrs: 2_500, - i32shrs: 1_000, - i64shru: 2_500, - i32shru: 1_000, - i64rotl: 2_000, - i32rotl: 1_000, - i64rotr: 2_500, - i32rotr: 1_000, - }; - - check_instructions_weights(weights, expected_weights); -} - -#[test] -fn page_costs_heuristic_test() { - let page_costs: PageCosts = MemoryWeights::::default().into(); - let lazy_pages_weights: LazyPagesWeights = page_costs.lazy_pages_weights(); - - let expected_pages_costs = PageCosts { - lazy_pages_signal_read: 28_000_000.into(), - lazy_pages_signal_write: 33_000_000.into(), - lazy_pages_signal_write_after_read: 9_500_000.into(), - lazy_pages_host_func_read: 29_000_000.into(), - lazy_pages_host_func_write: 33_000_000.into(), - lazy_pages_host_func_write_after_read: 10_700_000.into(), - load_page_data: 9_700_000.into(), - upload_page_data: 104_000_000.into(), - static_page: 100.into(), - mem_grow: 906_170.into(), - parachain_load_heuristic: 0.into(), - }; - - let expected_lazy_pages_weights = LazyPagesWeights { - signal_read: 28_000_000.into(), - signal_write: 138_000_000.into(), - signal_write_after_read: 112_000_000.into(), - host_func_read: 29_000_000.into(), - host_func_write: 137_000_000.into(), - host_func_write_after_read: 112_000_000.into(), - load_page_storage_data: 9_700_000.into(), - }; - - check_pages_weights( - page_costs, - expected_pages_costs, - lazy_pages_weights, - expected_lazy_pages_weights, - ); -} diff --git a/runtime/gear/src/weights/frame_system.rs b/runtime/gear/src/weights/frame_system.rs deleted file mode 100644 index 3cd2ae74282..00000000000 --- a/runtime/gear/src/weights/frame_system.rs +++ /dev/null @@ -1,183 +0,0 @@ -// This file is part of Gear. - -// Copyright (C) 2022-2023 Gear Technologies Inc. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// This program 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. - -// This program 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 this program. If not, see . - -//! Autogenerated weights for frame_system -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("gear-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/gear benchmark pallet --chain=gear-dev --steps=50 --repeat=20 --pallet=frame_system --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./scripts/benchmarking/weights-output/frame_system.rs --template=.maintain/frame-weight-template.hbs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(clippy::unnecessary_cast)] - -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; -use sp_std::marker::PhantomData; - -/// Weight functions needed for frame_system. -pub trait WeightInfo { - fn remark(b: u32, ) -> Weight; - fn remark_with_event(b: u32, ) -> Weight; - fn set_heap_pages() -> Weight; - fn set_storage(i: u32, ) -> Weight; - fn kill_storage(i: u32, ) -> Weight; - fn kill_prefix(p: u32, ) -> Weight; -} - -/// Weights for frame_system using the Gear node and recommended hardware. -pub struct SubstrateWeight(PhantomData); -impl frame_system::WeightInfo for SubstrateWeight { - /// The range of component `b` is `[0, 1310720]`. - fn remark(b: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_718_000 picoseconds. - Weight::from_parts(1_167_483, 0) - // Standard Error: 0 - .saturating_add(Weight::from_parts(460, 0).saturating_mul(b.into())) - } - /// The range of component `b` is `[0, 1310720]`. - fn remark_with_event(b: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 6_244_000 picoseconds. - Weight::from_parts(6_378_000, 0) - // Standard Error: 0 - .saturating_add(Weight::from_parts(1_432, 0).saturating_mul(b.into())) - } - fn set_heap_pages() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `1485` - // Minimum execution time: 3_227_000 picoseconds. - Weight::from_parts(3_417_000, 1485) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) - } - /// 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_736_000 picoseconds. - Weight::from_parts(1_802_000, 0) - // Standard Error: 891 - .saturating_add(Weight::from_parts(687_558, 0).saturating_mul(i.into())) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) - } - /// 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_660_000 picoseconds. - Weight::from_parts(1_742_000, 0) - // Standard Error: 793 - .saturating_add(Weight::from_parts(525_505, 0).saturating_mul(i.into())) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) - } - /// The range of component `p` is `[0, 1000]`. - fn kill_prefix(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `70 + p * (69 ±0)` - // Estimated: `73 + p * (70 ±0)` - // Minimum execution time: 3_380_000 picoseconds. - Weight::from_parts(3_486_000, 73) - // Standard Error: 1_481 - .saturating_add(Weight::from_parts(1_131_430, 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())) - } -} - -// For backwards compatibility and tests -impl WeightInfo for () { - /// The range of component `b` is `[0, 1310720]`. - fn remark(b: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_718_000 picoseconds. - Weight::from_parts(1_167_483, 0) - // Standard Error: 0 - .saturating_add(Weight::from_parts(460, 0).saturating_mul(b.into())) - } - /// The range of component `b` is `[0, 1310720]`. - fn remark_with_event(b: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 6_244_000 picoseconds. - Weight::from_parts(6_378_000, 0) - // Standard Error: 0 - .saturating_add(Weight::from_parts(1_432, 0).saturating_mul(b.into())) - } - fn set_heap_pages() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `1485` - // Minimum execution time: 3_227_000 picoseconds. - Weight::from_parts(3_417_000, 1485) - .saturating_add(RocksDbWeight::get().reads(1_u64)) - .saturating_add(RocksDbWeight::get().writes(2_u64)) - } - /// 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_736_000 picoseconds. - Weight::from_parts(1_802_000, 0) - // Standard Error: 891 - .saturating_add(Weight::from_parts(687_558, 0).saturating_mul(i.into())) - .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(i.into()))) - } - /// 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_660_000 picoseconds. - Weight::from_parts(1_742_000, 0) - // Standard Error: 793 - .saturating_add(Weight::from_parts(525_505, 0).saturating_mul(i.into())) - .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(i.into()))) - } - /// The range of component `p` is `[0, 1000]`. - fn kill_prefix(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `70 + p * (69 ±0)` - // Estimated: `73 + p * (70 ±0)` - // Minimum execution time: 3_380_000 picoseconds. - Weight::from_parts(3_486_000, 73) - // Standard Error: 1_481 - .saturating_add(Weight::from_parts(1_131_430, 0).saturating_mul(p.into())) - .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(p.into()))) - .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) - } -} diff --git a/runtime/gear/src/weights/mod.rs b/runtime/gear/src/weights/mod.rs deleted file mode 100644 index b4eebedfe52..00000000000 --- a/runtime/gear/src/weights/mod.rs +++ /dev/null @@ -1,26 +0,0 @@ -// This file is part of Gear. - -// Copyright (C) 2021-2023 Gear Technologies Inc. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// This program 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. - -// This program 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 this program. If not, see . - -//! A list of the different weight modules for our runtime. - -pub mod frame_system; -pub mod pallet_balances; -pub mod pallet_gear; -pub mod pallet_gear_voucher; -pub mod pallet_timestamp; -pub mod pallet_utility; diff --git a/runtime/gear/src/weights/pallet_balances.rs b/runtime/gear/src/weights/pallet_balances.rs deleted file mode 100644 index 7663008fa87..00000000000 --- a/runtime/gear/src/weights/pallet_balances.rs +++ /dev/null @@ -1,182 +0,0 @@ -// This file is part of Gear. - -// Copyright (C) 2022-2023 Gear Technologies Inc. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// This program 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. - -// This program 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 this program. If not, see . - -//! Autogenerated weights for pallet_balances -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("gear-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/gear benchmark pallet --chain=gear-dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./scripts/benchmarking/weights-output/pallet_balances.rs --template=.maintain/frame-weight-template.hbs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(clippy::unnecessary_cast)] - -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; -use sp_std::marker::PhantomData; - -/// Weight functions needed for pallet_balances. -pub trait WeightInfo { - fn transfer() -> Weight; - fn transfer_keep_alive() -> Weight; - fn set_balance_creating() -> Weight; - fn set_balance_killing() -> Weight; - fn force_transfer() -> Weight; - fn transfer_all() -> Weight; - fn force_unreserve() -> Weight; -} - -/// Weights for pallet_balances using the Gear node and recommended hardware. -pub struct SubstrateWeight(PhantomData); -impl pallet_balances::WeightInfo for SubstrateWeight { - fn transfer() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `3593` - // Minimum execution time: 29_973_000 picoseconds. - Weight::from_parts(30_964_000, 3593) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } - fn transfer_keep_alive() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `3593` - // Minimum execution time: 21_364_000 picoseconds. - Weight::from_parts(21_759_000, 3593) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } - fn set_balance_creating() -> Weight { - // Proof Size summary in bytes: - // Measured: `103` - // Estimated: `3593` - // Minimum execution time: 12_571_000 picoseconds. - Weight::from_parts(12_903_000, 3593) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } - fn set_balance_killing() -> Weight { - // Proof Size summary in bytes: - // Measured: `103` - // Estimated: `3593` - // Minimum execution time: 15_846_000 picoseconds. - Weight::from_parts(16_097_000, 3593) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } - fn force_transfer() -> Weight { - // Proof Size summary in bytes: - // Measured: `103` - // Estimated: `6196` - // Minimum execution time: 31_127_000 picoseconds. - Weight::from_parts(31_645_000, 6196) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) - } - fn transfer_all() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `3593` - // Minimum execution time: 27_627_000 picoseconds. - Weight::from_parts(28_344_000, 3593) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } - fn force_unreserve() -> Weight { - // Proof Size summary in bytes: - // Measured: `103` - // Estimated: `3593` - // Minimum execution time: 12_036_000 picoseconds. - Weight::from_parts(12_609_000, 3593) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } -} - -// For backwards compatibility and tests -impl WeightInfo for () { - fn transfer() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `3593` - // Minimum execution time: 29_973_000 picoseconds. - Weight::from_parts(30_964_000, 3593) - .saturating_add(RocksDbWeight::get().reads(1_u64)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) - } - fn transfer_keep_alive() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `3593` - // Minimum execution time: 21_364_000 picoseconds. - Weight::from_parts(21_759_000, 3593) - .saturating_add(RocksDbWeight::get().reads(1_u64)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) - } - fn set_balance_creating() -> Weight { - // Proof Size summary in bytes: - // Measured: `103` - // Estimated: `3593` - // Minimum execution time: 12_571_000 picoseconds. - Weight::from_parts(12_903_000, 3593) - .saturating_add(RocksDbWeight::get().reads(1_u64)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) - } - fn set_balance_killing() -> Weight { - // Proof Size summary in bytes: - // Measured: `103` - // Estimated: `3593` - // Minimum execution time: 15_846_000 picoseconds. - Weight::from_parts(16_097_000, 3593) - .saturating_add(RocksDbWeight::get().reads(1_u64)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) - } - fn force_transfer() -> Weight { - // Proof Size summary in bytes: - // Measured: `103` - // Estimated: `6196` - // Minimum execution time: 31_127_000 picoseconds. - Weight::from_parts(31_645_000, 6196) - .saturating_add(RocksDbWeight::get().reads(2_u64)) - .saturating_add(RocksDbWeight::get().writes(2_u64)) - } - fn transfer_all() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `3593` - // Minimum execution time: 27_627_000 picoseconds. - Weight::from_parts(28_344_000, 3593) - .saturating_add(RocksDbWeight::get().reads(1_u64)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) - } - fn force_unreserve() -> Weight { - // Proof Size summary in bytes: - // Measured: `103` - // Estimated: `3593` - // Minimum execution time: 12_036_000 picoseconds. - Weight::from_parts(12_609_000, 3593) - .saturating_add(RocksDbWeight::get().reads(1_u64)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) - } -} diff --git a/runtime/gear/src/weights/pallet_gear.rs b/runtime/gear/src/weights/pallet_gear.rs deleted file mode 100644 index 92479891dbe..00000000000 --- a/runtime/gear/src/weights/pallet_gear.rs +++ /dev/null @@ -1,4183 +0,0 @@ -// This file is part of Gear. - -// Copyright (C) 2022-2023 Gear Technologies Inc. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// This program 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. - -// This program 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 this program. If not, see . - -//! Autogenerated weights for pallet_gear -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("gear-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/gear benchmark pallet --chain=gear-dev --steps=50 --repeat=20 --pallet=pallet_gear --extrinsic=alloc,alloc_in_handle,alloc_per_page,claim_value,create_program,db_read_per_kb,db_write_per_kb,free,gr_block_height,gr_block_timestamp,gr_create_program,gr_create_program_per_kb,gr_create_program_wgas,gr_create_program_wgas_per_kb,gr_debug,gr_debug_per_kb,gr_gas_available,gr_message_id,gr_pay_program_rent,gr_program_id,gr_random,gr_read,gr_read_per_kb,gr_reply_code,gr_reply_deposit,gr_reply_per_kb,gr_reply_push,gr_reply_push_input,gr_reply_push_input_per_kb,gr_reply_push_per_kb,gr_reply_to,gr_reply_wgas_per_kb,gr_reservation_reply_commit_per_kb,gr_reservation_reply_per_kb,gr_reservation_send,gr_reservation_send_commit,gr_reservation_send_per_kb,gr_reserve_gas,gr_send,gr_send_commit,gr_send_commit_wgas,gr_send_init,gr_send_input,gr_send_input_wgas,gr_send_per_kb,gr_send_push,gr_send_push_input,gr_send_push_input_per_kb,gr_send_push_per_kb,gr_send_wgas,gr_send_wgas_per_kb,gr_signal_code,gr_signal_from,gr_size,gr_source,gr_system_reserve_gas,gr_unreserve_gas,gr_value,gr_value_available,gr_wake,initial_allocation,instantiate_module_per_kb,instr_br,instr_br_if,instr_br_table,instr_br_table_per_entry,instr_call,instr_call_const,instr_call_indirect,instr_call_indirect_per_param,instr_call_per_local,instr_global_get,instr_global_set,instr_i32add,instr_i32and,instr_i32clz,instr_i32ctz,instr_i32divs,instr_i32divu,instr_i32eq,instr_i32eqz,instr_i32extend16s,instr_i32extend8s,instr_i32ges,instr_i32geu,instr_i32gts,instr_i32gtu,instr_i32les,instr_i32leu,instr_i32load,instr_i32lts,instr_i32ltu,instr_i32mul,instr_i32ne,instr_i32or,instr_i32popcnt,instr_i32rems,instr_i32remu,instr_i32rotl,instr_i32rotr,instr_i32shl,instr_i32shrs,instr_i32shru,instr_i32store,instr_i32sub,instr_i32wrapi64,instr_i32xor,instr_i64add,instr_i64and,instr_i64clz,instr_i64ctz,instr_i64divs,instr_i64divu,instr_i64eq,instr_i64eqz,instr_i64extend16s,instr_i64extend32s,instr_i64extend8s,instr_i64extendsi32,instr_i64extendui32,instr_i64ges,instr_i64geu,instr_i64gts,instr_i64gtu,instr_i64les,instr_i64leu,instr_i64load,instr_i64lts,instr_i64ltu,instr_i64mul,instr_i64ne,instr_i64or,instr_i64popcnt,instr_i64rems,instr_i64remu,instr_i64rotl,instr_i64rotr,instr_i64shl,instr_i64shrs,instr_i64shru,instr_i64store,instr_i64sub,instr_i64xor,instr_if,instr_local_get,instr_local_set,instr_local_tee,instr_memory_current,instr_select,lazy_pages_host_func_read,lazy_pages_host_func_write,lazy_pages_host_func_write_after_read,lazy_pages_load_page_storage_data,lazy_pages_signal_read,lazy_pages_signal_write,lazy_pages_signal_write_after_read,mem_grow,pay_program_rent,reinstrument_per_kb,resume_session_commit,resume_session_init,resume_session_push,send_message,send_reply,tasks_pause_program,tasks_pause_program_uninited,tasks_remove_from_mailbox,tasks_remove_from_waitlist,tasks_remove_gas_reservation,tasks_remove_resume_session,tasks_send_dispatch,tasks_send_user_message,tasks_send_user_message_to_mailbox,tasks_wake_message,tasks_wake_message_no_wake,upload_code,upload_program,gr_exec_settings --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./scripts/benchmarking/weights-output/pallet_gear.rs --template=.maintain/frame-weight-template.hbs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(clippy::unnecessary_cast)] - -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; -use sp_std::marker::PhantomData; - -/// Weight functions needed for pallet_gear. -pub trait WeightInfo { - fn gr_reply(r: u32, ) -> Weight; - fn gr_reply_wgas(r: u32, ) -> Weight; - fn gr_reply_commit(r: u32, ) -> Weight; - fn gr_reply_commit_wgas(r: u32, ) -> Weight; - fn gr_reply_input(r: u32, ) -> Weight; - fn gr_reply_input_wgas(r: u32, ) -> Weight; - fn gr_reservation_reply(r: u32, ) -> Weight; - fn gr_reservation_reply_commit(r: u32, ) -> Weight; - fn gr_exit(r: u32, ) -> Weight; - fn gr_leave(r: u32, ) -> Weight; - fn gr_wait(r: u32, ) -> Weight; - fn gr_wait_for(r: u32, ) -> Weight; - fn gr_wait_up_to(r: u32, ) -> Weight; - fn db_write_per_kb(c: u32, ) -> Weight; - fn db_read_per_kb(c: u32, ) -> Weight; - fn instantiate_module_per_kb(c: u32, ) -> Weight; - fn claim_value() -> Weight; - fn pay_program_rent() -> Weight; - fn resume_session_init() -> Weight; - fn resume_session_push(c: u32, ) -> Weight; - fn resume_session_commit(c: u32, ) -> Weight; - fn upload_code(c: u32, ) -> Weight; - fn create_program(s: u32, ) -> Weight; - fn upload_program(c: u32, s: u32, ) -> Weight; - fn send_message(p: u32, ) -> Weight; - fn send_reply(p: u32, ) -> Weight; - fn initial_allocation(q: u32, ) -> Weight; - fn alloc_in_handle(q: u32, ) -> Weight; - fn reinstrument_per_kb(c: u32, ) -> Weight; - fn alloc(r: u32, ) -> Weight; - fn alloc_per_page(p: u32, ) -> Weight; - fn free(r: u32, ) -> Weight; - fn gr_reserve_gas(r: u32, ) -> Weight; - fn gr_unreserve_gas(r: u32, ) -> Weight; - fn gr_system_reserve_gas(r: u32, ) -> Weight; - fn gr_message_id(r: u32, ) -> Weight; - fn gr_program_id(r: u32, ) -> Weight; - fn gr_source(r: u32, ) -> Weight; - fn gr_value(r: u32, ) -> Weight; - fn gr_value_available(r: u32, ) -> Weight; - fn gr_gas_available(r: u32, ) -> Weight; - fn gr_size(r: u32, ) -> Weight; - fn gr_read(r: u32, ) -> Weight; - fn gr_read_per_kb(n: u32, ) -> Weight; - fn gr_exec_settings(r: u32, ) -> Weight; - fn gr_block_height(r: u32, ) -> Weight; - fn gr_block_timestamp(r: u32, ) -> Weight; - fn gr_random(n: u32, ) -> Weight; - fn gr_reply_deposit(r: u32, ) -> Weight; - fn gr_send(r: u32, ) -> Weight; - fn gr_send_per_kb(n: u32, ) -> Weight; - fn gr_send_wgas(r: u32, ) -> Weight; - fn gr_send_wgas_per_kb(n: u32, ) -> Weight; - fn gr_send_input(r: u32, ) -> Weight; - fn gr_send_input_wgas(r: u32, ) -> Weight; - fn gr_send_init(r: u32, ) -> Weight; - fn gr_send_push(r: u32, ) -> Weight; - fn gr_send_push_per_kb(n: u32, ) -> Weight; - fn gr_send_commit(r: u32, ) -> Weight; - fn gr_send_commit_wgas(r: u32, ) -> Weight; - fn gr_reservation_send(r: u32, ) -> Weight; - fn gr_reservation_send_per_kb(n: u32, ) -> Weight; - fn gr_reservation_send_commit(r: u32, ) -> Weight; - fn gr_reply_per_kb(n: u32, ) -> Weight; - fn gr_reply_wgas_per_kb(n: u32, ) -> Weight; - fn gr_reply_push(r: u32, ) -> Weight; - fn gr_reply_push_per_kb(n: u32, ) -> Weight; - fn gr_reservation_reply_per_kb(n: u32, ) -> Weight; - fn gr_reservation_reply_commit_per_kb(n: u32, ) -> Weight; - fn gr_reply_to(r: u32, ) -> Weight; - fn gr_signal_code(r: u32, ) -> Weight; - fn gr_signal_from(r: u32, ) -> Weight; - fn gr_reply_push_input(r: u32, ) -> Weight; - fn gr_reply_push_input_per_kb(n: u32, ) -> Weight; - fn gr_send_push_input(r: u32, ) -> Weight; - fn gr_send_push_input_per_kb(n: u32, ) -> Weight; - fn gr_debug(r: u32, ) -> Weight; - fn gr_debug_per_kb(n: u32, ) -> Weight; - fn gr_reply_code(r: u32, ) -> Weight; - fn gr_wake(r: u32, ) -> Weight; - fn gr_create_program(r: u32, ) -> Weight; - fn gr_create_program_per_kb(p: u32, s: u32, ) -> Weight; - fn gr_create_program_wgas(r: u32, ) -> Weight; - fn gr_create_program_wgas_per_kb(p: u32, s: u32, ) -> Weight; - fn gr_pay_program_rent(r: u32, ) -> Weight; - fn lazy_pages_signal_read(p: u32, ) -> Weight; - fn lazy_pages_signal_write(p: u32, ) -> Weight; - fn lazy_pages_signal_write_after_read(p: u32, ) -> Weight; - fn lazy_pages_load_page_storage_data(p: u32, ) -> Weight; - fn lazy_pages_host_func_read(p: u32, ) -> Weight; - fn lazy_pages_host_func_write(p: u32, ) -> Weight; - fn lazy_pages_host_func_write_after_read(p: u32, ) -> Weight; - fn mem_grow(r: u32, ) -> Weight; - fn instr_i64load(r: u32, ) -> Weight; - fn instr_i32load(r: u32, ) -> Weight; - fn instr_i64store(r: u32, ) -> Weight; - fn instr_i32store(r: u32, ) -> Weight; - fn instr_select(r: u32, ) -> Weight; - fn instr_if(r: u32, ) -> Weight; - fn instr_br(r: u32, ) -> Weight; - fn instr_br_if(r: u32, ) -> Weight; - fn instr_br_table(r: u32, ) -> Weight; - fn instr_br_table_per_entry(e: u32, ) -> Weight; - fn instr_call_const(r: u32, ) -> Weight; - fn instr_call(r: u32, ) -> Weight; - fn instr_call_indirect(r: u32, ) -> Weight; - fn instr_call_indirect_per_param(p: u32, ) -> Weight; - fn instr_call_per_local(l: u32, ) -> Weight; - fn instr_local_get(r: u32, ) -> Weight; - fn instr_local_set(r: u32, ) -> Weight; - fn instr_local_tee(r: u32, ) -> Weight; - fn instr_global_get(r: u32, ) -> Weight; - fn instr_global_set(r: u32, ) -> Weight; - fn instr_memory_current(r: u32, ) -> Weight; - fn instr_i64clz(r: u32, ) -> Weight; - fn instr_i32clz(r: u32, ) -> Weight; - fn instr_i64ctz(r: u32, ) -> Weight; - fn instr_i32ctz(r: u32, ) -> Weight; - fn instr_i64popcnt(r: u32, ) -> Weight; - fn instr_i32popcnt(r: u32, ) -> Weight; - fn instr_i64eqz(r: u32, ) -> Weight; - fn instr_i32eqz(r: u32, ) -> Weight; - fn instr_i32extend8s(r: u32, ) -> Weight; - fn instr_i32extend16s(r: u32, ) -> Weight; - fn instr_i64extend8s(r: u32, ) -> Weight; - fn instr_i64extend16s(r: u32, ) -> Weight; - fn instr_i64extend32s(r: u32, ) -> Weight; - fn instr_i64extendsi32(r: u32, ) -> Weight; - fn instr_i64extendui32(r: u32, ) -> Weight; - fn instr_i32wrapi64(r: u32, ) -> Weight; - fn instr_i64eq(r: u32, ) -> Weight; - fn instr_i32eq(r: u32, ) -> Weight; - fn instr_i64ne(r: u32, ) -> Weight; - fn instr_i32ne(r: u32, ) -> Weight; - fn instr_i64lts(r: u32, ) -> Weight; - fn instr_i32lts(r: u32, ) -> Weight; - fn instr_i64ltu(r: u32, ) -> Weight; - fn instr_i32ltu(r: u32, ) -> Weight; - fn instr_i64gts(r: u32, ) -> Weight; - fn instr_i32gts(r: u32, ) -> Weight; - fn instr_i64gtu(r: u32, ) -> Weight; - fn instr_i32gtu(r: u32, ) -> Weight; - fn instr_i64les(r: u32, ) -> Weight; - fn instr_i32les(r: u32, ) -> Weight; - fn instr_i64leu(r: u32, ) -> Weight; - fn instr_i32leu(r: u32, ) -> Weight; - fn instr_i64ges(r: u32, ) -> Weight; - fn instr_i32ges(r: u32, ) -> Weight; - fn instr_i64geu(r: u32, ) -> Weight; - fn instr_i32geu(r: u32, ) -> Weight; - fn instr_i64add(r: u32, ) -> Weight; - fn instr_i32add(r: u32, ) -> Weight; - fn instr_i64sub(r: u32, ) -> Weight; - fn instr_i32sub(r: u32, ) -> Weight; - fn instr_i64mul(r: u32, ) -> Weight; - fn instr_i32mul(r: u32, ) -> Weight; - fn instr_i64divs(r: u32, ) -> Weight; - fn instr_i32divs(r: u32, ) -> Weight; - fn instr_i64divu(r: u32, ) -> Weight; - fn instr_i32divu(r: u32, ) -> Weight; - fn instr_i64rems(r: u32, ) -> Weight; - fn instr_i32rems(r: u32, ) -> Weight; - fn instr_i64remu(r: u32, ) -> Weight; - fn instr_i32remu(r: u32, ) -> Weight; - fn instr_i64and(r: u32, ) -> Weight; - fn instr_i32and(r: u32, ) -> Weight; - fn instr_i64or(r: u32, ) -> Weight; - fn instr_i32or(r: u32, ) -> Weight; - fn instr_i64xor(r: u32, ) -> Weight; - fn instr_i32xor(r: u32, ) -> Weight; - fn instr_i64shl(r: u32, ) -> Weight; - fn instr_i32shl(r: u32, ) -> Weight; - fn instr_i64shrs(r: u32, ) -> Weight; - fn instr_i32shrs(r: u32, ) -> Weight; - fn instr_i64shru(r: u32, ) -> Weight; - fn instr_i32shru(r: u32, ) -> Weight; - fn instr_i64rotl(r: u32, ) -> Weight; - fn instr_i32rotl(r: u32, ) -> Weight; - fn instr_i64rotr(r: u32, ) -> Weight; - fn instr_i32rotr(r: u32, ) -> Weight; - fn tasks_remove_resume_session() -> Weight; - fn tasks_remove_gas_reservation() -> Weight; - fn tasks_send_user_message_to_mailbox() -> Weight; - fn tasks_send_user_message() -> Weight; - fn tasks_send_dispatch() -> Weight; - fn tasks_wake_message() -> Weight; - fn tasks_wake_message_no_wake() -> Weight; - fn tasks_remove_from_waitlist() -> Weight; - fn tasks_remove_from_mailbox() -> Weight; - fn tasks_pause_program(c: u32, ) -> Weight; - fn tasks_pause_program_uninited(c: u32, ) -> Weight; - fn allocation_cost() -> Weight; - fn grow_cost() -> Weight; - fn initial_cost() -> Weight; - fn load_cost() -> Weight; - fn instr_i64const(r: u32, ) -> Weight; -} - -/// Weights for pallet_gear using the Gear node and recommended hardware. -pub struct SubstrateWeight(PhantomData); -impl pallet_gear::WeightInfo for SubstrateWeight { - /// The range of component `r` is `[0, 1]`. - fn gr_reply(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 94_792_000 picoseconds. - Weight::from_parts(103_063_604, 0) - // Standard Error: 103_375 - .saturating_add(Weight::from_parts(18_929_072, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_reply_wgas(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 96_154_000 picoseconds. - Weight::from_parts(107_249_232, 0) - // Standard Error: 99_969 - .saturating_add(Weight::from_parts(19_062_846, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_reply_commit(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 98_701_000 picoseconds. - Weight::from_parts(109_478_842, 0) - // Standard Error: 104_175 - .saturating_add(Weight::from_parts(10_887_124, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_reply_commit_wgas(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 102_910_000 picoseconds. - Weight::from_parts(109_181_566, 0) - // Standard Error: 81_801 - .saturating_add(Weight::from_parts(12_077_508, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_reply_input(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 719_481_000 picoseconds. - Weight::from_parts(765_485_196, 0) - // Standard Error: 676_170 - .saturating_add(Weight::from_parts(17_778_524, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_reply_input_wgas(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 720_914_000 picoseconds. - Weight::from_parts(776_554_516, 0) - // Standard Error: 1_018_495 - .saturating_add(Weight::from_parts(38_306_948, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_reservation_reply(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 105_823_000 picoseconds. - Weight::from_parts(112_820_586, 0) - // Standard Error: 82_530 - .saturating_add(Weight::from_parts(14_370_506, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_reservation_reply_commit(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 102_415_000 picoseconds. - Weight::from_parts(110_005_402, 0) - // Standard Error: 87_514 - .saturating_add(Weight::from_parts(6_578_880, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_exit(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 96_593_000 picoseconds. - Weight::from_parts(104_873_732, 0) - // Standard Error: 2_095_391 - .saturating_add(Weight::from_parts(193_359_282, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_leave(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 93_619_000 picoseconds. - Weight::from_parts(99_623_244, 0) - // Standard Error: 1_945_328 - .saturating_add(Weight::from_parts(179_784_494, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_wait(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 92_936_000 picoseconds. - Weight::from_parts(100_139_452, 0) - // Standard Error: 1_753_555 - .saturating_add(Weight::from_parts(132_465_876, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_wait_for(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 93_955_000 picoseconds. - Weight::from_parts(100_650_632, 0) - // Standard Error: 2_018_388 - .saturating_add(Weight::from_parts(178_916_382, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_wait_up_to(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 95_467_000 picoseconds. - Weight::from_parts(102_532_790, 0) - // Standard Error: 2_065_180 - .saturating_add(Weight::from_parts(187_152_790, 0).saturating_mul(r.into())) - } - fn allocation_cost() -> Weight { - // To be changed with the proper value. - T::DbWeight::get().writes(1) - } - fn grow_cost() -> Weight { - // To be changed with the proper value. - T::DbWeight::get().writes(1) - } - fn initial_cost() -> Weight { - T::DbWeight::get().writes(1) - } - fn load_cost() -> Weight { - T::DbWeight::get().reads(1) - } - /// The range of component `c` is `[0, 512]`. - fn db_write_per_kb(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_040_000 picoseconds. - Weight::from_parts(1_087_000, 0) - // Standard Error: 940 - .saturating_add(Weight::from_parts(251_751, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } - /// The range of component `c` is `[0, 512]`. - fn db_read_per_kb(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `79 + c * (1024 ±0)` - // Estimated: `3543 + c * (1024 ±0)` - // Minimum execution time: 3_333_000 picoseconds. - Weight::from_parts(3_463_000, 3543) - // Standard Error: 966 - .saturating_add(Weight::from_parts(678_430, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(Weight::from_parts(0, 1024).saturating_mul(c.into())) - } - /// The range of component `c` is `[0, 512]`. - fn instantiate_module_per_kb(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 61_586_000 picoseconds. - Weight::from_parts(95_956_778, 0) - // Standard Error: 5_472 - .saturating_add(Weight::from_parts(2_353_352, 0).saturating_mul(c.into())) - } - fn claim_value() -> Weight { - // Proof Size summary in bytes: - // Measured: `1304` - // Estimated: `51293` - // Minimum execution time: 105_420_000 picoseconds. - Weight::from_parts(109_120_000, 51293) - .saturating_add(T::DbWeight::get().reads(15_u64)) - .saturating_add(T::DbWeight::get().writes(12_u64)) - } - fn pay_program_rent() -> Weight { - // Proof Size summary in bytes: - // Measured: `923` - // Estimated: `21372` - // Minimum execution time: 54_290_000 picoseconds. - Weight::from_parts(55_929_000, 21372) - .saturating_add(T::DbWeight::get().reads(7_u64)) - .saturating_add(T::DbWeight::get().writes(6_u64)) - } - fn resume_session_init() -> Weight { - // Proof Size summary in bytes: - // Measured: `570` - // Estimated: `17214` - // Minimum execution time: 29_539_000 picoseconds. - Weight::from_parts(30_515_000, 17214) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) - } - /// The range of component `c` is `[0, 64]`. - fn resume_session_push(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `355` - // Estimated: `7640` - // Minimum execution time: 8_426_000 picoseconds. - Weight::from_parts(5_984_423, 7640) - // Standard Error: 33_789 - .saturating_add(Weight::from_parts(13_895_151, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) - } - /// The range of component `c` is `[0, 2044]`. - fn resume_session_commit(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `1457 + c * (16389 ±0)` - // Estimated: `42178 + c * (131112 ±0)` - // Minimum execution time: 71_198_000 picoseconds. - Weight::from_parts(72_033_000, 42178) - // Standard Error: 159_543 - .saturating_add(Weight::from_parts(54_764_270, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(11_u64)) - .saturating_add(T::DbWeight::get().writes(9_u64)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_parts(0, 131112).saturating_mul(c.into())) - } - /// The range of component `c` is `[0, 250]`. - fn upload_code(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `46` - // Estimated: `5134` - // Minimum execution time: 77_259_000 picoseconds. - Weight::from_parts(52_968_469, 5134) - // Standard Error: 43_186 - .saturating_add(Weight::from_parts(59_988_588, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) - } - /// The range of component `s` is `[0, 4194304]`. - fn create_program(s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `1043` - // Estimated: `49852` - // Minimum execution time: 96_734_000 picoseconds. - Weight::from_parts(136_364_170, 49852) - // Standard Error: 0 - .saturating_add(Weight::from_parts(2_592, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(15_u64)) - .saturating_add(T::DbWeight::get().writes(12_u64)) - } - /// The range of component `c` is `[0, 250]`. - /// The range of component `s` is `[0, 4194304]`. - fn upload_program(c: u32, s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `453` - // Estimated: `44268` - // Minimum execution time: 11_047_048_000 picoseconds. - Weight::from_parts(211_012_859, 44268) - // Standard Error: 157_221 - .saturating_add(Weight::from_parts(59_860_835, 0).saturating_mul(c.into())) - // Standard Error: 9 - .saturating_add(Weight::from_parts(2_554, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(15_u64)) - .saturating_add(T::DbWeight::get().writes(16_u64)) - } - /// The range of component `p` is `[0, 2097152]`. - fn send_message(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `530` - // Estimated: `31259` - // Minimum execution time: 73_682_000 picoseconds. - Weight::from_parts(48_414_295, 31259) - // Standard Error: 1 - .saturating_add(Weight::from_parts(1_040, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(11_u64)) - .saturating_add(T::DbWeight::get().writes(10_u64)) - } - /// The range of component `p` is `[0, 2097152]`. - fn send_reply(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `1303` - // Estimated: `53823` - // Minimum execution time: 122_837_000 picoseconds. - Weight::from_parts(97_209_014, 53823) - // Standard Error: 1 - .saturating_add(Weight::from_parts(1_068, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(16_u64)) - .saturating_add(T::DbWeight::get().writes(13_u64)) - } - /// The range of component `q` is `[1, 512]`. - fn initial_allocation(_q: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `979` - // Estimated: `89393` - // Minimum execution time: 354_207_000 picoseconds. - Weight::from_parts(374_297_966, 89393) - .saturating_add(T::DbWeight::get().reads(31_u64)) - .saturating_add(T::DbWeight::get().writes(24_u64)) - } - /// The range of component `q` is `[0, 512]`. - fn alloc_in_handle(q: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `979` - // Estimated: `89133` - // Minimum execution time: 368_424_000 picoseconds. - Weight::from_parts(387_073_481, 89133) - // Standard Error: 1_472 - .saturating_add(Weight::from_parts(4_343, 0).saturating_mul(q.into())) - .saturating_add(T::DbWeight::get().reads(31_u64)) - .saturating_add(T::DbWeight::get().writes(24_u64)) - } - /// The range of component `c` is `[0, 512]`. - fn reinstrument_per_kb(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `211 + c * (1075 ±0)` - // Estimated: `3899 + c * (2150 ±0)` - // Minimum execution time: 58_209_000 picoseconds. - Weight::from_parts(58_498_000, 3899) - // Standard Error: 35_860 - .saturating_add(Weight::from_parts(58_109_594, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) - .saturating_add(Weight::from_parts(0, 2150).saturating_mul(c.into())) - } - /// The range of component `r` is `[0, 20]`. - fn alloc(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 92_645_000 picoseconds. - Weight::from_parts(95_763_000, 0) - // Standard Error: 3_691_564 - .saturating_add(Weight::from_parts(713_537_659, 0).saturating_mul(r.into())) - } - /// The range of component `p` is `[1, 512]`. - fn alloc_per_page(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 495_006_000 picoseconds. - Weight::from_parts(421_459_793, 0) - // Standard Error: 9_156 - .saturating_add(Weight::from_parts(29_070_022, 0).saturating_mul(p.into())) - } - /// The range of component `r` is `[0, 20]`. - fn free(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 219_414_000 picoseconds. - Weight::from_parts(206_118_379, 0) - // Standard Error: 320_555 - .saturating_add(Weight::from_parts(64_665_141, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 256]`. - fn gr_reserve_gas(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 96_871_000 picoseconds. - Weight::from_parts(104_318_392, 0) - // Standard Error: 4_224 - .saturating_add(Weight::from_parts(2_443_618, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 256]`. - fn gr_unreserve_gas(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 152_658_000 picoseconds. - Weight::from_parts(218_177_774, 0) - // Standard Error: 23_640 - .saturating_add(Weight::from_parts(2_186_094, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_system_reserve_gas(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 97_532_000 picoseconds. - Weight::from_parts(112_244_990, 0) - // Standard Error: 370_435 - .saturating_add(Weight::from_parts(102_977_688, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_message_id(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 95_116_000 picoseconds. - Weight::from_parts(85_754_801, 0) - // Standard Error: 322_936 - .saturating_add(Weight::from_parts(85_646_040, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_program_id(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 97_226_000 picoseconds. - Weight::from_parts(96_400_189, 0) - // Standard Error: 308_975 - .saturating_add(Weight::from_parts(84_400_658, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_source(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 96_667_000 picoseconds. - Weight::from_parts(95_221_535, 0) - // Standard Error: 320_528 - .saturating_add(Weight::from_parts(85_320_330, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_value(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 96_400_000 picoseconds. - Weight::from_parts(83_830_464, 0) - // Standard Error: 333_677 - .saturating_add(Weight::from_parts(86_153_462, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_value_available(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 98_322_000 picoseconds. - Weight::from_parts(88_780_011, 0) - // Standard Error: 365_736 - .saturating_add(Weight::from_parts(86_373_607, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_gas_available(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 94_234_000 picoseconds. - Weight::from_parts(93_394_916, 0) - // Standard Error: 310_495 - .saturating_add(Weight::from_parts(85_678_300, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_size(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 95_316_000 picoseconds. - Weight::from_parts(88_012_950, 0) - // Standard Error: 309_598 - .saturating_add(Weight::from_parts(85_813_369, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_read(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 715_150_000 picoseconds. - Weight::from_parts(769_593_524, 0) - // Standard Error: 493_525 - .saturating_add(Weight::from_parts(140_935_499, 0).saturating_mul(r.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_read_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 844_162_000 picoseconds. - Weight::from_parts(851_053_000, 0) - // Standard Error: 50_294 - .saturating_add(Weight::from_parts(13_068_816, 0).saturating_mul(n.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_exec_settings(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 221_823_000 picoseconds. - Weight::from_parts(924_157_395, 0) - // Standard Error: 3_073_388 - .saturating_add(Weight::from_parts(143_835_127, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_block_height(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 94_243_000 picoseconds. - Weight::from_parts(87_583_955, 0) - // Standard Error: 343_578 - .saturating_add(Weight::from_parts(84_267_053, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_block_timestamp(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 95_559_000 picoseconds. - Weight::from_parts(92_460_596, 0) - // Standard Error: 340_344 - .saturating_add(Weight::from_parts(85_006_110, 0).saturating_mul(r.into())) - } - /// The range of component `n` is `[0, 20]`. - fn gr_random(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 95_023_000 picoseconds. - Weight::from_parts(113_045_564, 0) - // Standard Error: 350_542 - .saturating_add(Weight::from_parts(169_289_972, 0).saturating_mul(n.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_reply_deposit(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 95_407_000 picoseconds. - Weight::from_parts(99_094_000, 0) - // Standard Error: 3_585_438 - .saturating_add(Weight::from_parts(776_362_449, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_send(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 96_709_000 picoseconds. - Weight::from_parts(153_262_764, 0) - // Standard Error: 391_637 - .saturating_add(Weight::from_parts(256_389_022, 0).saturating_mul(r.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_send_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 341_633_000 picoseconds. - Weight::from_parts(345_693_000, 0) - // Standard Error: 61_029 - .saturating_add(Weight::from_parts(21_298_548, 0).saturating_mul(n.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_send_wgas(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 97_817_000 picoseconds. - Weight::from_parts(172_033_153, 0) - // Standard Error: 412_230 - .saturating_add(Weight::from_parts(260_826_119, 0).saturating_mul(r.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_send_wgas_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 353_433_000 picoseconds. - Weight::from_parts(359_185_000, 0) - // Standard Error: 60_153 - .saturating_add(Weight::from_parts(21_224_949, 0).saturating_mul(n.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_send_input(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 716_180_000 picoseconds. - Weight::from_parts(782_890_839, 0) - // Standard Error: 547_225 - .saturating_add(Weight::from_parts(273_570_636, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_send_input_wgas(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 719_827_000 picoseconds. - Weight::from_parts(805_763_844, 0) - // Standard Error: 503_245 - .saturating_add(Weight::from_parts(278_200_889, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_send_init(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 96_518_000 picoseconds. - Weight::from_parts(82_218_173, 0) - // Standard Error: 358_867 - .saturating_add(Weight::from_parts(92_408_337, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_send_push(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_829_368_000 picoseconds. - Weight::from_parts(1_976_758_302, 0) - // Standard Error: 349_703 - .saturating_add(Weight::from_parts(163_038_781, 0).saturating_mul(r.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_send_push_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 315_829_000 picoseconds. - Weight::from_parts(318_464_000, 0) - // Standard Error: 54_637 - .saturating_add(Weight::from_parts(31_280_567, 0).saturating_mul(n.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_send_commit(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_818_937_000 picoseconds. - Weight::from_parts(1_941_969_566, 0) - // Standard Error: 412_244 - .saturating_add(Weight::from_parts(220_650_756, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_send_commit_wgas(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_815_762_000 picoseconds. - Weight::from_parts(1_958_182_203, 0) - // Standard Error: 374_381 - .saturating_add(Weight::from_parts(229_106_637, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_reservation_send(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 259_040_000 picoseconds. - Weight::from_parts(345_586_401, 0) - // Standard Error: 402_258 - .saturating_add(Weight::from_parts(274_866_021, 0).saturating_mul(r.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_reservation_send_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 523_014_000 picoseconds. - Weight::from_parts(525_681_000, 0) - // Standard Error: 56_470 - .saturating_add(Weight::from_parts(21_443_571, 0).saturating_mul(n.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_reservation_send_commit(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_967_181_000 picoseconds. - Weight::from_parts(2_076_078_781, 0) - // Standard Error: 455_370 - .saturating_add(Weight::from_parts(246_494_683, 0).saturating_mul(r.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_reply_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 114_790_000 picoseconds. - Weight::from_parts(106_908_278, 0) - // Standard Error: 1_274 - .saturating_add(Weight::from_parts(430_785, 0).saturating_mul(n.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_reply_wgas_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 115_541_000 picoseconds. - Weight::from_parts(101_956_035, 0) - // Standard Error: 3_603 - .saturating_add(Weight::from_parts(442_387, 0).saturating_mul(n.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_reply_push(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 94_082_000 picoseconds. - Weight::from_parts(138_243_307, 0) - // Standard Error: 409_163 - .saturating_add(Weight::from_parts(154_758_505, 0).saturating_mul(r.into())) - } - /// The range of component `n` is `[0, 8192]`. - fn gr_reply_push_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 111_536_000 picoseconds. - Weight::from_parts(114_497_000, 0) - // Standard Error: 2_599 - .saturating_add(Weight::from_parts(656_994, 0).saturating_mul(n.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_reservation_reply_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 114_322_000 picoseconds. - Weight::from_parts(113_131_028, 0) - // Standard Error: 3_727 - .saturating_add(Weight::from_parts(436_168, 0).saturating_mul(n.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_reservation_reply_commit_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 117_751_000 picoseconds. - Weight::from_parts(161_418_174, 0) - // Standard Error: 6_635 - .saturating_add(Weight::from_parts(405_229, 0).saturating_mul(n.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_reply_to(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 93_524_000 picoseconds. - Weight::from_parts(89_332_032, 0) - // Standard Error: 294_566 - .saturating_add(Weight::from_parts(86_798_759, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_signal_code(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 95_216_000 picoseconds. - Weight::from_parts(83_424_786, 0) - // Standard Error: 316_301 - .saturating_add(Weight::from_parts(84_774_296, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_signal_from(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 96_461_000 picoseconds. - Weight::from_parts(97_636_300, 0) - // Standard Error: 278_297 - .saturating_add(Weight::from_parts(86_743_159, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_reply_push_input(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 724_902_000 picoseconds. - Weight::from_parts(784_128_285, 0) - // Standard Error: 444_406 - .saturating_add(Weight::from_parts(105_223_470, 0).saturating_mul(r.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_reply_push_input_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 737_666_000 picoseconds. - Weight::from_parts(758_797_216, 0) - // Standard Error: 1_260 - .saturating_add(Weight::from_parts(154_837, 0).saturating_mul(n.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_send_push_input(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_498_871_000 picoseconds. - Weight::from_parts(2_688_516_696, 0) - // Standard Error: 531_545 - .saturating_add(Weight::from_parts(131_060_314, 0).saturating_mul(r.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_send_push_input_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_657_855_000 picoseconds. - Weight::from_parts(2_746_003_287, 0) - // Standard Error: 12_743 - .saturating_add(Weight::from_parts(13_716_214, 0).saturating_mul(n.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_debug(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 96_990_000 picoseconds. - Weight::from_parts(110_812_744, 0) - // Standard Error: 347_035 - .saturating_add(Weight::from_parts(120_462_128, 0).saturating_mul(r.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_debug_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 170_244_000 picoseconds. - Weight::from_parts(175_502_000, 0) - // Standard Error: 56_203 - .saturating_add(Weight::from_parts(25_870_902, 0).saturating_mul(n.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_reply_code(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 97_676_000 picoseconds. - Weight::from_parts(91_226_383, 0) - // Standard Error: 320_296 - .saturating_add(Weight::from_parts(82_761_490, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_wake(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 149_319_000 picoseconds. - Weight::from_parts(230_971_562, 0) - // Standard Error: 338_138 - .saturating_add(Weight::from_parts(157_262_608, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_create_program(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 108_167_000 picoseconds. - Weight::from_parts(178_994_489, 0) - // Standard Error: 404_012 - .saturating_add(Weight::from_parts(348_487_075, 0).saturating_mul(r.into())) - } - /// The range of component `p` is `[0, 2048]`. - /// The range of component `s` is `[1, 2048]`. - fn gr_create_program_per_kb(p: u32, s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 43_645_119_000 picoseconds. - Weight::from_parts(43_811_648_000, 0) - // Standard Error: 262_276 - .saturating_add(Weight::from_parts(7_776_587, 0).saturating_mul(p.into())) - // Standard Error: 262_263 - .saturating_add(Weight::from_parts(178_958_075, 0).saturating_mul(s.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_create_program_wgas(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 104_639_000 picoseconds. - Weight::from_parts(169_517_206, 0) - // Standard Error: 363_225 - .saturating_add(Weight::from_parts(357_078_703, 0).saturating_mul(r.into())) - } - /// The range of component `p` is `[0, 2048]`. - /// The range of component `s` is `[1, 2048]`. - fn gr_create_program_wgas_per_kb(p: u32, s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 46_491_851_000 picoseconds. - Weight::from_parts(46_603_783_000, 0) - // Standard Error: 280_431 - .saturating_add(Weight::from_parts(7_250_257, 0).saturating_mul(p.into())) - // Standard Error: 280_417 - .saturating_add(Weight::from_parts(177_722_888, 0).saturating_mul(s.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_pay_program_rent(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 95_721_000 picoseconds. - Weight::from_parts(114_995_832, 0) - // Standard Error: 36_809 - .saturating_add(Weight::from_parts(1_873_016, 0).saturating_mul(r.into())) - } - /// The range of component `p` is `[0, 512]`. - fn lazy_pages_signal_read(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `141` - // Estimated: `1131 + p * (9900 ±0)` - // Minimum execution time: 97_655_000 picoseconds. - Weight::from_parts(138_058_498, 1131) - // Standard Error: 18_813 - .saturating_add(Weight::from_parts(16_311_194, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 9900).saturating_mul(p.into())) - } - /// The range of component `p` is `[0, 512]`. - fn lazy_pages_signal_write(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `141` - // Estimated: `1131 + p * (9900 ±0)` - // Minimum execution time: 96_083_000 picoseconds. - Weight::from_parts(98_597_000, 1131) - // Standard Error: 43_515 - .saturating_add(Weight::from_parts(42_632_421, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 9900).saturating_mul(p.into())) - } - /// The range of component `p` is `[0, 512]`. - fn lazy_pages_signal_write_after_read(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `141` - // Estimated: `5069931` - // Minimum execution time: 8_196_422_000 picoseconds. - Weight::from_parts(8_474_214_520, 5069931) - // Standard Error: 71_564 - .saturating_add(Weight::from_parts(41_738_666, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(2048_u64)) - } - /// The range of component `p` is `[0, 512]`. - fn lazy_pages_load_page_storage_data(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `1813 + p * (65580 ±0)` - // Estimated: `1939 + p * (75482 ±0)` - // Minimum execution time: 93_446_000 picoseconds. - Weight::from_parts(96_664_000, 1939) - // Standard Error: 46_722 - .saturating_add(Weight::from_parts(55_567_620, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 75482).saturating_mul(p.into())) - } - /// The range of component `p` is `[0, 32]`. - fn lazy_pages_host_func_read(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `141` - // Estimated: `1131 + p * (9900 ±0)` - // Minimum execution time: 106_137_000 picoseconds. - Weight::from_parts(107_751_954, 1131) - // Standard Error: 71_200 - .saturating_add(Weight::from_parts(41_236_505, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 9900).saturating_mul(p.into())) - } - /// The range of component `p` is `[0, 32]`. - fn lazy_pages_host_func_write(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `141` - // Estimated: `1496 + p * (9883 ±2)` - // Minimum execution time: 758_237_000 picoseconds. - Weight::from_parts(760_351_083, 1496) - // Standard Error: 319_479 - .saturating_add(Weight::from_parts(53_277_303, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 9883).saturating_mul(p.into())) - } - /// The range of component `p` is `[0, 32]`. - fn lazy_pages_host_func_write_after_read(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `141` - // Estimated: `317931` - // Minimum execution time: 1_299_071_000 picoseconds. - Weight::from_parts(1_320_542_278, 317931) - // Standard Error: 364_770 - .saturating_add(Weight::from_parts(53_225_083, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(128_u64)) - } - /// The range of component `r` is `[0, 20]`. - fn mem_grow(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_118_000 picoseconds. - Weight::from_parts(7_418_987, 0) - // Standard Error: 299_976 - .saturating_add(Weight::from_parts(77_036_564, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[50, 500]`. - fn instr_i64load(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_461_228_000 picoseconds. - Weight::from_parts(4_172_544_233, 0) - // Standard Error: 108_717 - .saturating_add(Weight::from_parts(5_492_504, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[50, 500]`. - fn instr_i32load(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_440_105_000 picoseconds. - Weight::from_parts(4_189_326_223, 0) - // Standard Error: 94_884 - .saturating_add(Weight::from_parts(5_283_060, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[50, 500]`. - fn instr_i64store(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 11_389_557_000 picoseconds. - Weight::from_parts(11_860_510_711, 0) - // Standard Error: 156_021 - .saturating_add(Weight::from_parts(9_199_358, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[50, 500]`. - fn instr_i32store(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 11_497_103_000 picoseconds. - Weight::from_parts(11_330_880_436, 0) - // Standard Error: 132_247 - .saturating_add(Weight::from_parts(10_016_516, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_select(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_381_000 picoseconds. - Weight::from_parts(2_444_000, 0) - // Standard Error: 7_402 - .saturating_add(Weight::from_parts(3_876_295, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_if(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_405_000 picoseconds. - Weight::from_parts(481_308, 0) - // Standard Error: 8_161 - .saturating_add(Weight::from_parts(3_159_957, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_br(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_371_000 picoseconds. - Weight::from_parts(3_249_787, 0) - // Standard Error: 1_586 - .saturating_add(Weight::from_parts(1_582_965, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_br_if(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_216_000 picoseconds. - Weight::from_parts(2_300_000, 0) - // Standard Error: 6_757 - .saturating_add(Weight::from_parts(2_971_649, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_br_table(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_259_000 picoseconds. - Weight::from_parts(2_872_259, 0) - // Standard Error: 19_834 - .saturating_add(Weight::from_parts(5_176_111, 0).saturating_mul(r.into())) - } - /// The range of component `e` is `[1, 256]`. - fn instr_br_table_per_entry(e: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 6_999_000 picoseconds. - Weight::from_parts(6_015_140, 0) - // Standard Error: 1_903 - .saturating_add(Weight::from_parts(170_143, 0).saturating_mul(e.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_call_const(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_308_000 picoseconds. - Weight::from_parts(5_881_148, 0) - // Standard Error: 9_069 - .saturating_add(Weight::from_parts(2_574_099, 0).saturating_mul(r.into())) - } - fn instr_i64const(r: u32, ) -> Weight { - Weight::from_parts(0, 0) - .saturating_add(Weight::from_parts(2_574_099 - - 2_423_093, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_call(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_337_000 picoseconds. - Weight::from_parts(5_123_036, 0) - // Standard Error: 12_143 - .saturating_add(Weight::from_parts(2_423_093, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_call_indirect(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_736_000 picoseconds. - Weight::from_parts(16_600_828, 0) - // Standard Error: 30_025 - .saturating_add(Weight::from_parts(10_214_913, 0).saturating_mul(r.into())) - } - /// The range of component `p` is `[0, 128]`. - fn instr_call_indirect_per_param(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 12_483_000 picoseconds. - Weight::from_parts(1_416_669, 0) - // Standard Error: 5_995 - .saturating_add(Weight::from_parts(1_336_453, 0).saturating_mul(p.into())) - } - /// The range of component `l` is `[0, 1024]`. - fn instr_call_per_local(_l: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 5_497_000 picoseconds. - Weight::from_parts(5_981_231, 0) - } - /// The range of component `r` is `[0, 50]`. - fn instr_local_get(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_730_000 picoseconds. - Weight::from_parts(5_851_529, 0) - // Standard Error: 2_642 - .saturating_add(Weight::from_parts(392_869, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_local_set(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_837_000 picoseconds. - Weight::from_parts(4_473_635, 0) - // Standard Error: 5_210 - .saturating_add(Weight::from_parts(1_003_312, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_local_tee(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_802_000 picoseconds. - Weight::from_parts(2_153_776, 0) - // Standard Error: 11_517 - .saturating_add(Weight::from_parts(1_186_032, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_global_get(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 6_375_000 picoseconds. - Weight::from_parts(3_754_449, 0) - // Standard Error: 5_686 - .saturating_add(Weight::from_parts(763_597, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_global_set(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 6_475_000 picoseconds. - Weight::from_parts(266_670, 0) - // Standard Error: 10_193 - .saturating_add(Weight::from_parts(1_552_777, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_memory_current(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 6_887_000 picoseconds. - Weight::from_parts(4_333_544, 0) - // Standard Error: 10_173 - .saturating_add(Weight::from_parts(6_952_830, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64clz(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_267_000 picoseconds. - Weight::from_parts(2_351_000, 0) - // Standard Error: 5_280 - .saturating_add(Weight::from_parts(3_360_413, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32clz(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_283_000 picoseconds. - Weight::from_parts(2_357_000, 0) - // Standard Error: 4_452 - .saturating_add(Weight::from_parts(3_099_489, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64ctz(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_328_000 picoseconds. - Weight::from_parts(2_417_000, 0) - // Standard Error: 5_054 - .saturating_add(Weight::from_parts(3_106_996, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32ctz(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_230_000 picoseconds. - Weight::from_parts(2_296_000, 0) - // Standard Error: 3_924 - .saturating_add(Weight::from_parts(2_681_831, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64popcnt(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_294_000 picoseconds. - Weight::from_parts(2_438_000, 0) - // Standard Error: 4_198 - .saturating_add(Weight::from_parts(603_106, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32popcnt(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_257_000 picoseconds. - Weight::from_parts(2_121_941, 0) - // Standard Error: 3_525 - .saturating_add(Weight::from_parts(401_578, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64eqz(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_224_000 picoseconds. - Weight::from_parts(2_291_000, 0) - // Standard Error: 9_436 - .saturating_add(Weight::from_parts(1_891_725, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32eqz(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_273_000 picoseconds. - Weight::from_parts(2_417_000, 0) - // Standard Error: 8_255 - .saturating_add(Weight::from_parts(1_289_311, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32extend8s(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_276_000 picoseconds. - Weight::from_parts(1_306_236, 0) - // Standard Error: 5_275 - .saturating_add(Weight::from_parts(426_430, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32extend16s(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_341_000 picoseconds. - Weight::from_parts(1_669_540, 0) - // Standard Error: 4_902 - .saturating_add(Weight::from_parts(405_099, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64extend8s(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_244_000 picoseconds. - Weight::from_parts(2_317_000, 0) - // Standard Error: 3_916 - .saturating_add(Weight::from_parts(552_354, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64extend16s(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_316_000 picoseconds. - Weight::from_parts(2_395_000, 0) - // Standard Error: 5_375 - .saturating_add(Weight::from_parts(589_608, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64extend32s(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_258_000 picoseconds. - Weight::from_parts(98_911, 0) - // Standard Error: 7_257 - .saturating_add(Weight::from_parts(581_834, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64extendsi32(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_293_000 picoseconds. - Weight::from_parts(1_730_402, 0) - // Standard Error: 4_194 - .saturating_add(Weight::from_parts(357_287, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64extendui32(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_580_000 picoseconds. - Weight::from_parts(2_927_247, 0) - // Standard Error: 2_012 - .saturating_add(Weight::from_parts(181_106, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32wrapi64(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_308_000 picoseconds. - Weight::from_parts(2_742_236, 0) - // Standard Error: 2_482 - .saturating_add(Weight::from_parts(187_830, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64eq(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_324_000 picoseconds. - Weight::from_parts(2_385_000, 0) - // Standard Error: 9_154 - .saturating_add(Weight::from_parts(1_858_617, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32eq(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_237_000 picoseconds. - Weight::from_parts(2_302_000, 0) - // Standard Error: 7_801 - .saturating_add(Weight::from_parts(1_226_411, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64ne(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_265_000 picoseconds. - Weight::from_parts(2_358_000, 0) - // Standard Error: 9_102 - .saturating_add(Weight::from_parts(1_866_723, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32ne(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_267_000 picoseconds. - Weight::from_parts(2_381_000, 0) - // Standard Error: 8_629 - .saturating_add(Weight::from_parts(1_209_968, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64lts(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_274_000 picoseconds. - Weight::from_parts(2_330_000, 0) - // Standard Error: 9_193 - .saturating_add(Weight::from_parts(1_895_140, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32lts(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_306_000 picoseconds. - Weight::from_parts(2_394_000, 0) - // Standard Error: 7_780 - .saturating_add(Weight::from_parts(1_209_776, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64ltu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_273_000 picoseconds. - Weight::from_parts(2_395_000, 0) - // Standard Error: 8_868 - .saturating_add(Weight::from_parts(1_845_417, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32ltu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_280_000 picoseconds. - Weight::from_parts(2_360_000, 0) - // Standard Error: 8_139 - .saturating_add(Weight::from_parts(1_208_611, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64gts(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_299_000 picoseconds. - Weight::from_parts(2_335_000, 0) - // Standard Error: 8_008 - .saturating_add(Weight::from_parts(1_833_636, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32gts(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_222_000 picoseconds. - Weight::from_parts(2_376_000, 0) - // Standard Error: 7_996 - .saturating_add(Weight::from_parts(1_224_203, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64gtu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_371_000 picoseconds. - Weight::from_parts(2_421_000, 0) - // Standard Error: 9_119 - .saturating_add(Weight::from_parts(1_821_158, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32gtu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_305_000 picoseconds. - Weight::from_parts(2_418_000, 0) - // Standard Error: 7_441 - .saturating_add(Weight::from_parts(1_186_995, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64les(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_340_000 picoseconds. - Weight::from_parts(2_362_000, 0) - // Standard Error: 8_788 - .saturating_add(Weight::from_parts(1_811_701, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32les(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_352_000 picoseconds. - Weight::from_parts(2_431_000, 0) - // Standard Error: 6_620 - .saturating_add(Weight::from_parts(1_171_906, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64leu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_352_000 picoseconds. - Weight::from_parts(2_380_000, 0) - // Standard Error: 8_554 - .saturating_add(Weight::from_parts(1_821_955, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32leu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_299_000 picoseconds. - Weight::from_parts(2_389_000, 0) - // Standard Error: 7_710 - .saturating_add(Weight::from_parts(1_188_722, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64ges(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_325_000 picoseconds. - Weight::from_parts(2_387_000, 0) - // Standard Error: 10_150 - .saturating_add(Weight::from_parts(1_912_877, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32ges(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_377_000 picoseconds. - Weight::from_parts(2_423_000, 0) - // Standard Error: 6_824 - .saturating_add(Weight::from_parts(1_181_831, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64geu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_292_000 picoseconds. - Weight::from_parts(2_384_000, 0) - // Standard Error: 9_214 - .saturating_add(Weight::from_parts(1_842_825, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32geu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_283_000 picoseconds. - Weight::from_parts(2_344_000, 0) - // Standard Error: 7_145 - .saturating_add(Weight::from_parts(1_216_207, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64add(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_232_000 picoseconds. - Weight::from_parts(2_391_000, 0) - // Standard Error: 9_159 - .saturating_add(Weight::from_parts(1_360_135, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32add(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_279_000 picoseconds. - Weight::from_parts(2_379_000, 0) - // Standard Error: 5_400 - .saturating_add(Weight::from_parts(704_012, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64sub(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_355_000 picoseconds. - Weight::from_parts(2_402_000, 0) - // Standard Error: 8_632 - .saturating_add(Weight::from_parts(1_358_130, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32sub(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_365_000 picoseconds. - Weight::from_parts(2_389_000, 0) - // Standard Error: 4_840 - .saturating_add(Weight::from_parts(658_882, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64mul(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_209_000 picoseconds. - Weight::from_parts(2_324_000, 0) - // Standard Error: 8_679 - .saturating_add(Weight::from_parts(1_840_263, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32mul(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_258_000 picoseconds. - Weight::from_parts(2_382_000, 0) - // Standard Error: 7_484 - .saturating_add(Weight::from_parts(1_255_185, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64divs(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_369_000 picoseconds. - Weight::from_parts(6_412_885, 0) - // Standard Error: 22_130 - .saturating_add(Weight::from_parts(2_376_785, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32divs(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_266_000 picoseconds. - Weight::from_parts(2_981_330, 0) - // Standard Error: 11_996 - .saturating_add(Weight::from_parts(2_322_763, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64divu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_240_000 picoseconds. - Weight::from_parts(7_628_007, 0) - // Standard Error: 29_510 - .saturating_add(Weight::from_parts(2_483_957, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32divu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_387_000 picoseconds. - Weight::from_parts(4_910_027, 0) - // Standard Error: 23_548 - .saturating_add(Weight::from_parts(2_233_487, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64rems(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_297_000 picoseconds. - Weight::from_parts(16_240_633, 0) - // Standard Error: 67_100 - .saturating_add(Weight::from_parts(8_506_720, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32rems(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_234_000 picoseconds. - Weight::from_parts(2_498_693, 0) - // Standard Error: 48_996 - .saturating_add(Weight::from_parts(7_513_162, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64remu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_221_000 picoseconds. - Weight::from_parts(5_074_264, 0) - // Standard Error: 23_109 - .saturating_add(Weight::from_parts(2_727_269, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32remu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_283_000 picoseconds. - Weight::from_parts(2_057_554, 0) - // Standard Error: 15_404 - .saturating_add(Weight::from_parts(2_428_553, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64and(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_250_000 picoseconds. - Weight::from_parts(2_359_000, 0) - // Standard Error: 8_133 - .saturating_add(Weight::from_parts(1_333_125, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32and(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_251_000 picoseconds. - Weight::from_parts(2_372_000, 0) - // Standard Error: 4_205 - .saturating_add(Weight::from_parts(671_074, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64or(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_257_000 picoseconds. - Weight::from_parts(2_323_000, 0) - // Standard Error: 7_098 - .saturating_add(Weight::from_parts(1_323_703, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32or(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_247_000 picoseconds. - Weight::from_parts(2_372_000, 0) - // Standard Error: 6_649 - .saturating_add(Weight::from_parts(695_117, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64xor(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_293_000 picoseconds. - Weight::from_parts(2_347_000, 0) - // Standard Error: 7_359 - .saturating_add(Weight::from_parts(1_355_885, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32xor(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_239_000 picoseconds. - Weight::from_parts(2_335_000, 0) - // Standard Error: 4_076 - .saturating_add(Weight::from_parts(658_834, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64shl(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_376_000 picoseconds. - Weight::from_parts(2_444_000, 0) - // Standard Error: 6_850 - .saturating_add(Weight::from_parts(1_191_253, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32shl(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_240_000 picoseconds. - Weight::from_parts(2_310_000, 0) - // Standard Error: 4_398 - .saturating_add(Weight::from_parts(597_162, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64shrs(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_338_000 picoseconds. - Weight::from_parts(2_421_000, 0) - // Standard Error: 8_320 - .saturating_add(Weight::from_parts(1_163_071, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32shrs(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_376_000 picoseconds. - Weight::from_parts(2_464_000, 0) - // Standard Error: 5_750 - .saturating_add(Weight::from_parts(613_283, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64shru(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_338_000 picoseconds. - Weight::from_parts(2_378_000, 0) - // Standard Error: 7_893 - .saturating_add(Weight::from_parts(1_161_655, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32shru(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_260_000 picoseconds. - Weight::from_parts(2_351_000, 0) - // Standard Error: 3_972 - .saturating_add(Weight::from_parts(605_013, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64rotl(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_324_000 picoseconds. - Weight::from_parts(2_375_000, 0) - // Standard Error: 7_329 - .saturating_add(Weight::from_parts(1_108_542, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32rotl(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_342_000 picoseconds. - Weight::from_parts(2_465_000, 0) - // Standard Error: 5_553 - .saturating_add(Weight::from_parts(617_389, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64rotr(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_260_000 picoseconds. - Weight::from_parts(2_419_000, 0) - // Standard Error: 8_448 - .saturating_add(Weight::from_parts(1_105_239, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32rotr(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_255_000 picoseconds. - Weight::from_parts(2_321_000, 0) - // Standard Error: 5_862 - .saturating_add(Weight::from_parts(626_497, 0).saturating_mul(r.into())) - } - fn tasks_remove_resume_session() -> Weight { - // Proof Size summary in bytes: - // Measured: `352` - // Estimated: `4169` - // Minimum execution time: 5_780_000 picoseconds. - Weight::from_parts(6_083_000, 4169) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) - } - fn tasks_remove_gas_reservation() -> Weight { - // Proof Size summary in bytes: - // Measured: `1039` - // Estimated: `23781` - // Minimum execution time: 62_100_000 picoseconds. - Weight::from_parts(64_771_000, 23781) - .saturating_add(T::DbWeight::get().reads(7_u64)) - .saturating_add(T::DbWeight::get().writes(6_u64)) - } - fn tasks_send_user_message_to_mailbox() -> Weight { - // Proof Size summary in bytes: - // Measured: `820` - // Estimated: `21750` - // Minimum execution time: 47_415_000 picoseconds. - Weight::from_parts(48_906_000, 21750) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(5_u64)) - } - fn tasks_send_user_message() -> Weight { - // Proof Size summary in bytes: - // Measured: `942` - // Estimated: `34143` - // Minimum execution time: 76_882_000 picoseconds. - Weight::from_parts(79_728_000, 34143) - .saturating_add(T::DbWeight::get().reads(11_u64)) - .saturating_add(T::DbWeight::get().writes(10_u64)) - } - fn tasks_send_dispatch() -> Weight { - // Proof Size summary in bytes: - // Measured: `627` - // Estimated: `20101` - // Minimum execution time: 32_342_000 picoseconds. - Weight::from_parts(33_851_000, 20101) - .saturating_add(T::DbWeight::get().reads(7_u64)) - .saturating_add(T::DbWeight::get().writes(6_u64)) - } - fn tasks_wake_message() -> Weight { - // Proof Size summary in bytes: - // Measured: `908` - // Estimated: `26160` - // Minimum execution time: 50_697_000 picoseconds. - Weight::from_parts(53_632_000, 26160) - .saturating_add(T::DbWeight::get().reads(8_u64)) - .saturating_add(T::DbWeight::get().writes(6_u64)) - } - fn tasks_wake_message_no_wake() -> Weight { - // Proof Size summary in bytes: - // Measured: `80` - // Estimated: `3545` - // Minimum execution time: 3_467_000 picoseconds. - Weight::from_parts(3_690_000, 3545) - .saturating_add(T::DbWeight::get().reads(1_u64)) - } - fn tasks_remove_from_waitlist() -> Weight { - // Proof Size summary in bytes: - // Measured: `1558` - // Estimated: `57552` - // Minimum execution time: 111_822_000 picoseconds. - Weight::from_parts(115_245_000, 57552) - .saturating_add(T::DbWeight::get().reads(16_u64)) - .saturating_add(T::DbWeight::get().writes(13_u64)) - } - fn tasks_remove_from_mailbox() -> Weight { - // Proof Size summary in bytes: - // Measured: `1264` - // Estimated: `46350` - // Minimum execution time: 92_407_000 picoseconds. - Weight::from_parts(95_840_000, 46350) - .saturating_add(T::DbWeight::get().reads(14_u64)) - .saturating_add(T::DbWeight::get().writes(13_u64)) - } - /// The range of component `c` is `[0, 2044]`. - fn tasks_pause_program(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `2236 + c * (16400 ±0)` - // Estimated: `19543 + c * (84480 ±0)` - // Minimum execution time: 29_880_000 picoseconds. - Weight::from_parts(30_555_000, 19543) - // Standard Error: 65_806 - .saturating_add(Weight::from_parts(39_128_234, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(4_u64)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) - .saturating_add(T::DbWeight::get().writes(2_u64)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_parts(0, 84480).saturating_mul(c.into())) - } - /// The range of component `c` is `[0, 2044]`. - fn tasks_pause_program_uninited(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `3061 + c * (42 ±0)` - // Estimated: `59827 + c * (2947 ±0)` - // Minimum execution time: 89_781_000 picoseconds. - Weight::from_parts(109_193_287, 59827) - // Standard Error: 2_877 - .saturating_add(Weight::from_parts(1_067_792, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(13_u64)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) - .saturating_add(T::DbWeight::get().writes(9_u64)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_parts(0, 2947).saturating_mul(c.into())) - } -} - -// For backwards compatibility and tests -impl WeightInfo for () { - /// The range of component `r` is `[0, 1]`. - fn gr_reply(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 94_792_000 picoseconds. - Weight::from_parts(103_063_604, 0) - // Standard Error: 103_375 - .saturating_add(Weight::from_parts(18_929_072, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_reply_wgas(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 96_154_000 picoseconds. - Weight::from_parts(107_249_232, 0) - // Standard Error: 99_969 - .saturating_add(Weight::from_parts(19_062_846, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_reply_commit(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 98_701_000 picoseconds. - Weight::from_parts(109_478_842, 0) - // Standard Error: 104_175 - .saturating_add(Weight::from_parts(10_887_124, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_reply_commit_wgas(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 102_910_000 picoseconds. - Weight::from_parts(109_181_566, 0) - // Standard Error: 81_801 - .saturating_add(Weight::from_parts(12_077_508, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_reply_input(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 719_481_000 picoseconds. - Weight::from_parts(765_485_196, 0) - // Standard Error: 676_170 - .saturating_add(Weight::from_parts(17_778_524, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_reply_input_wgas(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 720_914_000 picoseconds. - Weight::from_parts(776_554_516, 0) - // Standard Error: 1_018_495 - .saturating_add(Weight::from_parts(38_306_948, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_reservation_reply(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 105_823_000 picoseconds. - Weight::from_parts(112_820_586, 0) - // Standard Error: 82_530 - .saturating_add(Weight::from_parts(14_370_506, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_reservation_reply_commit(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 102_415_000 picoseconds. - Weight::from_parts(110_005_402, 0) - // Standard Error: 87_514 - .saturating_add(Weight::from_parts(6_578_880, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_exit(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 96_593_000 picoseconds. - Weight::from_parts(104_873_732, 0) - // Standard Error: 2_095_391 - .saturating_add(Weight::from_parts(193_359_282, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_leave(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 93_619_000 picoseconds. - Weight::from_parts(99_623_244, 0) - // Standard Error: 1_945_328 - .saturating_add(Weight::from_parts(179_784_494, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_wait(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 92_936_000 picoseconds. - Weight::from_parts(100_139_452, 0) - // Standard Error: 1_753_555 - .saturating_add(Weight::from_parts(132_465_876, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_wait_for(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 93_955_000 picoseconds. - Weight::from_parts(100_650_632, 0) - // Standard Error: 2_018_388 - .saturating_add(Weight::from_parts(178_916_382, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn gr_wait_up_to(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 95_467_000 picoseconds. - Weight::from_parts(102_532_790, 0) - // Standard Error: 2_065_180 - .saturating_add(Weight::from_parts(187_152_790, 0).saturating_mul(r.into())) - } - fn allocation_cost() -> Weight { - // To be changed with the proper value. - RocksDbWeight::get().writes(1) - } - fn grow_cost() -> Weight { - // To be changed with the proper value. - RocksDbWeight::get().writes(1) - } - fn initial_cost() -> Weight { - RocksDbWeight::get().writes(1) - } - fn load_cost() -> Weight { - RocksDbWeight::get().reads(1) - } - /// The range of component `c` is `[0, 512]`. - fn db_write_per_kb(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_040_000 picoseconds. - Weight::from_parts(1_087_000, 0) - // Standard Error: 940 - .saturating_add(Weight::from_parts(251_751, 0).saturating_mul(c.into())) - .saturating_add(RocksDbWeight::get().writes(1_u64)) - } - /// The range of component `c` is `[0, 512]`. - fn db_read_per_kb(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `79 + c * (1024 ±0)` - // Estimated: `3543 + c * (1024 ±0)` - // Minimum execution time: 3_333_000 picoseconds. - Weight::from_parts(3_463_000, 3543) - // Standard Error: 966 - .saturating_add(Weight::from_parts(678_430, 0).saturating_mul(c.into())) - .saturating_add(RocksDbWeight::get().reads(1_u64)) - .saturating_add(Weight::from_parts(0, 1024).saturating_mul(c.into())) - } - /// The range of component `c` is `[0, 512]`. - fn instantiate_module_per_kb(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 61_586_000 picoseconds. - Weight::from_parts(95_956_778, 0) - // Standard Error: 5_472 - .saturating_add(Weight::from_parts(2_353_352, 0).saturating_mul(c.into())) - } - fn claim_value() -> Weight { - // Proof Size summary in bytes: - // Measured: `1304` - // Estimated: `51293` - // Minimum execution time: 105_420_000 picoseconds. - Weight::from_parts(109_120_000, 51293) - .saturating_add(RocksDbWeight::get().reads(15_u64)) - .saturating_add(RocksDbWeight::get().writes(12_u64)) - } - fn pay_program_rent() -> Weight { - // Proof Size summary in bytes: - // Measured: `923` - // Estimated: `21372` - // Minimum execution time: 54_290_000 picoseconds. - Weight::from_parts(55_929_000, 21372) - .saturating_add(RocksDbWeight::get().reads(7_u64)) - .saturating_add(RocksDbWeight::get().writes(6_u64)) - } - fn resume_session_init() -> Weight { - // Proof Size summary in bytes: - // Measured: `570` - // Estimated: `17214` - // Minimum execution time: 29_539_000 picoseconds. - Weight::from_parts(30_515_000, 17214) - .saturating_add(RocksDbWeight::get().reads(6_u64)) - .saturating_add(RocksDbWeight::get().writes(4_u64)) - } - /// The range of component `c` is `[0, 64]`. - fn resume_session_push(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `355` - // Estimated: `7640` - // Minimum execution time: 8_426_000 picoseconds. - Weight::from_parts(5_984_423, 7640) - // Standard Error: 33_789 - .saturating_add(Weight::from_parts(13_895_151, 0).saturating_mul(c.into())) - .saturating_add(RocksDbWeight::get().reads(2_u64)) - .saturating_add(RocksDbWeight::get().writes(2_u64)) - } - /// The range of component `c` is `[0, 2044]`. - fn resume_session_commit(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `1457 + c * (16389 ±0)` - // Estimated: `42178 + c * (131112 ±0)` - // Minimum execution time: 71_198_000 picoseconds. - Weight::from_parts(72_033_000, 42178) - // Standard Error: 159_543 - .saturating_add(Weight::from_parts(54_764_270, 0).saturating_mul(c.into())) - .saturating_add(RocksDbWeight::get().reads(11_u64)) - .saturating_add(RocksDbWeight::get().writes(9_u64)) - .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_parts(0, 131112).saturating_mul(c.into())) - } - /// The range of component `c` is `[0, 250]`. - fn upload_code(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `46` - // Estimated: `5134` - // Minimum execution time: 77_259_000 picoseconds. - Weight::from_parts(52_968_469, 5134) - // Standard Error: 43_186 - .saturating_add(Weight::from_parts(59_988_588, 0).saturating_mul(c.into())) - .saturating_add(RocksDbWeight::get().reads(2_u64)) - .saturating_add(RocksDbWeight::get().writes(4_u64)) - } - /// The range of component `s` is `[0, 4194304]`. - fn create_program(s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `1043` - // Estimated: `49852` - // Minimum execution time: 96_734_000 picoseconds. - Weight::from_parts(136_364_170, 49852) - // Standard Error: 0 - .saturating_add(Weight::from_parts(2_592, 0).saturating_mul(s.into())) - .saturating_add(RocksDbWeight::get().reads(15_u64)) - .saturating_add(RocksDbWeight::get().writes(12_u64)) - } - /// The range of component `c` is `[0, 250]`. - /// The range of component `s` is `[0, 4194304]`. - fn upload_program(c: u32, s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `453` - // Estimated: `44268` - // Minimum execution time: 11_047_048_000 picoseconds. - Weight::from_parts(211_012_859, 44268) - // Standard Error: 157_221 - .saturating_add(Weight::from_parts(59_860_835, 0).saturating_mul(c.into())) - // Standard Error: 9 - .saturating_add(Weight::from_parts(2_554, 0).saturating_mul(s.into())) - .saturating_add(RocksDbWeight::get().reads(15_u64)) - .saturating_add(RocksDbWeight::get().writes(16_u64)) - } - /// The range of component `p` is `[0, 2097152]`. - fn send_message(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `530` - // Estimated: `31259` - // Minimum execution time: 73_682_000 picoseconds. - Weight::from_parts(48_414_295, 31259) - // Standard Error: 1 - .saturating_add(Weight::from_parts(1_040, 0).saturating_mul(p.into())) - .saturating_add(RocksDbWeight::get().reads(11_u64)) - .saturating_add(RocksDbWeight::get().writes(10_u64)) - } - /// The range of component `p` is `[0, 2097152]`. - fn send_reply(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `1303` - // Estimated: `53823` - // Minimum execution time: 122_837_000 picoseconds. - Weight::from_parts(97_209_014, 53823) - // Standard Error: 1 - .saturating_add(Weight::from_parts(1_068, 0).saturating_mul(p.into())) - .saturating_add(RocksDbWeight::get().reads(16_u64)) - .saturating_add(RocksDbWeight::get().writes(13_u64)) - } - /// The range of component `q` is `[1, 512]`. - fn initial_allocation(_q: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `979` - // Estimated: `89393` - // Minimum execution time: 354_207_000 picoseconds. - Weight::from_parts(374_297_966, 89393) - .saturating_add(RocksDbWeight::get().reads(31_u64)) - .saturating_add(RocksDbWeight::get().writes(24_u64)) - } - /// The range of component `q` is `[0, 512]`. - fn alloc_in_handle(q: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `979` - // Estimated: `89133` - // Minimum execution time: 368_424_000 picoseconds. - Weight::from_parts(387_073_481, 89133) - // Standard Error: 1_472 - .saturating_add(Weight::from_parts(4_343, 0).saturating_mul(q.into())) - .saturating_add(RocksDbWeight::get().reads(31_u64)) - .saturating_add(RocksDbWeight::get().writes(24_u64)) - } - /// The range of component `c` is `[0, 512]`. - fn reinstrument_per_kb(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `211 + c * (1075 ±0)` - // Estimated: `3899 + c * (2150 ±0)` - // Minimum execution time: 58_209_000 picoseconds. - Weight::from_parts(58_498_000, 3899) - // Standard Error: 35_860 - .saturating_add(Weight::from_parts(58_109_594, 0).saturating_mul(c.into())) - .saturating_add(RocksDbWeight::get().reads(1_u64)) - .saturating_add(RocksDbWeight::get().writes(2_u64)) - .saturating_add(Weight::from_parts(0, 2150).saturating_mul(c.into())) - } - /// The range of component `r` is `[0, 20]`. - fn alloc(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 92_645_000 picoseconds. - Weight::from_parts(95_763_000, 0) - // Standard Error: 3_691_564 - .saturating_add(Weight::from_parts(713_537_659, 0).saturating_mul(r.into())) - } - /// The range of component `p` is `[1, 512]`. - fn alloc_per_page(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 495_006_000 picoseconds. - Weight::from_parts(421_459_793, 0) - // Standard Error: 9_156 - .saturating_add(Weight::from_parts(29_070_022, 0).saturating_mul(p.into())) - } - /// The range of component `r` is `[0, 20]`. - fn free(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 219_414_000 picoseconds. - Weight::from_parts(206_118_379, 0) - // Standard Error: 320_555 - .saturating_add(Weight::from_parts(64_665_141, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 256]`. - fn gr_reserve_gas(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 96_871_000 picoseconds. - Weight::from_parts(104_318_392, 0) - // Standard Error: 4_224 - .saturating_add(Weight::from_parts(2_443_618, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 256]`. - fn gr_unreserve_gas(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 152_658_000 picoseconds. - Weight::from_parts(218_177_774, 0) - // Standard Error: 23_640 - .saturating_add(Weight::from_parts(2_186_094, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_system_reserve_gas(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 97_532_000 picoseconds. - Weight::from_parts(112_244_990, 0) - // Standard Error: 370_435 - .saturating_add(Weight::from_parts(102_977_688, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_message_id(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 95_116_000 picoseconds. - Weight::from_parts(85_754_801, 0) - // Standard Error: 322_936 - .saturating_add(Weight::from_parts(85_646_040, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_program_id(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 97_226_000 picoseconds. - Weight::from_parts(96_400_189, 0) - // Standard Error: 308_975 - .saturating_add(Weight::from_parts(84_400_658, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_source(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 96_667_000 picoseconds. - Weight::from_parts(95_221_535, 0) - // Standard Error: 320_528 - .saturating_add(Weight::from_parts(85_320_330, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_value(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 96_400_000 picoseconds. - Weight::from_parts(83_830_464, 0) - // Standard Error: 333_677 - .saturating_add(Weight::from_parts(86_153_462, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_value_available(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 98_322_000 picoseconds. - Weight::from_parts(88_780_011, 0) - // Standard Error: 365_736 - .saturating_add(Weight::from_parts(86_373_607, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_gas_available(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 94_234_000 picoseconds. - Weight::from_parts(93_394_916, 0) - // Standard Error: 310_495 - .saturating_add(Weight::from_parts(85_678_300, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_size(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 95_316_000 picoseconds. - Weight::from_parts(88_012_950, 0) - // Standard Error: 309_598 - .saturating_add(Weight::from_parts(85_813_369, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_read(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 715_150_000 picoseconds. - Weight::from_parts(769_593_524, 0) - // Standard Error: 493_525 - .saturating_add(Weight::from_parts(140_935_499, 0).saturating_mul(r.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_read_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 844_162_000 picoseconds. - Weight::from_parts(851_053_000, 0) - // Standard Error: 50_294 - .saturating_add(Weight::from_parts(13_068_816, 0).saturating_mul(n.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_exec_settings(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 221_823_000 picoseconds. - Weight::from_parts(924_157_395, 0) - // Standard Error: 3_073_388 - .saturating_add(Weight::from_parts(143_835_127, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_block_height(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 94_243_000 picoseconds. - Weight::from_parts(87_583_955, 0) - // Standard Error: 343_578 - .saturating_add(Weight::from_parts(84_267_053, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_block_timestamp(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 95_559_000 picoseconds. - Weight::from_parts(92_460_596, 0) - // Standard Error: 340_344 - .saturating_add(Weight::from_parts(85_006_110, 0).saturating_mul(r.into())) - } - /// The range of component `n` is `[0, 20]`. - fn gr_random(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 95_023_000 picoseconds. - Weight::from_parts(113_045_564, 0) - // Standard Error: 350_542 - .saturating_add(Weight::from_parts(169_289_972, 0).saturating_mul(n.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_reply_deposit(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 95_407_000 picoseconds. - Weight::from_parts(99_094_000, 0) - // Standard Error: 3_585_438 - .saturating_add(Weight::from_parts(776_362_449, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_send(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 96_709_000 picoseconds. - Weight::from_parts(153_262_764, 0) - // Standard Error: 391_637 - .saturating_add(Weight::from_parts(256_389_022, 0).saturating_mul(r.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_send_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 341_633_000 picoseconds. - Weight::from_parts(345_693_000, 0) - // Standard Error: 61_029 - .saturating_add(Weight::from_parts(21_298_548, 0).saturating_mul(n.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_send_wgas(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 97_817_000 picoseconds. - Weight::from_parts(172_033_153, 0) - // Standard Error: 412_230 - .saturating_add(Weight::from_parts(260_826_119, 0).saturating_mul(r.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_send_wgas_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 353_433_000 picoseconds. - Weight::from_parts(359_185_000, 0) - // Standard Error: 60_153 - .saturating_add(Weight::from_parts(21_224_949, 0).saturating_mul(n.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_send_input(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 716_180_000 picoseconds. - Weight::from_parts(782_890_839, 0) - // Standard Error: 547_225 - .saturating_add(Weight::from_parts(273_570_636, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_send_input_wgas(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 719_827_000 picoseconds. - Weight::from_parts(805_763_844, 0) - // Standard Error: 503_245 - .saturating_add(Weight::from_parts(278_200_889, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_send_init(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 96_518_000 picoseconds. - Weight::from_parts(82_218_173, 0) - // Standard Error: 358_867 - .saturating_add(Weight::from_parts(92_408_337, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_send_push(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_829_368_000 picoseconds. - Weight::from_parts(1_976_758_302, 0) - // Standard Error: 349_703 - .saturating_add(Weight::from_parts(163_038_781, 0).saturating_mul(r.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_send_push_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 315_829_000 picoseconds. - Weight::from_parts(318_464_000, 0) - // Standard Error: 54_637 - .saturating_add(Weight::from_parts(31_280_567, 0).saturating_mul(n.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_send_commit(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_818_937_000 picoseconds. - Weight::from_parts(1_941_969_566, 0) - // Standard Error: 412_244 - .saturating_add(Weight::from_parts(220_650_756, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_send_commit_wgas(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_815_762_000 picoseconds. - Weight::from_parts(1_958_182_203, 0) - // Standard Error: 374_381 - .saturating_add(Weight::from_parts(229_106_637, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_reservation_send(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 259_040_000 picoseconds. - Weight::from_parts(345_586_401, 0) - // Standard Error: 402_258 - .saturating_add(Weight::from_parts(274_866_021, 0).saturating_mul(r.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_reservation_send_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 523_014_000 picoseconds. - Weight::from_parts(525_681_000, 0) - // Standard Error: 56_470 - .saturating_add(Weight::from_parts(21_443_571, 0).saturating_mul(n.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_reservation_send_commit(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_967_181_000 picoseconds. - Weight::from_parts(2_076_078_781, 0) - // Standard Error: 455_370 - .saturating_add(Weight::from_parts(246_494_683, 0).saturating_mul(r.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_reply_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 114_790_000 picoseconds. - Weight::from_parts(106_908_278, 0) - // Standard Error: 1_274 - .saturating_add(Weight::from_parts(430_785, 0).saturating_mul(n.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_reply_wgas_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 115_541_000 picoseconds. - Weight::from_parts(101_956_035, 0) - // Standard Error: 3_603 - .saturating_add(Weight::from_parts(442_387, 0).saturating_mul(n.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_reply_push(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 94_082_000 picoseconds. - Weight::from_parts(138_243_307, 0) - // Standard Error: 409_163 - .saturating_add(Weight::from_parts(154_758_505, 0).saturating_mul(r.into())) - } - /// The range of component `n` is `[0, 8192]`. - fn gr_reply_push_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 111_536_000 picoseconds. - Weight::from_parts(114_497_000, 0) - // Standard Error: 2_599 - .saturating_add(Weight::from_parts(656_994, 0).saturating_mul(n.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_reservation_reply_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 114_322_000 picoseconds. - Weight::from_parts(113_131_028, 0) - // Standard Error: 3_727 - .saturating_add(Weight::from_parts(436_168, 0).saturating_mul(n.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_reservation_reply_commit_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 117_751_000 picoseconds. - Weight::from_parts(161_418_174, 0) - // Standard Error: 6_635 - .saturating_add(Weight::from_parts(405_229, 0).saturating_mul(n.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_reply_to(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 93_524_000 picoseconds. - Weight::from_parts(89_332_032, 0) - // Standard Error: 294_566 - .saturating_add(Weight::from_parts(86_798_759, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_signal_code(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 95_216_000 picoseconds. - Weight::from_parts(83_424_786, 0) - // Standard Error: 316_301 - .saturating_add(Weight::from_parts(84_774_296, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_signal_from(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 96_461_000 picoseconds. - Weight::from_parts(97_636_300, 0) - // Standard Error: 278_297 - .saturating_add(Weight::from_parts(86_743_159, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_reply_push_input(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 724_902_000 picoseconds. - Weight::from_parts(784_128_285, 0) - // Standard Error: 444_406 - .saturating_add(Weight::from_parts(105_223_470, 0).saturating_mul(r.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_reply_push_input_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 737_666_000 picoseconds. - Weight::from_parts(758_797_216, 0) - // Standard Error: 1_260 - .saturating_add(Weight::from_parts(154_837, 0).saturating_mul(n.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_send_push_input(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_498_871_000 picoseconds. - Weight::from_parts(2_688_516_696, 0) - // Standard Error: 531_545 - .saturating_add(Weight::from_parts(131_060_314, 0).saturating_mul(r.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_send_push_input_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_657_855_000 picoseconds. - Weight::from_parts(2_746_003_287, 0) - // Standard Error: 12_743 - .saturating_add(Weight::from_parts(13_716_214, 0).saturating_mul(n.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_debug(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 96_990_000 picoseconds. - Weight::from_parts(110_812_744, 0) - // Standard Error: 347_035 - .saturating_add(Weight::from_parts(120_462_128, 0).saturating_mul(r.into())) - } - /// The range of component `n` is `[0, 2048]`. - fn gr_debug_per_kb(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 170_244_000 picoseconds. - Weight::from_parts(175_502_000, 0) - // Standard Error: 56_203 - .saturating_add(Weight::from_parts(25_870_902, 0).saturating_mul(n.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_reply_code(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 97_676_000 picoseconds. - Weight::from_parts(91_226_383, 0) - // Standard Error: 320_296 - .saturating_add(Weight::from_parts(82_761_490, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_wake(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 149_319_000 picoseconds. - Weight::from_parts(230_971_562, 0) - // Standard Error: 338_138 - .saturating_add(Weight::from_parts(157_262_608, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_create_program(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 108_167_000 picoseconds. - Weight::from_parts(178_994_489, 0) - // Standard Error: 404_012 - .saturating_add(Weight::from_parts(348_487_075, 0).saturating_mul(r.into())) - } - /// The range of component `p` is `[0, 2048]`. - /// The range of component `s` is `[1, 2048]`. - fn gr_create_program_per_kb(p: u32, s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 43_645_119_000 picoseconds. - Weight::from_parts(43_811_648_000, 0) - // Standard Error: 262_276 - .saturating_add(Weight::from_parts(7_776_587, 0).saturating_mul(p.into())) - // Standard Error: 262_263 - .saturating_add(Weight::from_parts(178_958_075, 0).saturating_mul(s.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_create_program_wgas(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 104_639_000 picoseconds. - Weight::from_parts(169_517_206, 0) - // Standard Error: 363_225 - .saturating_add(Weight::from_parts(357_078_703, 0).saturating_mul(r.into())) - } - /// The range of component `p` is `[0, 2048]`. - /// The range of component `s` is `[1, 2048]`. - fn gr_create_program_wgas_per_kb(p: u32, s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 46_491_851_000 picoseconds. - Weight::from_parts(46_603_783_000, 0) - // Standard Error: 280_431 - .saturating_add(Weight::from_parts(7_250_257, 0).saturating_mul(p.into())) - // Standard Error: 280_417 - .saturating_add(Weight::from_parts(177_722_888, 0).saturating_mul(s.into())) - } - /// The range of component `r` is `[0, 20]`. - fn gr_pay_program_rent(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 95_721_000 picoseconds. - Weight::from_parts(114_995_832, 0) - // Standard Error: 36_809 - .saturating_add(Weight::from_parts(1_873_016, 0).saturating_mul(r.into())) - } - /// The range of component `p` is `[0, 512]`. - fn lazy_pages_signal_read(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `141` - // Estimated: `1131 + p * (9900 ±0)` - // Minimum execution time: 97_655_000 picoseconds. - Weight::from_parts(138_058_498, 1131) - // Standard Error: 18_813 - .saturating_add(Weight::from_parts(16_311_194, 0).saturating_mul(p.into())) - .saturating_add(RocksDbWeight::get().reads((4_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 9900).saturating_mul(p.into())) - } - /// The range of component `p` is `[0, 512]`. - fn lazy_pages_signal_write(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `141` - // Estimated: `1131 + p * (9900 ±0)` - // Minimum execution time: 96_083_000 picoseconds. - Weight::from_parts(98_597_000, 1131) - // Standard Error: 43_515 - .saturating_add(Weight::from_parts(42_632_421, 0).saturating_mul(p.into())) - .saturating_add(RocksDbWeight::get().reads((4_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 9900).saturating_mul(p.into())) - } - /// The range of component `p` is `[0, 512]`. - fn lazy_pages_signal_write_after_read(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `141` - // Estimated: `5069931` - // Minimum execution time: 8_196_422_000 picoseconds. - Weight::from_parts(8_474_214_520, 5069931) - // Standard Error: 71_564 - .saturating_add(Weight::from_parts(41_738_666, 0).saturating_mul(p.into())) - .saturating_add(RocksDbWeight::get().reads(2048_u64)) - } - /// The range of component `p` is `[0, 512]`. - fn lazy_pages_load_page_storage_data(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `1813 + p * (65580 ±0)` - // Estimated: `1939 + p * (75482 ±0)` - // Minimum execution time: 93_446_000 picoseconds. - Weight::from_parts(96_664_000, 1939) - // Standard Error: 46_722 - .saturating_add(Weight::from_parts(55_567_620, 0).saturating_mul(p.into())) - .saturating_add(RocksDbWeight::get().reads((4_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 75482).saturating_mul(p.into())) - } - /// The range of component `p` is `[0, 32]`. - fn lazy_pages_host_func_read(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `141` - // Estimated: `1131 + p * (9900 ±0)` - // Minimum execution time: 106_137_000 picoseconds. - Weight::from_parts(107_751_954, 1131) - // Standard Error: 71_200 - .saturating_add(Weight::from_parts(41_236_505, 0).saturating_mul(p.into())) - .saturating_add(RocksDbWeight::get().reads((4_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 9900).saturating_mul(p.into())) - } - /// The range of component `p` is `[0, 32]`. - fn lazy_pages_host_func_write(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `141` - // Estimated: `1496 + p * (9883 ±2)` - // Minimum execution time: 758_237_000 picoseconds. - Weight::from_parts(760_351_083, 1496) - // Standard Error: 319_479 - .saturating_add(Weight::from_parts(53_277_303, 0).saturating_mul(p.into())) - .saturating_add(RocksDbWeight::get().reads((4_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 9883).saturating_mul(p.into())) - } - /// The range of component `p` is `[0, 32]`. - fn lazy_pages_host_func_write_after_read(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `141` - // Estimated: `317931` - // Minimum execution time: 1_299_071_000 picoseconds. - Weight::from_parts(1_320_542_278, 317931) - // Standard Error: 364_770 - .saturating_add(Weight::from_parts(53_225_083, 0).saturating_mul(p.into())) - .saturating_add(RocksDbWeight::get().reads(128_u64)) - } - /// The range of component `r` is `[0, 20]`. - fn mem_grow(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_118_000 picoseconds. - Weight::from_parts(7_418_987, 0) - // Standard Error: 299_976 - .saturating_add(Weight::from_parts(77_036_564, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[50, 500]`. - fn instr_i64load(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_461_228_000 picoseconds. - Weight::from_parts(4_172_544_233, 0) - // Standard Error: 108_717 - .saturating_add(Weight::from_parts(5_492_504, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[50, 500]`. - fn instr_i32load(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_440_105_000 picoseconds. - Weight::from_parts(4_189_326_223, 0) - // Standard Error: 94_884 - .saturating_add(Weight::from_parts(5_283_060, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[50, 500]`. - fn instr_i64store(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 11_389_557_000 picoseconds. - Weight::from_parts(11_860_510_711, 0) - // Standard Error: 156_021 - .saturating_add(Weight::from_parts(9_199_358, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[50, 500]`. - fn instr_i32store(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 11_497_103_000 picoseconds. - Weight::from_parts(11_330_880_436, 0) - // Standard Error: 132_247 - .saturating_add(Weight::from_parts(10_016_516, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_select(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_381_000 picoseconds. - Weight::from_parts(2_444_000, 0) - // Standard Error: 7_402 - .saturating_add(Weight::from_parts(3_876_295, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_if(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_405_000 picoseconds. - Weight::from_parts(481_308, 0) - // Standard Error: 8_161 - .saturating_add(Weight::from_parts(3_159_957, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_br(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_371_000 picoseconds. - Weight::from_parts(3_249_787, 0) - // Standard Error: 1_586 - .saturating_add(Weight::from_parts(1_582_965, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_br_if(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_216_000 picoseconds. - Weight::from_parts(2_300_000, 0) - // Standard Error: 6_757 - .saturating_add(Weight::from_parts(2_971_649, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_br_table(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_259_000 picoseconds. - Weight::from_parts(2_872_259, 0) - // Standard Error: 19_834 - .saturating_add(Weight::from_parts(5_176_111, 0).saturating_mul(r.into())) - } - /// The range of component `e` is `[1, 256]`. - fn instr_br_table_per_entry(e: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 6_999_000 picoseconds. - Weight::from_parts(6_015_140, 0) - // Standard Error: 1_903 - .saturating_add(Weight::from_parts(170_143, 0).saturating_mul(e.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_call_const(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_308_000 picoseconds. - Weight::from_parts(5_881_148, 0) - // Standard Error: 9_069 - .saturating_add(Weight::from_parts(2_574_099, 0).saturating_mul(r.into())) - } - fn instr_i64const(r: u32, ) -> Weight { - Weight::from_parts(0, 0) - .saturating_add(Weight::from_parts(2_574_099 - - 2_423_093, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_call(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_337_000 picoseconds. - Weight::from_parts(5_123_036, 0) - // Standard Error: 12_143 - .saturating_add(Weight::from_parts(2_423_093, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_call_indirect(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_736_000 picoseconds. - Weight::from_parts(16_600_828, 0) - // Standard Error: 30_025 - .saturating_add(Weight::from_parts(10_214_913, 0).saturating_mul(r.into())) - } - /// The range of component `p` is `[0, 128]`. - fn instr_call_indirect_per_param(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 12_483_000 picoseconds. - Weight::from_parts(1_416_669, 0) - // Standard Error: 5_995 - .saturating_add(Weight::from_parts(1_336_453, 0).saturating_mul(p.into())) - } - /// The range of component `l` is `[0, 1024]`. - fn instr_call_per_local(_l: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 5_497_000 picoseconds. - Weight::from_parts(5_981_231, 0) - } - /// The range of component `r` is `[0, 50]`. - fn instr_local_get(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_730_000 picoseconds. - Weight::from_parts(5_851_529, 0) - // Standard Error: 2_642 - .saturating_add(Weight::from_parts(392_869, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_local_set(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_837_000 picoseconds. - Weight::from_parts(4_473_635, 0) - // Standard Error: 5_210 - .saturating_add(Weight::from_parts(1_003_312, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_local_tee(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_802_000 picoseconds. - Weight::from_parts(2_153_776, 0) - // Standard Error: 11_517 - .saturating_add(Weight::from_parts(1_186_032, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_global_get(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 6_375_000 picoseconds. - Weight::from_parts(3_754_449, 0) - // Standard Error: 5_686 - .saturating_add(Weight::from_parts(763_597, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_global_set(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 6_475_000 picoseconds. - Weight::from_parts(266_670, 0) - // Standard Error: 10_193 - .saturating_add(Weight::from_parts(1_552_777, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_memory_current(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 6_887_000 picoseconds. - Weight::from_parts(4_333_544, 0) - // Standard Error: 10_173 - .saturating_add(Weight::from_parts(6_952_830, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64clz(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_267_000 picoseconds. - Weight::from_parts(2_351_000, 0) - // Standard Error: 5_280 - .saturating_add(Weight::from_parts(3_360_413, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32clz(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_283_000 picoseconds. - Weight::from_parts(2_357_000, 0) - // Standard Error: 4_452 - .saturating_add(Weight::from_parts(3_099_489, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64ctz(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_328_000 picoseconds. - Weight::from_parts(2_417_000, 0) - // Standard Error: 5_054 - .saturating_add(Weight::from_parts(3_106_996, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32ctz(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_230_000 picoseconds. - Weight::from_parts(2_296_000, 0) - // Standard Error: 3_924 - .saturating_add(Weight::from_parts(2_681_831, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64popcnt(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_294_000 picoseconds. - Weight::from_parts(2_438_000, 0) - // Standard Error: 4_198 - .saturating_add(Weight::from_parts(603_106, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32popcnt(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_257_000 picoseconds. - Weight::from_parts(2_121_941, 0) - // Standard Error: 3_525 - .saturating_add(Weight::from_parts(401_578, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64eqz(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_224_000 picoseconds. - Weight::from_parts(2_291_000, 0) - // Standard Error: 9_436 - .saturating_add(Weight::from_parts(1_891_725, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32eqz(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_273_000 picoseconds. - Weight::from_parts(2_417_000, 0) - // Standard Error: 8_255 - .saturating_add(Weight::from_parts(1_289_311, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32extend8s(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_276_000 picoseconds. - Weight::from_parts(1_306_236, 0) - // Standard Error: 5_275 - .saturating_add(Weight::from_parts(426_430, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32extend16s(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_341_000 picoseconds. - Weight::from_parts(1_669_540, 0) - // Standard Error: 4_902 - .saturating_add(Weight::from_parts(405_099, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64extend8s(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_244_000 picoseconds. - Weight::from_parts(2_317_000, 0) - // Standard Error: 3_916 - .saturating_add(Weight::from_parts(552_354, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64extend16s(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_316_000 picoseconds. - Weight::from_parts(2_395_000, 0) - // Standard Error: 5_375 - .saturating_add(Weight::from_parts(589_608, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64extend32s(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_258_000 picoseconds. - Weight::from_parts(98_911, 0) - // Standard Error: 7_257 - .saturating_add(Weight::from_parts(581_834, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64extendsi32(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_293_000 picoseconds. - Weight::from_parts(1_730_402, 0) - // Standard Error: 4_194 - .saturating_add(Weight::from_parts(357_287, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64extendui32(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_580_000 picoseconds. - Weight::from_parts(2_927_247, 0) - // Standard Error: 2_012 - .saturating_add(Weight::from_parts(181_106, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32wrapi64(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_308_000 picoseconds. - Weight::from_parts(2_742_236, 0) - // Standard Error: 2_482 - .saturating_add(Weight::from_parts(187_830, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64eq(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_324_000 picoseconds. - Weight::from_parts(2_385_000, 0) - // Standard Error: 9_154 - .saturating_add(Weight::from_parts(1_858_617, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32eq(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_237_000 picoseconds. - Weight::from_parts(2_302_000, 0) - // Standard Error: 7_801 - .saturating_add(Weight::from_parts(1_226_411, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64ne(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_265_000 picoseconds. - Weight::from_parts(2_358_000, 0) - // Standard Error: 9_102 - .saturating_add(Weight::from_parts(1_866_723, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32ne(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_267_000 picoseconds. - Weight::from_parts(2_381_000, 0) - // Standard Error: 8_629 - .saturating_add(Weight::from_parts(1_209_968, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64lts(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_274_000 picoseconds. - Weight::from_parts(2_330_000, 0) - // Standard Error: 9_193 - .saturating_add(Weight::from_parts(1_895_140, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32lts(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_306_000 picoseconds. - Weight::from_parts(2_394_000, 0) - // Standard Error: 7_780 - .saturating_add(Weight::from_parts(1_209_776, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64ltu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_273_000 picoseconds. - Weight::from_parts(2_395_000, 0) - // Standard Error: 8_868 - .saturating_add(Weight::from_parts(1_845_417, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32ltu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_280_000 picoseconds. - Weight::from_parts(2_360_000, 0) - // Standard Error: 8_139 - .saturating_add(Weight::from_parts(1_208_611, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64gts(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_299_000 picoseconds. - Weight::from_parts(2_335_000, 0) - // Standard Error: 8_008 - .saturating_add(Weight::from_parts(1_833_636, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32gts(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_222_000 picoseconds. - Weight::from_parts(2_376_000, 0) - // Standard Error: 7_996 - .saturating_add(Weight::from_parts(1_224_203, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64gtu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_371_000 picoseconds. - Weight::from_parts(2_421_000, 0) - // Standard Error: 9_119 - .saturating_add(Weight::from_parts(1_821_158, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32gtu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_305_000 picoseconds. - Weight::from_parts(2_418_000, 0) - // Standard Error: 7_441 - .saturating_add(Weight::from_parts(1_186_995, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64les(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_340_000 picoseconds. - Weight::from_parts(2_362_000, 0) - // Standard Error: 8_788 - .saturating_add(Weight::from_parts(1_811_701, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32les(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_352_000 picoseconds. - Weight::from_parts(2_431_000, 0) - // Standard Error: 6_620 - .saturating_add(Weight::from_parts(1_171_906, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64leu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_352_000 picoseconds. - Weight::from_parts(2_380_000, 0) - // Standard Error: 8_554 - .saturating_add(Weight::from_parts(1_821_955, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32leu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_299_000 picoseconds. - Weight::from_parts(2_389_000, 0) - // Standard Error: 7_710 - .saturating_add(Weight::from_parts(1_188_722, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64ges(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_325_000 picoseconds. - Weight::from_parts(2_387_000, 0) - // Standard Error: 10_150 - .saturating_add(Weight::from_parts(1_912_877, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32ges(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_377_000 picoseconds. - Weight::from_parts(2_423_000, 0) - // Standard Error: 6_824 - .saturating_add(Weight::from_parts(1_181_831, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64geu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_292_000 picoseconds. - Weight::from_parts(2_384_000, 0) - // Standard Error: 9_214 - .saturating_add(Weight::from_parts(1_842_825, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32geu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_283_000 picoseconds. - Weight::from_parts(2_344_000, 0) - // Standard Error: 7_145 - .saturating_add(Weight::from_parts(1_216_207, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64add(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_232_000 picoseconds. - Weight::from_parts(2_391_000, 0) - // Standard Error: 9_159 - .saturating_add(Weight::from_parts(1_360_135, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32add(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_279_000 picoseconds. - Weight::from_parts(2_379_000, 0) - // Standard Error: 5_400 - .saturating_add(Weight::from_parts(704_012, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64sub(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_355_000 picoseconds. - Weight::from_parts(2_402_000, 0) - // Standard Error: 8_632 - .saturating_add(Weight::from_parts(1_358_130, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32sub(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_365_000 picoseconds. - Weight::from_parts(2_389_000, 0) - // Standard Error: 4_840 - .saturating_add(Weight::from_parts(658_882, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64mul(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_209_000 picoseconds. - Weight::from_parts(2_324_000, 0) - // Standard Error: 8_679 - .saturating_add(Weight::from_parts(1_840_263, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32mul(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_258_000 picoseconds. - Weight::from_parts(2_382_000, 0) - // Standard Error: 7_484 - .saturating_add(Weight::from_parts(1_255_185, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64divs(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_369_000 picoseconds. - Weight::from_parts(6_412_885, 0) - // Standard Error: 22_130 - .saturating_add(Weight::from_parts(2_376_785, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32divs(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_266_000 picoseconds. - Weight::from_parts(2_981_330, 0) - // Standard Error: 11_996 - .saturating_add(Weight::from_parts(2_322_763, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64divu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_240_000 picoseconds. - Weight::from_parts(7_628_007, 0) - // Standard Error: 29_510 - .saturating_add(Weight::from_parts(2_483_957, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32divu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_387_000 picoseconds. - Weight::from_parts(4_910_027, 0) - // Standard Error: 23_548 - .saturating_add(Weight::from_parts(2_233_487, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64rems(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_297_000 picoseconds. - Weight::from_parts(16_240_633, 0) - // Standard Error: 67_100 - .saturating_add(Weight::from_parts(8_506_720, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32rems(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_234_000 picoseconds. - Weight::from_parts(2_498_693, 0) - // Standard Error: 48_996 - .saturating_add(Weight::from_parts(7_513_162, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64remu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_221_000 picoseconds. - Weight::from_parts(5_074_264, 0) - // Standard Error: 23_109 - .saturating_add(Weight::from_parts(2_727_269, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32remu(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_283_000 picoseconds. - Weight::from_parts(2_057_554, 0) - // Standard Error: 15_404 - .saturating_add(Weight::from_parts(2_428_553, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64and(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_250_000 picoseconds. - Weight::from_parts(2_359_000, 0) - // Standard Error: 8_133 - .saturating_add(Weight::from_parts(1_333_125, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32and(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_251_000 picoseconds. - Weight::from_parts(2_372_000, 0) - // Standard Error: 4_205 - .saturating_add(Weight::from_parts(671_074, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64or(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_257_000 picoseconds. - Weight::from_parts(2_323_000, 0) - // Standard Error: 7_098 - .saturating_add(Weight::from_parts(1_323_703, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32or(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_247_000 picoseconds. - Weight::from_parts(2_372_000, 0) - // Standard Error: 6_649 - .saturating_add(Weight::from_parts(695_117, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64xor(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_293_000 picoseconds. - Weight::from_parts(2_347_000, 0) - // Standard Error: 7_359 - .saturating_add(Weight::from_parts(1_355_885, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32xor(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_239_000 picoseconds. - Weight::from_parts(2_335_000, 0) - // Standard Error: 4_076 - .saturating_add(Weight::from_parts(658_834, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64shl(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_376_000 picoseconds. - Weight::from_parts(2_444_000, 0) - // Standard Error: 6_850 - .saturating_add(Weight::from_parts(1_191_253, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32shl(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_240_000 picoseconds. - Weight::from_parts(2_310_000, 0) - // Standard Error: 4_398 - .saturating_add(Weight::from_parts(597_162, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64shrs(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_338_000 picoseconds. - Weight::from_parts(2_421_000, 0) - // Standard Error: 8_320 - .saturating_add(Weight::from_parts(1_163_071, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32shrs(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_376_000 picoseconds. - Weight::from_parts(2_464_000, 0) - // Standard Error: 5_750 - .saturating_add(Weight::from_parts(613_283, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64shru(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_338_000 picoseconds. - Weight::from_parts(2_378_000, 0) - // Standard Error: 7_893 - .saturating_add(Weight::from_parts(1_161_655, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32shru(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_260_000 picoseconds. - Weight::from_parts(2_351_000, 0) - // Standard Error: 3_972 - .saturating_add(Weight::from_parts(605_013, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64rotl(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_324_000 picoseconds. - Weight::from_parts(2_375_000, 0) - // Standard Error: 7_329 - .saturating_add(Weight::from_parts(1_108_542, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32rotl(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_342_000 picoseconds. - Weight::from_parts(2_465_000, 0) - // Standard Error: 5_553 - .saturating_add(Weight::from_parts(617_389, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64rotr(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_260_000 picoseconds. - Weight::from_parts(2_419_000, 0) - // Standard Error: 8_448 - .saturating_add(Weight::from_parts(1_105_239, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32rotr(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_255_000 picoseconds. - Weight::from_parts(2_321_000, 0) - // Standard Error: 5_862 - .saturating_add(Weight::from_parts(626_497, 0).saturating_mul(r.into())) - } - fn tasks_remove_resume_session() -> Weight { - // Proof Size summary in bytes: - // Measured: `352` - // Estimated: `4169` - // Minimum execution time: 5_780_000 picoseconds. - Weight::from_parts(6_083_000, 4169) - .saturating_add(RocksDbWeight::get().reads(1_u64)) - .saturating_add(RocksDbWeight::get().writes(2_u64)) - } - fn tasks_remove_gas_reservation() -> Weight { - // Proof Size summary in bytes: - // Measured: `1039` - // Estimated: `23781` - // Minimum execution time: 62_100_000 picoseconds. - Weight::from_parts(64_771_000, 23781) - .saturating_add(RocksDbWeight::get().reads(7_u64)) - .saturating_add(RocksDbWeight::get().writes(6_u64)) - } - fn tasks_send_user_message_to_mailbox() -> Weight { - // Proof Size summary in bytes: - // Measured: `820` - // Estimated: `21750` - // Minimum execution time: 47_415_000 picoseconds. - Weight::from_parts(48_906_000, 21750) - .saturating_add(RocksDbWeight::get().reads(6_u64)) - .saturating_add(RocksDbWeight::get().writes(5_u64)) - } - fn tasks_send_user_message() -> Weight { - // Proof Size summary in bytes: - // Measured: `942` - // Estimated: `34143` - // Minimum execution time: 76_882_000 picoseconds. - Weight::from_parts(79_728_000, 34143) - .saturating_add(RocksDbWeight::get().reads(11_u64)) - .saturating_add(RocksDbWeight::get().writes(10_u64)) - } - fn tasks_send_dispatch() -> Weight { - // Proof Size summary in bytes: - // Measured: `627` - // Estimated: `20101` - // Minimum execution time: 32_342_000 picoseconds. - Weight::from_parts(33_851_000, 20101) - .saturating_add(RocksDbWeight::get().reads(7_u64)) - .saturating_add(RocksDbWeight::get().writes(6_u64)) - } - fn tasks_wake_message() -> Weight { - // Proof Size summary in bytes: - // Measured: `908` - // Estimated: `26160` - // Minimum execution time: 50_697_000 picoseconds. - Weight::from_parts(53_632_000, 26160) - .saturating_add(RocksDbWeight::get().reads(8_u64)) - .saturating_add(RocksDbWeight::get().writes(6_u64)) - } - fn tasks_wake_message_no_wake() -> Weight { - // Proof Size summary in bytes: - // Measured: `80` - // Estimated: `3545` - // Minimum execution time: 3_467_000 picoseconds. - Weight::from_parts(3_690_000, 3545) - .saturating_add(RocksDbWeight::get().reads(1_u64)) - } - fn tasks_remove_from_waitlist() -> Weight { - // Proof Size summary in bytes: - // Measured: `1558` - // Estimated: `57552` - // Minimum execution time: 111_822_000 picoseconds. - Weight::from_parts(115_245_000, 57552) - .saturating_add(RocksDbWeight::get().reads(16_u64)) - .saturating_add(RocksDbWeight::get().writes(13_u64)) - } - fn tasks_remove_from_mailbox() -> Weight { - // Proof Size summary in bytes: - // Measured: `1264` - // Estimated: `46350` - // Minimum execution time: 92_407_000 picoseconds. - Weight::from_parts(95_840_000, 46350) - .saturating_add(RocksDbWeight::get().reads(14_u64)) - .saturating_add(RocksDbWeight::get().writes(13_u64)) - } - /// The range of component `c` is `[0, 2044]`. - fn tasks_pause_program(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `2236 + c * (16400 ±0)` - // Estimated: `19543 + c * (84480 ±0)` - // Minimum execution time: 29_880_000 picoseconds. - Weight::from_parts(30_555_000, 19543) - // Standard Error: 65_806 - .saturating_add(Weight::from_parts(39_128_234, 0).saturating_mul(c.into())) - .saturating_add(RocksDbWeight::get().reads(4_u64)) - .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(c.into()))) - .saturating_add(RocksDbWeight::get().writes(2_u64)) - .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_parts(0, 84480).saturating_mul(c.into())) - } - /// The range of component `c` is `[0, 2044]`. - fn tasks_pause_program_uninited(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `3061 + c * (42 ±0)` - // Estimated: `59827 + c * (2947 ±0)` - // Minimum execution time: 89_781_000 picoseconds. - Weight::from_parts(109_193_287, 59827) - // Standard Error: 2_877 - .saturating_add(Weight::from_parts(1_067_792, 0).saturating_mul(c.into())) - .saturating_add(RocksDbWeight::get().reads(13_u64)) - .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(c.into()))) - .saturating_add(RocksDbWeight::get().writes(9_u64)) - .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_parts(0, 2947).saturating_mul(c.into())) - } -} diff --git a/runtime/gear/src/weights/pallet_gear_voucher.rs b/runtime/gear/src/weights/pallet_gear_voucher.rs deleted file mode 100644 index faa61af8320..00000000000 --- a/runtime/gear/src/weights/pallet_gear_voucher.rs +++ /dev/null @@ -1,68 +0,0 @@ -// This file is part of Gear. - -// Copyright (C) 2022-2023 Gear Technologies Inc. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// This program 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. - -// This program 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 this program. If not, see . - -//! Autogenerated weights for pallet_gear_voucher -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("gear-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/gear benchmark pallet --chain=gear-dev --steps=50 --repeat=20 --pallet=pallet_gear_voucher --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./scripts/benchmarking/weights-output/pallet_gear_voucher.rs --template=.maintain/frame-weight-template.hbs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(clippy::unnecessary_cast)] - -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; -use sp_std::marker::PhantomData; - -/// Weight functions needed for pallet_gear_voucher. -pub trait WeightInfo { - fn issue() -> Weight; -} - -/// Weights for pallet_gear_voucher using the Gear node and recommended hardware. -pub struct SubstrateWeight(PhantomData); -impl pallet_gear_voucher::WeightInfo for SubstrateWeight { - fn issue() -> Weight { - // Proof Size summary in bytes: - // Measured: `101` - // Estimated: `6196` - // Minimum execution time: 26_404_000 picoseconds. - Weight::from_parts(27_288_000, 6196) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) - } -} - -// For backwards compatibility and tests -impl WeightInfo for () { - fn issue() -> Weight { - // Proof Size summary in bytes: - // Measured: `101` - // Estimated: `6196` - // Minimum execution time: 26_404_000 picoseconds. - Weight::from_parts(27_288_000, 6196) - .saturating_add(RocksDbWeight::get().reads(2_u64)) - .saturating_add(RocksDbWeight::get().writes(2_u64)) - } -} diff --git a/runtime/gear/src/weights/pallet_timestamp.rs b/runtime/gear/src/weights/pallet_timestamp.rs deleted file mode 100644 index 10108dcc046..00000000000 --- a/runtime/gear/src/weights/pallet_timestamp.rs +++ /dev/null @@ -1,83 +0,0 @@ -// This file is part of Gear. - -// Copyright (C) 2022-2023 Gear Technologies Inc. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// This program 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. - -// This program 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 this program. If not, see . - -//! Autogenerated weights for pallet_timestamp -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("gear-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/gear benchmark pallet --chain=gear-dev --steps=50 --repeat=20 --pallet=pallet_timestamp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./scripts/benchmarking/weights-output/pallet_timestamp.rs --template=.maintain/frame-weight-template.hbs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(clippy::unnecessary_cast)] - -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; -use sp_std::marker::PhantomData; - -/// Weight functions needed for pallet_timestamp. -pub trait WeightInfo { - fn set() -> Weight; - fn on_finalize() -> Weight; -} - -/// Weights for pallet_timestamp using the Gear node and recommended hardware. -pub struct SubstrateWeight(PhantomData); -impl pallet_timestamp::WeightInfo for SubstrateWeight { - fn set() -> Weight { - // Proof Size summary in bytes: - // Measured: `211` - // Estimated: `2986` - // Minimum execution time: 9_212_000 picoseconds. - Weight::from_parts(9_792_000, 2986) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } - fn on_finalize() -> Weight { - // Proof Size summary in bytes: - // Measured: `94` - // Estimated: `0` - // Minimum execution time: 3_665_000 picoseconds. - Weight::from_parts(3_818_000, 0) - } -} - -// For backwards compatibility and tests -impl WeightInfo for () { - fn set() -> Weight { - // Proof Size summary in bytes: - // Measured: `211` - // Estimated: `2986` - // Minimum execution time: 9_212_000 picoseconds. - Weight::from_parts(9_792_000, 2986) - .saturating_add(RocksDbWeight::get().reads(2_u64)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) - } - fn on_finalize() -> Weight { - // Proof Size summary in bytes: - // Measured: `94` - // Estimated: `0` - // Minimum execution time: 3_665_000 picoseconds. - Weight::from_parts(3_818_000, 0) - } -} diff --git a/runtime/gear/src/weights/pallet_utility.rs b/runtime/gear/src/weights/pallet_utility.rs deleted file mode 100644 index 54156d38f3b..00000000000 --- a/runtime/gear/src/weights/pallet_utility.rs +++ /dev/null @@ -1,142 +0,0 @@ -// This file is part of Gear. - -// Copyright (C) 2022-2023 Gear Technologies Inc. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// This program 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. - -// This program 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 this program. If not, see . - -//! Autogenerated weights for pallet_utility -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("gear-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/gear benchmark pallet --chain=gear-dev --steps=50 --repeat=20 --pallet=pallet_utility --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./scripts/benchmarking/weights-output/pallet_utility.rs --template=.maintain/frame-weight-template.hbs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(clippy::unnecessary_cast)] - -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; -use sp_std::marker::PhantomData; - -/// Weight functions needed for pallet_utility. -pub trait WeightInfo { - fn batch(c: u32, ) -> Weight; - fn as_derivative() -> Weight; - fn batch_all(c: u32, ) -> Weight; - fn dispatch_as() -> Weight; - fn force_batch(c: u32, ) -> Weight; -} - -/// Weights for pallet_utility using the Gear node and recommended hardware. -pub struct SubstrateWeight(PhantomData); -impl pallet_utility::WeightInfo for SubstrateWeight { - /// 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: 5_345_000 picoseconds. - Weight::from_parts(4_423_143, 0) - // Standard Error: 4_589 - .saturating_add(Weight::from_parts(3_947_978, 0).saturating_mul(c.into())) - } - fn as_derivative() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_645_000 picoseconds. - Weight::from_parts(3_825_000, 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: 5_397_000 picoseconds. - Weight::from_parts(10_424_905, 0) - // Standard Error: 3_521 - .saturating_add(Weight::from_parts(4_132_846, 0).saturating_mul(c.into())) - } - fn dispatch_as() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 7_073_000 picoseconds. - Weight::from_parts(7_382_000, 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: 5_389_000 picoseconds. - Weight::from_parts(12_202_657, 0) - // Standard Error: 2_744 - .saturating_add(Weight::from_parts(3_910_883, 0).saturating_mul(c.into())) - } -} - -// For backwards compatibility and tests -impl WeightInfo for () { - /// 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: 5_345_000 picoseconds. - Weight::from_parts(4_423_143, 0) - // Standard Error: 4_589 - .saturating_add(Weight::from_parts(3_947_978, 0).saturating_mul(c.into())) - } - fn as_derivative() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_645_000 picoseconds. - Weight::from_parts(3_825_000, 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: 5_397_000 picoseconds. - Weight::from_parts(10_424_905, 0) - // Standard Error: 3_521 - .saturating_add(Weight::from_parts(4_132_846, 0).saturating_mul(c.into())) - } - fn dispatch_as() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 7_073_000 picoseconds. - Weight::from_parts(7_382_000, 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: 5_389_000 picoseconds. - Weight::from_parts(12_202_657, 0) - // Standard Error: 2_744 - .saturating_add(Weight::from_parts(3_910_883, 0).saturating_mul(c.into())) - } -} diff --git a/runtime/vara/Cargo.toml b/runtime/vara/Cargo.toml index c9178dd02c7..1c5d1b19d73 100644 --- a/runtime/vara/Cargo.toml +++ b/runtime/vara/Cargo.toml @@ -259,6 +259,11 @@ try-runtime = [ "pallet-bags-list/try-runtime", "runtime-common/try-runtime", ] +fuzz = [ + "common/fuzz", + "pallet-gear/fuzz", + "pallet-gear-gas/fuzz" +] dev = [ "pallet-gear-debug", "pallet-sudo", diff --git a/runtime/vara/build.rs b/runtime/vara/build.rs index 189ececba9b..07778f95f5c 100644 --- a/runtime/vara/build.rs +++ b/runtime/vara/build.rs @@ -18,7 +18,7 @@ fn main() { substrate_build_script_utils::generate_cargo_keys(); - #[cfg(feature = "std")] + #[cfg(all(feature = "std", not(feature = "fuzz")))] { substrate_wasm_builder::WasmBuilder::new() .with_current_project() diff --git a/runtime/vara/src/integration_tests.rs b/runtime/vara/src/integration_tests.rs index fbc17eef11f..ab5e6b3e4b9 100644 --- a/runtime/vara/src/integration_tests.rs +++ b/runtime/vara/src/integration_tests.rs @@ -30,8 +30,8 @@ use sp_core::{ed25519, sr25519, Pair}; use sp_keyring::AccountKeyring; use sp_runtime::{Digest, DigestItem}; -const ENDOWMENT: u128 = 100 * UNITS; -const STASH: u128 = 10 * UNITS; +const ENDOWMENT: u128 = 100_000 * UNITS; +const STASH: u128 = 1_000 * UNITS; pub(crate) fn initialize_block(new_blk: BlockNumberFor) { // All blocks are to be authored by validator at index 0 @@ -57,6 +57,7 @@ pub(crate) fn on_initialize(new_block_number: BlockNumberFor) { Babe::on_initialize(new_block_number); Balances::on_initialize(new_block_number); Authorship::on_initialize(new_block_number); + Treasury::on_initialize(new_block_number); GearProgram::on_initialize(new_block_number); GearMessenger::on_initialize(new_block_number); Gear::on_initialize(new_block_number); @@ -72,6 +73,7 @@ pub(crate) fn on_finalize(current_blk: BlockNumberFor) { Gear::on_finalize(current_blk); GearMessenger::on_finalize(current_blk); GearProgram::on_finalize(current_blk); + Treasury::on_finalize(current_blk); Authorship::on_finalize(current_blk); Balances::on_finalize(current_blk); Grandpa::on_finalize(current_blk); @@ -176,10 +178,11 @@ impl ExtBuilder { .assimilate_storage(&mut storage) .unwrap(); + #[cfg(feature = "dev")] SudoConfig { key: self.root } .assimilate_storage(&mut storage) .unwrap(); - + GenesisBuild::::assimilate_storage(&TreasuryConfig {}, &mut storage).unwrap(); GenesisBuild::::assimilate_storage( &VestingConfig { vesting: self.vested_accounts, @@ -244,6 +247,23 @@ pub(crate) fn get_last_program_id() -> [u8; 32] { } } +pub(crate) fn get_treasury_events() -> (Balance, Balance, Balance) { + System::events() + .into_iter() + .fold((0, 0, 0), |r, e| match e.event { + RuntimeEvent::Treasury(pallet_treasury::Event::Spending { budget_remaining }) => { + (budget_remaining, r.1, r.2) + } + RuntimeEvent::Treasury(pallet_treasury::Event::Burnt { burnt_funds }) => { + (r.0, burnt_funds, r.2) + } + RuntimeEvent::Treasury(pallet_treasury::Event::Rollover { rollover_balance }) => { + (r.0, r.1, rollover_balance) + } + _ => r, + }) +} + #[test] fn tokens_locking_works() { init_logger(); @@ -289,18 +309,18 @@ fn tokens_locking_works() { .endowment(ENDOWMENT) .endowed_accounts(vec![charlie.into(), dave.into(), eve.into(), ferdie.into()]) .vested_accounts(vec![ - (dave.into(), 10, 100, 10 * UNITS), // 1 TOKEN unlocked per block - (eve.into(), 10, 100, 10 * UNITS), - (ferdie.into(), 10, 100, 10 * UNITS), + (dave.into(), 10, 100, 10_000 * UNITS), // 1 TOKEN unlocked per block + (eve.into(), 10, 100, 10_000 * UNITS), + (ferdie.into(), 10, 100, 10_000 * UNITS), ]) .root(alice.into()) .build() .execute_with(|| { let acc_data = System::account(dave.to_account_id()).data; - // Free balance of vested accounts is still 100 TOKENS - assert_eq!(acc_data.free, 100 * UNITS); + // Free balance of vested accounts is still 100_000 TOKENS + assert_eq!(acc_data.free, 100_000 * UNITS); // Locked balance is 90 TOKENS - assert_eq!(acc_data.misc_frozen, 90 * UNITS); + assert_eq!(acc_data.misc_frozen, 90_000 * UNITS); // Locked funds can't be reserved to pay for gas and/or value // Transaction should be invalidated when attempting to `reserve` currency: @@ -313,7 +333,7 @@ fn tokens_locking_works() { b"salt".to_vec(), vec![], 10_000_000_000, - 10 * UNITS, + 10_000 * UNITS, ), pallet_gear_bank::Error::::InsufficientBalance ); @@ -321,7 +341,7 @@ fn tokens_locking_works() { // TODO: delete lines below (issue #3081). core::mem::drop(Balances::deposit_creating( &alice.to_account_id(), - 10 * UNITS, + 10_000 * UNITS, )); // Locked funds can't be transferred to a program as a message `value` @@ -345,10 +365,249 @@ fn tokens_locking_works() { program_id.into(), vec![], 10_000_000_000, - 11 * UNITS, - false, + 11_000 * UNITS, ), pallet_gear_bank::Error::::InsufficientBalance ); }); } + +#[test] +fn treasury_surplus_is_not_burned() { + init_logger(); + + let alice = AccountKeyring::Alice; + let bob = AccountKeyring::Bob; + let charlie = AccountKeyring::Charlie; + let dave = AccountKeyring::Dave; + + let treasury_id = Treasury::account_id(); + + ExtBuilder::default() + .initial_authorities(vec![ + ( + alice.into(), + charlie.into(), + alice.public(), + ed25519::Pair::from_string("//Alice", None) + .unwrap() + .public(), + alice.public(), + alice.public(), + ), + ( + bob.into(), + dave.into(), + bob.public(), + ed25519::Pair::from_string("//Bob", None).unwrap().public(), + bob.public(), + bob.public(), + ), + ]) + .stash(STASH) + .endowment(ENDOWMENT) + .endowed_accounts(vec![charlie.into(), dave.into()]) + .root(alice.into()) + .build() + .execute_with(|| { + // Treasury pot is empty in the beginning + assert_eq!(Treasury::pot(), 0); + + let initial_total_issuance = Balances::total_issuance(); + + // Top up treasury balance + assert_ok!(Balances::transfer( + RuntimeOrigin::signed(charlie.to_account_id()), + sp_runtime::MultiAddress::Id(treasury_id.clone()), + 1_000 * UNITS, + )); + assert_eq!(Treasury::pot(), 1_000 * UNITS); + + System::reset_events(); + + // Run chain for a day so that `Treasury::spend_funds()` is triggered + run_to_block(DAYS); + + // Check that the `Treasury::spend_funds()` has, indeed, taken place + let (budget_remaining, burnt_funds, rollover_balance) = get_treasury_events(); + // Treasury remaining budget value upon entry in `spend_funds()` function + assert_eq!(budget_remaining, 1_000 * UNITS); + // Actually burnt funds + assert_eq!(burnt_funds, 0); + // Remaining balance being rolled over to the next period + assert_eq!(rollover_balance, 1_000 * UNITS); + + // Treasury had a surplus, but none of it was burned + assert_eq!(Treasury::pot(), 1_000 * UNITS); + + // The total issuance persisted + assert_eq!(Balances::total_issuance(), initial_total_issuance); + + // Run chain until another `Treasury::spend_funds()` invocation + run_to_block(2 * DAYS); + + // Treasury still has a surplus, but nothing is burned + assert_eq!(Treasury::pot(), 1_000 * UNITS); + + assert_eq!(Balances::total_issuance(), initial_total_issuance); + }); +} + +#[test] +fn dust_ends_up_in_offset_pool() { + init_logger(); + + let alice = AccountKeyring::Alice; + let bob = AccountKeyring::Bob; + let charlie = AccountKeyring::Charlie; + let dave = AccountKeyring::Dave; + let ferdie = AccountKeyring::Ferdie; + + let offset_pool_id = StakingRewards::account_id(); + + ExtBuilder::default() + .initial_authorities(vec![ + ( + alice.into(), + charlie.into(), + alice.public(), + ed25519::Pair::from_string("//Alice", None) + .unwrap() + .public(), + alice.public(), + alice.public(), + ), + ( + bob.into(), + dave.into(), + bob.public(), + ed25519::Pair::from_string("//Bob", None).unwrap().public(), + bob.public(), + bob.public(), + ), + ]) + .stash(STASH) + .endowment(ENDOWMENT) + .endowed_accounts(vec![charlie.into(), dave.into(), offset_pool_id.clone()]) + .root(alice.into()) + .build() + .execute_with(|| { + let initial_pool_balance = Balances::free_balance(&offset_pool_id); + assert_eq!(initial_pool_balance, ENDOWMENT); + + let initial_total_issuance = Balances::total_issuance(); + + // Sending ED to `ferdie` to create the account in storage + assert_ok!(Balances::transfer( + RuntimeOrigin::signed(charlie.to_account_id()), + sp_runtime::MultiAddress::Id(ferdie.to_account_id()), + EXISTENTIAL_DEPOSIT, + )); + // `ferdie`'s balance is now ED + assert_eq!( + Balances::free_balance(ferdie.to_account_id()), + EXISTENTIAL_DEPOSIT + ); + + // Sending ED / 2 out of `ferdie` creates dust + assert_ok!(Balances::transfer( + RuntimeOrigin::signed(ferdie.to_account_id()), + sp_runtime::MultiAddress::Id(dave.to_account_id()), + EXISTENTIAL_DEPOSIT / 2, + )); + // `ferdie`'s balance is now 0 + assert_eq!(Balances::free_balance(ferdie.to_account_id()), 0); + // Dust has been accumulated in the offset pool account + assert_eq!( + Balances::free_balance(&offset_pool_id), + initial_pool_balance + EXISTENTIAL_DEPOSIT / 2 + ); + // The `total_issuance` has persisted + assert_eq!(Balances::total_issuance(), initial_total_issuance); + }); +} + +#[test] +fn slashed_proposals_back_to_treasury() { + init_logger(); + + let alice = AccountKeyring::Alice; + let bob = AccountKeyring::Bob; + let charlie = AccountKeyring::Charlie; + let dave = AccountKeyring::Dave; + let ferdie = AccountKeyring::Ferdie; + + let treasury_id = Treasury::account_id(); + + ExtBuilder::default() + .initial_authorities(vec![ + ( + alice.into(), + charlie.into(), + alice.public(), + ed25519::Pair::from_string("//Alice", None) + .unwrap() + .public(), + alice.public(), + alice.public(), + ), + ( + bob.into(), + dave.into(), + bob.public(), + ed25519::Pair::from_string("//Bob", None).unwrap().public(), + bob.public(), + bob.public(), + ), + ]) + .stash(STASH) + .endowment(ENDOWMENT) + .endowed_accounts(vec![charlie.into(), dave.into()]) + .root(alice.into()) + .build() + .execute_with(|| { + // Treasury pot is empty in the beginning + assert_eq!(Treasury::pot(), 0); + + let initial_total_issuance = Balances::total_issuance(); + + // Top up treasury balance + assert_ok!(Balances::transfer( + RuntimeOrigin::signed(charlie.to_account_id()), + sp_runtime::MultiAddress::Id(treasury_id.clone()), + 1_000 * UNITS, + )); + assert_eq!(Treasury::pot(), 1_000 * UNITS); + + assert_ok!(Treasury::propose_spend( + RuntimeOrigin::signed(dave.to_account_id()), + 1_000 * UNITS, + sp_runtime::MultiAddress::Id(ferdie.to_account_id()), + )); + let proposal_bond = + ::ProposalBond::get() * UNITS * 1_000; + let dave_acc_data = System::account(dave.to_account_id()).data; + // Proposer's free balance has decreased by the `proposal_bond` + assert_eq!(dave_acc_data.free, ENDOWMENT - proposal_bond); + // The reserved balance is 5% of the proposed amount + assert_eq!(dave_acc_data.reserved, proposal_bond); + + assert_ok!(Treasury::reject_proposal(RuntimeOrigin::root(), 0)); + + // Run chain for a day so that `Treasury::spend_funds()` is triggered + run_to_block(DAYS); + + // The `proposal_bond` has been slashed + let dave_acc_data = System::account(dave.to_account_id()).data; + assert_eq!(dave_acc_data.free, ENDOWMENT - proposal_bond); + // Nothing is reserved now + assert_eq!(dave_acc_data.reserved, 0); + + // Treasury funds haven't been spent, no burning has taken place, + // the slashed deposit has landed in the `Treasury`, as well + assert_eq!(Treasury::pot(), 1_000 * UNITS + proposal_bond); + + // The total issuance has, therefore, persisted + assert_eq!(Balances::total_issuance(), initial_total_issuance); + }); +} diff --git a/runtime/vara/src/lib.rs b/runtime/vara/src/lib.rs index 76635c44a70..8d11bc83579 100644 --- a/runtime/vara/src/lib.rs +++ b/runtime/vara/src/lib.rs @@ -21,7 +21,7 @@ #![recursion_limit = "256"] // Make the WASM binary available. -#[cfg(feature = "std")] +#[cfg(all(feature = "std", not(feature = "fuzz")))] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); use common::storage::{Mailbox, Messenger}; @@ -126,6 +126,13 @@ use governance::{pallet_custom_origins, GeneralAdmin, Treasurer, TreasurySpender mod migrations; +// By this we assert if runtime compiled with "dev" feature. +#[cfg_attr( + all(target_arch = "wasm32", target_os = "unknown", feature = "dev"), + link_section = "dev_runtime" +)] +static _DEV_RUNTIME: u8 = 0; + // By this we inject compile time version including commit hash // (https://github.com/paritytech/substrate/blob/297b3948f4a0f7f6504d4b654e16cb5d9201e523/utils/build-script-utils/src/version.rs#L44) // into the WASM runtime blob. This is used by the `runtime_wasmBlobVersion` RPC call. @@ -332,11 +339,9 @@ impl pallet_balances::Config for Runtime { type MaxLocks = ConstU32<50>; type MaxReserves = (); type ReserveIdentifier = [u8; 8]; - /// The type for recording an account's balance. type Balance = Balance; - /// The ubiquitous event type. type RuntimeEvent = RuntimeEvent; - type DustRemoval = (); + type DustRemoval = pallet_gear_staking_rewards::OffsetPool; type ExistentialDeposit = ConstU128; type AccountStore = System; type WeightInfo = weights::pallet_balances::SubstrateWeight; @@ -603,7 +608,7 @@ impl pallet_staking::Config for Runtime { type ElectionProvider = ElectionProviderMultiPhase; type GenesisElectionProvider = onchain::OnChainExecution; // Burning the reward remainder for now. - // TODO: set remainder back to `RewardsStash` to stop burning `Treasury` part. + // TODO: set remainder back to `RewardProxy` to stop burning `Treasury` part. type RewardRemainder = (); type RuntimeEvent = RuntimeEvent; type Slash = Treasury; @@ -683,7 +688,7 @@ parameter_types! { pub const ProposalBond: Permill = Permill::from_percent(5); pub const ProposalBondMinimum: Balance = ECONOMIC_UNITS; pub const SpendPeriod: BlockNumber = DAYS; - pub const Burn: Permill = Permill::from_percent(50); + pub const Burn: Permill = Permill::zero(); pub const TipCountdown: BlockNumber = DAYS; pub const TipFindersFee: Percent = Percent::from_percent(20); pub const TipReportDepositBase: Balance = ECONOMIC_UNITS; @@ -699,7 +704,7 @@ impl pallet_treasury::Config for Runtime { type ApproveOrigin = EitherOfDiverse, Treasurer>; type RejectOrigin = EitherOfDiverse, Treasurer>; type RuntimeEvent = RuntimeEvent; - type OnSlash = (); + type OnSlash = Treasury; type ProposalBond = ProposalBond; type ProposalBondMinimum = ProposalBondMinimum; type ProposalBondMaximum = (); @@ -1053,26 +1058,14 @@ pub struct DelegateFeeAccountBuilder; impl DelegateFee for DelegateFeeAccountBuilder { fn delegate_fee(call: &RuntimeCall, who: &AccountId) -> Option { match call { - RuntimeCall::Gear(pallet_gear::Call::send_message { - destination, - prepaid, - .. - }) => prepaid.then(|| GearVoucher::voucher_account_id(who, destination)), - RuntimeCall::Gear(pallet_gear::Call::send_reply { - reply_to_id, - prepaid, - .. - }) => { - if *prepaid { - <::Mailbox as Mailbox>::peek(who, reply_to_id).map( - |stored_message| { - GearVoucher::voucher_account_id(who, &stored_message.source()) - }, - ) - } else { - None - } - } + RuntimeCall::GearVoucher(pallet_gear_voucher::Call::call { + call: pallet_gear_voucher::PrepaidCall::SendMessage { destination, .. }, + }) => Some(GearVoucher::voucher_account_id(who, destination)), + RuntimeCall::GearVoucher(pallet_gear_voucher::Call::call { + call: pallet_gear_voucher::PrepaidCall::SendReply { reply_to_id, .. }, + }) => <::Mailbox as Mailbox>::peek(who, reply_to_id).map( + |stored_message| GearVoucher::voucher_account_id(who, &stored_message.source()), + ), _ => None, } } @@ -1093,6 +1086,7 @@ impl pallet_gear_voucher::Config for Runtime { type Currency = Balances; type PalletId = VoucherPalletId; type WeightInfo = weights::pallet_gear_voucher::SubstrateWeight; + type CallsDispatcher = Gear; } impl frame_system::offchain::SendTransactionTypes for Runtime diff --git a/rust-toolchain.toml b/rust-toolchain.toml index e0aea3b6e02..bfa941e41f9 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "nightly-2023-04-25" +channel = "nightly-2023-10-14" components = [ "llvm-tools" ] targets = [ "wasm32-unknown-unknown" ] profile = "default" diff --git a/sandbox/host/src/sandbox/wasmer_backend.rs b/sandbox/host/src/sandbox/wasmer_backend.rs index cc793f0095e..714451ac591 100644 --- a/sandbox/host/src/sandbox/wasmer_backend.rs +++ b/sandbox/host/src/sandbox/wasmer_backend.rs @@ -215,9 +215,7 @@ pub fn instantiate( wasmer::ExternType::Global(_) | wasmer::ExternType::Table(_) => (), wasmer::ExternType::Memory(_) => { - let exports = exports_map - .entry(import.module().to_string()) - .or_insert_with(wasmer::Exports::new); + let exports = exports_map.entry(import.module().to_string()).or_default(); let memory = guest_env .imports @@ -274,9 +272,7 @@ pub fn instantiate( } }; - let exports = exports_map - .entry(import.module().to_string()) - .or_insert_with(wasmer::Exports::new); + let exports = exports_map.entry(import.module().to_string()).or_default(); exports.insert(import.name(), wasmer::Extern::Function(function)); } diff --git a/scripts/check-spec.sh b/scripts/check-spec.sh index 3615a4b2f4e..c4e951062d2 100755 --- a/scripts/check-spec.sh +++ b/scripts/check-spec.sh @@ -39,11 +39,10 @@ check_spec() { PACKAGES_REQUIRE_BUMP_SPEC="common core core-backend core-processor node pallets runtime-interface" SPEC_ON_MASTER="$(git diff origin/master | sed -n -r "s/^\-[[:space:]]+spec_version: +([0-9]+),$/\1/p")" -ACTUAL_SPEC_GEAR="$(cat $ROOT_DIR/runtime/gear/src/lib.rs | grep "spec_version: " | awk -F " " '{print substr($2, 1, length($2)-1)}')" ACTUAL_SPEC_VARA="$(cat $ROOT_DIR/runtime/vara/src/lib.rs | grep "spec_version: " | awk -F " " '{print substr($2, 1, length($2)-1)}')" if [ -z "$SPEC_ON_MASTER" ]; then - SPEC_ON_MASTER=$ACTUAL_SPEC_GEAR + SPEC_ON_MASTER=$ACTUAL_SPEC_VARA fi for package in $(git diff --name-only origin/master | grep ".rs$" | cut -d "/" -f1 | uniq); do @@ -54,9 +53,6 @@ done EXIT_CODE=0 -header "Checking spec for Gear runtime" -check_spec "$SPEC_ON_MASTER" "$ACTUAL_SPEC_GEAR" "$CHANGES" - header "Checking spec for Vara runtime" check_spec "$SPEC_ON_MASTER" "$ACTUAL_SPEC_VARA" "$CHANGES" diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh deleted file mode 100755 index e78dbe6c55c..00000000000 --- a/scripts/ci_build.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash - -# Totally reproduces `CI::build` job locally. - -set -e - -SELF="$0" -ROOT_DIR="$(cd "$(dirname "$SELF")"/.. && pwd)" - -cd "$ROOT_DIR" - -echo "Show: Versioning" - ./scripts/gear.sh show - -echo "Build: Gear" - ./scripts/gear.sh build gear --locked --release - -echo "Build fuzzer" - ./scripts/gear.sh build fuzz --locked --release - -echo "Check: Gear runtime imports" - ./target/release/wasm-proc --check-runtime-imports target/release/wbuild/gear-runtime/gear_runtime.compact.wasm - -echo "Check: Vara runtime imports" - ./target/release/wasm-proc --check-runtime-imports target/release/wbuild/vara-runtime/vara_runtime.compact.wasm - -echo "Test: Gear workspace" - ./scripts/gear.sh test gear --exclude gclient --exclude gcli --release --locked - -echo "Test: `gcli`" - ./scripts/gear.sh test gcli --release --locked --retries 3 - -echo "Test: Client tests" - ./scripts/gear.sh test client --release - -echo "Test: gsdk tests" - ./scripts/gear.sh test gsdk --release - -echo "Test: Runtime benchmarks and benchmark tests work" - cargo build -p gear-cli --release --features=runtime-benchmarks,runtime-benchmarks-checkers - ./target/release/gear benchmark pallet --chain=dev --pallet=pallet_gear --steps=20 --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 - ./target/release/gear benchmark pallet --chain=dev --pallet=pallet_gear --extrinsic="check_all" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --extra - ./target/release/gear benchmark pallet --chain=dev --pallet=pallet_gear --extrinsic="check_lazy_pages_all" --execution=native --heap-pages=4096 --extra - -echo "Test: Sys-calls Wasmi integrity" - ./scripts/gear.sh test syscalls --release - -echo "Test: `try-runtime` feature tests" - cargo test -p "pallet-*" --features try-runtime --release --locked - -echo "Test: Try runtime migrations" - cargo build -p gear-cli --features try-runtime --release --locked - ./target/release/gear try-runtime --runtime ./target/release/wbuild/gear-runtime/gear_runtime.wasm on-runtime-upgrade --checks live --uri wss://rpc-private-testnet.gear-tech.io:443 diff --git a/scripts/src/check.sh b/scripts/src/check.sh index e8a13ae8a2b..97eb1ffd868 100755 --- a/scripts/src/check.sh +++ b/scripts/src/check.sh @@ -21,7 +21,7 @@ EOF gear_check() { echo " >> Check workspace without crates that use runtime with 'fuzz' feature" - __GEAR_WASM_BUILDER_NO_BUILD=1 SKIP_WASM_BUILD=1 SKIP_GEAR_RUNTIME_WASM_BUILD=1 SKIP_VARA_RUNTIME_WASM_BUILD=1 cargo check --workspace "$@" --exclude runtime-fuzzer --exclude runtime-fuzzer-fuzz + __GEAR_WASM_BUILDER_NO_BUILD=1 SKIP_WASM_BUILD=1 SKIP_VARA_RUNTIME_WASM_BUILD=1 cargo check --workspace "$@" --exclude runtime-fuzzer --exclude runtime-fuzzer-fuzz echo " >> Check crates that use runtime with 'fuzz' feature" cargo check "$@" -p runtime-fuzzer -p runtime-fuzzer-fuzz @@ -32,11 +32,6 @@ runtime_imports() { cargo build -p wasm-proc fi - if [ ! -f target/debug/wbuild/gear-runtime/gear_runtime.compact.wasm ]; then - cargo build -p gear-runtime - fi - ./target/debug/wasm-proc --check-runtime-imports target/debug/wbuild/gear-runtime/gear_runtime.compact.wasm - if [ ! -f target/debug/wbuild/vara-runtime/vara_runtime.compact.wasm ]; then cargo build -p vara-runtime fi diff --git a/scripts/src/clippy.sh b/scripts/src/clippy.sh index 7856e3ac00e..b70925273ea 100755 --- a/scripts/src/clippy.sh +++ b/scripts/src/clippy.sh @@ -20,13 +20,13 @@ EOF } gear_clippy() { - EXCLUDE_PACKAGES="--exclude gear-runtime --exclude runtime-fuzzer --exclude runtime-fuzzer-fuzz" - INCLUDE_PACKAGES="-p gear-runtime -p runtime-fuzzer -p runtime-fuzzer-fuzz" + EXCLUDE_PACKAGES="--exclude vara-runtime --exclude runtime-fuzzer --exclude runtime-fuzzer-fuzz" + INCLUDE_PACKAGES="-p vara-runtime -p runtime-fuzzer -p runtime-fuzzer-fuzz" - __GEAR_WASM_BUILDER_NO_BUILD=1 SKIP_WASM_BUILD=1 SKIP_GEAR_RUNTIME_WASM_BUILD=1 SKIP_VARA_RUNTIME_WASM_BUILD=1 cargo clippy --workspace "$@" $EXCLUDE_PACKAGES -- --no-deps -D warnings - __GEAR_WASM_BUILDER_NO_BUILD=1 SKIP_WASM_BUILD=1 SKIP_GEAR_RUNTIME_WASM_BUILD=1 SKIP_VARA_RUNTIME_WASM_BUILD=1 cargo clippy $INCLUDE_PACKAGES --all-features -- --no-deps -D warnings + __GEAR_WASM_BUILDER_NO_BUILD=1 SKIP_WASM_BUILD=1 SKIP_VARA_RUNTIME_WASM_BUILD=1 cargo clippy --workspace "$@" $EXCLUDE_PACKAGES -- --no-deps -D warnings + __GEAR_WASM_BUILDER_NO_BUILD=1 SKIP_WASM_BUILD=1 SKIP_VARA_RUNTIME_WASM_BUILD=1 cargo clippy $INCLUDE_PACKAGES --all-features -- --no-deps -D warnings } examples_clippy() { - __GEAR_WASM_BUILDER_NO_BUILD=1 SKIP_WASM_BUILD=1 SKIP_GEAR_RUNTIME_WASM_BUILD=1 SKIP_VARA_RUNTIME_WASM_BUILD=1 cargo clippy -p "demo-*" -p test-syscalls --no-default-features "$@" -- --no-deps -D warnings + __GEAR_WASM_BUILDER_NO_BUILD=1 SKIP_WASM_BUILD=1 SKIP_VARA_RUNTIME_WASM_BUILD=1 cargo clippy -p "demo-*" -p test-syscalls --no-default-features "$@" -- --no-deps -D warnings } diff --git a/scripts/src/test.sh b/scripts/src/test.sh index fbb0d801029..19a637876d3 100755 --- a/scripts/src/test.sh +++ b/scripts/src/test.sh @@ -42,20 +42,16 @@ workspace_test() { gsdk_test() { if [ "$CARGO" = "cargo xwin" ]; then $CARGO test -p gsdk --no-fail-fast "$@" - $CARGO test -p gsdk --no-fail-fast --features vara-testing "$@" else cargo nextest run -p gsdk --profile ci --no-fail-fast "$@" - cargo nextest run -p gsdk --features vara-testing --profile ci --no-fail-fast "$@" fi } gcli_test() { if [ "$CARGO" = "cargo xwin" ]; then $CARGO test -p gcli --no-fail-fast "$@" - $CARGO test -p gcli --features vara-testing --no-fail-fast "$@" else cargo nextest run -p gcli --profile ci --no-fail-fast "$@" - cargo nextest run -p gcli --features vara-testing --profile ci --no-fail-fast "$@" fi } @@ -112,7 +108,7 @@ doc_test() { MANIFEST="$1" shift - __GEAR_WASM_BUILDER_NO_BUILD=1 SKIP_WASM_BUILD=1 SKIP_GEAR_RUNTIME_WASM_BUILD=1 SKIP_VARA_RUNTIME_WASM_BUILD=1 $CARGO test --doc --workspace --exclude runtime-fuzzer --exclude runtime-fuzzer-fuzz --manifest-path="$MANIFEST" --no-fail-fast "$@" + __GEAR_WASM_BUILDER_NO_BUILD=1 SKIP_WASM_BUILD=1 SKIP_VARA_RUNTIME_WASM_BUILD=1 $CARGO test --doc --workspace --exclude runtime-fuzzer --exclude runtime-fuzzer-fuzz --manifest-path="$MANIFEST" --no-fail-fast "$@" } time_consuming_tests() { diff --git a/scripts/unpack-weights.sh b/scripts/unpack-weights.sh index 215068ed852..8dd734cf529 100755 --- a/scripts/unpack-weights.sh +++ b/scripts/unpack-weights.sh @@ -30,19 +30,17 @@ need() { # Dependencies need unzip -GEAR_RUNTIME="weights-gear.zip" VARA_RUNTIME="weights-vara.zip" -if [[ ! -f $GEAR_RUNTIME ]] || [[ ! -f $VARA_RUNTIME ]]; then - echo "You need to download artifacts with weights before unpacking: $GEAR_RUNTIME, $VARA_RUNTIME" +if [[ ! -f $VARA_RUNTIME ]]; then + echo "You need to download artifacts with weights before unpacking: $VARA_RUNTIME" echo "Please follow the link: https://github.com/gear-tech/gear/actions/workflows/benchmarks.yml" exit 1 fi # extract artifacts to the correct directories -unzip -o $GEAR_RUNTIME -d runtime/gear/src/weights/ && rm $GEAR_RUNTIME unzip -o $VARA_RUNTIME -d runtime/vara/src/weights/ && rm $VARA_RUNTIME # apply some patches for `pallets/gear/src/weights.rs` -cp runtime/gear/src/weights/pallet_gear.rs pallets/gear/src/weights.rs +cp runtime/vara/src/weights/pallet_gear.rs pallets/gear/src/weights.rs sed -i -E 's/\w+::WeightInfo for SubstrateWeight/WeightInfo for SubstrateWeight/' pallets/gear/src/weights.rs diff --git a/scripts/weight-diff.sh b/scripts/weight-diff.sh index 11a1baed4db..813da03b7ea 100755 --- a/scripts/weight-diff.sh +++ b/scripts/weight-diff.sh @@ -12,7 +12,7 @@ USAGE: ./weight-diff.sh [FLAGS] EXAMPLES: - ./weight-diff.sh master $(git branch --show-current) gear --display-units + ./weight-diff.sh master $(git branch --show-current) vara --display-units FLAGS: --display-units if present, displays the value in units @@ -20,7 +20,7 @@ FLAGS: ARGUMENTS: branch #1 from where to get the weights branch #2 from where to get the weights - what runtime to compare? [possible values: gear, vara] + what runtime to compare? [possible values: vara] EOF } diff --git a/utils/call-gen/src/send_message.rs b/utils/call-gen/src/send_message.rs index 0c4d2bbfb23..22fa41b2351 100644 --- a/utils/call-gen/src/send_message.rs +++ b/utils/call-gen/src/send_message.rs @@ -26,7 +26,7 @@ use gear_core::ids::ProgramId; use gear_utils::{NonEmpty, RingGet}; // destination, payload, gas, value -type SendMessageArgsInner = (ProgramId, Vec, u64, u128, bool); +type SendMessageArgsInner = (ProgramId, Vec, u64, u128); /// Send message args /// @@ -67,8 +67,6 @@ impl GeneratableCallArgs for SendMessageArgs { // TODO #2203 let value = 0; - let prepaid = false; - - Self((destination, payload, gas_limit, value, prepaid)) + Self((destination, payload, gas_limit, value)) } } diff --git a/utils/call-gen/src/send_reply.rs b/utils/call-gen/src/send_reply.rs index 2ef34ef7bba..25ca41046dc 100644 --- a/utils/call-gen/src/send_reply.rs +++ b/utils/call-gen/src/send_reply.rs @@ -25,8 +25,8 @@ use crate::{ use gear_core::ids::MessageId; use gear_utils::{NonEmpty, RingGet}; -// reply to message id, payload, gas limit, value, prepaid -type SendReplyArgsInner = (MessageId, Vec, u64, u128, bool); +// reply to message id, payload, gas limit, value. +type SendReplyArgsInner = (MessageId, Vec, u64, u128); /// Send reply args /// @@ -62,8 +62,6 @@ impl GeneratableCallArgs for SendReplyArgs { // TODO #2203 let value = 0; - let prepaid = false; - - Self((message_id, payload, gas_limit, value, prepaid)) + Self((message_id, payload, gas_limit, value)) } } diff --git a/utils/gear-replay-cli/Cargo.toml b/utils/gear-replay-cli/Cargo.toml index f4134a9d004..43d706388e7 100644 --- a/utils/gear-replay-cli/Cargo.toml +++ b/utils/gear-replay-cli/Cargo.toml @@ -9,7 +9,6 @@ license.workspace = true # Internal gear-runtime-interface.workspace = true runtime-primitives.workspace = true -gear-runtime = { workspace = true, optional = true, features = ["dev"] } vara-runtime = { workspace = true, optional = true, features = ["dev"] } service = { workspace = true, optional = true } @@ -54,7 +53,6 @@ std = [ "sc-executor/std", "frame-system/std", "gear-runtime-interface/std", - "gear-runtime?/std", "vara-runtime?/std", ] always-wasm = [] @@ -62,12 +60,7 @@ vara-native = [ "vara-runtime", "service/vara-native", ] -gear-native = [ - "gear-runtime", - "service/gear-native", -] try-runtime = [ - "gear-runtime?/try-runtime", "vara-runtime?/try-runtime", "service/try-runtime", ] diff --git a/utils/gear-replay-cli/README.md b/utils/gear-replay-cli/README.md index 67be521ba3f..e6e59291ece 100644 --- a/utils/gear-replay-cli/README.md +++ b/utils/gear-replay-cli/README.md @@ -107,7 +107,7 @@ In order to use the native runtime build make sure the node is built with the Ru General command format and available subcommand are: ```bash - gear-replay-cli -h + gear-replay-cli -h Commands of `gear-replay` CLI Usage: gear-replay-cli [OPTIONS] @@ -149,7 +149,7 @@ Currently supported cases include: The `gear-replay-cli` CLI tools provides means to enable execution of a downloaded block both against the on-chain WASM Runtime as well as the native local Runtime, provided the version of the latter matches the on-chain Runtime version. This can be useful for debugging. -The `wasm-only` version which runs the downloaded Runtime is lighter-weight (the executable is about 40% smaller as it doesn't include the `vara`- or `gear-runtime` as a dependency), and it works with both Gear testnet and the Vara chain (provided the user supplies the correct WebSocket connection uri). +The `wasm-only` version which runs the downloaded Runtime is lighter-weight (the executable is about 40% smaller as it doesn't include the `vara-runtime` as a dependency), and it works with both Gear testnet and the Vara chain (provided the user supplies the correct WebSocket connection uri). This is the default way of building the tool: ```bash @@ -166,14 +166,12 @@ In order to enable native runtime, use one of the following: ```bash make gear-replay-vara-native -make gear-replay-gear-native ``` or ```bash ./scripts/gear.sh build gear-replay --release --no-default-features --features=vara-native -./scripts/gear.sh build gear-replay --release --no-default-features --features=gear-native ``` The `--uri` parameter must match the native runtime you've built the tool with, while the Runtime version should be the same as the on-chain one. If it does not, the Wasm executor will be used as a fallback. diff --git a/utils/gear-replay-cli/src/cmd/gear_run.rs b/utils/gear-replay-cli/src/cmd/gear_run.rs index 1a946886978..93c5b5d5643 100644 --- a/utils/gear-replay-cli/src/cmd/gear_run.rs +++ b/utils/gear-replay-cli/src/cmd/gear_run.rs @@ -23,8 +23,6 @@ use clap::Parser; use codec::{Decode, Encode, Joiner}; #[cfg(feature = "always-wasm")] use sc_executor::sp_wasm_interface::ExtendedHostFunctions; -#[cfg(all(not(feature = "always-wasm"), feature = "gear-native"))] -use service::GearExecutorDispatch; #[cfg(all(not(feature = "always-wasm"), feature = "vara-native"))] use service::VaraExecutorDispatch; use sp_runtime::{ @@ -113,8 +111,6 @@ where // Create executor, suitable for usage in conjunction with the preferred execution strategy. #[cfg(all(not(feature = "always-wasm"), feature = "vara-native"))] let executor = build_executor::(); - #[cfg(all(not(feature = "always-wasm"), feature = "gear-native"))] - let executor = build_executor::(); #[cfg(feature = "always-wasm")] let executor = build_executor::< ExtendedHostFunctions< diff --git a/utils/gear-replay-cli/src/cmd/replay_block.rs b/utils/gear-replay-cli/src/cmd/replay_block.rs index 7be6ede95bc..4851f467f9a 100644 --- a/utils/gear-replay-cli/src/cmd/replay_block.rs +++ b/utils/gear-replay-cli/src/cmd/replay_block.rs @@ -23,8 +23,6 @@ use clap::Parser; use codec::{Decode, Encode}; #[cfg(feature = "always-wasm")] use sc_executor::sp_wasm_interface::ExtendedHostFunctions; -#[cfg(all(not(feature = "always-wasm"), feature = "gear-native"))] -use service::GearExecutorDispatch; #[cfg(all(not(feature = "always-wasm"), feature = "vara-native"))] use service::VaraExecutorDispatch; use sp_runtime::{ @@ -159,8 +157,6 @@ where // Create executor, suitable for usage in conjunction with the preferred execution strategy. #[cfg(all(not(feature = "always-wasm"), feature = "vara-native"))] let executor = build_executor::(); - #[cfg(all(not(feature = "always-wasm"), feature = "gear-native"))] - let executor = build_executor::(); #[cfg(feature = "always-wasm")] let executor = build_executor::< ExtendedHostFunctions< diff --git a/utils/node-loader/src/batch_pool.rs b/utils/node-loader/src/batch_pool.rs index e83d93d683c..5610bc2c5ed 100644 --- a/utils/node-loader/src/batch_pool.rs +++ b/utils/node-loader/src/batch_pool.rs @@ -264,7 +264,7 @@ async fn process_events( // States what amount of blocks we should wait for taking all the events about successful `messages` execution let wait_for_events_blocks = 30; // Multiply on five to be 100% sure if no events occurred, then node is crashed - let wait_for_events_millisec = api.expected_block_time()? as usize * wait_for_events_blocks * 5; + let wait_for_events_millisec = api.expected_block_time()? * wait_for_events_blocks * 5; let mut mailbox_added = BTreeSet::new(); @@ -274,15 +274,13 @@ async fn process_events( // Wait with a timeout until the `EventsReceiver` receives the expected block hash. while events.block_hash() != block_hash { tokio::time::sleep(Duration::new(0, 500)).await; - events = tokio::time::timeout( - Duration::from_millis(wait_for_events_millisec as u64), - rx.recv(), - ) - .await - .map_err(|_| { - tracing::debug!("Timeout is reached while waiting for events"); - anyhow!(utils::EVENTS_TIMEOUT_ERR_STR) - })??; + events = + tokio::time::timeout(Duration::from_millis(wait_for_events_millisec), rx.recv()) + .await + .map_err(|_| { + tracing::debug!("Timeout is reached while waiting for events"); + anyhow!(utils::EVENTS_TIMEOUT_ERR_STR) + })??; } // Wait for next n blocks and push new events. @@ -299,15 +297,13 @@ async fn process_events( v.push(event); } tokio::time::sleep(Duration::new(0, 100)).await; - events = tokio::time::timeout( - Duration::from_millis(wait_for_events_millisec as u64), - rx.recv(), - ) - .await - .map_err(|_| { - tracing::debug!("Timeout is reached while waiting for events"); - anyhow!(utils::EVENTS_TIMEOUT_ERR_STR) - })??; + events = + tokio::time::timeout(Duration::from_millis(wait_for_events_millisec), rx.recv()) + .await + .map_err(|_| { + tracing::debug!("Timeout is reached while waiting for events"); + anyhow!(utils::EVENTS_TIMEOUT_ERR_STR) + })??; } let mut mailbox_from_events = utils::capture_mailbox_messages(&api, &mut v) @@ -354,7 +350,7 @@ async fn inspect_crash_events(mut rx: EventsReceiver) -> Result<()> { // Error means either event is not found and can't be found // in the listener, or some other error during event // parsing occurred. - while let Ok(events) = tokio::time::timeout(Duration::from_secs(30), rx.recv()).await? { + while let Ok(events) = tokio::time::timeout(Duration::from_secs(90), rx.recv()).await? { let bh = events.block_hash(); for event in events.iter() { let event = event?.as_root_event::()?; diff --git a/utils/regression-analysis/Cargo.toml b/utils/regression-analysis/Cargo.toml index b4864c95a95..84ef81ba25f 100644 --- a/utils/regression-analysis/Cargo.toml +++ b/utils/regression-analysis/Cargo.toml @@ -14,6 +14,6 @@ serde = { workspace = true, features = ["derive"] } serde_json.workspace = true thousands.workspace = true -gear-runtime.workspace = true +vara-runtime.workspace = true pallet-gear.workspace = true frame-support.workspace = true diff --git a/utils/regression-analysis/src/main.rs b/utils/regression-analysis/src/main.rs index a751ed5fe72..05ee69fed04 100644 --- a/utils/regression-analysis/src/main.rs +++ b/utils/regression-analysis/src/main.rs @@ -266,7 +266,7 @@ fn weights(kind: WeightsKind, input_file: PathBuf, output_file: PathBuf) { } ) => {{ // check field is exist - let $name:: { + let $name:: { $( $field: _, )+ } = Default::default(); @@ -477,7 +477,7 @@ fn weights(kind: WeightsKind, input_file: PathBuf, output_file: PathBuf) { } } WeightsKind::Extrinsic => { - let extrinsics = pallet_gear::pallet::Call::::get_call_names(); + let extrinsics = pallet_gear::pallet::Call::::get_call_names(); benches.extend( extrinsics .iter() diff --git a/utils/runtime-fuzzer/Cargo.toml b/utils/runtime-fuzzer/Cargo.toml index 3de635c06e4..ff5195265ae 100644 --- a/utils/runtime-fuzzer/Cargo.toml +++ b/utils/runtime-fuzzer/Cargo.toml @@ -26,7 +26,7 @@ runtime-primitives.workspace = true gear-common.workspace = true gear-core.workspace = true gear-utils.workspace = true -gear-runtime = { workspace = true, features = ["std", "dev", "fuzz"] } +vara-runtime = { workspace = true, features = ["std", "dev", "fuzz"] } pallet-gear.workspace = true pallet-gear-bank.workspace = true @@ -40,6 +40,8 @@ pallet-balances.workspace = true sp-consensus-slots = { workspace = true } sp-consensus-babe.workspace = true sp-consensus-grandpa.workspace = true +pallet-im-online.workspace = true +sp-authority-discovery.workspace = true pallet-authorship.workspace = true [dev-dependencies] diff --git a/utils/runtime-fuzzer/src/gear_calls.rs b/utils/runtime-fuzzer/src/gear_calls.rs index e5dd10e7133..e616f9cfe4b 100644 --- a/utils/runtime-fuzzer/src/gear_calls.rs +++ b/utils/runtime-fuzzer/src/gear_calls.rs @@ -271,7 +271,6 @@ impl From for ExtrinsicGenerator { pub(crate) struct SendMessageGenerator { pub gas: u64, pub value: u128, - pub prepaid: bool, } impl SendMessageGenerator { @@ -291,7 +290,7 @@ impl SendMessageGenerator { log::trace!("Payload (send_message) length {:?}", payload.len()); Ok(Some( - SendMessageArgs((program_id, payload, self.gas, self.value, self.prepaid)).into(), + SendMessageArgs((program_id, payload, self.gas, self.value)).into(), )) } @@ -312,7 +311,6 @@ pub(crate) struct SendReplyGenerator { pub gas: u64, pub value: u128, - pub prepaid: bool, } impl SendReplyGenerator { @@ -334,9 +332,7 @@ impl SendReplyGenerator { ); log::trace!("Payload (send_reply) length {:?}", payload.len()); - Some( - SendReplyArgs((message_id, payload, self.gas, self.value, self.prepaid)).into(), - ) + Some(SendReplyArgs((message_id, payload, self.gas, self.value)).into()) } }) } diff --git a/utils/runtime-fuzzer/src/lib.rs b/utils/runtime-fuzzer/src/lib.rs index 86793e81e6a..a877e90f29b 100644 --- a/utils/runtime-fuzzer/src/lib.rs +++ b/utils/runtime-fuzzer/src/lib.rs @@ -29,12 +29,12 @@ use frame_support::pallet_prelude::DispatchResultWithPostInfo; use gear_call_gen::{ClaimValueArgs, GearCall, SendMessageArgs, SendReplyArgs, UploadProgramArgs}; use gear_calls::GearCalls; use gear_core::ids::ProgramId; -use gear_runtime::{AccountId, Gear, Runtime, RuntimeOrigin}; use pallet_balances::Pallet as BalancesPallet; use runtime::*; use sha1::*; use std::fmt::Debug; use utils::default_generator_set; +use vara_runtime::{AccountId, Gear, Runtime, RuntimeOrigin}; /// This is a wrapper over random bytes provided from fuzzer. /// @@ -120,25 +120,23 @@ fn execute_gear_call(sender: AccountId, call: GearCall) -> DispatchResultWithPos ) } GearCall::SendMessage(args) => { - let SendMessageArgs((destination, payload, gas_limit, value, prepaid)) = args; + let SendMessageArgs((destination, payload, gas_limit, value)) = args; Gear::send_message( RuntimeOrigin::signed(sender), destination, payload, gas_limit, value, - prepaid, ) } GearCall::SendReply(args) => { - let SendReplyArgs((message_id, payload, gas_limit, value, prepaid)) = args; + let SendReplyArgs((message_id, payload, gas_limit, value)) = args; Gear::send_reply( RuntimeOrigin::signed(sender), message_id, payload, gas_limit, value, - prepaid, ) } GearCall::ClaimValue(args) => { diff --git a/utils/runtime-fuzzer/src/runtime/account.rs b/utils/runtime-fuzzer/src/runtime/account.rs index 918bf71aadd..bef5d161ead 100644 --- a/utils/runtime-fuzzer/src/runtime/account.rs +++ b/utils/runtime-fuzzer/src/runtime/account.rs @@ -17,13 +17,15 @@ // along with this program. If not, see . use gear_common::Origin; -use gear_runtime::Runtime; use pallet_gear::BlockGasLimitOf; +use pallet_im_online::sr25519::AuthorityId as ImOnlineId; use runtime_primitives::{AccountId, AccountPublic, Balance}; +use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; use sp_consensus_babe::AuthorityId as BabeId; use sp_consensus_grandpa::AuthorityId as GrandpaId; use sp_core::{sr25519::Public, Pair, Public as TPublic}; use sp_runtime::{app_crypto::UncheckedFrom, traits::IdentifyAccount}; +use vara_runtime::Runtime; pub fn alice() -> AccountId { sp_keyring::Sr25519Keyring::Alice.to_account_id() @@ -36,11 +38,21 @@ pub fn account(v: T) -> AccountId { // TODO #2307 BabeId and GrandpaId are not needed at first? /// Generate authority keys. -pub fn authority_keys_from_seed(s: &str) -> (AccountId, BabeId, GrandpaId) { +pub fn authority_keys_from_seed( + s: &str, +) -> ( + AccountId, + BabeId, + GrandpaId, + ImOnlineId, + AuthorityDiscoveryId, +) { ( get_acc_id_from_seed::(s), get_pub_key_from_seed::(s), get_pub_key_from_seed::(s), + get_pub_key_from_seed::(s), + get_pub_key_from_seed::(s), ) } diff --git a/utils/runtime-fuzzer/src/runtime/block.rs b/utils/runtime-fuzzer/src/runtime/block.rs index 293d6eac2ff..47b7c568079 100644 --- a/utils/runtime-fuzzer/src/runtime/block.rs +++ b/utils/runtime-fuzzer/src/runtime/block.rs @@ -20,7 +20,6 @@ use codec::Encode; use frame_support::traits::{OnFinalize, OnInitialize}; use frame_system::pallet_prelude::BlockNumberFor; use gear_common::QueueRunner; -use gear_runtime::{Authorship, BlockGasLimit, Gear, GearGas, GearMessenger, Runtime, System}; use pallet_gear::BlockGasLimitOf; use sp_consensus_babe::{ digests::{PreDigest, SecondaryPlainPreDigest}, @@ -28,6 +27,7 @@ use sp_consensus_babe::{ }; use sp_consensus_slots::Slot; use sp_runtime::{Digest, DigestItem, Perbill}; +use vara_runtime::{Authorship, BlockGasLimit, Gear, GearGas, GearMessenger, Runtime, System}; /// This is not set to `BlockGasLimitOf::::get`, because of the /// known possible dead-lock for the message in the queue, when it's valid gas diff --git a/utils/runtime-fuzzer/src/runtime/mailbox.rs b/utils/runtime-fuzzer/src/runtime/mailbox.rs index d7376a1431d..87beb9555d1 100644 --- a/utils/runtime-fuzzer/src/runtime/mailbox.rs +++ b/utils/runtime-fuzzer/src/runtime/mailbox.rs @@ -1,7 +1,7 @@ use gear_common::storage::{IterableByKeyMap, Messenger}; use gear_core::ids::MessageId; -use gear_runtime::{AccountId, Runtime}; use pallet_gear::Config; +use vara_runtime::{AccountId, Runtime}; pub fn get_mailbox_messages(sender: &AccountId) -> Vec { <::Messenger as Messenger>::Mailbox::iter_key(sender.clone()) diff --git a/utils/runtime-fuzzer/src/runtime/mod.rs b/utils/runtime-fuzzer/src/runtime/mod.rs index bef5bfe726e..cebf312c3a7 100644 --- a/utils/runtime-fuzzer/src/runtime/mod.rs +++ b/utils/runtime-fuzzer/src/runtime/mod.rs @@ -23,12 +23,12 @@ use frame_support::{ traits::{Currency, GenesisBuild}, }; use frame_system::GenesisConfig as SystemConfig; -use gear_runtime::{ - AccountId, Balances, BankAddress, Runtime, RuntimeOrigin, SessionConfig, SessionKeys, -}; use pallet_balances::{GenesisConfig as BalancesConfig, Pallet as BalancesPallet}; use pallet_gear_bank::Config as GearBankConfig; use sp_io::TestExternalities; +use vara_runtime::{ + AccountId, Balances, BankAddress, Runtime, RuntimeOrigin, SessionConfig, SessionKeys, +}; pub use account::{account, alice}; pub use block::{default_gas_limit, run_to_block, run_to_next_block}; @@ -67,13 +67,15 @@ pub fn new_test_ext() -> TestExternalities { SessionConfig { keys: authorities .into_iter() - .map(|(account, babe_id, grandpa_id)| { + .map(|(account, babe, grandpa, im_online, authority_discovery)| { ( account.clone(), account, SessionKeys { - babe: babe_id, - grandpa: grandpa_id, + babe, + grandpa, + im_online, + authority_discovery, }, ) }) diff --git a/utils/runtime-fuzzer/src/utils.rs b/utils/runtime-fuzzer/src/utils.rs index c2a041652b9..812b3e34a9b 100644 --- a/utils/runtime-fuzzer/src/utils.rs +++ b/utils/runtime-fuzzer/src/utils.rs @@ -24,7 +24,7 @@ use crate::{ runtime::{self, default_gas_limit, get_mailbox_messages}, }; use gear_core::ids::MessageId; -use gear_runtime::AccountId; +use vara_runtime::AccountId; #[cfg(test)] pub fn min_unstructured_input_size() -> usize { @@ -52,7 +52,6 @@ pub(crate) fn default_generator_set(test_input_id: String) -> ExtrinsicGenerator SendMessageGenerator { gas: default_gas_limit(), value: 0, - prepaid: false, } .into(), ), @@ -64,7 +63,6 @@ pub(crate) fn default_generator_set(test_input_id: String) -> ExtrinsicGenerator }), gas: default_gas_limit(), value: 0, - prepaid: false, } .into(), ), diff --git a/utils/wasm-builder/src/lib.rs b/utils/wasm-builder/src/lib.rs index 2ec7221d3db..aac5416ee39 100644 --- a/utils/wasm-builder/src/lib.rs +++ b/utils/wasm-builder/src/lib.rs @@ -152,7 +152,7 @@ impl WasmBuilder { } // It may turn out that crate with a build script is built as a dependency of - // another crate with build script in the same process (gear-runtime -> pallet-gear -> examples). + // another crate with build script in the same process (runtime -> pallet-gear -> examples). // In that case, all the CARGO_FEATURE_ environment variables are propagated down to // the dependent crate which might not have the corresponding features at all. // In such situation, we just warn about unmatched features for diagnostic purposes and ignore them diff --git a/utils/wasm-gen/src/config/syscalls/injection.rs b/utils/wasm-gen/src/config/syscalls/injection.rs index 5b6694a0c68..0c843443c19 100644 --- a/utils/wasm-gen/src/config/syscalls/injection.rs +++ b/utils/wasm-gen/src/config/syscalls/injection.rs @@ -98,7 +98,8 @@ impl SysCallsInjectionTypes { .insert(name, SysCallInjectionType::Function(min..=max)); if let InvocableSysCall::Precise(syscall) = name { - let Some(required_imports) = InvocableSysCall::required_imports_for_syscall(syscall) else { + let Some(required_imports) = InvocableSysCall::required_imports_for_syscall(syscall) + else { return; }; diff --git a/utils/wasm-gen/src/generator/memory.rs b/utils/wasm-gen/src/generator/memory.rs index 997336aebc2..983401c4699 100644 --- a/utils/wasm-gen/src/generator/memory.rs +++ b/utils/wasm-gen/src/generator/memory.rs @@ -60,7 +60,7 @@ impl<'a, 'b> From> } impl MemoryGenerator { - pub(crate) const MEMORY_FIELD_NAME: &str = "memory"; + pub(crate) const MEMORY_FIELD_NAME: &'static str = "memory"; /// Instantiate the memory generator from wasm module and memory pages config. pub fn new(module: WasmModule, config: MemoryPagesConfig) -> Self { diff --git a/utils/wasm-gen/src/generator/syscalls/additional_data.rs b/utils/wasm-gen/src/generator/syscalls/additional_data.rs index f7a72917f78..05779481ebc 100644 --- a/utils/wasm-gen/src/generator/syscalls/additional_data.rs +++ b/utils/wasm-gen/src/generator/syscalls/additional_data.rs @@ -140,7 +140,9 @@ impl<'a, 'b> AdditionalDataInjector<'a, 'b> { )); } - let SysCallDestination::ExistingAddresses(existing_addresses) = self.config.syscall_destination() else { + let SysCallDestination::ExistingAddresses(existing_addresses) = + self.config.syscall_destination() + else { return None; }; diff --git a/utils/wasm-gen/src/generator/syscalls/invocator.rs b/utils/wasm-gen/src/generator/syscalls/invocator.rs index 0740a110776..e2e1f01916c 100644 --- a/utils/wasm-gen/src/generator/syscalls/invocator.rs +++ b/utils/wasm-gen/src/generator/syscalls/invocator.rs @@ -660,13 +660,15 @@ impl<'a, 'b> SysCallsInvocator<'a, 'b> { }); for export_call_indexes_handle in export_funcs_call_indexes_handles { - let FunctionIndex::Func(idx) = self.call_indexes + let FunctionIndex::Func(idx) = self + .call_indexes .get(*export_call_indexes_handle as usize) - .expect("getting by handle of existing call") else { - // Export can be to the import function by WASM specification, - // but we currently do not support this in wasm-gen. - panic!("Export cannot be to the import function"); - }; + .expect("getting by handle of existing call") + else { + // Export can be to the import function by WASM specification, + // but we currently do not support this in wasm-gen. + panic!("Export cannot be to the import function"); + }; let old_idx = *export_call_indexes_handle; *export_call_indexes_handle = idx + imports_num; diff --git a/utils/wasm-gen/src/wasm.rs b/utils/wasm-gen/src/wasm.rs index e0e6a146663..7bcea8e248d 100644 --- a/utils/wasm-gen/src/wasm.rs +++ b/utils/wasm-gen/src/wasm.rs @@ -136,8 +136,8 @@ impl WasmModule { for export in export_section.entries().iter() { if export.field() == ep.to_str() { let &Internal::Function(init_idx) = export.internal() else { - panic!("init export is not a func"); - }; + panic!("init export is not a func"); + }; return Some(init_idx); } } diff --git a/utils/wasm-proc/src/main.rs b/utils/wasm-proc/src/main.rs index a2585655fcf..3cc4b0d7892 100644 --- a/utils/wasm-proc/src/main.rs +++ b/utils/wasm-proc/src/main.rs @@ -119,6 +119,10 @@ struct Args { #[arg(long)] check_runtime_imports: bool, + /// Check runtime is built with dev feature or not + #[arg(long)] + check_runtime_is_dev: Option, + /// Verbose output #[arg(short, long)] verbose: bool, @@ -128,6 +132,19 @@ struct Args { path: Vec, } +fn check_rt_is_dev(path_to_wasm: &str, expected_to_be_dev: bool) -> Result<(), String> { + let module = parity_wasm::deserialize_file(path_to_wasm) + .map_err(|e| format!("Deserialization error: {e}"))?; + + let is_dev = module.custom_sections().any(|v| v.name() == "dev_runtime"); + + match (expected_to_be_dev, is_dev) { + (true, false) => Err(String::from("Runtime expected to be DEV, but it's NOT DEV")), + (false, true) => Err(String::from("Runtime expected to be NOT DEV, but it's DEV")), + _ => Ok(()), + } +} + fn check_rt_imports(path_to_wasm: &str, allowed_imports: &HashSet<&str>) -> Result<(), String> { let module = parity_wasm::deserialize_file(path_to_wasm) .map_err(|e| format!("Deserialization error: {e}"))?; @@ -163,6 +180,7 @@ fn main() -> Result<(), Box> { assembly_script, strip_custom_sections, check_runtime_imports, + check_runtime_is_dev, verbose, } = Args::parse(); @@ -187,6 +205,16 @@ fn main() -> Result<(), Box> { if check_runtime_imports { check_rt_imports(file, &rt_allowed_imports) .map_err(|e| format!("Error with `{file}`: {e}"))?; + + if check_runtime_is_dev.is_none() { + continue; + } + } + + if let Some(expected_to_be_dev) = check_runtime_is_dev { + check_rt_is_dev(file, expected_to_be_dev) + .map_err(|e| format!("Error with `{file}`: {e}"))?; + continue; } diff --git a/utils/weight-diff/Cargo.toml b/utils/weight-diff/Cargo.toml index 32dbd38e848..a9bd4c21aa2 100644 --- a/utils/weight-diff/Cargo.toml +++ b/utils/weight-diff/Cargo.toml @@ -15,5 +15,4 @@ tabled.workspace = true pallet-gear.workspace = true frame-support.workspace = true -gear-runtime.workspace = true vara-runtime.workspace = true diff --git a/utils/weight-diff/src/main.rs b/utils/weight-diff/src/main.rs index a40f85b1090..ae852cf1d50 100644 --- a/utils/weight-diff/src/main.rs +++ b/utils/weight-diff/src/main.rs @@ -68,7 +68,6 @@ enum Commands { #[derive(Debug, Copy, Clone, ValueEnum)] enum Runtime { - Gear, Vara, } @@ -81,7 +80,6 @@ enum WeightsKind { #[derive(Debug, Serialize)] struct SerializableDump { - gear_schedule: Schedule, vara_schedule: Schedule, #[serde(skip_serializing_if = "Option::is_none")] label: Option, @@ -89,7 +87,6 @@ struct SerializableDump { #[derive(Debug, Deserialize)] struct DeserializableDump { - gear_schedule: DeserializableSchedule, vara_schedule: DeserializableSchedule, label: Option, } @@ -197,7 +194,6 @@ fn main() { serde_json::to_writer_pretty( writer, &SerializableDump { - gear_schedule: Default::default(), vara_schedule: Default::default(), label, }, @@ -218,7 +214,6 @@ fn main() { serde_json::from_str(&fs::read_to_string(output_path2).unwrap()).unwrap(); let (schedule1, schedule2) = match runtime { - Runtime::Gear => (dump1.gear_schedule, dump2.gear_schedule), Runtime::Vara => (dump1.vara_schedule, dump2.vara_schedule), };