Skip to content

Commit

Permalink
Add tracing for runtime-3300 (#117)
Browse files Browse the repository at this point in the history
* Add tracing sources for runtime-3300

* Add tracing WASM for runtime-3300
pLabarta authored Oct 10, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent f2961df commit d3e6829
Showing 136 changed files with 66,110 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"gen":"srtool v0.15.0","src":"zip","version":"0.8.4","commit":"","tag":"","branch":"","rustc":"rustc 1.77.0 (aedd173a2 2024-03-17)","pkg":"moonbase-runtime","tmsp":"2024-10-10T16:56:05Z","size":"2252962","prop":"0x815ffa5efe9a97e7f12786cf57083ab69f30485938f154e42d0d1980fb9652bb","authorize_upgrade_prop":"0x2734dad804bec7370cfc182ad476603e16c6cece50bb65d92925288e4e0a7344","ipfs":"QmZM2dqLzwzXNcq7G7WjTaK9hkuTJGMPc8nNYC7cx8x9vC","sha256":"0x2ccedab290fd8370e02ead1094a99354b1d9a86546efaeaafe9b0cc5eef51758","wasm":"runtime/moonbase/target/srtool/release/wbuild/moonbase-runtime/moonbase_runtime.compact.compressed.wasm","info":{"generator":{"name":"srtool","version":"0.15.0"},"src":"zip","version":"0.8.4","git":{"commit":"","tag":"","branch":""},"rustc":"rustc 1.77.0 (aedd173a2 2024-03-17)","pkg":"moonbase-runtime","profile":"release"},"context":{"package":"moonbase-runtime","runtime_dir":"runtime/moonbase","docker":{"image":"paritytech/srtool","tag":"1.77.0"},"profile":"release"},"runtimes":{"compact":{"tmsp":"2024-10-10T16:55:37Z","size":"10862977","prop":"0xff3ef2a87eb7c9360c05b21f09ade1c389025255cc2ef2913a1ec97dc5bc3700","authorize_upgrade_prop":"0xb6d25c19dcb0e735be430420fba46a36a31ef5a240adb8b51d654d6be778bdfd","blake2_256":"0x52fda941a96c472328513db2d289bb87fe37697bf33541fb77d4216ee563025c","ipfs":"QmSnL3bm8qjUKLgV56cdGJCKfpSp1dRr6vyCPtSoZNtBE3","sha256":"0xaf162348acecb5403d0fa605b567ee02607d6863bd0ac7479a26fc998aac9d21","wasm":"runtime/moonbase/target/srtool/release/wbuild/moonbase-runtime/moonbase_runtime.compact.wasm","subwasm":{"size":10862977,"compression":{"size_compressed":10862977,"size_decompressed":10862977,"compressed":false},"reserved_meta":[109,101,116,97],"reserved_meta_valid":true,"metadata_version":14,"core_version":{"specName":"moonbase","implName":"moonbase","authoringVersion":4,"specVersion":3300,"implVersion":0,"apis":[["0xd2bc9897eed08f15",3],["0xd0399cd053adda2b",1],["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xf78b278be53f454c",2],["0xab3c0572291feb8b",1],["0xfbc577b9d747efd6",1],["0xbc9d89904f5b923f",1],["0xbd78255d4feeea1f",6],["0xa33d43f58731ad84",2],["0x582211f65bb14b89",5],["0xe65b00e46cedd0aa",2],["0x37c8bb1350a9a2a8",4],["0x2aa62120049dd2d2",1],["0xea93e3f16f3d6962",2],["0xba8173bf23b2e6f8",1],["0x6ff52ee858e6c5bd",1],["0x91b1c8b16328eb92",1],["0x9ffb505aa738d69c",1]],"transactionVersion":3,"stateVersion":1},"proposal_hash":"0xff3ef2a87eb7c9360c05b21f09ade1c389025255cc2ef2913a1ec97dc5bc3700","parachain_authorize_upgrade_hash":"0xb6d25c19dcb0e735be430420fba46a36a31ef5a240adb8b51d654d6be778bdfd","ipfs_hash":"QmSnL3bm8qjUKLgV56cdGJCKfpSp1dRr6vyCPtSoZNtBE3","blake2_256":"0x52fda941a96c472328513db2d289bb87fe37697bf33541fb77d4216ee563025c"}},"compressed":{"tmsp":"2024-10-10T16:52:15Z","size":"2252962","prop":"0x815ffa5efe9a97e7f12786cf57083ab69f30485938f154e42d0d1980fb9652bb","authorize_upgrade_prop":"0x2734dad804bec7370cfc182ad476603e16c6cece50bb65d92925288e4e0a7344","blake2_256":"0x1638e9cf83c2b914bec6540439581e1303268434ad348db86b5f804563fb59de","ipfs":"QmZM2dqLzwzXNcq7G7WjTaK9hkuTJGMPc8nNYC7cx8x9vC","sha256":"0x2ccedab290fd8370e02ead1094a99354b1d9a86546efaeaafe9b0cc5eef51758","wasm":"runtime/moonbase/target/srtool/release/wbuild/moonbase-runtime/moonbase_runtime.compact.compressed.wasm","subwasm":{"size":2252962,"compression":{"size_compressed":2252962,"size_decompressed":10862977,"compressed":true},"reserved_meta":[109,101,116,97],"reserved_meta_valid":true,"metadata_version":14,"core_version":{"specName":"moonbase","implName":"moonbase","authoringVersion":4,"specVersion":3300,"implVersion":0,"apis":[["0xd2bc9897eed08f15",3],["0xd0399cd053adda2b",1],["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xf78b278be53f454c",2],["0xab3c0572291feb8b",1],["0xfbc577b9d747efd6",1],["0xbc9d89904f5b923f",1],["0xbd78255d4feeea1f",6],["0xa33d43f58731ad84",2],["0x582211f65bb14b89",5],["0xe65b00e46cedd0aa",2],["0x37c8bb1350a9a2a8",4],["0x2aa62120049dd2d2",1],["0xea93e3f16f3d6962",2],["0xba8173bf23b2e6f8",1],["0x6ff52ee858e6c5bd",1],["0x91b1c8b16328eb92",1],["0x9ffb505aa738d69c",1]],"transactionVersion":3,"stateVersion":1},"proposal_hash":"0x815ffa5efe9a97e7f12786cf57083ab69f30485938f154e42d0d1980fb9652bb","parachain_authorize_upgrade_hash":"0x2734dad804bec7370cfc182ad476603e16c6cece50bb65d92925288e4e0a7344","ipfs_hash":"QmZM2dqLzwzXNcq7G7WjTaK9hkuTJGMPc8nNYC7cx8x9vC","blake2_256":"0x1638e9cf83c2b914bec6540439581e1303268434ad348db86b5f804563fb59de"}}}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"gen":"srtool v0.15.0","src":"zip","version":"0.8.4","commit":"","tag":"","branch":"","rustc":"rustc 1.77.0 (aedd173a2 2024-03-17)","pkg":"moonbeam-runtime","tmsp":"2024-10-10T17:12:13Z","size":"2206778","prop":"0xba04dbb7e8124a7d7e45d32fc0d609183ce64f5b4566ea6b3e689cf2bffb4a4a","authorize_upgrade_prop":"0x231a29c30e927d9a29f9d09ec59972c6515fde951a76bfd42f2935a4701efbdc","ipfs":"QmWuhAuGJckHuhdc6zKBaqBAP2ojJNrm8ZvGBnbeAc9Crb","sha256":"0x491b78d8979573bfbc64f5fa14457866459a66858e3f6b7695a533e119f98a1e","wasm":"runtime/moonbeam/target/srtool/release/wbuild/moonbeam-runtime/moonbeam_runtime.compact.compressed.wasm","info":{"generator":{"name":"srtool","version":"0.15.0"},"src":"zip","version":"0.8.4","git":{"commit":"","tag":"","branch":""},"rustc":"rustc 1.77.0 (aedd173a2 2024-03-17)","pkg":"moonbeam-runtime","profile":"release"},"context":{"package":"moonbeam-runtime","runtime_dir":"runtime/moonbeam","docker":{"image":"paritytech/srtool","tag":"1.77.0"},"profile":"release"},"runtimes":{"compact":{"tmsp":"2024-10-10T17:11:45Z","size":"10687851","prop":"0xd34e6ec5bffe8cb7ab7ac4e6107235807ea1850571fb652076c5463716df6f79","authorize_upgrade_prop":"0x6f6313ea187655afc1f4964a58ef76536056386d8e3029e8b5b9b3bc7011bc25","blake2_256":"0x12bd152f156abf75e605d09d07186bd7b9ef17c528873689c024c929a5b3cd93","ipfs":"QmfEu3DA8ULDCdotnyr3EMaAjv3SJQH2PuxCdM8qEjdTGt","sha256":"0xe87352f4ec7baef14109b3946e4323cfe1ba50c583b77ff75b653a7ec5066c40","wasm":"runtime/moonbeam/target/srtool/release/wbuild/moonbeam-runtime/moonbeam_runtime.compact.wasm","subwasm":{"size":10687851,"compression":{"size_compressed":10687851,"size_decompressed":10687851,"compressed":false},"reserved_meta":[109,101,116,97],"reserved_meta_valid":true,"metadata_version":14,"core_version":{"specName":"moonbeam","implName":"moonbeam","authoringVersion":3,"specVersion":3300,"implVersion":0,"apis":[["0xd2bc9897eed08f15",3],["0xd0399cd053adda2b",1],["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xf78b278be53f454c",2],["0xab3c0572291feb8b",1],["0xfbc577b9d747efd6",1],["0xbc9d89904f5b923f",1],["0xbd78255d4feeea1f",6],["0xa33d43f58731ad84",2],["0x582211f65bb14b89",5],["0xe65b00e46cedd0aa",2],["0x37c8bb1350a9a2a8",4],["0x2aa62120049dd2d2",1],["0xea93e3f16f3d6962",2],["0xba8173bf23b2e6f8",1],["0x6ff52ee858e6c5bd",1],["0x91b1c8b16328eb92",1],["0x9ffb505aa738d69c",1]],"transactionVersion":3,"stateVersion":1},"proposal_hash":"0xd34e6ec5bffe8cb7ab7ac4e6107235807ea1850571fb652076c5463716df6f79","parachain_authorize_upgrade_hash":"0x6f6313ea187655afc1f4964a58ef76536056386d8e3029e8b5b9b3bc7011bc25","ipfs_hash":"QmfEu3DA8ULDCdotnyr3EMaAjv3SJQH2PuxCdM8qEjdTGt","blake2_256":"0x12bd152f156abf75e605d09d07186bd7b9ef17c528873689c024c929a5b3cd93"}},"compressed":{"tmsp":"2024-10-10T17:08:21Z","size":"2206778","prop":"0xba04dbb7e8124a7d7e45d32fc0d609183ce64f5b4566ea6b3e689cf2bffb4a4a","authorize_upgrade_prop":"0x231a29c30e927d9a29f9d09ec59972c6515fde951a76bfd42f2935a4701efbdc","blake2_256":"0x4c39a1b3ea990bebd7725a3c8db9aa0feac94606847487343c0dc7e42c911527","ipfs":"QmWuhAuGJckHuhdc6zKBaqBAP2ojJNrm8ZvGBnbeAc9Crb","sha256":"0x491b78d8979573bfbc64f5fa14457866459a66858e3f6b7695a533e119f98a1e","wasm":"runtime/moonbeam/target/srtool/release/wbuild/moonbeam-runtime/moonbeam_runtime.compact.compressed.wasm","subwasm":{"size":2206778,"compression":{"size_compressed":2206778,"size_decompressed":10687851,"compressed":true},"reserved_meta":[109,101,116,97],"reserved_meta_valid":true,"metadata_version":14,"core_version":{"specName":"moonbeam","implName":"moonbeam","authoringVersion":3,"specVersion":3300,"implVersion":0,"apis":[["0xd2bc9897eed08f15",3],["0xd0399cd053adda2b",1],["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xf78b278be53f454c",2],["0xab3c0572291feb8b",1],["0xfbc577b9d747efd6",1],["0xbc9d89904f5b923f",1],["0xbd78255d4feeea1f",6],["0xa33d43f58731ad84",2],["0x582211f65bb14b89",5],["0xe65b00e46cedd0aa",2],["0x37c8bb1350a9a2a8",4],["0x2aa62120049dd2d2",1],["0xea93e3f16f3d6962",2],["0xba8173bf23b2e6f8",1],["0x6ff52ee858e6c5bd",1],["0x91b1c8b16328eb92",1],["0x9ffb505aa738d69c",1]],"transactionVersion":3,"stateVersion":1},"proposal_hash":"0xba04dbb7e8124a7d7e45d32fc0d609183ce64f5b4566ea6b3e689cf2bffb4a4a","parachain_authorize_upgrade_hash":"0x231a29c30e927d9a29f9d09ec59972c6515fde951a76bfd42f2935a4701efbdc","ipfs_hash":"QmWuhAuGJckHuhdc6zKBaqBAP2ojJNrm8ZvGBnbeAc9Crb","blake2_256":"0x4c39a1b3ea990bebd7725a3c8db9aa0feac94606847487343c0dc7e42c911527"}}}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"gen":"srtool v0.15.0","src":"zip","version":"0.8.4","commit":"","tag":"","branch":"","rustc":"rustc 1.77.0 (aedd173a2 2024-03-17)","pkg":"moonriver-runtime","tmsp":"2024-10-10T17:04:07Z","size":"2206608","prop":"0x6580748a801c16638c3ebbfb0de842c88358e7857c1b10e9de74d195b15b4c92","authorize_upgrade_prop":"0x5c9e86f1e67c93b32cb70bab5b86f83915fd0c65048944ec1b495199c297fae1","ipfs":"QmQniQzZpc1ViaF6LobjZ6vLwwGUZtrfm6vFgS6wYHtrc7","sha256":"0xc1191cd74b468178e55fa8d61469c1d856538a1144c4230461984250b2ce8655","wasm":"runtime/moonriver/target/srtool/release/wbuild/moonriver-runtime/moonriver_runtime.compact.compressed.wasm","info":{"generator":{"name":"srtool","version":"0.15.0"},"src":"zip","version":"0.8.4","git":{"commit":"","tag":"","branch":""},"rustc":"rustc 1.77.0 (aedd173a2 2024-03-17)","pkg":"moonriver-runtime","profile":"release"},"context":{"package":"moonriver-runtime","runtime_dir":"runtime/moonriver","docker":{"image":"paritytech/srtool","tag":"1.77.0"},"profile":"release"},"runtimes":{"compact":{"tmsp":"2024-10-10T17:03:40Z","size":"10685848","prop":"0x1d850f1daa0a175d319b1b163cecac1bfb6d6fac8c5ad1815d43c77f2d2de5c4","authorize_upgrade_prop":"0x951c35e44e3cc5b341f8cd57c90631378fc7ccd9737f38f6ce7349d9a564256a","blake2_256":"0x72793fe3f2ed51b6fb7b7665a6e5a438265b3dfdadf65a20835f1e50108eea58","ipfs":"QmRyMukQYT7eR4rG2kbRUYTHbqKtK6PnSvYDdg6UCbEWwt","sha256":"0xe7e692c7c052dfb4379ac01f95734a6317474ffda1fc29a22c06827e3f027050","wasm":"runtime/moonriver/target/srtool/release/wbuild/moonriver-runtime/moonriver_runtime.compact.wasm","subwasm":{"size":10685848,"compression":{"size_compressed":10685848,"size_decompressed":10685848,"compressed":false},"reserved_meta":[109,101,116,97],"reserved_meta_valid":true,"metadata_version":14,"core_version":{"specName":"moonriver","implName":"moonriver","authoringVersion":3,"specVersion":3300,"implVersion":0,"apis":[["0xd2bc9897eed08f15",3],["0xd0399cd053adda2b",1],["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xf78b278be53f454c",2],["0xab3c0572291feb8b",1],["0xfbc577b9d747efd6",1],["0xbc9d89904f5b923f",1],["0xbd78255d4feeea1f",6],["0xa33d43f58731ad84",2],["0x582211f65bb14b89",5],["0xe65b00e46cedd0aa",2],["0x37c8bb1350a9a2a8",4],["0x2aa62120049dd2d2",1],["0xea93e3f16f3d6962",2],["0xba8173bf23b2e6f8",1],["0x6ff52ee858e6c5bd",1],["0x91b1c8b16328eb92",1],["0x9ffb505aa738d69c",1]],"transactionVersion":3,"stateVersion":1},"proposal_hash":"0x1d850f1daa0a175d319b1b163cecac1bfb6d6fac8c5ad1815d43c77f2d2de5c4","parachain_authorize_upgrade_hash":"0x951c35e44e3cc5b341f8cd57c90631378fc7ccd9737f38f6ce7349d9a564256a","ipfs_hash":"QmRyMukQYT7eR4rG2kbRUYTHbqKtK6PnSvYDdg6UCbEWwt","blake2_256":"0x72793fe3f2ed51b6fb7b7665a6e5a438265b3dfdadf65a20835f1e50108eea58"}},"compressed":{"tmsp":"2024-10-10T17:00:17Z","size":"2206608","prop":"0x6580748a801c16638c3ebbfb0de842c88358e7857c1b10e9de74d195b15b4c92","authorize_upgrade_prop":"0x5c9e86f1e67c93b32cb70bab5b86f83915fd0c65048944ec1b495199c297fae1","blake2_256":"0xc5e226c2a68cc5dc8545dded6e51fce3f2b6c6ada5439509e8b03b7d93ee50c8","ipfs":"QmQniQzZpc1ViaF6LobjZ6vLwwGUZtrfm6vFgS6wYHtrc7","sha256":"0xc1191cd74b468178e55fa8d61469c1d856538a1144c4230461984250b2ce8655","wasm":"runtime/moonriver/target/srtool/release/wbuild/moonriver-runtime/moonriver_runtime.compact.compressed.wasm","subwasm":{"size":2206608,"compression":{"size_compressed":2206608,"size_decompressed":10685848,"compressed":true},"reserved_meta":[109,101,116,97],"reserved_meta_valid":true,"metadata_version":14,"core_version":{"specName":"moonriver","implName":"moonriver","authoringVersion":3,"specVersion":3300,"implVersion":0,"apis":[["0xd2bc9897eed08f15",3],["0xd0399cd053adda2b",1],["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xf78b278be53f454c",2],["0xab3c0572291feb8b",1],["0xfbc577b9d747efd6",1],["0xbc9d89904f5b923f",1],["0xbd78255d4feeea1f",6],["0xa33d43f58731ad84",2],["0x582211f65bb14b89",5],["0xe65b00e46cedd0aa",2],["0x37c8bb1350a9a2a8",4],["0x2aa62120049dd2d2",1],["0xea93e3f16f3d6962",2],["0xba8173bf23b2e6f8",1],["0x6ff52ee858e6c5bd",1],["0x91b1c8b16328eb92",1],["0x9ffb505aa738d69c",1]],"transactionVersion":3,"stateVersion":1},"proposal_hash":"0x6580748a801c16638c3ebbfb0de842c88358e7857c1b10e9de74d195b15b4c92","parachain_authorize_upgrade_hash":"0x5c9e86f1e67c93b32cb70bab5b86f83915fd0c65048944ec1b495199c297fae1","ipfs_hash":"QmQniQzZpc1ViaF6LobjZ6vLwwGUZtrfm6vFgS6wYHtrc7","blake2_256":"0xc5e226c2a68cc5dc8545dded6e51fce3f2b6c6ada5439509e8b03b7d93ee50c8"}}}}
8,641 changes: 8,641 additions & 0 deletions tracing/3300/Cargo.lock

Large diffs are not rendered by default.

454 changes: 454 additions & 0 deletions tracing/3300/Cargo.toml

Large diffs are not rendered by default.

177 changes: 177 additions & 0 deletions tracing/3300/runtime/common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
[package]
authors = { workspace = true }
description = "Common code shared between runtimes"
edition = "2021"
homepage = "https://moonbeam.network"
license = "GPL-3.0-only"
name = "moonbeam-runtime-common"
version = "0.8.0-dev"

[dependencies]
hex-literal = "0.3.4"
impl-trait-for-tuples = "0.2.1"
log = "0.4"

# Moonbeam
moonbeam-core-primitives = { workspace = true }
moonbeam-xcm-benchmarks = { workspace = true }
pallet-asset-manager = { workspace = true }
pallet-author-mapping = { workspace = true }
pallet-conviction-voting = { workspace = true }
pallet-ethereum-xcm = { workspace = true }
pallet-migrations = { workspace = true }
pallet-moonbeam-foreign-assets = { workspace = true }
pallet-moonbeam-lazy-migrations = { workspace = true }
pallet-parachain-staking = { workspace = true }
pallet-precompile-benchmarks = { workspace = true }
pallet-randomness = { workspace = true }
pallet-relay-storage-roots = { workspace = true }
pallet-xcm-transactor = { workspace = true }
pallet-xcm-weight-trader = { workspace = true }
xcm-primitives = { workspace = true }

# Substrate
cumulus-pallet-parachain-system = { workspace = true }
cumulus-pallet-xcmp-queue = { workspace = true }
pallet-message-queue = { workspace = true }
frame-benchmarking = { workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
pallet-assets = { workspace = true }
pallet-balances = { workspace = true }
pallet-collective = { workspace = true }
pallet-crowdloan-rewards = { workspace = true }
pallet-identity = { workspace = true }
pallet-moonbeam-orbiters = { workspace = true }
pallet-multisig = { workspace = true }
pallet-preimage = { workspace = true }
pallet-parameters = { workspace = true }
pallet-proxy = { workspace = true }
pallet-referenda = { workspace = true }
pallet-scheduler = { workspace = true }
pallet-sudo = { workspace = true }
pallet-timestamp = { workspace = true }
pallet-transaction-payment = { workspace = true }
pallet-treasury = { workspace = true }
pallet-utility = { workspace = true }
pallet-whitelist = { workspace = true }
pallet-xcm = { workspace = true }
sp-api = { workspace = true }
sp-consensus-slots = { workspace = true }
sp-core = { workspace = true }
sp-io = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }
sp-genesis-builder = { workspace = true }
frame-try-runtime = { workspace = true }

# Frontier
fp-ethereum = { workspace = true }
fp-evm = { workspace = true }
pallet-evm = { workspace = true, features = ["forbid-evm-reentrancy"] }
pallet-evm-chain-id = { workspace = true }
precompile-utils = { workspace = true }

# Moonkit
nimbus-primitives = { workspace = true }
pallet-async-backing = { workspace = true }
pallet-author-inherent = { workspace = true }
pallet-author-slot-filter = { workspace = true }

# Polkadot
xcm = { workspace = true }
xcm-builder = { workspace = true }
xcm-executor = { workspace = true }
xcm-runtime-apis = { workspace = true }

# Parity
parity-scale-codec = { workspace = true }
scale-info = { workspace = true }

account = { workspace = true }

# Runtime Interfaces
cumulus-primitives-storage-weight-reclaim = { workspace = true, default-features = false }

[features]
std = [
"cumulus-pallet-parachain-system/std",
"fp-ethereum/std",
"fp-evm/std",
"frame-support/std",
"moonbeam-core-primitives/std",
"pallet-asset-manager/std",
"pallet-async-backing/std",
"pallet-author-inherent/std",
"pallet-author-mapping/std",
"pallet-ethereum-xcm/std",
"pallet-evm/std",
"pallet-migrations/std",
"pallet-parachain-staking/std",
"pallet-parameters/std",
"pallet-randomness/std",
"pallet-referenda/std",
"pallet-scheduler/std",
"pallet-xcm-transactor/std",
"pallet-moonbeam-lazy-migrations/std",
"pallet-identity/std",
"pallet-transaction-payment/std",
"pallet-xcm-weight-trader/std",
"pallet-message-queue/std",
"parity-scale-codec/std",
"scale-info/std",
"precompile-utils/std",
"sp-consensus-slots/std",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
"sp-genesis-builder/std",
"cumulus-primitives-storage-weight-reclaim/std",
"xcm-executor/std",
"xcm-runtime-apis/std",
"xcm/std",
"account/std",
]
runtime-benchmarks = [
"cumulus-pallet-parachain-system/runtime-benchmarks",
"cumulus-pallet-xcmp-queue/runtime-benchmarks",
"pallet-message-queue/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"pallet-asset-manager/runtime-benchmarks",
"pallet-assets/runtime-benchmarks",
"pallet-author-inherent/runtime-benchmarks",
"pallet-author-mapping/runtime-benchmarks",
"pallet-author-slot-filter/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-conviction-voting/runtime-benchmarks",
"pallet-crowdloan-rewards/runtime-benchmarks",
"pallet-ethereum-xcm/runtime-benchmarks",
"pallet-evm/runtime-benchmarks",
"pallet-identity/runtime-benchmarks",
"pallet-moonbeam-orbiters/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-parachain-staking/runtime-benchmarks",
"pallet-preimage/runtime-benchmarks",
"pallet-parameters/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"pallet-randomness/runtime-benchmarks",
"pallet-referenda/runtime-benchmarks",
"pallet-referenda/runtime-benchmarks",
"pallet-scheduler/runtime-benchmarks",
"pallet-sudo/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"pallet-treasury/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"pallet-whitelist/runtime-benchmarks",
"pallet-xcm-transactor/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"pallet-moonbeam-lazy-migrations/runtime-benchmarks",
"moonbeam-xcm-benchmarks/runtime-benchmarks",
"xcm-runtime-apis/runtime-benchmarks",
]
try-runtime = [
"cumulus-pallet-parachain-system/try-runtime",
"frame-support/try-runtime",
"pallet-migrations/try-runtime",
]
1,160 changes: 1,160 additions & 0 deletions tracing/3300/runtime/common/src/apis.rs

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions tracing/3300/runtime/common/src/benchmarking.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Copyright 2019-2023 PureStake Inc.
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

use account::AccountId20;
use pallet_treasury::ArgumentsFactory;

pub struct BenchmarkHelper;

impl ArgumentsFactory<(), AccountId20> for BenchmarkHelper {
fn create_asset_kind(_seed: u32) -> () {
()
}

fn create_beneficiary(seed: [u8; 32]) -> AccountId20 {
AccountId20::from(seed)
}
}
51 changes: 51 additions & 0 deletions tracing/3300/runtime/common/src/impl_moonbeam_xcm_call.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// Copyright 2019-2022 PureStake Inc.
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

#[macro_export]
macro_rules! impl_moonbeam_xcm_call {
{} => {

pub struct MoonbeamCall;
impl CallDispatcher<RuntimeCall> for MoonbeamCall {
fn dispatch(
call: RuntimeCall,
origin: RuntimeOrigin,
) -> Result<
PostDispatchInfoOf<RuntimeCall>,
DispatchErrorWithPostInfo<PostDispatchInfoOf<RuntimeCall>>
> {
if let Ok(raw_origin) = TryInto::<RawOrigin<AccountId>>::try_into(origin.clone().caller) {
match (call.clone(), raw_origin) {
(
RuntimeCall::EthereumXcm(pallet_ethereum_xcm::Call::transact { .. }) |
RuntimeCall::EthereumXcm(pallet_ethereum_xcm::Call::transact_through_proxy { .. }),
RawOrigin::Signed(account_id)
) => {
return RuntimeCall::dispatch(
call,
pallet_ethereum_xcm::Origin::XcmEthereumTransaction(
account_id.into()
).into()
);
},
_ => {}
}
}
RuntimeCall::dispatch(call, origin)
}
}
}
}
119 changes: 119 additions & 0 deletions tracing/3300/runtime/common/src/impl_moonbeam_xcm_call_tracing.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
// Copyright 2019-2022 PureStake Inc.
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

#[macro_export]
macro_rules! impl_moonbeam_xcm_call_tracing {
{} => {

type CallResult =
Result<
PostDispatchInfoOf<RuntimeCall>,
DispatchErrorWithPostInfo<PostDispatchInfoOf<RuntimeCall>>
>;

pub struct MoonbeamCall;
impl CallDispatcher<RuntimeCall> for MoonbeamCall {
fn dispatch(
call: RuntimeCall,
origin: RuntimeOrigin,
) -> CallResult {
if let Ok(raw_origin) = TryInto::<RawOrigin<AccountId>>::try_into(origin.clone().caller) {
match (call.clone(), raw_origin) {
(
RuntimeCall::EthereumXcm(pallet_ethereum_xcm::Call::transact { xcm_transaction }) |
RuntimeCall::EthereumXcm(pallet_ethereum_xcm::Call::transact_through_proxy {
xcm_transaction, ..
}),
RawOrigin::Signed(account_id)
) => {
use crate::EthereumXcm;
use moonbeam_evm_tracer::tracer::EvmTracer;
use xcm_primitives::{
XcmToEthereum,
EthereumXcmTracingStatus,
ETHEREUM_XCM_TRACING_STORAGE_KEY
};
use frame_support::storage::unhashed;
use frame_support::traits::Get;

let dispatch_call = || {
RuntimeCall::dispatch(
call,
pallet_ethereum_xcm::Origin::XcmEthereumTransaction(
account_id.into()
).into()
)
};

return match unhashed::get(
ETHEREUM_XCM_TRACING_STORAGE_KEY
) {
// This runtime instance is used for tracing.
Some(tracing_status) => match tracing_status {
// Tracing a block, all calls are done using environmental.
EthereumXcmTracingStatus::Block => {
// Each known extrinsic is a new call stack.
EvmTracer::emit_new();
let mut res: Option<CallResult> = None;
EvmTracer::new().trace(|| {
res = Some(dispatch_call());
});
res.expect("Invalid dispatch result")
},
// Tracing a transaction, the one matching the trace request
// is done using environmental, the rest dispatched normally.
EthereumXcmTracingStatus::Transaction(traced_transaction_hash) => {
let transaction_hash = xcm_transaction.into_transaction_v2(
EthereumXcm::nonce(),
<Runtime as pallet_evm::Config>::ChainId::get(),
false
)
.expect("Invalid transaction conversion")
.hash();
if transaction_hash == traced_transaction_hash {
let mut res: Option<CallResult> = None;
EvmTracer::new().trace(|| {
res = Some(dispatch_call());
});
// Tracing runtime work is done, just signal instance exit.
unhashed::put::<EthereumXcmTracingStatus>(
xcm_primitives::ETHEREUM_XCM_TRACING_STORAGE_KEY,
&EthereumXcmTracingStatus::TransactionExited,
);
return res.expect("Invalid dispatch result");
}
dispatch_call()
},
// Tracing a transaction that has already been found and
// executed. There's no need to dispatch the rest of the
// calls.
EthereumXcmTracingStatus::TransactionExited => Ok(crate::PostDispatchInfo {
actual_weight: None,
pays_fee: frame_support::pallet_prelude::Pays::No,
}),
},
// This runtime instance is importing a block.
None => dispatch_call()
};
},
_ => {}
}
}
RuntimeCall::dispatch(call, origin)
}
}
}
}
62 changes: 62 additions & 0 deletions tracing/3300/runtime/common/src/impl_on_charge_evm_transaction.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// Copyright 2019-2022 PureStake Inc.
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

#[macro_export]
macro_rules! impl_on_charge_evm_transaction {
{} => {
type FungibleAccountId<T> = <T as frame_system::Config>::AccountId;

type BalanceFor<T> =
<<T as pallet_evm::Config>::Currency as Inspect<FungibleAccountId<T>>>::Balance;

pub struct OnChargeEVMTransaction<OU>(sp_std::marker::PhantomData<OU>);

impl<T, OU> OnChargeEVMTransactionT<T> for OnChargeEVMTransaction<OU>
where
T: pallet_evm::Config,
T::Currency: Balanced<T::AccountId>,
OU: OnUnbalanced<Credit<T::AccountId, T::Currency>>,
U256: UniqueSaturatedInto<BalanceFor<T>>
{
type LiquidityInfo = Option<Credit<T::AccountId, T::Currency>>;

fn withdraw_fee(who: &H160, fee: U256) -> Result<Self::LiquidityInfo, pallet_evm::Error<T>> {
EVMFungibleAdapter::<<T as pallet_evm::Config>::Currency, ()>::withdraw_fee(who, fee)
}

fn can_withdraw(who: &H160, amount: U256) -> Result<(), pallet_evm::Error<T>> {
EVMFungibleAdapter::<<T as pallet_evm::Config>::Currency, ()>::can_withdraw(who, amount)
}

fn correct_and_deposit_fee(
who: &H160,
corrected_fee: U256,
base_fee: U256,
already_withdrawn: Self::LiquidityInfo,
) -> Self::LiquidityInfo {
<EVMFungibleAdapter<<T as pallet_evm::Config>::Currency, OU> as OnChargeEVMTransactionT<
T,
>>::correct_and_deposit_fee(who, corrected_fee, base_fee, already_withdrawn)
}

fn pay_priority_fee(tip: Self::LiquidityInfo) {
if let Some(tip) = tip {
OU::on_unbalanced(tip);
}
}
}
}
}
78 changes: 78 additions & 0 deletions tracing/3300/runtime/common/src/impl_self_contained_call.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
// Copyright 2019-2022 PureStake Inc.
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

#[macro_export]
macro_rules! impl_self_contained_call {
{} => {
impl fp_self_contained::SelfContainedCall for RuntimeCall {
type SignedInfo = H160;

fn is_self_contained(&self) -> bool {
match self {
RuntimeCall::Ethereum(call) => call.is_self_contained(),
_ => false,
}
}

fn check_self_contained(
&self
) -> Option<Result<Self::SignedInfo, TransactionValidityError>> {
match self {
RuntimeCall::Ethereum(call) => call.check_self_contained(),
_ => None,
}
}

fn validate_self_contained(
&self,
signed_info: &Self::SignedInfo,
dispatch_info: &DispatchInfoOf<RuntimeCall>,
len: usize,
) -> Option<TransactionValidity> {
match self {
RuntimeCall::Ethereum(call) => call.validate_self_contained(signed_info, dispatch_info, len),
_ => None,
}
}

fn pre_dispatch_self_contained(
&self,
info: &Self::SignedInfo,
dispatch_info: &DispatchInfoOf<RuntimeCall>,
len: usize,
) -> Option<Result<(), TransactionValidityError>> {
match self {
RuntimeCall::Ethereum(call) => call.pre_dispatch_self_contained(info, dispatch_info, len),
_ => None,
}
}

fn apply_self_contained(
self,
info: Self::SignedInfo,
) -> Option<sp_runtime::DispatchResultWithInfo<PostDispatchInfoOf<Self>>> {
match self {
call @ RuntimeCall::Ethereum(pallet_ethereum::Call::transact { .. }) => Some(
call.dispatch(RuntimeOrigin::from(
pallet_ethereum::RawOrigin::EthereumTransaction(info)
))
),
_ => None,
}
}
}
}
}
242 changes: 242 additions & 0 deletions tracing/3300/runtime/common/src/impl_xcm_evm_runner.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
// Copyright 2019-2022 PureStake Inc.
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

#[macro_export]
macro_rules! impl_evm_runner_precompile_or_eth_xcm {
{} => {
use fp_evm::{CallInfo, CallOrCreateInfo, Context, Transfer};
use frame_support::dispatch::CallableCallFor;
use pallet_evm::{Runner, RunnerError};
use precompile_utils::{prelude::*, evm::handle::with_precompile_handle};
use sp_core::U256;
use sp_runtime::DispatchError;
use sp_std::vec::Vec;
use xcm_primitives::{EthereumXcmTransaction, EthereumXcmTransactionV2};

pub struct EvmRunnerPrecompileOrEthXcm<CallDispatcher, Runtime>(
core::marker::PhantomData<(CallDispatcher, Runtime)>,
);

impl<CallDispatcher, Runtime> Runner<Runtime>
for EvmRunnerPrecompileOrEthXcm<CallDispatcher, Runtime>
where
CallDispatcher: xcm_executor::traits::CallDispatcher<RuntimeCall>,
Runtime: pallet_evm::Config + pallet_ethereum_xcm::Config,
Runtime::RuntimeOrigin: From<pallet_ethereum_xcm::RawOrigin>,
{
type Error = DispatchError;

fn call(
source: H160,
target: H160,
input: Vec<u8>,
value: U256,
gas_limit: u64,
_max_fee_per_gas: Option<U256>,
_max_priority_fee_per_gas: Option<U256>,
_nonce: Option<U256>,
access_list: Vec<(H160, Vec<H256>)>,
_is_transactional: bool,
_validate: bool,
_weight_limit: Option<Weight>,
_transaction_len: Option<u64>,
_config: &fp_evm::Config,
) -> Result<CallInfo, RunnerError<Self::Error>> {
// The `with_precompile_handle` function will execute the closure (and return the
// result in a Some) if and only if there is an available EVM context. Otherwise,
// it will return None.
if let Some((exit_reason, value)) = with_precompile_handle(|precompile_handle| {
let transfer = if value.is_zero() {
None
} else {
Some(Transfer {
source,
target,
value,
})
};

precompile_handle.call(
target,
transfer,
input.clone(),
Some(gas_limit),
false,
&Context {
address: target,
caller: source,
apparent_value: value,
},
)
}) {
Ok(CallInfo {
exit_reason,
value,
used_gas: fp_evm::UsedGas {
standard: U256::default(),
effective: U256::default(),
},
logs: Default::default(),
weight_info: None,
})
} else {
let xcm_transaction = EthereumXcmTransaction::V2(EthereumXcmTransactionV2 {
gas_limit: gas_limit.into(),
action: pallet_ethereum_xcm::TransactionAction::Call(target),
value,
input: input.try_into().map_err(|_| RunnerError {
error: DispatchError::Exhausted,
weight: Default::default(),
})?,
access_list: Some(access_list),
});

let mut execution_info: Option<CallOrCreateInfo> = None;
pallet_ethereum::catch_exec_info(&mut execution_info, || {
CallDispatcher::dispatch(
RuntimeCall::EthereumXcm(pallet_ethereum_xcm::Call::transact { xcm_transaction }),
RawOrigin::Signed(source.into()).into(),
)
.map_err(|DispatchErrorWithPostInfo { error, .. }| RunnerError {
error,
weight: Default::default(),
})
})?;

if let Some(CallOrCreateInfo::Call(call_info))= execution_info {
Ok(call_info)
} else {
// `execution_info` must have been filled in
Err(RunnerError {
error: DispatchError::Unavailable,
weight: Default::default(),
})
}
}
}

fn create(
_source: H160,
_init: Vec<u8>,
_value: U256,
_gas_limit: u64,
_max_fee_per_gas: Option<U256>,
_max_priority_fee_per_gas: Option<U256>,
_nonce: Option<U256>,
_access_list: Vec<(H160, Vec<H256>)>,
_is_transactional: bool,
_validate: bool,
_weight_limit: Option<Weight>,
_transaction_len: Option<u64>,
_config: &fp_evm::Config,
) -> Result<fp_evm::CreateInfo, RunnerError<Self::Error>> {
unimplemented!()
}

fn create2(
_source: H160,
_init: Vec<u8>,
_salt: H256,
_value: U256,
_gas_limit: u64,
_max_fee_per_gas: Option<U256>,
_max_priority_fee_per_gas: Option<U256>,
_nonce: Option<U256>,
_access_list: Vec<(H160, Vec<H256>)>,
_is_transactional: bool,
_validate: bool,
_weight_limit: Option<Weight>,
_transaction_len: Option<u64>,
_config: &fp_evm::Config,
) -> Result<fp_evm::CreateInfo, RunnerError<Self::Error>> {
unimplemented!()
}

fn create_force_address(
source: H160,
init: Vec<u8>,
value: U256,
gas_limit: u64,
max_fee_per_gas: Option<U256>,
max_priority_fee_per_gas: Option<U256>,
nonce: Option<U256>,
access_list: Vec<(H160, Vec<H256>)>,
is_transactional: bool,
validate: bool,
weight_limit: Option<Weight>,
transaction_len: Option<u64>,
config: &fp_evm::Config,
force_address: H160,
) -> Result<fp_evm::CreateInfo, RunnerError<Self::Error>> {
let xcm_transaction = EthereumXcmTransaction::V2(EthereumXcmTransactionV2 {
gas_limit: gas_limit.into(),
action: pallet_ethereum_xcm::TransactionAction::Create,
value,
input: init.try_into().map_err(|_| RunnerError {
error: DispatchError::Exhausted,
weight: Default::default(),
})?,
access_list: Some(access_list),
});

let mut execution_info: Option<CallOrCreateInfo> = None;
pallet_ethereum::catch_exec_info(&mut execution_info, || {
CallDispatcher::dispatch(
RuntimeCall::EthereumXcm(pallet_ethereum_xcm::Call::force_transact_as {
transact_as: source,
xcm_transaction,
force_create_address: Some(force_address),
}),
RawOrigin::Root.into(),
)
.map_err(|DispatchErrorWithPostInfo { error, .. }| RunnerError {
error,
weight: Default::default(),
})
})?;

if let Some(CallOrCreateInfo::Create(create_info))= execution_info {
Ok(create_info)
} else {
// `execution_info` must have been filled in
Err(RunnerError {
error: DispatchError::Unavailable,
weight: Default::default(),
})
}
}

fn validate(
_source: H160,
_target: Option<H160>,
_input: Vec<u8>,
_value: U256,
_gas_limit: u64,
_max_fee_per_gas: Option<U256>,
_max_priority_fee_per_gas: Option<U256>,
_nonce: Option<U256>,
_access_list: Vec<(H160, Vec<H256>)>,
_is_transactional: bool,
_weight_limit: Option<Weight>,
_transaction_len: Option<u64>,
_evm_config: &fp_evm::Config,
) -> Result<(), RunnerError<Self::Error>> {
unimplemented!()
}
}

}
}
31 changes: 31 additions & 0 deletions tracing/3300/runtime/common/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright 2019-2022 PureStake Inc.
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

#![cfg_attr(not(feature = "std"), no_std)]

mod apis;
mod impl_moonbeam_xcm_call;
mod impl_moonbeam_xcm_call_tracing;
mod impl_on_charge_evm_transaction;
mod impl_self_contained_call;
mod impl_xcm_evm_runner;
pub mod migrations;
pub mod timestamp;
pub mod types;
pub mod weights;

#[cfg(feature = "runtime-benchmarks")]
pub mod benchmarking;
393 changes: 393 additions & 0 deletions tracing/3300/runtime/common/src/migrations.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,393 @@
// Copyright 2019-2022 PureStake Inc.
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! # Migrations
//!
//! This module acts as a registry where each migration is defined. Each migration should implement
//! the "Migration" trait declared in the pallet-migrations crate.
use frame_support::{traits::OnRuntimeUpgrade, weights::Weight};
use frame_system::pallet_prelude::BlockNumberFor;
use pallet_migrations::{GetMigrations, Migration};
use sp_std::{marker::PhantomData, prelude::*, vec};

pub struct MigrateToLatestXcmVersion<Runtime>(PhantomData<Runtime>);
impl<Runtime> Migration for MigrateToLatestXcmVersion<Runtime>
where
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>: OnRuntimeUpgrade,
{
fn friendly_name(&self) -> &str {
"MM_MigrateToLatestXcmVersion"
}

fn migrate(&self, _available_weight: Weight) -> Weight {
pallet_xcm::migration::MigrateToLatestXcmVersion::<Runtime>::on_runtime_upgrade()
}

#[cfg(feature = "try-runtime")]
fn pre_upgrade(&self) -> Result<Vec<u8>, sp_runtime::DispatchError> {
pallet_xcm::migration::MigrateToLatestXcmVersion::<Runtime>::pre_upgrade()
}

#[cfg(feature = "try-runtime")]
fn post_upgrade(&self, state: Vec<u8>) -> Result<(), sp_runtime::DispatchError> {
pallet_xcm::migration::MigrateToLatestXcmVersion::<Runtime>::post_upgrade(state)
}
}

pub struct MigrateCodeToStateTrieV1<Runtime>(PhantomData<Runtime>);
impl<Runtime> Migration for MigrateCodeToStateTrieV1<Runtime>
where
Runtime: frame_system::Config,
{
fn friendly_name(&self) -> &str {
"MM_MigrateCodeToStateTrieVersion1"
}

fn migrate(&self, _available_weight: Weight) -> Weight {
use cumulus_primitives_storage_weight_reclaim::get_proof_size;
use sp_core::Get;

let proof_size_before: u64 = get_proof_size().unwrap_or(0);

let key = sp_core::storage::well_known_keys::CODE;
let data = sp_io::storage::get(&key);
if let Some(data) = data {
sp_io::storage::set(&key, &data);
}

let proof_size_after: u64 = get_proof_size().unwrap_or(0);
let proof_size_diff = proof_size_after.saturating_sub(proof_size_before);

Weight::from_parts(0, proof_size_diff)
.saturating_add(<Runtime as frame_system::Config>::DbWeight::get().reads_writes(1, 1))
}

#[cfg(feature = "try-runtime")]
fn pre_upgrade(&self) -> Result<Vec<u8>, sp_runtime::DispatchError> {
use parity_scale_codec::Encode;

let key = sp_core::storage::well_known_keys::CODE;
let data = sp_io::storage::get(&key);
Ok(Encode::encode(&data))
}

#[cfg(feature = "try-runtime")]
fn post_upgrade(&self, state: Vec<u8>) -> Result<(), sp_runtime::DispatchError> {
use frame_support::ensure;
use parity_scale_codec::Encode;
use sp_core::storage::StorageKey;

let key = StorageKey(sp_core::storage::well_known_keys::CODE.to_vec());
let data = sp_io::storage::get(key.as_ref());

ensure!(Encode::encode(&data) == state, "Invalid state");

Ok(())
}
}

#[derive(parity_scale_codec::Decode, Eq, Ord, PartialEq, PartialOrd)]
enum OldAssetType {
Xcm(xcm::v3::Location),
}

pub struct MigrateXcmFeesAssetsMeatdata<Runtime>(PhantomData<Runtime>);
impl<Runtime> Migration for MigrateXcmFeesAssetsMeatdata<Runtime>
where
Runtime: pallet_transaction_payment::Config,
Runtime: pallet_xcm_weight_trader::Config,
{
fn friendly_name(&self) -> &str {
"MM_MigrateXcmFeesAssetsMetadata"
}

fn migrate(&self, _available_weight: Weight) -> Weight {
let supported_assets =
if let Some(supported_assets) = frame_support::storage::migration::get_storage_value::<
Vec<OldAssetType>,
>(b"AssetManager", b"SupportedFeePaymentAssets", &[])
{
sp_std::collections::btree_set::BTreeSet::from_iter(
supported_assets
.into_iter()
.map(|OldAssetType::Xcm(location_v3)| location_v3),
)
} else {
return Weight::default();
};

let mut assets: Vec<(xcm::v4::Location, (bool, u128))> = Vec::new();

for (OldAssetType::Xcm(location_v3), units_per_seconds) in
frame_support::storage::migration::storage_key_iter::<
OldAssetType,
u128,
frame_support::Blake2_128Concat,
>(b"AssetManager", b"AssetTypeUnitsPerSecond")
{
let enabled = supported_assets.get(&location_v3).is_some();

if let Ok(location_v4) = location_v3.try_into() {
assets.push((location_v4, (enabled, units_per_seconds)));
}
}

//***** Start mutate storage *****//

// Write asset metadata in new pallet_xcm_weight_trader
use frame_support::weights::WeightToFee as _;
for (asset_location, (enabled, units_per_second)) in assets {
let native_amount_per_second: u128 =
<Runtime as pallet_transaction_payment::Config>::WeightToFee::weight_to_fee(
&Weight::from_parts(
frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND,
0,
),
)
.try_into()
.unwrap_or(u128::MAX);
let relative_price: u128 = native_amount_per_second
.saturating_mul(10u128.pow(pallet_xcm_weight_trader::RELATIVE_PRICE_DECIMALS))
.saturating_div(units_per_second);
pallet_xcm_weight_trader::SupportedAssets::<Runtime>::insert(
asset_location,
(enabled, relative_price),
);
}

// Remove storage value AssetManager::SupportedFeePaymentAssets
frame_support::storage::unhashed::kill(&frame_support::storage::storage_prefix(
b"AssetManager",
b"SupportedFeePaymentAssets",
));

// Remove storage map AssetManager::AssetTypeUnitsPerSecond
let _ = frame_support::storage::migration::clear_storage_prefix(
b"AssetManager",
b"AssetTypeUnitsPerSecond",
&[],
None,
None,
);

Weight::default()
}

#[cfg(feature = "try-runtime")]
fn pre_upgrade(&self) -> Result<Vec<u8>, sp_runtime::DispatchError> {
Ok(Default::default())
}

#[cfg(feature = "try-runtime")]
fn post_upgrade(&self, state: Vec<u8>) -> Result<(), sp_runtime::DispatchError> {
assert!(frame_support::storage::migration::storage_key_iter::<
OldAssetType,
u128,
frame_support::Blake2_128Concat,
>(b"AssetManager", b"AssetTypeUnitsPerSecond")
.next()
.is_none());

Ok(())
}
}

pub struct MigrateStakingParachainBondConfig<Runtime>(PhantomData<Runtime>);
impl<Runtime> Migration for MigrateStakingParachainBondConfig<Runtime>
where
Runtime: pallet_parachain_staking::Config,
{
fn friendly_name(&self) -> &str {
"MM_MigrateStakingParachainBondConfig"
}

fn migrate(&self, _available_weight: Weight) -> Weight {
pallet_parachain_staking::migrations::MigrateParachainBondConfig::<Runtime>::on_runtime_upgrade()
}

#[cfg(feature = "try-runtime")]
fn pre_upgrade(&self) -> Result<Vec<u8>, sp_runtime::DispatchError> {
pallet_parachain_staking::migrations::MigrateParachainBondConfig::<Runtime>::pre_upgrade()
}

#[cfg(feature = "try-runtime")]
fn post_upgrade(&self, state: Vec<u8>) -> Result<(), sp_runtime::DispatchError> {
pallet_parachain_staking::migrations::MigrateParachainBondConfig::<Runtime>::post_upgrade(
state,
)
}
}

pub struct CommonMigrations<Runtime>(PhantomData<Runtime>);

impl<Runtime> GetMigrations for CommonMigrations<Runtime>
where
Runtime: pallet_xcm::Config
+ pallet_transaction_payment::Config
+ pallet_xcm_weight_trader::Config
+ pallet_parachain_staking::Config,
Runtime::AccountId: Default,
BlockNumberFor<Runtime>: Into<u64>,
{
fn get_migrations() -> Vec<Box<dyn Migration>> {
// let migration_author_mapping_twox_to_blake = AuthorMappingTwoXToBlake::<Runtime> {
// 0: Default::default(),
// };

// let migration_parachain_staking_purge_stale_storage =
// ParachainStakingPurgeStaleStorage::<Runtime>(Default::default());
// let migration_parachain_staking_manual_exits =
// ParachainStakingManualExits::<Runtime>(Default::default());
// let migration_parachain_staking_increase_max_delegations_per_candidate =
// ParachainStakingIncreaseMaxDelegationsPerCandidate::<Runtime>(Default::default());
// let migration_parachain_staking_split_candidate_state =
// ParachainStakingSplitCandidateState::<Runtime>(Default::default());
// let migration_parachain_staking_patch_incorrect_delegation_sums =
// ParachainStakingPatchIncorrectDelegationSums::<Runtime>(Default::default());

// let migration_scheduler_v3 = SchedulerMigrationV3::<Runtime>(Default::default());

// let migration_base_fee = MigrateBaseFeePerGas::<Runtime>(Default::default());

// TODO: this is a lot of allocation to do upon every get() call. this *should* be avoided
// except when pallet_migrations undergoes a runtime upgrade -- but TODO: review

// let migration_author_slot_filter_eligible_ratio_to_eligibility_count =
// AuthorSlotFilterEligibleRatioToEligiblityCount::<Runtime>(Default::default());
// let migration_author_mapping_add_keys_to_registration_info =
// AuthorMappingAddKeysToRegistrationInfo::<Runtime>(Default::default());
// let staking_delegator_state_requests =
// ParachainStakingSplitDelegatorStateIntoDelegationScheduledRequests::<Runtime>(
// Default::default(),
// );
// let migration_author_mapping_add_account_id_to_nimbus_lookup =
// AuthorMappingAddAccountIdToNimbusLookup::<Runtime>(Default::default());

// let xcm_transactor_max_weight =
// XcmTransactorMaxTransactWeight::<Runtime>(Default::default());

// let asset_manager_units_with_asset_type =
// AssetManagerUnitsWithAssetType::<Runtime>(Default::default());

// let asset_manager_populate_asset_type_id_storage =
// AssetManagerPopulateAssetTypeIdStorage::<Runtime>(Default::default());

// let asset_manager_change_statemine_prefixes = AssetManagerChangeStateminePrefixes::<
// Runtime,
// StatemineParaIdInfo,
// StatemineAssetsInstanceInfo,
// >(Default::default());

// let xcm_supported_assets = XcmPaymentSupportedAssets::<Runtime>(Default::default());

// let migration_elasticity = MigrateBaseFeeElasticity::<Runtime>(Default::default());
//let staking_at_stake_auto_compound =
// ParachainStakingMigrateAtStakeAutoCompound::<Runtime>(Default::default());

//let scheduler_to_v4 = SchedulerMigrationV4::<Runtime>(Default::default());
//let democracy_migration_hash_to_bounded_call =
// DemocracryMigrationHashToBoundedCall::<Runtime>(Default::default());
//let preimage_migration_hash_to_bounded_call =
// PreimageMigrationHashToBoundedCall::<Runtime>(Default::default());
//let asset_manager_to_xcm_v3 =
// PalletAssetManagerMigrateXcmV2ToV3::<Runtime>(Default::default());
//let xcm_transactor_to_xcm_v3 =
// PalletXcmTransactorMigrateXcmV2ToV3::<Runtime>(Default::default());
//let remove_min_bond_for_old_orbiter_collators =
// RemoveMinBondForOrbiterCollators::<Runtime>(Default::default());
// let missing_balances_migrations = MissingBalancesMigrations::<Runtime>(Default::default());
// let fix_pallet_versions =
// FixIncorrectPalletVersions::<Runtime, Treasury, OpenTech>(Default::default());
// let pallet_referenda_migrate_v0_to_v1 =
// PalletReferendaMigrateV0ToV1::<Runtime>(Default::default());
//let pallet_collective_drop_gov_v1_collectives =
// PalletCollectiveDropGovV1Collectives::<Runtime>(Default::default());
//let pallet_staking_round = PalletStakingRoundMigration::<Runtime>(Default::default());

vec![
// completed in runtime 800
// Box::new(migration_author_mapping_twox_to_blake),
// completed in runtime 900
// completed in runtime 1000
// Box::new(migration_parachain_staking_purge_stale_storage),
// completed in runtime 1000
// Box::new(migration_parachain_staking_manual_exits),
// completed in runtime 1101
// Box::new(migration_parachain_staking_increase_max_delegations_per_candidate),
// completed in runtime 1201
// Box::new(migration_parachain_staking_split_candidate_state),
// completed in runtime 1201
// Box::new(xcm_transactor_max_weight),
// completed in runtime 1201
// Box::new(asset_manager_units_with_asset_type),
// completed in runtime 1201
// Box::new(asset_manager_change_statemine_prefixes),
// completed in runtime 1201
// Box::new(asset_manager_populate_asset_type_id_storage),
// completed in runtime 1300
// Box::new(migration_scheduler_v3),
// completed in runtime 1300
// Box::new(migration_parachain_staking_patch_incorrect_delegation_sums),
// completed in runtime 1300
// Box::new(migration_base_fee),
// completed in runtime 1300
// Box::new(xcm_supported_assets),
// completed in runtime 1500
// Box::new(migration_author_slot_filter_eligible_ratio_to_eligibility_count),
// Box::new(migration_author_mapping_add_keys_to_registration_info),
// Box::new(staking_delegator_state_requests),
// completed in runtime 1600
// Box::new(migration_author_mapping_add_account_id_to_nimbus_lookup),
// completed in runtime 1600
// Box::new(xcm_transactor_transact_signed),
// completed in runtime 1700
//Box::new(migration_elasticity),
// completed in runtime 1900
//Box::new(staking_at_stake_auto_compound),
// completed in runtime 2000
//Box::new(scheduler_to_v4),
//Box::new(democracy_migration_hash_to_bounded_call),
//Box::new(preimage_migration_hash_to_bounded_call),
// completed in runtime 2100
//Box::new(asset_manager_to_xcm_v3),
//Box::new(xcm_transactor_to_xcm_v3),
// completed in runtime 2600
//Box::new(remove_min_bond_for_old_orbiter_collators),
// completed in runtime 2700
// Box::new(missing_balances_migrations),
// Box::new(fix_pallet_versions),
// Box::new(pallet_referenda_migrate_v0_to_v1),
// completed in runtime 2800
//Box::new(pallet_collective_drop_gov_v1_collectives),
// completed in runtime 2801
// Box::new(pallet_staking_round),
// Box::new(pallet_collective_drop_gov_v1_collectives),
// completed in runtime 2900
// Box::new(remove_pallet_democracy),
// Box::new(remove_collectives_addresses
// completed in runtime 3200
// Box::new(MigrateXcmFeesAssetsMeatdata::<Runtime>(Default::default())),
// complete in runtime 3300
Box::new(MigrateCodeToStateTrieV1::<Runtime>(Default::default())),
Box::new(MigrateStakingParachainBondConfig::<Runtime>(
Default::default(),
)),
// permanent migrations
Box::new(MigrateToLatestXcmVersion::<Runtime>(Default::default())),
]
}
}
92 changes: 92 additions & 0 deletions tracing/3300/runtime/common/src/timestamp.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
// Copyright 2019-2022 PureStake Inc.
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! A way to get a relyable timestamp
use cumulus_pallet_parachain_system::{
consensus_hook::UnincludedSegmentCapacity,
relay_state_snapshot::{self, ReadEntryErr},
ConsensusHook, RelayChainStateProof,
};
use frame_support::pallet_prelude::*;
use frame_support::storage::types::{StorageValue, ValueQuery};
use frame_support::traits::{StorageInstance, Time};
pub use moonbeam_core_primitives::well_known_relay_keys;

/// Get the relay timestamp.
/// Noe that the relay timestamp is populated at the parachain system inherent.
/// If you fetch the timestamp before, you will get the timestamp of the parent block.
pub struct RelayTimestamp;
impl Time for RelayTimestamp {
type Moment = u64;

fn now() -> Self::Moment {
RelayTimestampNow::get()
}
}

/// A wrapper around the consensus hook to get the relay timestamp from the relay storage proof
pub struct ConsensusHookWrapperForRelayTimestamp<Runtime, Inner>(
core::marker::PhantomData<(Runtime, Inner)>,
);
impl<Runtime, Inner> ConsensusHook for ConsensusHookWrapperForRelayTimestamp<Runtime, Inner>
where
Runtime: frame_system::Config,
Inner: ConsensusHook,
{
fn on_state_proof(state_proof: &RelayChainStateProof) -> (Weight, UnincludedSegmentCapacity) {
let relay_timestamp: u64 =
match state_proof.read_entry(well_known_relay_keys::TIMESTAMP_NOW, None) {
Ok(relay_timestamp) => relay_timestamp,
// Log the read entry error
Err(relay_state_snapshot::Error::ReadEntry(ReadEntryErr::Proof)) => {
log::error!("Invalid relay storage proof: fail to read key TIMESTAMP_NOW");
panic!("Invalid realy storage proof: fail to read key TIMESTAMP_NOW");
}
Err(relay_state_snapshot::Error::ReadEntry(ReadEntryErr::Decode)) => {
log::error!("Corrupted relay storage: fail to decode value TIMESTAMP_NOW");
panic!("Corrupted relay storage: fail to decode value TIMESTAMP_NOW");
}
Err(relay_state_snapshot::Error::ReadEntry(ReadEntryErr::Absent)) => {
log::error!("Corrupted relay storage: value TIMESTAMP_NOW is absent!");
panic!("Corrupted relay storage: value TIMESTAMP_NOW is absent!");
}
// Can't return another kind of error, the blokc is invalid anyway, so we should panic
_ => unreachable!(),
};

let wrapper_weight = <Runtime as frame_system::Config>::DbWeight::get().writes(1);

RelayTimestampNow::put(relay_timestamp);

let (weight, capacity) = Inner::on_state_proof(state_proof);

(weight.saturating_add(wrapper_weight), capacity)
}
}

// Prefix for storage value RelayTimestampNow
struct RelayTimestampNowPrefix;
impl StorageInstance for RelayTimestampNowPrefix {
const STORAGE_PREFIX: &'static str = "RelayTimestampNow";

fn pallet_prefix() -> &'static str {
"runtime"
}
}

// Storage type used to store the last current relay timestamp
type RelayTimestampNow = StorageValue<RelayTimestampNowPrefix, u64, ValueQuery>;
136 changes: 136 additions & 0 deletions tracing/3300/runtime/common/src/types.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
// Copyright 2024 Moonbeam Foundation.
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.
use parity_scale_codec::{Decode, Encode, EncodeLike, MaxEncodedLen};
use scale_info::TypeInfo;
use sp_std::prelude::*;

#[derive(Debug, PartialEq, Eq, Clone, Copy, Encode, TypeInfo, MaxEncodedLen)]
#[scale_info(skip_type_params(LOWER, UPPER))]
pub struct BoundedU128<const LOWER: u128, const UPPER: u128>(u128);

impl<const L: u128, const U: u128> BoundedU128<L, U> {
// Create a new instance with a value. If the value is out of bounds, it will return an error.
pub fn new(value: u128) -> Result<Self, &'static str> {
if value < L || value > U {
return Err("Value out of bounds");
}
Ok(Self(value))
}

/// Create a new instance with a constant value. If the value is out of bounds, it will be
/// clamped to the nearest bound.
pub fn const_new<const VAL: u128>() -> Self {
if VAL < L {
Self(L)
} else if VAL > U {
Self(U)
} else {
Self(VAL)
}
}

/// Get the value.
pub fn value(&self) -> u128 {
self.0
}
}

impl<const L: u128, const U: u128> Decode for BoundedU128<L, U> {
fn decode<I: parity_scale_codec::Input>(
input: &mut I,
) -> Result<Self, parity_scale_codec::Error> {
let value = u128::decode(input)?;
if value < L || value > U {
return Err("Value out of bounds".into());
}
Ok(Self(value))
}
}

impl<const L: u128, const U: u128> EncodeLike<u128> for BoundedU128<L, U> {}

/// Expose a `Get<u128>` implementation form a `Get<BoundedU128>` type.
#[macro_export]
macro_rules! expose_u128_get {
($name:ident,$bounded_get:ty) => {
pub struct $name;

impl sp_core::Get<u128> for $name {
fn get() -> u128 {
<$bounded_get>::get().value()
}
}
};
}

#[cfg(test)]
mod tests {
use frame_support::parameter_types;
use sp_core::Get;

use super::*;

#[test]
fn test_bounded_u128() {
let bounded = BoundedU128::<1, 10>::new(5).unwrap();
assert_eq!(bounded.value(), 5);

let bounded = BoundedU128::<1, 10>::new(0);
assert_eq!(bounded, Err("Value out of bounds"));

let bounded = BoundedU128::<1, 10>::new(11);
assert_eq!(bounded, Err("Value out of bounds"));

let bounded = BoundedU128::<1, 10>::const_new::<0>();
assert_eq!(bounded.value(), 1);

let bounded = BoundedU128::<1, 10>::const_new::<5>();
assert_eq!(bounded.value(), 5);

let bounded = BoundedU128::<1, 10>::const_new::<11>();
assert_eq!(bounded.value(), 10);
}

#[test]
fn test_expose_u128_get() {
parameter_types! {
pub Bounded: BoundedU128::<1, 10> = BoundedU128::<1, 10>::new(4).unwrap();
}
expose_u128_get!(Exposed, Bounded);
assert_eq!(Bounded::get().value(), Exposed::get());
}

#[test]
fn test_encode_decode() {
let bounded = BoundedU128::<1, 10>::new(5).unwrap();
let encoded = bounded.encode();
let decoded = BoundedU128::<1, 10>::decode(&mut &encoded[..]).unwrap();
assert_eq!(bounded, decoded);
}

#[test]
fn test_encode_invalid() {
let bounded = BoundedU128::<1, 10>::new(9);
let encoded = bounded.encode();
let decoded = BoundedU128::<1, 3>::decode(&mut &encoded[..]);
assert_eq!(decoded, Err("Value out of bounds".into()));

let bounded = BoundedU128::<1, 10>::new(9);
let encoded = bounded.encode();
let decoded = BoundedU128::<100, 500>::decode(&mut &encoded[..]);
assert_eq!(decoded, Err("Value out of bounds".into()));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `cumulus_pallet_parachain_system`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-10-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/moonbeam
// benchmark
// pallet
// --chain=moonbase-dev
// --steps=50
// --repeat=20
// --pallet=cumulus_pallet_parachain_system
// --extrinsic=*
// --wasm-execution=compiled
// --header=./file_header.txt
// --template=./benchmarking/frame-weight-template.hbs
// --output=./runtime/common/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weights 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(105521), added: 107996, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 1000]`.
fn enqueue_inbound_downward_messages(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `82`
// Estimated: `3517`
// Minimum execution time: 2_264_000 picoseconds.
Weight::from_parts(2_385_000, 3517)
// Standard Error: 22_805
.saturating_add(Weight::from_parts(293_496_971, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
}
}
154 changes: 154 additions & 0 deletions tracing/3300/runtime/common/src/weights/cumulus_pallet_xcmp_queue.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `cumulus_pallet_xcmp_queue`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-10-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/moonbeam
// benchmark
// pallet
// --chain=moonbase-dev
// --steps=50
// --repeat=20
// --pallet=cumulus_pallet_xcmp_queue
// --extrinsic=*
// --wasm-execution=compiled
// --header=./file_header.txt
// --template=./benchmarking/frame-weight-template.hbs
// --output=./runtime/common/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weights 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`: Some(12), added: 507, mode: `MaxEncodedLen`)
fn set_config_with_u32() -> Weight {
// Proof Size summary in bytes:
// Measured: `142`
// Estimated: `1497`
// Minimum execution time: 3_954_000 picoseconds.
Weight::from_parts(4_195_000, 1497)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
fn enqueue_xcmp_message() -> Weight {
// Proof Size summary in bytes:
// Measured: `148`
// Estimated: `5487`
// Minimum execution time: 11_094_000 picoseconds.
Weight::from_parts(11_382_000, 5487)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
fn suspend_channel() -> Weight {
// Proof Size summary in bytes:
// Measured: `142`
// Estimated: `2767`
// Minimum execution time: 2_491_000 picoseconds.
Weight::from_parts(2_611_000, 2767)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
fn resume_channel() -> Weight {
// Proof Size summary in bytes:
// Measured: `177`
// Estimated: `2767`
// Minimum execution time: 3_308_000 picoseconds.
Weight::from_parts(3_479_000, 2767)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
fn take_first_concatenated_xcm() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_282_000 picoseconds.
Weight::from_parts(8_411_000, 0)
}
/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
fn on_idle_good_msg() -> Weight {
// Proof Size summary in bytes:
// Measured: `105713`
// Estimated: `109178`
// Minimum execution time: 158_148_000 picoseconds.
Weight::from_parts(159_050_000, 109178)
.saturating_add(T::DbWeight::get().reads(6_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
fn on_idle_large_msg() -> Weight {
// Proof Size summary in bytes:
// Measured: `65782`
// Estimated: `69247`
// Minimum execution time: 106_885_000 picoseconds.
Weight::from_parts(107_480_000, 69247)
.saturating_add(T::DbWeight::get().reads(6_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
}
17 changes: 17 additions & 0 deletions tracing/3300/runtime/common/src/weights/db/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

pub mod rocksdb;
117 changes: 117 additions & 0 deletions tracing/3300/runtime/common/src/weights/db/rocksdb.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-04-27 (Y/M/D)
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//!
//! DATABASE: `RocksDb`, RUNTIME: `Moonbeam`
//! BLOCK-NUM: `BlockId::Number(5962022)`
//! SKIP-WRITE: `false`, SKIP-READ: `false`, WARMUPS: `1`
//! STATE-VERSION: `V0`, STATE-CACHE-SIZE: ``
//! WEIGHT-PATH: `/home/ubuntu/projects/moonbeam/weights-rocksdb-moonbeam.rs`
//! METRIC: `Average`, WEIGHT-MUL: `1.1`, WEIGHT-ADD: `0`
// Executed Command:
// /home/ubuntu/projects/moonbeam/target/release/moonbeam
// benchmark
// storage
// --db=rocksdb
// --state-version=0
// --mul=1.1
// --weight-path
// /home/ubuntu/projects/moonbeam/weights-rocksdb-moonbeam.rs
// --chain
// moonbeam
// --base-path
// /var/lib/rocksdb-moonbeam-data
// --keys-limit
// 10000000
// --random-seed
// 1024

/// Storage DB weights for the `Moonbeam` runtime and `RocksDb`.
pub mod constants {
use frame_support::weights::{constants, RuntimeDbWeight};
use sp_core::parameter_types;

parameter_types! {
/// By default, Substrate uses `RocksDB`, so this will be the weight used throughout
/// the runtime.
pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight {
// Time to read one storage item.
// Calculated by multiplying the *Average* of all values with `1.1` and adding `0`.
//
// Stats nanoseconds:
// Min, Max: 2_300, 2_841_169
// Average: 37_947
// Median: 38_669
// Std-Dev: 7331.86
//
// Percentiles nanoseconds:
// 99th: 55_974
// 95th: 49_824
// 75th: 42_570
read: 41_742 * constants::WEIGHT_REF_TIME_PER_NANOS,

// Time to write one storage item.
// Calculated by multiplying the *Average* of all values with `1.1` and adding `0`.
//
// Stats nanoseconds:
// Min, Max: 18_981, 16_772_373
// Average: 73_893
// Median: 72_807
// Std-Dev: 24543.58
//
// Percentiles nanoseconds:
// 99th: 97_152
// 95th: 85_751
// 75th: 77_392
write: 81_283 * constants::WEIGHT_REF_TIME_PER_NANOS,
};
}

#[cfg(test)]
mod test_db_weights {
use super::constants::RocksDbWeight as W;
use frame_support::weights::constants;

/// Checks that all weights exist and have sane values.
// NOTE: If this test fails but you are sure that the generated values are fine,
// you can delete it.
#[test]
fn bound() {
// At least 1 µs.
assert!(
W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
"Read weight should be at least 1 µs."
);
assert!(
W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
"Write weight should be at least 1 µs."
);
// At most 1 ms.
assert!(
W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
"Read weight should be at most 1 ms."
);
assert!(
W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
"Write weight should be at most 1 ms."
);
}
}
}
54 changes: 54 additions & 0 deletions tracing/3300/runtime/common/src/weights/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Copyright 2019-2022 PureStake Inc.
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! Moonbeam common weights.
pub mod cumulus_pallet_parachain_system;
pub mod cumulus_pallet_xcmp_queue;
pub mod db;
pub mod pallet_asset_manager;
pub mod pallet_assets;
pub mod pallet_author_inherent;
pub mod pallet_author_mapping;
pub mod pallet_author_slot_filter;
pub mod pallet_balances;
pub mod pallet_collective;
pub mod pallet_conviction_voting;
pub mod pallet_crowdloan_rewards;
pub mod pallet_evm;
pub mod pallet_identity;
pub mod pallet_message_queue;
pub mod pallet_moonbeam_foreign_assets;
pub mod pallet_moonbeam_lazy_migrations;
pub mod pallet_moonbeam_orbiters;
pub mod pallet_multisig;
pub mod pallet_parachain_staking;
pub mod pallet_parameters;
pub mod pallet_precompile_benchmarks;
pub mod pallet_preimage;
pub mod pallet_proxy;
pub mod pallet_randomness;
pub mod pallet_referenda;
pub mod pallet_relay_storage_roots;
pub mod pallet_scheduler;
pub mod pallet_sudo;
pub mod pallet_timestamp;
pub mod pallet_treasury;
pub mod pallet_utility;
pub mod pallet_whitelist;
pub mod pallet_xcm;
pub mod pallet_xcm_transactor;
pub mod pallet_xcm_weight_trader;
102 changes: 102 additions & 0 deletions tracing/3300/runtime/common/src/weights/pallet_asset_manager.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_asset_manager`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-10-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/moonbeam
// benchmark
// pallet
// --chain=moonbase-dev
// --steps=50
// --repeat=20
// --pallet=pallet_asset_manager
// --extrinsic=*
// --wasm-execution=compiled
// --header=./file_header.txt
// --template=./benchmarking/frame-weight-template.hbs
// --output=./runtime/common/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weights for `pallet_asset_manager`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_asset_manager::WeightInfo for WeightInfo<T> {
/// Storage: `AssetManager::AssetIdType` (r:1 w:1)
/// Proof: `AssetManager::AssetIdType` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
/// Storage: `Assets::NextAssetId` (r:1 w:0)
/// Proof: `Assets::NextAssetId` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `Assets::Metadata` (r:1 w:1)
/// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(152), added: 2627, mode: `MaxEncodedLen`)
/// Storage: `AssetManager::AssetTypeId` (r:0 w:1)
/// Proof: `AssetManager::AssetTypeId` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn register_foreign_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `82`
// Estimated: `3639`
// Minimum execution time: 29_430_000 picoseconds.
Weight::from_parts(30_152_000, 3639)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `AssetManager::AssetIdType` (r:1 w:1)
/// Proof: `AssetManager::AssetIdType` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AssetManager::AssetTypeId` (r:0 w:2)
/// Proof: `AssetManager::AssetTypeId` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `x` is `[5, 100]`.
fn change_existing_asset_type() -> Weight {
// Proof Size summary in bytes:
// Measured: `447 + x * (4 ±0)`
// Estimated: `3909 + x * (5 ±0)`
// Minimum execution time: 16_773_000 picoseconds.
Weight::from_parts(18_536_714, 3909)
// Standard Error: 1_512
.saturating_add(Weight::from_parts(79_685, 0))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(Weight::from_parts(0, 5))
}
/// Storage: `AssetManager::AssetIdType` (r:1 w:1)
/// Proof: `AssetManager::AssetIdType` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AssetManager::AssetTypeId` (r:0 w:1)
/// Proof: `AssetManager::AssetTypeId` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `x` is `[5, 100]`.
fn remove_existing_asset_type() -> Weight {
// Proof Size summary in bytes:
// Measured: `447 + x * (4 ±0)`
// Estimated: `3909 + x * (5 ±0)`
// Minimum execution time: 14_226_000 picoseconds.
Weight::from_parts(15_816_525, 3909)
// Standard Error: 1_445
.saturating_add(Weight::from_parts(78_038, 0))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(Weight::from_parts(0, 5))
}
}
487 changes: 487 additions & 0 deletions tracing/3300/runtime/common/src/weights/pallet_assets.rs

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions tracing/3300/runtime/common/src/weights/pallet_author_inherent.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_author_inherent`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-10-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/moonbeam
// benchmark
// pallet
// --chain=moonbase-dev
// --steps=50
// --repeat=20
// --pallet=pallet_author_inherent
// --extrinsic=*
// --wasm-execution=compiled
// --header=./file_header.txt
// --template=./benchmarking/frame-weight-template.hbs
// --output=./runtime/common/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weights for `pallet_author_inherent`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_author_inherent::WeightInfo for WeightInfo<T> {
/// Storage: `ParachainSystem::ValidationData` (r:1 w:0)
/// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AuthorInherent::Author` (r:1 w:0)
/// Proof: `AuthorInherent::Author` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`)
/// Storage: `ParachainStaking::SelectedCandidates` (r:1 w:0)
/// Proof: `ParachainStaking::SelectedCandidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AuthorFilter::EligibleCount` (r:1 w:0)
/// Proof: `AuthorFilter::EligibleCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Randomness::PreviousLocalVrfOutput` (r:1 w:0)
/// Proof: `Randomness::PreviousLocalVrfOutput` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AuthorInherent::InherentIncluded` (r:0 w:1)
/// Proof: `AuthorInherent::InherentIncluded` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
fn kick_off_authorship_validation() -> Weight {
// Proof Size summary in bytes:
// Measured: `372`
// Estimated: `1857`
// Minimum execution time: 16_901_000 picoseconds.
Weight::from_parts(17_462_000, 1857)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
}
122 changes: 122 additions & 0 deletions tracing/3300/runtime/common/src/weights/pallet_author_mapping.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_author_mapping`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-10-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/moonbeam
// benchmark
// pallet
// --chain=moonbase-dev
// --steps=50
// --repeat=20
// --pallet=pallet_author_mapping
// --extrinsic=*
// --wasm-execution=compiled
// --header=./file_header.txt
// --template=./benchmarking/frame-weight-template.hbs
// --output=./runtime/common/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weights for `pallet_author_mapping`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_author_mapping::WeightInfo for WeightInfo<T> {
/// Storage: `AuthorMapping::MappingWithDeposit` (r:1 w:1)
/// Proof: `AuthorMapping::MappingWithDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `AuthorMapping::NimbusLookup` (r:0 w:1)
/// Proof: `AuthorMapping::NimbusLookup` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn add_association() -> Weight {
// Proof Size summary in bytes:
// Measured: `376`
// Estimated: `3841`
// Minimum execution time: 29_186_000 picoseconds.
Weight::from_parts(30_345_000, 3841)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `AuthorMapping::MappingWithDeposit` (r:2 w:2)
/// Proof: `AuthorMapping::MappingWithDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AuthorMapping::NimbusLookup` (r:0 w:1)
/// Proof: `AuthorMapping::NimbusLookup` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn update_association() -> Weight {
// Proof Size summary in bytes:
// Measured: `325`
// Estimated: `6265`
// Minimum execution time: 17_409_000 picoseconds.
Weight::from_parts(17_832_000, 6265)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `AuthorMapping::MappingWithDeposit` (r:1 w:1)
/// Proof: `AuthorMapping::MappingWithDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `AuthorMapping::NimbusLookup` (r:0 w:1)
/// Proof: `AuthorMapping::NimbusLookup` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn clear_association() -> Weight {
// Proof Size summary in bytes:
// Measured: `453`
// Estimated: `3918`
// Minimum execution time: 29_139_000 picoseconds.
Weight::from_parts(29_791_000, 3918)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `AuthorMapping::NimbusLookup` (r:1 w:1)
/// Proof: `AuthorMapping::NimbusLookup` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AuthorMapping::MappingWithDeposit` (r:1 w:1)
/// Proof: `AuthorMapping::MappingWithDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
fn remove_keys() -> Weight {
// Proof Size summary in bytes:
// Measured: `547`
// Estimated: `4012`
// Minimum execution time: 34_869_000 picoseconds.
Weight::from_parts(35_655_000, 4012)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `AuthorMapping::NimbusLookup` (r:1 w:1)
/// Proof: `AuthorMapping::NimbusLookup` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AuthorMapping::MappingWithDeposit` (r:1 w:1)
/// Proof: `AuthorMapping::MappingWithDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
fn set_keys() -> Weight {
// Proof Size summary in bytes:
// Measured: `432`
// Estimated: `3897`
// Minimum execution time: 31_752_000 picoseconds.
Weight::from_parts(32_801_000, 3897)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_author_slot_filter`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-10-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/moonbeam
// benchmark
// pallet
// --chain=moonbase-dev
// --steps=50
// --repeat=20
// --pallet=pallet_author_slot_filter
// --extrinsic=*
// --wasm-execution=compiled
// --header=./file_header.txt
// --template=./benchmarking/frame-weight-template.hbs
// --output=./runtime/common/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weights for `pallet_author_slot_filter`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_author_slot_filter::WeightInfo for WeightInfo<T> {
/// Storage: `AuthorFilter::EligibleCount` (r:0 w:1)
/// Proof: `AuthorFilter::EligibleCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn set_eligible() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 4_164_000 picoseconds.
Weight::from_parts(4_307_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
}
165 changes: 165 additions & 0 deletions tracing/3300/runtime/common/src/weights/pallet_balances.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_balances`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-10-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/moonbeam
// benchmark
// pallet
// --chain=moonbase-dev
// --steps=50
// --repeat=20
// --pallet=pallet_balances
// --extrinsic=*
// --wasm-execution=compiled
// --header=./file_header.txt
// --template=./benchmarking/frame-weight-template.hbs
// --output=./runtime/common/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weights 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(116), added: 2591, mode: `MaxEncodedLen`)
fn transfer_allow_death() -> Weight {
// Proof Size summary in bytes:
// Measured: `72`
// Estimated: `3581`
// Minimum execution time: 45_979_000 picoseconds.
Weight::from_parts(46_984_000, 3581)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
fn transfer_keep_alive() -> Weight {
// Proof Size summary in bytes:
// Measured: `72`
// Estimated: `3581`
// Minimum execution time: 39_051_000 picoseconds.
Weight::from_parts(40_151_000, 3581)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
fn force_set_balance_creating() -> Weight {
// Proof Size summary in bytes:
// Measured: `195`
// Estimated: `3581`
// Minimum execution time: 14_598_000 picoseconds.
Weight::from_parts(15_096_000, 3581)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
fn force_set_balance_killing() -> Weight {
// Proof Size summary in bytes:
// Measured: `195`
// Estimated: `3581`
// Minimum execution time: 19_713_000 picoseconds.
Weight::from_parts(20_449_000, 3581)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
fn force_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `267`
// Estimated: `6172`
// Minimum execution time: 48_104_000 picoseconds.
Weight::from_parts(48_949_000, 6172)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
fn transfer_all() -> Weight {
// Proof Size summary in bytes:
// Measured: `72`
// Estimated: `3581`
// Minimum execution time: 48_680_000 picoseconds.
Weight::from_parts(49_526_000, 3581)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
fn force_unreserve() -> Weight {
// Proof Size summary in bytes:
// Measured: `195`
// Estimated: `3581`
// Minimum execution time: 17_526_000 picoseconds.
Weight::from_parts(18_213_000, 3581)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `System::Account` (r:999 w:999)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// The range of component `u` is `[1, 1000]`.
fn upgrade_accounts(u: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1277 + u * (123 ±0)`
// Estimated: `990 + u * (2591 ±0)`
// Minimum execution time: 16_081_000 picoseconds.
Weight::from_parts(16_407_000, 990)
// Standard Error: 9_636
.saturating_add(Weight::from_parts(13_603_751, 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, 2591).saturating_mul(u.into()))
}
/// Storage: `Balances::InactiveIssuance` (r:1 w:0)
/// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
fn force_adjust_total_issuance() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `1501`
// Minimum execution time: 5_423_000 picoseconds.
Weight::from_parts(5_831_000, 1501)
.saturating_add(T::DbWeight::get().reads(1_u64))
}
fn burn_allow_death() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 27_797_000 picoseconds.
Weight::from_parts(28_485_000, 0)
}
fn burn_keep_alive() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 21_340_000 picoseconds.
Weight::from_parts(21_907_000, 0)
}
}
308 changes: 308 additions & 0 deletions tracing/3300/runtime/common/src/weights/pallet_collective.rs

Large diffs are not rendered by default.

192 changes: 192 additions & 0 deletions tracing/3300/runtime/common/src/weights/pallet_conviction_voting.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_conviction_voting`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-10-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/moonbeam
// benchmark
// pallet
// --chain=moonbase-dev
// --steps=50
// --repeat=20
// --pallet=pallet_conviction_voting
// --extrinsic=*
// --wasm-execution=compiled
// --header=./file_header.txt
// --template=./benchmarking/frame-weight-template.hbs
// --output=./runtime/common/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weights for `pallet_conviction_voting`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_conviction_voting::WeightInfo for WeightInfo<T> {
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(912), added: 3387, mode: `MaxEncodedLen`)
/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(1152), added: 3627, mode: `MaxEncodedLen`)
/// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
/// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(137), added: 2612, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
fn vote_new() -> Weight {
// Proof Size summary in bytes:
// Measured: `1962`
// Estimated: `42428`
// Minimum execution time: 64_184_000 picoseconds.
Weight::from_parts(66_327_000, 42428)
.saturating_add(T::DbWeight::get().reads(6_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(912), added: 3387, mode: `MaxEncodedLen`)
/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(1152), added: 3627, mode: `MaxEncodedLen`)
/// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
/// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(137), added: 2612, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn vote_existing() -> Weight {
// Proof Size summary in bytes:
// Measured: `2263`
// Estimated: `83866`
// Minimum execution time: 85_618_000 picoseconds.
Weight::from_parts(87_791_000, 83866)
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(1152), added: 3627, mode: `MaxEncodedLen`)
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(912), added: 3387, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn remove_vote() -> Weight {
// Proof Size summary in bytes:
// Measured: `1841`
// Estimated: `83866`
// Minimum execution time: 55_538_000 picoseconds.
Weight::from_parts(57_314_000, 83866)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(1152), added: 3627, mode: `MaxEncodedLen`)
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:0)
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(912), added: 3387, mode: `MaxEncodedLen`)
fn remove_other_vote() -> Weight {
// Proof Size summary in bytes:
// Measured: `1385`
// Estimated: `4617`
// Minimum execution time: 19_849_000 picoseconds.
Weight::from_parts(21_122_000, 4617)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `ConvictionVoting::VotingFor` (r:2 w:2)
/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(1152), added: 3627, mode: `MaxEncodedLen`)
/// Storage: `Referenda::ReferendumInfoFor` (r:20 w:20)
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(912), added: 3387, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
/// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
/// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(137), added: 2612, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:20)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
/// The range of component `r` is `[0, 20]`.
fn delegate(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1621 + r * (248 ±0)`
// Estimated: `83866 + r * (3387 ±0)`
// Minimum execution time: 43_863_000 picoseconds.
Weight::from_parts(40_802_182, 83866)
// Standard Error: 75_692
.saturating_add(Weight::from_parts(25_978_125, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
.saturating_add(T::DbWeight::get().writes(6_u64))
.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(r.into())))
.saturating_add(Weight::from_parts(0, 3387).saturating_mul(r.into()))
}
/// Storage: `ConvictionVoting::VotingFor` (r:2 w:2)
/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(1152), added: 3627, mode: `MaxEncodedLen`)
/// Storage: `Referenda::ReferendumInfoFor` (r:20 w:20)
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(912), added: 3387, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:20)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
/// The range of component `r` is `[0, 20]`.
fn undelegate(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1340 + r * (248 ±0)`
// Estimated: `83866 + r * (3387 ±0)`
// Minimum execution time: 19_070_000 picoseconds.
Weight::from_parts(9_796_559, 83866)
// Standard Error: 85_888
.saturating_add(Weight::from_parts(26_327_253, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
.saturating_add(T::DbWeight::get().writes(4_u64))
.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(r.into())))
.saturating_add(Weight::from_parts(0, 3387).saturating_mul(r.into()))
}
/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(1152), added: 3627, mode: `MaxEncodedLen`)
/// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
/// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(137), added: 2612, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`)
fn unlock() -> Weight {
// Proof Size summary in bytes:
// Measured: `1228`
// Estimated: `4752`
// Minimum execution time: 48_423_000 picoseconds.
Weight::from_parts(49_553_000, 4752)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
}
163 changes: 163 additions & 0 deletions tracing/3300/runtime/common/src/weights/pallet_crowdloan_rewards.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_crowdloan_rewards`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-10-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/moonbeam
// benchmark
// pallet
// --chain=moonbase-dev
// --steps=50
// --repeat=20
// --pallet=pallet_crowdloan_rewards
// --extrinsic=*
// --wasm-execution=compiled
// --header=./file_header.txt
// --template=./benchmarking/frame-weight-template.hbs
// --output=./runtime/common/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weights for `pallet_crowdloan_rewards`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_crowdloan_rewards::WeightInfo for WeightInfo<T> {
/// Storage: `CrowdloanRewards::Initialized` (r:1 w:0)
/// Proof: `CrowdloanRewards::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `CrowdloanRewards::InitializedRewardAmount` (r:1 w:1)
/// Proof: `CrowdloanRewards::InitializedRewardAmount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `CrowdloanRewards::TotalContributors` (r:1 w:1)
/// Proof: `CrowdloanRewards::TotalContributors` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `System::Account` (r:501 w:501)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `CrowdloanRewards::ClaimedRelayChainIds` (r:500 w:500)
/// Proof: `CrowdloanRewards::ClaimedRelayChainIds` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `CrowdloanRewards::UnassociatedContributions` (r:500 w:0)
/// Proof: `CrowdloanRewards::UnassociatedContributions` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `CrowdloanRewards::AccountsPayable` (r:500 w:500)
/// Proof: `CrowdloanRewards::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `x` is `[1, 500]`.
fn initialize_reward_vec(x: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `76347 + x * (550 ±0)`
// Estimated: `66242 + x * (3052 ±0)`
// Minimum execution time: 122_807_000 picoseconds.
Weight::from_parts(70_793_034, 66242)
// Standard Error: 22_979
.saturating_add(Weight::from_parts(55_263_553, 0).saturating_mul(x.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(x.into())))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(x.into())))
.saturating_add(Weight::from_parts(0, 3052).saturating_mul(x.into()))
}
/// Storage: `CrowdloanRewards::Initialized` (r:1 w:1)
/// Proof: `CrowdloanRewards::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `CrowdloanRewards::InitRelayBlock` (r:1 w:0)
/// Proof: `CrowdloanRewards::InitRelayBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `CrowdloanRewards::InitializedRewardAmount` (r:1 w:0)
/// Proof: `CrowdloanRewards::InitializedRewardAmount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `System::Account` (r:1 w:0)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `CrowdloanRewards::TotalContributors` (r:1 w:0)
/// Proof: `CrowdloanRewards::TotalContributors` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `CrowdloanRewards::EndRelayBlock` (r:0 w:1)
/// Proof: `CrowdloanRewards::EndRelayBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn complete_initialization() -> Weight {
// Proof Size summary in bytes:
// Measured: `579`
// Estimated: `3581`
// Minimum execution time: 14_816_000 picoseconds.
Weight::from_parts(15_028_000, 3581)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `CrowdloanRewards::Initialized` (r:1 w:0)
/// Proof: `CrowdloanRewards::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `CrowdloanRewards::AccountsPayable` (r:1 w:1)
/// Proof: `CrowdloanRewards::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::ValidationData` (r:1 w:0)
/// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `CrowdloanRewards::InitRelayBlock` (r:1 w:0)
/// Proof: `CrowdloanRewards::InitRelayBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `CrowdloanRewards::EndRelayBlock` (r:1 w:0)
/// Proof: `CrowdloanRewards::EndRelayBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
fn claim() -> Weight {
// Proof Size summary in bytes:
// Measured: `1100`
// Estimated: `6172`
// Minimum execution time: 60_529_000 picoseconds.
Weight::from_parts(62_925_000, 6172)
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `CrowdloanRewards::AccountsPayable` (r:2 w:2)
/// Proof: `CrowdloanRewards::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn update_reward_address() -> Weight {
// Proof Size summary in bytes:
// Measured: `397`
// Estimated: `6337`
// Minimum execution time: 17_361_000 picoseconds.
Weight::from_parts(17_712_000, 6337)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `CrowdloanRewards::UnassociatedContributions` (r:1 w:1)
/// Proof: `CrowdloanRewards::UnassociatedContributions` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `CrowdloanRewards::ClaimedRelayChainIds` (r:1 w:1)
/// Proof: `CrowdloanRewards::ClaimedRelayChainIds` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `CrowdloanRewards::AccountsPayable` (r:1 w:1)
/// Proof: `CrowdloanRewards::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
fn associate_native_identity() -> Weight {
// Proof Size summary in bytes:
// Measured: `934`
// Estimated: `6172`
// Minimum execution time: 104_523_000 picoseconds.
Weight::from_parts(106_767_000, 6172)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `CrowdloanRewards::AccountsPayable` (r:2 w:2)
/// Proof: `CrowdloanRewards::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `x` is `[1, 500]`.
fn change_association_with_relay_keys(x: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `366 + x * (32 ±0)`
// Estimated: `6306 + x * (32 ±0)`
// Minimum execution time: 58_152_000 picoseconds.
Weight::from_parts(58_883_000, 6306)
// Standard Error: 9_080
.saturating_add(Weight::from_parts(39_012_944, 0).saturating_mul(x.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(Weight::from_parts(0, 32).saturating_mul(x.into()))
}
}
56 changes: 56 additions & 0 deletions tracing/3300/runtime/common/src/weights/pallet_evm.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_evm`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-10-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/moonbeam
// benchmark
// pallet
// --chain=moonbase-dev
// --steps=50
// --repeat=20
// --pallet=pallet_evm
// --extrinsic=*
// --wasm-execution=compiled
// --header=./file_header.txt
// --template=./benchmarking/frame-weight-template.hbs
// --output=./runtime/common/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weights for `pallet_evm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_evm::WeightInfo for WeightInfo<T> {
fn withdraw() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_697_000 picoseconds.
Weight::from_parts(1_853_000, 0)
}
}
411 changes: 411 additions & 0 deletions tracing/3300/runtime/common/src/weights/pallet_identity.rs

Large diffs are not rendered by default.

184 changes: 184 additions & 0 deletions tracing/3300/runtime/common/src/weights/pallet_message_queue.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_message_queue`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-10-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/moonbeam
// benchmark
// pallet
// --chain=moonbase-dev
// --steps=50
// --repeat=20
// --pallet=pallet_message_queue
// --extrinsic=*
// --wasm-execution=compiled
// --header=./file_header.txt
// --template=./benchmarking/frame-weight-template.hbs
// --output=./runtime/common/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weights 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: 10_809_000 picoseconds.
Weight::from_parts(11_213_000, 6044)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// 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: 9_673_000 picoseconds.
Weight::from_parts(9_980_000, 6044)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `EmergencyParaXcm::Mode` (r:1 w:0)
/// Proof: `EmergencyParaXcm::Mode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn service_queue_base() -> Weight {
// Proof Size summary in bytes:
// Measured: `190`
// Estimated: `3517`
// Minimum execution time: 7_018_000 picoseconds.
Weight::from_parts(7_286_000, 3517)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
fn service_page_base_completion() -> Weight {
// Proof Size summary in bytes:
// Measured: `72`
// Estimated: `108986`
// Minimum execution time: 5_249_000 picoseconds.
Weight::from_parts(5_392_000, 108986)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
fn service_page_base_no_completion() -> Weight {
// Proof Size summary in bytes:
// Measured: `72`
// Estimated: `108986`
// Minimum execution time: 5_348_000 picoseconds.
Weight::from_parts(5_566_000, 108986)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// 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(105521), added: 107996, mode: `MaxEncodedLen`)
fn service_page_item() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 241_399_000 picoseconds.
Weight::from_parts(243_802_000, 0)
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// 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: 6_094_000 picoseconds.
Weight::from_parts(6_315_000, 3517)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// 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(105521), added: 107996, mode: `MaxEncodedLen`)
fn reap_page() -> Weight {
// Proof Size summary in bytes:
// Measured: `105609`
// Estimated: `108986`
// Minimum execution time: 70_007_000 picoseconds.
Weight::from_parts(71_779_000, 108986)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `EmergencyParaXcm::Mode` (r:1 w:0)
/// Proof: `EmergencyParaXcm::Mode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
fn execute_overweight_page_removed() -> Weight {
// Proof Size summary in bytes:
// Measured: `105793`
// Estimated: `108986`
// Minimum execution time: 152_333_000 picoseconds.
Weight::from_parts(153_402_000, 108986)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `EmergencyParaXcm::Mode` (r:1 w:0)
/// Proof: `EmergencyParaXcm::Mode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
fn execute_overweight_page_updated() -> Weight {
// Proof Size summary in bytes:
// Measured: `105793`
// Estimated: `108986`
// Minimum execution time: 208_593_000 picoseconds.
Weight::from_parts(210_523_000, 108986)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_moonbeam_foreign_assets`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-10-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/moonbeam
// benchmark
// pallet
// --chain=moonbase-dev
// --steps=50
// --repeat=20
// --pallet=pallet_moonbeam_foreign_assets
// --extrinsic=*
// --wasm-execution=compiled
// --header=./file_header.txt
// --template=./benchmarking/frame-weight-template.hbs
// --output=./runtime/common/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weights for `pallet_moonbeam_foreign_assets`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_moonbeam_foreign_assets::WeightInfo for WeightInfo<T> {
/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:1)
/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `EvmForeignAssets::AssetsByLocation` (r:1 w:1)
/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `EvmForeignAssets::CounterForAssetsById` (r:1 w:1)
/// Proof: `EvmForeignAssets::CounterForAssetsById` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `AssetManager::AssetIdType` (r:1 w:0)
/// Proof: `AssetManager::AssetIdType` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `EVM::AccountCodesMetadata` (r:2 w:1)
/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `EVM::AccountStorages` (r:4 w:4)
/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `EVM::Suicided` (r:1 w:0)
/// Proof: `EVM::Suicided` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `EVM::AccountCodes` (r:1 w:1)
/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Ethereum::Pending` (r:1 w:1)
/// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn create_foreign_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `3272387`
// Estimated: `3283277`
// Minimum execution time: 4_174_843_000 picoseconds.
Weight::from_parts(4_249_286_000, 3283277)
.saturating_add(T::DbWeight::get().reads(19_u64))
.saturating_add(T::DbWeight::get().writes(13_u64))
}
/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:1)
/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `EvmForeignAssets::AssetsByLocation` (r:2 w:2)
/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn change_xcm_location() -> Weight {
// Proof Size summary in bytes:
// Measured: `2461`
// Estimated: `8401`
// Minimum execution time: 47_757_000 picoseconds.
Weight::from_parts(53_785_000, 8401)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:0)
/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `EvmForeignAssets::AssetsByLocation` (r:1 w:1)
/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `System::Digest` (r:1 w:0)
/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `EVM::AccountCodes` (r:1 w:0)
/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Assets::Asset` (r:1 w:0)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
/// Storage: `EVM::AccountStorages` (r:1 w:1)
/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Ethereum::Pending` (r:1 w:1)
/// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn freeze_foreign_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `3294569`
// Estimated: `3300509`
// Minimum execution time: 3_730_587_000 picoseconds.
Weight::from_parts(3_817_812_000, 3300509)
.saturating_add(T::DbWeight::get().reads(15_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:0)
/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `EvmForeignAssets::AssetsByLocation` (r:1 w:1)
/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `System::Digest` (r:1 w:0)
/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `EVM::AccountCodes` (r:1 w:0)
/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Assets::Asset` (r:1 w:0)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
/// Storage: `EVM::AccountStorages` (r:1 w:1)
/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Ethereum::Pending` (r:1 w:1)
/// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn unfreeze_foreign_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `3295628`
// Estimated: `3301568`
// Minimum execution time: 3_736_006_000 picoseconds.
Weight::from_parts(3_851_556_000, 3301568)
.saturating_add(T::DbWeight::get().reads(15_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_moonbeam_lazy_migrations`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-10-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/moonbeam
// benchmark
// pallet
// --chain=moonbase-dev
// --steps=50
// --repeat=20
// --pallet=pallet_moonbeam_lazy_migrations
// --extrinsic=*
// --wasm-execution=compiled
// --header=./file_header.txt
// --template=./benchmarking/frame-weight-template.hbs
// --output=./runtime/common/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weights for `pallet_moonbeam_lazy_migrations`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_moonbeam_lazy_migrations::WeightInfo for WeightInfo<T> {
/// Storage: `EVM::Suicided` (r:100 w:0)
/// Proof: `EVM::Suicided` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `EVM::AccountCodes` (r:100 w:0)
/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `EVM::AccountStorages` (r:1000 w:900)
/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `MoonbeamLazyMigrations::SuicidedContractsRemoved` (r:1 w:1)
/// Proof: `MoonbeamLazyMigrations::SuicidedContractsRemoved` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// The range of component `a` is `[1, 100]`.
/// The range of component `l` is `[1, 1000]`.
fn clear_suicided_storage(a: u32, l: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `4251 + a * (12 ±0) + l * (84 ±0)`
// Estimated: `37759 + a * (2229 ±74) + l * (2536 ±7)`
// Minimum execution time: 49_196_000 picoseconds.
Weight::from_parts(50_354_000, 37759)
// Standard Error: 2_593_683
.saturating_add(Weight::from_parts(42_870_661, 0).saturating_mul(a.into()))
// Standard Error: 259_091
.saturating_add(Weight::from_parts(27_114_710, 0).saturating_mul(l.into()))
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(a.into())))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(l.into())))
.saturating_add(T::DbWeight::get().writes(41_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(l.into())))
.saturating_add(Weight::from_parts(0, 2229).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(0, 2536).saturating_mul(l.into()))
}
}
203 changes: 203 additions & 0 deletions tracing/3300/runtime/common/src/weights/pallet_moonbeam_orbiters.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_moonbeam_orbiters`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-10-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/moonbeam
// benchmark
// pallet
// --chain=moonbase-dev
// --steps=50
// --repeat=20
// --pallet=pallet_moonbeam_orbiters
// --extrinsic=*
// --wasm-execution=compiled
// --header=./file_header.txt
// --template=./benchmarking/frame-weight-template.hbs
// --output=./runtime/common/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weights for `pallet_moonbeam_orbiters`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_moonbeam_orbiters::WeightInfo for WeightInfo<T> {
/// Storage: `MoonbeamOrbiters::CollatorsPool` (r:1 w:1)
/// Proof: `MoonbeamOrbiters::CollatorsPool` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Balances::Reserves` (r:1 w:0)
/// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1037), added: 3512, mode: `MaxEncodedLen`)
fn collator_add_orbiter() -> Weight {
// Proof Size summary in bytes:
// Measured: `562`
// Estimated: `4502`
// Minimum execution time: 19_313_000 picoseconds.
Weight::from_parts(19_979_000, 4502)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `MoonbeamOrbiters::CollatorsPool` (r:1 w:1)
/// Proof: `MoonbeamOrbiters::CollatorsPool` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn collator_remove_orbiter() -> Weight {
// Proof Size summary in bytes:
// Measured: `366`
// Estimated: `3831`
// Minimum execution time: 15_324_000 picoseconds.
Weight::from_parts(15_825_000, 3831)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `MoonbeamOrbiters::CollatorsPool` (r:1 w:1)
/// Proof: `MoonbeamOrbiters::CollatorsPool` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn orbiter_leave_collator_pool() -> Weight {
// Proof Size summary in bytes:
// Measured: `366`
// Estimated: `3831`
// Minimum execution time: 15_264_000 picoseconds.
Weight::from_parts(15_756_000, 3831)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `MoonbeamOrbiters::MinOrbiterDeposit` (r:1 w:0)
/// Proof: `MoonbeamOrbiters::MinOrbiterDeposit` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Balances::Reserves` (r:1 w:1)
/// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1037), added: 3512, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `MoonbeamOrbiters::RegisteredOrbiter` (r:0 w:1)
/// Proof: `MoonbeamOrbiters::RegisteredOrbiter` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn orbiter_register() -> Weight {
// Proof Size summary in bytes:
// Measured: `282`
// Estimated: `4502`
// Minimum execution time: 29_591_000 picoseconds.
Weight::from_parts(30_764_000, 4502)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `MoonbeamOrbiters::CounterForCollatorsPool` (r:1 w:0)
/// Proof: `MoonbeamOrbiters::CounterForCollatorsPool` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `MoonbeamOrbiters::CollatorsPool` (r:101 w:0)
/// Proof: `MoonbeamOrbiters::CollatorsPool` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Balances::Reserves` (r:1 w:1)
/// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1037), added: 3512, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `MoonbeamOrbiters::RegisteredOrbiter` (r:0 w:1)
/// Proof: `MoonbeamOrbiters::RegisteredOrbiter` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `n` is `[0, 100]`.
fn orbiter_unregister(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `391 + n * (48 ±0)`
// Estimated: `4502 + n * (2524 ±0)`
// Minimum execution time: 35_972_000 picoseconds.
Weight::from_parts(36_889_467, 4502)
// Standard Error: 8_350
.saturating_add(Weight::from_parts(7_212_657, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(Weight::from_parts(0, 2524).saturating_mul(n.into()))
}
/// Storage: `MoonbeamOrbiters::CollatorsPool` (r:1 w:1)
/// Proof: `MoonbeamOrbiters::CollatorsPool` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `MoonbeamOrbiters::CounterForCollatorsPool` (r:1 w:1)
/// Proof: `MoonbeamOrbiters::CounterForCollatorsPool` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn add_collator() -> Weight {
// Proof Size summary in bytes:
// Measured: `82`
// Estimated: `3547`
// Minimum execution time: 10_253_000 picoseconds.
Weight::from_parts(10_492_000, 3547)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `MoonbeamOrbiters::CollatorsPool` (r:1 w:1)
/// Proof: `MoonbeamOrbiters::CollatorsPool` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `MoonbeamOrbiters::CounterForCollatorsPool` (r:1 w:1)
/// Proof: `MoonbeamOrbiters::CounterForCollatorsPool` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `MoonbeamOrbiters::AccountLookupOverride` (r:0 w:9)
/// Proof: `MoonbeamOrbiters::AccountLookupOverride` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn remove_collator() -> Weight {
// Proof Size summary in bytes:
// Measured: `366`
// Estimated: `3831`
// Minimum execution time: 22_624_000 picoseconds.
Weight::from_parts(23_733_000, 3831)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(11_u64))
}
/// Storage: `MoonbeamOrbiters::CurrentRound` (r:1 w:0)
/// Proof: `MoonbeamOrbiters::CurrentRound` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MoonbeamOrbiters::OrbiterPerRound` (r:100 w:100)
/// Proof: `MoonbeamOrbiters::OrbiterPerRound` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `x` is `[0, 100]`.
fn on_initialize(x: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `140 + x * (61 ±0)`
// Estimated: `1624 + x * (2537 ±0)`
// Minimum execution time: 6_214_000 picoseconds.
Weight::from_parts(6_366_604, 1624)
// Standard Error: 1_230
.saturating_add(Weight::from_parts(872_056, 0).saturating_mul(x.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(x.into())))
.saturating_add(Weight::from_parts(0, 2537).saturating_mul(x.into()))
}
/// Storage: `MoonbeamOrbiters::OrbiterPerRound` (r:1 w:1)
/// Proof: `MoonbeamOrbiters::OrbiterPerRound` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
fn distribute_rewards() -> Weight {
// Proof Size summary in bytes:
// Measured: `298`
// Estimated: `3763`
// Minimum execution time: 20_021_000 picoseconds.
Weight::from_parts(20_830_000, 3763)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `MoonbeamOrbiters::ForceRotation` (r:1 w:1)
/// Proof: `MoonbeamOrbiters::ForceRotation` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MoonbeamOrbiters::CollatorsPool` (r:2 w:1)
/// Proof: `MoonbeamOrbiters::CollatorsPool` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `MoonbeamOrbiters::OrbiterPerRound` (r:0 w:3)
/// Proof: `MoonbeamOrbiters::OrbiterPerRound` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `MoonbeamOrbiters::AccountLookupOverride` (r:0 w:3)
/// Proof: `MoonbeamOrbiters::AccountLookupOverride` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `MoonbeamOrbiters::CurrentRound` (r:0 w:1)
/// Proof: `MoonbeamOrbiters::CurrentRound` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn on_new_round() -> Weight {
// Proof Size summary in bytes:
// Measured: `256`
// Estimated: `6196`
// Minimum execution time: 28_981_000 picoseconds.
Weight::from_parts(29_874_000, 6196)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(9_u64))
}
}
160 changes: 160 additions & 0 deletions tracing/3300/runtime/common/src/weights/pallet_multisig.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_multisig`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-10-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/moonbeam
// benchmark
// pallet
// --chain=moonbase-dev
// --steps=50
// --repeat=20
// --pallet=pallet_multisig
// --extrinsic=*
// --wasm-execution=compiled
// --header=./file_header.txt
// --template=./benchmarking/frame-weight-template.hbs
// --output=./runtime/common/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weights for `pallet_multisig`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// The range of component `z` is `[0, 10000]`.
fn as_multi_threshold_1(z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `42`
// Estimated: `1527`
// Minimum execution time: 15_012_000 picoseconds.
Weight::from_parts(15_722_401, 1527)
// Standard Error: 2
.saturating_add(Weight::from_parts(509, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(2122), added: 4597, 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: `304`
// Estimated: `5587`
// Minimum execution time: 41_674_000 picoseconds.
Weight::from_parts(31_403_043, 5587)
// Standard Error: 818
.saturating_add(Weight::from_parts(117_130, 0).saturating_mul(s.into()))
// Standard Error: 8
.saturating_add(Weight::from_parts(1_509, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(2122), added: 4597, 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: `312`
// Estimated: `5587`
// Minimum execution time: 25_687_000 picoseconds.
Weight::from_parts(16_128_185, 5587)
// Standard Error: 414
.saturating_add(Weight::from_parts(105_531, 0).saturating_mul(s.into()))
// Standard Error: 4
.saturating_add(Weight::from_parts(1_490, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(2122), added: 4597, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// 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: `475 + s * (20 ±0)`
// Estimated: `5587 + s * (20 ±0)`
// Minimum execution time: 52_339_000 picoseconds.
Weight::from_parts(38_249_617, 5587)
// Standard Error: 884
.saturating_add(Weight::from_parts(156_197, 0).saturating_mul(s.into()))
// Standard Error: 8
.saturating_add(Weight::from_parts(1_550, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(Weight::from_parts(0, 20).saturating_mul(s.into()))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(2122), added: 4597, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_create(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `304`
// Estimated: `5587`
// Minimum execution time: 28_704_000 picoseconds.
Weight::from_parts(29_906_375, 5587)
// Standard Error: 792
.saturating_add(Weight::from_parts(117_318, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(2122), added: 4597, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_approve(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `312`
// Estimated: `5587`
// Minimum execution time: 14_532_000 picoseconds.
Weight::from_parts(14_972_942, 5587)
// Standard Error: 452
.saturating_add(Weight::from_parts(102_638, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(2122), added: 4597, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
fn cancel_as_multi(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `474`
// Estimated: `5587`
// Minimum execution time: 29_256_000 picoseconds.
Weight::from_parts(29_906_746, 5587)
// Standard Error: 635
.saturating_add(Weight::from_parts(113_811, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
}
877 changes: 877 additions & 0 deletions tracing/3300/runtime/common/src/weights/pallet_parachain_staking.rs

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions tracing/3300/runtime/common/src/weights/pallet_parameters.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_parameters`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-10-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/moonbeam
// benchmark
// pallet
// --chain=moonbase-dev
// --steps=50
// --repeat=20
// --pallet=pallet_parameters
// --extrinsic=*
// --wasm-execution=compiled
// --header=./file_header.txt
// --template=./benchmarking/frame-weight-template.hbs
// --output=./runtime/common/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weights for `pallet_parameters`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_parameters::WeightInfo for WeightInfo<T> {
fn set_parameter() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_968_000 picoseconds.
Weight::from_parts(6_424_000, 0)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_precompile_benchmarks`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-10-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/moonbeam
// benchmark
// pallet
// --chain=moonbase-dev
// --steps=50
// --repeat=20
// --pallet=pallet_precompile_benchmarks
// --extrinsic=*
// --wasm-execution=compiled
// --header=./file_header.txt
// --template=./benchmarking/frame-weight-template.hbs
// --output=./runtime/common/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weights for `pallet_precompile_benchmarks`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_precompile_benchmarks::WeightInfo for WeightInfo<T> {
/// The range of component `x` is `[100, 2000]`.
fn verify_entry(x: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 74_350_000 picoseconds.
Weight::from_parts(74_682_000, 0)
// Standard Error: 2_362
.saturating_add(Weight::from_parts(655_768, 0).saturating_mul(x.into()))
}
/// Storage: `RelayStorageRoots::RelayStorageRootKeys` (r:1 w:0)
/// Proof: `RelayStorageRoots::RelayStorageRootKeys` (`max_values`: Some(1), `max_size`: Some(121), added: 616, mode: `MaxEncodedLen`)
fn latest_relay_block() -> Weight {
// Proof Size summary in bytes:
// Measured: `227`
// Estimated: `1606`
// Minimum execution time: 4_331_000 picoseconds.
Weight::from_parts(4_493_000, 1606)
.saturating_add(T::DbWeight::get().reads(1_u64))
}
fn p256_verify() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_572_336_000 picoseconds.
Weight::from_parts(1_580_625_000, 0)
// TODO: Remove this multiplication once we are comfortable with the weight estimation
// Double the weight just to mitigate the possibility of having a signature that
// takes longer to verify
.saturating_mul(1u64)
}
}
251 changes: 251 additions & 0 deletions tracing/3300/runtime/common/src/weights/pallet_preimage.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_preimage`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-10-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/moonbeam
// benchmark
// pallet
// --chain=moonbase-dev
// --steps=50
// --repeat=20
// --pallet=pallet_preimage
// --extrinsic=*
// --wasm-execution=compiled
// --header=./file_header.txt
// --template=./benchmarking/frame-weight-template.hbs
// --output=./runtime/common/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weights for `pallet_preimage`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> {
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 4194304]`.
fn note_preimage(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `42`
// Estimated: `3544`
// Minimum execution time: 48_399_000 picoseconds.
Weight::from_parts(48_725_000, 3544)
// Standard Error: 5
.saturating_add(Weight::from_parts(2_391, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 4194304]`.
fn note_requested_preimage(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `106`
// Estimated: `3544`
// Minimum execution time: 14_564_000 picoseconds.
Weight::from_parts(14_717_000, 3544)
// Standard Error: 5
.saturating_add(Weight::from_parts(2_390, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 4194304]`.
fn note_no_deposit_preimage(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `106`
// Estimated: `3544`
// Minimum execution time: 13_796_000 picoseconds.
Weight::from_parts(13_963_000, 3544)
// Standard Error: 5
.saturating_add(Weight::from_parts(2_387, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
fn unnote_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `220`
// Estimated: `3544`
// Minimum execution time: 52_399_000 picoseconds.
Weight::from_parts(55_628_000, 3544)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
fn unnote_no_deposit_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `144`
// Estimated: `3544`
// Minimum execution time: 25_390_000 picoseconds.
Weight::from_parts(31_375_000, 3544)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
fn request_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `176`
// Estimated: `3544`
// Minimum execution time: 19_487_000 picoseconds.
Weight::from_parts(24_540_000, 3544)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
fn request_no_deposit_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `144`
// Estimated: `3544`
// Minimum execution time: 13_287_000 picoseconds.
Weight::from_parts(15_026_000, 3544)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
fn request_unnoted_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `42`
// Estimated: `3544`
// Minimum execution time: 14_467_000 picoseconds.
Weight::from_parts(15_358_000, 3544)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
fn request_requested_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `106`
// Estimated: `3544`
// Minimum execution time: 9_617_000 picoseconds.
Weight::from_parts(10_100_000, 3544)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
fn unrequest_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `144`
// Estimated: `3544`
// Minimum execution time: 20_691_000 picoseconds.
Weight::from_parts(23_871_000, 3544)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
fn unrequest_unnoted_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `106`
// Estimated: `3544`
// Minimum execution time: 9_622_000 picoseconds.
Weight::from_parts(9_978_000, 3544)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
fn unrequest_multi_referenced_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `106`
// Estimated: `3544`
// Minimum execution time: 9_597_000 picoseconds.
Weight::from_parts(9_775_000, 3544)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Preimage::StatusFor` (r:1023 w:1023)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1023 w:1023)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1023 w:1023)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:0 w:1023)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
/// The range of component `n` is `[1, 1024]`.
fn ensure_updated(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1461 + n * (203 ±0)`
// Estimated: `990 + n * (2591 ±0)`
// Minimum execution time: 59_274_000 picoseconds.
Weight::from_parts(60_453_000, 990)
// Standard Error: 43_506
.saturating_add(Weight::from_parts(56_432_973, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2591).saturating_mul(n.into()))
}
}
217 changes: 217 additions & 0 deletions tracing/3300/runtime/common/src/weights/pallet_proxy.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_proxy`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-10-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/moonbeam
// benchmark
// pallet
// --chain=moonbase-dev
// --steps=50
// --repeat=20
// --pallet=pallet_proxy
// --extrinsic=*
// --wasm-execution=compiled
// --header=./file_header.txt
// --template=./benchmarking/frame-weight-template.hbs
// --output=./runtime/common/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weights 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(845), added: 3320, mode: `MaxEncodedLen`)
/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// The range of component `p` is `[1, 31]`.
fn proxy(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `191 + p * (25 ±0)`
// Estimated: `4310 + p * (25 ±0)`
// Minimum execution time: 14_586_000 picoseconds.
Weight::from_parts(15_377_186, 4310)
// Standard Error: 1_094
.saturating_add(Weight::from_parts(34_865, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(Weight::from_parts(0, 25).saturating_mul(p.into()))
// 1 DB read that happen when filtering the proxy call transaction
.saturating_add(T::DbWeight::get().reads(1))
}
/// Storage: `Proxy::Proxies` (r:1 w:0)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
/// Storage: `Proxy::Announcements` (r:1 w:1)
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// 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: `443 + a * (56 ±0) + p * (25 ±0)`
// Estimated: `5302 + a * (60 ±0) + p * (22 ±0)`
// Minimum execution time: 39_155_000 picoseconds.
Weight::from_parts(39_580_029, 5302)
// Standard Error: 2_261
.saturating_add(Weight::from_parts(178_748, 0).saturating_mul(a.into()))
// Standard Error: 2_336
.saturating_add(Weight::from_parts(27_980, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(Weight::from_parts(0, 60).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(0, 22).saturating_mul(p.into()))
}
/// Storage: `Proxy::Announcements` (r:1 w:1)
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, 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: `329 + a * (56 ±0)`
// Estimated: `5302`
// Minimum execution time: 23_473_000 picoseconds.
Weight::from_parts(26_209_989, 5302)
// Standard Error: 3_454
.saturating_add(Weight::from_parts(200_052, 0).saturating_mul(a.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Proxy::Announcements` (r:1 w:1)
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, 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: `329 + a * (56 ±0)`
// Estimated: `5302`
// Minimum execution time: 23_328_000 picoseconds.
Weight::from_parts(26_139_743, 5302)
// Standard Error: 3_496
.saturating_add(Weight::from_parts(203_561, 0).saturating_mul(a.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Proxy::Proxies` (r:1 w:0)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
/// Storage: `Proxy::Announcements` (r:1 w:1)
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, 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: `345 + a * (56 ±0) + p * (25 ±0)`
// Estimated: `5302`
// Minimum execution time: 33_295_000 picoseconds.
Weight::from_parts(33_799_923, 5302)
// Standard Error: 1_797
.saturating_add(Weight::from_parts(166_234, 0).saturating_mul(a.into()))
// Standard Error: 1_857
.saturating_add(Weight::from_parts(14_785, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Proxy::Proxies` (r:1 w:1)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 31]`.
fn add_proxy(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `149 + p * (25 ±0)`
// Estimated: `4310`
// Minimum execution time: 23_192_000 picoseconds.
Weight::from_parts(23_993_610, 4310)
// Standard Error: 1_053
.saturating_add(Weight::from_parts(37_528, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Proxy::Proxies` (r:1 w:1)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 31]`.
fn remove_proxy(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `149 + p * (25 ±0)`
// Estimated: `4310`
// Minimum execution time: 23_031_000 picoseconds.
Weight::from_parts(23_878_806, 4310)
// Standard Error: 1_163
.saturating_add(Weight::from_parts(43_391, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Proxy::Proxies` (r:1 w:1)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 31]`.
fn remove_proxies(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `149 + p * (25 ±0)`
// Estimated: `4310`
// Minimum execution time: 20_886_000 picoseconds.
Weight::from_parts(21_806_461, 4310)
// Standard Error: 1_004
.saturating_add(Weight::from_parts(28_797, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Proxy::Proxies` (r:1 w:1)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 31]`.
fn create_pure(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `161`
// Estimated: `4310`
// Minimum execution time: 24_541_000 picoseconds.
Weight::from_parts(25_363_398, 4310)
// Standard Error: 1_033
.saturating_add(Weight::from_parts(7_508, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Proxy::Proxies` (r:1 w:1)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
/// The range of component `p` is `[0, 30]`.
fn kill_pure(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `174 + p * (25 ±0)`
// Estimated: `4310`
// Minimum execution time: 21_751_000 picoseconds.
Weight::from_parts(22_497_548, 4310)
// Standard Error: 979
.saturating_add(Weight::from_parts(35_681, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
}
164 changes: 164 additions & 0 deletions tracing/3300/runtime/common/src/weights/pallet_randomness.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_randomness`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-10-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/moonbeam
// benchmark
// pallet
// --chain=moonbase-dev
// --steps=50
// --repeat=20
// --pallet=pallet_randomness
// --extrinsic=*
// --wasm-execution=compiled
// --header=./file_header.txt
// --template=./benchmarking/frame-weight-template.hbs
// --output=./runtime/common/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weights for `pallet_randomness`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_randomness::WeightInfo for WeightInfo<T> {
/// Storage: `Randomness::RelayEpoch` (r:1 w:1)
/// Proof: `Randomness::RelayEpoch` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::ValidationData` (r:1 w:0)
/// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::RelayStateProof` (r:1 w:0)
/// Proof: `ParachainSystem::RelayStateProof` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Randomness::RandomnessResults` (r:1 w:1)
/// Proof: `Randomness::RandomnessResults` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Randomness::InherentIncluded` (r:0 w:1)
/// Proof: `Randomness::InherentIncluded` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn set_babe_randomness_results() -> Weight {
// Proof Size summary in bytes:
// Measured: `297`
// Estimated: `3762`
// Minimum execution time: 12_198_000 picoseconds.
Weight::from_parts(12_517_000, 3762)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Randomness::NotFirstBlock` (r:1 w:0)
/// Proof: `Randomness::NotFirstBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `System::Digest` (r:1 w:0)
/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AuthorMapping::MappingWithDeposit` (r:1 w:0)
/// Proof: `AuthorMapping::MappingWithDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Randomness::LocalVrfOutput` (r:1 w:1)
/// Proof: `Randomness::LocalVrfOutput` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Randomness::RandomnessResults` (r:1 w:1)
/// Proof: `Randomness::RandomnessResults` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn on_initialize() -> Weight {
// Proof Size summary in bytes:
// Measured: `719`
// Estimated: `4184`
// Minimum execution time: 519_559_000 picoseconds.
Weight::from_parts(523_170_000, 4184)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Parameters::Parameters` (r:1 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
/// Storage: `Randomness::RequestCount` (r:1 w:1)
/// Proof: `Randomness::RequestCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Randomness::RandomnessResults` (r:1 w:1)
/// Proof: `Randomness::RandomnessResults` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Randomness::Requests` (r:0 w:1)
/// Proof: `Randomness::Requests` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn request_randomness() -> Weight {
// Proof Size summary in bytes:
// Measured: `549`
// Estimated: `6172`
// Minimum execution time: 52_393_000 picoseconds.
Weight::from_parts(54_545_000, 6172)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Randomness::Requests` (r:1 w:0)
/// Proof: `Randomness::Requests` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Randomness::RandomnessResults` (r:1 w:0)
/// Proof: `Randomness::RandomnessResults` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `x` is `[1, 100]`.
fn prepare_fulfillment(x: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `412`
// Estimated: `3877`
// Minimum execution time: 9_399_000 picoseconds.
Weight::from_parts(9_673_040, 3877)
// Standard Error: 362
.saturating_add(Weight::from_parts(263_578, 0).saturating_mul(x.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
}
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Randomness::RandomnessResults` (r:1 w:1)
/// Proof: `Randomness::RandomnessResults` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Randomness::Requests` (r:0 w:1)
/// Proof: `Randomness::Requests` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn finish_fulfillment() -> Weight {
// Proof Size summary in bytes:
// Measured: `739`
// Estimated: `6172`
// Minimum execution time: 49_219_000 picoseconds.
Weight::from_parts(51_561_000, 6172)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `Randomness::Requests` (r:1 w:1)
/// Proof: `Randomness::Requests` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
fn increase_fee() -> Weight {
// Proof Size summary in bytes:
// Measured: `825`
// Estimated: `6172`
// Minimum execution time: 46_217_000 picoseconds.
Weight::from_parts(48_364_000, 6172)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Randomness::Requests` (r:1 w:1)
/// Proof: `Randomness::Requests` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Randomness::RandomnessResults` (r:1 w:1)
/// Proof: `Randomness::RandomnessResults` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn execute_request_expiration() -> Weight {
// Proof Size summary in bytes:
// Measured: `868`
// Estimated: `6172`
// Minimum execution time: 50_501_000 picoseconds.
Weight::from_parts(52_681_000, 6172)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
}
Loading

0 comments on commit d3e6829

Please sign in to comment.