merge v1 into main (#175)

* Add zombienet config to release (#158)

* Cleanup docs for the release (#160)

* Updated documentation to version 1.7.0
* Updated broken links

* updated docs to v1.10 (#166)

* updated dependencies to v1.10.0 (#165)

* Fixed weights for non-XCM related pallets (#149)

* add remove proxies to filter (#146)

* Fix weights for XCM and Message Queue.  (#153)

* Fix for PriceForSiblingDelivery (#156)

* Fix the FeeManager setting (#159)

* better explanation for constants (#167)

* better explanation for constants

* Removed polkadot launch (#169)

* Removed warnings about experimental code. (#170)

* Attached audit.

* toml sort

* changelog and version bump (#174)

* changelog and version bump

* cargo fmt fix

---------

Co-authored-by: Nikita Khateev <nikita.khateev@openzeppelin.com>
Co-authored-by: Amar Singh <asinghchrony@protonmail.com>
This commit is contained in:
Özgün Özerk
2024-04-29 11:06:24 +03:00
committed by GitHub
parent 26778e090f
commit 30930edda5
43 changed files with 4318 additions and 1462 deletions
+18
View File
@@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Released]
## [1.0.0] - 2024-04-25
### Added
- Audit report (#170)
- Upgraded from v1.7.0 to v1.10.0 (#165)
- Upgraded docs to v1.10.0 (#166)
### Fixed
- removed `polkadot launch` (#169)
- explanation for runtime constants (#167)
- proxy filters (#146)
- weights for non-XCM related pallets (#149)
## [Unreleased]
## [0.1.2] - 2024-02-20
Generated
+1444 -1150
View File
File diff suppressed because it is too large Load Diff
+97 -97
View File
@@ -10,11 +10,11 @@ license = "GPL-3.0-only"
repository = "https://github.com/OpenZeppelin/polkadot-runtime-template"
[workspace.dependencies]
clap = { version = "4.4.6", features = [ "derive" ] }
clap = { version = "4.5.3", features = [ "derive" ] }
color-print = "0.3.4"
futures = "0.3.28"
hex-literal = "0.4.1"
jsonrpsee = { version = "0.20.3", features = [ "server" ] }
jsonrpsee = { version = "0.22", features = [ "server" ] }
log = { version = "0.4.20", default-features = false }
parity-scale-codec = { version = "3.0.0", default-features = false, features = [
"derive",
@@ -26,107 +26,107 @@ serde_json = "1.0.108"
smallvec = "1.11.0"
# Substrate
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
pallet-assets = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
pallet-conviction-voting = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
pallet-referenda = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
pallet-whitelist = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sc-network = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sc-service = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sp-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sp-arithmetic = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.7.0" }
sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sp-session = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sp-state-machine = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sp-std = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
sp-version = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.7.0" }
substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.7.0" }
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
pallet-assets = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
pallet-conviction-voting = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
pallet-referenda = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
pallet-whitelist = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sc-network = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sc-service = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sp-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sp-arithmetic = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.10.0" }
sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sp-session = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sp-state-machine = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sp-std = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
sp-version = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.10.0" }
substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.10.0" }
# Polkadot
pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", features = [
"rococo-native",
], tag = "polkadot-v1.7.0" }
polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
], tag = "polkadot-v1.10.0" }
polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
# Cumulus
assets-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
cumulus-primitives-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
parachain-info = { package = "staging-parachain-info", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
parachains-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.7.0" }
assets-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
cumulus-primitives-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
parachain-info = { package = "staging-parachain-info", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
parachains-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.10.0" }
# Fuzzer
substrate-runtime-fuzzer = { git = "https://github.com/srlabs/substrate-runtime-fuzzer.git", default-features = false }
+1 -3
View File
@@ -11,12 +11,10 @@ to be filled
## Security
> ⚠️ Warning! ⚠️
> This project is still in a very early and experimental phase. It has never been audited nor thoroughly reviewed for security vulnerabilities. Do not use in production.
Past audits can be found in [`/audits`](/audits/) directory.
Refer to [SECURITY.md](SECURITY.md) for more details.
## License
OpenZeppelin Runtime Template for Substrate is released under the [GNU v3 License](LICENSE).
-3
View File
@@ -1,6 +1,3 @@
# Security
> ⚠️ Warning! ⚠️
> This project is still in a very early and experimental phase. It has never been audited nor thoroughly reviewed for security vulnerabilities. Do not use in production.
Please report any security issues you find to security@openzeppelin.com.
Binary file not shown.
+2 -2
View File
@@ -1,8 +1,8 @@
name: substrate-runtimes
title: Substrate Runtime
title: Substrate Runtimes
version: 0.1.0
nav:
- modules/ROOT/nav.adoc
asciidoc:
attributes:
page-sidebar-collapse-default: false
page-sidebar-collapse-default: false
-1
View File
@@ -6,7 +6,6 @@
* Runtime Descriptions
** xref:runtime/xcm_executor.adoc[XCM Executor]
* Pallet Specifications
** xref:pallets/aura_ext.adoc[cumulus_aura_ext]
** xref:pallets/collator-selection.adoc[collator_selection]
** xref:pallets/aura_ext.adoc[cumulus_pallet_aura_ext]
** xref:pallets/parachain-system.adoc[cumulus_pallet_parachain_system]
+7 -5
View File
@@ -4,7 +4,9 @@
= pallet_assets
Branch/Release: `release-polkadot-v1.3.0`
Branch/Release: `release-polkadot-v1.10.0`
== Source Code link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.10.0/substrate/frame/assets/src/lib.rs[{github-icon},role=heading-link]
== Purpose
@@ -17,7 +19,7 @@ The `pallet_assets` module is designed to manage and manipulate custom fungible
** `Admin` - The account that has administrative privileges over an asset, such as: `minting`, `burning`, `freezing`, and `thawing`.
** `Sufficiency` - The amount of an asset that is required to be held in an account in order to perform certain operations, such as: `transfers`, `freezing`, and `thawing`.
== Config link:https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/assets/src/lib.rs#L231[{github-icon},role=heading-link]
== Config
* Pallet-specific configs
** `Balance` -- The balance unit type.
@@ -41,7 +43,7 @@ The `pallet_assets` module is designed to manage and manipulate custom fungible
** `RuntimeEvent` -- The overarching event type.
** `WeightInfo` -- xref:glossary.adoc#weight[Weight] information for extrinsics in this pallet.
== Events link:https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/assets/src/lib.rs#L442[{github-icon},role=heading-link]
== Events
* `Created(asset_id, creator, owner)` -- An asset was created.
* `Issued(asset_id, owner, amount)` -- An asset was issued.
@@ -68,7 +70,7 @@ The `pallet_assets` module is designed to manage and manipulate custom fungible
* `Touched(asset_id, who, depositor)` -- An account `who` was created with a deposit from `depositor`.
* `Blocked(asset_id, who)` -- An account `who` was blocked.
== Errors link:https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/assets/src/lib.rs#L526[{github-icon},role=heading-link]
== Errors
* `BalanceLow` -- Account balance must be greater than or equal to the transfer amount.
* `NoAccount` -- The account to alter does not exist.
@@ -91,7 +93,7 @@ The `pallet_assets` module is designed to manage and manipulate custom fungible
* `NotFrozen` -- The asset should be frozen before the given operation.
* `CallbackFailed` -- Callback action resulted in error.
== Dispatchables link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/substrate/frame/assets/src/lib.rs#L576[{github-icon},role=heading-link]
== Dispatchables
[.contract-item]
[[create]]
@@ -4,7 +4,7 @@
= cumulus_pallet_aura_ext
Branch/Release: `release-polkadot-v1.3.0`
Branch/Release: `release-polkadot-v1.10.0`
== Purpose
@@ -13,7 +13,7 @@ This pallet integrates parachains own block production mechanism (for example
- to manage the unincluded blocks from the current slot
- to validate produced block against the relay chain
== Configuration and Integration link:https://github.com/paritytech/polkadot-sdk/tree/release-polkadot-v1.3.0/cumulus/pallets/aura-ext[{github-icon},role=heading-link]
== Configuration and Integration link:https://github.com/paritytech/polkadot-sdk/tree/release-polkadot-v1.10.0/cumulus/pallets/aura-ext[{github-icon},role=heading-link]
There is no special config for this integration and it has no dispatchables, but you need to integrate it with other `parachain-system` crate:
+31 -6
View File
@@ -4,7 +4,9 @@
= pallet_balances
Branch/Release: `release-polkadot-v1.3.0`
Branch/Release: `release-polkadot-v1.10.0`
== Source Code link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.10.0/substrate/frame/balances/src/lib.rs[{github-icon},role=heading-link]
== Purpose
@@ -19,7 +21,7 @@ The Balances pallet provides functions for:
* Managing total issuance.
* Setting and managing xref:glossary.adoc#lock[locks].
== Config link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/substrate/frame/balances/src/lib.rs#L253[{github-icon},role=heading-link]
== Config
* Pallet-specific configs
** `RuntimeHoldReason` -- The overarching xref:glossary.adoc#hold[hold] reason.
@@ -32,13 +34,12 @@ The Balances pallet provides functions for:
** `FreezeIdentifier` -- The ID type for freezes.
** `MaxLocks` -- The maximum number of locks that should exist on an account.
** `MaxReserves` -- The maximum number of named reserves that can exist on an account. The use of reserves is deprecated in favor of holds. See `https://github.com/paritytech/substrate/pull/12951/`
** `MaxHolds` -- The maximum number of holds that can exist on an account at any time.
** `MaxFreezes` -- The maximum number of individual freeze locks that can exist on an account at any time.
* Common configs
** `RuntimeEvent` -- The overarching event type.
** `WeightInfo` -- xref:glossary.adoc#weight[Weight] information for extrinsics in this pallet.
== Events link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/substrate/frame/balances/src/lib.rs#L339[{github-icon},role=heading-link]
== Events
* `Endowed(account, free_balance)` -- An account was created with some free balance.
* `DustLost(account, amount)` -- An account was removed whose balance was non-zero but below ExistentialDeposit, resulting in an outright loss.
@@ -61,8 +62,9 @@ The Balances pallet provides functions for:
* `Unlocked(who, amount)` -- Some balance was unlocked.
* `Frozen(who, amount)` -- Some balance was frozen.
* `Thawed(who, amount)` -- Some balance was thawed.
* `TotalIssuanceForced(old, new)` -- Total issuance was forcefully changed.
== Errors link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/substrate/frame/balances/src/lib.rs#L392[{github-icon},role=heading-link]
== Errors
* `VestingBalance` -- Vesting balance too high to send value.
* `LiquidityRestrictions` -- Account liquidity restrictions prevent withdrawal.
@@ -74,8 +76,10 @@ The Balances pallet provides functions for:
* `TooManyReserves` -- Number of named reserves exceed `MaxReserves`.
* `TooManyHolds` -- Number of holds exceeds `MaxHolds`.
* `TooManyFreezes` -- Number of freezes exceeds `MaxFreezes`.
* `IssuanceDeactivated` -- The issuance cannot be modified since it is already deactivated.
* `DeltaZero` -- The delta cannot be zero.
== Dispatchables link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/substrate/frame/balances/src/lib.rs#L570[{github-icon},role=heading-link]
== Dispatchables
[.contract-item]
[[transfer_allow_death]]
@@ -220,3 +224,24 @@ Set the regular balance of a given account. The caller (origin) must be root.
* `origin: OriginFor<T>` -- caller, must be root.
* `who: AccountIdLookupOf<T>` -- the account for which the balance will be set.
* `new_free: T::Balance` -- the amount of free balance that will be set to the given account.
[.contract-item]
[[force_adjust_total_issuance]]
==== `[.contract-item-name]#++force_adjust_total_issuance++#`
[source,rust]
----
pub fn force_adjust_total_issuance(
origin: OriginFor<T>,
direction: AdjustmentDirection,
#[pallet::compact] delta: T::Balance,
) -> DispatchResult
----
Adjust the total issuance in a saturating way.
Can only be called by root and always needs a positive delta.
**Params:**
* `origin: OriginFor<T>` -- caller, must be root.
* `direction: AdjustmentDirection` -- the direction of issuance change (increase or decrease).
* `delta: T::Balance` -- the amount of free balance that will be set to the given account.
@@ -4,13 +4,15 @@
= collator_selection
Branch/Release: `release-polkadot-v1.3.0`
Branch/Release: `release-polkadot-v1.10.0`
== Source Code link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.10.0/cumulus/pallets/collator-selection/src/lib.rs[{github-icon},role=heading-link]
== Purpose
This pallet is needed to manage the set of xref:glossary.adoc#collator[collators] for each session and to provision the next session with the actual list of collators.
== Config link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/cumulus/pallets/collator-selection/src/lib.rs#L118[{github-icon},role=heading-link]
== Config
* Pallet-specific configs
** `UpdateOrigin` — defines the list of origins that are able to modify the settings of collators (e.g. set and remove list of xref:glossary.adoc#invulnerable[invulnerables], desired xref:glossary.adoc#candidates[candidates], xref:glossary.adoc#candidacy_bond[candidacy bond]). This type should implement the trait `EnsureOrigin`.
@@ -27,7 +29,7 @@ This pallet is needed to manage the set of xref:glossary.adoc#collator[collators
** `Currency`
** `WeightInfo`
== Dispatchables link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/cumulus/pallets/collator-selection/src/lib.rs#L301[{github-icon},role=heading-link]
== Dispatchables
[.contract-item]
[[set_invulnerables]]
@@ -36,7 +38,7 @@ This pallet is needed to manage the set of xref:glossary.adoc#collator[collators
----
pub fn set_invulnerables(new: Vec<T::AccountId>)
----
Sets a new list of invulnerable collators. The call must be signed and origin of the call must fulfill the EnsureOrigin check.
Sets a new list of invulnerable collators. The call must be signed and origin of the call must fulfill the EnsureOrigin check.
IMPORTANT: This call does not maintain the mutual exclusiveness of candidates and invulnerables lists.
@@ -83,7 +85,7 @@ Set a new maximum possible number of candidates. If it is higher than `Config::M
----
pub fn set_candidacy_bond(max: u32)
----
Set the amount for the deposit to be a candidate for collator.
Set the amount for the deposit to be a candidate for collator.
**Params:**
@@ -186,4 +188,68 @@ Remove an invulnerable from the list. Call must be signed and caller pass `Confi
**Events:**
- `InvulnerableRemoved(account_id)`
- `InvulnerableRemoved(account_id)`
[.contract-item]
[[update_bond]]
==== `[.contract-item-name]#++update_bond++#`
[source,rust]
----
pub fn update_bond(new_deposit: BalanceOf<T>)
----
Update the candidacy bond of origin to the new value.
*Params:*
- `new_deposit: BalanceOf<T>` — new value for the candidacy bond
**Errors:**
- `BadOrigin` — callers origin does not fulfill the `Config::EnsureOrigin` check.
- `DepositTooLow` - new deposit is smaller than required candidacy bond.
- `NotCandidate` - caller's origin is not a candidate
- `IdenticalDeposit` - deposit have not changed
- `InsufficientBalance` — candidate does not have enough funds for deposit for candidacy bond
- `LiquidityRestrictions` — account restrictions (like frozen funds or vesting) prevent from creating a deposit
- `Overflow` — reserved funds overflow the currency type. Should not happen in usual scenarios.
- `InvalidUnreserve` - after the unreserve the number of candidates becomes less than desired.
- `InsertToCandidateListFailed` - candidate list is at maximum capacity. Should not happen in usual scenarios. Chain is misconfigured.
**Events:**
- `CandidateBondUpdated(account_id, deposit)`
[.contract-item]
[[take_candidate_slot]]
==== `[.contract-item-name]#++take_candidate_slot++#`
[source,rust]
----
pub fn take_candidate_slot(
deposit: BalanceOf<T>,
target: T::AccountId,
)
----
Try to replace the target's candidacy by making a bigger candidacy bond.
*Params:*
- `deposit: BalanceOf<T>` — value for the candidacy bond
- `target: T::AccountId` - target candidate to replace
**Errors:**
- `BadOrigin` — callers origin does not fulfill the `Config::EnsureOrigin` check.
- `AlreadyInvulnerable` — caller is already in invulnerable collators list.
- `InsufficientBond` - the deposit is less the candidacy bond or target's deposit.
- `NoAssociatedValidatorId` — caller does not have a session key.
- `ValidatorNotRegistered` — caller session key is not registered.
- `AlreadyCandidate` — caller is already in candidates list.
- `TargetIsNotCandidate` - target is not in candidate list.
- `InsufficientBalance` — candidate does not have enough funds for deposit for candidacy bond
- `LiquidityRestrictions` — account restrictions (like frozen funds or vesting) prevent from creating a deposit
- `Overflow` — reserved funds overflow the currency type. Should not happen in usual scenarios.
**Events:**
- `CandidateReplaced(old, new, deposit)`
@@ -4,13 +4,15 @@
= pallet_message_queue
Branch/Release: `release-polkadot-v{1.3.0}`
Branch/Release: `release-polkadot-v1.10.0`
Source Code link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.10.0/substrate/frame/message-queue/src/lib.rs[{github-icon},role=heading-link]
== Purpose
Flexible FRAME pallet for implementing message queues. This pallet can also initiate message processing using the `MessageProcessor` (see `Config`).
== Config link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/substrate/frame/message-queue/src/lib.rs#L445[{github-icon},role=heading-link]
== Config
* Pallet-specific configs:
** `MessageProcessor` -- Processor for messages
** `Size` -- Page/heap size type.
@@ -18,12 +20,13 @@ Flexible FRAME pallet for implementing message queues. This pallet can also init
** `QueuePausedQuery` -- Queried by the pallet to check whether a queue can be serviced.
** `HeapSize` -- The size of the page; this also serves as the maximum message size which can be sent.
** `MaxStale` -- The maximum number of stale pages (i.e. of overweight messages) allowed before culling can happen. Once there are more stale pages than this, then historical pages may be dropped, even if they contain unprocessed overweight messages.
** `ServiceWeight` -- The amount of weight (if any) which should be provided to the message queue for servicing enqueued items. This may be legitimately `None` in the case that you will call `ServiceQueues::service_queues` manually.
** `ServiceWeight` -- The amount of weight (if any) which should be provided to the message queue for servicing enqueued items `on_initialize`. This may be legitimately `None` in the case that you will call `ServiceQueues::service_queues` manually or set [`Self::IdleMaxServiceWeight`] to have it run in `on_idle`.
** `IdleMaxServiceWeight` -- The maximum amount of weight (if any) to be used from remaining weight `on_idle` which should be provided to the message queue for servicing enqueued items `on_idle`. Useful for parachains to process messages at the same block they are received. If `None`, it will not call `ServiceQueues::service_queues` in `on_idle`.
* Common configs:
** `RuntimeEvent` -- The overarching event type.
** `WeightInfo` -- Weight information for extrinsics in this pallet.
== Dispatchables link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/substrate/frame/message-queue/src/lib.rs#L594[{github-icon},role=heading-link]
== Dispatchables
[.contract-item]
[[execute_overweight]]
@@ -4,13 +4,15 @@
= pallet_multisig
Branch/Release: `release-polkadot-v1.3.0`
Branch/Release: `release-polkadot-v1.10.0`
== Source Code: link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.10.0/substrate/frame/multisig/src/lib.rs[{github-icon},role=heading-link]
== Purpose
This module enables multi-signature operations in your runtime. It allows multiple signed origins (accounts) to coordinate and dispatch a call. For the call to execute, the threshold number of accounts from the set (signatories) must approve it.
== Config link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/substrate/frame/multisig/src/lib.rs#L135[{github-icon},role=heading-link]
== Config
* Pallet-specific configs
** `DepositBase` -- The base amount of currency needed to xref:glossary.adoc#reserve[reserve] for creating a multisig execution or to store a dispatch call for later. Recall: The deposit to be made by the account that creates the multisig is: `threshold * DepositFactor + DepositBase`
@@ -23,7 +25,7 @@ This module enables multi-signature operations in your runtime. It allows multip
** `WeightInfo` -- xref:glossary.adoc#weight[Weight] information for extrinsics in this pallet.
== Dispatchables link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/substrate/frame/multisig/src/lib.rs#L254[{github-icon},role=heading-link]
== Dispatchables
[.contract-item]
[[approve_as_multi]]
@@ -4,7 +4,9 @@
= parachain_system
Branch/Release: `release-polkadot-v1.3.0`
Branch/Release: `release-polkadot-v1.10.0`
== Source Code link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.10.0/cumulus/pallets/parachain-system/src/lib.rs[{github-icon},role=heading-link]
== Purpose
@@ -16,14 +18,13 @@ This pallet is a core element of each parachain. It will:
- Send outgoing messages to relay chain and other parachains
- Build collation info when requested by xref:glossary.adoc#collator[collator]
== Config link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/cumulus/pallets/parachain-system/src/lib.rs#L207[{github-icon},role=heading-link]
== Config
* Pallet-specific configs:
** `OnSystemEvent` — a handler that will be called when new xref:glossary.adoc#validation_data[validation data] will be set (once each block). New validation data will also be passed to it. Look to `trait OnSystemEvent` for more details.
** `SelfParaId` — getter for a parachain id of this chain
** `OutboundXcmpMessageSource` — source of outgoing XCMP messages. It is queried in `finalize_block` and later included into collation information
// it was added after 1.3.0. I am leaving it commented for the future updates
// ** `DmpQueue` — a handler for the incoming *downward* messages from relay chain
** `DmpQueue` — a handler for the incoming *downward* messages from relay chain
** `ReservedDmpWeight` — xref:glossary.adoc#weight[weight] reserved for DMP message processing. This config seems to be is not used as the function that processes these messages (`enqueue_inbound_downward_messages`) returns used weight.
** `XcmpMessageHandler` — a handler for the incoming _horizontal_ messages from other parachains
** `ReservedXcmpWeight` — default weight limit for the for the XCMP message processing. May be overriden by storage `ReservedXcmpWeightOverride` . If incoming messages in block will exceed the weight limit, they wont be processed.
@@ -33,7 +34,7 @@ This pallet is a core element of each parachain. It will:
** `RuntimeEvent`
** `WeightInfo`
== Dispatchables link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/cumulus/pallets/parachain-system/src/lib.rs#L506[{github-icon},role=heading-link]
== Dispatchables
[.contract-item]
[[set_validation_data]]
+5 -3
View File
@@ -4,13 +4,15 @@
= pallet_proxy
Branch/Release: `release-polkadot-v1.3.0`
Branch/Release: `release-polkadot-v1.10.0`
== Source Code link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.10.0/substrate/frame/proxy/src/lib.rs[{github-icon},role=heading-link]
== Purpose
This pallet enables delegation of rights to execute certain call types from one origin to another.
== Config link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/substrate/frame/proxy/src/lib.rs#L107[{github-icon},role=heading-link]
== Config
* Pallet-specific configs:
** `ProxyType` -- a type that describes different variants of xref:glossary.adoc#proxy[proxy]. It must implement `Default` trait and `InstanceFilter<RuntimeCall>` trait.
@@ -26,7 +28,7 @@ This pallet enables delegation of rights to execute certain call types from one
** `RuntimeCall`
** `Currency`
== Dispatchables link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/substrate/frame/proxy/src/lib.rs#L179[{github-icon},role=heading-link]
== Dispatchables
[.contract-item]
[[add_proxy]]
@@ -2,9 +2,11 @@
:highlightjs-languages: rust
:github-icon: pass:[<svg class="icon"><use href="#github-icon"/></svg>]
= cumulus_pallet_parachain_system
= pallet_transaction_payment
Branch/Release: `release-polkadot-v1.3.0`
Branch/Release: `release-polkadot-v1.10.0`
== Source Code link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.10.0/substrate/frame/transaction-payment/src/lib.rs[{github-icon},role=heading-link]
== Purpose
@@ -25,7 +27,7 @@ final_fee = inclusion_fee + tip;
```
The inputs are defined below in the glossary and config sections.
== Config link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/substrate/frame/pallet-transaction-payment/src/lib.rs#L445[{github-icon},role=heading-link]
== Config
* Pallet-specific handlers:
** `OnChargeTransaction` -- Handler for withdrawing, refunding and depositing the transaction fee. Type must implement the trait `OnChargeTransaction<Self>`.
+167 -7
View File
@@ -4,13 +4,15 @@
= pallet_xcm
Branch/Release: `release-polkadot-v1.3.0`
Branch/Release: `release-polkadot-v1.10.0`
Source Code link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.10.0/polkadot/xcm/pallet-xcm/src/lib.rs[{github-icon},role=heading-link]
== Purpose
`pallet-xcm` is responsible for filtering, routing, and executing incoming XCM.
== Config link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/polkadot/xcm/pallet-xcm/src/lib.rs#L192[{github-icon},role=heading-link]
== Config
* Pallet-specific origins:
** `AdminOrigin` -- The origin that is allowed to call privileged operations on the XCM pallet. Type must implement trait `EnsureOrigin`.
@@ -21,7 +23,6 @@ Branch/Release: `release-polkadot-v1.3.0`
** `RemoteLockConsumerIdentifier` -- The ID type for local consumers of remote locks. The type must implement `Copy`.
* Pallet-specific handlers:
** `OnChargeTransaction` -- Handler for withdrawing, refunding and depositing the transaction fee. Type must implement the trait `OnChargeTransaction<Self>`.
** `Currency` -- Lockable currency used in the pallet. Type must implement the trait `LockableCurrency`.
** `Weigher` -- Measures xref:glossary.adoc#weight[weight] consumed by XCM local execution. Type must implement the trait `WeightBounds`.
** `XcmExecutor` -- Means of executing XCM. Type must implement the trait `ExecuteXcm`.
@@ -44,9 +45,6 @@ Branch/Release: `release-polkadot-v1.3.0`
** `MaxRemoteLockConsumers` -- The maximum number of consumers a single remote lock may have. Type must implement the trait `Get<u32>`.
** `UniversalLocation` -- This chain's Universal Location. Type must implement the trait `Get<InteriorMultiLocation>`.
* Benchmark-only configs:
** `ReachableDest` -- A `MultiLocation` that can be reached via `XcmRouter`. Used only in benchmarks. Type must implement trait `ReachableDest`.
* Common configs:
** `RuntimeEvent`
** `RuntimeCall`
@@ -66,6 +64,15 @@ pub fn send(
message: Box<VersionedXcm<()>>,
)
----
WARNING: DEPRECATED. `send` will be removed after June 2024. Use `send_blob` instead.
* Deprecation explanation:
** `pallet-xcm` has a new pair of extrinsics, `execute_blob` and `send_blob`. These are meant to be used instead of `execute` and `send`, which are now deprecated and will be removed eventually. These new extrinsics just require you to input the encoded XCM.
** There's a new utility in PolkadotJS Apps for encoding XCMs you can use: https://polkadot.js.org/apps/#/utilities/xcm Just pass in the encoded XCM to the new extrinsics and you're done.
** The migration from the old extrinsic to the new is very simple. If you have your message `xcm: VersionedXcm<Call>`, then instead of passing in `Box::new(xcm)` to both `execute` and `send`, you would pass in `xcm.encode().try_into()` and handle the potential error of its encoded length being bigger than `MAX_XCM_ENCODED_SIZE`.
** `pallet-contracts` takes the XCM encoded now as well. It follows the same API as `execute_blob` and `send_blob`.
Send a versioned XCM `message` to the destination `dest`.
The origin must be `SendXcmOrigin` for this call.
@@ -96,6 +103,15 @@ pub fn execute(
max_weight: Weight,
)
----
WARNING: DEPRECATED. `execute` will be removed after June 2024. Use `execute_blob` instead.
* Deprecation explanation:
** `pallet-xcm` has a new pair of extrinsics, `execute_blob` and `send_blob`. These are meant to be used instead of `execute` and `send`, which are now deprecated and will be removed eventually. These new extrinsics just require you to input the encoded XCM.
** There's a new utility in PolkadotJS Apps for encoding XCMs you can use: https://polkadot.js.org/apps/#/utilities/xcm Just pass in the encoded XCM to the new extrinsics and you're done.
** The migration from the old extrinsic to the new is very simple. If you have your message `xcm: VersionedXcm<Call>`, then instead of passing in `Box::new(xcm)` to both `execute` and `send`, you would pass in `xcm.encode().try_into()` and handle the potential error of its encoded length being bigger than `MAX_XCM_ENCODED_SIZE`.
** `pallet-contracts` takes the XCM encoded now as well. It follows the same API as `execute_blob` and `send_blob`.
Execute an XCM message from a local, signed, origin.
The origin must be `ExecuteXcmOrigin` for this call.
@@ -324,10 +340,154 @@ None
None
[.contract-item]
[[transfer_assets]]
==== `[.contract-item-name]#++transfer_assets++#`
[source,rust]
----
pub fn transfer_assets(
origin: OriginFor<T>,
dest: Box<VersionedLocation>,
beneficiary: Box<VersionedLocation>,
assets: Box<VersionedAssets>,
fee_asset_item: u32,
weight_limit: WeightLimit,
)
----
Transfer some assets from the local chain to the destination chain through their local, destination or remote reserve, or through teleports.
**Params:**
- `dest: Box<VersionedLocation>` -- Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain.
- `beneficiary: Box<VersionedLocation>` -- A beneficiary location for the assets in the context of `dest`. Will generally be an `AccountId32` value.
- `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` (and possibly reserve) chains.
- `fee_asset_item: u32` -- The index into `assets` of the item which should be used to pay fees.
- `weight_limit: WeightLimit` -- The remote-side weight limit, if any, for the XCM fee purchase.
**Errors:**
* `BadOrigin` —- origin did not match `ExecuteXcmOrigin`.
* `BadVersion` -- v2/v3 conversion to v4 failed for `assets`, `dest`, or `beneficiary`.
* `TooManyAssets` -- `assets` contain more than `MAX_ASSETS_FOR_TRANSFER = 2` to transfer.
* `Empty` -- can be a number of different errors:
** `fee_asset_item` is not present in `assets`.
** some fungible asset in `assets` has a value of 0.
** fees or asset transfer type was not determined.
* `TooManyReserves` -- there are more than one transfer type for an asset.
* `InvalidAssetUnknownReserve` -- transfer type can not be determined for a given asset.
* `InvalidAssetUnsupportedReserve` -- asset or fees transfer type is remote reserve and asset and fees asset are different.
* `Filtered` -- can be a number of different errors:
** `XcmReserveTransferFilter` filtered the asset.
** `XcmTeleportFilter` filtered the asset
* `CannotReanchor` -- asset can't be reanchored.
* `CannotCheckOutTeleport` -- asset can't be teleported
* `UnweighableMessage` -- prepared XCM message had issues with weighing (i.e. more instructions than the limit).
* `LocalExecutionIncomplete` -- local execution of XCM message have failed.
* `FeesNotMet` -- unable to charge fees. See the error log of any node to see the details.
**Events:**
- `Sent(origin, destination, message, message_id)`
**Deprecated Extrinsics**:
- `teleport_assets` -- Use `limited_teleport_assets` instead.
- `reserve_transfer_assets` -- Use `limited_reserve_transfer_assets` instead.
[.contract-item]
[[claim_assets]]
==== `[.contract-item-name]#++claim_assets++#`
[source,rust]
----
pub fn claim_assets(
origin: OriginFor<T>,
assets: Box<VersionedAssets>,
beneficiary: Box<VersionedLocation>,
) -> DispatchResult
----
**Params:**
- `origin: OriginFor<T>` -- Must be signed.
- `assets: Box<VersionedAssets>` -- The exact assets that were trapped. Use the version to specify what version was the latest when they were trapped.
- `beneficiary: Box<VersionedLocation>` -- A beneficiary location for the assets in the context of `dest`. Will generally be an `AccountId32` value.
**Errors:**
* `BadOrigin` —- origin did not match `ExecuteXcmOrigin`.
* `BadVersion` -- v2/v3 conversion to v4 failed for `assets`, `dest`, or `beneficiary`.
* `UnweighableMessage` -- prepared XCM message had issues with weighing (i.e. more instructions than the limit).
* `LocalExecutionIncomplete` -- local execution of XCM message have failed.
**Events:**
None
[.contract-item]
[[execute_blob]]
==== `[.contract-item-name]#++execute_blob++#`
[source,rust]
----
pub fn execute_blob(
origin: OriginFor<T>,
encoded_message: BoundedVec<u8, MaxXcmEncodedSize>,
max_weight: Weight,
) -> DispatchResultWithPostInfo
----
Execute an XCM from a local, signed, origin.
**Params:**
- `origin: OriginFor<T>` -- Must be signed.
- `encoded_message: BoundedVec<u8, MaxXcmEncodedSize>` -- The message is passed in encoded. It needs to be decodable as a [`VersionedXcm`].
- `max_weight: Weight` -- No more than `max_weight` will be used in its attempted execution. If this is less than the maximum amount of weight that the message could take to be executed, then no execution attempt will be made.
**Errors:**
* `BadOrigin` —- origin did not match `ExecuteXcmOrigin`.
* `BadVersion` -- v2/v3 conversion to v4 failed for `assets`, `dest`, or `beneficiary`.
* `Filtered` -- can be a number of different errors:
* `LocalExecutionIncomplete` -- local execution of XCM message have failed.
* `UnableToDecode` -- unable to decode the XCM.
* `XcmTooLarge` -- XCM encoded length is larger than `MaxXcmEncodedSize`.
**Events:**
- `Attempted(outcome)` -- Indicates whether the `msg` was executed completely or only partially.
[.contract-item]
[[send_blob]]
==== `[.contract-item-name]#++send_blob++#`
[source,rust]
----
pub fn send_blob(
origin: OriginFor<T>,
dest: Box<VersionedLocation>,
encoded_message: BoundedVec<u8, MaxXcmEncodedSize>,
) -> DispatchResult
----
Send an XCM from a local, signed, origin.
**Params:**
- `origin: OriginFor<T>` -- Must be signed.
- `dest: Box<VersionedLocation>` -- The destination, `dest`, will receive this message with a `DescendOrigin` instruction that makes the origin of the message be the origin on this system.
- `encoded_message: BoundedVec<u8, MaxXcmEncodedSize>` -- The message is passed in encoded. It needs to be decodable as a [`VersionedXcm`].
**Errors:**
* `InvalidOrigin` -- origin did not match `SendXcmOrigin`
* `BadVersion` -- v2/v3 conversion to v4 failed for `assets`, `dest`, or `beneficiary`.
* `UnableToDecode` -- unable to decode the XCM.
* `FeesNotMet` -- unable to charge fees. See the error log of any node to see the details.
* `Unreachable` -- The desired destination was unreachable, generally because there is a no way of routing to it.
* `SendFailure` -- There was some other issue (i.e. not to do with routing) in sending the message. Perhaps a lack of space for buffering the message.
**Events:**
- `Sent(origin, destination, message, message_id)` -- The versioned XCM `message` was sent from the `origin` to the `destination`.
== More Reading
https://wiki.polkadot.network/docs/learn-xcm-usecases[Polkadot Wiki XCM Use Cases]
https://wiki.polkadot.network/docs/learn-xcm-usecases[Polkadot Wiki XCM Use Cases]
@@ -4,13 +4,15 @@
= cumulus_pallet_xcmp_queue
Branch/Release: `release-polkadot-v1.5.0`
Branch/Release: `release-polkadot-v1.10.0`
== Source Code link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.10.0/cumulus/pallets/xcmp-queue/src/lib.rs[{github-icon},role=heading-link]
== Purpose
Responsible for the Queues (both incoming and outgoing) for XCMP messages. This pallet does not actually receive or send messages. Its responsibility is to place the incoming and outgoing XCMP messages in their respective queues and manage these queues.
== Config link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.5.0/cumulus/pallets/xcmp-queue/src/lib.rs#L112[{github-icon},role=heading-link]
== Config
* Pallet-specific configs
** `ChannelInfo` -- Configures two functions `get_channel_status` and `get_channel_info` to provide information about channels (`ChannelStatus` and `ChannelInfo`).
@@ -18,13 +20,13 @@ Responsible for the Queues (both incoming and outgoing) for XCMP messages. This
** `XcmpQueue` -- Defines max length of an XCMP message, and how `enqueue_message` should behave.
** `MaxInboundSuspended` -- The maximum number of inbound XCMP channels that can be suspended simultaneously. Any further channel suspensions will fail and messages may get dropped without further notice. Choosing a high value (1000) is okay.
** `ControllerOrigin` -- The origin that is allowed to resume or suspend the XCMP queue.
** `ControllerOriginConverter>` -- The conversion function used to attempt to convert an XCM `xref:glossary.adoc#multilocation[MultiLocation]` origin to a superuser origin. This is used for allowing the superuser's queue to send messages even to paused queues.
** `ControllerOriginConverter` -- The conversion function used to attempt to convert an XCM `xref:glossary.adoc#multilocation[MultiLocation]` origin to a superuser origin. This is used for allowing the superuser's queue to send messages even to paused queues.
** `PriceForSiblingDelivery` -- The price for delivering an XCM to a sibling parachain destination.
* Common configs
** `RuntimeEvent` -- The overarching event type.
** `WeightInfo` -- The xref:glossary.adoc#weight[weight] information of this pallet.
== Dispatchables link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.5.0/cumulus/pallets/xcmp-queue/src/lib.rs#L150[{github-icon},role=heading-link]
== Dispatchables
[.contract-item]
[[suspend_xcm_execution]]
@@ -4,7 +4,9 @@
= XCM Executor
Branch/Release: `release-polkadot-v1.3.0`
Branch/Release: `release-polkadot-v1.10.0`
Source Code link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.10.0/polkadot/xcm/xcm-executor/src/config.rs[{github-icon},role=heading-link]
== Purpose
@@ -14,7 +16,7 @@ Branch/Release: `release-polkadot-v1.3.0`
NOTE: `XcmExecutor` is not a pallet, but rather it is a `struct` type parameterized by a `Config` trait. The inner config is the `trait Config` which parameterizes the outer config `struct XcmExecutor<Config>`. Both the inner and outer configs are configured in the runtime.
== Inner Config link:https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/xcm-executor/src/config.rs#L30[{github-icon},role=heading-link]
== Inner Config
The inner `trait Config` used to parameterize `XcmExecutor` has the following associated types.
@@ -31,6 +33,9 @@ The inner `trait Config` used to parameterize `XcmExecutor` has the following as
- `FeeManager` -- Configure the fees. Type must implement the trait `FeeManager`.
- `MessageExporter` -- The method of exporting a message. Type must implement the trait `ExportXcm`.
- `CallDispatcher` -- The call dispatcher used by XCM. Type must implement the trait `CallDispatcher<Self::RuntimeCall>`.
- `HrmpNewChannelOpenRequestHandler` -- Allows optional logic execution for the `HrmpNewChannelOpenRequest` XCM notification.
- `HrmpChannelAcceptedHandler` -- Allows optional logic execution for the `HrmpChannelAccepted` XCM notification.
- `HrmpChannelClosingHandler` -- Allows optional logic execution for the `HrmpChannelClosing` XCM notification.
* Filters:
- `IsReserve` -- Combinations of (Asset, Location) pairs which we trust as reserves. Type must implement the trait `ContainsPair<MultiAsset, MultiLocation>`.
@@ -54,9 +59,10 @@ The inner `trait Config` used to parameterize `XcmExecutor` has the following as
* Common configs:
- `RuntimeCall`
== Outer Config link:https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/xcm-executor/src/lib.rs#L58[{github-icon},role=heading-link]
== Outer Config
The outer `struct XcmExecutor<Config>` configures the following fields:
* The outer `struct XcmExecutor<Config>` configures the following fields:
- `holding` -- Assets allowed in the holding register. Type must be `Assets`.
- `holding_limit` -- The maximum number of assets in the holding register. Type must be `usize`.
- `context` -- Type must be `XcmContext`.
+4 -2
View File
@@ -8,16 +8,18 @@ Branch/Release: `release-polkadot-v{x.x.x}`
== Purpose
== Source Code link:https://github.com[{github-icon},role=heading-link]
This is a freeform description of the tasks that this pallet fulfills
== Config link:https://google.com[{github-icon},role=heading-link]
== Config
* Pallet-specific configs
** `ConfigType` -- description of config. Include the possible values if there is a set of them.
* Common configs
** `ConfigType` -- description of config, if needed
== Dispatchables link:https://google.com[{github-icon},role=heading-link]
== Dispatchables
[.contract-item]
[[dispatchable_name]]
+1 -1
View File
@@ -7,7 +7,7 @@ edition = { workspace = true }
license = { workspace = true }
publish = false
repository = { workspace = true }
version = "0.1.2"
version = "1.0.0"
[dependencies]
clap = { workspace = true }
+2 -1
View File
@@ -1,5 +1,6 @@
use std::net::SocketAddr;
use cumulus_client_service::storage_proof_size::HostFunctions as ReclaimHostFunctions;
use cumulus_primitives_core::ParaId;
use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE};
use log::info;
@@ -181,7 +182,7 @@ pub fn run() -> Result<()> {
match cmd {
BenchmarkCmd::Pallet(cmd) =>
if cfg!(feature = "runtime-benchmarks") {
runner.sync_run(|config| cmd.run::<Block, ()>(config))
runner.sync_run(|config| cmd.run::<sp_runtime::traits::HashingFor<Block>, ReclaimHostFunctions>(config))
} else {
Err("Benchmarking wasn't enabled when building the node. \
You can enable it with `--features runtime-benchmarks`."
+30 -51
View File
@@ -1,5 +1,4 @@
//! Service and ServiceFactory implementation. Specialized wrapper over
//! substrate service.
//! Service and ServiceFactory implementation. Specialized wrapper over substrate service.
// std
use std::{sync::Arc, time::Duration};
@@ -11,7 +10,8 @@ use cumulus_client_consensus_common::ParachainBlockImport as TParachainBlockImpo
use cumulus_client_consensus_proposer::Proposer;
use cumulus_client_service::{
build_network, build_relay_chain_interface, prepare_node_config, start_relay_chain_tasks,
BuildNetworkParams, CollatorSybilResistance, DARecoveryProfile, StartRelayChainTasksParams,
BuildNetworkParams, CollatorSybilResistance, DARecoveryProfile, ParachainHostFunctions,
StartRelayChainTasksParams,
};
#[cfg(feature = "async-backing")]
use cumulus_primitives_core::relay_chain::ValidationCode;
@@ -26,9 +26,7 @@ use parachain_template_runtime::{
};
use sc_client_api::Backend;
use sc_consensus::ImportQueue;
use sc_executor::{
HeapAllocStrategy, NativeElseWasmExecutor, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY,
};
use sc_executor::{HeapAllocStrategy, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY};
use sc_network::NetworkBlock;
use sc_network_sync::SyncingService;
use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager};
@@ -37,22 +35,7 @@ use sc_transaction_pool_api::OffchainTransactionPoolFactory;
use sp_keystore::KeystorePtr;
use substrate_prometheus_endpoint::Registry;
/// Native executor type.
pub struct ParachainNativeExecutor;
impl sc_executor::NativeExecutionDispatch for ParachainNativeExecutor {
type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;
fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {
parachain_template_runtime::api::dispatch(method, data)
}
fn native_version() -> sc_executor::NativeVersion {
parachain_template_runtime::native_version()
}
}
type ParachainExecutor = NativeElseWasmExecutor<ParachainNativeExecutor>;
type ParachainExecutor = WasmExecutor<ParachainHostFunctions>;
type ParachainClient = TFullClient<Block, RuntimeApi, ParachainExecutor>;
@@ -60,23 +43,21 @@ type ParachainBackend = TFullBackend<Block>;
type ParachainBlockImport = TParachainBlockImport<Block, Arc<ParachainClient>, ParachainBackend>;
/// Assembly of PartialComponents (enough to run chain ops subcommands)
pub type Service = PartialComponents<
ParachainClient,
ParachainBackend,
(),
sc_consensus::DefaultImportQueue<Block>,
sc_transaction_pool::FullPool<Block, ParachainClient>,
(ParachainBlockImport, Option<Telemetry>, Option<TelemetryWorkerHandle>),
>;
/// Starts a `ServiceBuilder` for a full service.
///
/// Use this macro if you don't actually need the full service, but just the
/// builder in order to be able to perform chain operations.
pub fn new_partial(
config: &Configuration,
) -> Result<
PartialComponents<
ParachainClient,
ParachainBackend,
(),
sc_consensus::DefaultImportQueue<Block>,
sc_transaction_pool::FullPool<Block, ParachainClient>,
(ParachainBlockImport, Option<Telemetry>, Option<TelemetryWorkerHandle>),
>,
sc_service::Error,
> {
/// Use this macro if you don't actually need the full service, but just the builder in order to
/// be able to perform chain operations.
pub fn new_partial(config: &Configuration) -> Result<Service, sc_service::Error> {
let telemetry = config
.telemetry_endpoints
.clone()
@@ -92,7 +73,7 @@ pub fn new_partial(
.default_heap_pages
.map_or(DEFAULT_HEAP_ALLOC_STRATEGY, |h| HeapAllocStrategy::Static { extra_pages: h as _ });
let wasm = WasmExecutor::builder()
let executor = ParachainExecutor::builder()
.with_execution_method(config.wasm_method)
.with_onchain_heap_alloc_strategy(heap_pages)
.with_offchain_heap_alloc_strategy(heap_pages)
@@ -100,13 +81,12 @@ pub fn new_partial(
.with_runtime_cache_size(config.runtime_cache_size)
.build();
let executor = ParachainExecutor::new_with_wasm_executor(wasm);
let (client, backend, keystore_container, task_manager) =
sc_service::new_full_parts::<Block, RuntimeApi, _>(
sc_service::new_full_parts_record_import::<Block, RuntimeApi, _>(
config,
telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()),
executor,
true,
)?;
let client = Arc::new(client);
@@ -147,11 +127,9 @@ pub fn new_partial(
})
}
/// Start a node with the given parachain `Configuration` and relay chain
/// `Configuration`.
/// Start a node with the given parachain `Configuration` and relay chain `Configuration`.
///
/// This is the actual implementation that is abstract over the executor and the
/// runtime api.
/// This is the actual implementation that is abstract over the executor and the runtime api.
#[sc_tracing::logging::prefix_logs_with("Parachain")]
async fn start_node_impl(
parachain_config: Configuration,
@@ -258,10 +236,9 @@ async fn start_node_impl(
if let Some(hwbench) = hwbench {
sc_sysinfo::print_hwbench(&hwbench);
// Here you can check whether the hardware meets your chains' requirements.
// Putting a link in there and swapping out the requirements for your
// own are probably a good idea. The requirements for a para-chain are
// dictated by its relay-chain.
// Here you can check whether the hardware meets your chains' requirements. Putting a link
// in there and swapping out the requirements for your own are probably a good idea. The
// requirements for a para-chain are dictated by its relay-chain.
match SUBSTRATE_REFERENCE_HARDWARE.check_hardware(&hwbench) {
Err(err) if validator => {
log::warn!(
@@ -389,8 +366,9 @@ fn start_consensus(
#[cfg(feature = "async-backing")]
use cumulus_client_consensus_aura::collators::lookahead::{self as aura, Params};
// NOTE: because we use Aura here explicitly, we can use
// `CollatorSybilResistance::Resistant` when starting the network.
// NOTE: because we use Aura here explicitly, we can use `CollatorSybilResistance::Resistant`
// when starting the network.
let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?;
let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording(
@@ -429,6 +407,7 @@ fn start_consensus(
collator_key,
para_id,
overseer_handle,
#[cfg(not(feature = "async-backing"))]
slot_duration,
relay_chain_slot_duration,
proposer,
-39
View File
@@ -1,39 +0,0 @@
{
"relaychain": {
"bin": "../../polkadot/target/release/polkadot",
"chain": "rococo-local",
"nodes": [
{
"name": "alice",
"wsPort": 9944,
"port": 30444
},
{
"name": "bob",
"wsPort": 9955,
"port": 30555
}
]
},
"parachains": [
{
"bin": "../target/release/polkadot-parachain",
"id": "200",
"balance": "1000000000000000000000",
"nodes": [
{
"wsPort": 9988,
"name": "alice",
"port": 31200,
"flags": [
"--force-authoring",
"--",
"--execution=wasm"
]
}
]
}
],
"types": {
}
}
+2 -1
View File
@@ -5,7 +5,7 @@ description = "A generic parachain runtime template"
edition = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
version = "0.1.2"
version = "1.0.0"
[package.metadata.docs.rs]
targets = [ "x86_64-unknown-linux-gnu" ]
@@ -171,6 +171,7 @@ runtime-benchmarks = [
"pallet-message-queue/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-preimage/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"pallet-referenda/runtime-benchmarks",
"pallet-scheduler/runtime-benchmarks",
"pallet-sudo/runtime-benchmarks",
+108 -29
View File
@@ -42,9 +42,9 @@ use governance::{
use pallet_xcm::{EnsureXcm, IsVoiceOfBody};
use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling};
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
// Polkadot imports
use polkadot_runtime_common::{
impls::{LocatableAssetConverter, VersionedLocatableAsset, VersionedLocationConverter},
xcm_sender::NoPriceForMessageDelivery,
BlockHashCount, SlowAdjustingFeeUpdate,
};
use scale_info::TypeInfo;
@@ -69,7 +69,11 @@ use sp_version::NativeVersion;
use sp_version::RuntimeVersion;
// XCM Imports
use xcm::{
latest::{prelude::BodyId, InteriorLocation, Junction::PalletInstance},
latest::{
prelude::{AssetId, BodyId},
InteriorLocation,
Junction::PalletInstance,
},
VersionedLocation,
};
use xcm_builder::PayOverXcm;
@@ -230,7 +234,7 @@ pub const MILLISECS_PER_BLOCK: u64 = 6000;
pub const MILLISECS_PER_BLOCK: u64 = 12000;
// NOTE: Currently it is not possible to change the slot duration after the
// chain has started. Attempting to do so will brick block production.
// chain has started. Attempting to do so will brick block production.
pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK;
// Time is measured by number of blocks.
@@ -303,6 +307,7 @@ parameter_types! {
})
.avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO)
.build_or_panic();
// generic substrate prefix. For more info, see: [Polkadot Accounts In-Depth](https://wiki.polkadot.network/docs/learn-account-advanced#:~:text=The%20address%20format%20used%20in,belonging%20to%20a%20specific%20network)
pub const SS58Prefix: u16 = 42;
}
@@ -311,10 +316,12 @@ impl Contains<RuntimeCall> for NormalFilter {
fn contains(c: &RuntimeCall) -> bool {
match c {
// We filter anonymous proxy as they make "reserve" inconsistent
// See: https://github.com/paritytech/substrate/blob/37cca710eed3dadd4ed5364c7686608f5175cce1/frame/proxy/src/lib.rs#L270
// See: https://github.com/paritytech/polkadot-sdk/blob/v1.9.0-rc2/substrate/frame/proxy/src/lib.rs#L260
RuntimeCall::Proxy(method) => !matches!(
method,
pallet_proxy::Call::create_pure { .. } | pallet_proxy::Call::kill_pure { .. }
pallet_proxy::Call::create_pure { .. }
| pallet_proxy::Call::kill_pure { .. }
| pallet_proxy::Call::remove_proxies { .. }
),
_ => true,
}
@@ -418,7 +425,7 @@ impl pallet_timestamp::Config for Runtime {
/// A timestamp: milliseconds since the unix epoch.
type Moment = u64;
type OnTimestampSet = Aura;
type WeightInfo = pallet_timestamp::weights::SubstrateWeight<Runtime>;
type WeightInfo = weights::pallet_timestamp::WeightInfo<Runtime>;
}
impl pallet_authorship::Config for Runtime {
@@ -492,7 +499,7 @@ impl pallet_proxy::Config for Runtime {
type ProxyType = ProxyType;
type RuntimeCall = RuntimeCall;
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_proxy::weights::SubstrateWeight<Runtime>;
type WeightInfo = weights::pallet_proxy::WeightInfo<Runtime>;
}
parameter_types! {
@@ -517,7 +524,7 @@ impl pallet_balances::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type RuntimeFreezeReason = RuntimeFreezeReason;
type RuntimeHoldReason = RuntimeHoldReason;
type WeightInfo = pallet_balances::weights::SubstrateWeight<Runtime>;
type WeightInfo = weights::pallet_balances::WeightInfo<Runtime>;
}
parameter_types! {
@@ -550,7 +557,7 @@ impl pallet_assets::Config for Runtime {
type RemoveItemsLimit = RemoveItemsLimit;
type RuntimeEvent = RuntimeEvent;
type StringLimit = StringLimit;
type WeightInfo = pallet_assets::weights::SubstrateWeight<Runtime>;
type WeightInfo = weights::pallet_assets::WeightInfo<Runtime>;
}
parameter_types! {
@@ -571,7 +578,7 @@ impl pallet_transaction_payment::Config for Runtime {
impl pallet_sudo::Config for Runtime {
type RuntimeCall = RuntimeCall;
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_sudo::weights::SubstrateWeight<Runtime>;
type WeightInfo = weights::pallet_sudo::WeightInfo<Runtime>;
}
parameter_types! {
@@ -600,7 +607,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime {
type ReservedXcmpWeight = ReservedXcmpWeight;
type RuntimeEvent = RuntimeEvent;
type SelfParaId = parachain_info::Pallet<Runtime>;
type WeightInfo = cumulus_pallet_parachain_system::weights::SubstrateWeight<Runtime>;
type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo<Runtime>;
type XcmpMessageHandler = XcmpQueue;
}
@@ -614,6 +621,7 @@ parameter_types! {
impl pallet_message_queue::Config for Runtime {
type HeapSize = HeapSize;
type IdleMaxServiceWeight = MessageQueueServiceWeight;
type MaxStale = MaxStale;
#[cfg(feature = "runtime-benchmarks")]
type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor<
@@ -631,24 +639,35 @@ impl pallet_message_queue::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type ServiceWeight = MessageQueueServiceWeight;
type Size = u32;
type WeightInfo = pallet_message_queue::weights::SubstrateWeight<Runtime>;
type WeightInfo = weights::pallet_message_queue::WeightInfo<Runtime>;
}
impl cumulus_pallet_aura_ext::Config for Runtime {}
parameter_types! {
pub const MaxInboundSuspended: u32 = 1000;
/// The asset ID for the asset that we use to pay for message delivery fees.
pub FeeAssetId: AssetId = AssetId(RelayLocation::get());
/// The base fee for the message delivery fees. Kusama is based for the reference.
pub const ToSiblingBaseDeliveryFee: u128 = CENTS.saturating_mul(3);
}
pub type PriceForSiblingParachainDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice<
FeeAssetId,
ToSiblingBaseDeliveryFee,
TransactionByteFee,
XcmpQueue,
>;
impl cumulus_pallet_xcmp_queue::Config for Runtime {
type ChannelInfo = ParachainSystem;
type ControllerOrigin = EnsureRoot<AccountId>;
type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin;
type MaxInboundSuspended = MaxInboundSuspended;
type PriceForSiblingDelivery = NoPriceForMessageDelivery<ParaId>;
type PriceForSiblingDelivery = PriceForSiblingParachainDelivery;
type RuntimeEvent = RuntimeEvent;
type VersionWrapper = ();
type WeightInfo = cumulus_pallet_xcmp_queue::weights::SubstrateWeight<Runtime>;
type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo<Runtime>;
// Enqueue XCMP messages from siblings for later processing.
type XcmpQueue = TransformOrigin<MessageQueue, AggregateMessageOrigin, ParaId, ParaIdToSibling>;
}
@@ -668,10 +687,14 @@ impl pallet_multisig::Config for Runtime {
type MaxSignatories = MaxSignatories;
type RuntimeCall = RuntimeCall;
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_multisig::weights::SubstrateWeight<Runtime>;
type WeightInfo = weights::pallet_multisig::WeightInfo<Runtime>;
}
parameter_types! {
// pallet_session ends the session after a fixed period of blocks.
// The first session will have length of Offset,
// and the following sessions will have length of Period.
// This may prove nonsensical if Offset >= Period.
pub const Period: u32 = 6 * HOURS;
pub const Offset: u32 = 0;
}
@@ -687,7 +710,7 @@ impl pallet_session::Config for Runtime {
type ValidatorId = <Self as frame_system::Config>::AccountId;
// we don't have stash and controller, thus we don't need the convert as well.
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
type WeightInfo = pallet_session::weights::SubstrateWeight<Runtime>;
type WeightInfo = weights::pallet_session::WeightInfo<Runtime>;
}
#[cfg(not(feature = "async-backing"))]
@@ -707,9 +730,6 @@ impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type DisabledValidators = ();
type MaxAuthorities = MaxAuthorities;
#[cfg(all(feature = "experimental", feature = "async-backing"))]
type SlotDuration = ConstU64<SLOT_DURATION>;
#[cfg(all(feature = "experimental", not(feature = "async-backing")))]
type SlotDuration = pallet_aura::MinimumPeriodTimesTwo<Self>;
}
@@ -718,6 +738,9 @@ parameter_types! {
pub const SessionLength: BlockNumber = 6 * HOURS;
// StakingAdmin pluralistic body.
pub const StakingAdminBodyId: BodyId = BodyId::Defense;
pub const MaxCandidates: u32 = 100;
pub const MaxInvulnerables: u32 = 20;
pub const MinEligibleCollators: u32 = 4;
}
/// We allow root and the StakingAdmin to execute privileged collator selection
@@ -727,12 +750,6 @@ pub type CollatorSelectionUpdateOrigin = EitherOfDiverse<
EnsureXcm<IsVoiceOfBody<RelayLocation, StakingAdminBodyId>>,
>;
parameter_types! {
pub const MaxCandidates: u32 = 100;
pub const MaxInvulnerables: u32 = 20;
pub const MinEligibleCollators: u32 = 4;
}
impl pallet_collator_selection::Config for Runtime {
type Currency = Balances;
// should be a multiple of session or things will get inconsistent
@@ -746,14 +763,14 @@ impl pallet_collator_selection::Config for Runtime {
type ValidatorId = <Self as frame_system::Config>::AccountId;
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
type ValidatorRegistration = Session;
type WeightInfo = pallet_collator_selection::weights::SubstrateWeight<Runtime>;
type WeightInfo = weights::pallet_collator_selection::WeightInfo<Runtime>;
}
impl pallet_utility::Config for Runtime {
type PalletsOrigin = OriginCaller;
type RuntimeCall = RuntimeCall;
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_utility::weights::SubstrateWeight<Runtime>;
type WeightInfo = weights::pallet_utility::WeightInfo<Runtime>;
}
parameter_types! {
@@ -866,6 +883,11 @@ mod benches {
[pallet_sudo, Sudo]
[pallet_collator_selection, CollatorSelection]
[cumulus_pallet_xcmp_queue, XcmpQueue]
[cumulus_pallet_parachain_system, ParachainSystem]
[pallet_proxy, Proxy]
[pallet_utility, Utility]
[pallet_multisig, Multisig]
[pallet_xcm, PalletXcmExtrinsicsBenchmark::<Runtime>]
);
}
@@ -879,7 +901,7 @@ impl_runtime_apis! {
}
fn authorities() -> Vec<AuraId> {
Aura::authorities().into_inner()
pallet_aura::Authorities::<Runtime>::get().into_inner()
}
}
@@ -892,7 +914,7 @@ impl_runtime_apis! {
Executive::execute_block(block)
}
fn initialize_block(header: &<Block as BlockT>::Header) {
fn initialize_block(header: &<Block as BlockT>::Header) -> sp_runtime::ExtrinsicInclusionMode {
Executive::initialize_block(header)
}
}
@@ -1056,6 +1078,8 @@ impl_runtime_apis! {
use frame_system_benchmarking::Pallet as SystemBench;
use cumulus_pallet_session_benchmarking::Pallet as SessionBench;
use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsicsBenchmark;
let mut list = Vec::<BenchmarkList>::new();
list_benchmarks!(list, extra);
@@ -1080,6 +1104,61 @@ impl_runtime_apis! {
}
}
parameter_types! {
pub const RandomParaId: ParaId = ParaId::new(43211234);
pub ExistentialDepositAsset: Option<Asset> = Some((
RelayLocation::get(),
ExistentialDeposit::get()
).into());
/// The base fee for the message delivery fees. Kusama is based for the reference.
pub const ToParentBaseDeliveryFee: u128 = CENTS.saturating_mul(3);
}
pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice<
FeeAssetId,
ToParentBaseDeliveryFee,
TransactionByteFee,
ParachainSystem,
>;
use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsicsBenchmark;
use xcm::latest::prelude::{Asset, AssetId, Assets as AssetList, Fungible, Location, Parachain, Parent, ParentThen};
impl pallet_xcm::benchmarking::Config for Runtime {
type DeliveryHelper = cumulus_primitives_utility::ToParentDeliveryHelper<
xcm_config::XcmConfig,
ExistentialDepositAsset,
PriceForParentDelivery,
>;
fn reachable_dest() -> Option<Location> {
Some(Parent.into())
}
fn teleportable_asset_and_dest() -> Option<(Asset, Location)> {
None
}
fn reserve_transferable_asset_and_dest() -> Option<(Asset, Location)> {
Some((
Asset {
fun: Fungible(ExistentialDeposit::get()),
id: AssetId(Parent.into())
}.into(),
ParentThen(Parachain(RandomParaId::get().into()).into()).into(),
))
}
fn set_up_complex_asset_transfer(
) -> Option<(AssetList, u32, Location, Box<dyn FnOnce()>)> {
None
}
fn get_asset() -> Asset {
Asset {
id: AssetId(Location::parent()),
fun: Fungible(ExistentialDeposit::get()),
}
}
}
use cumulus_pallet_session_benchmarking::Pallet as SessionBench;
impl cumulus_pallet_session_benchmarking::Config for Runtime {}
@@ -0,0 +1,59 @@
//! Autogenerated weights for `cumulus_pallet_parachain_system`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-04-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-172-31-15-118`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024
// Executed Command:
// target/release/parachain-template-node
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=results-cumulus_pallet_parachain_system.json
// --pallet=cumulus_pallet_parachain_system
// --chain=dev
// --output=new-benchmarks/cumulus_pallet_parachain_system.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `cumulus_pallet_parachain_system`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> cumulus_pallet_parachain_system::WeightInfo for WeightInfo<T> {
/// Storage: `ParachainSystem::LastDmqMqcHead` (r:1 w:1)
/// Proof: `ParachainSystem::LastDmqMqcHead` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
/// Storage: `ParachainSystem::ProcessedDownwardMessages` (r:0 w:1)
/// Proof: `ParachainSystem::ProcessedDownwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MessageQueue::Pages` (r:0 w:1000)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 1000]`.
fn enqueue_inbound_downward_messages(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `12`
// Estimated: `3517`
// Minimum execution time: 2_323_000 picoseconds.
Weight::from_parts(2_390_000, 0)
.saturating_add(Weight::from_parts(0, 3517))
// Standard Error: 16_951
.saturating_add(Weight::from_parts(187_637_298, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(4))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
}
}
@@ -0,0 +1,137 @@
//! Autogenerated weights for `cumulus_pallet_xcmp_queue`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-04-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-172-31-15-118`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024
// Executed Command:
// target/release/parachain-template-node
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=results-cumulus_pallet_xcmp_queue.json
// --pallet=cumulus_pallet_xcmp_queue
// --chain=dev
// --output=new-benchmarks/cumulus_pallet_xcmp_queue.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `cumulus_pallet_xcmp_queue`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo<T> {
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:1)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn set_config_with_u32() -> Weight {
// Proof Size summary in bytes:
// Measured: `76`
// Estimated: `1561`
// Minimum execution time: 5_689_000 picoseconds.
Weight::from_parts(5_900_000, 0)
.saturating_add(Weight::from_parts(0, 1561))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
fn enqueue_xcmp_message() -> Weight {
// Proof Size summary in bytes:
// Measured: `82`
// Estimated: `3517`
// Minimum execution time: 17_110_000 picoseconds.
Weight::from_parts(17_515_000, 0)
.saturating_add(Weight::from_parts(0, 3517))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn suspend_channel() -> Weight {
// Proof Size summary in bytes:
// Measured: `76`
// Estimated: `1561`
// Minimum execution time: 3_337_000 picoseconds.
Weight::from_parts(3_433_000, 0)
.saturating_add(Weight::from_parts(0, 1561))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn resume_channel() -> Weight {
// Proof Size summary in bytes:
// Measured: `111`
// Estimated: `1596`
// Minimum execution time: 4_150_000 picoseconds.
Weight::from_parts(4_324_000, 0)
.saturating_add(Weight::from_parts(0, 1596))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
fn take_first_concatenated_xcm() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 9_245_000 picoseconds.
Weight::from_parts(9_765_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
fn on_idle_good_msg() -> Weight {
// Proof Size summary in bytes:
// Measured: `65711`
// Estimated: `69176`
// Minimum execution time: 115_317_000 picoseconds.
Weight::from_parts(117_489_000, 0)
.saturating_add(Weight::from_parts(0, 69176))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
fn on_idle_large_msg() -> Weight {
// Proof Size summary in bytes:
// Measured: `65710`
// Estimated: `69175`
// Minimum execution time: 56_379_000 picoseconds.
Weight::from_parts(58_187_000, 0)
.saturating_add(Weight::from_parts(0, 69175))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
}
+13
View File
@@ -18,7 +18,20 @@
//! Expose the auto generated weight files.
pub mod block_weights;
pub mod cumulus_pallet_parachain_system;
pub mod cumulus_pallet_xcmp_queue;
pub mod extrinsic_weights;
pub mod pallet_assets;
pub mod pallet_balances;
pub mod pallet_collator_selection;
pub mod pallet_message_queue;
pub mod pallet_multisig;
pub mod pallet_proxy;
pub mod pallet_session;
pub mod pallet_sudo;
pub mod pallet_timestamp;
pub mod pallet_utility;
pub mod pallet_xcm;
pub mod paritydb_weights;
pub mod rocksdb_weights;
+503
View File
@@ -0,0 +1,503 @@
//! Autogenerated weights for `pallet_assets`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-04-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-172-31-15-118`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024
// Executed Command:
// target/release/parachain-template-node
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=results-pallet_assets.json
// --pallet=pallet_assets
// --chain=dev
// --output=new-benchmarks/pallet_assets.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_assets`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn create() -> Weight {
// Proof Size summary in bytes:
// Measured: `146`
// Estimated: `3675`
// Minimum execution time: 30_471_000 picoseconds.
Weight::from_parts(31_044_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
fn force_create() -> Weight {
// Proof Size summary in bytes:
// Measured: `6`
// Estimated: `3675`
// Minimum execution time: 11_341_000 picoseconds.
Weight::from_parts(11_640_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
fn start_destroy() -> Weight {
// Proof Size summary in bytes:
// Measured: `277`
// Estimated: `3675`
// Minimum execution time: 13_750_000 picoseconds.
Weight::from_parts(14_126_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `Assets::Account` (r:1001 w:1000)
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1000 w:1000)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `c` is `[0, 1000]`.
fn destroy_accounts(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `85 + c * (208 ±0)`
// Estimated: `3675 + c * (2609 ±0)`
// Minimum execution time: 18_109_000 picoseconds.
Weight::from_parts(18_396_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
// Standard Error: 6_810
.saturating_add(Weight::from_parts(15_041_583, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(c.into())))
.saturating_add(Weight::from_parts(0, 2609).saturating_mul(c.into()))
}
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `Assets::Approvals` (r:1001 w:1000)
/// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`)
/// The range of component `a` is `[0, 1000]`.
fn destroy_approvals(a: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `414 + a * (86 ±0)`
// Estimated: `3675 + a * (2623 ±0)`
// Minimum execution time: 18_628_000 picoseconds.
Weight::from_parts(18_901_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
// Standard Error: 4_422
.saturating_add(Weight::from_parts(17_365_668, 0).saturating_mul(a.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into())))
.saturating_add(Weight::from_parts(0, 2623).saturating_mul(a.into()))
}
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `Assets::Metadata` (r:1 w:0)
/// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`)
fn finish_destroy() -> Weight {
// Proof Size summary in bytes:
// Measured: `243`
// Estimated: `3675`
// Minimum execution time: 15_092_000 picoseconds.
Weight::from_parts(15_711_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `Assets::Account` (r:1 w:1)
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
fn mint() -> Weight {
// Proof Size summary in bytes:
// Measured: `243`
// Estimated: `3675`
// Minimum execution time: 27_366_000 picoseconds.
Weight::from_parts(27_812_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `Assets::Account` (r:1 w:1)
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
fn burn() -> Weight {
// Proof Size summary in bytes:
// Measured: `351`
// Estimated: `3675`
// Minimum execution time: 36_696_000 picoseconds.
Weight::from_parts(37_320_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `Assets::Account` (r:2 w:2)
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `390`
// Estimated: `6208`
// Minimum execution time: 51_189_000 picoseconds.
Weight::from_parts(52_117_000, 0)
.saturating_add(Weight::from_parts(0, 6208))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `Assets::Account` (r:2 w:2)
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn transfer_keep_alive() -> Weight {
// Proof Size summary in bytes:
// Measured: `390`
// Estimated: `6208`
// Minimum execution time: 46_131_000 picoseconds.
Weight::from_parts(47_137_000, 0)
.saturating_add(Weight::from_parts(0, 6208))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `Assets::Account` (r:2 w:2)
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn force_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `390`
// Estimated: `6208`
// Minimum execution time: 51_431_000 picoseconds.
Weight::from_parts(51_988_000, 0)
.saturating_add(Weight::from_parts(0, 6208))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `Assets::Asset` (r:1 w:0)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `Assets::Account` (r:1 w:1)
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
fn freeze() -> Weight {
// Proof Size summary in bytes:
// Measured: `351`
// Estimated: `3675`
// Minimum execution time: 18_806_000 picoseconds.
Weight::from_parts(19_208_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Assets::Asset` (r:1 w:0)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `Assets::Account` (r:1 w:1)
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
fn thaw() -> Weight {
// Proof Size summary in bytes:
// Measured: `351`
// Estimated: `3675`
// Minimum execution time: 18_891_000 picoseconds.
Weight::from_parts(19_307_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
fn freeze_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `277`
// Estimated: `3675`
// Minimum execution time: 13_584_000 picoseconds.
Weight::from_parts(14_004_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
fn thaw_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `277`
// Estimated: `3675`
// Minimum execution time: 13_573_000 picoseconds.
Weight::from_parts(13_940_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `Assets::Metadata` (r:1 w:0)
/// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`)
fn transfer_ownership() -> Weight {
// Proof Size summary in bytes:
// Measured: `243`
// Estimated: `3675`
// Minimum execution time: 15_576_000 picoseconds.
Weight::from_parts(16_295_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
fn set_team() -> Weight {
// Proof Size summary in bytes:
// Measured: `243`
// Estimated: `3675`
// Minimum execution time: 13_374_000 picoseconds.
Weight::from_parts(13_775_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Assets::Asset` (r:1 w:0)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `Assets::Metadata` (r:1 w:1)
/// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 50]`.
/// The range of component `s` is `[0, 50]`.
fn set_metadata(_n: u32, _s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `243`
// Estimated: `3675`
// Minimum execution time: 32_479_000 picoseconds.
Weight::from_parts(33_701_345, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Assets::Asset` (r:1 w:0)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `Assets::Metadata` (r:1 w:1)
/// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`)
fn clear_metadata() -> Weight {
// Proof Size summary in bytes:
// Measured: `407`
// Estimated: `3675`
// Minimum execution time: 33_293_000 picoseconds.
Weight::from_parts(33_832_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Assets::Asset` (r:1 w:0)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `Assets::Metadata` (r:1 w:1)
/// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 50]`.
/// The range of component `s` is `[0, 50]`.
fn force_set_metadata(_n: u32, s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `82`
// Estimated: `3675`
// Minimum execution time: 13_737_000 picoseconds.
Weight::from_parts(14_470_503, 0)
.saturating_add(Weight::from_parts(0, 3675))
// Standard Error: 318
.saturating_add(Weight::from_parts(120, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Assets::Asset` (r:1 w:0)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `Assets::Metadata` (r:1 w:1)
/// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`)
fn force_clear_metadata() -> Weight {
// Proof Size summary in bytes:
// Measured: `407`
// Estimated: `3675`
// Minimum execution time: 32_485_000 picoseconds.
Weight::from_parts(33_247_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
fn force_asset_status() -> Weight {
// Proof Size summary in bytes:
// Measured: `243`
// Estimated: `3675`
// Minimum execution time: 12_881_000 picoseconds.
Weight::from_parts(13_245_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `Assets::Approvals` (r:1 w:1)
/// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`)
fn approve_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `277`
// Estimated: `3675`
// Minimum execution time: 37_242_000 picoseconds.
Weight::from_parts(38_026_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `Assets::Approvals` (r:1 w:1)
/// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`)
/// Storage: `Assets::Account` (r:2 w:2)
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn transfer_approved() -> Weight {
// Proof Size summary in bytes:
// Measured: `560`
// Estimated: `6208`
// Minimum execution time: 75_984_000 picoseconds.
Weight::from_parts(77_686_000, 0)
.saturating_add(Weight::from_parts(0, 6208))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `Assets::Approvals` (r:1 w:1)
/// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`)
fn cancel_approval() -> Weight {
// Proof Size summary in bytes:
// Measured: `447`
// Estimated: `3675`
// Minimum execution time: 39_641_000 picoseconds.
Weight::from_parts(40_125_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `Assets::Approvals` (r:1 w:1)
/// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`)
fn force_cancel_approval() -> Weight {
// Proof Size summary in bytes:
// Measured: `447`
// Estimated: `3675`
// Minimum execution time: 39_914_000 picoseconds.
Weight::from_parts(40_607_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
fn set_min_balance() -> Weight {
// Proof Size summary in bytes:
// Measured: `243`
// Estimated: `3675`
// Minimum execution time: 14_598_000 picoseconds.
Weight::from_parts(15_052_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Assets::Account` (r:1 w:1)
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn touch() -> Weight {
// Proof Size summary in bytes:
// Measured: `346`
// Estimated: `3675`
// Minimum execution time: 37_665_000 picoseconds.
Weight::from_parts(38_271_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Assets::Account` (r:1 w:1)
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
fn touch_other() -> Weight {
// Proof Size summary in bytes:
// Measured: `243`
// Estimated: `3675`
// Minimum execution time: 36_204_000 picoseconds.
Weight::from_parts(36_918_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Assets::Account` (r:1 w:1)
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn refund() -> Weight {
// Proof Size summary in bytes:
// Measured: `472`
// Estimated: `3675`
// Minimum execution time: 36_693_000 picoseconds.
Weight::from_parts(37_631_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Assets::Account` (r:1 w:1)
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
fn refund_other() -> Weight {
// Proof Size summary in bytes:
// Measured: `402`
// Estimated: `3675`
// Minimum execution time: 35_318_000 picoseconds.
Weight::from_parts(35_970_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Assets::Asset` (r:1 w:0)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `Assets::Account` (r:1 w:1)
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
fn block() -> Weight {
// Proof Size summary in bytes:
// Measured: `351`
// Estimated: `3675`
// Minimum execution time: 18_741_000 picoseconds.
Weight::from_parts(19_123_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
}
+143
View File
@@ -0,0 +1,143 @@
//! Autogenerated weights for `pallet_balances`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-04-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-172-31-15-118`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024
// Executed Command:
// target/release/parachain-template-node
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=results-pallet_balances.json
// --pallet=pallet_balances
// --chain=dev
// --output=new-benchmarks/pallet_balances.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_balances`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn transfer_allow_death() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 61_845_000 picoseconds.
Weight::from_parts(62_587_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn transfer_keep_alive() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 49_086_000 picoseconds.
Weight::from_parts(49_781_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn force_set_balance_creating() -> Weight {
// Proof Size summary in bytes:
// Measured: `174`
// Estimated: `3593`
// Minimum execution time: 18_512_000 picoseconds.
Weight::from_parts(19_052_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn force_set_balance_killing() -> Weight {
// Proof Size summary in bytes:
// Measured: `174`
// Estimated: `3593`
// Minimum execution time: 25_434_000 picoseconds.
Weight::from_parts(25_737_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn force_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `103`
// Estimated: `6196`
// Minimum execution time: 64_094_000 picoseconds.
Weight::from_parts(64_693_000, 0)
.saturating_add(Weight::from_parts(0, 6196))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn transfer_all() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 61_075_000 picoseconds.
Weight::from_parts(62_130_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn force_unreserve() -> Weight {
// Proof Size summary in bytes:
// Measured: `174`
// Estimated: `3593`
// Minimum execution time: 22_123_000 picoseconds.
Weight::from_parts(22_711_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:999 w:999)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `u` is `[1, 1000]`.
fn upgrade_accounts(u: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0 + u * (136 ±0)`
// Estimated: `990 + u * (2603 ±0)`
// Minimum execution time: 20_871_000 picoseconds.
Weight::from_parts(21_121_000, 0)
.saturating_add(Weight::from_parts(0, 990))
// Standard Error: 11_849
.saturating_add(Weight::from_parts(17_256_565, 0).saturating_mul(u.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into())))
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into()))
}
fn force_adjust_total_issuance() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_580_000 picoseconds.
Weight::from_parts(7_896_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
}
@@ -0,0 +1,262 @@
//! Autogenerated weights for `pallet_collator_selection`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-04-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-172-31-15-118`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024
// Executed Command:
// target/release/parachain-template-node
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=results-pallet_collator_selection.json
// --pallet=pallet_collator_selection
// --chain=dev
// --output=new-benchmarks/pallet_collator_selection.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_collator_selection`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightInfo<T> {
/// Storage: `Session::NextKeys` (r:20 w:0)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `CollatorSelection::Invulnerables` (r:0 w:1)
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
/// The range of component `b` is `[1, 20]`.
fn set_invulnerables(b: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `197 + b * (79 ±0)`
// Estimated: `1188 + b * (2555 ±0)`
// Minimum execution time: 15_121_000 picoseconds.
Weight::from_parts(11_575_812, 0)
.saturating_add(Weight::from_parts(0, 1188))
// Standard Error: 5_171
.saturating_add(Weight::from_parts(3_863_259, 0).saturating_mul(b.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(Weight::from_parts(0, 2555).saturating_mul(b.into()))
}
/// Storage: `Session::NextKeys` (r:1 w:0)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:1)
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `b` is `[1, 19]`.
/// The range of component `c` is `[1, 99]`.
fn add_invulnerable(b: u32, c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `795 + b * (32 ±0) + c * (53 ±0)`
// Estimated: `6287 + b * (37 ±0) + c * (53 ±0)`
// Minimum execution time: 50_613_000 picoseconds.
Weight::from_parts(51_112_923, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 8_238
.saturating_add(Weight::from_parts(115_427, 0).saturating_mul(b.into()))
// Standard Error: 1_561
.saturating_add(Weight::from_parts(127_230, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 53).saturating_mul(c.into()))
}
/// Storage: `CollatorSelection::CandidateList` (r:1 w:0)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:1)
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
/// The range of component `b` is `[5, 20]`.
fn remove_invulnerable(b: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `119 + b * (32 ±0)`
// Estimated: `6287`
// Minimum execution time: 14_815_000 picoseconds.
Weight::from_parts(14_625_673, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 2_646
.saturating_add(Weight::from_parts(193_155, 0).saturating_mul(b.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `CollatorSelection::DesiredCandidates` (r:0 w:1)
/// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn set_desired_candidates() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 6_224_000 picoseconds.
Weight::from_parts(6_590_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `CollatorSelection::CandidacyBond` (r:1 w:1)
/// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:100 w:100)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:100)
/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// The range of component `c` is `[0, 100]`.
/// The range of component `k` is `[0, 100]`.
fn set_candidacy_bond(c: u32, k: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0 + c * (182 ±0) + k * (115 ±0)`
// Estimated: `6287 + c * (901 ±29) + k * (901 ±29)`
// Minimum execution time: 12_606_000 picoseconds.
Weight::from_parts(12_842_000, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 206_311
.saturating_add(Weight::from_parts(6_859_322, 0).saturating_mul(c.into()))
// Standard Error: 206_311
.saturating_add(Weight::from_parts(6_628_261, 0).saturating_mul(k.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into())))
.saturating_add(Weight::from_parts(0, 901).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 901).saturating_mul(k.into()))
}
/// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0)
/// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// The range of component `c` is `[3, 100]`.
fn update_bond(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `319 + c * (49 ±0)`
// Estimated: `6287`
// Minimum execution time: 31_610_000 picoseconds.
Weight::from_parts(34_921_968, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 1_584
.saturating_add(Weight::from_parts(132_287, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:0)
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
/// Storage: `Session::NextKeys` (r:1 w:0)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0)
/// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1)
/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// The range of component `c` is `[1, 99]`.
fn register_as_candidate(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `765 + c * (52 ±0)`
// Estimated: `6287 + c * (54 ±0)`
// Minimum execution time: 42_703_000 picoseconds.
Weight::from_parts(47_686_567, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 2_319
.saturating_add(Weight::from_parts(161_883, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
.saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into()))
}
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:0)
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0)
/// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `Session::NextKeys` (r:1 w:0)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:2)
/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// The range of component `c` is `[3, 100]`.
fn take_candidate_slot(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `905 + c * (53 ±0)`
// Estimated: `6287 + c * (54 ±0)`
// Minimum execution time: 65_964_000 picoseconds.
Weight::from_parts(71_134_634, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 2_881
.saturating_add(Weight::from_parts(170_853, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(4))
.saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into()))
}
/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:0)
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1)
/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// The range of component `c` is `[3, 100]`.
fn leave_intent(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `347 + c * (48 ±0)`
// Estimated: `6287`
// Minimum execution time: 36_613_000 picoseconds.
Weight::from_parts(40_351_254, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 2_282
.saturating_add(Weight::from_parts(148_710, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1)
/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
fn note_author() -> Weight {
// Proof Size summary in bytes:
// Measured: `155`
// Estimated: `6196`
// Minimum execution time: 55_131_000 picoseconds.
Weight::from_parts(56_088_000, 0)
.saturating_add(Weight::from_parts(0, 6196))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `CollatorSelection::CandidateList` (r:1 w:0)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::LastAuthoredBlock` (r:100 w:0)
/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:0)
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::DesiredCandidates` (r:1 w:0)
/// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:97 w:97)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `r` is `[1, 100]`.
/// The range of component `c` is `[1, 100]`.
fn new_session(r: u32, c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `2302 + c * (97 ±0) + r * (114 ±0)`
// Estimated: `6287 + c * (2519 ±0) + r * (2603 ±0)`
// Minimum execution time: 23_331_000 picoseconds.
Weight::from_parts(23_736_000, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 365_295
.saturating_add(Weight::from_parts(15_835_608, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
.saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(r.into()))
}
}
+168
View File
@@ -0,0 +1,168 @@
//! Autogenerated weights for `pallet_message_queue`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-04-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-172-31-15-118`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024
// Executed Command:
// target/release/parachain-template-node
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=results-pallet_message_queue.json
// --pallet=pallet_message_queue
// --chain=dev
// --output=new-benchmarks/pallet_message_queue.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_message_queue`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_message_queue::WeightInfo for WeightInfo<T> {
/// Storage: `MessageQueue::ServiceHead` (r:1 w:0)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
fn ready_ring_knit() -> Weight {
// Proof Size summary in bytes:
// Measured: `223`
// Estimated: `6044`
// Minimum execution time: 15_177_000 picoseconds.
Weight::from_parts(15_591_000, 0)
.saturating_add(Weight::from_parts(0, 6044))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
fn ready_ring_unknit() -> Weight {
// Proof Size summary in bytes:
// Measured: `218`
// Estimated: `6044`
// Minimum execution time: 13_482_000 picoseconds.
Weight::from_parts(13_950_000, 0)
.saturating_add(Weight::from_parts(0, 6044))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
fn service_queue_base() -> Weight {
// Proof Size summary in bytes:
// Measured: `6`
// Estimated: `3517`
// Minimum execution time: 4_733_000 picoseconds.
Weight::from_parts(4_944_000, 0)
.saturating_add(Weight::from_parts(0, 3517))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
fn service_page_base_completion() -> Weight {
// Proof Size summary in bytes:
// Measured: `72`
// Estimated: `69050`
// Minimum execution time: 6_922_000 picoseconds.
Weight::from_parts(7_105_000, 0)
.saturating_add(Weight::from_parts(0, 69050))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
fn service_page_base_no_completion() -> Weight {
// Proof Size summary in bytes:
// Measured: `72`
// Estimated: `69050`
// Minimum execution time: 7_240_000 picoseconds.
Weight::from_parts(7_430_000, 0)
.saturating_add(Weight::from_parts(0, 69050))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `MessageQueue::BookStateFor` (r:0 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
fn service_page_item() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 159_880_000 picoseconds.
Weight::from_parts(161_674_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
fn bump_service_head() -> Weight {
// Proof Size summary in bytes:
// Measured: `171`
// Estimated: `3517`
// Minimum execution time: 8_730_000 picoseconds.
Weight::from_parts(9_148_000, 0)
.saturating_add(Weight::from_parts(0, 3517))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
fn reap_page() -> Weight {
// Proof Size summary in bytes:
// Measured: `65667`
// Estimated: `69050`
// Minimum execution time: 59_300_000 picoseconds.
Weight::from_parts(60_857_000, 0)
.saturating_add(Weight::from_parts(0, 69050))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
fn execute_overweight_page_removed() -> Weight {
// Proof Size summary in bytes:
// Measured: `65667`
// Estimated: `69050`
// Minimum execution time: 75_919_000 picoseconds.
Weight::from_parts(77_801_000, 0)
.saturating_add(Weight::from_parts(0, 69050))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
fn execute_overweight_page_updated() -> Weight {
// Proof Size summary in bytes:
// Measured: `65667`
// Estimated: `69050`
// Minimum execution time: 110_599_000 picoseconds.
Weight::from_parts(112_834_000, 0)
.saturating_add(Weight::from_parts(0, 69050))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
}
+147
View File
@@ -0,0 +1,147 @@
//! Autogenerated weights for `pallet_multisig`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-04-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-172-31-15-118`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024
// Executed Command:
// target/release/parachain-template-node
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=results-pallet_multisig.json
// --pallet=pallet_multisig
// --chain=dev
// --output=new-benchmarks/pallet_multisig.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_multisig`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
/// The range of component `z` is `[0, 10000]`.
fn as_multi_threshold_1(z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 15_963_000 picoseconds.
Weight::from_parts(16_803_573, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 3
.saturating_add(Weight::from_parts(501, 0).saturating_mul(z.into()))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_create(s: u32, z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `263 + s * (2 ±0)`
// Estimated: `6811`
// Minimum execution time: 51_483_000 picoseconds.
Weight::from_parts(39_405_257, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 538
.saturating_add(Weight::from_parts(132_817, 0).saturating_mul(s.into()))
// Standard Error: 5
.saturating_add(Weight::from_parts(1_404, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[3, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `282`
// Estimated: `6811`
// Minimum execution time: 33_016_000 picoseconds.
Weight::from_parts(22_290_579, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 464
.saturating_add(Weight::from_parts(119_179, 0).saturating_mul(s.into()))
// Standard Error: 4
.saturating_add(Weight::from_parts(1_390, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `388 + s * (33 ±0)`
// Estimated: `6811`
// Minimum execution time: 55_907_000 picoseconds.
Weight::from_parts(43_257_069, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 614
.saturating_add(Weight::from_parts(161_107, 0).saturating_mul(s.into()))
// Standard Error: 6
.saturating_add(Weight::from_parts(1_467, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_create(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `263 + s * (2 ±0)`
// Estimated: `6811`
// Minimum execution time: 36_962_000 picoseconds.
Weight::from_parts(38_010_134, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 704
.saturating_add(Weight::from_parts(133_385, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_approve(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `282`
// Estimated: `6811`
// Minimum execution time: 20_134_000 picoseconds.
Weight::from_parts(20_794_717, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 556
.saturating_add(Weight::from_parts(117_695, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
fn cancel_as_multi(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `454 + s * (1 ±0)`
// Estimated: `6811`
// Minimum execution time: 38_167_000 picoseconds.
Weight::from_parts(39_536_648, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 649
.saturating_add(Weight::from_parts(123_380, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
}
+208
View File
@@ -0,0 +1,208 @@
//! Autogenerated weights for `pallet_proxy`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-04-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-172-31-15-118`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024
// Executed Command:
// target/release/parachain-template-node
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=results-pallet_proxy.json
// --pallet=pallet_proxy
// --chain=dev
// --output=new-benchmarks/pallet_proxy.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_proxy`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
/// Storage: `Proxy::Proxies` (r:1 w:0)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 31]`.
fn proxy(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `127 + p * (37 ±0)`
// Estimated: `4706`
// Minimum execution time: 16_811_000 picoseconds.
Weight::from_parts(17_498_789, 0)
.saturating_add(Weight::from_parts(0, 4706))
// Standard Error: 1_033
.saturating_add(Weight::from_parts(39_226, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1))
}
/// Storage: `Proxy::Proxies` (r:1 w:0)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// Storage: `Proxy::Announcements` (r:1 w:1)
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn proxy_announced(a: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `454 + a * (68 ±0) + p * (37 ±0)`
// Estimated: `5698`
// Minimum execution time: 42_360_000 picoseconds.
Weight::from_parts(42_166_938, 0)
.saturating_add(Weight::from_parts(0, 5698))
// Standard Error: 1_953
.saturating_add(Weight::from_parts(186_281, 0).saturating_mul(a.into()))
// Standard Error: 2_018
.saturating_add(Weight::from_parts(40_941, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Proxy::Announcements` (r:1 w:1)
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn remove_announcement(a: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `369 + a * (68 ±0)`
// Estimated: `5698`
// Minimum execution time: 28_790_000 picoseconds.
Weight::from_parts(29_831_651, 0)
.saturating_add(Weight::from_parts(0, 5698))
// Standard Error: 1_469
.saturating_add(Weight::from_parts(177_561, 0).saturating_mul(a.into()))
// Standard Error: 1_518
.saturating_add(Weight::from_parts(6_744, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Proxy::Announcements` (r:1 w:1)
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn reject_announcement(a: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `369 + a * (68 ±0)`
// Estimated: `5698`
// Minimum execution time: 28_875_000 picoseconds.
Weight::from_parts(29_321_993, 0)
.saturating_add(Weight::from_parts(0, 5698))
// Standard Error: 1_580
.saturating_add(Weight::from_parts(196_998, 0).saturating_mul(a.into()))
// Standard Error: 1_632
.saturating_add(Weight::from_parts(10_468, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Proxy::Proxies` (r:1 w:0)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// Storage: `Proxy::Announcements` (r:1 w:1)
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn announce(a: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `386 + a * (68 ±0) + p * (37 ±0)`
// Estimated: `5698`
// Minimum execution time: 37_912_000 picoseconds.
Weight::from_parts(37_943_779, 0)
.saturating_add(Weight::from_parts(0, 5698))
// Standard Error: 1_776
.saturating_add(Weight::from_parts(185_911, 0).saturating_mul(a.into()))
// Standard Error: 1_835
.saturating_add(Weight::from_parts(37_585, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Proxy::Proxies` (r:1 w:1)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 31]`.
fn add_proxy(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `127 + p * (37 ±0)`
// Estimated: `4706`
// Minimum execution time: 27_681_000 picoseconds.
Weight::from_parts(28_596_631, 0)
.saturating_add(Weight::from_parts(0, 4706))
// Standard Error: 1_091
.saturating_add(Weight::from_parts(43_421, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Proxy::Proxies` (r:1 w:1)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 31]`.
fn remove_proxy(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `127 + p * (37 ±0)`
// Estimated: `4706`
// Minimum execution time: 27_554_000 picoseconds.
Weight::from_parts(28_545_861, 0)
.saturating_add(Weight::from_parts(0, 4706))
// Standard Error: 2_208
.saturating_add(Weight::from_parts(43_109, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Proxy::Proxies` (r:1 w:1)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 31]`.
fn remove_proxies(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `127 + p * (37 ±0)`
// Estimated: `4706`
// Minimum execution time: 27_032_000 picoseconds.
Weight::from_parts(27_806_016, 0)
.saturating_add(Weight::from_parts(0, 4706))
// Standard Error: 1_267
.saturating_add(Weight::from_parts(39_725, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Proxy::Proxies` (r:1 w:1)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 31]`.
fn create_pure(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `139`
// Estimated: `4706`
// Minimum execution time: 29_816_000 picoseconds.
Weight::from_parts(30_613_421, 0)
.saturating_add(Weight::from_parts(0, 4706))
// Standard Error: 1_154
.saturating_add(Weight::from_parts(12_164, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Proxy::Proxies` (r:1 w:1)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// The range of component `p` is `[0, 30]`.
fn kill_pure(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `164 + p * (37 ±0)`
// Estimated: `4706`
// Minimum execution time: 27_949_000 picoseconds.
Weight::from_parts(28_784_363, 0)
.saturating_add(Weight::from_parts(0, 4706))
// Standard Error: 1_418
.saturating_add(Weight::from_parts(43_671, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
}
+63
View File
@@ -0,0 +1,63 @@
//! Autogenerated weights for `pallet_session`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-04-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-172-31-15-118`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024
// Executed Command:
// target/release/parachain-template-node
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=results-pallet_session.json
// --pallet=pallet_session
// --chain=dev
// --output=new-benchmarks/pallet_session.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_session`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_session::WeightInfo for WeightInfo<T> {
/// Storage: `Session::NextKeys` (r:1 w:1)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Session::KeyOwner` (r:1 w:1)
/// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn set_keys() -> Weight {
// Proof Size summary in bytes:
// Measured: `298`
// Estimated: `3763`
// Minimum execution time: 21_752_000 picoseconds.
Weight::from_parts(22_330_000, 0)
.saturating_add(Weight::from_parts(0, 3763))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Session::NextKeys` (r:1 w:1)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Session::KeyOwner` (r:0 w:1)
/// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn purge_keys() -> Weight {
// Proof Size summary in bytes:
// Measured: `280`
// Estimated: `3745`
// Minimum execution time: 15_661_000 picoseconds.
Weight::from_parts(16_188_000, 0)
.saturating_add(Weight::from_parts(0, 3745))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(2))
}
}
+81
View File
@@ -0,0 +1,81 @@
//! Autogenerated weights for `pallet_sudo`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-04-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-172-31-15-118`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024
// Executed Command:
// target/release/parachain-template-node
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=results-pallet_sudoo.json
// --pallet=pallet_sudo
// --chain=dev
// --output=new-benchmarks/pallet_sudo.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_sudo`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_sudo::WeightInfo for WeightInfo<T> {
/// Storage: `Sudo::Key` (r:1 w:1)
/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
fn set_key() -> Weight {
// Proof Size summary in bytes:
// Measured: `98`
// Estimated: `1517`
// Minimum execution time: 11_689_000 picoseconds.
Weight::from_parts(12_230_000, 0)
.saturating_add(Weight::from_parts(0, 1517))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Sudo::Key` (r:1 w:0)
/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
fn sudo() -> Weight {
// Proof Size summary in bytes:
// Measured: `98`
// Estimated: `1517`
// Minimum execution time: 13_177_000 picoseconds.
Weight::from_parts(13_585_000, 0)
.saturating_add(Weight::from_parts(0, 1517))
.saturating_add(T::DbWeight::get().reads(1))
}
/// Storage: `Sudo::Key` (r:1 w:0)
/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
fn sudo_as() -> Weight {
// Proof Size summary in bytes:
// Measured: `98`
// Estimated: `1517`
// Minimum execution time: 13_108_000 picoseconds.
Weight::from_parts(13_292_000, 0)
.saturating_add(Weight::from_parts(0, 1517))
.saturating_add(T::DbWeight::get().reads(1))
}
/// Storage: `Sudo::Key` (r:1 w:1)
/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
fn remove_key() -> Weight {
// Proof Size summary in bytes:
// Measured: `98`
// Estimated: `1517`
// Minimum execution time: 10_717_000 picoseconds.
Weight::from_parts(11_101_000, 0)
.saturating_add(Weight::from_parts(0, 1517))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
}
+57
View File
@@ -0,0 +1,57 @@
//! Autogenerated weights for `pallet_timestamp`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-04-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-172-31-15-118`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024
// Executed Command:
// target/release/parachain-template-node
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=results-pallet_timestamp.json
// --pallet=pallet_timestamp
// --chain=dev
// --output=new-benchmarks/pallet_timestamp.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_timestamp`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_timestamp::WeightInfo for WeightInfo<T> {
/// Storage: `Timestamp::Now` (r:1 w:1)
/// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Aura::CurrentSlot` (r:1 w:0)
/// Proof: `Aura::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
fn set() -> Weight {
// Proof Size summary in bytes:
// Measured: `86`
// Estimated: `1493`
// Minimum execution time: 9_158_000 picoseconds.
Weight::from_parts(9_527_000, 0)
.saturating_add(Weight::from_parts(0, 1493))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
fn on_finalize() -> Weight {
// Proof Size summary in bytes:
// Measured: `57`
// Estimated: `0`
// Minimum execution time: 3_510_000 picoseconds.
Weight::from_parts(3_645_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
}
+84
View File
@@ -0,0 +1,84 @@
//! Autogenerated weights for `pallet_utility`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-04-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-172-31-15-118`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024
// Executed Command:
// target/release/parachain-template-node
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=results-pallet_utility.json
// --pallet=pallet_utility
// --chain=dev
// --output=new-benchmarks/pallet_utility.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_utility`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> {
/// 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: 6_057_000 picoseconds.
Weight::from_parts(4_367_274, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 2_090
.saturating_add(Weight::from_parts(4_008_467, 0).saturating_mul(c.into()))
}
fn as_derivative() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_860_000 picoseconds.
Weight::from_parts(6_000_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// The range of component `c` is `[0, 1000]`.
fn batch_all(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 6_017_000 picoseconds.
Weight::from_parts(12_194_196, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 1_988
.saturating_add(Weight::from_parts(4_264_201, 0).saturating_mul(c.into()))
}
fn dispatch_as() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_543_000 picoseconds.
Weight::from_parts(8_753_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// The range of component `c` is `[0, 1000]`.
fn force_batch(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_875_000 picoseconds.
Weight::from_parts(12_733_935, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 1_667
.saturating_add(Weight::from_parts(3_957_502, 0).saturating_mul(c.into()))
}
}
+309
View File
@@ -0,0 +1,309 @@
//! Autogenerated weights for `pallet_xcm`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-04-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-172-31-15-118`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024
// Executed Command:
// target/release/parachain-template-node
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=results-pallet_xcm.json
// --pallet=pallet_xcm
// --chain=dev
// --output=new-benchmarks/pallet_xcm.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_xcm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn send() -> Weight {
// Proof Size summary in bytes:
// Measured: `6`
// Estimated: `1491`
// Minimum execution time: 17_955_000 picoseconds.
Weight::from_parts(18_187_000, 0)
.saturating_add(Weight::from_parts(0, 1491))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn send_blob() -> Weight {
// Proof Size summary in bytes:
// Measured: `6`
// Estimated: `1491`
// Minimum execution time: 18_092_000 picoseconds.
Weight::from_parts(18_246_000, 0)
.saturating_add(Weight::from_parts(0, 1491))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Benchmark::Override` (r:0 w:0)
/// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn teleport_assets() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight::from_parts(18_446_744_073_709_551_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `Benchmark::Override` (r:0 w:0)
/// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn reserve_transfer_assets() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight::from_parts(18_446_744_073_709_551_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `Benchmark::Override` (r:0 w:0)
/// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn transfer_assets() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight::from_parts(18_446_744_073_709_551_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `Benchmark::Override` (r:0 w:0)
/// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn execute() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight::from_parts(18_446_744_073_709_551_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `Benchmark::Override` (r:0 w:0)
/// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn execute_blob() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight::from_parts(18_446_744_073_709_551_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `PolkadotXcm::SupportedVersion` (r:0 w:1)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn force_xcm_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 9_556_000 picoseconds.
Weight::from_parts(9_862_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
fn force_default_xcm_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_017_000 picoseconds.
Weight::from_parts(3_204_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1)
/// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1)
/// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::Queries` (r:0 w:1)
/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn force_subscribe_version_notify() -> Weight {
// Proof Size summary in bytes:
// Measured: `6`
// Estimated: `3471`
// Minimum execution time: 25_492_000 picoseconds.
Weight::from_parts(25_934_000, 0)
.saturating_add(Weight::from_parts(0, 3471))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1)
/// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::Queries` (r:0 w:1)
/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn force_unsubscribe_version_notify() -> Weight {
// Proof Size summary in bytes:
// Measured: `99`
// Estimated: `3564`
// Minimum execution time: 26_759_000 picoseconds.
Weight::from_parts(27_099_000, 0)
.saturating_add(Weight::from_parts(0, 3564))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `PolkadotXcm::XcmExecutionSuspended` (r:0 w:1)
/// Proof: `PolkadotXcm::XcmExecutionSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn force_suspension() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_982_000 picoseconds.
Weight::from_parts(3_212_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `PolkadotXcm::SupportedVersion` (r:5 w:2)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn migrate_supported_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `23`
// Estimated: `13388`
// Minimum execution time: 21_454_000 picoseconds.
Weight::from_parts(21_914_000, 0)
.saturating_add(Weight::from_parts(0, 13388))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `PolkadotXcm::VersionNotifiers` (r:5 w:2)
/// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn migrate_version_notifiers() -> Weight {
// Proof Size summary in bytes:
// Measured: `27`
// Estimated: `13392`
// Minimum execution time: 21_476_000 picoseconds.
Weight::from_parts(21_886_000, 0)
.saturating_add(Weight::from_parts(0, 13392))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:6 w:0)
/// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn already_notified_target() -> Weight {
// Proof Size summary in bytes:
// Measured: `40`
// Estimated: `15880`
// Minimum execution time: 22_903_000 picoseconds.
Weight::from_parts(23_384_000, 0)
.saturating_add(Weight::from_parts(0, 15880))
.saturating_add(T::DbWeight::get().reads(6))
}
/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:2 w:1)
/// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn notify_current_targets() -> Weight {
// Proof Size summary in bytes:
// Measured: `40`
// Estimated: `5980`
// Minimum execution time: 23_670_000 picoseconds.
Weight::from_parts(24_355_000, 0)
.saturating_add(Weight::from_parts(0, 5980))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:4 w:0)
/// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn notify_target_migration_fail() -> Weight {
// Proof Size summary in bytes:
// Measured: `70`
// Estimated: `10960`
// Minimum execution time: 15_093_000 picoseconds.
Weight::from_parts(15_560_000, 0)
.saturating_add(Weight::from_parts(0, 10960))
.saturating_add(T::DbWeight::get().reads(4))
}
/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:5 w:2)
/// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn migrate_version_notify_targets() -> Weight {
// Proof Size summary in bytes:
// Measured: `34`
// Estimated: `13399`
// Minimum execution time: 21_702_000 picoseconds.
Weight::from_parts(22_220_000, 0)
.saturating_add(Weight::from_parts(0, 13399))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:5 w:2)
/// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn migrate_and_notify_old_targets() -> Weight {
// Proof Size summary in bytes:
// Measured: `40`
// Estimated: `13405`
// Minimum execution time: 35_406_000 picoseconds.
Weight::from_parts(36_309_000, 0)
.saturating_add(Weight::from_parts(0, 13405))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1)
/// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::Queries` (r:0 w:1)
/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn new_query() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `1485`
// Minimum execution time: 3_502_000 picoseconds.
Weight::from_parts(3_538_000, 0)
.saturating_add(Weight::from_parts(0, 1485))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `PolkadotXcm::Queries` (r:1 w:1)
/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn take_response() -> Weight {
// Proof Size summary in bytes:
// Measured: `7576`
// Estimated: `11041`
// Minimum execution time: 32_124_000 picoseconds.
Weight::from_parts(32_520_000, 0)
.saturating_add(Weight::from_parts(0, 11041))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `PolkadotXcm::AssetTraps` (r:1 w:1)
/// Proof: `PolkadotXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn claim_assets() -> Weight {
// Proof Size summary in bytes:
// Measured: `24`
// Estimated: `3489`
// Minimum execution time: 46_695_000 picoseconds.
Weight::from_parts(47_562_000, 0)
.saturating_add(Weight::from_parts(0, 3489))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
}
+34 -12
View File
@@ -1,27 +1,31 @@
use frame_support::{
parameter_types,
traits::{ConstU32, Contains, Everything, Nothing, PalletInfoAccess},
traits::{ConstU32, Contains, Everything, Get, Nothing, PalletInfoAccess},
weights::Weight,
PalletId,
};
use frame_system::EnsureRoot;
use pallet_xcm::XcmPassthrough;
use polkadot_parachain_primitives::primitives::Sibling;
use polkadot_parachain_primitives::primitives::{self, Sibling};
use polkadot_runtime_common::impls::ToAuthor;
use sp_runtime::traits::AccountIdConversion;
use xcm::latest::prelude::*;
use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowTopLevelPaidExecutionFrom,
DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FixedWeightBounds,
FrameTransactionalProcessor, FungibleAdapter, FungiblesAdapter, IsConcrete, NativeAsset,
NoChecking, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
WithComputedOrigin, WithUniqueTopic,
FrameTransactionalProcessor, FungibleAdapter, FungiblesAdapter, IsChildSystemParachain,
IsConcrete, NativeAsset, NoChecking, ParentIsPreset, RelayChainAsNative,
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
UsingComponents, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents,
XcmFeeToAccount,
};
use xcm_executor::XcmExecutor;
use super::{
AccountId, AllPalletsWithSystem, Assets, Balance, Balances, ParachainInfo, ParachainSystem,
PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue,
weights, AccountId, AllPalletsWithSystem, Assets, Balance, Balances, ParachainInfo,
ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee,
XcmpQueue,
};
parameter_types! {
@@ -107,6 +111,18 @@ pub type XcmOriginToTransactDispatchOrigin = (
XcmPassthrough<RuntimeOrigin>,
);
// This is a workaround. We have added Treasury in the master and it will be added in the next release.
// We will collect fees on this pseudo treasury account until Treasury is rolled out.
// When treasury will be introduced, it will use the same account for fee collection so transition should be smooth.
pub struct TreasuryAccount;
impl Get<AccountId> for TreasuryAccount {
fn get() -> AccountId {
const ID: PalletId = PalletId(*b"py/trsry");
AccountIdConversion::<AccountId>::into_account_truncating(&ID)
}
}
parameter_types! {
// One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate.
pub const UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024);
@@ -150,7 +166,13 @@ impl xcm_executor::Config for XcmConfig {
type AssetTrap = PolkadotXcm;
type Barrier = Barrier;
type CallDispatcher = RuntimeCall;
type FeeManager = ();
type FeeManager = XcmFeeManagerFromComponents<
IsChildSystemParachain<primitives::Id>,
XcmFeeToAccount<Self::AssetTransactor, AccountId, TreasuryAccount>,
>;
type HrmpChannelAcceptedHandler = ();
type HrmpChannelClosingHandler = ();
type HrmpNewChannelOpenRequestHandler = ();
type IsReserve = NativeAsset;
type IsTeleporter = ();
type MaxAssetsIntoHolding = MaxAssetsIntoHolding;
@@ -206,14 +228,14 @@ impl pallet_xcm::Config for Runtime {
type TrustedLockers = ();
type UniversalLocation = UniversalLocation;
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
type WeightInfo = pallet_xcm::TestWeightInfo;
type WeightInfo = weights::pallet_xcm::WeightInfo<Runtime>;
type XcmExecuteFilter = Nothing;
// ^ Disable dispatchable execute on the XCM pallet.
// Needs to be `Everything` for local testing.
type XcmExecutor = XcmExecutor<XcmConfig>;
type XcmReserveTransferFilter = Nothing;
type XcmRouter = XcmRouter;
type XcmTeleportFilter = Everything;
type XcmTeleportFilter = Nothing;
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
}
+18 -18
View File
@@ -2,13 +2,13 @@
chain = "rococo-local"
default_command = "./bin-v1.6.0/polkadot"
[[relaychain.nodes]]
name = "alice"
validator = true
[[relaychain.nodes]]
name = "alice"
validator = true
[[relaychain.nodes]]
name = "bob"
validator = true
[[relaychain.nodes]]
name = "bob"
validator = true
[[parachains]]
id = 1000
@@ -16,16 +16,16 @@ addToGenesis = true
cumulus_based = true
chain = "dev"
[[parachains.collators]]
name = "collator01"
command = "./target/release/parachain-template-node"
ws_port = 9933
rpc_port = 8833
args = ["--rpc-max-connections 10000"]
[[parachains.collators]]
name = "collator01"
command = "./target/release/parachain-template-node"
ws_port = 9933
rpc_port = 8833
args = ["--rpc-max-connections 10000"]
[[parachains.collators]]
name = "collator02"
ws_port = 9822
rpc_port = 8822
command = "./target/release/parachain-template-node"
args = ["--rpc-max-connections 10000"]
[[parachains.collators]]
name = "collator02"
ws_port = 9822
rpc_port = 8822
command = "./target/release/parachain-template-node"
args = ["--rpc-max-connections 10000"]