diff --git a/.DS_Store b/.DS_Store index f0b09361..bc0a1344 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/Cargo.lock b/Cargo.lock index c1e4284c..db2d9553 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -27,7 +27,7 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli 0.28.0", + "gimli 0.28.1", ] [[package]] @@ -36,6 +36,25 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "aead" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "aead" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" +dependencies = [ + "generic-array 0.14.7", + "rand_core 0.6.4", +] + [[package]] name = "aead" version = "0.5.2" @@ -46,6 +65,29 @@ dependencies = [ "generic-array 0.14.7", ] +[[package]] +name = "aes" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" +dependencies = [ + "aes-soft", + "aesni", + "cipher 0.2.5", +] + +[[package]] +name = "aes" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +dependencies = [ + "cfg-if", + "cipher 0.3.0", + "cpufeatures", + "opaque-debug 0.3.0", +] + [[package]] name = "aes" version = "0.8.3" @@ -53,24 +95,58 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" dependencies = [ "cfg-if", - "cipher", + "cipher 0.4.4", "cpufeatures", ] +[[package]] +name = "aes-gcm" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" +dependencies = [ + "aead 0.4.3", + "aes 0.7.5", + "cipher 0.3.0", + "ctr 0.8.0", + "ghash 0.4.4", + "subtle", +] + [[package]] name = "aes-gcm" version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "ghash", + "aead 0.5.2", + "aes 0.8.3", + "cipher 0.4.4", + "ctr 0.9.2", + "ghash 0.5.0", "subtle", ] +[[package]] +name = "aes-soft" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" +dependencies = [ + "cipher 0.2.5", + "opaque-debug 0.3.0", +] + +[[package]] +name = "aesni" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" +dependencies = [ + "cipher 0.2.5", + "opaque-debug 0.3.0", +] + [[package]] name = "ahash" version = "0.7.7" @@ -82,6 +158,19 @@ dependencies = [ "version_check", ] +[[package]] +name = "ahash" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +dependencies = [ + "cfg-if", + "getrandom 0.2.11", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" version = "1.1.2" @@ -93,10 +182,11 @@ dependencies = [ [[package]] name = "alphanet-runtime" -version = "1.4.1" +version = "1.4.3" dependencies = [ "alphanet-runtime-constants", "frame-benchmarking", + "frame-benchmarking-pallet-pov", "frame-election-provider-support", "frame-executive", "frame-support", @@ -112,12 +202,15 @@ dependencies = [ "pallet-bags-list", "pallet-balances", "pallet-collective", + "pallet-contracts", + "pallet-contracts-primitives", "pallet-democracy", "pallet-election-provider-multi-phase", "pallet-elections-phragmen", "pallet-grandpa", "pallet-identity", "pallet-im-online", + "pallet-insecure-randomness-collective-flip", "pallet-membership", "pallet-multisig", "pallet-offences", @@ -128,6 +221,7 @@ dependencies = [ "pallet-session-benchmarking", "pallet-staking", "pallet-staking-reward-curve", + "pallet-staking-runtime-api", "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", @@ -140,6 +234,7 @@ dependencies = [ "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", + "sp-consensus-grandpa", "sp-core", "sp-inherents", "sp-io", @@ -173,7 +268,9 @@ version = "1.0.0" dependencies = [ "frame-support", "smallvec", + "sp-core", "sp-runtime", + "sp-weights", "ternoa-core-primitives", "ternoa-runtime-common", ] @@ -217,6 +314,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "arc-swap" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" + [[package]] name = "array-bytes" version = "4.2.0" @@ -242,82 +345,106 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] -name = "asn1_der" -version = "0.7.6" +name = "asn1-rs" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" +checksum = "30ff05a702273012438132f449575dbc804e27b2f3cbe3069aa237d26c98fa33" +dependencies = [ + "asn1-rs-derive 0.1.0", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror", + "time", +] [[package]] -name = "async-channel" -version = "1.9.0" +name = "asn1-rs" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" dependencies = [ - "concurrent-queue", - "event-listener 2.5.3", - "futures-core", + "asn1-rs-derive 0.4.0", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror", + "time", ] [[package]] -name = "async-channel" -version = "2.1.0" +name = "asn1-rs-derive" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37875bd9915b7d67c2f117ea2c30a0989874d0b2cb694fe25403c85763c0c9e" +checksum = "db8b7511298d5b7784b40b092d9e9dcd3a627a5707e4b5e507931ab0d44eeebf" dependencies = [ - "concurrent-queue", - "event-listener 3.1.0", - "event-listener-strategy", - "futures-core", - "pin-project-lite 0.2.13", + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure", ] [[package]] -name = "async-executor" -version = "1.7.2" +name = "asn1-rs-derive" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc5ea910c42e5ab19012bab31f53cb4d63d54c3a27730f9a833a88efcf4bb52d" +checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" dependencies = [ - "async-lock 3.1.1", - "async-task", - "concurrent-queue", - "fastrand 2.0.1", - "futures-lite 2.0.1", - "slab", + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure", ] [[package]] -name = "async-global-executor" -version = "2.3.1" +name = "asn1-rs-impl" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" +checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" dependencies = [ - "async-channel 1.9.0", - "async-executor", - "async-io", - "async-lock 2.8.0", - "blocking", - "futures-lite 1.13.0", - "once_cell", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "asn1_der" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" + +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener 2.5.3", + "futures-core", ] [[package]] name = "async-io" -version = "1.13.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +checksum = "6afaa937395a620e33dc6a742c593c01aced20aa376ffb0f628121198578ccc7" dependencies = [ - "async-lock 2.8.0", - "autocfg", + "async-lock 3.2.0", "cfg-if", "concurrent-queue", - "futures-lite 1.13.0", - "log", + "futures-io", + "futures-lite", "parking", "polling", - "rustix 0.37.27", + "rustix 0.38.28", "slab", - "socket2 0.4.10", - "waker-fn", + "tracing", + "windows-sys 0.52.0", ] [[package]] @@ -331,21 +458,15 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.1.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "655b9c7fe787d3b25cc0f804a1a8401790f0c5bc395beb5a64dc77d8de079105" +checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c" dependencies = [ - "event-listener 3.1.0", + "event-listener 4.0.0", "event-listener-strategy", "pin-project-lite 0.2.13", ] -[[package]] -name = "async-task" -version = "4.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4eb2cdb97421e01129ccb49169d8279ed21e829929144f4a22a6e54ac549ca1" - [[package]] name = "async-trait" version = "0.1.74" @@ -354,7 +475,7 @@ checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", ] [[package]] @@ -556,7 +677,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ - "block-padding", + "block-padding 0.1.5", "byte-tools", "byteorder", "generic-array 0.12.4", @@ -580,6 +701,16 @@ dependencies = [ "generic-array 0.14.7", ] +[[package]] +name = "block-modes" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0" +dependencies = [ + "block-padding 0.2.1", + "cipher 0.2.5", +] + [[package]] name = "block-padding" version = "0.1.5" @@ -590,19 +721,21 @@ dependencies = [ ] [[package]] -name = "blocking" -version = "1.5.1" +name = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + +[[package]] +name = "bounded-collections" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" +checksum = "ca548b6163b872067dc5eb82fd130c56881435e30367d2073594a3d9744120dd" dependencies = [ - "async-channel 2.1.0", - "async-lock 3.1.1", - "async-task", - "fastrand 2.0.1", - "futures-io", - "futures-lite 2.0.1", - "piper", - "tracing", + "log", + "parity-scale-codec", + "scale-info", + "serde", ] [[package]] @@ -611,6 +744,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +[[package]] +name = "bs58" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +dependencies = [ + "tinyvec", +] + [[package]] name = "bstr" version = "1.8.0" @@ -648,6 +790,12 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" +[[package]] +name = "bytemuck" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" + [[package]] name = "byteorder" version = "1.5.0" @@ -691,15 +839,16 @@ dependencies = [ [[package]] name = "cargo_metadata" -version = "0.14.2" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" +checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", "semver 1.0.20", "serde", "serde_json", + "thiserror", ] [[package]] @@ -712,6 +861,17 @@ dependencies = [ "libc", ] +[[package]] +name = "ccm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aca1a8fbc20b50ac9673ff014abfb2b5f4085ee1a850d408f14a159c5853ac7" +dependencies = [ + "aead 0.3.2", + "cipher 0.2.5", + "subtle", +] + [[package]] name = "cexpr" version = "0.6.0" @@ -749,7 +909,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" dependencies = [ "cfg-if", - "cipher", + "cipher 0.4.4", "cpufeatures", ] @@ -759,9 +919,9 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" dependencies = [ - "aead", + "aead 0.5.2", "chacha20", - "cipher", + "cipher 0.4.4", "poly1305", "zeroize", ] @@ -777,7 +937,7 @@ dependencies = [ "js-sys", "num-traits", "wasm-bindgen", - "windows-targets", + "windows-targets 0.48.5", ] [[package]] @@ -788,11 +948,29 @@ checksum = "f6ed9c8b2d17acb8110c46f1da5bf4a696d745e1474a16db0cd2b49cd0249bf2" dependencies = [ "core2", "multibase", - "multihash", + "multihash 0.16.3", "serde", "unsigned-varint", ] +[[package]] +name = "cipher" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "cipher" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +dependencies = [ + "generic-array 0.14.7", +] + [[package]] name = "cipher" version = "0.4.4" @@ -875,9 +1053,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" dependencies = [ "crossbeam-utils", ] @@ -896,9 +1074,9 @@ checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -906,9 +1084,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "core2" @@ -939,18 +1117,18 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.88.2" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52056f6d0584484b57fa6c1a65c1fcb15f3780d8b6a758426d9e3084169b2ddd" +checksum = "2bc42ba2e232e5b20ff7dc299a812d53337dadce9a7e39a238e6a5cb82d2e57b" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.88.2" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fed94c8770dc25d01154c3ffa64ed0b3ba9d583736f305fed7beebe5d9cf74" +checksum = "253531aca9b6f56103c9420369db3263e784df39aa1c90685a1f69cfbba0623e" dependencies = [ "arrayvec 0.7.4", "bumpalo", @@ -960,6 +1138,7 @@ dependencies = [ "cranelift-entity", "cranelift-isle", "gimli 0.26.2", + "hashbrown 0.12.3", "log", "regalloc2", "smallvec", @@ -968,33 +1147,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.88.2" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c451b81faf237d11c7e4f3165eeb6bac61112762c5cfe7b4c0fb7241474358f" +checksum = "72f2154365e2bff1b1b8537a7181591fdff50d8e27fa6e40d5c69c3bad0ca7c8" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.88.2" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c940133198426d26128f08be2b40b0bd117b84771fd36798969c4d712d81fc" +checksum = "687e14e3f5775248930e0d5a84195abef8b829958e9794bf8d525104993612b4" [[package]] name = "cranelift-entity" -version = "0.88.2" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87a0f1b2fdc18776956370cf8d9b009ded3f855350c480c1c52142510961f352" +checksum = "f42ea692c7b450ad18b8c9889661505d51c09ec4380cf1c2d278dbb2da22cae1" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.88.2" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34897538b36b216cc8dd324e73263596d51b8cf610da6498322838b2546baf8a" +checksum = "8483c2db6f45fe9ace984e5adc5d058102227e4c62e5aa2054e16b0275fd3a6e" dependencies = [ "cranelift-codegen", "log", @@ -1004,15 +1183,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.88.2" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b2629a569fae540f16a76b70afcc87ad7decb38dc28fa6c648ac73b51e78470" +checksum = "e9793158837678902446c411741d87b43f57dadfb944f2440db4287cda8cbd59" [[package]] name = "cranelift-native" -version = "0.88.2" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20937dab4e14d3e225c5adfc9c7106bafd4ac669bdb43027b911ff794c6fb318" +checksum = "72668c7755f2b880665cb422c8ad2d56db58a88b9bebfef0b73edc2277c13c49" dependencies = [ "cranelift-codegen", "libc", @@ -1021,9 +1200,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.88.2" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80fc2288957a94fd342a015811479de1837850924166d1f1856d8406e6f3609b" +checksum = "3852ce4b088b44ac4e29459573943009a70d1b192c8d77ef949b4e814f656fc1" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -1035,6 +1214,21 @@ dependencies = [ "wasmtime-types", ] +[[package]] +name = "crc" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + [[package]] name = "crc32fast" version = "1.3.2" @@ -1126,13 +1320,22 @@ dependencies = [ "subtle", ] +[[package]] +name = "ctr" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +dependencies = [ + "cipher 0.3.0", +] + [[package]] name = "ctr" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "cipher", + "cipher 0.4.4", ] [[package]] @@ -1170,9 +1373,10 @@ dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", + "digest 0.10.7", "fiat-crypto", "platforms 3.2.0", - "rustc_version", + "rustc_version 0.4.0", "subtle", "zeroize", ] @@ -1185,7 +1389,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", ] [[package]] @@ -1212,7 +1416,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.39", + "syn 2.0.40", ] [[package]] @@ -1229,20 +1433,55 @@ checksum = "587663dd5fb3d10932c8aecfe7c844db1bcf0aee93eeab08fac13dc1212c2e7f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", +] + +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core", + "quote", + "syn 1.0.109", ] [[package]] name = "data-encoding" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "data-encoding-macro" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c904b33cc60130e1aeea4956ab803d08a3f4a0ca82d64ed757afac3891f2bb99" +checksum = "20c01c06f5f429efdf2bae21eb67c28b3df3cf85b7dd2d8ef09c0838dac5d33e" dependencies = [ "data-encoding", "data-encoding-macro-internal", @@ -1250,9 +1489,9 @@ dependencies = [ [[package]] name = "data-encoding-macro-internal" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fdf3fce3ce863539ec1d7fd1b6dcc3c645663376b43ed376bbf887733e4f772" +checksum = "0047d07f2c89b17dd631c80450d69841a6b5d7fb17278cbc43d7e4cfcf2576f3" dependencies = [ "data-encoding", "syn 1.0.109", @@ -1265,19 +1504,109 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", + "pem-rfc7468", "zeroize", ] [[package]] -name = "derive_more" -version = "0.99.17" +name = "der" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] + "const-oid", + "zeroize", +] + +[[package]] +name = "der-parser" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe398ac75057914d7d07307bf67dc7f3f574a26783b4fc7805a20ffa9f506e82" +dependencies = [ + "asn1-rs 0.3.1", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "der-parser" +version = "8.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +dependencies = [ + "asn1-rs 0.5.2", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "deranged" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derive-syn-parse" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_builder" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_builder_macro" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" +dependencies = [ + "derive_builder_core", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] [[package]] name = "difflib" @@ -1356,13 +1685,14 @@ dependencies = [ ] [[package]] -name = "dns-parser" -version = "0.8.0" +name = "displaydoc" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ - "byteorder", - "quick-error", + "proc-macro2", + "quote", + "syn 2.0.40", ] [[package]] @@ -1416,10 +1746,10 @@ version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ - "der", + "der 0.6.1", "elliptic-curve", "rfc6979", - "signature", + "signature 1.6.4", ] [[package]] @@ -1428,7 +1758,17 @@ version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" dependencies = [ - "signature", + "signature 1.6.4", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8 0.10.2", + "signature 2.2.0", ] [[package]] @@ -1438,13 +1778,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" dependencies = [ "curve25519-dalek 3.2.0", - "ed25519", + "ed25519 1.5.3", "rand 0.7.3", "serde", "sha2 0.9.9", "zeroize", ] +[[package]] +name = "ed25519-dalek" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" +dependencies = [ + "curve25519-dalek 4.1.1", + "ed25519 2.2.3", + "rand_core 0.6.4", + "serde", + "sha2 0.10.8", + "subtle", + "zeroize", +] + [[package]] name = "ed25519-zebra" version = "3.1.0" @@ -1473,11 +1828,14 @@ checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ "base16ct", "crypto-bigint", - "der", + "der 0.6.1", "digest 0.10.7", "ff", "generic-array 0.14.7", "group", + "hkdf", + "pem-rfc7468", + "pkcs8 0.9.0", "rand_core 0.6.4", "sec1", "subtle", @@ -1513,20 +1871,7 @@ checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", -] - -[[package]] -name = "env_logger" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", + "syn 2.0.40", ] [[package]] @@ -1556,33 +1901,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" -dependencies = [ - "errno-dragonfly", - "libc", - "winapi", -] - -[[package]] -name = "errno" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" -dependencies = [ - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "cc", "libc", + "windows-sys 0.52.0", ] [[package]] @@ -1593,9 +1917,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "3.1.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +checksum = "770d968249b5d99410d61f5bf89057f3199a077a04d087092f58e7d10692baae" dependencies = [ "concurrent-queue", "parking", @@ -1604,11 +1928,11 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96b852f1345da36d551b9473fa1e2b1eb5c5195585c6c018118bc92a8d91160" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" dependencies = [ - "event-listener 3.1.0", + "event-listener 4.0.0", "pin-project-lite 0.2.13", ] @@ -1621,6 +1945,19 @@ dependencies = [ "futures 0.3.29", ] +[[package]] +name = "expander" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f360349150728553f92e4c997a16af8915f418d3a0f21b440d34c5632f16ed84" +dependencies = [ + "blake2", + "fs-err", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "fake-simd" version = "0.1.2" @@ -1633,15 +1970,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - [[package]] name = "fastrand" version = "2.0.1" @@ -1679,20 +2007,20 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84f2e425d9790201ba4af4630191feac6dcc98765b118d4d18e91d23c2353866" dependencies = [ - "env_logger 0.10.1", + "env_logger", "log", ] [[package]] name = "filetime" -version = "0.2.22" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", - "windows-sys 0.48.0", + "redox_syscall 0.4.1", + "windows-sys 0.52.0", ] [[package]] @@ -1758,16 +2086,16 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", ] [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -1781,9 +2109,10 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", + "frame-support-procedural", "frame-system", "linregress", "log", @@ -1799,12 +2128,13 @@ dependencies = [ "sp-runtime-interface", "sp-std", "sp-storage", + "static_assertions", ] [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "Inflector", "array-bytes", @@ -1816,16 +2146,13 @@ dependencies = [ "frame-system", "gethostname", "handlebars", - "hash-db", "itertools", - "kvdb", "lazy_static", "linked-hash-map", "log", - "memory-db", "parity-scale-codec", "rand 0.8.5", - "rand_pcg 0.3.1", + "rand_pcg", "sc-block-builder", "sc-cli", "sc-client-api", @@ -1835,7 +2162,6 @@ dependencies = [ "sc-sysinfo", "serde", "serde_json", - "serde_nanos", "sp-api", "sp-blockchain", "sp-core", @@ -1848,17 +2174,31 @@ dependencies = [ "sp-std", "sp-storage", "sp-trie", - "tempfile", "thiserror", "thousands", ] +[[package]] +name = "frame-benchmarking-pallet-pov" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn 1.0.109", @@ -1867,7 +2207,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -1875,6 +2215,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-arithmetic", + "sp-core", "sp-npos-elections", "sp-runtime", "sp-std", @@ -1883,7 +2224,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -1912,26 +2253,26 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "env_logger 0.9.3", + "futures 0.3.29", "log", "parity-scale-codec", "serde", - "serde_json", "sp-core", "sp-io", "sp-runtime", - "sp-version", "substrate-rpc-client", + "tokio", ] [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "bitflags 1.3.2", + "environmental", "frame-metadata", "frame-support-procedural", "impl-trait-for-tuples", @@ -1961,10 +2302,11 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "Inflector", "cfg-expr", + "derive-syn-parse", "frame-support-procedural-tools", "itertools", "proc-macro2", @@ -1975,10 +2317,10 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn 1.0.109", @@ -1987,7 +2329,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "proc-macro2", "quote", @@ -1997,7 +2339,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "log", @@ -2015,7 +2357,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -2030,7 +2372,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "sp-api", @@ -2039,7 +2381,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "parity-scale-codec", @@ -2048,6 +2390,15 @@ dependencies = [ "sp-std", ] +[[package]] +name = "fs-err" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" +dependencies = [ + "autocfg", +] + [[package]] name = "fs2" version = "0.4.3" @@ -2058,6 +2409,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "fs4" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" +dependencies = [ + "rustix 0.38.28", + "windows-sys 0.48.0", +] + [[package]] name = "funty" version = "2.0.0" @@ -2121,30 +2482,11 @@ checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" [[package]] name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite 0.2.13", - "waker-fn", -] - -[[package]] -name = "futures-lite" -version = "2.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3831c2651acb5177cbd83943f3d9c8912c5ad03c76afcc0e9511ba568ec5ebb" +checksum = "aeee267a1883f7ebef3700f262d2d54de95dfaf38189015a74fdc4e0c7ad8143" dependencies = [ - "fastrand 2.0.1", "futures-core", - "futures-io", - "memchr", - "parking", "pin-project-lite 0.2.13", ] @@ -2156,7 +2498,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", ] [[package]] @@ -2166,8 +2508,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" dependencies = [ "futures-io", - "rustls", - "webpki", + "rustls 0.20.9", + "webpki 0.22.4", ] [[package]] @@ -2252,10 +2594,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi 0.9.0+wasi-snapshot-preview1", - "wasm-bindgen", ] [[package]] @@ -2269,6 +2609,16 @@ dependencies = [ "wasi 0.11.0+wasi-snapshot-preview1", ] +[[package]] +name = "ghash" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" +dependencies = [ + "opaque-debug 0.3.0", + "polyval 0.5.3", +] + [[package]] name = "ghash" version = "0.5.0" @@ -2276,7 +2626,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" dependencies = [ "opaque-debug 0.3.0", - "polyval", + "polyval 0.6.1", ] [[package]] @@ -2292,9 +2642,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "glob" @@ -2304,15 +2654,15 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" +checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" dependencies = [ "aho-corasick", "bstr", - "fnv", "log", - "regex", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] @@ -2361,9 +2711,9 @@ dependencies = [ [[package]] name = "hash-db" -version = "0.15.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" +checksum = "8e7d7786361d7425ae2fe4f9e407eb0efaa0840f5212d109cc018c40c35c6ab4" [[package]] name = "hash256-std-hasher" @@ -2380,14 +2730,23 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash", + "ahash 0.7.7", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.6", ] [[package]] name = "hashbrown" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "heck" @@ -2422,6 +2781,15 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" +[[package]] +name = "hkdf" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +dependencies = [ + "hmac 0.12.1", +] + [[package]] name = "hmac" version = "0.8.1" @@ -2495,15 +2863,21 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", "pin-project-lite 0.2.13", ] +[[package]] +name = "http-range-header" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" + [[package]] name = "httparse" version = "1.8.0" @@ -2555,10 +2929,10 @@ dependencies = [ "http", "hyper", "log", - "rustls", + "rustls 0.20.9", "rustls-native-certs", "tokio", - "tokio-rustls", + "tokio-rustls 0.23.4", ] [[package]] @@ -2584,6 +2958,12 @@ dependencies = [ "cc", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "0.2.3" @@ -2597,9 +2977,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -2607,19 +2987,19 @@ dependencies = [ [[package]] name = "if-addrs" -version = "0.7.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc0fa01ffc752e9dbc72818cdb072cd028b86be5e09dd04c5a643704fe101a9" +checksum = "cabb0019d51a643781ff15c9c8a3e5dedc365c47211270f4e8f82812fedd8f0a" dependencies = [ "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] name = "if-watch" -version = "2.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065c008e570a43c00de6aed9714035e5ea6a498c255323db9091722af6ee67dd" +checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" dependencies = [ "async-io", "core-foundation", @@ -2630,6 +3010,7 @@ dependencies = [ "log", "rtnetlink", "system-configuration", + "tokio", "windows", ] @@ -2680,9 +3061,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.2", + "hashbrown 0.14.3", ] +[[package]] +name = "indexmap-nostd" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" + [[package]] name = "inout" version = "0.1.3" @@ -2711,10 +3098,23 @@ dependencies = [ ] [[package]] -name = "io-lifetimes" -version = "0.7.5" +name = "interceptor" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" +checksum = "1e8a11ae2da61704edada656798b61c94b35ecac2c58eb955156987d5e6be90b" +dependencies = [ + "async-trait", + "bytes", + "log", + "rand 0.8.5", + "rtcp", + "rtp", + "thiserror", + "tokio", + "waitgroup", + "webrtc-srtp", + "webrtc-util", +] [[package]] name = "io-lifetimes" @@ -2758,7 +3158,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.3", - "rustix 0.38.25", + "rustix 0.38.28", "windows-sys 0.48.0", ] @@ -2773,9 +3173,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "jobserver" @@ -2788,33 +3188,32 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.65" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] [[package]] name = "jsonrpsee" -version = "0.15.1" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd0d559d5e679b1ab2f869b486a11182923863b1b3ee8b421763cdd707b783a" +checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" dependencies = [ "jsonrpsee-core", - "jsonrpsee-http-server", "jsonrpsee-proc-macros", + "jsonrpsee-server", "jsonrpsee-types", "jsonrpsee-ws-client", - "jsonrpsee-ws-server", "tracing", ] [[package]] name = "jsonrpsee-client-transport" -version = "0.15.1" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8752740ecd374bcbf8b69f3e80b0327942df76f793f8d4e60d3355650c31fb74" +checksum = "c8b3815d9f5d5de348e5f162b316dc9cdf4548305ebb15b4eb9328e66cf27d7a" dependencies = [ "futures-util", "http", @@ -2825,17 +3224,17 @@ dependencies = [ "soketto", "thiserror", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", "tokio-util", "tracing", - "webpki-roots", + "webpki-roots 0.25.3", ] [[package]] name = "jsonrpsee-core" -version = "0.15.1" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3dc3e9cf2ba50b7b1d7d76a667619f82846caa39e8e8daa8a4962d74acaddca" +checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803" dependencies = [ "anyhow", "arrayvec 0.7.4", @@ -2846,10 +3245,8 @@ dependencies = [ "futures-timer", "futures-util", "globset", - "http", "hyper", "jsonrpsee-types", - "lazy_static", "parking_lot 0.12.1", "rand 0.8.5", "rustc-hash", @@ -2859,45 +3256,48 @@ dependencies = [ "thiserror", "tokio", "tracing", - "tracing-futures", - "unicase", ] [[package]] -name = "jsonrpsee-http-server" -version = "0.15.1" +name = "jsonrpsee-proc-macros" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" +dependencies = [ + "heck", + "proc-macro-crate 1.1.3", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "jsonrpsee-server" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03802f0373a38c2420c70b5144742d800b509e2937edc4afb116434f07120117" +checksum = "cf4d945a6008c9b03db3354fb3c83ee02d2faa9f2e755ec1dfb69c3551b8f4ba" dependencies = [ "futures-channel", "futures-util", + "http", "hyper", "jsonrpsee-core", "jsonrpsee-types", "serde", "serde_json", + "soketto", "tokio", + "tokio-stream", + "tokio-util", + "tower", "tracing", - "tracing-futures", -] - -[[package]] -name = "jsonrpsee-proc-macros" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd67957d4280217247588ac86614ead007b301ca2fa9f19c19f880a536f029e3" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", ] [[package]] name = "jsonrpsee-types" -version = "0.15.1" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e290bba767401b646812f608c099b922d8142603c9e73a50fb192d3ac86f4a0d" +checksum = "245ba8e5aa633dd1c1e4fae72bce06e71f42d34c14a2767c6b4d173b57bee5e5" dependencies = [ "anyhow", "beef", @@ -2909,9 +3309,9 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.15.1" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ee5feddd5188e62ac08fcf0e56478138e581509d4730f3f7be9b57dd402a4ff" +checksum = "4e1b3975ed5d73f456478681a417128597acd6a2487855fdb7b4a3d4d195bf5e" dependencies = [ "http", "jsonrpsee-client-transport", @@ -2919,26 +3319,6 @@ dependencies = [ "jsonrpsee-types", ] -[[package]] -name = "jsonrpsee-ws-server" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d488ba74fb369e5ab68926feb75a483458b88e768d44319f37e4ecad283c7325" -dependencies = [ - "futures-channel", - "futures-util", - "http", - "jsonrpsee-core", - "jsonrpsee-types", - "serde_json", - "soketto", - "tokio", - "tokio-stream", - "tokio-util", - "tracing", - "tracing-futures", -] - [[package]] name = "k256" version = "0.11.6" @@ -2962,35 +3342,31 @@ dependencies = [ [[package]] name = "kvdb" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585089ceadba0197ffe9af6740ab350b325e3c1f5fccfbc3522e0250c750409b" +checksum = "e7d770dcb02bf6835887c3a979b5107a04ff4bbde97a5f0928d27404a155add9" dependencies = [ - "parity-util-mem", "smallvec", ] [[package]] name = "kvdb-memorydb" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40d109c87bfb7759edd2a49b2649c1afe25af785d930ad6a38479b4dc70dd873" +checksum = "bf7a85fe66f9ff9cd74e169fdd2c94c6e1e74c412c99a73b4df3200b5d3760b2" dependencies = [ "kvdb", - "parity-util-mem", "parking_lot 0.12.1", ] [[package]] name = "kvdb-rocksdb" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c076cc2cdbac89b9910c853a36c957d3862a779f31c2661174222cefb49ee597" +checksum = "2182b8219fee6bd83aacaab7344e840179ae079d5216aa4e249b4d704646a844" dependencies = [ "kvdb", - "log", "num_cpus", - "parity-util-mem", "parking_lot 0.12.1", "regex", "rocksdb", @@ -3011,9 +3387,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.150" +version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" [[package]] name = "libloading" @@ -3033,17 +3409,16 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libp2p" -version = "0.49.0" +version = "0.50.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec878fda12ebec479186b3914ebc48ff180fa4c51847e11a1a68bf65249e02c1" +checksum = "9c7b0104790be871edcf97db9bd2356604984e623a08d825c3f27852290266b8" dependencies = [ "bytes", "futures 0.3.29", "futures-timer", "getrandom 0.2.11", "instant", - "lazy_static", - "libp2p-core", + "libp2p-core 0.38.0", "libp2p-dns", "libp2p-identify", "libp2p-kad", @@ -3052,14 +3427,15 @@ dependencies = [ "libp2p-mplex", "libp2p-noise", "libp2p-ping", + "libp2p-quic", "libp2p-request-response", "libp2p-swarm", - "libp2p-swarm-derive", "libp2p-tcp", "libp2p-wasm-ext", + "libp2p-webrtc", "libp2p-websocket", "libp2p-yamux", - "multiaddr", + "multiaddr 0.16.0", "parking_lot 0.12.1", "pin-project", "smallvec", @@ -3067,29 +3443,30 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.37.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799676bb0807c788065e57551c6527d461ad572162b0519d1958946ff9e0539d" +checksum = "b6a8fcd392ff67af6cc3f03b1426c41f7f26b6b9aff2dc632c1c56dd649e571f" dependencies = [ "asn1_der", - "bs58", - "ed25519-dalek", + "bs58 0.4.0", + "ed25519-dalek 1.0.1", "either", "fnv", "futures 0.3.29", "futures-timer", "instant", - "lazy_static", "log", - "multiaddr", - "multihash", + "multiaddr 0.16.0", + "multihash 0.16.3", "multistream-select", + "once_cell", "parking_lot 0.12.1", "pin-project", "prost", "prost-build", "rand 0.8.5", "rw-stream-sink", + "sec1", "sha2 0.10.8", "smallvec", "thiserror", @@ -3098,14 +3475,42 @@ dependencies = [ "zeroize", ] +[[package]] +name = "libp2p-core" +version = "0.39.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c1df63c0b582aa434fb09b2d86897fa2b419ffeccf934b36f87fcedc8e835c2" +dependencies = [ + "either", + "fnv", + "futures 0.3.29", + "futures-timer", + "instant", + "libp2p-identity", + "log", + "multiaddr 0.17.1", + "multihash 0.17.0", + "multistream-select", + "once_cell", + "parking_lot 0.12.1", + "pin-project", + "quick-protobuf", + "rand 0.8.5", + "rw-stream-sink", + "smallvec", + "thiserror", + "unsigned-varint", + "void", +] + [[package]] name = "libp2p-dns" -version = "0.37.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2322c9fb40d99101def6a01612ee30500c89abbbecb6297b3cd252903a4c1720" +checksum = "8e42a271c1b49f789b92f7fc87749fa79ce5c7bdc88cbdfacb818a4bca47fec5" dependencies = [ "futures 0.3.29", - "libp2p-core", + "libp2p-core 0.38.0", "log", "parking_lot 0.12.1", "smallvec", @@ -3114,14 +3519,14 @@ dependencies = [ [[package]] name = "libp2p-identify" -version = "0.40.0" +version = "0.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf9a121f699e8719bda2e6e9e9b6ddafc6cff4602471d6481c1067930ccb29b" +checksum = "c052d0026f4817b44869bfb6810f4e1112f43aec8553f2cb38881c524b563abf" dependencies = [ "asynchronous-codec", "futures 0.3.29", "futures-timer", - "libp2p-core", + "libp2p-core 0.38.0", "libp2p-swarm", "log", "lru", @@ -3133,11 +3538,29 @@ dependencies = [ "void", ] +[[package]] +name = "libp2p-identity" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" +dependencies = [ + "bs58 0.4.0", + "ed25519-dalek 2.1.0", + "log", + "multiaddr 0.17.1", + "multihash 0.17.0", + "quick-protobuf", + "rand 0.8.5", + "sha2 0.10.8", + "thiserror", + "zeroize", +] + [[package]] name = "libp2p-kad" -version = "0.41.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6721c200e2021f6c3fab8b6cf0272ead8912d871610ee194ebd628cecf428f22" +checksum = "2766dcd2be8c87d5e1f35487deb22d765f49c6ae1251b3633efe3b25698bd3d2" dependencies = [ "arrayvec 0.7.4", "asynchronous-codec", @@ -3147,7 +3570,7 @@ dependencies = [ "futures 0.3.29", "futures-timer", "instant", - "libp2p-core", + "libp2p-core 0.38.0", "libp2p-swarm", "log", "prost", @@ -3163,31 +3586,31 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.41.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "761704e727f7d68d58d7bc2231eafae5fc1b9814de24290f126df09d4bd37a15" +checksum = "04f378264aade9872d6ccd315c0accc18be3a35d15fc1b9c36e5b6f983b62b5b" dependencies = [ "data-encoding", - "dns-parser", "futures 0.3.29", "if-watch", - "libp2p-core", + "libp2p-core 0.38.0", "libp2p-swarm", "log", "rand 0.8.5", "smallvec", "socket2 0.4.10", "tokio", + "trust-dns-proto", "void", ] [[package]] name = "libp2p-metrics" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee31b08e78b7b8bfd1c4204a9dd8a87b4fcdf6dafc57eb51701c1c264a81cb9" +checksum = "5ad8a64f29da86005c86a4d2728b8a0719e9b192f4092b609fd8790acb9dec55" dependencies = [ - "libp2p-core", + "libp2p-core 0.38.0", "libp2p-identify", "libp2p-kad", "libp2p-ping", @@ -3197,14 +3620,14 @@ dependencies = [ [[package]] name = "libp2p-mplex" -version = "0.37.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692664acfd98652de739a8acbb0a0d670f1d67190a49be6b4395e22c37337d89" +checksum = "03805b44107aa013e7cbbfa5627b31c36cbedfdfb00603c0311998882bc4bace" dependencies = [ "asynchronous-codec", "bytes", "futures 0.3.29", - "libp2p-core", + "libp2p-core 0.38.0", "log", "nohash-hasher", "parking_lot 0.12.1", @@ -3215,53 +3638,75 @@ dependencies = [ [[package]] name = "libp2p-noise" -version = "0.40.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048155686bd81fe6cb5efdef0c6290f25ad32a0a42e8f4f72625cf6a505a206f" +checksum = "a978cb57efe82e892ec6f348a536bfbd9fee677adbe5689d7a93ad3a9bffbf2e" dependencies = [ "bytes", "curve25519-dalek 3.2.0", "futures 0.3.29", - "lazy_static", - "libp2p-core", + "libp2p-core 0.38.0", "log", + "once_cell", "prost", "prost-build", "rand 0.8.5", "sha2 0.10.8", "snow", "static_assertions", - "x25519-dalek", + "thiserror", + "x25519-dalek 1.1.1", "zeroize", ] [[package]] name = "libp2p-ping" -version = "0.40.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7228b9318d34689521349a86eb39a3c3a802c9efc99a0568062ffb80913e3f91" +checksum = "929fcace45a112536e22b3dcfd4db538723ef9c3cb79f672b98be2cc8e25f37f" dependencies = [ "futures 0.3.29", "futures-timer", "instant", - "libp2p-core", + "libp2p-core 0.38.0", "libp2p-swarm", "log", "rand 0.8.5", "void", ] +[[package]] +name = "libp2p-quic" +version = "0.7.0-alpha" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01e7c867e95c8130667b24409d236d37598270e6da69b3baf54213ba31ffca59" +dependencies = [ + "bytes", + "futures 0.3.29", + "futures-timer", + "if-watch", + "libp2p-core 0.38.0", + "libp2p-tls", + "log", + "parking_lot 0.12.1", + "quinn-proto", + "rand 0.8.5", + "rustls 0.20.9", + "thiserror", + "tokio", +] + [[package]] name = "libp2p-request-response" -version = "0.22.1" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8827af16a017b65311a410bb626205a9ad92ec0473967618425039fa5231adc1" +checksum = "3236168796727bfcf4927f766393415361e2c644b08bedb6a6b13d957c9a4884" dependencies = [ "async-trait", "bytes", "futures 0.3.29", "instant", - "libp2p-core", + "libp2p-core 0.38.0", "libp2p-swarm", "log", "rand 0.8.5", @@ -3271,29 +3716,31 @@ dependencies = [ [[package]] name = "libp2p-swarm" -version = "0.40.1" +version = "0.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46d13df7c37807965d82930c0e4b04a659efcb6cca237373b206043db5398ecf" +checksum = "b2a35472fe3276b3855c00f1c032ea8413615e030256429ad5349cdf67c6e1a0" dependencies = [ "either", "fnv", "futures 0.3.29", "futures-timer", "instant", - "libp2p-core", + "libp2p-core 0.38.0", + "libp2p-swarm-derive", "log", "pin-project", "rand 0.8.5", "smallvec", "thiserror", + "tokio", "void", ] [[package]] name = "libp2p-swarm-derive" -version = "0.30.1" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0eddc4497a8b5a506013c40e8189864f9c3a00db2b25671f428ae9007f3ba32" +checksum = "9d527d5827582abd44a6d80c07ff8b50b4ee238a8979e05998474179e79dc400" dependencies = [ "heck", "quote", @@ -3302,61 +3749,111 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.37.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9839d96761491c6d3e238e70554b856956fca0ab60feb9de2cd08eed4473fa92" +checksum = "b4b257baf6df8f2df39678b86c578961d48cc8b68642a12f0f763f56c8e5858d" dependencies = [ "futures 0.3.29", "futures-timer", "if-watch", "libc", - "libp2p-core", + "libp2p-core 0.38.0", "log", "socket2 0.4.10", "tokio", ] +[[package]] +name = "libp2p-tls" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" +dependencies = [ + "futures 0.3.29", + "futures-rustls", + "libp2p-core 0.39.2", + "libp2p-identity", + "rcgen 0.10.0", + "ring 0.16.20", + "rustls 0.20.9", + "thiserror", + "webpki 0.22.4", + "x509-parser 0.14.0", + "yasna", +] + [[package]] name = "libp2p-wasm-ext" -version = "0.37.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b5b8e7a73e379e47b1b77f8a82c4721e97eca01abcd18e9cd91a23ca6ce97" +checksum = "1bb1a35299860e0d4b3c02a3e74e3b293ad35ae0cee8a056363b0c862d082069" dependencies = [ "futures 0.3.29", "js-sys", - "libp2p-core", + "libp2p-core 0.38.0", "parity-send-wrapper", "wasm-bindgen", "wasm-bindgen-futures", ] +[[package]] +name = "libp2p-webrtc" +version = "0.4.0-alpha" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb6cd86dd68cba72308ea05de1cebf3ba0ae6e187c40548167955d4e3970f6a" +dependencies = [ + "async-trait", + "asynchronous-codec", + "bytes", + "futures 0.3.29", + "futures-timer", + "hex", + "if-watch", + "libp2p-core 0.38.0", + "libp2p-noise", + "log", + "multihash 0.16.3", + "prost", + "prost-build", + "prost-codec", + "rand 0.8.5", + "rcgen 0.9.3", + "serde", + "stun", + "thiserror", + "tinytemplate", + "tokio", + "tokio-util", + "webrtc", +] + [[package]] name = "libp2p-websocket" -version = "0.39.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3758ae6f89b2531a24b6d9f5776bda6a626b60a57600d7185d43dfa75ca5ecc4" +checksum = "1d705506030d5c0aaf2882437c70dab437605f21c5f9811978f694e6917a3b54" dependencies = [ "either", "futures 0.3.29", "futures-rustls", - "libp2p-core", + "libp2p-core 0.38.0", "log", "parking_lot 0.12.1", "quicksink", "rw-stream-sink", "soketto", "url", - "webpki-roots", + "webpki-roots 0.22.6", ] [[package]] name = "libp2p-yamux" -version = "0.41.1" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6874d66543c4f7e26e3b8ca9a6bead351563a13ab4fafd43c7927f7c0d6c12" +checksum = "4f63594a0aa818642d9d4915c791945053877253f08a3626f13416b5cd928a29" dependencies = [ "futures 0.3.29", - "libp2p-core", + "libp2p-core 0.38.0", "log", "parking_lot 0.12.1", "thiserror", @@ -3474,31 +3971,24 @@ dependencies = [ [[package]] name = "linregress" -version = "0.4.4" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c601a85f5ecd1aba625247bca0031585fb1c446461b142878a16f8245ddeb8" +checksum = "4de04dcecc58d366391f9920245b85ffa684558a5ef6e7736e754347c3aea9c2" dependencies = [ "nalgebra", - "statrs", ] [[package]] name = "linux-raw-sys" -version = "0.0.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" - -[[package]] -name = "linux-raw-sys" -version = "0.3.8" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "linux-raw-sys" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] name = "lock_api" @@ -3565,9 +4055,10 @@ dependencies = [ [[package]] name = "mainnet-runtime" -version = "1.4.1" +version = "1.4.3" dependencies = [ "frame-benchmarking", + "frame-benchmarking-pallet-pov", "frame-election-provider-support", "frame-executive", "frame-support", @@ -3585,12 +4076,15 @@ dependencies = [ "pallet-bags-list", "pallet-balances", "pallet-collective", + "pallet-contracts", + "pallet-contracts-primitives", "pallet-democracy", "pallet-election-provider-multi-phase", "pallet-elections-phragmen", "pallet-grandpa", "pallet-identity", "pallet-im-online", + "pallet-insecure-randomness-collective-flip", "pallet-membership", "pallet-multisig", "pallet-offences", @@ -3601,6 +4095,7 @@ dependencies = [ "pallet-session-benchmarking", "pallet-staking", "pallet-staking-reward-curve", + "pallet-staking-runtime-api", "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", @@ -3613,6 +4108,7 @@ dependencies = [ "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", + "sp-consensus-grandpa", "sp-core", "sp-inherents", "sp-io", @@ -3647,7 +4143,9 @@ version = "1.0.0" dependencies = [ "frame-support", "smallvec", + "sp-core", "sp-runtime", + "sp-weights", "ternoa-core-primitives", "ternoa-runtime-common", ] @@ -3683,6 +4181,16 @@ dependencies = [ "rawpointer", ] +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest 0.10.7", +] + [[package]] name = "memchr" version = "2.6.4" @@ -3695,7 +4203,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.25", + "rustix 0.38.28", ] [[package]] @@ -3727,13 +4235,11 @@ dependencies = [ [[package]] name = "memory-db" -version = "0.30.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ac11bb793c28fa095b7554466f53b3a60a2cd002afdac01bcf135cbd73a269" +checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" dependencies = [ "hash-db", - "hashbrown 0.12.3", - "parity-util-mem", ] [[package]] @@ -3771,9 +4277,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.9" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -3809,15 +4315,34 @@ dependencies = [ [[package]] name = "multiaddr" -version = "0.14.0" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aebdb21e90f81d13ed01dc84123320838e53963c2ca94b60b305d3fa64f31e" +dependencies = [ + "arrayref", + "byteorder", + "data-encoding", + "multibase", + "multihash 0.16.3", + "percent-encoding", + "serde", + "static_assertions", + "unsigned-varint", + "url", +] + +[[package]] +name = "multiaddr" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c580bfdd8803cce319b047d239559a22f809094aaea4ac13902a1fdcfcd4261" +checksum = "2b36f567c7099511fa8612bbbb52dda2419ce0bdbacf31714e3a5ffdb766d3bd" dependencies = [ "arrayref", - "bs58", "byteorder", "data-encoding", - "multihash", + "log", + "multibase", + "multihash 0.17.0", "percent-encoding", "serde", "static_assertions", @@ -3853,13 +4378,24 @@ dependencies = [ "unsigned-varint", ] +[[package]] +name = "multihash" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" +dependencies = [ + "core2", + "multihash-derive", + "unsigned-varint", +] + [[package]] name = "multihash-derive" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6d4752e6230d8ef7adf7bd5d8c4b1f6561c1014c5ba9a37445ccefe18aa1db" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro-error", "proc-macro2", "quote", @@ -3889,9 +4425,9 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.27.1" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "462fffe4002f4f2e1f6a9dcf12cc1a6fc0e15989014efc02a941d3e0f5dc2120" +checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" dependencies = [ "approx", "matrixmultiply", @@ -3899,17 +4435,15 @@ dependencies = [ "num-complex", "num-rational", "num-traits", - "rand 0.8.5", - "rand_distr", "simba", "typenum", ] [[package]] name = "nalgebra-macros" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" +checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" dependencies = [ "proc-macro2", "quote", @@ -3984,11 +4518,11 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" dependencies = [ - "async-io", "bytes", "futures 0.3.29", "libc", "log", + "tokio", ] [[package]] @@ -4000,23 +4534,7 @@ dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", -] - -[[package]] -name = "node-inspect" -version = "0.9.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" -dependencies = [ - "clap", - "parity-scale-codec", - "sc-cli", - "sc-client-api", - "sc-executor", - "sc-service", - "sp-blockchain", - "sp-core", - "sp-runtime", - "thiserror", + "memoffset 0.6.5", ] [[package]] @@ -4100,7 +4618,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", - "libm", ] [[package]] @@ -4135,19 +4652,37 @@ dependencies = [ ] [[package]] -name = "once_cell" -version = "1.18.0" +name = "oid-registry" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "38e20717fa0541f39bd146692035c37bedfa532b3e5071b35761082407546b2a" +dependencies = [ + "asn1-rs 0.3.1", +] [[package]] -name = "opaque-debug" -version = "0.2.3" +name = "oid-registry" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" +checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +dependencies = [ + "asn1-rs 0.5.2", +] [[package]] -name = "opaque-debug" +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + +[[package]] +name = "opaque-debug" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" @@ -4164,16 +4699,39 @@ version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" +[[package]] +name = "p256" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" +dependencies = [ + "ecdsa", + "elliptic-curve", + "sha2 0.10.8", +] + +[[package]] +name = "p384" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" +dependencies = [ + "ecdsa", + "elliptic-curve", + "sha2 0.10.8", +] + [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", + "sp-core", "sp-runtime", "sp-std", ] @@ -4181,7 +4739,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -4197,14 +4755,13 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-authorship", "sp-runtime", "sp-std", ] @@ -4212,7 +4769,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4236,7 +4793,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4256,7 +4813,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4271,24 +4828,77 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-contracts" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ + "bitflags 1.3.2", + "environmental", "frame-benchmarking", "frame-support", "frame-system", + "impl-trait-for-tuples", "log", + "pallet-contracts-primitives", + "pallet-contracts-proc-macro", "parity-scale-codec", + "rand 0.8.5", + "rand_pcg", "scale-info", + "serde", + "smallvec", + "sp-api", "sp-core", "sp-io", "sp-runtime", "sp-std", + "wasm-instrument 0.4.0", + "wasmi 0.20.0", + "wasmparser-nostd", +] + +[[package]] +name = "pallet-contracts-primitives" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" +dependencies = [ + "bitflags 1.3.2", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", + "sp-weights", +] + +[[package]] +name = "pallet-contracts-proc-macro" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4306,7 +4916,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4315,7 +4925,7 @@ dependencies = [ "log", "pallet-election-provider-support-benchmarking", "parity-scale-codec", - "rand 0.7.3", + "rand 0.8.5", "scale-info", "sp-arithmetic", "sp-core", @@ -4323,14 +4933,13 @@ dependencies = [ "sp-npos-elections", "sp-runtime", "sp-std", - "static_assertions", "strum", ] [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4343,7 +4952,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4361,7 +4970,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4372,8 +4981,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-application-crypto", + "sp-consensus-grandpa", "sp-core", - "sp-finality-grandpa", "sp-io", "sp-runtime", "sp-session", @@ -4384,7 +4993,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "enumflags2", "frame-benchmarking", @@ -4400,7 +5009,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4417,10 +5026,24 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-insecure-randomness-collective-flip" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "safe-mix", + "scale-info", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4437,7 +5060,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4453,7 +5076,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -4470,12 +5093,13 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-support", "frame-system", + "log", "pallet-babe", "pallet-balances", "pallet-grandpa", @@ -4493,7 +5117,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4510,7 +5134,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4521,12 +5145,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "sp-weights", ] [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -4547,14 +5172,14 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "pallet-session", "pallet-staking", - "rand 0.7.3", + "rand 0.8.5", "sp-runtime", "sp-session", "sp-std", @@ -4563,7 +5188,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4586,18 +5211,27 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "pallet-staking-runtime-api" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" +dependencies = [ + "parity-scale-codec", + "sp-api", +] + [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4615,7 +5249,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -4631,7 +5265,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -4647,7 +5281,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -4659,7 +5293,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4676,7 +5310,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4711,9 +5345,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.5" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -4726,11 +5360,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.5" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 2.0.1", "proc-macro2", "quote", "syn 1.0.109", @@ -4742,33 +5376,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" -[[package]] -name = "parity-util-mem" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d32c34f4f5ca7f9196001c0aba5a1f9a5a12382c8944b8b0f90233282d1e8f8" -dependencies = [ - "cfg-if", - "hashbrown 0.12.3", - "impl-trait-for-tuples", - "parity-util-mem-derive", - "parking_lot 0.12.1", - "primitive-types", - "smallvec", - "winapi", -] - -[[package]] -name = "parity-util-mem-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" -dependencies = [ - "proc-macro2", - "syn 1.0.109", - "synstructure", -] - [[package]] name = "parity-wasm" version = "0.45.0" @@ -4826,7 +5433,7 @@ dependencies = [ "libc", "redox_syscall 0.4.1", "smallvec", - "windows-targets", + "windows-targets 0.48.5", ] [[package]] @@ -4837,20 +5444,20 @@ checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pbkdf2" -version = "0.4.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" dependencies = [ - "crypto-mac 0.8.0", + "crypto-mac 0.11.1", ] [[package]] name = "pbkdf2" -version = "0.8.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ - "crypto-mac 0.11.1", + "digest 0.10.7", ] [[package]] @@ -4859,11 +5466,29 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "pem-rfc7468" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d159833a9105500e0398934e205e0773f0b27529557134ecfc51c27646adac" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" @@ -4896,7 +5521,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", ] [[package]] @@ -4937,7 +5562,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", ] [[package]] @@ -4959,24 +5584,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] -name = "piper" -version = "0.2.1" +name = "pkcs8" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" dependencies = [ - "atomic-waker", - "fastrand 2.0.1", - "futures-io", + "der 0.6.1", + "spki 0.6.0", ] [[package]] name = "pkcs8" -version = "0.9.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der", - "spki", + "der 0.7.8", + "spki 0.7.3", ] [[package]] @@ -4999,18 +5623,16 @@ checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" [[package]] name = "polling" -version = "2.8.0" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e" dependencies = [ - "autocfg", - "bitflags 1.3.2", "cfg-if", "concurrent-queue", - "libc", - "log", "pin-project-lite 0.2.13", - "windows-sys 0.48.0", + "rustix 0.38.28", + "tracing", + "windows-sys 0.52.0", ] [[package]] @@ -5021,7 +5643,19 @@ checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" dependencies = [ "cpufeatures", "opaque-debug 0.3.0", - "universal-hash", + "universal-hash 0.5.1", +] + +[[package]] +name = "polyval" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug 0.3.0", + "universal-hash 0.4.1", ] [[package]] @@ -5033,9 +5667,15 @@ dependencies = [ "cfg-if", "cpufeatures", "opaque-debug 0.3.0", - "universal-hash", + "universal-hash 0.5.1", ] +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -5105,6 +5745,16 @@ dependencies = [ "toml", ] +[[package]] +name = "proc-macro-crate" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" +dependencies = [ + "toml_datetime", + "toml_edit", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -5131,9 +5781,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] @@ -5209,9 +5859,9 @@ dependencies = [ [[package]] name = "prost-codec" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "011ae9ff8359df7915f97302d591cdd9e0e27fbd5a4ddc5bd13b71079bb20987" +checksum = "0dc34979ff898b6e141106178981ce2596c387ea6e62533facfc61a37fc879c0" dependencies = [ "asynchronous-codec", "bytes", @@ -5257,6 +5907,15 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quick-protobuf" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d6da84cc204722a989e01ba2f6e1e276e190f22263d0cb6ce8526fcdb0d2e1f" +dependencies = [ + "byteorder", +] + [[package]] name = "quicksink" version = "0.1.2" @@ -5268,6 +5927,24 @@ dependencies = [ "pin-project-lite 0.1.12", ] +[[package]] +name = "quinn-proto" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" +dependencies = [ + "bytes", + "rand 0.8.5", + "ring 0.16.20", + "rustc-hash", + "rustls 0.20.9", + "slab", + "thiserror", + "tinyvec", + "tracing", + "webpki 0.22.4", +] + [[package]] name = "quote" version = "1.0.33" @@ -5294,7 +5971,6 @@ dependencies = [ "rand_chacha 0.2.2", "rand_core 0.5.1", "rand_hc", - "rand_pcg 0.2.1", ] [[package]] @@ -5346,16 +6022,6 @@ dependencies = [ "getrandom 0.2.11", ] -[[package]] -name = "rand_distr" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" -dependencies = [ - "num-traits", - "rand 0.8.5", -] - [[package]] name = "rand_hc" version = "0.2.0" @@ -5365,15 +6031,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rand_pcg" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" -dependencies = [ - "rand_core 0.5.1", -] - [[package]] name = "rand_pcg" version = "0.3.1" @@ -5410,19 +6067,35 @@ dependencies = [ ] [[package]] -name = "redox_syscall" -version = "0.2.16" +name = "rcgen" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" dependencies = [ - "bitflags 1.3.2", + "pem", + "ring 0.16.20", + "time", + "x509-parser 0.13.2", + "yasna", +] + +[[package]] +name = "rcgen" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" +dependencies = [ + "pem", + "ring 0.16.20", + "time", + "yasna", ] [[package]] name = "redox_syscall" -version = "0.3.5" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ "bitflags 1.3.2", ] @@ -5464,14 +6137,14 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", ] [[package]] name = "regalloc2" -version = "0.3.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d43a209257d978ef079f3d446331d0f1794f5e0fc19b306a199983857833a779" +checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c" dependencies = [ "fxhash", "log", @@ -5523,6 +6196,18 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +[[package]] +name = "region" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76e189c2369884dce920945e2ddf79b3dff49e071a167dd1817fa9c4c00d512e" +dependencies = [ + "bitflags 1.3.2", + "libc", + "mach", + "winapi", +] + [[package]] name = "resolv-conf" version = "0.7.0" @@ -5561,9 +6246,9 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.5" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", "getrandom 0.2.11", @@ -5594,19 +6279,30 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "rtcp" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1919efd6d4a6a85d13388f9487549bb8e359f17198cc03ffd72f79b553873691" +dependencies = [ + "bytes", + "thiserror", + "webrtc-util", +] + [[package]] name = "rtnetlink" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" dependencies = [ - "async-global-executor", "futures 0.3.29", "log", "netlink-packet-route", "netlink-proto", "nix", "thiserror", + "tokio", ] [[package]] @@ -5620,8 +6316,22 @@ dependencies = [ ] [[package]] -name = "rustc-demangle" -version = "0.1.23" +name = "rtp" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2a095411ff00eed7b12e4c6a118ba984d113e1079582570d56a5ee723f11f80" +dependencies = [ + "async-trait", + "bytes", + "rand 0.8.5", + "serde", + "thiserror", + "webrtc-util", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" @@ -5637,6 +6347,15 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver 0.9.0", +] + [[package]] name = "rustc_version" version = "0.4.0" @@ -5647,44 +6366,52 @@ dependencies = [ ] [[package]] -name = "rustix" -version = "0.35.16" +name = "rusticata-macros" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5363f616a5244fd47fc1dd0a0b24c28a5c0154f5010c16332a7ad6f78f2e8b62" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" dependencies = [ - "bitflags 1.3.2", - "errno 0.2.8", - "io-lifetimes 0.7.5", - "libc", - "linux-raw-sys 0.0.46", - "windows-sys 0.42.0", + "nom", ] [[package]] name = "rustix" -version = "0.37.27" +version = "0.36.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" +checksum = "305efbd14fde4139eb501df5f136994bb520b033fa9fbdce287507dc23b8c7ed" dependencies = [ "bitflags 1.3.2", - "errno 0.3.7", - "io-lifetimes 1.0.11", + "errno", + "io-lifetimes", "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", + "linux-raw-sys 0.1.4", + "windows-sys 0.45.0", ] [[package]] name = "rustix" -version = "0.38.25" +version = "0.38.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" dependencies = [ "bitflags 2.4.1", - "errno 0.3.7", + "errno", "libc", - "linux-raw-sys 0.4.11", - "windows-sys 0.48.0", + "linux-raw-sys 0.4.12", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +dependencies = [ + "base64 0.13.1", + "log", + "ring 0.16.20", + "sct 0.6.1", + "webpki 0.21.4", ] [[package]] @@ -5695,8 +6422,20 @@ checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", "ring 0.16.20", - "sct", - "webpki", + "sct 0.7.1", + "webpki 0.22.4", +] + +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "log", + "ring 0.17.7", + "rustls-webpki", + "sct 0.7.1", ] [[package]] @@ -5720,6 +6459,16 @@ dependencies = [ "base64 0.21.5", ] +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.7", + "untrusted 0.9.0", +] + [[package]] name = "rustversion" version = "1.0.14" @@ -5739,9 +6488,27 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" + +[[package]] +name = "safe-mix" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d3d055a2582e6b00ed7a31c1524040aa391092bf636328350813f3a0605215c" +dependencies = [ + "rustc_version 0.2.3", +] + +[[package]] +name = "safe_arch" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" +dependencies = [ + "bytemuck", +] [[package]] name = "same-file" @@ -5755,7 +6522,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "log", "sp-core", @@ -5763,37 +6530,10 @@ dependencies = [ "thiserror", ] -[[package]] -name = "sc-authority-discovery" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" -dependencies = [ - "async-trait", - "futures 0.3.29", - "futures-timer", - "ip_network", - "libp2p", - "log", - "parity-scale-codec", - "prost", - "prost-build", - "rand 0.7.3", - "sc-client-api", - "sc-network-common", - "sp-api", - "sp-authority-discovery", - "sp-blockchain", - "sp-core", - "sp-keystore", - "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", -] - [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures 0.3.29", "futures-timer", @@ -5816,7 +6556,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -5826,32 +6566,33 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-state-machine", ] [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "impl-trait-for-tuples", "memmap2", - "parity-scale-codec", "sc-chain-spec-derive", - "sc-network-common", + "sc-client-api", + "sc-executor", + "sc-network", "sc-telemetry", "serde", "serde_json", + "sp-blockchain", "sp-core", "sp-runtime", + "sp-state-machine", ] [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn 1.0.109", @@ -5860,7 +6601,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes", "chrono", @@ -5871,7 +6612,7 @@ dependencies = [ "log", "names", "parity-scale-codec", - "rand 0.7.3", + "rand 0.8.5", "regex", "rpassword", "sc-client-api", @@ -5900,11 +6641,10 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "fnv", "futures 0.3.29", - "hash-db", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -5921,14 +6661,13 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-storage", - "sp-trie", "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "hash-db", "kvdb", @@ -5941,6 +6680,7 @@ dependencies = [ "parking_lot 0.12.1", "sc-client-api", "sc-state-db", + "schnellru", "sp-arithmetic", "sp-blockchain", "sp-core", @@ -5953,13 +6693,14 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures 0.3.29", "futures-timer", "libp2p", "log", + "mockall", "parking_lot 0.12.1", "sc-client-api", "sc-utils", @@ -5977,7 +6718,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "fork-tree", @@ -5995,8 +6736,8 @@ dependencies = [ "sc-consensus-slots", "sc-keystore", "sc-telemetry", + "scale-info", "schnorrkel", - "serde", "sp-api", "sp-application-crypto", "sp-block-builder", @@ -6007,10 +6748,8 @@ dependencies = [ "sp-consensus-vrf", "sp-core", "sp-inherents", - "sp-io", "sp-keystore", "sp-runtime", - "sp-version", "substrate-prometheus-endpoint", "thiserror", ] @@ -6018,7 +6757,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures 0.3.29", "jsonrpsee", @@ -6040,7 +6779,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "fork-tree", "parity-scale-codec", @@ -6051,46 +6790,93 @@ dependencies = [ ] [[package]] -name = "sc-consensus-slots" +name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ + "ahash 0.8.6", + "array-bytes", "async-trait", + "dyn-clone", + "finality-grandpa", + "fork-tree", "futures 0.3.29", "futures-timer", "log", "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "sc-block-builder", + "sc-chain-spec", "sc-client-api", "sc-consensus", + "sc-network", + "sc-network-common", + "sc-network-gossip", "sc-telemetry", + "sc-utils", + "serde_json", + "sp-api", + "sp-application-crypto", "sp-arithmetic", "sp-blockchain", "sp-consensus", - "sp-consensus-slots", + "sp-consensus-grandpa", "sp-core", - "sp-inherents", + "sp-keystore", "sp-runtime", - "sp-state-machine", + "substrate-prometheus-endpoint", "thiserror", ] [[package]] -name = "sc-consensus-uncles" +name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ + "finality-grandpa", + "futures 0.3.29", + "jsonrpsee", + "log", + "parity-scale-codec", "sc-client-api", - "sp-authorship", + "sc-consensus-grandpa", + "sc-rpc", + "serde", + "sp-blockchain", + "sp-core", "sp-runtime", "thiserror", ] +[[package]] +name = "sc-consensus-slots" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" +dependencies = [ + "async-trait", + "futures 0.3.29", + "futures-timer", + "log", + "parity-scale-codec", + "sc-client-api", + "sc-consensus", + "sc-telemetry", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", +] + [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "lazy_static", "lru", "parity-scale-codec", "parking_lot 0.12.1", @@ -6099,7 +6885,6 @@ dependencies = [ "sc-executor-wasmtime", "sp-api", "sp-core", - "sp-core-hashing-proc-macro", "sp-externalities", "sp-io", "sp-panic-handler", @@ -6108,135 +6893,65 @@ dependencies = [ "sp-version", "sp-wasm-interface", "tracing", - "wasmi", + "wasmi 0.13.2", ] [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "environmental", - "parity-scale-codec", "sc-allocator", "sp-maybe-compressed-blob", - "sp-sandbox", "sp-wasm-interface", "thiserror", - "wasm-instrument", - "wasmi", + "wasm-instrument 0.3.0", + "wasmi 0.13.2", ] [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "log", - "parity-scale-codec", "sc-allocator", "sc-executor-common", "sp-runtime-interface", - "sp-sandbox", "sp-wasm-interface", - "wasmi", + "wasmi 0.13.2", ] [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ + "anyhow", "cfg-if", "libc", "log", "once_cell", - "parity-scale-codec", - "parity-wasm", - "rustix 0.35.16", + "rustix 0.36.17", "sc-allocator", "sc-executor-common", "sp-runtime-interface", - "sp-sandbox", "sp-wasm-interface", "wasmtime", ] -[[package]] -name = "sc-finality-grandpa" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" -dependencies = [ - "ahash", - "array-bytes", - "async-trait", - "dyn-clone", - "finality-grandpa", - "fork-tree", - "futures 0.3.29", - "futures-timer", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "rand 0.8.5", - "sc-block-builder", - "sc-chain-spec", - "sc-client-api", - "sc-consensus", - "sc-keystore", - "sc-network", - "sc-network-common", - "sc-network-gossip", - "sc-telemetry", - "sc-utils", - "serde_json", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-finality-grandpa", - "sp-keystore", - "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", -] - -[[package]] -name = "sc-finality-grandpa-rpc" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" -dependencies = [ - "finality-grandpa", - "futures 0.3.29", - "jsonrpsee", - "log", - "parity-scale-codec", - "sc-client-api", - "sc-finality-grandpa", - "sc-rpc", - "serde", - "serde_json", - "sp-blockchain", - "sp-core", - "sp-runtime", - "thiserror", -] - [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "ansi_term", "futures 0.3.29", "futures-timer", "log", - "parity-util-mem", "sc-client-api", + "sc-network", "sc-network-common", - "sc-transaction-pool-api", "sp-blockchain", "sp-runtime", ] @@ -6244,7 +6959,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes", "async-trait", @@ -6259,30 +6974,27 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes", + "async-channel", "async-trait", "asynchronous-codec", - "bitflags 1.3.2", "bytes", - "cid", "either", "fnv", - "fork-tree", "futures 0.3.29", "futures-timer", "ip_network", "libp2p", - "linked-hash-map", "linked_hash_set", "log", "lru", + "mockall", "parity-scale-codec", "parking_lot 0.12.1", "pin-project", - "prost", - "rand 0.7.3", + "rand 0.8.5", "sc-block-builder", "sc-client-api", "sc-consensus", @@ -6306,7 +7018,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "cid", "futures 0.3.29", @@ -6315,51 +7027,54 @@ dependencies = [ "prost", "prost-build", "sc-client-api", + "sc-network", "sc-network-common", "sp-blockchain", "sp-runtime", "thiserror", "unsigned-varint", - "void", ] [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ + "array-bytes", "async-trait", "bitflags 1.3.2", "bytes", "futures 0.3.29", "futures-timer", "libp2p", - "linked_hash_set", "parity-scale-codec", "prost-build", "sc-consensus", "sc-peerset", + "sc-utils", "serde", "smallvec", "sp-blockchain", "sp-consensus", - "sp-finality-grandpa", + "sp-consensus-grandpa", "sp-runtime", "substrate-prometheus-endpoint", "thiserror", + "zeroize", ] [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "ahash", + "ahash 0.8.6", "futures 0.3.29", "futures-timer", "libp2p", "log", "lru", + "sc-network", "sc-network-common", "sc-peerset", "sp-runtime", @@ -6370,7 +7085,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes", "futures 0.3.29", @@ -6380,6 +7095,7 @@ dependencies = [ "prost", "prost-build", "sc-client-api", + "sc-network", "sc-network-common", "sc-peerset", "sp-blockchain", @@ -6391,12 +7107,13 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes", "async-trait", "fork-tree", "futures 0.3.29", + "futures-timer", "libp2p", "log", "lru", @@ -6406,6 +7123,7 @@ dependencies = [ "prost-build", "sc-client-api", "sc-consensus", + "sc-network", "sc-network-common", "sc-peerset", "sc-utils", @@ -6413,26 +7131,28 @@ dependencies = [ "sp-arithmetic", "sp-blockchain", "sp-consensus", + "sp-consensus-grandpa", "sp-core", - "sp-finality-grandpa", "sp-runtime", + "substrate-prometheus-endpoint", "thiserror", ] [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes", "futures 0.3.29", - "hex", "libp2p", "log", "parity-scale-codec", "pin-project", + "sc-network", "sc-network-common", "sc-peerset", + "sc-utils", "sp-consensus", "sp-runtime", "substrate-prometheus-endpoint", @@ -6441,7 +7161,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes", "bytes", @@ -6455,8 +7175,9 @@ dependencies = [ "once_cell", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.7.3", + "rand 0.8.5", "sc-client-api", + "sc-network", "sc-network-common", "sc-peerset", "sc-utils", @@ -6471,7 +7192,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures 0.3.29", "libp2p", @@ -6484,7 +7205,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -6493,10 +7214,9 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures 0.3.29", - "hash-db", "jsonrpsee", "log", "parity-scale-codec", @@ -6518,18 +7238,16 @@ dependencies = [ "sp-runtime", "sp-session", "sp-version", + "tokio", ] [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "futures 0.3.29", "jsonrpsee", - "log", "parity-scale-codec", - "parking_lot 0.12.1", "sc-chain-spec", "sc-transaction-pool-api", "scale-info", @@ -6538,7 +7256,6 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", - "sp-tracing", "sp-version", "thiserror", ] @@ -6546,53 +7263,60 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "futures 0.3.29", + "http", "jsonrpsee", "log", "serde_json", "substrate-prometheus-endpoint", "tokio", + "tower", + "tower-http", ] [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ + "array-bytes", "futures 0.3.29", + "futures-util", "hex", "jsonrpsee", + "log", "parity-scale-codec", + "parking_lot 0.12.1", "sc-chain-spec", + "sc-client-api", "sc-transaction-pool-api", "serde", "sp-api", "sp-blockchain", "sp-core", "sp-runtime", + "sp-version", "thiserror", + "tokio-stream", ] [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "directories", "exit-future", "futures 0.3.29", "futures-timer", - "hash-db", "jsonrpsee", "log", "parity-scale-codec", - "parity-util-mem", "parking_lot 0.12.1", "pin-project", - "rand 0.7.3", + "rand 0.8.5", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -6611,6 +7335,7 @@ dependencies = [ "sc-rpc", "sc-rpc-server", "sc-rpc-spec-v2", + "sc-storage-monitor", "sc-sysinfo", "sc-telemetry", "sc-tracing", @@ -6620,19 +7345,15 @@ dependencies = [ "serde", "serde_json", "sp-api", - "sp-application-crypto", - "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-core", "sp-externalities", - "sp-inherents", "sp-keystore", "sp-runtime", "sp-session", "sp-state-machine", "sp-storage", - "sp-tracing", "sp-transaction-pool", "sp-transaction-storage-proof", "sp-trie", @@ -6649,21 +7370,34 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "log", "parity-scale-codec", - "parity-util-mem", - "parity-util-mem-derive", "parking_lot 0.12.1", - "sc-client-api", "sp-core", ] +[[package]] +name = "sc-storage-monitor" +version = "0.1.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" +dependencies = [ + "clap", + "fs4", + "futures 0.3.29", + "log", + "sc-client-db", + "sc-utils", + "sp-core", + "thiserror", + "tokio", +] + [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -6671,7 +7405,7 @@ dependencies = [ "sc-client-api", "sc-consensus-babe", "sc-consensus-epochs", - "sc-finality-grandpa", + "sc-consensus-grandpa", "serde", "serde_json", "sp-blockchain", @@ -6682,13 +7416,13 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures 0.3.29", "libc", "log", - "rand 0.7.3", - "rand_pcg 0.2.1", + "rand 0.8.5", + "rand_pcg", "regex", "sc-telemetry", "serde", @@ -6701,7 +7435,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "chrono", "futures 0.3.29", @@ -6709,7 +7443,8 @@ dependencies = [ "log", "parking_lot 0.12.1", "pin-project", - "rand 0.7.3", + "rand 0.8.5", + "sc-utils", "serde", "serde_json", "thiserror", @@ -6719,7 +7454,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "ansi_term", "atty", @@ -6750,9 +7485,9 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn 1.0.109", @@ -6761,15 +7496,15 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures 0.3.29", "futures-timer", "linked-hash-map", "log", + "num-traits", "parity-scale-codec", - "parity-util-mem", "parking_lot 0.12.1", "sc-client-api", "sc-transaction-pool-api", @@ -6788,7 +7523,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures 0.3.29", @@ -6802,14 +7537,16 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ + "async-channel", "futures 0.3.29", "futures-timer", "lazy_static", "log", "parking_lot 0.12.1", "prometheus", + "sp-arithmetic", ] [[package]] @@ -6832,7 +7569,7 @@ version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn 1.0.109", @@ -6847,6 +7584,17 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "schnellru" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" +dependencies = [ + "ahash 0.8.6", + "cfg-if", + "hashbrown 0.13.2", +] + [[package]] name = "schnorrkel" version = "0.9.1" @@ -6877,16 +7625,38 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152" +[[package]] +name = "sct" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" +dependencies = [ + "ring 0.16.20", + "untrusted 0.7.1", +] + [[package]] name = "sct" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.5", + "ring 0.17.7", "untrusted 0.9.0", ] +[[package]] +name = "sdp" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d22a5ef407871893fd72b4562ee15e4742269b173959db4b8df6f538c414e13" +dependencies = [ + "rand 0.8.5", + "substring", + "thiserror", + "url", +] + [[package]] name = "sec1" version = "0.3.0" @@ -6894,9 +7664,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ "base16ct", - "der", + "der 0.6.1", "generic-array 0.14.7", - "pkcs8", + "pkcs8 0.9.0", "subtle", "zeroize", ] @@ -6960,6 +7730,15 @@ dependencies = [ "semver-parser", ] +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + [[package]] name = "semver" version = "1.0.20" @@ -6977,22 +7756,22 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.192" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.192" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", ] [[package]] @@ -7006,15 +7785,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_nanos" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae801b7733ca8d6a2b580debe99f67f36826a0f5b8a36055dc6bc40f8d6bc71" -dependencies = [ - "serde", -] - [[package]] name = "sha-1" version = "0.9.8" @@ -7028,6 +7798,17 @@ dependencies = [ "opaque-debug 0.3.0", ] +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + [[package]] name = "sha2" version = "0.8.2" @@ -7108,16 +7889,26 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "simba" -version = "0.5.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e82063457853d00243beda9952e910b82593e4b07ae9f721b9278a99a0d3d5c" +checksum = "061507c94fc6ab4ba1c9a0305018408e312e17c041eb63bef8aa726fa33aceae" dependencies = [ "approx", "num-complex", "num-traits", "paste", + "wide", ] [[package]] @@ -7149,9 +7940,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "snap" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" +checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" [[package]] name = "snow" @@ -7159,13 +7950,13 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58021967fd0a5eeeb23b08df6cc244a4d4a5b4aec1d27c9e02fad1a58b4cd74e" dependencies = [ - "aes-gcm", + "aes-gcm 0.10.3", "blake2", "chacha20poly1305", "curve25519-dalek 4.1.1", "rand_core 0.6.4", - "ring 0.17.5", - "rustc_version", + "ring 0.17.7", + "rustc_version 0.4.0", "sha2 0.10.8", "subtle", ] @@ -7200,6 +7991,7 @@ dependencies = [ "bytes", "flate2", "futures 0.3.29", + "http", "httparse", "log", "rand 0.8.5", @@ -7209,7 +8001,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "hash-db", "log", @@ -7227,10 +8019,12 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ + "Inflector", "blake2", - "proc-macro-crate", + "expander", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn 1.0.109", @@ -7239,7 +8033,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", @@ -7252,14 +8046,13 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "integer-sqrt", "num-traits", "parity-scale-codec", "scale-info", "serde", - "sp-debug-derive", "sp-std", "static_assertions", ] @@ -7267,7 +8060,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", @@ -7277,22 +8070,10 @@ dependencies = [ "sp-std", ] -[[package]] -name = "sp-authorship" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" -dependencies = [ - "async-trait", - "parity-scale-codec", - "sp-inherents", - "sp-runtime", - "sp-std", -] - [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "sp-api", @@ -7304,7 +8085,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures 0.3.29", "log", @@ -7322,26 +8103,40 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures 0.3.29", - "futures-timer", "log", - "parity-scale-codec", "sp-core", "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-std", - "sp-version", "thiserror", ] +[[package]] +name = "sp-consensus-aura" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-consensus", + "sp-consensus-slots", + "sp-inherents", + "sp-runtime", + "sp-std", + "sp-timestamp", +] + [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "merlin", @@ -7361,16 +8156,32 @@ dependencies = [ "sp-timestamp", ] +[[package]] +name = "sp-consensus-grandpa" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" +dependencies = [ + "finality-grandpa", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-keystore", + "sp-runtime", + "sp-std", +] + [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", - "sp-runtime", "sp-std", "sp-timestamp", ] @@ -7378,7 +8189,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", @@ -7391,13 +8202,13 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes", "base58", "bitflags 1.3.2", "blake2", - "byteorder", + "bounded-collections", "dyn-clonable", "ed25519-zebra", "futures 0.3.29", @@ -7408,11 +8219,10 @@ dependencies = [ "libsecp256k1", "log", "merlin", - "num-traits", "parity-scale-codec", "parking_lot 0.12.1", "primitive-types", - "rand 0.7.3", + "rand 0.8.5", "regex", "scale-info", "schnorrkel", @@ -7429,16 +8239,15 @@ dependencies = [ "substrate-bip39", "thiserror", "tiny-bip39", - "wasmi", "zeroize", ] [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "blake2", + "blake2b_simd", "byteorder", "digest 0.10.7", "sha2 0.10.8", @@ -7450,7 +8259,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "proc-macro2", "quote", @@ -7461,7 +8270,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -7470,7 +8279,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "proc-macro2", "quote", @@ -7480,7 +8289,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "environmental", "parity-scale-codec", @@ -7488,32 +8297,15 @@ dependencies = [ "sp-storage", ] -[[package]] -name = "sp-finality-grandpa" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" -dependencies = [ - "finality-grandpa", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-keystore", - "sp-runtime", - "sp-std", -] - [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", + "scale-info", "sp-core", "sp-runtime", "sp-std", @@ -7523,16 +8315,15 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "bytes", - "ed25519-dalek", + "ed25519 1.5.3", + "ed25519-dalek 1.0.1", "futures 0.3.29", - "hash-db", "libsecp256k1", "log", "parity-scale-codec", - "parking_lot 0.12.1", "secp256k1", "sp-core", "sp-externalities", @@ -7542,7 +8333,6 @@ dependencies = [ "sp-std", "sp-tracing", "sp-trie", - "sp-wasm-interface", "tracing", "tracing-core", ] @@ -7550,7 +8340,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "lazy_static", "sp-core", @@ -7561,7 +8351,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures 0.3.29", @@ -7578,7 +8368,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "thiserror", "zstd", @@ -7587,7 +8377,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", @@ -7601,7 +8391,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "sp-api", "sp-core", @@ -7611,7 +8401,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "backtrace", "lazy_static", @@ -7621,7 +8411,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "rustc-hash", "serde", @@ -7631,16 +8421,15 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "either", "hash256-std-hasher", "impl-trait-for-tuples", "log", "parity-scale-codec", - "parity-util-mem", "paste", - "rand 0.7.3", + "rand 0.8.5", "scale-info", "serde", "sp-application-crypto", @@ -7654,7 +8443,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -7672,33 +8461,19 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "Inflector", - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn 1.0.109", ] -[[package]] -name = "sp-sandbox" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" -dependencies = [ - "log", - "parity-scale-codec", - "sp-core", - "sp-io", - "sp-std", - "sp-wasm-interface", - "wasmi", -] - [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", @@ -7712,10 +8487,11 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", + "sp-core", "sp-runtime", "sp-std", ] @@ -7723,14 +8499,13 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "hash-db", "log", - "num-traits", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.7.3", + "rand 0.8.5", "smallvec", "sp-core", "sp-externalities", @@ -7739,18 +8514,17 @@ dependencies = [ "sp-trie", "thiserror", "tracing", - "trie-root", ] [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "impl-serde", "parity-scale-codec", @@ -7763,13 +8537,12 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures-timer", "log", "parity-scale-codec", - "sp-api", "sp-inherents", "sp-runtime", "sp-std", @@ -7779,7 +8552,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "sp-std", @@ -7791,7 +8564,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "sp-api", "sp-runtime", @@ -7800,7 +8573,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "log", @@ -7816,18 +8589,18 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "ahash", + "ahash 0.8.6", "hash-db", "hashbrown 0.12.3", "lazy_static", - "lru", "memory-db", "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", "scale-info", + "schnellru", "sp-core", "sp-std", "thiserror", @@ -7839,7 +8612,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "impl-serde", "parity-scale-codec", @@ -7856,7 +8629,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -7867,22 +8640,22 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ + "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", "sp-std", - "wasmi", + "wasmi 0.13.2", "wasmtime", ] [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "serde", @@ -7912,7 +8685,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" dependencies = [ "base64ct", - "der", + "der 0.6.1", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der 0.7.8", ] [[package]] @@ -7970,19 +8753,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "statrs" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05bdbb8e4e78216a85785a85d3ec3183144f98d0097b9281802c019bb07a6f05" -dependencies = [ - "approx", - "lazy_static", - "nalgebra", - "num-traits", - "rand 0.8.5", -] - [[package]] name = "strsim" version = "0.10.0" @@ -8011,6 +8781,25 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "stun" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7e94b1ec00bad60e6410e058b52f1c66de3dc5fe4d62d09b3e52bb7d3b73e25" +dependencies = [ + "base64 0.13.1", + "crc", + "lazy_static", + "md-5", + "rand 0.8.5", + "ring 0.16.20", + "subtle", + "thiserror", + "tokio", + "url", + "webrtc-util", +] + [[package]] name = "substrate-bip39" version = "0.4.5" @@ -8027,7 +8816,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "platforms 2.0.0", ] @@ -8035,17 +8824,15 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.29", "jsonrpsee", "log", "parity-scale-codec", - "sc-client-api", "sc-rpc-api", "sc-transaction-pool-api", - "serde_json", "sp-api", "sp-block-builder", "sp-blockchain", @@ -8056,9 +8843,8 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "futures-util", "hyper", "log", "prometheus", @@ -8069,7 +8855,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "jsonrpsee", @@ -8079,31 +8865,10 @@ dependencies = [ "sp-runtime", ] -[[package]] -name = "substrate-state-trie-migration-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" -dependencies = [ - "jsonrpsee", - "log", - "parity-scale-codec", - "sc-client-api", - "sc-rpc-api", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-trie", - "trie-db", -] - [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "ansi_term", "build-helper", @@ -8117,6 +8882,15 @@ dependencies = [ "wasm-opt", ] +[[package]] +name = "substring" +version = "1.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ee6433ecef213b2e72f587ef64a2f5943e7cd16fbd82dbe8bc07486c534c86" +dependencies = [ + "autocfg", +] + [[package]] name = "subtle" version = "2.4.1" @@ -8136,9 +8910,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.39" +version = "2.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "13fa70a4ee923979ffb522cacce59d34421ebdea5625e1073c4326ef9d2dd42e" dependencies = [ "proc-macro2", "quote", @@ -8197,9 +8971,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ "cfg-if", - "fastrand 2.0.1", + "fastrand", "redox_syscall 0.4.1", - "rustix 0.38.25", + "rustix 0.38.28", "windows-sys 0.48.0", ] @@ -8219,15 +8993,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] -name = "ternoa" -version = "1.4.1" -dependencies = [ - "ternoa-cli", -] - -[[package]] -name = "ternoa-auction" -version = "1.0.2" +name = "ternoa-auction" +version = "1.0.2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8271,26 +9038,9 @@ dependencies = [ "sp-std", ] -[[package]] -name = "ternoa-cli" -version = "1.4.1" -dependencies = [ - "clap", - "frame-benchmarking-cli", - "frame-try-runtime", - "node-inspect", - "sc-cli", - "sc-finality-grandpa", - "sc-service", - "substrate-build-script-utils", - "ternoa-client", - "ternoa-service", - "try-runtime-cli", -] - [[package]] name = "ternoa-client" -version = "1.4.1" +version = "1.4.3" dependencies = [ "alphanet-runtime", "frame-benchmarking", @@ -8310,8 +9060,8 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-consensus-babe", + "sp-consensus-grandpa", "sp-core", - "sp-finality-grandpa", "sp-inherents", "sp-keyring", "sp-offchain", @@ -8338,7 +9088,7 @@ dependencies = [ [[package]] name = "ternoa-core-primitives" -version = "1.4.1" +version = "1.4.3" dependencies = [ "sp-core", "sp-runtime", @@ -8411,6 +9161,73 @@ dependencies = [ "ternoa-tee", ] +[[package]] +name = "ternoa-node" +version = "1.4.3" +dependencies = [ + "alphanet-runtime", + "clap", + "frame-benchmarking", + "frame-benchmarking-cli", + "frame-system", + "futures 0.3.29", + "hex-literal", + "jsonrpsee", + "log", + "pallet-im-online", + "pallet-staking", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc", + "rand 0.8.5", + "sc-basic-authorship", + "sc-chain-spec", + "sc-cli", + "sc-client-api", + "sc-consensus", + "sc-consensus-babe", + "sc-consensus-babe-rpc", + "sc-consensus-epochs", + "sc-consensus-grandpa", + "sc-consensus-grandpa-rpc", + "sc-consensus-slots", + "sc-executor", + "sc-keystore", + "sc-network", + "sc-network-common", + "sc-network-sync", + "sc-rpc", + "sc-rpc-api", + "sc-rpc-spec-v2", + "sc-service", + "sc-storage-monitor", + "sc-sync-state-rpc", + "sc-sysinfo", + "sc-telemetry", + "sc-transaction-pool", + "sc-transaction-pool-api", + "serde", + "sp-api", + "sp-authority-discovery", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-consensus-grandpa", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keyring", + "sp-keystore", + "sp-runtime", + "sp-timestamp", + "sp-transaction-storage-proof", + "substrate-build-script-utils", + "substrate-frame-rpc-system", + "ternoa-core-primitives", + "ternoa-runtime-common", + "try-runtime-cli", +] + [[package]] name = "ternoa-pallets-primitives" version = "1.0.2" @@ -8453,7 +9270,7 @@ dependencies = [ [[package]] name = "ternoa-runtime-common" -version = "1.4.1" +version = "1.4.3" dependencies = [ "frame-election-provider-support", "frame-support", @@ -8474,63 +9291,6 @@ dependencies = [ "ternoa-core-primitives", ] -[[package]] -name = "ternoa-service" -version = "1.4.1" -dependencies = [ - "alphanet-runtime", - "alphanet-runtime-constants", - "frame-benchmarking", - "frame-benchmarking-cli", - "futures 0.3.29", - "jsonrpsee", - "mainnet-runtime", - "mainnet-runtime-constants", - "pallet-im-online", - "pallet-staking", - "pallet-transaction-payment-rpc", - "sc-authority-discovery", - "sc-basic-authorship", - "sc-chain-spec", - "sc-client-api", - "sc-consensus", - "sc-consensus-babe", - "sc-consensus-babe-rpc", - "sc-consensus-epochs", - "sc-consensus-slots", - "sc-consensus-uncles", - "sc-executor", - "sc-finality-grandpa", - "sc-finality-grandpa-rpc", - "sc-network", - "sc-network-common", - "sc-rpc", - "sc-rpc-api", - "sc-service", - "sc-sync-state-rpc", - "sc-telemetry", - "sc-transaction-pool", - "sc-transaction-pool-api", - "serde", - "sp-api", - "sp-authority-discovery", - "sp-authorship", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-core", - "sp-finality-grandpa", - "sp-keystore", - "sp-runtime", - "sp-timestamp", - "sp-transaction-storage-proof", - "substrate-frame-rpc-system", - "substrate-state-trie-migration-rpc", - "ternoa-client", - "ternoa-core-primitives", -] - [[package]] name = "ternoa-staking-rewards" version = "1.0.0" @@ -8554,6 +9314,7 @@ dependencies = [ name = "ternoa-tee" version = "1.0.2" dependencies = [ + "bs58 0.5.0", "frame-benchmarking", "frame-election-provider-support", "frame-support", @@ -8622,7 +9383,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", ] [[package]] @@ -8660,25 +9421,64 @@ dependencies = [ "libc", ] +[[package]] +name = "time" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +dependencies = [ + "deranged", + "itoa", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +dependencies = [ + "time-core", +] + [[package]] name = "tiny-bip39" -version = "0.8.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861" dependencies = [ "anyhow", - "hmac 0.8.1", + "hmac 0.12.1", "once_cell", - "pbkdf2 0.4.0", - "rand 0.7.3", + "pbkdf2 0.11.0", + "rand 0.8.5", "rustc-hash", - "sha2 0.9.9", + "sha2 0.10.8", "thiserror", "unicode-normalization", "wasm-bindgen", "zeroize", ] +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -8696,9 +9496,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.34.0" +version = "1.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" +checksum = "841d45b238a16291a4e1584e61820b8ae57d696cc5015c459c229ccc6990cc1c" dependencies = [ "backtrace", "bytes", @@ -8721,7 +9521,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", ] [[package]] @@ -8730,9 +9530,19 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls", + "rustls 0.20.9", + "tokio", + "webpki 0.22.4", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.10", "tokio", - "webpki", ] [[package]] @@ -8744,6 +9554,7 @@ dependencies = [ "futures-core", "pin-project-lite 0.2.13", "tokio", + "tokio-util", ] [[package]] @@ -8770,6 +9581,58 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" +dependencies = [ + "bitflags 1.3.2", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-range-header", + "pin-project-lite 0.2.13", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + [[package]] name = "tower-service" version = "0.3.2" @@ -8782,6 +9645,7 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ + "log", "pin-project-lite 0.2.13", "tracing-attributes", "tracing-core", @@ -8795,7 +9659,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", ] [[package]] @@ -8864,12 +9728,12 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.24.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908" +checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85" dependencies = [ "hash-db", - "hashbrown 0.12.3", + "hashbrown 0.13.2", "log", "rustc-hex", "smallvec", @@ -8877,9 +9741,9 @@ dependencies = [ [[package]] name = "trie-root" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a36c5ca3911ed3c9a5416ee6c679042064b93fc637ded67e25f92e68d783891" +checksum = "d4ed310ef5ab98f5fa467900ed906cb9232dd5376597e00fd4cba2a449d06c0b" dependencies = [ "hash-db", ] @@ -8902,6 +9766,7 @@ dependencies = [ "lazy_static", "rand 0.8.5", "smallvec", + "socket2 0.4.10", "thiserror", "tinyvec", "tokio", @@ -8931,31 +9796,41 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.34#1cc97dd30537997ff4c9827beb2ef0cac9c49063" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ + "async-trait", "clap", "frame-remote-externalities", "frame-try-runtime", + "hex", "log", "parity-scale-codec", - "sc-chain-spec", "sc-cli", "sc-executor", "sc-service", "serde", + "serde_json", + "sp-api", + "sp-consensus-aura", + "sp-consensus-babe", "sp-core", + "sp-debug-derive", "sp-externalities", + "sp-inherents", "sp-io", "sp-keystore", + "sp-rpc", "sp-runtime", "sp-state-machine", + "sp-timestamp", + "sp-transaction-storage-proof", "sp-version", "sp-weights", "substrate-rpc-client", @@ -8968,6 +9843,25 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4f195fd851901624eee5a58c4bb2b4f06399148fcd0ed336e6f1cb60a9881df" +[[package]] +name = "turn" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4712ee30d123ec7ae26d1e1b218395a16c87cdbaf4b3925d170d684af62ea5e8" +dependencies = [ + "async-trait", + "base64 0.13.1", + "futures 0.3.29", + "log", + "md-5", + "rand 0.8.5", + "ring 0.16.20", + "stun", + "thiserror", + "tokio", + "webrtc-util", +] + [[package]] name = "twox-hash" version = "1.6.3" @@ -9004,20 +9898,11 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" [[package]] name = "unicode-ident" @@ -9046,6 +9931,16 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +[[package]] +name = "universal-hash" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +dependencies = [ + "generic-array 0.14.7", + "subtle", +] + [[package]] name = "universal-hash" version = "0.5.1" @@ -9082,18 +9977,27 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna 0.5.0", "percent-encoding", ] [[package]] -name = "valuable" -version = "0.1.0" +name = "uuid" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" +dependencies = [ + "getrandom 0.2.11", +] + +[[package]] +name = "valuable" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" @@ -9116,10 +10020,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] -name = "waker-fn" -version = "1.1.1" +name = "waitgroup" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" +checksum = "d1f50000a783467e6c0200f9d10642f4bc424e39efc1b770203e88b488f79292" +dependencies = [ + "atomic-waker", +] [[package]] name = "walkdir" @@ -9154,9 +10061,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -9164,24 +10071,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" +checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" dependencies = [ "cfg-if", "js-sys", @@ -9191,9 +10098,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -9201,22 +10108,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "wasm-instrument" @@ -9227,11 +10134,20 @@ dependencies = [ "parity-wasm", ] +[[package]] +name = "wasm-instrument" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a47ecb37b9734d1085eaa5ae1a81e60801fd8c28d4cabdd8aedb982021918bc" +dependencies = [ + "parity-wasm", +] + [[package]] name = "wasm-opt" -version = "0.110.2" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b68e8037b4daf711393f4be2056246d12d975651b14d581520ad5d1f19219cec" +checksum = "84a303793cbc01fb96551badfc7367db6007396bba6bac97936b3c8b6f7fdb41" dependencies = [ "anyhow", "libc", @@ -9245,9 +10161,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.110.2" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91adbad477e97bba3fbd21dd7bfb594e7ad5ceb9169ab1c93ab9cb0ada636b6f" +checksum = "d9c9deb56f8a9f2ec177b3bd642a8205621835944ed5da55f2388ef216aca5a4" dependencies = [ "anyhow", "cxx", @@ -9257,9 +10173,9 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.110.2" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec4fa5a322a4e6ac22fd141f498d56afbdbf9df5debeac32380d2dcaa3e06941" +checksum = "4432e28b542738a9776cedf92e8a99d8991c7b4667ee2c7ccddfb479dd2856a7" dependencies = [ "anyhow", "cc", @@ -9291,7 +10207,19 @@ checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" dependencies = [ "parity-wasm", "wasmi-validation", - "wasmi_core", + "wasmi_core 0.2.1", +] + +[[package]] +name = "wasmi" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01bf50edb2ea9d922aa75a7bf3c15e26a6c9e2d18c56e862b49737a582901729" +dependencies = [ + "spin 0.9.8", + "wasmi_arena", + "wasmi_core 0.5.0", + "wasmparser-nostd", ] [[package]] @@ -9303,6 +10231,12 @@ dependencies = [ "parity-wasm", ] +[[package]] +name = "wasmi_arena" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ea379cbb0b41f3a9f0bf7b47036d036aae7f43383d8cc487d4deccf40dee0a" + [[package]] name = "wasmi_core" version = "0.2.1" @@ -9314,22 +10248,44 @@ dependencies = [ "memory_units", "num-rational", "num-traits", + "region", +] + +[[package]] +name = "wasmi_core" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5bf998ab792be85e20e771fe14182b4295571ad1d4f89d3da521c1bef5f597a" +dependencies = [ + "downcast-rs", + "libm", + "num-traits", ] [[package]] name = "wasmparser" -version = "0.89.1" +version = "0.100.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5d3e08b13876f96dd55608d03cd4883a0545884932d5adf11925876c96daef" +checksum = "64b20236ab624147dfbb62cf12a19aaf66af0e41b8398838b66e997d07d269d4" dependencies = [ "indexmap 1.9.3", + "url", +] + +[[package]] +name = "wasmparser-nostd" +version = "0.91.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c37f310b5a62bfd5ae7c0f1d8e6f98af16a5d6d84ba764e9c36439ec14e318b" +dependencies = [ + "indexmap-nostd", ] [[package]] name = "wasmtime" -version = "1.0.2" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad5af6ba38311282f2a21670d96e78266e8c8e2f38cbcd52c254df6ccbc7731" +checksum = "76a222f5fa1e14b2cefc286f1b68494d7a965f4bf57ec04c59bb62673d639af6" dependencies = [ "anyhow", "bincode", @@ -9350,23 +10306,23 @@ dependencies = [ "wasmtime-environ", "wasmtime-jit", "wasmtime-runtime", - "windows-sys 0.36.1", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-asm-macros" -version = "1.0.2" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45de63ddfc8b9223d1adc8f7b2ee5f35d1f6d112833934ad7ea66e4f4339e597" +checksum = "4407a7246e7d2f3d8fb1cf0c72fda8dbafdb6dd34d555ae8bea0e5ae031089cc" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "1.0.2" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcd849399d17d2270141cfe47fa0d91ee52d5f8ea9b98cf7ddde0d53e5f79882" +checksum = "5ceb3adf61d654be0be67fffdce42447b0880481348785be5fe40b5dd7663a4c" dependencies = [ "anyhow", "base64 0.13.1", @@ -9374,19 +10330,19 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix 0.35.16", + "rustix 0.36.17", "serde", - "sha2 0.9.9", + "sha2 0.10.8", "toml", - "windows-sys 0.36.1", + "windows-sys 0.42.0", "zstd", ] [[package]] name = "wasmtime-cranelift" -version = "1.0.2" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bd91339b742ff20bfed4532a27b73c86b5bcbfedd6bea2dcdf2d64471e1b5c6" +checksum = "3c366bb8647e01fd08cb5589976284b00abfded5529b33d7e7f3f086c68304a4" dependencies = [ "anyhow", "cranelift-codegen", @@ -9405,9 +10361,9 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "1.0.2" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebb881c61f4f627b5d45c54e629724974f8a8890d455bcbe634330cc27309644" +checksum = "47b8b50962eae38ee319f7b24900b7cf371f03eebdc17400c1dc8575fc10c9a7" dependencies = [ "anyhow", "cranelift-entity", @@ -9424,9 +10380,9 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "1.0.2" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1985c628011fe26adf5e23a5301bdc79b245e0e338f14bb58b39e4e25e4d8681" +checksum = "ffaed4f9a234ba5225d8e64eac7b4a5d13b994aeb37353cde2cbeb3febda9eaa" dependencies = [ "addr2line 0.17.0", "anyhow", @@ -9437,32 +10393,42 @@ dependencies = [ "log", "object 0.29.0", "rustc-demangle", - "rustix 0.35.16", "serde", "target-lexicon", - "thiserror", "wasmtime-environ", "wasmtime-jit-debug", + "wasmtime-jit-icache-coherence", "wasmtime-runtime", - "windows-sys 0.36.1", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-jit-debug" -version = "1.0.2" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f671b588486f5ccec8c5a3dba6b4c07eac2e66ab8c60e6f4e53717c77f709731" +checksum = "eed41cbcbf74ce3ff6f1d07d1b707888166dc408d1a880f651268f4f7c9194b2" dependencies = [ "object 0.29.0", "once_cell", - "rustix 0.35.16", + "rustix 0.36.17", +] + +[[package]] +name = "wasmtime-jit-icache-coherence" +version = "6.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a28ae1e648461bfdbb79db3efdaee1bca5b940872e4175390f465593a2e54c" +dependencies = [ + "cfg-if", + "libc", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-runtime" -version = "1.0.2" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8f92ad4b61736339c29361da85769ebc200f184361959d1792832e592a1afd" +checksum = "e704b126e4252788ccfc3526d4d4511d4b23c521bf123e447ac726c14545217b" dependencies = [ "anyhow", "cc", @@ -9475,19 +10441,18 @@ dependencies = [ "memoffset 0.6.5", "paste", "rand 0.8.5", - "rustix 0.35.16", - "thiserror", + "rustix 0.36.17", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", - "windows-sys 0.36.1", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-types" -version = "1.0.2" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23d61cb4c46e837b431196dd06abb11731541021916d03476a178b54dc07aeb" +checksum = "83e5572c5727c1ee7e8f28717aaa8400e4d22dcbd714ea5457d85b5005206568" dependencies = [ "cranelift-entity", "serde", @@ -9497,21 +10462,31 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.65" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" dependencies = [ "js-sys", "wasm-bindgen", ] +[[package]] +name = "webpki" +version = "0.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" +dependencies = [ + "ring 0.16.20", + "untrusted 0.7.1", +] + [[package]] name = "webpki" version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring 0.17.5", + "ring 0.17.7", "untrusted 0.9.0", ] @@ -9521,7 +10496,221 @@ version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ - "webpki", + "webpki 0.22.4", +] + +[[package]] +name = "webpki-roots" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" + +[[package]] +name = "webrtc" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3bc9049bdb2cea52f5fd4f6f728184225bdb867ed0dc2410eab6df5bdd67bb" +dependencies = [ + "arc-swap", + "async-trait", + "bytes", + "hex", + "interceptor", + "lazy_static", + "log", + "rand 0.8.5", + "rcgen 0.9.3", + "regex", + "ring 0.16.20", + "rtcp", + "rtp", + "rustls 0.19.1", + "sdp", + "serde", + "serde_json", + "sha2 0.10.8", + "stun", + "thiserror", + "time", + "tokio", + "turn", + "url", + "waitgroup", + "webrtc-data", + "webrtc-dtls", + "webrtc-ice", + "webrtc-mdns", + "webrtc-media", + "webrtc-sctp", + "webrtc-srtp", + "webrtc-util", +] + +[[package]] +name = "webrtc-data" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ef36a4d12baa6e842582fe9ec16a57184ba35e1a09308307b67d43ec8883100" +dependencies = [ + "bytes", + "derive_builder", + "log", + "thiserror", + "tokio", + "webrtc-sctp", + "webrtc-util", +] + +[[package]] +name = "webrtc-dtls" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a00f4242f2db33307347bd5be53263c52a0331c96c14292118c9a6bb48d267" +dependencies = [ + "aes 0.6.0", + "aes-gcm 0.10.3", + "async-trait", + "bincode", + "block-modes", + "byteorder", + "ccm", + "curve25519-dalek 3.2.0", + "der-parser 8.2.0", + "elliptic-curve", + "hkdf", + "hmac 0.12.1", + "log", + "p256", + "p384", + "rand 0.8.5", + "rand_core 0.6.4", + "rcgen 0.10.0", + "ring 0.16.20", + "rustls 0.19.1", + "sec1", + "serde", + "sha1", + "sha2 0.10.8", + "signature 1.6.4", + "subtle", + "thiserror", + "tokio", + "webpki 0.21.4", + "webrtc-util", + "x25519-dalek 2.0.0", + "x509-parser 0.13.2", +] + +[[package]] +name = "webrtc-ice" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "465a03cc11e9a7d7b4f9f99870558fe37a102b65b93f8045392fef7c67b39e80" +dependencies = [ + "arc-swap", + "async-trait", + "crc", + "log", + "rand 0.8.5", + "serde", + "serde_json", + "stun", + "thiserror", + "tokio", + "turn", + "url", + "uuid", + "waitgroup", + "webrtc-mdns", + "webrtc-util", +] + +[[package]] +name = "webrtc-mdns" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f08dfd7a6e3987e255c4dbe710dde5d94d0f0574f8a21afa95d171376c143106" +dependencies = [ + "log", + "socket2 0.4.10", + "thiserror", + "tokio", + "webrtc-util", +] + +[[package]] +name = "webrtc-media" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f72e1650a8ae006017d1a5280efb49e2610c19ccc3c0905b03b648aee9554991" +dependencies = [ + "byteorder", + "bytes", + "rand 0.8.5", + "rtp", + "thiserror", +] + +[[package]] +name = "webrtc-sctp" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d47adcd9427eb3ede33d5a7f3424038f63c965491beafcc20bc650a2f6679c0" +dependencies = [ + "arc-swap", + "async-trait", + "bytes", + "crc", + "log", + "rand 0.8.5", + "thiserror", + "tokio", + "webrtc-util", +] + +[[package]] +name = "webrtc-srtp" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6183edc4c1c6c0175f8812eefdce84dfa0aea9c3ece71c2bf6ddd3c964de3da5" +dependencies = [ + "aead 0.4.3", + "aes 0.7.5", + "aes-gcm 0.9.4", + "async-trait", + "byteorder", + "bytes", + "ctr 0.8.0", + "hmac 0.11.0", + "log", + "rtcp", + "rtp", + "sha-1", + "subtle", + "thiserror", + "tokio", + "webrtc-util", +] + +[[package]] +name = "webrtc-util" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f1db1727772c05cf7a2cfece52c3aca8045ca1e176cd517d323489aa3c6d87" +dependencies = [ + "async-trait", + "bitflags 1.3.2", + "bytes", + "cc", + "ipnet", + "lazy_static", + "libc", + "log", + "nix", + "rand 0.8.5", + "thiserror", + "tokio", + "winapi", ] [[package]] @@ -9533,7 +10722,17 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.25", + "rustix 0.38.28", +] + +[[package]] +name = "wide" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c68938b57b33da363195412cfc5fc37c9ed49aa9cfe2156fde64b8d2c9498242" +dependencies = [ + "bytemuck", + "safe_arch", ] [[package]] @@ -9575,15 +10774,12 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.34.0" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45296b64204227616fdbf2614cefa4c236b98ee64dfaaaa435207ed99fe7829f" +checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows_aarch64_msvc 0.34.0", - "windows_i686_gnu 0.34.0", - "windows_i686_msvc 0.34.0", - "windows_x86_64_gnu 0.34.0", - "windows_x86_64_msvc 0.34.0", + "windows-core", + "windows-targets 0.48.5", ] [[package]] @@ -9592,20 +10788,7 @@ version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" -dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", + "windows-targets 0.48.5", ] [[package]] @@ -9623,13 +10806,46 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -9647,6 +10863,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -9660,16 +10891,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] -name = "windows_aarch64_msvc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" +name = "windows_aarch64_gnullvm" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" [[package]] name = "windows_aarch64_msvc" @@ -9684,16 +10909,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] -name = "windows_i686_gnu" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" - -[[package]] -name = "windows_i686_gnu" -version = "0.36.1" +name = "windows_aarch64_msvc" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" [[package]] name = "windows_i686_gnu" @@ -9708,16 +10927,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] -name = "windows_i686_msvc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" - -[[package]] -name = "windows_i686_msvc" -version = "0.36.1" +name = "windows_i686_gnu" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" [[package]] name = "windows_i686_msvc" @@ -9732,16 +10945,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] -name = "windows_x86_64_gnu" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.36.1" +name = "windows_i686_msvc" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" [[package]] name = "windows_x86_64_gnu" @@ -9755,6 +10962,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -9768,16 +10981,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] -name = "windows_x86_64_msvc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.36.1" +name = "windows_x86_64_gnullvm" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" [[package]] name = "windows_x86_64_msvc" @@ -9791,6 +10998,21 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "winnow" +version = "0.5.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c830786f7720c2fd27a1a0e27a709dbd3c4d009b56d098fc742d4f4eab91fe2" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.50.0" @@ -9821,6 +11043,55 @@ dependencies = [ "zeroize", ] +[[package]] +name = "x25519-dalek" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" +dependencies = [ + "curve25519-dalek 4.1.1", + "rand_core 0.6.4", + "serde", + "zeroize", +] + +[[package]] +name = "x509-parser" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb9bace5b5589ffead1afb76e43e34cff39cd0f3ce7e170ae0c29e53b88eb1c" +dependencies = [ + "asn1-rs 0.3.1", + "base64 0.13.1", + "data-encoding", + "der-parser 7.0.0", + "lazy_static", + "nom", + "oid-registry 0.4.0", + "ring 0.16.20", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "x509-parser" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" +dependencies = [ + "asn1-rs 0.5.2", + "base64 0.13.1", + "data-encoding", + "der-parser 8.2.0", + "lazy_static", + "nom", + "oid-registry 0.6.1", + "rusticata-macros", + "thiserror", + "time", +] + [[package]] name = "yamux" version = "0.10.2" @@ -9835,6 +11106,35 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "yasna" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +dependencies = [ + "time", +] + +[[package]] +name = "zerocopy" +version = "0.7.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "306dca4455518f1f31635ec308b6b3e4eb1b11758cefafc782827d0aa7acb5c7" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be912bf68235a88fbefd1b73415cb218405958d1655b2ece9035a19920bdf6ba" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.40", +] + [[package]] name = "zeroize" version = "1.7.0" @@ -9852,7 +11152,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 633631db..11eab9f3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,32 +1,15 @@ -[[bin]] -name = "ternoa" -path = "src/main.rs" - -[package] -name = "ternoa" -description = "Implementation of a `https://www.ternoa.com` node in Rust based on the Substrate framework." -authors.workspace = true -edition.workspace = true -license.workspace = true -version.workspace = true -readme = "README.md" + [workspace.package] authors = ["Ternoa"] edition = "2021" license = "GPL-3.0-only" -version = "1.4.2" - - -[dependencies] -# Mainnet is enabled by default -ternoa-cli = { path = "node/cli", features = [ "alphanet-native" ] } +version = "1.4.3" [workspace] members = [ - 'node/cli', - 'node/client', - "node/service", + 'node', + 'client', 'runtime/alphanet', 'runtime/mainnet', "core-primitives" @@ -34,111 +17,126 @@ members = [ [workspace.dependencies] #Frame -frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", features = ["historical"], default-features = false } -pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -node-inspect = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } - +frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", features = ["historical"], default-features = false } +pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-staking-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +node-inspect = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } + +#contracts +pallet-contracts = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-contracts-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-insecure-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } # Benchmarking -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +frame-benchmarking-pallet-pov = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } # Try Runtime -frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } +frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } # Substrate Primitives -sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -sp-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34", default-features = false } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sp-storage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sp-transaction-storage-proof = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sp-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } +sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sp-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sp-storage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sp-transaction-storage-proof = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sp-weights = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sp-statement-store = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } + # Substrate Client -sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sc-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } -sc-consensus-uncles = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.34" } +sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +#sc-network-statement = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-consensus-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-storage-monitor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-statement-store = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sc-service-test = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } # Rest -parity-scale-codec = { default-features = false, features = ["derive", "max-encoded-len"], version = "3.1.5" } +parity-scale-codec = { default-features = false, features = ["derive", "max-encoded-len"], version = "3.2.2" } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.137" } static_assertions = { version = "1.1.0" } @@ -223,7 +221,3 @@ inherits = "release" debug = 1 # debug symbols are useful for profilers debug-assertions = true overflow-checks = true - -[features] -runtime-benchmarks= [ "ternoa-cli/runtime-benchmarks" ] -try-runtime = [ "ternoa-cli/try-runtime" ] diff --git a/node/client/Cargo.toml b/client/Cargo.toml similarity index 82% rename from node/client/Cargo.toml rename to client/Cargo.toml index 0f0744c6..87bde97c 100644 --- a/node/client/Cargo.toml +++ b/client/Cargo.toml @@ -24,7 +24,7 @@ sp-storage = { workspace = true } sp-transaction-pool = { workspace = true } sp-consensus-babe = { workspace = true } sp-authority-discovery = { workspace = true } -sp-finality-grandpa = { workspace = true } +sp-consensus-grandpa = { workspace = true } sp-core = { workspace = true } sp-keyring = { workspace = true } sp-inherents = { workspace = true } @@ -45,12 +45,12 @@ frame-benchmarking = { workspace = true } frame-benchmarking-cli = { workspace = true } # Ternoa -ternoa-core-primitives = { path = "../../core-primitives" } -ternoa-runtime-common = { path = "../../runtime/common" } +ternoa-core-primitives = { path = "../core-primitives" } +ternoa-runtime-common = { path = "../runtime/common" } # Ternoa runtimes -alphanet-runtime = { path = "../../runtime/alphanet", optional = true } -mainnet-runtime = { path = "../../runtime/mainnet", optional = true } +alphanet-runtime = { path = "../runtime/alphanet", optional = true } +mainnet-runtime = { path = "../runtime/mainnet", optional = true } [features] default = ["mainnet"] diff --git a/node/client/src/benchmarking.rs b/client/src/benchmarking.rs similarity index 100% rename from node/client/src/benchmarking.rs rename to client/src/benchmarking.rs diff --git a/node/client/src/lib.rs b/client/src/lib.rs similarity index 88% rename from node/client/src/lib.rs rename to client/src/lib.rs index be6386bb..3510e420 100644 --- a/node/client/src/lib.rs +++ b/client/src/lib.rs @@ -17,14 +17,14 @@ pub mod benchmarking; use sc_client_api::{ - AuxStore, Backend as BackendT, BlockchainEvents, HeaderBackend, KeyIterator, UsageProvider, + AuxStore, Backend as BackendT, BlockchainEvents, HeaderBackend, KeysIter, UsageProvider, PairsIter, }; use sc_executor::NativeElseWasmExecutor; use sc_service::Arc; use sp_api::{CallApiAt, NumberFor, ProvideRuntimeApi}; use sp_consensus::BlockStatus; use sp_runtime::{ - generic::{BlockId, SignedBlock}, + generic::{SignedBlock}, traits::{BlakeTwo256, Block as BlockT}, Justifications, }; @@ -79,7 +79,7 @@ pub trait RuntimeApiCollection: sp_transaction_pool::runtime_api::TaggedTransactionQueue + sp_api::ApiExt + sp_consensus_babe::BabeApi - + sp_finality_grandpa::GrandpaApi + + sp_consensus_grandpa::GrandpaApi + sp_block_builder::BlockBuilder + substrate_frame_rpc_system::AccountNonceApi + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi @@ -97,7 +97,7 @@ where Api: sp_transaction_pool::runtime_api::TaggedTransactionQueue + sp_api::ApiExt + sp_consensus_babe::BabeApi - + sp_finality_grandpa::GrandpaApi + + sp_consensus_grandpa::GrandpaApi + sp_block_builder::BlockBuilder + substrate_frame_rpc_system::AccountNonceApi + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi @@ -268,22 +268,25 @@ impl sc_client_api::BlockBackend for Client { } } - fn block(&self, id: &BlockId) -> sp_blockchain::Result>> { + fn block( + &self, + hash: ::Hash, + ) -> sp_blockchain::Result>> { with_client! { self, client, { - client.block(id) + client.block(hash) } } } - fn block_status(&self, id: &BlockId) -> sp_blockchain::Result { + fn block_status(&self, hash: ::Hash) -> sp_blockchain::Result { with_client! { self, client, { - client.block_status(id) + client.block_status(hash) } } } @@ -363,19 +366,6 @@ impl sc_client_api::StorageProvider for Client { } } - fn storage_keys( - &self, - hash: ::Hash, - key_prefix: &StorageKey, - ) -> sp_blockchain::Result> { - with_client! { - self, - client, - { - client.storage_keys(hash, key_prefix) - } - } - } fn storage_hash( &self, @@ -394,30 +384,33 @@ impl sc_client_api::StorageProvider for Client { fn storage_pairs( &self, hash: ::Hash, - key_prefix: &StorageKey, - ) -> sp_blockchain::Result> { + key_prefix: Option<&StorageKey>, + start_key: Option<&StorageKey>, + ) -> sp_blockchain::Result< + PairsIter<>::State, Block>, + > { with_client! { self, client, { - client.storage_pairs(hash, key_prefix) + client.storage_pairs(hash, key_prefix, start_key) } } } - fn storage_keys_iter<'a>( + fn storage_keys( &self, hash: ::Hash, - prefix: Option<&'a StorageKey>, + prefix: Option<&StorageKey>, start_key: Option<&StorageKey>, ) -> sp_blockchain::Result< - KeyIterator<'a, >::State, Block>, + KeysIter<>::State, Block>, > { with_client! { self, client, { - client.storage_keys_iter(hash, prefix, start_key) + client.storage_keys(hash, prefix, start_key) } } } @@ -438,34 +431,19 @@ impl sc_client_api::StorageProvider for Client { } fn child_storage_keys( - &self, - hash: ::Hash, - child_info: &ChildInfo, - key_prefix: &StorageKey, - ) -> sp_blockchain::Result> { - with_client! { - self, - client, - { - client.child_storage_keys(hash, child_info, key_prefix) - } - } - } - - fn child_storage_keys_iter<'a>( &self, hash: ::Hash, child_info: ChildInfo, - prefix: Option<&'a StorageKey>, + prefix: Option<&StorageKey>, start_key: Option<&StorageKey>, ) -> sp_blockchain::Result< - KeyIterator<'a, >::State, Block>, + KeysIter<>::State, Block>, > { with_client! { self, client, { - client.child_storage_keys_iter(hash, child_info, prefix, start_key) + client.child_storage_keys(hash, child_info, prefix, start_key) } } } @@ -487,16 +465,15 @@ impl sc_client_api::StorageProvider for Client { } impl sp_blockchain::HeaderBackend for Client { - fn header(&self, id: BlockId) -> sp_blockchain::Result> { + fn header(&self, hash: Hash) -> sp_blockchain::Result> { with_client! { self, client, { - client.header(&id) + client.header(hash) } } } - fn info(&self) -> sp_blockchain::Info { with_client! { self, @@ -507,12 +484,12 @@ impl sp_blockchain::HeaderBackend for Client { } } - fn status(&self, id: BlockId) -> sp_blockchain::Result { + fn status(&self, hash: Hash) -> sp_blockchain::Result { with_client! { self, client, { - client.status(id) + client.status(hash) } } } diff --git a/node/Cargo.toml b/node/Cargo.toml new file mode 100644 index 00000000..64389dc6 --- /dev/null +++ b/node/Cargo.toml @@ -0,0 +1,103 @@ +[package] +name = "ternoa-node" +version = "1.4.3" +description = "Ternoa node" +edition = "2021" +license = "GNU GPL v3" +build = "build.rs" + + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + + +[[bin]] +name = "ternoa-node" + +[dependencies] +clap = { version = "4.0.9", features = ["derive"] } +futures = { version = "0.3.21", features = ["thread-pool"]} +log = "0.4.17" +rand = "0.8" +hex-literal = "0.3.4" +serde = { version = "1.0.137", features = [ "derive" ] } + +sc-cli = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sp-core = { version = "7.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-executor = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-service = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-keystore = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-network = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-network-common = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-sysinfo = { version = "6.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-consensus-babe = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sp-consensus-babe = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sp-consensus = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-consensus = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-consensus-grandpa = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sp-consensus-grandpa = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-storage-monitor = { version = "0.1.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sp-runtime = { version = "7.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" } +sp-io = { version = "7.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sp-inherents = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sp-keyring = { version = "7.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sp-keystore = { version = "0.13.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sp-transaction-storage-proof = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +frame-system = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +pallet-im-online = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +pallet-staking = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } + +# These dependencies are used for the node template's RPCs +jsonrpsee = { version = "0.16.2", features = ["server"] } +sc-rpc = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-rpc-api = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-basic-authorship = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +substrate-frame-rpc-system = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-consensus-babe-rpc = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-consensus-epochs = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-consensus-grandpa-rpc = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sc-rpc-spec-v2 = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } + +# These dependencies are used for runtime benchmarking +frame-benchmarking = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +frame-benchmarking-cli = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } + +# Local Dependencies +alphanet-runtime = { version = "1.4.2", path = "../runtime/alphanet" } +ternoa-runtime-common = { version = "1.4.2", path = "../runtime/common" } + +# Common types +ternoa-core-primitives = { version = "1.4.2", default-features = false, path = "../core-primitives" } + +# CLI-specific dependencies +try-runtime-cli = { version = "0.10.0-dev", optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } + +[build-dependencies] +substrate-build-script-utils = { version = "3.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } + +[features] +default = [] +# Dependencies that are only required if runtime benchmarking should be build. +runtime-benchmarks = [ + "alphanet-runtime/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "frame-benchmarking-cli/runtime-benchmarks", +] +# Enable features that allow the runtime to be tried and debugged. Name might be subject to change +# in the near future. +try-runtime = ["alphanet-runtime/try-runtime", "try-runtime-cli/try-runtime"] \ No newline at end of file diff --git a/node/cli/build.rs b/node/build.rs similarity index 100% rename from node/cli/build.rs rename to node/build.rs diff --git a/node/cli/Cargo.toml b/node/cli/Cargo.toml deleted file mode 100644 index 35f138b8..00000000 --- a/node/cli/Cargo.toml +++ /dev/null @@ -1,63 +0,0 @@ -[package] -name = "ternoa-cli" -version.workspace = true -authors.workspace = true -edition.workspace = true -license.workspace = true - -[package.metadata.wasm-pack.profile.release] -# `wasm-opt` has some problems on Linux, see -# https://github.com/rustwasm/wasm-pack/issues/781 etc. -wasm-opt = false - -[lib] -crate-type = ["cdylib", "rlib"] - -[dependencies] -# Substrate Frame -node-inspect = { workspace = true, optional = true } - -# Substrate Client -sc-cli = { workspace = true, optional = true } -sc-service = { workspace = true, optional = true } -sc-finality-grandpa = { workspace = true, optional = true } - -# Rest -clap = { workspace = true, features = ["derive"], optional = true } - -# Benchmark -frame-benchmarking-cli = { workspace = true, optional = true } - -# Try Runtime -try-runtime-cli = { workspace = true, optional = true } -frame-try-runtime = { workspace = true, optional = true } - -# Ternoa -ternoa-service = { path = "../service", default-features = false, optional = true } -ternoa-client = { path = "../client", default-features = false, optional = true } - -[build-dependencies] -substrate-build-script-utils = { workspace = true } - -[features] -default = [ "cli", "full-node", "mainnet-native" ] -#wasmtime = [ "sc-cli/wasmtime" ] -cli = [ - "clap", - "sc-cli", - "sc-service", - "frame-benchmarking-cli", - "node-inspect", - "try-runtime-cli", - "sc-finality-grandpa", - "ternoa-client", -] -runtime-benchmarks = ["ternoa-service/runtime-benchmarks"] -full-node = ["ternoa-service/full-node"] -try-runtime = ["ternoa-service/try-runtime", "try-runtime-cli/try-runtime"] - -# Configure the native runtimes to use. Mainnet is enabled by default. -# -# Validators require the native runtime currently -alphanet-native = [ "ternoa-service/alphanet-native" ] -mainnet-native = [ "ternoa-service/mainnet-native" ] diff --git a/node/cli/src/cli.rs b/node/cli/src/cli.rs deleted file mode 100644 index 0096442f..00000000 --- a/node/cli/src/cli.rs +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2022 Capsule Corp (France) SAS. -// This file is part of Ternoa. - -// Ternoa 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. - -// Ternoa 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 Ternoa. If not, see . - -#[derive(Debug, clap::Parser)] -pub struct Cli { - /// Possible subcommand with parameters. - #[command(subcommand)] - pub subcommand: Option, - - #[allow(missing_docs)] - #[clap(flatten)] - pub run: sc_cli::RunCmd, -} - -/// Possible subcommands of the main binary. -#[derive(Debug, clap::Subcommand)] -pub enum Subcommand { - /// Build a chain specification. - BuildSpec(sc_cli::BuildSpecCmd), - - /// Validate blocks. - CheckBlock(sc_cli::CheckBlockCmd), - - /// Export blocks. - ExportBlocks(sc_cli::ExportBlocksCmd), - - /// Export the state of a given block into a chain spec. - ExportState(sc_cli::ExportStateCmd), - - /// Import blocks. - ImportBlocks(sc_cli::ImportBlocksCmd), - - /// Remove the whole chain. - PurgeChain(sc_cli::PurgeChainCmd), - - /// Revert the chain to a previous state. - Revert(sc_cli::RevertCmd), - - /// Sub-commands concerned with benchmarking. - /// The pallet benchmarking moved to the `pallet` sub-command. - #[command(subcommand)] - Benchmark(frame_benchmarking_cli::BenchmarkCmd), - - /// The custom inspect subcommmand for decoding blocks and extrinsics. - #[command( - name = "inspect", - about = "Decode given block or extrinsic using current native runtime." - )] - Inspect(node_inspect::cli::InspectCmd), - - /// Try some command against runtime state. - #[cfg(feature = "try-runtime")] - TryRuntime(try_runtime_cli::TryRuntimeCmd), - - /// Try some command against runtime state. Note: `try-runtime` feature must be enabled. - #[cfg(not(feature = "try-runtime"))] - TryRuntime, - - /// Key management cli utilities - #[command(subcommand)] - Key(sc_cli::KeySubcommand), - - /// Verify a signature for a message, provided on STDIN, with a given (public or secret) key. - Verify(sc_cli::VerifyCmd), - - /// Generate a seed that provides a vanity address. - Vanity(sc_cli::VanityCmd), - - /// Sign a message, with a given (secret) key. - Sign(sc_cli::SignCmd), - - /// Db meta columns information. - ChainInfo(sc_cli::ChainInfoCmd), -} diff --git a/node/cli/src/command.rs b/node/cli/src/command.rs deleted file mode 100644 index b208eefc..00000000 --- a/node/cli/src/command.rs +++ /dev/null @@ -1,423 +0,0 @@ -// Copyright 2022 Capsule Corp (France) SAS. -// This file is part of Ternoa. - -// Ternoa 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. - -// Ternoa 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 Ternoa. If not, see . - -use crate::cli::{Cli, Subcommand}; -use frame_benchmarking_cli::BenchmarkCmd; -use node_inspect::cli::InspectCmd; -use sc_cli::{ - BuildSpecCmd, ChainInfoCmd, ChainSpec, CheckBlockCmd, ExportBlocksCmd, ExportStateCmd, - ImportBlocksCmd, PurgeChainCmd, Result, RevertCmd, RuntimeVersion, SubstrateCli, -}; -use sc_service::{Arc, PartialComponents}; -use ternoa_client::benchmarking::{inherent_benchmark_data, RemarkBuilder}; -use ternoa_service::{chain_spec, new_full, new_partial, IdentifyVariant}; - -#[cfg(feature = "alphanet-native")] -use ternoa_service::alphanet_runtime; -#[cfg(feature = "alphanet-native")] -use ternoa_service::AlphanetExecutorDispatch; - -#[cfg(feature = "mainnet-native")] -use ternoa_service::mainnet_runtime; -#[cfg(feature = "mainnet-native")] -use ternoa_service::MainnetExecutorDispatch; -// use try_runtime_cli::TryRuntimeCmd; - -impl SubstrateCli for Cli { - fn impl_name() -> String { - "Ternoa Node".into() - } - - fn impl_version() -> String { - env!("CARGO_PKG_VERSION").into() - } - - fn description() -> String { - env!("CARGO_PKG_DESCRIPTION").into() - } - - fn author() -> String { - env!("CARGO_PKG_AUTHORS").into() - } - - fn support_url() -> String { - "https://github.com/capsule-corp-ternoa/chain/issues".into() - } - - fn copyright_start_year() -> i32 { - 2020 - } - - fn load_spec(&self, id: &str) -> std::result::Result, String> { - Ok(match id { - "alphanet" => Box::new(chain_spec::alphanet_config()?), - #[cfg(feature = "alphanet-native")] - "alphanet-dev" | "a-dev" | "dev" => Box::new(chain_spec::alphanet::development_config()), - - "mainnet" => Box::new(chain_spec::mainnet_config()?), - #[cfg(feature = "mainnet-native")] - "mainnet-dev" | "m-dev" => Box::new(chain_spec::mainnet::development_config()), - - "" => return Err("Please specify which chain you want to run!".into()), - path => { - let path = std::path::PathBuf::from(path); - - let chain_spec = - Box::new(chain_spec::MainnetChainSpec::from_json_file(path.clone())?) - as Box; - - if chain_spec.is_alphanet() { - Box::new(chain_spec::AlphanetChainSpec::from_json_file(path)?) - } else { - chain_spec - } - }, - }) - } - - fn native_runtime_version(spec: &Box) -> &'static RuntimeVersion { - #[cfg(feature = "alphanet-native")] - if spec.is_alphanet() { - return &alphanet_runtime::VERSION - } - - #[cfg(feature = "mainnet-native")] - { - return &mainnet_runtime::VERSION - } - - #[cfg(not(feature = "mainnet-native"))] - panic!("No runtime feature (alphanet, mainnet) is enabled"); - } -} - -/// Parse command line arguments into service configuration. -pub fn run() -> Result<()> { - let cli = Cli::from_args(); - - // When we call cli.create_runner() it automatically calls the cli.load_spec() function. The - // loaded spec is stored inside runner.config().chain_spec. - - match &cli.subcommand { - None => run_wo_args(&cli), - Some(Subcommand::BuildSpec(cmd)) => build_spec(&cli, cmd), - Some(Subcommand::CheckBlock(cmd)) => check_block(&cli, cmd), - Some(Subcommand::ExportBlocks(cmd)) => export_blocks(&cli, cmd), - Some(Subcommand::ExportState(cmd)) => export_state(&cli, cmd), - Some(Subcommand::ImportBlocks(cmd)) => import_blocks(&cli, cmd), - Some(Subcommand::PurgeChain(cmd)) => purge_chain(&cli, cmd), - Some(Subcommand::Revert(cmd)) => revert(&cli, cmd), - Some(Subcommand::Benchmark(cmd)) => benchmark(&cli, cmd), - Some(Subcommand::Inspect(cmd)) => inspect(&cli, cmd), - #[cfg(feature = "try-runtime")] - Some(Subcommand::TryRuntime(cmd)) => { - let runner = cli.create_runner(cmd)?; - let chain_spec = &runner.config().chain_spec.cloned_box(); - ensure_dev(chain_spec)?; - - with_runtime!(chain_spec, { - runner.async_run(|config| { - // only need a runtime or a task manager to do `async_run`. - let registry = config.prometheus_config.as_ref().map(|cfg| &cfg.registry); - let task_manager = sc_service::TaskManager::new(config.tokio_handle.clone(), registry) - .map_err(|e| sc_cli::Error::Service(sc_service::Error::Prometheus(e)))?; - - Ok((cmd.run::(config), task_manager)) - }) - }); - }, - #[cfg(not(feature = "try-runtime"))] - Some(Subcommand::TryRuntime) => Err("TryRuntime wasn't enabled when building the node. \ - You can enable it with `--features try-runtime`." - .into()), - Some(Subcommand::Key(cmd)) => Ok(cmd.run(&cli)?), - Some(Subcommand::Verify(cmd)) => Ok(cmd.run()?), - Some(Subcommand::Vanity(cmd)) => Ok(cmd.run()?), - Some(Subcommand::Sign(cmd)) => Ok(cmd.run()?), - Some(Subcommand::ChainInfo(cmd)) => chain_info(&cli, cmd), - }?; - - Ok(()) -} - -fn ensure_dev(spec: &Box) -> Result<()> { - if spec.is_dev() { - Ok(()) - } else { - panic!("Only Dev Specification Allowed!") - } -} - -macro_rules! with_runtime { - ($chain_spec:expr, $code:expr) => { - #[cfg(feature = "alphanet-native")] - if $chain_spec.is_alphanet() { - #[allow(unused_imports)] - use alphanet_runtime::Block; - #[allow(unused_imports)] - use alphanet_runtime::RuntimeApi; - #[allow(unused_imports)] - use AlphanetExecutorDispatch as ExecutorDispatch; - - return $code - } - - #[cfg(feature = "mainnet-native")] - { - #[allow(unused_imports)] - use mainnet_runtime::Block; - #[allow(unused_imports)] - use mainnet_runtime::RuntimeApi; - #[allow(unused_imports)] - use MainnetExecutorDispatch as ExecutorDispatch; - - return $code - } - - #[cfg(not(feature = "mainnet-native"))] - panic!("No runtime feature (alphanet, mainnet) is enabled"); - }; -} - -fn run_wo_args(cli: &Cli) -> Result<()> { - let runner = cli.create_runner(&cli.run)?; - let chain_spec = &runner.config().chain_spec.cloned_box(); - - with_runtime!(chain_spec, { - runner.run_node_until_exit(|config| async move { - new_full::(config).map_err(sc_cli::Error::Service) - }) - }); -} - -fn build_spec(cli: &Cli, cmd: &BuildSpecCmd) -> Result<()> { - let runner = cli.create_runner(cmd)?; - Ok(runner.sync_run(|config| cmd.run(config.chain_spec, config.network))?) -} - -fn check_block(cli: &Cli, cmd: &CheckBlockCmd) -> Result<()> { - let runner = cli.create_runner(cmd)?; - let chain_spec = &runner.config().chain_spec.cloned_box(); - - with_runtime!(chain_spec, { - runner.async_run(|config| { - let PartialComponents { client, task_manager, import_queue, .. } = - new_partial::(&config)?; - Ok((cmd.run(client, import_queue), task_manager)) - }) - }); -} - -fn export_blocks(cli: &Cli, cmd: &ExportBlocksCmd) -> Result<()> { - let runner = cli.create_runner(cmd)?; - let chain_spec = &runner.config().chain_spec.cloned_box(); - - with_runtime!(chain_spec, { - runner.async_run(|config| { - let PartialComponents { client, task_manager, .. } = - new_partial::(&config)?; - Ok((cmd.run(client, config.database), task_manager)) - }) - }); -} - -fn export_state(cli: &Cli, cmd: &ExportStateCmd) -> Result<()> { - let runner = cli.create_runner(cmd)?; - let chain_spec = &runner.config().chain_spec.cloned_box(); - - with_runtime!(chain_spec, { - runner.async_run(|config| { - let PartialComponents { client, task_manager, .. } = - new_partial::(&config)?; - Ok((cmd.run(client, config.chain_spec), task_manager)) - }) - }); -} - -fn import_blocks(cli: &Cli, cmd: &ImportBlocksCmd) -> Result<()> { - let runner = cli.create_runner(cmd)?; - let chain_spec = &runner.config().chain_spec.cloned_box(); - - with_runtime!(chain_spec, { - runner.async_run(|config| { - let PartialComponents { client, task_manager, import_queue, .. } = - new_partial::(&config)?; - Ok((cmd.run(client, import_queue), task_manager)) - }) - }); -} - -fn purge_chain(cli: &Cli, cmd: &PurgeChainCmd) -> Result<()> { - let runner = cli.create_runner(cmd)?; - Ok(runner.sync_run(|config| cmd.run(config.database))?) -} - -fn revert(cli: &Cli, cmd: &RevertCmd) -> Result<()> { - let runner = cli.create_runner(cmd)?; - let chain_spec = &runner.config().chain_spec.cloned_box(); - - with_runtime!(chain_spec, { - runner.async_run(|config| { - let PartialComponents { client, task_manager, backend, .. } = - new_partial::(&config)?; - - let aux_revert = Box::new(|client, _, blocks| { - sc_finality_grandpa::revert(client, blocks)?; - Ok(()) - }); - Ok((cmd.run(client, backend, Some(aux_revert)), task_manager)) - }) - }); -} - -fn benchmark(cli: &Cli, cmd: &BenchmarkCmd) -> Result<()> { - if !cfg!(feature = "runtime-benchmarks") { - return Err("Benchmarking wasn't enabled when building the node. \ - You can enable it with `--features runtime-benchmarks`." - .into()) - } - - let runner = cli.create_runner(cmd)?; - let chain_spec = &runner.config().chain_spec.cloned_box(); - - match cmd { - BenchmarkCmd::Pallet(cmd) => { - ensure_dev(chain_spec)?; - with_runtime!(chain_spec, { - runner.sync_run(|config| cmd.run::(config)) - }); - }, - #[cfg(not(feature = "runtime-benchmarks"))] - BenchmarkCmd::Storage(_) => - Err("Storage benchmarking can be enabled with `--features runtime-benchmarks`.".into()), - #[cfg(feature = "runtime-benchmarks")] - BenchmarkCmd::Storage(_) => { - todo!() - // with_runtime!(chain_spec, { - // runner.sync_run(|config| { - // // ensure that we keep the task manager alive - // let partial = new_partial::(&config)?; - // let db = partial.backend.expose_db(); - // let storage = partial.backend.expose_storage(); - - // cmd.run(config, partial.client, db, storage) - // }) - // }); - }, - BenchmarkCmd::Overhead(cmd) => { - #[cfg(feature = "alphanet-native")] - if chain_spec.is_alphanet() { - return runner.sync_run(|config| { - let PartialComponents { client, .. } = new_partial::< - alphanet_runtime::RuntimeApi, - AlphanetExecutorDispatch, - >(&config)?; - - // We need to create Arc out of the raw client. - - let new_client = ternoa_client::Client::Alphanet(client.clone()); - let arc_client = Arc::new(new_client); - - let builder = RemarkBuilder::new(arc_client.clone()); - cmd.run( - config, - client.clone(), - inherent_benchmark_data().unwrap(), - Vec::new(), - &builder, - ) - }) - } - - #[cfg(feature = "mainnet-native")] - { - return runner.sync_run(|config| { - let PartialComponents { client, .. } = new_partial::< - mainnet_runtime::RuntimeApi, - MainnetExecutorDispatch, - >(&config)?; - - // We need to create Arc out of the raw client. - - let new_client = ternoa_client::Client::Mainnet(client.clone()); - let arc_client = Arc::new(new_client); - - let builder = RemarkBuilder::new(arc_client.clone()); - cmd.run( - config, - client.clone(), - inherent_benchmark_data().unwrap(), - Vec::new(), - &builder, - ) - }) - } - }, - BenchmarkCmd::Block(cmd) => { - with_runtime!(chain_spec, { - runner.sync_run(|config| { - let partial = new_partial::(&config)?; - cmd.run(partial.client) - }) - }); - }, - BenchmarkCmd::Extrinsic(_cmd) => todo!(), - _ => panic!("Benchmark Command not implement."), - } -} - -fn inspect(cli: &Cli, cmd: &InspectCmd) -> Result<()> { - let runner = cli.create_runner(cmd)?; - let chain_spec = &runner.config().chain_spec.cloned_box(); - - with_runtime!(chain_spec, { - runner.sync_run(|config| cmd.run::(config)) - }); -} - -// #[allow(dead_code)] -// fn try_runtime(cli: &Cli, cmd: &TryRuntimeCmd) -> Result<()> { -// let runner = cli.create_runner(cmd)?; -// let chain_spec = &runner.config().chain_spec.cloned_box(); -// ensure_dev(chain_spec)?; - -// with_runtime!(chain_spec, { -// runner.async_run(|config| { -// // only need a runtime or a task manager to do `async_run`. -// let registry = config.prometheus_config.as_ref().map(|cfg| &cfg.registry); -// let task_manager = sc_service::TaskManager::new(config.tokio_handle.clone(), registry) -// .map_err(|e| sc_cli::Error::Service(sc_service::Error::Prometheus(e)))?; - -// Ok((cmd.run::(config), task_manager)) -// }) -// }); -// } - -fn chain_info(cli: &Cli, cmd: &ChainInfoCmd) -> Result<()> { - let runner = cli.create_runner(cmd)?; - let chain_spec = &runner.config().chain_spec.cloned_box(); - - with_runtime!(chain_spec, { - runner.run_node_until_exit(|config| async move { - new_full::(config).map_err(sc_cli::Error::Service) - }) - }); -} - -// -// -// -// diff --git a/node/service/Cargo.toml b/node/service/Cargo.toml deleted file mode 100644 index a865bf0a..00000000 --- a/node/service/Cargo.toml +++ /dev/null @@ -1,96 +0,0 @@ -[package] -name = "ternoa-service" -version.workspace = true -authors.workspace = true -edition.workspace = true -license.workspace = true - -[dependencies] - -# Frame -pallet-transaction-payment-rpc = { workspace = true } -pallet-im-online = { workspace = true } -pallet-staking = { workspace = true } - -# Substrate -substrate-frame-rpc-system = { workspace = true } -substrate-state-trie-migration-rpc = { workspace = true } - -# Sp -sp-core = { workspace = true } -sp-api = { workspace = true } -sp-block-builder = { workspace = true } -sp-blockchain = { workspace = true } -sp-consensus = { workspace = true } -sp-keystore = { workspace = true } -sp-runtime = { workspace = true } -sp-timestamp = { workspace = true } -sp-consensus-babe = { workspace = true } -sp-transaction-storage-proof = { workspace = true } -sp-authorship = { workspace = true } -sp-authority-discovery = { workspace = true } -sp-finality-grandpa = { workspace = true } - -# Sc -sc-basic-authorship = { workspace = true } -sc-chain-spec = { workspace = true } -sc-client-api = { workspace = true } -sc-consensus = { workspace = true } -sc-executor = { workspace = true } -sc-finality-grandpa = { workspace = true } -sc-network = { workspace = true } -sc-network-common = { workspace = true } -sc-rpc = { workspace = true } -sc-rpc-api = { workspace = true } -sc-service = { workspace = true, default-features = false } -sc-telemetry = { workspace = true } -sc-transaction-pool = { workspace = true } -sc-transaction-pool-api = { workspace = true } -sc-finality-grandpa-rpc = { workspace = true } -sc-consensus-babe = { workspace = true } -sc-consensus-babe-rpc = { workspace = true } -sc-consensus-epochs = { workspace = true } -sc-authority-discovery = { workspace = true } -sc-sync-state-rpc = { workspace = true } -sc-consensus-slots = { workspace = true } -sc-consensus-uncles = { workspace = true } - -# Benchmarking -frame-benchmarking = { workspace = true } -frame-benchmarking-cli = { workspace = true } - -# Rest -futures = { workspace = true, features = [ "compat" ] } -jsonrpsee = { workspace = true, features = ["server"] } -serde = { workspace = true, features = [ "derive" ] } - -# Ternoa -ternoa-core-primitives = { path = "../../core-primitives" } -ternoa-client = { path = "../client", default-features = false, optional = true } - -# Ternoa Runtime Constants -alphanet-runtime-constants = { path = "../../runtime/alphanet/constants", optional = true } -mainnet-runtime-constants = { path = "../../runtime/mainnet/constants", optional = true } - -# Ternoa Runtimes -alphanet-runtime = { path = "../../runtime/alphanet", optional = true } -mainnet-runtime = { path = "../../runtime/mainnet", optional = true } - -[features] -default = [ "db", "full-node", "mainnet-native"] -full-node = [ "ternoa-client" ] -db = [ - "sc-service/rocksdb" -] - -alphanet-native = [ "alphanet-runtime", "alphanet-runtime-constants", "ternoa-client/alphanet" ] -mainnet-native = [ "mainnet-runtime", "mainnet-runtime-constants", "ternoa-client/mainnet" ] -runtime-benchmarks = [ - "alphanet-runtime/runtime-benchmarks", - "mainnet-runtime/runtime-benchmarks", -] - -try-runtime = [ - "alphanet-runtime/try-runtime", - "mainnet-runtime/try-runtime", -] \ No newline at end of file diff --git a/node/service/src/chain_spec/mainnet.rs b/node/service/src/chain_spec/mainnet.rs deleted file mode 100644 index 24604600..00000000 --- a/node/service/src/chain_spec/mainnet.rs +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright 2022 Capsule Corp (France) SAS. -// This file is part of Ternoa. - -// Ternoa 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. - -// Ternoa 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 Ternoa. If not, see . - -use super::{get_account_id_from_seed, get_from_seed, MainnetChainSpec as ChainSpec}; -use mainnet_runtime::{ - constants::currency::CAPS, wasm_binary_unwrap, AuthorityDiscoveryConfig, BabeConfig, - BalancesConfig, CouncilConfig, GenesisConfig, GrandpaConfig, ImOnlineConfig, SessionConfig, - SessionKeys, StakingConfig, SystemConfig, TechnicalMembershipConfig, BABE_GENESIS_EPOCH_CONFIG, -}; -use pallet_im_online::sr25519::AuthorityId as ImOnlineId; -use pallet_staking::Forcing; -use sc_chain_spec::ChainType; -use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; -use sp_consensus_babe::AuthorityId as BabeId; -use sp_core::sr25519; -use sp_finality_grandpa::AuthorityId as GrandpaId; -use sp_runtime::{BoundedVec, Perbill}; -use ternoa_core_primitives::AccountId; - -fn session_keys( - grandpa: GrandpaId, - babe: BabeId, - im_online: ImOnlineId, - authority_discovery: AuthorityDiscoveryId, -) -> SessionKeys { - SessionKeys { grandpa, babe, im_online, authority_discovery } -} - -pub type AuthorityKeys = - (AccountId, AccountId, GrandpaId, BabeId, ImOnlineId, AuthorityDiscoveryId); - -pub fn sr25519_account_from_seed(seed: &str) -> AccountId { - get_account_id_from_seed::(seed) -} - -/// Helper function to generate stash, controller and session key from seed -pub fn authority_keys_from_seed( - seed: &str, -) -> (AccountId, AccountId, GrandpaId, BabeId, ImOnlineId, AuthorityDiscoveryId) { - ( - get_account_id_from_seed::(&format!("{}//stash", seed)), - get_account_id_from_seed::(seed), - get_from_seed::(seed), - get_from_seed::(seed), - get_from_seed::(seed), - get_from_seed::(seed), - ) -} - -pub struct GenesisInput { - pub initial_authorities: Vec, - pub committee_members: Vec, - pub invulnerables: Vec, -} - -fn development_accounts() -> Vec { - vec![ - get_account_id_from_seed::("Alice"), - get_account_id_from_seed::("Bob"), - get_account_id_from_seed::("Charlie"), - get_account_id_from_seed::("Dave"), - get_account_id_from_seed::("Eve"), - get_account_id_from_seed::("Ferdie"), - get_account_id_from_seed::("Alice//stash"), - get_account_id_from_seed::("Bob//stash"), - get_account_id_from_seed::("Charlie//stash"), - get_account_id_from_seed::("Dave//stash"), - get_account_id_from_seed::("Eve//stash"), - get_account_id_from_seed::("Ferdie//stash"), - ] -} - -fn development_config_genesis() -> GenesisConfig { - let initial_authorities = vec![authority_keys_from_seed("Alice")]; - let committee_members = vec![sr25519_account_from_seed("Alice")]; - let invulnerables = vec![initial_authorities[0].0.clone()]; - - let input = GenesisInput { initial_authorities, committee_members, invulnerables }; - - genesis(input) -} - -/// Development config (single validator Alice) -pub fn development_config() -> ChainSpec { - let mut properties = sc_chain_spec::Properties::new(); - properties.insert("tokenSymbol".into(), "CAPS".into()); - properties.insert("tokenDecimals".into(), 18.into()); - - ChainSpec::from_genesis( - "Ternoa Mainnet Development", - "mainnet-dev", - ChainType::Development, - development_config_genesis, - vec![], - None, - Some("ternoa"), - None, - Some(properties), - Default::default(), - ) -} - -/// Helper function to create GenesisConfig for dev testo -pub fn genesis(input: GenesisInput) -> GenesisConfig { - let GenesisInput { initial_authorities, committee_members, invulnerables } = input; - - let endowed_accounts: Vec = development_accounts(); - - const ENDOWMENT: u128 = 1_000_000 * CAPS; - const STASH: u128 = 100 * CAPS; - - GenesisConfig { - // Core - system: SystemConfig { code: wasm_binary_unwrap().to_vec() }, - balances: BalancesConfig { - balances: endowed_accounts.iter().cloned().map(|x| (x, ENDOWMENT)).collect(), - }, - - // Consensus - session: SessionConfig { - keys: initial_authorities - .iter() - .map(|x| { - ( - x.0.clone(), - x.0.clone(), - session_keys(x.2.clone(), x.3.clone(), x.4.clone(), x.5.clone()), - ) - }) - .collect::>(), - }, - babe: BabeConfig { authorities: vec![], epoch_config: Some(BABE_GENESIS_EPOCH_CONFIG) }, - im_online: ImOnlineConfig { keys: vec![] }, - authority_discovery: AuthorityDiscoveryConfig { keys: vec![] }, - grandpa: GrandpaConfig { authorities: vec![] }, - staking: StakingConfig { - minimum_validator_count: 1, - validator_count: initial_authorities.len() as u32, - stakers: initial_authorities - .iter() - .map(|x| { - (x.0.clone(), x.1.clone(), STASH, alphanet_runtime::StakerStatus::Validator) - }) - .collect(), - invulnerables, - force_era: Forcing::NotForcing, - slash_reward_fraction: Perbill::from_percent(10), - ..Default::default() - }, - treasury: Default::default(), - transaction_payment: Default::default(), - technical_committee: Default::default(), - technical_membership: TechnicalMembershipConfig { - members: BoundedVec::try_from(committee_members).unwrap(), - ..Default::default() - }, - council: CouncilConfig { members: vec![], ..Default::default() }, - democracy: Default::default(), - phragmen_election: Default::default(), - assets: Default::default(), - } -} diff --git a/node/service/src/chain_spec/mod.rs b/node/service/src/chain_spec/mod.rs deleted file mode 100644 index 26caa38b..00000000 --- a/node/service/src/chain_spec/mod.rs +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2022 Capsule Corp (France) SAS. -// This file is part of Ternoa. - -// Ternoa 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. - -// Ternoa 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 Ternoa. If not, see . - -use sc_chain_spec::{ChainSpecExtension, GenericChainSpec}; -use serde::{Deserialize, Serialize}; -use sp_core::{Pair, Public}; -use sp_runtime::traits::{IdentifyAccount, Verify}; -use ternoa_core_primitives::{AccountId, Block, Signature}; - -#[cfg(feature = "alphanet-native")] -pub mod alphanet; -#[cfg(feature = "mainnet-native")] -pub mod mainnet; - -type AccountPublic = ::Signer; - -/// Node `ChainSpec` extensions. -/// -/// Additional parameters for some Substrate core modules, -/// customizable from the chain spec. -#[derive(Default, Clone, Serialize, Deserialize, ChainSpecExtension)] -#[serde(rename_all = "camelCase")] -pub struct Extensions { - /// Block numbers with known hashes. - pub fork_blocks: sc_client_api::ForkBlocks, - /// Known bad block hashes. - pub bad_blocks: sc_client_api::BadBlocks, - /// The light sync state. - /// - /// This value will be set by the `sync-state rpc` implementation. - pub light_sync_state: sc_sync_state_rpc::LightSyncStateExtension, -} - -// Dummy chain spec, in case when we don't have the native runtime. -pub type DummyChainSpec = GenericChainSpec<(), Extensions>; - -#[cfg(feature = "alphanet-native")] -pub type AlphanetChainSpec = GenericChainSpec; - -#[cfg(not(feature = "alphanet-native"))] -pub type AlphanetChainSpec = GenericChainSpec; - -#[cfg(feature = "mainnet-native")] -pub type MainnetChainSpec = GenericChainSpec; - -#[cfg(not(feature = "mainnet-native"))] -pub type MainnetChainSpec = GenericChainSpec; - -pub fn alphanet_config() -> Result { - AlphanetChainSpec::from_json_bytes( - &include_bytes!("../../../../specs/alphanet/alphanet_raw.json")[..], - ) -} - -pub fn mainnet_config() -> Result { - MainnetChainSpec::from_json_bytes( - &include_bytes!("../../../../specs/mainnet/mainnet_raw.json")[..], - ) -} - -/// Helper function to generate a crypto pair from seeds -pub fn get_from_seed(seed: &str) -> ::Public { - TPublic::Pair::from_string(&format!("//{}", seed), None) - .expect("static values are valid; qed") - .public() -} - -/// Helper function to generate an account ID from seed -pub fn get_account_id_from_seed(seed: &str) -> AccountId -where - AccountPublic: From<::Public>, -{ - AccountPublic::from(get_from_seed::(seed)).into_account() -} diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs deleted file mode 100644 index 01376119..00000000 --- a/node/service/src/lib.rs +++ /dev/null @@ -1,615 +0,0 @@ -// Copyright 2022 Capsule Corp (France) SAS. -// This file is part of Ternoa. - -// Ternoa 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. - -// Ternoa 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 Ternoa. If not, see . - -pub mod chain_spec; -mod rpc; - -use futures::StreamExt; -use sc_chain_spec::ChainSpec; -use sc_client_api::BlockBackend; -use sc_consensus_babe::{self, SlotProportion}; -use sc_executor::{NativeElseWasmExecutor, NativeExecutionDispatch}; -use sc_network::{Event, NetworkService}; -use sc_network_common::service::NetworkEventStream; -use sc_service::{ - config::Configuration, error::Error as ServiceError, RpcHandlers, TFullClient, TaskManager, -}; -use sc_telemetry::{Telemetry, TelemetryWorker}; -use sp_api::ConstructRuntimeApi; -use sp_runtime::traits::Block as BlockT; -use std::sync::Arc; -use ternoa_client::RuntimeApiCollection; -use ternoa_core_primitives::Block; - -use rpc::RpcExtension; - -#[cfg(feature = "alphanet-native")] -pub use ternoa_client::AlphanetExecutorDispatch; - -#[cfg(feature = "mainnet-native")] -pub use ternoa_client::MainnetExecutorDispatch; - -#[cfg(feature = "alphanet-native")] -pub use alphanet_runtime; - -#[cfg(feature = "mainnet-native")] -pub use mainnet_runtime; - -//pub use client::*; - -/// The full client type definition. -type FullClient = - TFullClient>; -type FullBackend = sc_service::TFullBackend; -type FullSelectChain = sc_consensus::LongestChain; -type FullGrandpaBlockImport = sc_finality_grandpa::GrandpaBlockImport< - FullBackend, - Block, - FullClient, - FullSelectChain, ->; -/// The transaction pool type defintion. -pub type TransactionPool = - sc_transaction_pool::FullPool>; - -/// Can be called for a `Configuration` to identify which network the configuration targets. -pub trait IdentifyVariant { - /// Returns `true` if this is a configuration for the `Alphanet` network. - fn is_alphanet(&self) -> bool; - - /// Returns `true` if this is a configuration for the `Mainnet` network. - fn is_mainnet(&self) -> bool; - - /// Returns `true` if this is a configuration for a dev network. - fn is_dev(&self) -> bool; -} - -impl IdentifyVariant for Box { - fn is_alphanet(&self) -> bool { - self.id().starts_with("alphanet") || self.id().starts_with("alpha") - } - - fn is_mainnet(&self) -> bool { - self.id().starts_with("mainnet") || self.id().starts_with("main") - } - - fn is_dev(&self) -> bool { - self.id().ends_with("dev") - } -} - -pub fn new_partial( - config: &Configuration, -) -> Result< - sc_service::PartialComponents< - FullClient, - FullBackend, - FullSelectChain, - sc_consensus::DefaultImportQueue>, - sc_transaction_pool::FullPool>, - ( - impl Fn( - rpc::DenyUnsafe, - rpc::SubscriptionTaskExecutor, - ) -> Result, - ( - sc_consensus_babe::BabeBlockImport< - Block, - FullClient, - FullGrandpaBlockImport, - >, - sc_finality_grandpa::LinkHalf< - Block, - FullClient, - FullSelectChain, - >, - sc_consensus_babe::BabeLink, - ), - sc_finality_grandpa::SharedVoterState, - Option, - ), - >, - ServiceError, -> -where - RuntimeApi: ConstructRuntimeApi> - + Send - + Sync - + 'static, - RuntimeApi::RuntimeApi: - RuntimeApiCollection>, - ExecutorDispatch: NativeExecutionDispatch + 'static, -{ - // First we will initialize some basic node objects and tasks. - - // We take the endpoints that we read from the configuration (specification file) and convert - // them to a pair of (Telemetry worker and Telemetry instance) object. - // - // The Telemetry worker is a background task which is going to be passed to the task manager - // object. It's a libp2p web-socked like object. Low level stuff. - // The Telemetry instance is a object that can be used to send telemetry messages. - let telemetry = config - .telemetry_endpoints - .clone() - .filter(|x| !x.is_empty()) - .map(|endpoints| -> Result<_, sc_telemetry::Error> { - let worker = TelemetryWorker::new(16)?; - let telemetry = worker.handle().new_telemetry(endpoints); - Ok((worker, telemetry)) - }) - .transpose()?; - - // Object that is used to execute runtime functions specified by it's name. The runtime can - // either but native or wasm. - let executor = NativeElseWasmExecutor::::new( - config.wasm_method, - config.default_heap_pages, - config.max_runtime_instances, - config.runtime_cache_size, - ); - - // This creates some basic objects that we need in order to have a node. - // Client is the substrate client that glues everything together - // Backend is the DB database where we store data - // Keystore Container contains our secret and public SR25519, ECDSA or ED25519 keys - // Task managers manages async tasks - let (client, backend, keystore_container, task_manager) = - sc_service::new_full_parts::( - config, - telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()), - executor, - )?; - let client = Arc::new(client); - - // The Telemetry worker is now being spawn as a tokio async task. If we don't call this the - // worker will not do anything. - let telemetry = telemetry.map(|(worker, telemetry)| { - task_manager.spawn_handle().spawn("telemetry", None, worker.run()); - telemetry - }); - - // The basic node initialization is done. We have the basic node objects initialized and the - // telemetry worker is ready to do some work. - - // The SelectChain trait defines the strategy upon which the head is chosen - // if multiple forks are present for an opaque definition of "best" in the - // specific chain build. - let select_chain = sc_consensus::LongestChain::new(backend.clone()); - - // The transaction pool is here to receive and validate incoming transactions. It spawns two - // validation tasks that will be used by the transaction pool to validate transactions. - let transaction_pool = sc_transaction_pool::BasicPool::new_full( - config.transaction_pool.clone(), - config.role.is_authority().into(), - config.prometheus_registry(), - task_manager.spawn_essential_handle(), - client.clone(), - ); - - // Grandpa Block Importer: This scans each imported block for signals of changing authority set. - // If the block being imported enacts an authority set change then: - // - If the current authority set is still live: we import the block - // - Otherwise, the block must include a valid justification. - // - // LinkHalf: Link between the block importer and the background voter. - // - // Additional documentation: - // First, create a block-import wrapper with the block_import function. The GRANDPA worker needs - // to be linked together with this block import object, so a LinkHalf is returned as well. All - // blocks imported (from network or consensus or otherwise) must pass through this wrapper, - // otherwise consensus is likely to break in unexpected ways. - let (grandpa_block_import, grandpa_link) = sc_finality_grandpa::block_import( - client.clone(), - &(client.clone() as Arc<_>), - select_chain.clone(), - telemetry.as_ref().map(|x| x.handle()), - )?; - let justification_import = grandpa_block_import.clone(); - - // Babe Block Importer: This scans each imported block for epoch change signals. The signals are - // tracked in a tree (of all forks), and the import logic validates all epoch change - // transitions, i.e. whether a given epoch change is expected or whether it is missing. - // - // BabeLink: State that must be shared between the import queue and the authoring logic. - let (block_import, babe_link) = sc_consensus_babe::block_import( - sc_consensus_babe::configuration(&*client)?, - grandpa_block_import, - client.clone(), - )?; - - let slot_duration = babe_link.config().slot_duration(); - // TODO? I think it's data that it's provided to the runtime from the native environment. - let create_inherent_data_providers = move |_, ()| async move { - let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *timestamp, - slot_duration, - ); - - let uncles = - sp_authorship::InherentDataProvider::<::Header>::check_inherents(); - - Ok((slot, timestamp, uncles)) - }; - // Starts an import queue for the BABE consensus algorithm. - // Instantiate a new basic queue, with given verifier. - // - // This method returns the import queue, some data that needs to be passed to the block - // authoring logic (`BabeLink`), and a future that must be run to - // completion and is responsible for listening to finality notifications and - // pruning the epoch changes tree. - // - // This creates a background task, and calls `on_start` on the justification importer. - // TODO? - let import_queue = sc_consensus_babe::import_queue( - babe_link.clone(), - block_import.clone(), - Some(Box::new(justification_import)), - client.clone(), - select_chain.clone(), - create_inherent_data_providers, - &task_manager.spawn_essential_handle(), - config.prometheus_registry(), - telemetry.as_ref().map(|x| x.handle()), - )?; - - let import_setup = (block_import, grandpa_link, babe_link); - - // We want to extended the current RPC interface functionality with additional RPC endpoints. - let (rpc_extensions_builder, rpc_setup) = { - let (_, grandpa_link, babe_link) = &import_setup; - // General Node RPC Config - let client = client.clone(); - let pool = transaction_pool.clone(); - let select_chain = select_chain.clone(); - let chain_spec = config.chain_spec.cloned_box(); - let keystore = keystore_container.sync_keystore(); - - // Babe RPC Config - let babe_config = babe_link.config().clone(); - let shared_epoch_changes = babe_link.epoch_changes().clone(); - - // Grandpa RPC Config - let shared_voter_state = sc_finality_grandpa::SharedVoterState::empty(); - let shared_authority_set = grandpa_link.shared_authority_set().clone(); - let justification_stream = grandpa_link.justification_stream(); - let finality_proof_provider = sc_finality_grandpa::FinalityProofProvider::new_for_service( - backend.clone(), - Some(shared_authority_set.clone()), - ); - - // Rest - let rpc_setup = shared_voter_state.clone(); - let rpc_backend = backend.clone(); - - // Calling this function will extend the IO interface with additional RPC Pallet specific - // calls. - let rpc_extensions_builder = - move |deny_unsafe, subscription_executor| -> Result { - let deps = rpc::FullDeps { - client: client.clone(), - pool: pool.clone(), - select_chain: select_chain.clone(), - chain_spec: chain_spec.cloned_box(), - deny_unsafe, - babe: rpc::BabeDeps { - babe_config: babe_config.clone(), - shared_epoch_changes: shared_epoch_changes.clone(), - keystore: keystore.clone(), - }, - grandpa: rpc::GrandpaDeps { - shared_voter_state: shared_voter_state.clone(), - shared_authority_set: shared_authority_set.clone(), - justification_stream: justification_stream.clone(), - subscription_executor, - finality_provider: finality_proof_provider.clone(), - }, - }; - - rpc::create_full(deps, rpc_backend.clone()).map_err(Into::into) - }; - - (rpc_extensions_builder, rpc_setup) - }; - - Ok(sc_service::PartialComponents { - client, - backend, - task_manager, - keystore_container, - select_chain, - import_queue, - transaction_pool, - other: (rpc_extensions_builder, import_setup, rpc_setup, telemetry), - }) -} - -/// Result of [`new_full_base`]. -pub struct NewFullBase -where - RuntimeApi: ConstructRuntimeApi> - + Send - + Sync - + 'static, - RuntimeApi::RuntimeApi: - RuntimeApiCollection>, - ExecutorDispatch: NativeExecutionDispatch + 'static, -{ - /// The task manager of the node. - pub task_manager: TaskManager, - /// The client instance of the node. - pub client: Arc>, - /// The networking service of the node. - pub network: Arc::Hash>>, - /// The transaction pool of the node. - pub transaction_pool: Arc>, - /// The rpc handlers of the node. - pub rpc_handlers: RpcHandlers, -} - -/// Creates a full service from the configuration. -pub fn new_full_base( - mut config: Configuration, - with_startup_data: impl FnOnce( - &sc_consensus_babe::BabeBlockImport< - Block, - FullClient, - FullGrandpaBlockImport, - >, - &sc_consensus_babe::BabeLink, - ), -) -> Result, ServiceError> -where - RuntimeApi: ConstructRuntimeApi> - + Send - + Sync - + 'static, - RuntimeApi::RuntimeApi: - RuntimeApiCollection>, - ExecutorDispatch: NativeExecutionDispatch + 'static, -{ - // Initialize the core part of the node - let sc_service::PartialComponents { - client, - backend, - mut task_manager, - import_queue, - keystore_container, - select_chain, - transaction_pool, - other: (rpc_extensions_builder, import_setup, rpc_setup, mut telemetry), - } = new_partial::(&config)?; - - let shared_voter_state = rpc_setup; - let auth_disc_publish_non_global_ips = config.network.allow_non_globals_in_dht; - - let grandpa_protocol_name = sc_finality_grandpa::protocol_standard_name( - &client.block_hash(0).ok().flatten().expect("Genesis block exists; qed"), - &config.chain_spec, - ); - - config - .network - .extra_sets - .push(sc_finality_grandpa::grandpa_peers_set_config(grandpa_protocol_name.clone())); - let warp_sync = Arc::new(sc_finality_grandpa::warp_proof::NetworkProvider::new( - backend.clone(), - import_setup.1.shared_authority_set().clone(), - Vec::default(), - )); - - let (network, system_rpc_tx, tx_handler_controller, network_starter) = - sc_service::build_network(sc_service::BuildNetworkParams { - config: &config, - client: client.clone(), - transaction_pool: transaction_pool.clone(), - spawn_handle: task_manager.spawn_handle(), - import_queue, - block_announce_validator_builder: None, - warp_sync: Some(warp_sync), - })?; - - if config.offchain_worker.enabled { - sc_service::build_offchain_workers( - &config, - task_manager.spawn_handle(), - client.clone(), - network.clone(), - ); - } - - let role = config.role.clone(); - let force_authoring = config.force_authoring; - let backoff_authoring_blocks = - Some(sc_consensus_slots::BackoffAuthoringOnFinalizedHeadLagging::default()); - let name = config.network.node_name.clone(); - let enable_grandpa = !config.disable_grandpa; - let prometheus_registry = config.prometheus_registry().cloned(); - - let rpc_handlers = sc_service::spawn_tasks(sc_service::SpawnTasksParams { - config, - backend, - client: client.clone(), - keystore: keystore_container.sync_keystore(), - network: network.clone(), - rpc_builder: Box::new(rpc_extensions_builder), - transaction_pool: transaction_pool.clone(), - task_manager: &mut task_manager, - system_rpc_tx, - tx_handler_controller, - telemetry: telemetry.as_mut(), - })?; - - let (block_import, grandpa_link, babe_link) = import_setup; - - (with_startup_data)(&block_import, &babe_link); - - if let sc_service::config::Role::Authority { .. } = &role { - let proposer = sc_basic_authorship::ProposerFactory::new( - task_manager.spawn_handle(), - client.clone(), - transaction_pool.clone(), - prometheus_registry.as_ref(), - telemetry.as_ref().map(|x| x.handle()), - ); - - let client_clone = client.clone(); - let slot_duration = babe_link.config().slot_duration(); - let babe_config = sc_consensus_babe::BabeParams { - keystore: keystore_container.sync_keystore(), - client: client.clone(), - select_chain, - env: proposer, - block_import, - sync_oracle: network.clone(), - justification_sync_link: network.clone(), - create_inherent_data_providers: move |parent, ()| { - let client_clone = client_clone.clone(); - async move { - let uncles = sc_consensus_uncles::create_uncles_inherent_data_provider( - &*client_clone, - parent, - )?; - - let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *timestamp, - slot_duration, - ); - - let storage_proof = - sp_transaction_storage_proof::registration::new_data_provider( - &*client_clone, - &parent, - )?; - - Ok((slot, timestamp, uncles, storage_proof)) - } - }, - force_authoring, - backoff_authoring_blocks, - babe_link, - block_proposal_slot_portion: SlotProportion::new(0.5), - max_block_proposal_slot_portion: None, - telemetry: telemetry.as_ref().map(|x| x.handle()), - }; - - let babe = sc_consensus_babe::start_babe(babe_config)?; - task_manager.spawn_essential_handle().spawn_blocking( - "babe-proposer", - Some("block-authoring"), - babe, - ); - } - - // Spawn authority discovery module. - if role.is_authority() { - let authority_discovery_role = - sc_authority_discovery::Role::PublishAndDiscover(keystore_container.keystore()); - let dht_event_stream = - network.event_stream("authority-discovery").filter_map(|e| async move { - match e { - Event::Dht(e) => Some(e), - _ => None, - } - }); - let (authority_discovery_worker, _service) = - sc_authority_discovery::new_worker_and_service_with_config( - sc_authority_discovery::WorkerConfig { - publish_non_global_ips: auth_disc_publish_non_global_ips, - ..Default::default() - }, - client.clone(), - network.clone(), - Box::pin(dht_event_stream), - authority_discovery_role, - prometheus_registry.clone(), - ); - - task_manager.spawn_handle().spawn( - "authority-discovery-worker", - Some("networking"), - authority_discovery_worker.run(), - ); - } - - // if the node isn't actively participating in consensus then it doesn't - // need a keystore, regardless of which protocol we use below. - let keystore = - if role.is_authority() { Some(keystore_container.sync_keystore()) } else { None }; - - let config = sc_finality_grandpa::Config { - // FIXME #1578 make this available through chainspec - gossip_duration: std::time::Duration::from_millis(333), - justification_period: 512, - name: Some(name), - observer_enabled: false, - keystore, - local_role: role, - telemetry: telemetry.as_ref().map(|x| x.handle()), - protocol_name: grandpa_protocol_name, - }; - - if enable_grandpa { - // start the full GRANDPA voter - // NOTE: non-authorities could run the GRANDPA observer protocol, but at - // this point the full voter should provide better guarantees of block - // and vote data availability than the observer. The observer has not - // been tested extensively yet and having most nodes in a network run it - // could lead to finality stalls. - let grandpa_config = sc_finality_grandpa::GrandpaParams { - config, - link: grandpa_link, - network: network.clone(), - telemetry: telemetry.as_ref().map(|x| x.handle()), - voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(), - prometheus_registry, - shared_voter_state, - }; - - // the GRANDPA voter task is considered infallible, i.e. - // if it fails we take down the service with it. - task_manager.spawn_essential_handle().spawn_blocking( - "grandpa-voter", - None, - sc_finality_grandpa::run_grandpa_voter(grandpa_config)?, - ); - } - - network_starter.start_network(); - Ok(NewFullBase { task_manager, client, network, transaction_pool, rpc_handlers }) -} - -/// Builds a new service for a full client. -pub fn new_full( - config: Configuration, -) -> Result -where - RuntimeApi: ConstructRuntimeApi> - + Send - + Sync - + 'static, - RuntimeApi::RuntimeApi: - RuntimeApiCollection>, - ExecutorDispatch: NativeExecutionDispatch + 'static, -{ - new_full_base(config, |_, _| ()) - .map(|NewFullBase:: { task_manager, .. }| task_manager) -} diff --git a/node/src/benchmarking.rs b/node/src/benchmarking.rs new file mode 100644 index 00000000..66e3d31d --- /dev/null +++ b/node/src/benchmarking.rs @@ -0,0 +1,180 @@ +// Copyright 2022 Capsule Corp (France) SAS. +// This file is part of Ternoa. + +// Ternoa 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. + +// Ternoa 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 Ternoa. If not, see . + +//! Setup code for [`super::command`] which would otherwise bloat that module. +//! +//! Should only be used for benchmarking as it may break in other contexts. + +use crate::service::FullClient; + +use alphanet_runtime as runtime; +use runtime::{BalancesCall, SystemCall}; +use sc_cli::Result; +use sc_client_api::BlockBackend; +use sp_core::{Encode, Pair}; +use sp_inherents::{InherentData, InherentDataProvider}; +use sp_keyring::Sr25519Keyring; +use sp_runtime::{OpaqueExtrinsic, SaturatedConversion}; +use ternoa_core_primitives::{AccountId, Balance, Signature}; +use serde::{Deserialize, Serialize}; + +use std::{sync::Arc, time::Duration}; + +/// Generates extrinsics for the `benchmark overhead` command. +/// +/// Note: Should only be used for benchmarking. +pub struct RemarkBuilder { + client: Arc, +} + +impl RemarkBuilder { + /// Creates a new [`Self`] from the given client. + pub fn new(client: Arc) -> Self { + Self { client } + } +} + +impl frame_benchmarking_cli::ExtrinsicBuilder for RemarkBuilder { + fn pallet(&self) -> &str { + "system" + } + + fn extrinsic(&self) -> &str { + "remark" + } + + fn build(&self, nonce: u32) -> std::result::Result { + let acc = Sr25519Keyring::Bob.pair(); + let extrinsic: OpaqueExtrinsic = create_benchmark_extrinsic( + self.client.as_ref(), + acc, + SystemCall::remark { remark: vec![] }.into(), + nonce, + ) + .into(); + + Ok(extrinsic) + } +} + +/// Generates `Balances::TransferKeepAlive` extrinsics for the benchmarks. +/// +/// Note: Should only be used for benchmarking. +pub struct TransferKeepAliveBuilder { + client: Arc, + dest: AccountId, + value: Balance, +} + +impl TransferKeepAliveBuilder { + /// Creates a new [`Self`] from the given client. + pub fn new(client: Arc, dest: AccountId, value: Balance) -> Self { + Self { client, dest, value } + } +} + +impl frame_benchmarking_cli::ExtrinsicBuilder for TransferKeepAliveBuilder { + fn pallet(&self) -> &str { + "balances" + } + + fn extrinsic(&self) -> &str { + "transfer_keep_alive" + } + + fn build(&self, nonce: u32) -> std::result::Result { + let acc = Sr25519Keyring::Bob.pair(); + let extrinsic: OpaqueExtrinsic = create_benchmark_extrinsic( + self.client.as_ref(), + acc, + BalancesCall::transfer_keep_alive { + dest: self.dest.clone().into(), + value: self.value.into(), + } + .into(), + nonce, + ) + .into(); + + Ok(extrinsic) + } +} + +/// Create a transaction using the given `call`. +/// +/// Note: Should only be used for benchmarking. +pub fn create_benchmark_extrinsic( + client: &FullClient, + sender: sp_core::sr25519::Pair, + call: runtime::RuntimeCall, + nonce: u32, +) -> runtime::UncheckedExtrinsic { + let genesis_hash = client.block_hash(0).ok().flatten().expect("Genesis block exists; qed"); + let best_hash = client.chain_info().best_hash; + let best_block = client.chain_info().best_number; + + let period = ternoa_runtime_common::BlockHashCount::get() + .checked_next_power_of_two() + .map(|c| c / 2) + .unwrap_or(2) as u64; + let extra: runtime::SignedExtra = ( + frame_system::CheckSpecVersion::::new(), + frame_system::CheckTxVersion::::new(), + frame_system::CheckGenesis::::new(), + frame_system::CheckEra::::from(sp_runtime::generic::Era::mortal( + period, + best_block.saturated_into(), + )), + frame_system::CheckNonce::::from(nonce), + frame_system::CheckWeight::::new(), + pallet_transaction_payment::ChargeTransactionPayment::::from(0), + ); + + let raw_payload = runtime::SignedPayload::from_raw( + call.clone(), + extra.clone(), + ( + runtime::VERSION.spec_version, + runtime::VERSION.transaction_version, + genesis_hash, + best_hash, + (), + (), + (), + ), + ); + let signature = raw_payload.using_encoded(|e| sender.sign(e)); + + runtime::UncheckedExtrinsic::new_signed( + call.clone(), + sp_runtime::AccountId32::from(sender.public()).into(), + Signature::Sr25519(signature.clone()), + extra.clone(), + ) +} + +/// Generates inherent data for the `benchmark overhead` command. +/// +/// Note: Should only be used for benchmarking. +pub fn inherent_benchmark_data() -> Result { + let mut inherent_data = InherentData::new(); + let d = Duration::from_millis(0); + let timestamp = sp_timestamp::InherentDataProvider::new(d.into()); + + futures::executor::block_on(timestamp.provide_inherent_data(&mut inherent_data)) + .map_err(|e| format!("creating inherent data: {:?}", e))?; + Ok(inherent_data) +} \ No newline at end of file diff --git a/node/service/src/chain_spec/alphanet.rs b/node/src/chain_spec.rs similarity index 75% rename from node/service/src/chain_spec/alphanet.rs rename to node/src/chain_spec.rs index 23cc549e..3271cf10 100644 --- a/node/service/src/chain_spec/alphanet.rs +++ b/node/src/chain_spec.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Ternoa. If not, see . -use super::{get_account_id_from_seed, get_from_seed, AlphanetChainSpec as ChainSpec}; +use hex_literal::hex; use alphanet_runtime::{ constants::currency::CAPS, wasm_binary_unwrap, AuthorityDiscoveryConfig, BabeConfig, BalancesConfig, CouncilConfig, GenesisConfig, GrandpaConfig, ImOnlineConfig, SessionConfig, @@ -23,12 +23,62 @@ use alphanet_runtime::{ use pallet_im_online::sr25519::AuthorityId as ImOnlineId; use pallet_staking::Forcing; use sc_chain_spec::ChainType; -use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; use sp_consensus_babe::AuthorityId as BabeId; -use sp_core::sr25519; -use sp_finality_grandpa::AuthorityId as GrandpaId; -use sp_runtime::{BoundedVec, Perbill}; -use ternoa_core_primitives::AccountId; +use sp_core::{crypto::UncheckedInto, sr25519, Pair, Public}; +use sp_consensus_grandpa::AuthorityId as GrandpaId; +use sp_runtime::{ + traits::{IdentifyAccount, Verify}, + BoundedVec, Perbill, +}; +use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; +use ternoa_core_primitives::{AccountId, Block, Signature}; +use serde::{Deserialize, Serialize}; + +use sc_chain_spec::{ChainSpecExtension, GenericChainSpec}; +/// Node `ChainSpec` extensions. +/// +/// Additional parameters for some Substrate core modules, +/// customizable from the chain spec. +#[derive(Default, Clone, Serialize, Deserialize, ChainSpecExtension)] +#[serde(rename_all = "camelCase")] +pub struct Extensions { + /// Block numbers with known hashes. + pub fork_blocks: sc_client_api::ForkBlocks, + /// Known bad block hashes. + pub bad_blocks: sc_client_api::BadBlocks, + /// The light sync state. + /// + /// This value will be set by the `sync-state rpc` implementation. + pub light_sync_state: sc_sync_state_rpc::LightSyncStateExtension, +} +pub type AlphanetChainSpec = GenericChainSpec; + +// The URL for the telemetry server. +const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/"; + +/// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type. +pub type ChainSpec = sc_service::GenericChainSpec; + +pub type AuthorityKeys = + (AccountId, AccountId, GrandpaId, BabeId, ImOnlineId, AuthorityDiscoveryId); + + +/// Generate a crypto pair from seed. +pub fn get_from_seed(seed: &str) -> ::Public { + TPublic::Pair::from_string(&format!("//{}", seed), None) + .expect("static values are valid; qed") + .public() +} + +type AccountPublic = ::Signer; + +/// Generate an account ID from seed. +pub fn get_account_id_from_seed(seed: &str) -> AccountId +where + AccountPublic: From<::Public>, +{ + AccountPublic::from(get_from_seed::(seed)).into_account() +} fn session_keys( grandpa: GrandpaId, @@ -39,13 +89,9 @@ fn session_keys( SessionKeys { grandpa, babe, im_online, authority_discovery } } -pub type AuthorityKeys = - (AccountId, AccountId, GrandpaId, BabeId, ImOnlineId, AuthorityDiscoveryId); - pub fn sr25519_account_from_seed(seed: &str) -> AccountId { get_account_id_from_seed::(seed) } - /// Helper function to generate stash, controller and session key from seed pub fn authority_keys_from_seed(seed: &str) -> AuthorityKeys { ( @@ -58,6 +104,7 @@ pub fn authority_keys_from_seed(seed: &str) -> AuthorityKeys { ) } + pub struct GenesisInput { pub initial_authorities: Vec, pub committee_members: Vec, @@ -170,4 +217,4 @@ pub fn genesis(input: GenesisInput) -> GenesisConfig { phragmen_election: Default::default(), assets: Default::default(), } -} +} \ No newline at end of file diff --git a/node/src/cli.rs b/node/src/cli.rs new file mode 100644 index 00000000..8d332011 --- /dev/null +++ b/node/src/cli.rs @@ -0,0 +1,67 @@ +use sc_cli::RunCmd; + +#[derive(Debug, clap::Parser)] +pub struct Cli { + #[command(subcommand)] + pub subcommand: Option, + + #[clap(flatten)] + pub run: RunCmd, + + /// Disable automatic hardware benchmarks. + /// + /// By default these benchmarks are automatically ran at startup and measure + /// the CPU speed, the memory bandwidth and the disk speed. + /// + /// The results are then printed out in the logs, and also sent as part of + /// telemetry, if telemetry is enabled. + #[arg(long)] + pub no_hardware_benchmarks: bool, + + #[allow(missing_docs)] + #[clap(flatten)] + pub storage_monitor: sc_storage_monitor::StorageMonitorParams, +} + +#[derive(Debug, clap::Subcommand)] +pub enum Subcommand { + /// Key management cli utilities + #[command(subcommand)] + Key(sc_cli::KeySubcommand), + + /// Build a chain specification. + BuildSpec(sc_cli::BuildSpecCmd), + + /// Validate blocks. + CheckBlock(sc_cli::CheckBlockCmd), + + /// Export blocks. + ExportBlocks(sc_cli::ExportBlocksCmd), + + /// Export the state of a given block into a chain spec. + ExportState(sc_cli::ExportStateCmd), + + /// Import blocks. + ImportBlocks(sc_cli::ImportBlocksCmd), + + /// Remove the whole chain. + PurgeChain(sc_cli::PurgeChainCmd), + + /// Revert the chain to a previous state. + Revert(sc_cli::RevertCmd), + + /// Sub-commands concerned with benchmarking. + #[command(subcommand)] + Benchmark(frame_benchmarking_cli::BenchmarkCmd), + + /// Try some command against runtime state. + #[cfg(feature = "try-runtime")] + TryRuntime(try_runtime_cli::TryRuntimeCmd), + + /// Try some command against runtime state. Note: `try-runtime` feature must be enabled. + #[cfg(not(feature = "try-runtime"))] + TryRuntime, + + /// Db meta columns information. + ChainInfo(sc_cli::ChainInfoCmd), +} \ No newline at end of file diff --git a/node/src/command.rs b/node/src/command.rs new file mode 100644 index 00000000..dc91618f --- /dev/null +++ b/node/src/command.rs @@ -0,0 +1,229 @@ +use crate::{ + benchmarking::{inherent_benchmark_data, RemarkBuilder, TransferKeepAliveBuilder}, + chain_spec, + cli::{Cli, Subcommand}, + service, +}; +use frame_benchmarking_cli::{BenchmarkCmd, ExtrinsicFactory, SUBSTRATE_REFERENCE_HARDWARE}; +use alphanet_runtime::{Block}; +pub use ternoa_runtime_common::constants::currency::EXISTENTIAL_DEPOSIT; +use sc_cli::{ChainSpec, RuntimeVersion, SubstrateCli}; +use sc_service::PartialComponents; +use sp_keyring::Sr25519Keyring; + +#[cfg(feature = "try-runtime")] +use { + alphanet_runtime::constants::time::SLOT_DURATION, + try_runtime_cli::block_building_info::substrate_info, +}; + +impl SubstrateCli for Cli { + fn impl_name() -> String { + "Substrate Node".into() + } + + fn impl_version() -> String { + env!("SUBSTRATE_CLI_IMPL_VERSION").into() + } + + fn description() -> String { + env!("CARGO_PKG_DESCRIPTION").into() + } + + fn author() -> String { + env!("CARGO_PKG_AUTHORS").into() + } + + fn support_url() -> String { + "support.anonymous.an".into() + } + + fn copyright_start_year() -> i32 { + 2017 + } + + fn load_spec(&self, id: &str) -> std::result::Result, String> { + Ok(match id { + // "alphanet" => Box::new(chain_spec::alphanet_config()?), + // #[cfg(feature = "alphanet-native")] + "alphanet-dev" | "a-dev" | "dev" => Box::new(chain_spec::development_config()), + + // "mainnet" => Box::new(chain_spec::mainnet_config()?), + // #[cfg(feature = "mainnet-native")] + // "mainnet-dev" | "m-dev" => Box::new(chain_spec::mainnet::development_config()), + + "" => return Err("Please specify which chain you want to run!".into()), + path => { + let path = std::path::PathBuf::from(path); + Box::new(chain_spec::AlphanetChainSpec::from_json_file(path)?) + }, + }) + } + fn native_runtime_version(_: &Box) -> &'static RuntimeVersion { + &alphanet_runtime::VERSION + } +} + +/// Parse and run command line arguments +pub fn run() -> sc_cli::Result<()> { + let cli = Cli::from_args(); + + match &cli.subcommand { + Some(Subcommand::Key(cmd)) => cmd.run(&cli), + Some(Subcommand::BuildSpec(cmd)) => { + let runner = cli.create_runner(cmd)?; + runner.sync_run(|config| cmd.run(config.chain_spec, config.network)) + }, + Some(Subcommand::CheckBlock(cmd)) => { + let runner = cli.create_runner(cmd)?; + runner.async_run(|config| { + let PartialComponents { client, task_manager, import_queue, .. } = + service::new_partial(&config)?; + Ok((cmd.run(client, import_queue), task_manager)) + }) + }, + Some(Subcommand::ExportBlocks(cmd)) => { + let runner = cli.create_runner(cmd)?; + runner.async_run(|config| { + let PartialComponents { client, task_manager, .. } = service::new_partial(&config)?; + Ok((cmd.run(client, config.database), task_manager)) + }) + }, + Some(Subcommand::ExportState(cmd)) => { + let runner = cli.create_runner(cmd)?; + runner.async_run(|config| { + let PartialComponents { client, task_manager, .. } = service::new_partial(&config)?; + Ok((cmd.run(client, config.chain_spec), task_manager)) + }) + }, + Some(Subcommand::ImportBlocks(cmd)) => { + let runner = cli.create_runner(cmd)?; + runner.async_run(|config| { + let PartialComponents { client, task_manager, import_queue, .. } = + service::new_partial(&config)?; + Ok((cmd.run(client, import_queue), task_manager)) + }) + }, + Some(Subcommand::PurgeChain(cmd)) => { + let runner = cli.create_runner(cmd)?; + runner.sync_run(|config| cmd.run(config.database)) + }, + Some(Subcommand::Revert(cmd)) => { + let runner = cli.create_runner(cmd)?; + runner.async_run(|config| { + let PartialComponents { client, task_manager, backend, .. } = + service::new_partial(&config)?; + let aux_revert = Box::new(|client, _, blocks| { + sc_consensus_grandpa::revert(client, blocks)?; + Ok(()) + }); + Ok((cmd.run(client, backend, Some(aux_revert)), task_manager)) + }) + }, + Some(Subcommand::Benchmark(cmd)) => { + let runner = cli.create_runner(cmd)?; + + runner.sync_run(|config| { + // This switch needs to be in the client, since the client decides + // which sub-commands it wants to support. + match cmd { + BenchmarkCmd::Pallet(cmd) => { + if !cfg!(feature = "runtime-benchmarks") { + return Err( + "Runtime benchmarking wasn't enabled when building the node. \ + You can enable it with `--features runtime-benchmarks`." + .into(), + ) + } + + cmd.run::(config) + }, + BenchmarkCmd::Block(cmd) => { + let PartialComponents { client, .. } = service::new_partial(&config)?; + cmd.run(client) + }, + #[cfg(not(feature = "runtime-benchmarks"))] + BenchmarkCmd::Storage(_) => Err( + "Storage benchmarking can be enabled with `--features runtime-benchmarks`." + .into(), + ), + #[cfg(feature = "runtime-benchmarks")] + BenchmarkCmd::Storage(cmd) => { + let PartialComponents { client, backend, .. } = + service::new_partial(&config)?; + let db = backend.expose_db(); + let storage = backend.expose_storage(); + + cmd.run(config, client, db, storage) + }, + BenchmarkCmd::Overhead(cmd) => { + let PartialComponents { client, .. } = service::new_partial(&config)?; + let ext_builder = RemarkBuilder::new(client.clone()); + + cmd.run( + config, + client, + inherent_benchmark_data()?, + Vec::new(), + &ext_builder, + ) + }, + BenchmarkCmd::Extrinsic(cmd) => { + let PartialComponents { client, .. } = service::new_partial(&config)?; + // Register the *Remark* and *TKA* builders. + let ext_factory = ExtrinsicFactory(vec![ + Box::new(RemarkBuilder::new(client.clone())), + Box::new(TransferKeepAliveBuilder::new( + client.clone(), + Sr25519Keyring::Alice.to_account_id(), + EXISTENTIAL_DEPOSIT, + )), + ]); + + cmd.run(client, inherent_benchmark_data()?, Vec::new(), &ext_factory) + }, + BenchmarkCmd::Machine(cmd) => + cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone()), + } + }) + }, + #[cfg(feature = "try-runtime")] + Some(Subcommand::TryRuntime(cmd)) => { + use crate::service::ExecutorDispatch; + use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch}; + let runner = cli.create_runner(cmd)?; + runner.async_run(|config| { + // we don't need any of the components of new_partial, just a runtime, or a task + // manager to do `async_run`. + let registry = config.prometheus_config.as_ref().map(|cfg| &cfg.registry); + let task_manager = + sc_service::TaskManager::new(config.tokio_handle.clone(), registry) + .map_err(|e| sc_cli::Error::Service(sc_service::Error::Prometheus(e)))?; + + let info_provider = substrate_info(SLOT_DURATION); + + Ok(( + cmd.run::::ExtendHostFunctions, + >, _>(Some(info_provider)), + task_manager, + )) + }) + }, + #[cfg(not(feature = "try-runtime"))] + Some(Subcommand::TryRuntime) => Err("TryRuntime wasn't enabled when building the node. \ + You can enable it with `--features try-runtime`." + .into()), + Some(Subcommand::ChainInfo(cmd)) => { + let runner = cli.create_runner(cmd)?; + runner.sync_run(|config| cmd.run::(&config)) + }, + None => { + let runner = cli.create_runner(&cli.run)?; + runner.run_node_until_exit(|config| async move { + service::new_full(config, cli).map_err(sc_cli::Error::Service) + }) + }, + } +} \ No newline at end of file diff --git a/node/cli/src/lib.rs b/node/src/lib.rs similarity index 77% rename from node/cli/src/lib.rs rename to node/src/lib.rs index 229420cb..d8d16b1d 100644 --- a/node/cli/src/lib.rs +++ b/node/src/lib.rs @@ -13,16 +13,7 @@ // You should have received a copy of the GNU General Public License // along with Ternoa. If not, see . - -#[cfg(feature = "cli")] -mod cli; -#[cfg(feature = "cli")] -mod command; - -#[cfg(feature = "cli")] -pub use cli::*; -#[cfg(feature = "cli")] -pub use command::*; - -#[cfg(feature = "cli")] -pub use sc_cli::Result; +pub mod chain_spec; +pub mod rpc; +pub mod service; +mod cli; \ No newline at end of file diff --git a/src/main.rs b/node/src/main.rs similarity index 77% rename from src/main.rs rename to node/src/main.rs index 31d771da..23ab1062 100644 --- a/src/main.rs +++ b/node/src/main.rs @@ -13,7 +13,17 @@ // You should have received a copy of the GNU General Public License // along with Ternoa. If not, see . +//! Substrate Node Template CLI library. +#![warn(missing_docs)] -fn main() -> ternoa_cli::Result<()> { - ternoa_cli::run() -} +mod chain_spec; +#[macro_use] +mod service; +mod benchmarking; +mod cli; +mod command; +mod rpc; + +fn main() -> sc_cli::Result<()> { + command::run() +} \ No newline at end of file diff --git a/node/service/src/rpc.rs b/node/src/rpc.rs similarity index 67% rename from node/service/src/rpc.rs rename to node/src/rpc.rs index c99ccc63..41ee8624 100644 --- a/node/service/src/rpc.rs +++ b/node/src/rpc.rs @@ -1,36 +1,29 @@ -// Copyright 2022 Capsule Corp (France) SAS. -// This file is part of Ternoa. +//! A collection of node-specific RPC methods. +//! Substrate provides the `sc-rpc` crate, which defines the core RPC layer +//! used by Substrate nodes. This file extends those RPC definitions with +//! capabilities that are specific to this project's runtime configuration. -// Ternoa 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. - -// Ternoa 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 Ternoa. If not, see . +#![warn(missing_docs)] use std::sync::Arc; use jsonrpsee::RpcModule; +use ternoa_core_primitives::{AccountId, Balance, Block, BlockNumber, Hash, Index}; use sc_client_api::AuxStore; use sc_consensus_babe::{BabeConfiguration, Epoch}; use sc_consensus_epochs::SharedEpochChanges; -use sc_finality_grandpa::{ +use sc_consensus_grandpa::{ FinalityProofProvider, GrandpaJustificationStream, SharedAuthoritySet, SharedVoterState, }; -pub use sc_rpc::{DenyUnsafe, SubscriptionTaskExecutor}; +use sc_rpc::SubscriptionTaskExecutor; +pub use sc_rpc_api::DenyUnsafe; +use sc_transaction_pool_api::TransactionPool; use sp_api::ProvideRuntimeApi; +use sp_block_builder::BlockBuilder; use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; +use sp_consensus::SelectChain; +use sp_consensus_babe::BabeApi; use sp_keystore::SyncCryptoStorePtr; -use ternoa_core_primitives::{AccountId, Balance, Block, BlockNumber, Hash, Index}; - -/// A type representing all RPC extensions. -pub type RpcExtension = RpcModule<()>; /// Extra dependencies for BABE. pub struct BabeDeps { @@ -77,10 +70,10 @@ pub struct FullDeps { /// Instantiate all Full RPC extensions. pub fn create_full( deps: FullDeps, - backend: Arc, -) -> Result> +) -> Result, Box> where C: ProvideRuntimeApi + + sc_client_api::BlockBackend + HeaderBackend + AuxStore + HeaderMetadata @@ -89,19 +82,18 @@ where + 'static, C::Api: substrate_frame_rpc_system::AccountNonceApi, C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, - C::Api: sp_consensus_babe::BabeApi, - C::Api: sp_block_builder::BlockBuilder, - P: sc_transaction_pool_api::TransactionPool + Sync + Send + 'static, - SC: sp_consensus::SelectChain + 'static, + C::Api: BabeApi, + C::Api: BlockBuilder, + P: TransactionPool + 'static, + SC: SelectChain + 'static, B: sc_client_api::Backend + Send + Sync + 'static, B::State: sc_client_api::backend::StateBackend>, { use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; use sc_consensus_babe_rpc::{Babe, BabeApiServer}; - use sc_finality_grandpa_rpc::{Grandpa, GrandpaApiServer}; - use sc_sync_state_rpc::{SyncState, SyncStateApiServer}; + use sc_consensus_grandpa_rpc::{Grandpa, GrandpaApiServer}; + use sc_rpc_spec_v2::chain_spec::{ChainSpec, ChainSpecApiServer}; use substrate_frame_rpc_system::{System, SystemApiServer}; - use substrate_state_trie_migration_rpc::{StateMigration, StateMigrationApiServer}; let mut io = RpcModule::new(()); let FullDeps { client, pool, select_chain, chain_spec, deny_unsafe, babe, grandpa } = deps; @@ -115,8 +107,15 @@ where finality_provider, } = grandpa; - io.merge(StateMigration::new(client.clone(), backend, deny_unsafe).into_rpc())?; - io.merge(System::new(client.clone(), pool.clone(), deny_unsafe).into_rpc())?; + let chain_name = chain_spec.name().to_string(); + let genesis_hash = client.block_hash(0).ok().flatten().expect("Genesis block exists; qed"); + let properties = chain_spec.properties(); + io.merge(ChainSpec::new(chain_name, genesis_hash, properties).into_rpc())?; + + io.merge(System::new(client.clone(), pool, deny_unsafe).into_rpc())?; + // Making synchronous calls in light client freezes the browser currently, + // more context: https://github.com/paritytech/substrate/pull/3480 + // These RPCs should use an asynchronous caller instead. io.merge(TransactionPayment::new(client.clone()).into_rpc())?; io.merge( Babe::new( @@ -139,9 +138,6 @@ where ) .into_rpc(), )?; - io.merge( - SyncState::new(chain_spec, client, shared_authority_set, shared_epoch_changes)?.into_rpc(), - )?; Ok(io) -} +} \ No newline at end of file diff --git a/node/src/service.rs b/node/src/service.rs new file mode 100644 index 00000000..4070353a --- /dev/null +++ b/node/src/service.rs @@ -0,0 +1,468 @@ +//! Service and ServiceFactory implementation. Specialized wrapper over substrate service. + +use std::{sync::Arc}; + +use sp_runtime::traits::Block as BlockT; + +use sc_client_api::BlockBackend; +use sc_consensus_babe::SlotProportion; +use sc_network::NetworkService; +use sc_network_common::sync::warp::WarpSyncParams; +use sc_network_sync::SyncingService; +use sc_rpc_api::DenyUnsafe; +use sc_service::{error::Error as ServiceError, Configuration, TaskManager, RpcHandlers}; +use sc_telemetry::{Telemetry, TelemetryWorker}; +pub use sc_executor::NativeElseWasmExecutor; + +use frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE; + +use alphanet_runtime::RuntimeApi; +use ternoa_core_primitives::Block; + +use crate::cli::Cli; +use crate::rpc::{FullDeps, BabeDeps, GrandpaDeps, create_full}; +// Our native executor instance. +pub struct ExecutorDispatch; + +impl sc_executor::NativeExecutionDispatch for ExecutorDispatch { + /// Only enable the benchmarking host functions when we actually want to benchmark. + #[cfg(feature = "runtime-benchmarks")] + type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; + /// Otherwise we only use the default Substrate host functions. + #[cfg(not(feature = "runtime-benchmarks"))] + type ExtendHostFunctions = (); + + fn dispatch(method: &str, data: &[u8]) -> Option> { + alphanet_runtime::api::dispatch(method, data) + } + + fn native_version() -> sc_executor::NativeVersion { + alphanet_runtime::native_version() + } +} + +pub type FullClient = + sc_service::TFullClient>; +type FullBackend = sc_service::TFullBackend; +type FullSelectChain = sc_consensus::LongestChain; +/// The transaction pool type defintion. +pub type TransactionPool = sc_transaction_pool::FullPool; +type FullGrandpaBlockImport = + sc_consensus_grandpa::GrandpaBlockImport; + +/// Builds a new service for a full client. +pub fn new_full(config: Configuration, cli: Cli) -> Result { + let database_source = config.database.clone(); + let task_manager = new_full_base(config, cli.no_hardware_benchmarks, |_, _| ()) + .map(|NewFullBase { task_manager, .. }| task_manager)?; + + sc_storage_monitor::StorageMonitorService::try_spawn( + cli.storage_monitor, + database_source, + &task_manager.spawn_essential_handle(), + ) + .map_err(|e| ServiceError::Application(e.into()))?; + + Ok(task_manager) +} + +/// Result of [`new_full_base`]. +pub struct NewFullBase { + /// The task manager of the node. + pub task_manager: TaskManager, + /// The client instance of the node. + pub client: Arc, + /// The networking service of the node. + pub network: Arc::Hash>>, + /// The syncing service of the node. + pub sync: Arc>, + /// The transaction pool of the node. + pub transaction_pool: Arc, + /// The rpc handlers of the node. + pub rpc_handlers: RpcHandlers, +} + +/// Creates a full service from the configuration. +pub fn new_full_base( + mut config: Configuration, + disable_hardware_benchmarks: bool, + with_startup_data: impl FnOnce( + &sc_consensus_babe::BabeBlockImport, + &sc_consensus_babe::BabeLink, + ), +) -> Result { + let hwbench = (!disable_hardware_benchmarks) + .then_some(config.database.path().map(|database_path| { + let _ = std::fs::create_dir_all(&database_path); + sc_sysinfo::gather_hwbench(Some(database_path)) + })) + .flatten(); + + let sc_service::PartialComponents { + client, + backend, + mut task_manager, + import_queue, + keystore_container, + select_chain, + transaction_pool, + other: (rpc_builder, import_setup, rpc_setup, mut telemetry), + } = new_partial(&config)?; + + let shared_voter_state = rpc_setup; + let grandpa_protocol_name = sc_consensus_grandpa::protocol_standard_name( + &client.block_hash(0).ok().flatten().expect("Genesis block exists; qed"), + &config.chain_spec, + ); + + config + .network + .extra_sets + .push(sc_consensus_grandpa::grandpa_peers_set_config(grandpa_protocol_name.clone())); + let warp_sync = Arc::new(sc_consensus_grandpa::warp_proof::NetworkProvider::new( + backend.clone(), + import_setup.1.shared_authority_set().clone(), + Vec::default(), + )); + + let (network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) = + sc_service::build_network(sc_service::BuildNetworkParams { + config: &config, + client: client.clone(), + transaction_pool: transaction_pool.clone(), + spawn_handle: task_manager.spawn_handle(), + import_queue, + block_announce_validator_builder: None, + warp_sync_params: Some(WarpSyncParams::WithProvider(warp_sync)), + })?; + + if config.offchain_worker.enabled { + sc_service::build_offchain_workers( + &config, + task_manager.spawn_handle(), + client.clone(), + network.clone(), + ); + } + + let role = config.role.clone(); + let force_authoring = config.force_authoring; + let backoff_authoring_blocks = + Some(sc_consensus_slots::BackoffAuthoringOnFinalizedHeadLagging::default()); + let name = config.network.node_name.clone(); + let enable_grandpa = !config.disable_grandpa; + let prometheus_registry = config.prometheus_registry().cloned(); + + let rpc_handlers = sc_service::spawn_tasks(sc_service::SpawnTasksParams { + config, + backend, + client: client.clone(), + keystore: keystore_container.sync_keystore(), + network: network.clone(), + rpc_builder: Box::new(rpc_builder), + transaction_pool: transaction_pool.clone(), + task_manager: &mut task_manager, + system_rpc_tx, + tx_handler_controller, + sync_service: sync_service.clone(), + telemetry: telemetry.as_mut(), + })?; + + if let Some(hwbench) = hwbench { + sc_sysinfo::print_hwbench(&hwbench); + if !SUBSTRATE_REFERENCE_HARDWARE.check_hardware(&hwbench) && role.is_authority() { + log::warn!( + "⚠️ The hardware does not meet the minimal requirements for role 'Authority'." + ); + } + + if let Some(ref mut telemetry) = telemetry { + let telemetry_handle = telemetry.handle(); + task_manager.spawn_handle().spawn( + "telemetry_hwbench", + None, + sc_sysinfo::initialize_hwbench_telemetry(telemetry_handle, hwbench), + ); + } + } + + let (block_import, grandpa_link, babe_link) = import_setup; + + (with_startup_data)(&block_import, &babe_link); + + if let sc_service::config::Role::Authority { .. } = &role { + let proposer = sc_basic_authorship::ProposerFactory::new( + task_manager.spawn_handle(), + client.clone(), + transaction_pool.clone(), + prometheus_registry.as_ref(), + telemetry.as_ref().map(|x| x.handle()), + ); + + let client_clone = client.clone(); + let slot_duration = babe_link.config().slot_duration(); + let babe_config = sc_consensus_babe::BabeParams { + keystore: keystore_container.sync_keystore(), + client: client.clone(), + select_chain, + env: proposer, + block_import, + sync_oracle: sync_service.clone(), + justification_sync_link: sync_service.clone(), + create_inherent_data_providers: move |parent, ()| { + let client_clone = client_clone.clone(); + async move { + let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); + + let slot = + sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration( + *timestamp, + slot_duration, + ); + + let storage_proof = + sp_transaction_storage_proof::registration::new_data_provider( + &*client_clone, + &parent, + )?; + + Ok((slot, timestamp, storage_proof)) + } + }, + force_authoring, + backoff_authoring_blocks, + babe_link, + block_proposal_slot_portion: SlotProportion::new(0.5), + max_block_proposal_slot_portion: None, + telemetry: telemetry.as_ref().map(|x| x.handle()), + }; + + let babe = sc_consensus_babe::start_babe(babe_config)?; + task_manager.spawn_essential_handle().spawn_blocking( + "babe-proposer", + Some("block-authoring"), + babe, + ); + } + + // if the node isn't actively participating in consensus then it doesn't + // need a keystore, regardless of which protocol we use below. + let keystore = + if role.is_authority() { Some(keystore_container.sync_keystore()) } else { None }; + + let config = sc_consensus_grandpa::Config { + // FIXME #1578 make this available through chainspec + gossip_duration: std::time::Duration::from_millis(333), + justification_period: 512, + name: Some(name), + observer_enabled: false, + keystore, + local_role: role, + telemetry: telemetry.as_ref().map(|x| x.handle()), + protocol_name: grandpa_protocol_name, + }; + + if enable_grandpa { + // start the full GRANDPA voter + // NOTE: non-authorities could run the GRANDPA observer protocol, but at + // this point the full voter should provide better guarantees of block + // and vote data availability than the observer. The observer has not + // been tested extensively yet and having most nodes in a network run it + // could lead to finality stalls. + let grandpa_config = sc_consensus_grandpa::GrandpaParams { + config, + link: grandpa_link, + network: network.clone(), + sync: Arc::new(sync_service.clone()), + telemetry: telemetry.as_ref().map(|x| x.handle()), + voting_rule: sc_consensus_grandpa::VotingRulesBuilder::default().build(), + prometheus_registry, + shared_voter_state, + }; + + // the GRANDPA voter task is considered infallible, i.e. + // if it fails we take down the service with it. + task_manager.spawn_essential_handle().spawn_blocking( + "grandpa-voter", + None, + sc_consensus_grandpa::run_grandpa_voter(grandpa_config)?, + ); + } + + network_starter.start_network(); + Ok(NewFullBase { + task_manager, + client, + network, + sync: sync_service, + transaction_pool, + rpc_handlers, + }) +} + +/// Creates a new partial node. +pub fn new_partial( + config: &Configuration, +) -> Result< + sc_service::PartialComponents< + FullClient, + FullBackend, + FullSelectChain, + sc_consensus::DefaultImportQueue, + sc_transaction_pool::FullPool, + ( + impl Fn( + DenyUnsafe, + sc_rpc::SubscriptionTaskExecutor, + ) -> Result, sc_service::Error>, + ( + sc_consensus_babe::BabeBlockImport, + sc_consensus_grandpa::LinkHalf, + sc_consensus_babe::BabeLink, + ), + sc_consensus_grandpa::SharedVoterState, + Option, + ), + >, + ServiceError, +> { + let telemetry = config + .telemetry_endpoints + .clone() + .filter(|x| !x.is_empty()) + .map(|endpoints| -> Result<_, sc_telemetry::Error> { + let worker = TelemetryWorker::new(16)?; + let telemetry = worker.handle().new_telemetry(endpoints); + Ok((worker, telemetry)) + }) + .transpose()?; + + let executor = NativeElseWasmExecutor::::new( + config.wasm_method, + config.default_heap_pages, + config.max_runtime_instances, + config.runtime_cache_size, + ); + + let (client, backend, keystore_container, task_manager) = + sc_service::new_full_parts::( + config, + telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()), + executor, + )?; + let client = Arc::new(client); + + let telemetry = telemetry.map(|(worker, telemetry)| { + task_manager.spawn_handle().spawn("telemetry", None, worker.run()); + telemetry + }); + + let select_chain = sc_consensus::LongestChain::new(backend.clone()); + + let transaction_pool = sc_transaction_pool::BasicPool::new_full( + config.transaction_pool.clone(), + config.role.is_authority().into(), + config.prometheus_registry(), + task_manager.spawn_essential_handle(), + client.clone(), + ); + + let (grandpa_block_import, grandpa_link) = sc_consensus_grandpa::block_import( + client.clone(), + &(client.clone() as Arc<_>), + select_chain.clone(), + telemetry.as_ref().map(|x| x.handle()), + )?; + let justification_import = grandpa_block_import.clone(); + + let (block_import, babe_link) = sc_consensus_babe::block_import( + sc_consensus_babe::configuration(&*client)?, + grandpa_block_import, + client.clone(), + )?; + + let slot_duration = babe_link.config().slot_duration(); + let import_queue = sc_consensus_babe::import_queue( + babe_link.clone(), + block_import.clone(), + Some(Box::new(justification_import)), + client.clone(), + select_chain.clone(), + move |_, ()| async move { + let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); + + let slot = + sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration( + *timestamp, + slot_duration, + ); + + Ok((slot, timestamp)) + }, + &task_manager.spawn_essential_handle(), + config.prometheus_registry(), + telemetry.as_ref().map(|x| x.handle()), + )?; + + let import_setup = (block_import, grandpa_link, babe_link); + + let (rpc_extensions_builder, rpc_setup) = { + let (_, grandpa_link, babe_link) = &import_setup; + + let justification_stream = grandpa_link.justification_stream(); + let shared_authority_set = grandpa_link.shared_authority_set().clone(); + let shared_voter_state = sc_consensus_grandpa::SharedVoterState::empty(); + let shared_voter_state2 = shared_voter_state.clone(); + + let finality_proof_provider = sc_consensus_grandpa::FinalityProofProvider::new_for_service( + backend.clone(), + Some(shared_authority_set.clone()), + ); + + let babe_config = babe_link.config().clone(); + let shared_epoch_changes = babe_link.epoch_changes().clone(); + + let client = client.clone(); + let pool = transaction_pool.clone(); + let select_chain = select_chain.clone(); + let keystore = keystore_container.sync_keystore(); + let chain_spec = config.chain_spec.cloned_box(); + + let rpc_extensions_builder = move |deny_unsafe, subscription_executor| { + let deps = FullDeps { + client: client.clone(), + pool: pool.clone(), + select_chain: select_chain.clone(), + chain_spec: chain_spec.cloned_box(), + deny_unsafe, + babe: BabeDeps { + babe_config: babe_config.clone(), + shared_epoch_changes: shared_epoch_changes.clone(), + keystore: keystore.clone(), + }, + grandpa: GrandpaDeps { + shared_voter_state: shared_voter_state.clone(), + shared_authority_set: shared_authority_set.clone(), + justification_stream: justification_stream.clone(), + subscription_executor, + finality_provider: finality_proof_provider.clone(), + }, + }; + + create_full(deps).map_err(Into::into) + }; + + (rpc_extensions_builder, shared_voter_state2) + }; + + Ok(sc_service::PartialComponents { + client, + backend, + task_manager, + keystore_container, + select_chain, + import_queue, + transaction_pool, + other: (rpc_extensions_builder, import_setup, rpc_setup, telemetry), + }) +} \ No newline at end of file diff --git a/runtime/alphanet/Cargo.toml b/runtime/alphanet/Cargo.toml index f0f9e233..18253cc6 100644 --- a/runtime/alphanet/Cargo.toml +++ b/runtime/alphanet/Cargo.toml @@ -25,6 +25,7 @@ pallet-offences = { workspace = true, default-features = false } pallet-preimage = { workspace = true, default-features = false } pallet-session = { workspace = true, features = ["historical"], default-features = false } pallet-staking = { workspace = true, default-features = false } +pallet-staking-runtime-api = { workspace = true, default-features = false } pallet-staking-reward-curve = { workspace = true, default-features = false } pallet-timestamp = { workspace = true, default-features = false } pallet-transaction-payment = { workspace = true, default-features = false } @@ -39,9 +40,13 @@ pallet-elections-phragmen = { workspace = true, default-features = false } pallet-multisig = { workspace = true, default-features = false } pallet-identity = { workspace = true, default-features = false } pallet-assets = { workspace = true, default-features = false } +pallet-contracts = { workspace = true, default-features = false } +pallet-contracts-primitives = { workspace = true, default-features = false } +pallet-insecure-randomness-collective-flip = { workspace = true, default-features = false } # Benchmarking -frame-benchmarking = { workspace = true, default-features = false, optional = true } +frame-benchmarking = { workspace = true, default-features = false } +frame-benchmarking-pallet-pov = { workspace = true, default-features = false } frame-system-benchmarking = { workspace = true, default-features = false, optional = true } pallet-session-benchmarking = { workspace = true, default-features = false, optional = true } pallet-offences-benchmarking = { workspace = true, default-features = false, optional = true } @@ -54,6 +59,7 @@ sp-api = { workspace = true, default-features = false } sp-authority-discovery = { workspace = true, default-features = false } sp-block-builder = { workspace = true, default-features = false } sp-consensus-babe = { workspace = true, default-features = false } +sp-consensus-grandpa = { workspace = true, default-features = false } sp-core = { workspace = true, default-features = false } sp-inherents = { workspace = true, default-features = false } sp-io = { workspace = true, default-features = false } @@ -113,12 +119,16 @@ std = [ "frame-support/std", "frame-system-rpc-runtime-api/std", "frame-system/std", - "frame-benchmarking?/std", + "frame-benchmarking/std", + "frame-benchmarking-pallet-pov/std", "pallet-authority-discovery/std", "pallet-authorship/std", "pallet-babe/std", "pallet-bags-list/std", "pallet-balances/std", + "pallet-contracts/std", + "pallet-contracts-primitives/std", + "pallet-insecure-randomness-collective-flip/std", "pallet-election-provider-multi-phase/std", "pallet-grandpa/std", "pallet-im-online/std", @@ -128,6 +138,7 @@ std = [ "pallet-session/std", "pallet-session-benchmarking?/std", "pallet-staking/std", + "pallet-staking-runtime-api/std", "pallet-timestamp/std", "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-payment/std", @@ -150,6 +161,8 @@ std = [ "sp-tracing/std", "sp-transaction-pool/std", "sp-version/std", + "sp-consensus-grandpa/std", + "sp-io/std", "frame-try-runtime?/std", "pallet-collective/std", "pallet-membership/std", @@ -159,10 +172,13 @@ std = [ "pallet-multisig/std", "pallet-identity/std", "pallet-assets/std", + #"substrate-wasm-builder", ] + runtime-benchmarks = [ - "frame-benchmarking", + "frame-benchmarking/runtime-benchmarks", + "frame-benchmarking-pallet-pov/runtime-benchmarks", "frame-election-provider-support/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", @@ -171,6 +187,8 @@ runtime-benchmarks = [ "pallet-bags-list/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "pallet-collective/runtime-benchmarks", + "pallet-contracts/runtime-benchmarks", + "pallet-insecure-randomness-collective-flip/try-runtime", "pallet-election-provider-multi-phase/runtime-benchmarks", "pallet-grandpa/runtime-benchmarks", "pallet-im-online/runtime-benchmarks", @@ -203,6 +221,7 @@ runtime-benchmarks = [ try-runtime = [ "frame-try-runtime", + "frame-benchmarking-pallet-pov/try-runtime", "frame-executive/try-runtime", "frame-support/try-runtime", "frame-system/try-runtime", @@ -211,6 +230,7 @@ try-runtime = [ "pallet-babe/try-runtime", "pallet-bags-list/try-runtime", "pallet-balances/try-runtime", + "pallet-contracts/try-runtime", "pallet-election-provider-multi-phase/try-runtime", "pallet-grandpa/try-runtime", "pallet-im-online/try-runtime", @@ -218,7 +238,7 @@ try-runtime = [ "pallet-preimage/try-runtime", "pallet-session/try-runtime", "pallet-staking/try-runtime", - # "pallet-staking-reward-curve/try-runtime", + #"pallet-staking-reward-curve/try-runtime", "pallet-timestamp/try-runtime", "pallet-transaction-payment/try-runtime", "pallet-treasury/try-runtime", diff --git a/runtime/alphanet/build.rs b/runtime/alphanet/build.rs index f751573a..902b4a23 100644 --- a/runtime/alphanet/build.rs +++ b/runtime/alphanet/build.rs @@ -17,9 +17,12 @@ use substrate_wasm_builder::WasmBuilder; fn main() { - WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() - .build() + #[cfg(feature = "std")] + { + substrate_wasm_builder::WasmBuilder::new() + .with_current_project() + .export_heap_base() + .import_memory() + .build(); + } } diff --git a/runtime/alphanet/constants/Cargo.toml b/runtime/alphanet/constants/Cargo.toml index b897a49e..0805e06e 100644 --- a/runtime/alphanet/constants/Cargo.toml +++ b/runtime/alphanet/constants/Cargo.toml @@ -11,9 +11,15 @@ frame-support = { workspace = true, default-features = false } ternoa-core-primitives = { path = "../../../core-primitives", default-features = false } ternoa-runtime-common = { package = "ternoa-runtime-common", path = "../../common", default-features = false } sp-runtime = { workspace = true, default-features = false } +sp-weights = { workspace = true, default-features = false } +sp-core = { workspace = true, default-features = false } [features] default = ["std"] std = [ - "sp-runtime/std" + "frame-support/std", + "sp-core/std", + "sp-runtime/std", + "sp-weights/std" ] + diff --git a/runtime/alphanet/constants/src/weights/block_weights.rs b/runtime/alphanet/constants/src/weights/block_weights.rs index 9edabcd1..25171e9c 100644 --- a/runtime/alphanet/constants/src/weights/block_weights.rs +++ b/runtime/alphanet/constants/src/weights/block_weights.rs @@ -25,31 +25,30 @@ // --warmup=10 // --repeat=100 -use frame_support::{ - parameter_types, - weights::{constants::WEIGHT_PER_NANOS, Weight}, -}; +use sp_core::parameter_types; +use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; parameter_types! { /// Time to execute an empty block. - /// Calculated by multiplying the *Average* with `1` and adding `0`. + /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 6_070_338, 6_380_029 - /// Average: 6_124_337 - /// Median: 6_110_461 - /// Std-Dev: 52095.81 + /// Min, Max: 6_708_387, 7_042_534 + /// Average: 6_818_965 + /// Median: 6_826_464 + /// Std-Dev: 66350.7 /// /// Percentiles nanoseconds: - /// 99th: 6_274_637 - /// 95th: 6_222_840 - /// 75th: 6_141_364 - pub const BlockExecutionWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(6_124_337); + /// 99th: 6_991_352 + /// 95th: 6_933_543 + /// 75th: 6_854_332 + pub const BlockExecutionWeight: Weight = + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(6_818_965), 0); } #[cfg(test)] mod test_weights { - use frame_support::weights::constants; + use sp_weights::constants; /// Checks that the weight exists and is sane. // NOTE: If this test fails but you are sure that the generated values are fine, @@ -60,12 +59,12 @@ mod test_weights { // At least 100 µs. assert!( - w.ref_time() >= 100u64 * constants::WEIGHT_PER_MICROS.ref_time(), + w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS, "Weight should be at least 100 µs." ); // At most 50 ms. assert!( - w.ref_time() <= 50u64 * constants::WEIGHT_PER_MILLIS.ref_time(), + w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS, "Weight should be at most 50 ms." ); } diff --git a/runtime/alphanet/constants/src/weights/extrinsic_weights.rs b/runtime/alphanet/constants/src/weights/extrinsic_weights.rs index f2de9a3b..fccbd711 100644 --- a/runtime/alphanet/constants/src/weights/extrinsic_weights.rs +++ b/runtime/alphanet/constants/src/weights/extrinsic_weights.rs @@ -25,31 +25,30 @@ // --warmup=10 // --repeat=100 -use frame_support::{ - parameter_types, - weights::{constants::WEIGHT_PER_NANOS, Weight}, -}; +use sp_core::parameter_types; +use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; parameter_types! { /// Time to execute a NO-OP extrinsic, for example `System::remark`. - /// Calculated by multiplying the *Average* with `1` and adding `0`. + /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// - /// Stats [NS]: - /// Min, Max: 85_946, 88_408 - /// Average: 86_309 - /// Median: 86_213 - /// Std-Dev: 345.03 + /// Stats nanoseconds: + /// Min, Max: 105_285, 107_713 + /// Average: 106_013 + /// Median: 105_990 + /// Std-Dev: 441.55 /// - /// Percentiles [NS]: - /// 99th: 87_527 - /// 95th: 86_901 - /// 75th: 86_308 - pub const ExtrinsicBaseWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(86_298); + /// Percentiles nanoseconds: + /// 99th: 107_324 + /// 95th: 106_820 + /// 75th: 106_178 + pub const ExtrinsicBaseWeight: Weight = + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(106_013), 0); } #[cfg(test)] mod test_weights { - use frame_support::weights::constants; + use sp_weights::constants; /// Checks that the weight exists and is sane. // NOTE: If this test fails but you are sure that the generated values are fine, @@ -60,13 +59,13 @@ mod test_weights { // At least 10 µs. assert!( - w.ref_time() >= 10u64 * constants::WEIGHT_PER_MICROS.ref_time(), + w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS, "Weight should be at least 10 µs." ); // At most 1 ms. assert!( - w.ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Weight should be at most 1 ms." ); } -} +} \ No newline at end of file diff --git a/runtime/alphanet/constants/src/weights/paritydb_weights.rs b/runtime/alphanet/constants/src/weights/paritydb_weights.rs index dabd0f4b..89463848 100644 --- a/runtime/alphanet/constants/src/weights/paritydb_weights.rs +++ b/runtime/alphanet/constants/src/weights/paritydb_weights.rs @@ -24,8 +24,8 @@ pub mod constants { /// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights /// are available for brave runtime engineers who may want to try this out as default. pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 8_000 * constants::WEIGHT_PER_NANOS.ref_time(), - write: 50_000 * constants::WEIGHT_PER_NANOS.ref_time(), + read: 8_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + write: 50_000 * constants::WEIGHT_REF_TIME_PER_NANOS, }; } @@ -41,20 +41,20 @@ pub mod constants { fn sane() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + 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_PER_MICROS.ref_time(), + 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_PER_MILLIS.ref_time(), + 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_PER_MILLIS.ref_time(), + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Write weight should be at most 1 ms." ); } diff --git a/runtime/alphanet/constants/src/weights/rocksdb_weights.rs b/runtime/alphanet/constants/src/weights/rocksdb_weights.rs index 91a4ca8a..cad0ecf0 100644 --- a/runtime/alphanet/constants/src/weights/rocksdb_weights.rs +++ b/runtime/alphanet/constants/src/weights/rocksdb_weights.rs @@ -24,8 +24,8 @@ pub mod constants { /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout /// the runtime. pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 25_000 * constants::WEIGHT_PER_NANOS.ref_time(), - write: 100_000 * constants::WEIGHT_PER_NANOS.ref_time(), + read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS, }; } @@ -41,22 +41,22 @@ pub mod constants { fn sane() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + 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_PER_MICROS.ref_time(), + 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_PER_MILLIS.ref_time(), + 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_PER_MILLIS.ref_time(), + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Write weight should be at most 1 ms." ); } } -} +} \ No newline at end of file diff --git a/runtime/alphanet/src/lib.rs b/runtime/alphanet/src/lib.rs index 85cfcac6..8f414af6 100644 --- a/runtime/alphanet/src/lib.rs +++ b/runtime/alphanet/src/lib.rs @@ -51,7 +51,7 @@ use sp_runtime::{ }; use sp_std::prelude::*; use sp_version::RuntimeVersion; -use ternoa_core_primitives::{AccountId, Balance, BlockNumber, Index, Signature}; +use ternoa_core_primitives::{AccountId, Balance, BlockNumber, Index, Signature, Hash}; use ternoa_runtime_common::{impl_runtime_weights, BlockLength}; pub use version::VERSION; @@ -65,6 +65,11 @@ pub use pallets::StakerStatus; #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); +/// Max size for serialized extrinsic params for this testing runtime. +/// This is a quite arbitrary but empirically battle tested value. +#[cfg(test)] +pub const CALL_PARAMS_MAX_SIZE: usize = 208; + /// Wasm binary unwrapped. If built with `SKIP_WASM_BUILD`, the function panics. #[cfg(feature = "std")] pub fn wasm_binary_unwrap() -> &'static [u8] { @@ -149,6 +154,8 @@ construct_runtime!( Rent: ternoa_rent = 33, TEE: ternoa_tee = 34, TransmissionProtocols: ternoa_transmission_protocols = 35, + RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip = 36, + Contracts: pallet_contracts = 37, } ); @@ -184,9 +191,7 @@ pub type SignedPayload = generic::SignedPayload; /// Extrinsic type that has already been checked. pub type CheckedExtrinsic = generic::CheckedExtrinsic; pub type Migrations = ( - pallet_election_provider_multi_phase::migrations::v1::MigrateToV1, - // pallet_balances::migration::MigrateToTrackInactive, - pallet_assets::migration::v1::MigrateToV1, + ); /// Executive: handles dispatch to the various modules. @@ -254,21 +259,21 @@ impl_runtime_apis! { } } - impl fg_primitives::GrandpaApi for Runtime { - fn grandpa_authorities() -> GrandpaAuthorityList { + impl sp_consensus_grandpa::GrandpaApi for Runtime { + fn grandpa_authorities() -> sp_consensus_grandpa::AuthorityList { Grandpa::grandpa_authorities() } - fn current_set_id() -> fg_primitives::SetId { + fn current_set_id() -> sp_consensus_grandpa::SetId { Grandpa::current_set_id() } fn submit_report_equivocation_unsigned_extrinsic( - equivocation_proof: fg_primitives::EquivocationProof< + equivocation_proof: sp_consensus_grandpa::EquivocationProof< ::Hash, NumberFor, >, - key_owner_proof: fg_primitives::OpaqueKeyOwnershipProof, + key_owner_proof: sp_consensus_grandpa::OpaqueKeyOwnershipProof, ) -> Option<()> { let key_owner_proof = key_owner_proof.decode()?; @@ -279,17 +284,18 @@ impl_runtime_apis! { } fn generate_key_ownership_proof( - _set_id: fg_primitives::SetId, + _set_id: sp_consensus_grandpa::SetId, authority_id: GrandpaId, - ) -> Option { + ) -> Option { use parity_scale_codec::Encode; - Historical::prove((fg_primitives::KEY_TYPE, authority_id)) + Historical::prove((sp_consensus_grandpa::KEY_TYPE, authority_id)) .map(|p| p.encode()) - .map(fg_primitives::OpaqueKeyOwnershipProof::new) + .map(sp_consensus_grandpa::OpaqueKeyOwnershipProof::new) } } + impl sp_consensus_babe::BabeApi for Runtime { fn configuration() -> sp_consensus_babe::BabeConfiguration { let epoch_config = Babe::epoch_config().unwrap_or(BABE_GENESIS_EPOCH_CONFIG); @@ -351,6 +357,79 @@ impl_runtime_apis! { } } + impl pallet_contracts::ContractsApi for Runtime + { + fn call( + origin: AccountId, + dest: AccountId, + value: Balance, + gas_limit: Option, + storage_deposit_limit: Option, + input_data: Vec, + ) -> pallet_contracts_primitives::ContractExecResult { + let gas_limit = gas_limit.unwrap_or(BlockWeights::get().max_block); + Contracts::bare_call( + origin, + dest, + value, + gas_limit, + storage_deposit_limit, + input_data, + true, + pallet_contracts::Determinism::Deterministic, + ) + } + + fn instantiate( + origin: AccountId, + value: Balance, + gas_limit: Option, + storage_deposit_limit: Option, + code: pallet_contracts_primitives::Code, + data: Vec, + salt: Vec, + ) -> pallet_contracts_primitives::ContractInstantiateResult + { + let gas_limit = gas_limit.unwrap_or(BlockWeights::get().max_block); + Contracts::bare_instantiate( + origin, + value, + gas_limit, + storage_deposit_limit, + code, + data, + salt, + true + ) + } + + fn upload_code( + origin: AccountId, + code: Vec, + storage_deposit_limit: Option, + determinism: pallet_contracts::Determinism, + ) -> pallet_contracts_primitives::CodeUploadResult + { + Contracts::bare_upload_code( + origin, + code, + storage_deposit_limit, + determinism, + ) + } + + fn get_storage( + address: AccountId, + key: Vec, + ) -> pallet_contracts_primitives::GetStorageResult { + Contracts::get_storage( + address, + key + ) + } + } + + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi< Block, Balance, @@ -362,6 +441,12 @@ impl_runtime_apis! { fn query_fee_details(uxt: ::Extrinsic, len: u32) -> FeeDetails { TransactionPayment::query_fee_details(uxt, len) } + fn query_weight_to_fee(weight: Weight) -> Balance { + TransactionPayment::weight_to_fee(weight) + } + fn query_length_to_fee(length: u32) -> Balance { + TransactionPayment::length_to_fee(length) + } } impl sp_session::SessionKeys for Runtime { @@ -378,26 +463,23 @@ impl_runtime_apis! { #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { - fn on_runtime_upgrade() -> (Weight, Weight) { - log::info!("try-runtime::on_runtime_upgrade."); + fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to // have a backtrace here. If any of the pre/post migration checks fail, we shall stop // right here and right now. - let weight = Executive::try_runtime_upgrade().map_err(|err|{ - log::info!("try-runtime::on_runtime_upgrade failed with: {:?}", err); - err - }).unwrap(); + let weight = Executive::try_runtime_upgrade(checks).unwrap(); (weight, BlockWeights::get().max_block) } fn execute_block( block: Block, state_root_check: bool, + signature_check: bool, select: frame_try_runtime::TryStateSelect ) -> Weight { // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to // have a backtrace here. - Executive::try_execute_block(block, state_root_check, select).expect("execute-block failed") + Executive::try_execute_block(block, state_root_check, signature_check, select).unwrap() } } @@ -461,7 +543,7 @@ extern crate frame_benchmarking; #[cfg(feature = "runtime-benchmarks")] mod benches { - define_benchmarks!( + frame_benchmarking::define_benchmarks!( // Ternoa [ternoa_staking_rewards, StakingRewards] [ternoa_bridge, Bridge] @@ -477,6 +559,7 @@ mod benches { [pallet_balances, Balances] [frame_benchmarking::baseline, Baseline::] [pallet_collective, TechnicalCommittee] + [pallet_contracts, Contracts] [pallet_election_provider_multi_phase, ElectionProviderMultiPhase] [pallet_grandpa, Grandpa] [pallet_im_online, ImOnline] @@ -568,10 +651,10 @@ mod tests { fn call_size() { let size = core::mem::size_of::(); assert!( - size <= 208, - "size of RuntimeCall {} is more than 208 bytes: some calls have too big arguments, use Box to reduce the - size of RuntimeCall. - If the limit is too strong, maybe consider increase the limit to 300.", + size <= CALL_PARAMS_MAX_SIZE, + "size of RuntimeCall {} is more than {CALL_PARAMS_MAX_SIZE} bytes. + Some calls have too big arguments, use Box to reduce the size of RuntimeCall. + If the limit is too strong, maybe consider increase the limit.", size, ); } diff --git a/runtime/alphanet/src/pallets.rs b/runtime/alphanet/src/pallets.rs index 1bde6415..4aba865f 100644 --- a/runtime/alphanet/src/pallets.rs +++ b/runtime/alphanet/src/pallets.rs @@ -24,7 +24,8 @@ use common::{ use frame_election_provider_support::{SequentialPhragmen, Weight}; use frame_support::{ parameter_types, - traits::{ConstU32, EitherOfDiverse, KeyOwnerProofSystem, U128CurrencyToVote, AsEnsureOriginWithArg}, + dispatch::DispatchClass, + traits::{ConstU32, EitherOfDiverse, KeyOwnerProofSystem, U128CurrencyToVote, AsEnsureOriginWithArg, Nothing, ConstBool}, weights::{constants::RocksDbWeight, ConstantMultiplier, IdentityFee}, PalletId, }; @@ -45,7 +46,7 @@ use sp_version::RuntimeVersion; use static_assertions::const_assert; use ternoa_core_primitives::{AccountId, Balance, BlockNumber, Hash, Index, Moment}; use ternoa_runtime_common as common; -pub use ternoa_runtime_common::constants::currency::UNITS; +pub use ternoa_runtime_common::constants::currency::{ UNITS, deposit }; use crate::{ constants::time::EPOCH_DURATION_IN_SLOTS, AuthorityDiscovery, Babe, BagsList, Balances, @@ -53,7 +54,7 @@ use crate::{ OffchainSolutionLengthLimit, OffchainSolutionWeightLimit, Offences, OriginCaller, PalletInfo, Preimage, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, Scheduler, Session, Signature, SignedPayload, Staking, StakingRewards, System, TechnicalCommittee, Timestamp, - TransactionPayment, Treasury, UncheckedExtrinsic, NFT, TEE, VERSION, + TransactionPayment, Treasury, UncheckedExtrinsic, NFT, TEE, VERSION, RandomnessCollectiveFlip, }; pub use common::babe::BABE_GENESIS_EPOCH_CONFIG; @@ -165,36 +166,25 @@ impl pallet_babe::Config for Runtime { // session module is the trigger type EpochChangeTrigger = common::babe::EpochChangeTrigger; type DisabledValidators = Session; - type KeyOwnerProofSystem = Historical; - type KeyOwnerProof = >::Proof; - type KeyOwnerIdentification = >::IdentificationTuple; - type HandleEquivocation = - pallet_babe::EquivocationHandler; + type KeyOwnerProof = + >::Proof; + type EquivocationReportSystem = + pallet_babe::EquivocationReportSystem; type WeightInfo = (); type MaxAuthorities = common::shared::MaxAuthorities; } +parameter_types! { + pub const MaxSetIdSessionEntries: u32 = BondingDuration::get() * SessionsPerEra::get(); +} + // Grandpa impl pallet_grandpa::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type KeyOwnerProofSystem = Historical; - type KeyOwnerProof = - >::Proof; - type KeyOwnerIdentification = >::IdentificationTuple; - type HandleEquivocation = pallet_grandpa::EquivocationHandler< - Self::KeyOwnerIdentification, - Offences, - ReportLongevity, - >; + type MaxSetIdSessionEntries = MaxSetIdSessionEntries; + type KeyOwnerProof = >::Proof; + type EquivocationReportSystem = + pallet_grandpa::EquivocationReportSystem; type WeightInfo = (); type MaxAuthorities = common::shared::MaxAuthorities; } @@ -227,8 +217,6 @@ impl pallet_session::historical::Config for Runtime { impl pallet_authorship::Config for Runtime { type FindAuthor = pallet_session::FindAccountFromAuthorIndex; - type UncleGenerations = common::authorship::UncleGenerations; - type FilterUncle = (); type EventHandler = (Staking, ImOnline); } @@ -340,7 +328,7 @@ impl pallet_staking::Config for Runtime { type BondingDuration = common::staking::BondingDuration; type SlashDeferDuration = common::staking::SlashDeferDuration; /// A super-majority of the council can cancel the slash. - type SlashCancelOrigin = RootOrAtLeastHalfOfCommittee; + type AdminOrigin = RootOrAtLeastHalfOfCommittee; type SessionInterface = Self; type EraPayout = StakingRewards; type NextNewSession = Session; @@ -367,7 +355,7 @@ impl pallet_election_provider_multi_phase::MinerConfig for Runtime { as frame_election_provider_support::ElectionDataProvider >::MaxVotesPerVoter; - + type MaxWinners = common::election_provider_multi_phase::MaxActiveValidators; // The unsigned submissions have to respect the weight of the submit_unsigned call, thus their // weight estimate function is wired to this call's weight. fn solution_weight(v: u32, t: u32, a: u32, d: u32) -> Weight { @@ -459,6 +447,7 @@ impl pallet_collective::Config for Runtime { type MaxMembers = common::technical_collective::TechnicalMaxMembers; type DefaultVote = pallet_collective::PrimeDefaultVote; type WeightInfo = weights::pallet_collective::WeightInfo; + type SetMembersOrigin = EnsureRoot; } // Pallet Membership @@ -543,6 +532,7 @@ impl pallet_collective::Config for Runtime { type MaxMembers = common::council::CouncilMaxMembers; type DefaultVote = pallet_collective::PrimeDefaultVote; type WeightInfo = weights::pallet_collective::WeightInfo; + type SetMembersOrigin = EnsureRoot; } // Make sure that there are no more than MaxMembers members elected via phragmen. const_assert!( @@ -569,6 +559,7 @@ impl pallet_elections_phragmen::Config for Runtime { type WeightInfo = weights::pallet_elections_phragmen::WeightInfo; type MaxCandidates = common::phragmen_election::MaxCandidates; type MaxVoters = common::phragmen_election::MaxVoters; + type MaxVotesPerVoter = common::phragmen_election::MaxVotesPerVoter; } // Democracy @@ -590,6 +581,7 @@ impl pallet_democracy::Config for Runtime { /// (NTB) vote. type ExternalDefaultOrigin = pallet_collective::EnsureProportionAtLeast; + type SubmitOrigin = EnsureSigned; /// Two thirds of the technical committee can have an `ExternalMajority/ExternalDefault` vote /// be tabled immediately and with a shorter voting/enactment period. type FastTrackOrigin = @@ -710,6 +702,7 @@ impl pallet_assets::Config for Runtime { type StringLimit = common::assets::StringLimit; type Freezer = (); type Extra = (); + type CallbackHandle = (); type WeightInfo = weights::pallet_assets::WeightInfo; type RemoveItemsLimit = ConstU32<1000>; #[cfg(feature = "runtime-benchmarks")] @@ -819,3 +812,47 @@ impl ternoa_transmission_protocols::Config for Runtime { type SimultaneousTransmissionLimit = SimultaneousTransmissionLimit; type ActionsInBlockLimit = ActionsInBlockLimit; } + +impl pallet_insecure_randomness_collective_flip::Config for Runtime {} + +parameter_types! { + pub const DepositPerItem: Balance = deposit(1, 0); + pub const DepositPerByte: Balance = deposit(0, 1); + pub const DeletionQueueDepth: u32 = 128; + // The lazy deletion runs inside on_initialize. + pub DeletionWeightLimit: Weight = BlockWeights::get() + .per_class + .get(DispatchClass::Normal) + .max_total + .unwrap_or(BlockWeights::get().max_block); + pub Schedule: pallet_contracts::Schedule = Default::default(); +} + +impl pallet_contracts::Config for Runtime { + type Time = Timestamp; + type Randomness = RandomnessCollectiveFlip; + type Currency = Balances; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + /// The safest default is to allow no calls at all. + /// + /// Runtimes should whitelist dispatchables that are allowed to be called from contracts + /// and make sure they are stable. Dispatchables exposed to contracts are not allowed to + /// change because that would break already deployed contracts. The `Call` structure itself + /// is not allowed to change the indices of existing pallets, too. + type CallFilter = Nothing; + type DepositPerItem = DepositPerItem; + type DepositPerByte = DepositPerByte; + type CallStack = [pallet_contracts::Frame; 5]; + type WeightPrice = pallet_transaction_payment::Pallet; + type WeightInfo = pallet_contracts::weights::SubstrateWeight; + type ChainExtension = (); + type DeletionQueueDepth = DeletionQueueDepth; + type DeletionWeightLimit = DeletionWeightLimit; + type Schedule = Schedule; + type AddressGenerator = pallet_contracts::DefaultAddressGenerator; + type MaxCodeLen = ConstU32<{ 123 * 1024 }>; + type MaxStorageKeyLen = ConstU32<128>; + type UnsafeUnstableInterface = ConstBool; + type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>; +} \ No newline at end of file diff --git a/runtime/alphanet/src/version.rs b/runtime/alphanet/src/version.rs index c6bb6a77..b769b44c 100644 --- a/runtime/alphanet/src/version.rs +++ b/runtime/alphanet/src/version.rs @@ -44,7 +44,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { /// Version of the runtime specification. A full-node will not attempt to use its native /// runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`, /// `spec_version` and `authoring_version` are the same between Wasm and native. - spec_version: 24, + spec_version: 25, /// Version of the implementation of the specification. Nodes are free to ignore this; it /// serves only as an indication that the code is different; as long as the other two versions diff --git a/runtime/alphanet/src/weights/frame_benchmarking_baseline.rs b/runtime/alphanet/src/weights/frame_benchmarking_baseline.rs index d8d5bf98..77c7d0a7 100644 --- a/runtime/alphanet/src/weights/frame_benchmarking_baseline.rs +++ b/runtime/alphanet/src/weights/frame_benchmarking_baseline.rs @@ -33,46 +33,57 @@ pub struct WeightInfo(PhantomData); impl frame_benchmarking::baseline::WeightInfo for WeightInfo { /// The range of component `i` is `[0, 1000000]`. fn addition(_i: u32, ) -> Weight { - Weight::from_ref_time(280_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 181_000 picoseconds. + Weight::from_parts(213_057, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. fn subtraction(_i: u32, ) -> Weight { - Weight::from_ref_time(270_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 187_000 picoseconds. + Weight::from_parts(218_567, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. fn multiplication(_i: u32, ) -> Weight { - Weight::from_ref_time(291_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 186_000 picoseconds. + Weight::from_parts(217_697, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. fn division(_i: u32, ) -> Weight { - Weight::from_ref_time(270_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 175_000 picoseconds. + Weight::from_parts(215_174, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// The range of component `i` is `[0, 100]`. - fn hashing(i: u32, ) -> Weight { - Weight::from_ref_time(47_567_406_000 as u64) - // Standard Error: 4_739_921 - .saturating_add(Weight::from_ref_time(186_268_319 as u64).saturating_mul(i as u64)) + fn hashing() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 19_355_019_000 picoseconds. + Weight::from_parts(19_438_410_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// The range of component `i` is `[1, 100]`. + /// The range of component `i` is `[0, 100]`. fn sr25519_verification(i: u32, ) -> Weight { - Weight::from_ref_time(179_710_000 as u64) - // Standard Error: 593_822 - .saturating_add(Weight::from_ref_time(164_577_638 as u64).saturating_mul(i as u64)) - } - // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `i` is `[0, 1000]`. - fn storage_read(i: u32, ) -> Weight { - Weight::from_ref_time(692_000 as u64) - // Standard Error: 39_572 - .saturating_add(Weight::from_ref_time(9_200_767 as u64).saturating_mul(i as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(i as u64))) - } - // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `i` is `[0, 1000]`. - fn storage_write(i: u32, ) -> Weight { - Weight::from_ref_time(741_000 as u64) - // Standard Error: 7_313 - .saturating_add(Weight::from_ref_time(1_298_065 as u64).saturating_mul(i as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 215_000 picoseconds. + Weight::from_parts(225_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 21_389 + .saturating_add(Weight::from_parts(47_593_832, 0).saturating_mul(i.into())) } -} +} \ No newline at end of file diff --git a/runtime/alphanet/src/weights/frame_system.rs b/runtime/alphanet/src/weights/frame_system.rs index 6f9b41a6..77036eff 100644 --- a/runtime/alphanet/src/weights/frame_system.rs +++ b/runtime/alphanet/src/weights/frame_system.rs @@ -33,48 +33,83 @@ pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { /// The range of component `b` is `[0, 3932160]`. fn remark(b: u32, ) -> Weight { - Weight::from_ref_time(13_095_000 as u64) - // Standard Error: 3 - .saturating_add(Weight::from_ref_time(1_169 as u64).saturating_mul(b as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_184_000 picoseconds. + Weight::from_parts(2_232_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 0 + .saturating_add(Weight::from_parts(374, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { - Weight::from_ref_time(30_297_000 as u64) - // Standard Error: 17 - .saturating_add(Weight::from_ref_time(3_801 as u64).saturating_mul(b as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_626_000 picoseconds. + Weight::from_parts(7_777_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 0 + .saturating_add(Weight::from_parts(1_410, 0).saturating_mul(b.into())) } - // Storage: System Digest (r:1 w:1) - // Storage: unknown [0x3a686561707061676573] (r:0 w:1) + /// Storage: System Digest (r:1 w:1) + /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: unknown `0x3a686561707061676573` (r:0 w:1) + /// Proof Skipped: unknown `0x3a686561707061676573` (r:0 w:1) fn set_heap_pages() -> Weight { - Weight::from_ref_time(25_318_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 4_094_000 picoseconds. + Weight::from_parts(4_332_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `i` is `[1, 1000]`. + /// Storage: Skipped Metadata (r:0 w:0) + /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// The range of component `i` is `[0, 1000]`. fn set_storage(i: u32, ) -> Weight { - Weight::from_ref_time(11_472_000 as u64) - // Standard Error: 11_093 - .saturating_add(Weight::from_ref_time(1_934_247 as u64).saturating_mul(i as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_142_000 picoseconds. + Weight::from_parts(2_256_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 1_736 + .saturating_add(Weight::from_parts(658_559, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } - // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `i` is `[1, 1000]`. + /// Storage: Skipped Metadata (r:0 w:0) + /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// The range of component `i` is `[0, 1000]`. fn kill_storage(i: u32, ) -> Weight { - Weight::from_ref_time(11_882_000 as u64) - // Standard Error: 15_760 - .saturating_add(Weight::from_ref_time(1_931_656 as u64).saturating_mul(i as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_179_000 picoseconds. + Weight::from_parts(2_226_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 817 + .saturating_add(Weight::from_parts(485_258, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } - // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `p` is `[1, 1000]`. + /// Storage: Skipped Metadata (r:0 w:0) + /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// The range of component `p` is `[0, 1000]`. fn kill_prefix(p: u32, ) -> Weight { - Weight::from_ref_time(31_419_000 as u64) - // Standard Error: 30_041 - .saturating_add(Weight::from_ref_time(4_162_627 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) + // Proof Size summary in bytes: + // Measured: `120 + p * (69 ±0)` + // Estimated: `121 + p * (70 ±0)` + // Minimum execution time: 4_109_000 picoseconds. + Weight::from_parts(4_255_000, 0) + .saturating_add(Weight::from_parts(0, 121)) + // Standard Error: 1_259 + .saturating_add(Weight::from_parts(1_043_188, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } } + diff --git a/runtime/alphanet/src/weights/pallet_assets.rs b/runtime/alphanet/src/weights/pallet_assets.rs index c8ed7800..b63b82bf 100644 --- a/runtime/alphanet/src/weights/pallet_assets.rs +++ b/runtime/alphanet/src/weights/pallet_assets.rs @@ -31,233 +31,372 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_assets`. pub struct WeightInfo(PhantomData); impl pallet_assets::WeightInfo for WeightInfo { - // Storage: Assets Asset (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn create() -> Weight { - // Minimum execution time: 33_241 nanoseconds. - Weight::from_ref_time(33_873_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `325` + // Estimated: `7268` + // Minimum execution time: 28_265_000 picoseconds. + Weight::from_parts(28_764_000, 7268) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } - // Storage: Assets Asset (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) fn force_create() -> Weight { - // Minimum execution time: 19_883 nanoseconds. - Weight::from_ref_time(20_651_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `153` + // Estimated: `3675` + // Minimum execution time: 15_125_000 picoseconds. + Weight::from_parts(15_468_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - - // Storage: Assets Asset (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) fn start_destroy() -> Weight { - Weight::from_ref_time(31_000_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `417` + // Estimated: `3675` + // Minimum execution time: 15_368_000 picoseconds. + Weight::from_parts(15_625_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:0) - // Storage: System Account (r:20 w:20) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:1001 w:1000) + /// Proof: Assets Account (max_values: None, max_size: Some(102), added: 2577, mode: MaxEncodedLen) + /// Storage: System Account (r:1000 w:1000) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// The range of component `c` is `[0, 1000]`. fn destroy_accounts(c: u32, ) -> Weight { - Weight::from_ref_time(37_000_000 as u64) - // Standard Error: 19_301 - .saturating_add(Weight::from_ref_time(25_467_908 as u64).saturating_mul(c as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(c as u64))) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(c as u64))) + // Proof Size summary in bytes: + // Measured: `25 + c * (240 ±0)` + // Estimated: `8232 + c * (5180 ±0)` + // Minimum execution time: 20_816_000 picoseconds. + Weight::from_parts(21_045_000, 8232) + // Standard Error: 7_118 + .saturating_add(Weight::from_parts(12_723_454, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(c.into()))) + .saturating_add(Weight::from_parts(0, 5180).saturating_mul(c.into())) } - - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:0) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Approvals (r:1001 w:1000) + /// Proof: Assets Approvals (max_values: None, max_size: Some(148), added: 2623, mode: MaxEncodedLen) /// The range of component `a` is `[0, 1000]`. fn destroy_approvals(a: u32, ) -> Weight { - Weight::from_ref_time(39_000_000 as u64) - // Standard Error: 14_298 - .saturating_add(Weight::from_ref_time(27_632_144 as u64).saturating_mul(a as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(a as u64))) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(a as u64))) + // Proof Size summary in bytes: + // Measured: `554 + a * (86 ±0)` + // Estimated: `7288 + a * (2623 ±0)` + // Minimum execution time: 20_923_000 picoseconds. + Weight::from_parts(21_229_000, 7288) + // Standard Error: 7_215 + .saturating_add(Weight::from_parts(12_915_292, 0).saturating_mul(a.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into()))) + .saturating_add(Weight::from_parts(0, 2623).saturating_mul(a.into())) } - - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Metadata (r:1 w:0) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Metadata (r:1 w:0) + /// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen) fn finish_destroy() -> Weight { - Weight::from_ref_time(33_000_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `383` + // Estimated: `7280` + // Minimum execution time: 15_764_000 picoseconds. + Weight::from_parts(16_245_000, 7280) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:1 w:1) + /// Proof: Assets Account (max_values: None, max_size: Some(102), added: 2577, mode: MaxEncodedLen) fn mint() -> Weight { - // Minimum execution time: 36_782 nanoseconds. - Weight::from_ref_time(37_340_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `383` + // Estimated: `7242` + // Minimum execution time: 28_814_000 picoseconds. + Weight::from_parts(29_407_000, 7242) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:1 w:1) + /// Proof: Assets Account (max_values: None, max_size: Some(102), added: 2577, mode: MaxEncodedLen) fn burn() -> Weight { - // Minimum execution time: 44_425 nanoseconds. - Weight::from_ref_time(45_485_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `491` + // Estimated: `7242` + // Minimum execution time: 34_784_000 picoseconds. + Weight::from_parts(35_402_000, 7242) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:2 w:2) + /// Proof: Assets Account (max_values: None, max_size: Some(102), added: 2577, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn transfer() -> Weight { - // Minimum execution time: 58_294 nanoseconds. - Weight::from_ref_time(59_447_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Proof Size summary in bytes: + // Measured: `530` + // Estimated: `13412` + // Minimum execution time: 49_110_000 picoseconds. + Weight::from_parts(50_483_000, 13412) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:2 w:2) + /// Proof: Assets Account (max_values: None, max_size: Some(102), added: 2577, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn transfer_keep_alive() -> Weight { - // Minimum execution time: 46_704 nanoseconds. - Weight::from_ref_time(47_521_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Proof Size summary in bytes: + // Measured: `530` + // Estimated: `13412` + // Minimum execution time: 43_585_000 picoseconds. + Weight::from_parts(44_207_000, 13412) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:2 w:2) + /// Proof: Assets Account (max_values: None, max_size: Some(102), added: 2577, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn force_transfer() -> Weight { - // Minimum execution time: 57_647 nanoseconds. - Weight::from_ref_time(58_417_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Proof Size summary in bytes: + // Measured: `530` + // Estimated: `13412` + // Minimum execution time: 49_238_000 picoseconds. + Weight::from_parts(77_664_000, 13412) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Account (r:1 w:1) + /// Storage: Assets Asset (r:1 w:0) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:1 w:1) + /// Proof: Assets Account (max_values: None, max_size: Some(102), added: 2577, mode: MaxEncodedLen) fn freeze() -> Weight { - // Minimum execution time: 26_827 nanoseconds. - Weight::from_ref_time(27_373_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `491` + // Estimated: `7242` + // Minimum execution time: 19_198_000 picoseconds. + Weight::from_parts(19_585_000, 7242) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Account (r:1 w:1) + /// Storage: Assets Asset (r:1 w:0) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:1 w:1) + /// Proof: Assets Account (max_values: None, max_size: Some(102), added: 2577, mode: MaxEncodedLen) fn thaw() -> Weight { - // Minimum execution time: 26_291 nanoseconds. - Weight::from_ref_time(26_854_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `491` + // Estimated: `7242` + // Minimum execution time: 19_659_000 picoseconds. + Weight::from_parts(20_079_000, 7242) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - // Storage: Assets Asset (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) fn freeze_asset() -> Weight { - // Minimum execution time: 22_694 nanoseconds. - Weight::from_ref_time(23_613_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `417` + // Estimated: `3675` + // Minimum execution time: 15_035_000 picoseconds. + Weight::from_parts(15_594_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - // Storage: Assets Asset (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) fn thaw_asset() -> Weight { - // Minimum execution time: 22_572 nanoseconds. - Weight::from_ref_time(24_121_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `417` + // Estimated: `3675` + // Minimum execution time: 15_073_000 picoseconds. + Weight::from_parts(15_862_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Metadata (r:1 w:0) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Metadata (r:1 w:0) + /// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen) fn transfer_ownership() -> Weight { - // Minimum execution time: 23_949 nanoseconds. - Weight::from_ref_time(24_347_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `383` + // Estimated: `7280` + // Minimum execution time: 17_343_000 picoseconds. + Weight::from_parts(17_656_000, 7280) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - // Storage: Assets Asset (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) fn set_team() -> Weight { - // Minimum execution time: 23_102 nanoseconds. - Weight::from_ref_time(23_518_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `383` + // Estimated: `3675` + // Minimum execution time: 15_902_000 picoseconds. + Weight::from_parts(16_439_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) + /// Storage: Assets Asset (r:1 w:0) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Metadata (r:1 w:1) + /// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn set_metadata(_n: u32, s: u32, ) -> Weight { - // Minimum execution time: 41_032 nanoseconds. - Weight::from_ref_time(42_845_624 as u64) - // Standard Error: 1_274 - .saturating_add(Weight::from_ref_time(1_875 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + fn set_metadata(_n: u32, _s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `383` + // Estimated: `7280` + // Minimum execution time: 27_222_000 picoseconds. + Weight::from_parts(29_151_657, 7280) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) + /// Storage: Assets Asset (r:1 w:0) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Metadata (r:1 w:1) + /// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen) fn clear_metadata() -> Weight { - // Minimum execution time: 42_570 nanoseconds. - Weight::from_ref_time(42_957_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `579` + // Estimated: `7280` + // Minimum execution time: 27_976_000 picoseconds. + Weight::from_parts(28_289_000, 7280) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) + /// Storage: Assets Asset (r:1 w:0) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Metadata (r:1 w:1) + /// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn force_set_metadata(n: u32, s: u32, ) -> Weight { - // Minimum execution time: 22_768 nanoseconds. - Weight::from_ref_time(23_868_816 as u64) - // Standard Error: 612 - .saturating_add(Weight::from_ref_time(1_602 as u64).saturating_mul(n as u64)) - // Standard Error: 612 - .saturating_add(Weight::from_ref_time(2_097 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + fn force_set_metadata(_n: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `190` + // Estimated: `7280` + // Minimum execution time: 16_162_000 picoseconds. + Weight::from_parts(17_137_043, 7280) + // Standard Error: 982 + .saturating_add(Weight::from_parts(4_180, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) + /// Storage: Assets Asset (r:1 w:0) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Metadata (r:1 w:1) + /// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen) fn force_clear_metadata() -> Weight { - // Minimum execution time: 41_863 nanoseconds. - Weight::from_ref_time(42_643_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `579` + // Estimated: `7280` + // Minimum execution time: 27_219_000 picoseconds. + Weight::from_parts(27_931_000, 7280) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - // Storage: Assets Asset (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) fn force_asset_status() -> Weight { - // Minimum execution time: 21_747 nanoseconds. - Weight::from_ref_time(22_595_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `383` + // Estimated: `3675` + // Minimum execution time: 15_313_000 picoseconds. + Weight::from_parts(15_775_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Approvals (r:1 w:1) + /// Proof: Assets Approvals (max_values: None, max_size: Some(148), added: 2623, mode: MaxEncodedLen) fn approve_transfer() -> Weight { - // Minimum execution time: 45_602 nanoseconds. - Weight::from_ref_time(46_004_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `417` + // Estimated: `7288` + // Minimum execution time: 31_865_000 picoseconds. + Weight::from_parts(32_316_000, 7288) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } - // Storage: Assets Approvals (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Approvals (r:1 w:1) + /// Proof: Assets Approvals (max_values: None, max_size: Some(148), added: 2623, mode: MaxEncodedLen) + /// Storage: Assets Account (r:2 w:2) + /// Proof: Assets Account (max_values: None, max_size: Some(102), added: 2577, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn transfer_approved() -> Weight { - // Minimum execution time: 70_944 nanoseconds. - Weight::from_ref_time(71_722_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Proof Size summary in bytes: + // Measured: `700` + // Estimated: `17025` + // Minimum execution time: 67_203_000 picoseconds. + Weight::from_parts(109_742_000, 17025) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(5_u64)) } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Approvals (r:1 w:1) + /// Proof: Assets Approvals (max_values: None, max_size: Some(148), added: 2623, mode: MaxEncodedLen) fn cancel_approval() -> Weight { - // Minimum execution time: 46_316 nanoseconds. - Weight::from_ref_time(46_910_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `587` + // Estimated: `7288` + // Minimum execution time: 33_430_000 picoseconds. + Weight::from_parts(33_824_000, 7288) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Approvals (r:1 w:1) + /// Proof: Assets Approvals (max_values: None, max_size: Some(148), added: 2623, mode: MaxEncodedLen) fn force_cancel_approval() -> Weight { - // Minimum execution time: 47_145 nanoseconds. - Weight::from_ref_time(47_611_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `587` + // Estimated: `7288` + // Minimum execution time: 33_596_000 picoseconds. + Weight::from_parts(34_226_000, 7288) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + fn set_min_balance() -> Weight { + // Proof Size summary in bytes: + // Measured: `383` + // Estimated: `3675` + // Minimum execution time: 16_367_000 picoseconds. + Weight::from_parts(16_703_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } } diff --git a/runtime/alphanet/src/weights/pallet_babe.rs b/runtime/alphanet/src/weights/pallet_babe.rs index 9e26d089..5063c9bd 100644 --- a/runtime/alphanet/src/weights/pallet_babe.rs +++ b/runtime/alphanet/src/weights/pallet_babe.rs @@ -33,8 +33,8 @@ pub struct WeightInfo(PhantomData); impl pallet_babe::WeightInfo for WeightInfo { /// The range of component `x` is `[0, 1]`. fn check_equivocation_proof(x: u32, ) -> Weight { - Weight::from_ref_time(93_348_000 as u64) + Weight::from_parts(93_348_000 as u64) // Standard Error: 100_000 - .saturating_add(Weight::from_ref_time(1_114_000 as u64).saturating_mul(x as u64)) + .saturating_add(Weight::from_parts(1_114_000 as u64).saturating_mul(x as u64)) } } diff --git a/runtime/alphanet/src/weights/pallet_bags_list.rs b/runtime/alphanet/src/weights/pallet_bags_list.rs index 46b5fc24..04893d73 100644 --- a/runtime/alphanet/src/weights/pallet_bags_list.rs +++ b/runtime/alphanet/src/weights/pallet_bags_list.rs @@ -31,32 +31,60 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_bags_list`. pub struct WeightInfo(PhantomData); impl pallet_bags_list::WeightInfo for WeightInfo { - // Storage: Staking Bonded (r:1 w:0) - // Storage: Staking Ledger (r:1 w:0) - // Storage: BagsList ListNodes (r:4 w:4) - // Storage: BagsList ListBags (r:1 w:1) + /// Storage: Staking Bonded (r:1 w:0) + /// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: Staking Ledger (r:1 w:0) + /// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen) + /// Storage: VoterList ListNodes (r:4 w:4) + /// Proof: VoterList ListNodes (max_values: None, max_size: Some(154), added: 2629, mode: MaxEncodedLen) + /// Storage: VoterList ListBags (r:1 w:1) + /// Proof: VoterList ListBags (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen) fn rebag_non_terminal() -> Weight { - Weight::from_ref_time(180_480_000 as u64) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Proof Size summary in bytes: + // Measured: `1654` + // Estimated: `23146` + // Minimum execution time: 60_668_000 picoseconds. + Weight::from_parts(62_285_000, 0) + .saturating_add(Weight::from_parts(0, 23146)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(5)) } - // Storage: Staking Bonded (r:1 w:0) - // Storage: Staking Ledger (r:1 w:0) - // Storage: BagsList ListNodes (r:3 w:3) - // Storage: BagsList ListBags (r:2 w:2) + /// Storage: Staking Bonded (r:1 w:0) + /// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: Staking Ledger (r:1 w:0) + /// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen) + /// Storage: VoterList ListNodes (r:3 w:3) + /// Proof: VoterList ListNodes (max_values: None, max_size: Some(154), added: 2629, mode: MaxEncodedLen) + /// Storage: VoterList ListBags (r:2 w:2) + /// Proof: VoterList ListBags (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen) fn rebag_terminal() -> Weight { - Weight::from_ref_time(178_796_000 as u64) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Proof Size summary in bytes: + // Measured: `1548` + // Estimated: `23074` + // Minimum execution time: 58_418_000 picoseconds. + Weight::from_parts(59_124_000, 0) + .saturating_add(Weight::from_parts(0, 23074)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(5)) } - // Storage: BagsList ListNodes (r:4 w:4) - // Storage: Staking Bonded (r:2 w:0) - // Storage: Staking Ledger (r:2 w:0) - // Storage: BagsList CounterForListNodes (r:1 w:1) - // Storage: BagsList ListBags (r:1 w:1) + /// Storage: VoterList ListNodes (r:4 w:4) + /// Proof: VoterList ListNodes (max_values: None, max_size: Some(154), added: 2629, mode: MaxEncodedLen) + /// Storage: Staking Bonded (r:2 w:0) + /// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: Staking Ledger (r:2 w:0) + /// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen) + /// Storage: VoterList CounterForListNodes (r:1 w:1) + /// Proof: VoterList CounterForListNodes (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: VoterList ListBags (r:1 w:1) + /// Proof: VoterList ListBags (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen) fn put_in_front_of() -> Weight { - Weight::from_ref_time(176_361_000 as u64) - .saturating_add(T::DbWeight::get().reads(10 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Proof Size summary in bytes: + // Measured: `1857` + // Estimated: `30748` + // Minimum execution time: 64_409_000 picoseconds. + Weight::from_parts(65_566_000, 0) + .saturating_add(Weight::from_parts(0, 30748)) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(6)) } -} +} \ No newline at end of file diff --git a/runtime/alphanet/src/weights/pallet_balances.rs b/runtime/alphanet/src/weights/pallet_balances.rs index de9bffba..f5b82b81 100644 --- a/runtime/alphanet/src/weights/pallet_balances.rs +++ b/runtime/alphanet/src/weights/pallet_balances.rs @@ -33,43 +33,50 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - Weight::from_ref_time(98_375_000 as u64) + // Minimum execution time: 40_902 nanoseconds. + Weight::from_parts(41_638_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - Weight::from_ref_time(70_402_000 as u64) + // Minimum execution time: 30_093 nanoseconds. + Weight::from_parts(30_732_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - Weight::from_ref_time(53_652_000 as u64) + // Minimum execution time: 23_901 nanoseconds. + Weight::from_parts(24_238_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - Weight::from_ref_time(60_784_000 as u64) + // Minimum execution time: 26_402 nanoseconds. + Weight::from_parts(27_026_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:2 w:2) fn force_transfer() -> Weight { - Weight::from_ref_time(92_484_000 as u64) + // Minimum execution time: 40_328 nanoseconds. + Weight::from_parts(41_242_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - Weight::from_ref_time(81_864_000 as u64) + // Minimum execution time: 35_401 nanoseconds. + Weight::from_parts(36_122_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - Weight::from_ref_time(46_036_000 as u64) + // Minimum execution time: 20_178 nanoseconds. + Weight::from_parts(20_435_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/alphanet/src/weights/pallet_collective.rs b/runtime/alphanet/src/weights/pallet_collective.rs index 7802ab59..0c4d54c0 100644 --- a/runtime/alphanet/src/weights/pallet_collective.rs +++ b/runtime/alphanet/src/weights/pallet_collective.rs @@ -31,153 +31,278 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_collective`. pub struct WeightInfo(PhantomData); impl pallet_collective::WeightInfo for WeightInfo { - // Storage: TechnicalCommittee Members (r:1 w:1) - // Storage: TechnicalCommittee Proposals (r:1 w:0) - // Storage: TechnicalCommittee Voting (r:100 w:100) - // Storage: TechnicalCommittee Prime (r:0 w:1) - /// The range of component `m` is `[1, 100]`. - /// The range of component `n` is `[1, 100]`. - /// The range of component `p` is `[1, 100]`. + /// Storage: Council Members (r:1 w:1) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:0) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Voting (r:100 w:100) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Prime (r:0 w:1) + /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - Weight::from_ref_time(100_658_000 as u64) - // Standard Error: 233_518 - .saturating_add(Weight::from_ref_time(15_031_886 as u64).saturating_mul(m as u64)) - // Standard Error: 233_518 - .saturating_add(Weight::from_ref_time(23_089_390 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) + // Proof Size summary in bytes: + // Measured: `0 + m * (3232 ±0) + p * (3190 ±0)` + // Estimated: `19164 + m * (7799 ±17) + p * (10110 ±17)` + // Minimum execution time: 17_032_000 picoseconds. + Weight::from_parts(17_263_000, 0) + .saturating_add(Weight::from_parts(0, 19164)) + // Standard Error: 51_363 + .saturating_add(Weight::from_parts(5_779_193, 0).saturating_mul(m.into())) + // Standard Error: 51_363 + .saturating_add(Weight::from_parts(8_434_866, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 7799).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 10110).saturating_mul(p.into())) } - // Storage: TechnicalCommittee Members (r:1 w:0) - /// The range of component `b` is `[1, 1024]`. + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[1, 100]`. fn execute(b: u32, m: u32, ) -> Weight { - Weight::from_ref_time(44_393_000 as u64) - // Standard Error: 884 - .saturating_add(Weight::from_ref_time(16_913 as u64).saturating_mul(b as u64)) - // Standard Error: 9_064 - .saturating_add(Weight::from_ref_time(98_094 as u64).saturating_mul(m as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) + // Proof Size summary in bytes: + // Measured: `136 + m * (32 ±0)` + // Estimated: `1622 + m * (32 ±0)` + // Minimum execution time: 15_686_000 picoseconds. + Weight::from_parts(15_185_500, 0) + .saturating_add(Weight::from_parts(0, 1622)) + // Standard Error: 26 + .saturating_add(Weight::from_parts(1_363, 0).saturating_mul(b.into())) + // Standard Error: 277 + .saturating_add(Weight::from_parts(15_720, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } - // Storage: TechnicalCommittee Members (r:1 w:0) - // Storage: TechnicalCommittee ProposalOf (r:1 w:0) - /// The range of component `b` is `[1, 1024]`. + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:1 w:0) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[1, 100]`. fn propose_execute(b: u32, m: u32, ) -> Weight { - Weight::from_ref_time(47_449_000 as u64) - // Standard Error: 923 - .saturating_add(Weight::from_ref_time(22_466 as u64).saturating_mul(b as u64)) - // Standard Error: 9_471 - .saturating_add(Weight::from_ref_time(158_882 as u64).saturating_mul(m as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) + // Proof Size summary in bytes: + // Measured: `136 + m * (32 ±0)` + // Estimated: `5224 + m * (64 ±0)` + // Minimum execution time: 18_314_000 picoseconds. + Weight::from_parts(17_659_522, 0) + .saturating_add(Weight::from_parts(0, 5224)) + // Standard Error: 22 + .saturating_add(Weight::from_parts(1_153, 0).saturating_mul(b.into())) + // Standard Error: 237 + .saturating_add(Weight::from_parts(25_439, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) } - // Storage: TechnicalCommittee Members (r:1 w:0) - // Storage: TechnicalCommittee ProposalOf (r:1 w:1) - // Storage: TechnicalCommittee Proposals (r:1 w:1) - // Storage: TechnicalCommittee ProposalCount (r:1 w:1) - // Storage: TechnicalCommittee Voting (r:0 w:1) - /// The range of component `b` is `[1, 1024]`. + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:1 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalCount (r:1 w:1) + /// Proof Skipped: Council ProposalCount (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Voting (r:0 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[2, 100]`. + /// The range of component `p` is `[1, 100]`. + /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[2, 100]`. /// The range of component `p` is `[1, 100]`. fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(65_534_000 as u64) - // Standard Error: 1_503 - .saturating_add(Weight::from_ref_time(25_794 as u64).saturating_mul(b as u64)) - // Standard Error: 15_522 - .saturating_add(Weight::from_ref_time(186_949 as u64).saturating_mul(m as u64)) - // Standard Error: 15_432 - .saturating_add(Weight::from_ref_time(1_052_850 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Proof Size summary in bytes: + // Measured: `426 + m * (32 ±0) + p * (36 ±0)` + // Estimated: `9685 + m * (165 ±0) + p * (180 ±0)` + // Minimum execution time: 23_916_000 picoseconds. + Weight::from_parts(25_192_989, 0) + .saturating_add(Weight::from_parts(0, 9685)) + // Standard Error: 50 + .saturating_add(Weight::from_parts(2_327, 0).saturating_mul(b.into())) + // Standard Error: 528 + .saturating_add(Weight::from_parts(17_763, 0).saturating_mul(m.into())) + // Standard Error: 522 + .saturating_add(Weight::from_parts(116_903, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 165).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 180).saturating_mul(p.into())) } - // Storage: TechnicalCommittee Members (r:1 w:0) - // Storage: TechnicalCommittee Voting (r:1 w:1) + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Voting (r:1 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// The range of component `m` is `[5, 100]`. /// The range of component `m` is `[5, 100]`. fn vote(m: u32, ) -> Weight { - Weight::from_ref_time(124_134_000 as u64) - // Standard Error: 19_022 - .saturating_add(Weight::from_ref_time(513_889 as u64).saturating_mul(m as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `875 + m * (64 ±0)` + // Estimated: `6698 + m * (128 ±0)` + // Minimum execution time: 21_641_000 picoseconds. + Weight::from_parts(22_373_888, 0) + .saturating_add(Weight::from_parts(0, 6698)) + // Standard Error: 299 + .saturating_add(Weight::from_parts(41_168, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 128).saturating_mul(m.into())) } - // Storage: TechnicalCommittee Voting (r:1 w:1) - // Storage: TechnicalCommittee Members (r:1 w:0) - // Storage: TechnicalCommittee Proposals (r:1 w:1) - // Storage: TechnicalCommittee ProposalOf (r:0 w:1) + /// Storage: Council Voting (r:1 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:0 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(86_964_000 as u64) - // Standard Error: 13_320 - .saturating_add(Weight::from_ref_time(169_329 as u64).saturating_mul(m as u64)) - // Standard Error: 13_382 - .saturating_add(Weight::from_ref_time(944_082 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `464 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `8211 + m * (260 ±0) + p * (144 ±0)` + // Minimum execution time: 26_158_000 picoseconds. + Weight::from_parts(27_675_242, 0) + .saturating_add(Weight::from_parts(0, 8211)) + // Standard Error: 845 + .saturating_add(Weight::from_parts(10_799, 0).saturating_mul(m.into())) + // Standard Error: 824 + .saturating_add(Weight::from_parts(141_199, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 260).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 144).saturating_mul(p.into())) } - // Storage: TechnicalCommittee Voting (r:1 w:1) - // Storage: TechnicalCommittee Members (r:1 w:0) - // Storage: TechnicalCommittee ProposalOf (r:1 w:1) - // Storage: TechnicalCommittee Proposals (r:1 w:1) - /// The range of component `b` is `[1, 1024]`. + /// Storage: Council Voting (r:1 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:1 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(118_412_000 as u64) - // Standard Error: 1_717 - .saturating_add(Weight::from_ref_time(23_949 as u64).saturating_mul(b as u64)) - // Standard Error: 17_831 - .saturating_add(Weight::from_ref_time(165_454 as u64).saturating_mul(m as u64)) - // Standard Error: 17_638 - .saturating_add(Weight::from_ref_time(833_786 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `766 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `12372 + b * (4 ±0) + m * (264 ±0) + p * (160 ±0)` + // Minimum execution time: 37_601_000 picoseconds. + Weight::from_parts(41_302_278, 0) + .saturating_add(Weight::from_parts(0, 12372)) + // Standard Error: 67 + .saturating_add(Weight::from_parts(1_608, 0).saturating_mul(b.into())) + // Standard Error: 716 + .saturating_add(Weight::from_parts(14_628, 0).saturating_mul(m.into())) + // Standard Error: 698 + .saturating_add(Weight::from_parts(129_997, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 4).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 264).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 160).saturating_mul(p.into())) } - // Storage: TechnicalCommittee Voting (r:1 w:1) - // Storage: TechnicalCommittee Members (r:1 w:0) - // Storage: TechnicalCommittee Prime (r:1 w:0) - // Storage: TechnicalCommittee Proposals (r:1 w:1) - // Storage: TechnicalCommittee ProposalOf (r:0 w:1) + /// Storage: Council Voting (r:1 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Prime (r:1 w:0) + /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:0 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_disapproved(m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(97_233_000 as u64) - // Standard Error: 13_820 - .saturating_add(Weight::from_ref_time(232_591 as u64).saturating_mul(m as u64)) - // Standard Error: 13_884 - .saturating_add(Weight::from_ref_time(871_486 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `484 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `10240 + m * (325 ±0) + p * (180 ±0)` + // Minimum execution time: 29_185_000 picoseconds. + Weight::from_parts(30_594_183, 0) + .saturating_add(Weight::from_parts(0, 10240)) + // Standard Error: 865 + .saturating_add(Weight::from_parts(30_165, 0).saturating_mul(m.into())) + // Standard Error: 844 + .saturating_add(Weight::from_parts(131_623, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 325).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 180).saturating_mul(p.into())) } - // Storage: TechnicalCommittee Voting (r:1 w:1) - // Storage: TechnicalCommittee Members (r:1 w:0) - // Storage: TechnicalCommittee Prime (r:1 w:0) - // Storage: TechnicalCommittee ProposalOf (r:1 w:1) - // Storage: TechnicalCommittee Proposals (r:1 w:1) - /// The range of component `b` is `[1, 1024]`. + /// Storage: Council Voting (r:1 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Prime (r:1 w:0) + /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:1 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(117_941_000 as u64) - // Standard Error: 1_940 - .saturating_add(Weight::from_ref_time(19_420 as u64).saturating_mul(b as u64)) - // Standard Error: 20_145 - .saturating_add(Weight::from_ref_time(205_676 as u64).saturating_mul(m as u64)) - // Standard Error: 19_927 - .saturating_add(Weight::from_ref_time(962_962 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `786 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `14575 + b * (5 ±0) + m * (330 ±0) + p * (200 ±0)` + // Minimum execution time: 43_157_000 picoseconds. + Weight::from_parts(43_691_874, 0) + .saturating_add(Weight::from_parts(0, 14575)) + // Standard Error: 61 + .saturating_add(Weight::from_parts(1_862, 0).saturating_mul(b.into())) + // Standard Error: 654 + .saturating_add(Weight::from_parts(17_183, 0).saturating_mul(m.into())) + // Standard Error: 638 + .saturating_add(Weight::from_parts(133_193, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 5).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 330).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 200).saturating_mul(p.into())) } - // Storage: TechnicalCommittee Proposals (r:1 w:1) - // Storage: TechnicalCommittee Voting (r:0 w:1) - // Storage: TechnicalCommittee ProposalOf (r:0 w:1) + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Voting (r:0 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:0 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `p` is `[1, 100]`. /// The range of component `p` is `[1, 100]`. fn disapprove_proposal(p: u32, ) -> Weight { - Weight::from_ref_time(48_952_000 as u64) - // Standard Error: 14_837 - .saturating_add(Weight::from_ref_time(1_234_605 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `293 + p * (32 ±0)` + // Estimated: `2364 + p * (96 ±0)` + // Minimum execution time: 14_666_000 picoseconds. + Weight::from_parts(16_623_386, 0) + .saturating_add(Weight::from_parts(0, 2364)) + // Standard Error: 430 + .saturating_add(Weight::from_parts(111_461, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 96).saturating_mul(p.into())) } -} +} \ No newline at end of file diff --git a/runtime/alphanet/src/weights/pallet_democracy.rs b/runtime/alphanet/src/weights/pallet_democracy.rs index 6a36b47b..53f313aa 100644 --- a/runtime/alphanet/src/weights/pallet_democracy.rs +++ b/runtime/alphanet/src/weights/pallet_democracy.rs @@ -30,198 +30,469 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_democracy`. pub struct WeightInfo(PhantomData); impl pallet_democracy::WeightInfo for WeightInfo { - // Storage: Democracy PublicPropCount (r:1 w:1) - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:0) - // Storage: Democracy DepositOf (r:0 w:1) + /// Storage: Democracy PublicPropCount (r:1 w:1) + /// Proof: Democracy PublicPropCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Democracy PublicProps (r:1 w:1) + /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) + /// Storage: Democracy Blacklist (r:1 w:0) + /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) + /// Storage: Democracy DepositOf (r:0 w:1) + /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) fn propose() -> Weight { - Weight::from_ref_time(57_410_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `4768` + // Estimated: `26379` + // Minimum execution time: 35_098_000 picoseconds. + Weight::from_parts(35_696_000, 0) + .saturating_add(Weight::from_parts(0, 26379)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: Democracy DepositOf (r:1 w:1) + /// Storage: Democracy DepositOf (r:1 w:1) + /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) fn second() -> Weight { - Weight::from_ref_time(49_224_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `3523` + // Estimated: `6695` + // Minimum execution time: 32_218_000 picoseconds. + Weight::from_parts(32_458_000, 0) + .saturating_add(Weight::from_parts(0, 6695)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) + /// Storage: Democracy ReferendumInfoOf (r:1 w:1) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: Democracy VotingOf (r:1 w:1) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) + /// Storage: Balances Locks (r:1 w:1) + /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) fn vote_new() -> Weight { - Weight::from_ref_time(60_933_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `3437` + // Estimated: `15690` + // Minimum execution time: 46_641_000 picoseconds. + Weight::from_parts(47_324_000, 0) + .saturating_add(Weight::from_parts(0, 15690)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) + /// Storage: Democracy ReferendumInfoOf (r:1 w:1) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: Democracy VotingOf (r:1 w:1) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) + /// Storage: Balances Locks (r:1 w:1) + /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) fn vote_existing() -> Weight { - Weight::from_ref_time(60_393_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `3459` + // Estimated: `15690` + // Minimum execution time: 47_172_000 picoseconds. + Weight::from_parts(47_732_000, 0) + .saturating_add(Weight::from_parts(0, 15690)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy Cancellations (r:1 w:1) + /// Storage: Democracy ReferendumInfoOf (r:1 w:1) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: Democracy Cancellations (r:1 w:1) + /// Proof: Democracy Cancellations (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:1 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) fn emergency_cancel() -> Weight { - Weight::from_ref_time(24_588_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy DepositOf (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy Blacklist (r:0 w:1) + // Proof Size summary in bytes: + // Measured: `333` + // Estimated: `10682` + // Minimum execution time: 25_744_000 picoseconds. + Weight::from_parts(26_226_000, 0) + .saturating_add(Weight::from_parts(0, 10682)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: Democracy PublicProps (r:1 w:1) + /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) + /// Storage: Democracy DepositOf (r:1 w:1) + /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:3 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: Democracy NextExternal (r:1 w:1) + /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) + /// Storage: Democracy ReferendumInfoOf (r:1 w:1) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: Democracy Blacklist (r:0 w:1) + /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) fn blacklist() -> Weight { - Weight::from_ref_time(91_226_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Proof Size summary in bytes: + // Measured: `5877` + // Estimated: `42332` + // Minimum execution time: 88_365_000 picoseconds. + Weight::from_parts(90_080_000, 0) + .saturating_add(Weight::from_parts(0, 42332)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(7)) } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:0) + /// Storage: Democracy NextExternal (r:1 w:1) + /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) + /// Storage: Democracy Blacklist (r:1 w:0) + /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) fn external_propose() -> Weight { - Weight::from_ref_time(18_898_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `3383` + // Estimated: `8320` + // Minimum execution time: 12_868_000 picoseconds. + Weight::from_parts(13_178_000, 0) + .saturating_add(Weight::from_parts(0, 8320)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Democracy NextExternal (r:0 w:1) + /// Storage: Democracy NextExternal (r:0 w:1) + /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) fn external_propose_majority() -> Weight { - Weight::from_ref_time(5_136_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_714_000 picoseconds. + Weight::from_parts(3_895_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Democracy NextExternal (r:0 w:1) + /// Storage: Democracy NextExternal (r:0 w:1) + /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) fn external_propose_default() -> Weight { - Weight::from_ref_time(5_243_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_565_000 picoseconds. + Weight::from_parts(3_831_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:1) - // Storage: Democracy ReferendumInfoOf (r:0 w:1) + /// Storage: Democracy NextExternal (r:1 w:1) + /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) + /// Storage: Democracy ReferendumCount (r:1 w:1) + /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:1 w:2) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: Democracy ReferendumInfoOf (r:0 w:1) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) fn fast_track() -> Weight { - Weight::from_ref_time(24_275_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `253` + // Estimated: `6624` + // Minimum execution time: 26_453_000 picoseconds. + Weight::from_parts(26_938_000, 0) + .saturating_add(Weight::from_parts(0, 6624)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(5)) } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:1) + /// Storage: Democracy NextExternal (r:1 w:1) + /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) + /// Storage: Democracy Blacklist (r:1 w:1) + /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:1 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) fn veto_external() -> Weight { - Weight::from_ref_time(30_988_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `3486` + // Estimated: `11838` + // Minimum execution time: 30_869_000 picoseconds. + Weight::from_parts(31_397_000, 0) + .saturating_add(Weight::from_parts(0, 11838)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy DepositOf (r:1 w:1) - // Storage: System Account (r:1 w:1) + /// Storage: Democracy PublicProps (r:1 w:1) + /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) + /// Storage: Democracy DepositOf (r:1 w:1) + /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:1 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) fn cancel_proposal() -> Weight { - Weight::from_ref_time(78_515_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `5788` + // Estimated: `31993` + // Minimum execution time: 72_692_000 picoseconds. + Weight::from_parts(73_692_000, 0) + .saturating_add(Weight::from_parts(0, 31993)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) } - // Storage: Democracy ReferendumInfoOf (r:0 w:1) + /// Storage: Democracy MetadataOf (r:1 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: Democracy ReferendumInfoOf (r:0 w:1) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) fn cancel_referendum() -> Weight { - Weight::from_ref_time(16_155_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `238` + // Estimated: `3518` + // Minimum execution time: 19_506_000 picoseconds. + Weight::from_parts(19_823_000, 0) + .saturating_add(Weight::from_parts(0, 3518)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Democracy LowestUnbaked (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:0) - // Storage: Democracy ReferendumInfoOf (r:2 w:0) + /// Storage: Democracy LowestUnbaked (r:1 w:1) + /// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Democracy ReferendumCount (r:1 w:0) + /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Democracy ReferendumInfoOf (r:99 w:0) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) /// The range of component `r` is `[0, 99]`. fn on_initialize_base(r: u32, ) -> Weight { - Weight::from_ref_time(7_007_000 as u64) - // Standard Error: 2_686 - .saturating_add(Weight::from_ref_time(2_288_781 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Democracy LowestUnbaked (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:0) - // Storage: Democracy LastTabledWasExternal (r:1 w:0) - // Storage: Democracy NextExternal (r:1 w:0) - // Storage: Democracy PublicProps (r:1 w:0) - // Storage: Democracy ReferendumInfoOf (r:2 w:0) + // Proof Size summary in bytes: + // Measured: `211 + r * (86 ±0)` + // Estimated: `3968 + r * (2676 ±0)` + // Minimum execution time: 6_019_000 picoseconds. + Weight::from_parts(9_632_674, 0) + .saturating_add(Weight::from_parts(0, 3968)) + // Standard Error: 6_651 + .saturating_add(Weight::from_parts(2_769_264, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) + } + /// Storage: Democracy LowestUnbaked (r:1 w:1) + /// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Democracy ReferendumCount (r:1 w:0) + /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Democracy LastTabledWasExternal (r:1 w:0) + /// Proof: Democracy LastTabledWasExternal (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: Democracy NextExternal (r:1 w:0) + /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) + /// Storage: Democracy PublicProps (r:1 w:0) + /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) + /// Storage: Democracy ReferendumInfoOf (r:99 w:0) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) /// The range of component `r` is `[0, 99]`. fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - Weight::from_ref_time(9_528_000 as u64) - // Standard Error: 2_521 - .saturating_add(Weight::from_ref_time(2_291_780 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Democracy VotingOf (r:3 w:3) - // Storage: Balances Locks (r:1 w:1) - // Storage: Democracy ReferendumInfoOf (r:2 w:2) + // Proof Size summary in bytes: + // Measured: `211 + r * (86 ±0)` + // Estimated: `25258 + r * (2676 ±0)` + // Minimum execution time: 9_143_000 picoseconds. + Weight::from_parts(12_247_629, 0) + .saturating_add(Weight::from_parts(0, 25258)) + // Standard Error: 6_077 + .saturating_add(Weight::from_parts(2_764_547, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) + } + /// Storage: Democracy VotingOf (r:3 w:3) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) + /// Storage: Democracy ReferendumInfoOf (r:99 w:99) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: Balances Locks (r:1 w:1) + /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) /// The range of component `r` is `[0, 99]`. fn delegate(r: u32, ) -> Weight { - Weight::from_ref_time(46_787_000 as u64) - // Standard Error: 2_943 - .saturating_add(Weight::from_ref_time(3_460_194 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) - .saturating_add(T::DbWeight::get().writes(4 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(r as u64))) - } - // Storage: Democracy VotingOf (r:2 w:2) - // Storage: Democracy ReferendumInfoOf (r:2 w:2) + // Proof Size summary in bytes: + // Measured: `797 + r * (108 ±0)` + // Estimated: `25554 + r * (2676 ±0)` + // Minimum execution time: 41_153_000 picoseconds. + Weight::from_parts(42_787_487, 0) + .saturating_add(Weight::from_parts(0, 25554)) + // Standard Error: 7_883 + .saturating_add(Weight::from_parts(3_862_521, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) + } + /// Storage: Democracy VotingOf (r:2 w:2) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) + /// Storage: Democracy ReferendumInfoOf (r:99 w:99) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) /// The range of component `r` is `[0, 99]`. fn undelegate(r: u32, ) -> Weight { - Weight::from_ref_time(29_789_000 as u64) - // Standard Error: 2_324 - .saturating_add(Weight::from_ref_time(3_360_918 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(r as u64))) - } - // Storage: Democracy PublicProps (r:0 w:1) + // Proof Size summary in bytes: + // Measured: `460 + r * (108 ±0)` + // Estimated: `14520 + r * (2676 ±0)` + // Minimum execution time: 20_767_000 picoseconds. + Weight::from_parts(21_768_239, 0) + .saturating_add(Weight::from_parts(0, 14520)) + // Standard Error: 9_791 + .saturating_add(Weight::from_parts(3_862_103, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) + } + /// Storage: Democracy PublicProps (r:0 w:1) + /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) fn clear_public_proposals() -> Weight { - Weight::from_ref_time(6_519_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_663_000 picoseconds. + Weight::from_parts(3_798_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) + /// Storage: Democracy VotingOf (r:1 w:1) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) + /// Storage: Balances Locks (r:1 w:1) + /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// The range of component `r` is `[0, 99]`. fn unlock_remove(r: u32, ) -> Weight { - Weight::from_ref_time(28_884_000 as u64) - // Standard Error: 2_631 - .saturating_add(Weight::from_ref_time(163_516 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - } - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `530` + // Estimated: `15617` + // Minimum execution time: 19_923_000 picoseconds. + Weight::from_parts(25_945_279, 0) + .saturating_add(Weight::from_parts(0, 15617)) + // Standard Error: 1_366 + .saturating_add(Weight::from_parts(22_003, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: Democracy VotingOf (r:1 w:1) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) + /// Storage: Balances Locks (r:1 w:1) + /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// The range of component `r` is `[0, 99]`. fn unlock_set(r: u32, ) -> Weight { - Weight::from_ref_time(33_498_000 as u64) - // Standard Error: 622 - .saturating_add(Weight::from_ref_time(133_421 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `531 + r * (22 ±0)` + // Estimated: `15617` + // Minimum execution time: 24_393_000 picoseconds. + Weight::from_parts(25_690_593, 0) + .saturating_add(Weight::from_parts(0, 15617)) + // Standard Error: 553 + .saturating_add(Weight::from_parts(59_042, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: Democracy ReferendumInfoOf (r:1 w:1) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: Democracy VotingOf (r:1 w:1) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) /// The range of component `r` is `[1, 100]`. fn remove_vote(r: u32, ) -> Weight { - Weight::from_ref_time(18_201_000 as u64) - // Standard Error: 1_007 - .saturating_add(Weight::from_ref_time(152_699 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `695 + r * (26 ±0)` + // Estimated: `10926` + // Minimum execution time: 15_551_000 picoseconds. + Weight::from_parts(17_809_948, 0) + .saturating_add(Weight::from_parts(0, 10926)) + // Standard Error: 1_907 + .saturating_add(Weight::from_parts(86_496, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: Democracy ReferendumInfoOf (r:1 w:1) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: Democracy VotingOf (r:1 w:1) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) /// The range of component `r` is `[1, 100]`. fn remove_other_vote(r: u32, ) -> Weight { - Weight::from_ref_time(18_455_000 as u64) - // Standard Error: 951 - .saturating_add(Weight::from_ref_time(150_907 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `695 + r * (26 ±0)` + // Estimated: `10926` + // Minimum execution time: 16_027_000 picoseconds. + Weight::from_parts(17_860_077, 0) + .saturating_add(Weight::from_parts(0, 10926)) + // Standard Error: 1_950 + .saturating_add(Weight::from_parts(87_722, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: Democracy NextExternal (r:1 w:0) + /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) + /// Storage: Preimage StatusFor (r:1 w:0) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:0 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + fn set_external_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `323` + // Estimated: `5173` + // Minimum execution time: 17_551_000 picoseconds. + Weight::from_parts(17_776_000, 0) + .saturating_add(Weight::from_parts(0, 5173)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Democracy NextExternal (r:1 w:0) + /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:1 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + fn clear_external_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `253` + // Estimated: `5135` + // Minimum execution time: 16_020_000 picoseconds. + Weight::from_parts(16_477_000, 0) + .saturating_add(Weight::from_parts(0, 5135)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Democracy PublicProps (r:1 w:0) + /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) + /// Storage: Preimage StatusFor (r:1 w:0) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:0 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + fn set_proposal_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `4855` + // Estimated: `21743` + // Minimum execution time: 33_144_000 picoseconds. + Weight::from_parts(33_457_000, 0) + .saturating_add(Weight::from_parts(0, 21743)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Democracy PublicProps (r:1 w:0) + /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:1 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + fn clear_proposal_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `4789` + // Estimated: `21705` + // Minimum execution time: 31_022_000 picoseconds. + Weight::from_parts(31_534_000, 0) + .saturating_add(Weight::from_parts(0, 21705)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Preimage StatusFor (r:1 w:0) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:0 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + fn set_referendum_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `144` + // Estimated: `3556` + // Minimum execution time: 14_512_000 picoseconds. + Weight::from_parts(14_769_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Democracy ReferendumInfoOf (r:1 w:0) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:1 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + fn clear_referendum_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `269` + // Estimated: `7184` + // Minimum execution time: 17_966_000 picoseconds. + Weight::from_parts(18_270_000, 0) + .saturating_add(Weight::from_parts(0, 7184)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } } - diff --git a/runtime/alphanet/src/weights/pallet_election_provider_multi_phase.rs b/runtime/alphanet/src/weights/pallet_election_provider_multi_phase.rs index cb0454d3..e1bcfd33 100644 --- a/runtime/alphanet/src/weights/pallet_election_provider_multi_phase.rs +++ b/runtime/alphanet/src/weights/pallet_election_provider_multi_phase.rs @@ -31,126 +31,221 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_election_provider_multi_phase`. pub struct WeightInfo(PhantomData); impl pallet_election_provider_multi_phase::WeightInfo for WeightInfo { - // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking CurrentPlannedSession (r:1 w:0) - // Storage: Staking ErasStartSessionIndex (r:1 w:0) - // Storage: Babe EpochIndex (r:1 w:0) - // Storage: Babe GenesisSlot (r:1 w:0) - // Storage: Babe CurrentSlot (r:1 w:0) - // Storage: Staking ForceEra (r:1 w:0) - // Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) + /// Storage: Staking CurrentEra (r:1 w:0) + /// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Staking CurrentPlannedSession (r:1 w:0) + /// Proof: Staking CurrentPlannedSession (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Staking ErasStartSessionIndex (r:1 w:0) + /// Proof: Staking ErasStartSessionIndex (max_values: None, max_size: Some(16), added: 2491, mode: MaxEncodedLen) + /// Storage: Babe EpochIndex (r:1 w:0) + /// Proof: Babe EpochIndex (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: Babe GenesisSlot (r:1 w:0) + /// Proof: Babe GenesisSlot (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: Babe CurrentSlot (r:1 w:0) + /// Proof: Babe CurrentSlot (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: Staking ForceEra (r:1 w:0) + /// Proof: Staking ForceEra (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured) fn on_initialize_nothing() -> Weight { - Weight::from_ref_time(23_070_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) + // Proof Size summary in bytes: + // Measured: `1027` + // Estimated: `14936` + // Minimum execution time: 21_024_000 picoseconds. + Weight::from_parts(21_697_000, 0) + .saturating_add(Weight::from_parts(0, 14936)) + .saturating_add(T::DbWeight::get().reads(8)) } - // Storage: ElectionProviderMultiPhase Round (r:1 w:0) - // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) + /// Storage: ElectionProviderMultiPhase Round (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase Round (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:1) + /// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured) fn on_initialize_open_signed() -> Weight { - Weight::from_ref_time(27_530_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `148` + // Estimated: `3266` + // Minimum execution time: 13_251_000 picoseconds. + Weight::from_parts(13_556_000, 0) + .saturating_add(Weight::from_parts(0, 3266)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: ElectionProviderMultiPhase Round (r:1 w:0) - // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) + /// Storage: ElectionProviderMultiPhase Round (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase Round (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:1) + /// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured) fn on_initialize_open_unsigned() -> Weight { - Weight::from_ref_time(26_270_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `148` + // Estimated: `3266` + // Minimum execution time: 14_586_000 picoseconds. + Weight::from_parts(14_932_000, 0) + .saturating_add(Weight::from_parts(0, 3266)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: System Account (r:1 w:1) - // Storage: ElectionProviderMultiPhase QueuedSolution (r:0 w:1) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: ElectionProviderMultiPhase QueuedSolution (r:0 w:1) + /// Proof Skipped: ElectionProviderMultiPhase QueuedSolution (max_values: Some(1), max_size: None, mode: Measured) fn finalize_signed_phase_accept_solution() -> Weight { - Weight::from_ref_time(37_820_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `174` + // Estimated: `3767` + // Minimum execution time: 24_044_000 picoseconds. + Weight::from_parts(24_456_000, 0) + .saturating_add(Weight::from_parts(0, 3767)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: System Account (r:1 w:1) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn finalize_signed_phase_reject_solution() -> Weight { - Weight::from_ref_time(37_301_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `174` + // Estimated: `3593` + // Minimum execution time: 16_778_000 picoseconds. + Weight::from_parts(17_098_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: ElectionProviderMultiPhase SnapshotMetadata (r:0 w:1) - // Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1) - // Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1) + /// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:0 w:1) + /// Proof Skipped: ElectionProviderMultiPhase SnapshotMetadata (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1) + /// Proof Skipped: ElectionProviderMultiPhase DesiredTargets (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1) + /// Proof Skipped: ElectionProviderMultiPhase Snapshot (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. - fn create_snapshot_internal(v: u32, t: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 81_000 - .saturating_add(Weight::from_ref_time(591_000 as u64).saturating_mul(v as u64)) - // Standard Error: 163_000 - .saturating_add(Weight::from_ref_time(377_000 as u64).saturating_mul(t as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + fn create_snapshot_internal(v: u32, _t: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 658_110_000 picoseconds. + Weight::from_parts(673_151_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 3_369 + .saturating_add(Weight::from_parts(392_624, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1) - // Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1) - // Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:1) - // Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:1 w:0) - // Storage: System BlockWeight (r:1 w:1) - // Storage: ElectionProviderMultiPhase QueuedSolution (r:1 w:1) - // Storage: ElectionProviderMultiPhase Round (r:1 w:1) - // Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1) - // Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1) - // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) + /// Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1) + /// Proof Skipped: ElectionProviderMultiPhase SignedSubmissionIndices (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1) + /// Proof Skipped: ElectionProviderMultiPhase SignedSubmissionNextIndex (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:1) + /// Proof Skipped: ElectionProviderMultiPhase SnapshotMetadata (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase SignedSubmissionsMap (max_values: None, max_size: None, mode: Measured) + /// Storage: System BlockWeight (r:1 w:1) + /// Proof: System BlockWeight (max_values: Some(1), max_size: Some(48), added: 543, mode: MaxEncodedLen) + /// Storage: ElectionProviderMultiPhase QueuedSolution (r:1 w:1) + /// Proof Skipped: ElectionProviderMultiPhase QueuedSolution (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase Round (r:1 w:1) + /// Proof Skipped: ElectionProviderMultiPhase Round (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:1) + /// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1) + /// Proof Skipped: ElectionProviderMultiPhase DesiredTargets (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1) + /// Proof Skipped: ElectionProviderMultiPhase Snapshot (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `a` is `[500, 800]`. /// The range of component `d` is `[200, 400]`. - fn elect_queued(a: u32, _d: u32, ) -> Weight { - Weight::from_ref_time(664_418_000 as u64) - // Standard Error: 398_000 - .saturating_add(Weight::from_ref_time(1_147_000 as u64).saturating_mul(a as u64)) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(9 as u64)) + fn elect_queued(a: u32, d: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `900 + a * (1152 ±0) + d * (47 ±0)` + // Estimated: `21873 + a * (10368 ±0) + d * (432 ±0)` + // Minimum execution time: 374_177_000 picoseconds. + Weight::from_parts(383_707_000, 0) + .saturating_add(Weight::from_parts(0, 21873)) + // Standard Error: 8_930 + .saturating_add(Weight::from_parts(575_485, 0).saturating_mul(a.into())) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(9)) + .saturating_add(Weight::from_parts(0, 10368).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(0, 432).saturating_mul(d.into())) } - // Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) - // Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:0) - // Storage: TransactionPayment NextFeeMultiplier (r:1 w:0) - // Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1) - // Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1) - // Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:0 w:1) + /// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase SnapshotMetadata (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TransactionPayment NextFeeMultiplier (r:1 w:0) + /// Proof: TransactionPayment NextFeeMultiplier (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1) + /// Proof Skipped: ElectionProviderMultiPhase SignedSubmissionIndices (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1) + /// Proof Skipped: ElectionProviderMultiPhase SignedSubmissionNextIndex (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:0 w:1) + /// Proof Skipped: ElectionProviderMultiPhase SignedSubmissionsMap (max_values: None, max_size: None, mode: Measured) fn submit() -> Weight { - Weight::from_ref_time(65_721_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `1238` + // Estimated: `13631` + // Minimum execution time: 45_426_000 picoseconds. + Weight::from_parts(46_000_000, 0) + .saturating_add(Weight::from_parts(0, 13631)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) - // Storage: ElectionProviderMultiPhase Round (r:1 w:0) - // Storage: ElectionProviderMultiPhase DesiredTargets (r:1 w:0) - // Storage: ElectionProviderMultiPhase QueuedSolution (r:1 w:1) - // Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:0) - // Storage: ElectionProviderMultiPhase MinimumUntrustedScore (r:1 w:0) - // Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0) + /// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase Round (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase Round (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase DesiredTargets (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase DesiredTargets (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase QueuedSolution (r:1 w:1) + /// Proof Skipped: ElectionProviderMultiPhase QueuedSolution (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase SnapshotMetadata (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase Snapshot (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase MinimumUntrustedScore (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase MinimumUntrustedScore (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. /// The range of component `a` is `[500, 800]`. /// The range of component `d` is `[200, 400]`. - fn submit_unsigned(v: u32, _t: u32, a: u32, d: u32, ) -> Weight { - Weight::from_ref_time(794_070_000 as u64) - // Standard Error: 286_000 - .saturating_add(Weight::from_ref_time(992_000 as u64).saturating_mul(v as u64)) - // Standard Error: 953_000 - .saturating_add(Weight::from_ref_time(9_026_000 as u64).saturating_mul(a as u64)) - // Standard Error: 1_430_000 - .saturating_add(Weight::from_ref_time(2_144_000 as u64).saturating_mul(d as u64)) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + fn submit_unsigned(v: u32, t: u32, a: u32, _d: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `253 + v * (809 ±0) + t * (32 ±0)` + // Estimated: `12166 + v * (5663 ±0) + t * (224 ±0)` + // Minimum execution time: 7_353_352_000 picoseconds. + Weight::from_parts(7_409_425_000, 0) + .saturating_add(Weight::from_parts(0, 12166)) + // Standard Error: 24_654 + .saturating_add(Weight::from_parts(9_966, 0).saturating_mul(v.into())) + // Standard Error: 73_060 + .saturating_add(Weight::from_parts(7_603_657, 0).saturating_mul(a.into())) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 5663).saturating_mul(v.into())) + .saturating_add(Weight::from_parts(0, 224).saturating_mul(t.into())) } - // Storage: ElectionProviderMultiPhase Round (r:1 w:0) - // Storage: ElectionProviderMultiPhase DesiredTargets (r:1 w:0) - // Storage: ElectionProviderMultiPhase MinimumUntrustedScore (r:1 w:0) - // Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0) + /// Storage: ElectionProviderMultiPhase DesiredTargets (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase DesiredTargets (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase Snapshot (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase Round (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase Round (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase MinimumUntrustedScore (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase MinimumUntrustedScore (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. /// The range of component `a` is `[500, 800]`. /// The range of component `d` is `[200, 400]`. - fn feasibility_check(v: u32, _t: u32, a: u32, d: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 439_000 - .saturating_add(Weight::from_ref_time(1_236_000 as u64).saturating_mul(v as u64)) - // Standard Error: 1_463_000 - .saturating_add(Weight::from_ref_time(8_868_000 as u64).saturating_mul(a as u64)) - // Standard Error: 2_195_000 - .saturating_add(Weight::from_ref_time(584_000 as u64).saturating_mul(d as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) + fn feasibility_check(v: u32, t: u32, a: u32, _d: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `228 + v * (809 ±0) + t * (32 ±0)` + // Estimated: `6852 + v * (3236 ±0) + t * (128 ±0)` + // Minimum execution time: 6_174_792_000 picoseconds. + Weight::from_parts(6_244_237_000, 0) + .saturating_add(Weight::from_parts(0, 6852)) + // Standard Error: 21_322 + .saturating_add(Weight::from_parts(142_059, 0).saturating_mul(v.into())) + // Standard Error: 63_186 + .saturating_add(Weight::from_parts(5_948_175, 0).saturating_mul(a.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(Weight::from_parts(0, 3236).saturating_mul(v.into())) + .saturating_add(Weight::from_parts(0, 128).saturating_mul(t.into())) } -} +} \ No newline at end of file diff --git a/runtime/alphanet/src/weights/pallet_elections_phragmen.rs b/runtime/alphanet/src/weights/pallet_elections_phragmen.rs index dcea6940..c1ac2e3e 100644 --- a/runtime/alphanet/src/weights/pallet_elections_phragmen.rs +++ b/runtime/alphanet/src/weights/pallet_elections_phragmen.rs @@ -31,142 +31,259 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_elections_phragmen`. pub struct WeightInfo(PhantomData); impl pallet_elections_phragmen::WeightInfo for WeightInfo { - // Storage: PhragmenElection Candidates (r:1 w:0) - // Storage: PhragmenElection Members (r:1 w:0) - // Storage: PhragmenElection RunnersUp (r:1 w:0) - // Storage: PhragmenElection Voting (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) + /// Storage: PhragmenElection Candidates (r:1 w:0) + /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection Members (r:1 w:0) + /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection RunnersUp (r:1 w:0) + /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection Voting (r:1 w:1) + /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Balances Locks (r:1 w:1) + /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) /// The range of component `v` is `[1, 16]`. fn vote_equal(v: u32, ) -> Weight { - Weight::from_ref_time(36_912_000 as u64) - // Standard Error: 16_000 - .saturating_add(Weight::from_ref_time(179_000 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `403 + v * (80 ±0)` + // Estimated: `14292 + v * (320 ±0)` + // Minimum execution time: 27_353_000 picoseconds. + Weight::from_parts(28_103_445, 0) + .saturating_add(Weight::from_parts(0, 14292)) + // Standard Error: 4_556 + .saturating_add(Weight::from_parts(117_766, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 320).saturating_mul(v.into())) } - // Storage: PhragmenElection Candidates (r:1 w:0) - // Storage: PhragmenElection Members (r:1 w:0) - // Storage: PhragmenElection RunnersUp (r:1 w:0) - // Storage: PhragmenElection Voting (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) + /// Storage: PhragmenElection Candidates (r:1 w:0) + /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection Members (r:1 w:0) + /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection RunnersUp (r:1 w:0) + /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection Voting (r:1 w:1) + /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Balances Locks (r:1 w:1) + /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) /// The range of component `v` is `[2, 16]`. fn vote_more(v: u32, ) -> Weight { - Weight::from_ref_time(46_265_000 as u64) - // Standard Error: 223_000 - .saturating_add(Weight::from_ref_time(743_000 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `371 + v * (80 ±0)` + // Estimated: `14164 + v * (320 ±0)` + // Minimum execution time: 36_885_000 picoseconds. + Weight::from_parts(37_769_975, 0) + .saturating_add(Weight::from_parts(0, 14164)) + // Standard Error: 6_586 + .saturating_add(Weight::from_parts(123_567, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 320).saturating_mul(v.into())) } - // Storage: PhragmenElection Candidates (r:1 w:0) - // Storage: PhragmenElection Members (r:1 w:0) - // Storage: PhragmenElection RunnersUp (r:1 w:0) - // Storage: PhragmenElection Voting (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) + /// Storage: PhragmenElection Candidates (r:1 w:0) + /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection Members (r:1 w:0) + /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection RunnersUp (r:1 w:0) + /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection Voting (r:1 w:1) + /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Balances Locks (r:1 w:1) + /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) /// The range of component `v` is `[2, 16]`. fn vote_less(v: u32, ) -> Weight { - Weight::from_ref_time(49_651_000 as u64) - // Standard Error: 37_000 - .saturating_add(Weight::from_ref_time(154_000 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `403 + v * (80 ±0)` + // Estimated: `14292 + v * (320 ±0)` + // Minimum execution time: 36_610_000 picoseconds. + Weight::from_parts(37_524_808, 0) + .saturating_add(Weight::from_parts(0, 14292)) + // Standard Error: 6_164 + .saturating_add(Weight::from_parts(147_944, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 320).saturating_mul(v.into())) } - // Storage: PhragmenElection Voting (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) + /// Storage: PhragmenElection Voting (r:1 w:1) + /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Balances Locks (r:1 w:1) + /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) fn remove_voter() -> Weight { - Weight::from_ref_time(47_030_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `925` + // Estimated: `9154` + // Minimum execution time: 33_052_000 picoseconds. + Weight::from_parts(33_677_000, 0) + .saturating_add(Weight::from_parts(0, 9154)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: PhragmenElection Candidates (r:1 w:1) - // Storage: PhragmenElection Members (r:1 w:0) - // Storage: PhragmenElection RunnersUp (r:1 w:0) + /// Storage: PhragmenElection Candidates (r:1 w:1) + /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection Members (r:1 w:0) + /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection RunnersUp (r:1 w:0) + /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `c` is `[1, 1000]`. fn submit_candidacy(c: u32, ) -> Weight { - Weight::from_ref_time(48_816_000 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(62_000 as u64).saturating_mul(c as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `2712 + c * (48 ±0)` + // Estimated: `12585 + c * (144 ±0)` + // Minimum execution time: 32_163_000 picoseconds. + Weight::from_parts(24_757_419, 0) + .saturating_add(Weight::from_parts(0, 12585)) + // Standard Error: 902 + .saturating_add(Weight::from_parts(79_765, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 144).saturating_mul(c.into())) } - // Storage: PhragmenElection Candidates (r:1 w:1) + /// Storage: PhragmenElection Candidates (r:1 w:1) + /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `c` is `[1, 1000]`. fn renounce_candidacy_candidate(c: u32, ) -> Weight { - Weight::from_ref_time(44_736_000 as u64) - // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(57_000 as u64).saturating_mul(c as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `284 + c * (48 ±0)` + // Estimated: `1756 + c * (48 ±0)` + // Minimum execution time: 24_805_000 picoseconds. + Weight::from_parts(17_940_635, 0) + .saturating_add(Weight::from_parts(0, 1756)) + // Standard Error: 888 + .saturating_add(Weight::from_parts(59_369, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into())) } - // Storage: PhragmenElection Members (r:1 w:1) - // Storage: PhragmenElection RunnersUp (r:1 w:1) - // Storage: Council Prime (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: Council Members (r:0 w:1) + /// Storage: PhragmenElection Members (r:1 w:1) + /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection RunnersUp (r:1 w:1) + /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Prime (r:1 w:1) + /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:0) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Members (r:0 w:1) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) fn renounce_candidacy_members() -> Weight { - Weight::from_ref_time(49_251_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Proof Size summary in bytes: + // Measured: `2986` + // Estimated: `20870` + // Minimum execution time: 42_908_000 picoseconds. + Weight::from_parts(43_409_000, 0) + .saturating_add(Weight::from_parts(0, 20870)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) } - // Storage: PhragmenElection RunnersUp (r:1 w:1) + /// Storage: PhragmenElection RunnersUp (r:1 w:1) + /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) fn renounce_candidacy_runners_up() -> Weight { - Weight::from_ref_time(37_941_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `1681` + // Estimated: `3166` + // Minimum execution time: 27_419_000 picoseconds. + Weight::from_parts(27_912_000, 0) + .saturating_add(Weight::from_parts(0, 3166)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Benchmark Override (r:0 w:0) + /// Storage: Benchmark Override (r:0 w:0) + /// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured) fn remove_member_without_replacement() -> Weight { - Weight::from_ref_time(2_000_000_000_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_000_000_000_000 picoseconds. + Weight::from_parts(2_000_000_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - // Storage: PhragmenElection Members (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: PhragmenElection RunnersUp (r:1 w:1) - // Storage: Council Prime (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: Council Members (r:0 w:1) + /// Storage: PhragmenElection Members (r:1 w:1) + /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: PhragmenElection RunnersUp (r:1 w:1) + /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Prime (r:1 w:1) + /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:0) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Members (r:0 w:1) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) fn remove_member_with_replacement() -> Weight { - Weight::from_ref_time(65_640_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Proof Size summary in bytes: + // Measured: `2986` + // Estimated: `24463` + // Minimum execution time: 57_465_000 picoseconds. + Weight::from_parts(58_107_000, 0) + .saturating_add(Weight::from_parts(0, 24463)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) } - // Storage: PhragmenElection Voting (r:5001 w:5000) - // Storage: PhragmenElection Members (r:1 w:0) - // Storage: PhragmenElection RunnersUp (r:1 w:0) - // Storage: PhragmenElection Candidates (r:1 w:0) - // Storage: Balances Locks (r:5000 w:5000) - // Storage: System Account (r:5000 w:5000) + /// Storage: PhragmenElection Voting (r:10001 w:10000) + /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: PhragmenElection Members (r:1 w:0) + /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection RunnersUp (r:1 w:0) + /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection Candidates (r:1 w:0) + /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Balances Locks (r:10000 w:10000) + /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: System Account (r:10000 w:10000) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// The range of component `v` is `[5000, 10000]`. - /// The range of component `d` is `[1, 5000]`. + /// The range of component `d` is `[0, 5000]`. fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 711_000 - .saturating_add(Weight::from_ref_time(77_039_000 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(v as u64))) - .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(v as u64))) + // Proof Size summary in bytes: + // Measured: `35989 + v * (808 ±0)` + // Estimated: `154956 + v * (12084 ±0)` + // Minimum execution time: 319_677_473_000 picoseconds. + Weight::from_parts(320_382_361_000, 0) + .saturating_add(Weight::from_parts(0, 154956)) + // Standard Error: 270_292 + .saturating_add(Weight::from_parts(38_671_603, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(v.into()))) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(v.into()))) + .saturating_add(Weight::from_parts(0, 12084).saturating_mul(v.into())) } - // Storage: PhragmenElection Candidates (r:1 w:1) - // Storage: PhragmenElection Members (r:1 w:1) - // Storage: PhragmenElection RunnersUp (r:1 w:1) - // Storage: PhragmenElection Voting (r:10001 w:0) - // Storage: Council Proposals (r:1 w:0) - // Storage: PhragmenElection ElectionRounds (r:1 w:1) - // Storage: Council Members (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - // Storage: System Account (r:98 w:98) + /// Storage: PhragmenElection Candidates (r:1 w:1) + /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection Members (r:1 w:1) + /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection RunnersUp (r:1 w:1) + /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection Voting (r:10001 w:0) + /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:0) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: System Account (r:962 w:962) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: PhragmenElection ElectionRounds (r:1 w:1) + /// Proof Skipped: PhragmenElection ElectionRounds (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Members (r:0 w:1) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Prime (r:0 w:1) + /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `c` is `[1, 1000]`. /// The range of component `v` is `[1, 10000]`. /// The range of component `e` is `[10000, 160000]`. fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 21_257_000 - .saturating_add(Weight::from_ref_time(45_937_000 as u64).saturating_mul(c as u64)) - // Standard Error: 2_123_000 - .saturating_add(Weight::from_ref_time(35_966_000 as u64).saturating_mul(v as u64)) - // Standard Error: 141_000 - .saturating_add(Weight::from_ref_time(1_610_000 as u64).saturating_mul(e as u64)) - .saturating_add(T::DbWeight::get().reads(444 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(c as u64))) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(v as u64))) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(c as u64))) + // Proof Size summary in bytes: + // Measured: `0 + v * (607 ±0) + e * (28 ±0)` + // Estimated: `4839313 + v * (5481 ±4) + e * (123 ±0) + c * (2560 ±0)` + // Minimum execution time: 30_795_431_000 picoseconds. + Weight::from_parts(30_861_700_000, 0) + .saturating_add(Weight::from_parts(0, 4839313)) + // Standard Error: 482_348 + .saturating_add(Weight::from_parts(37_626_560, 0).saturating_mul(v.into())) + // Standard Error: 30_954 + .saturating_add(Weight::from_parts(2_016_889, 0).saturating_mul(e.into())) + .saturating_add(T::DbWeight::get().reads(265)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) + .saturating_add(T::DbWeight::get().writes(6)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) + .saturating_add(Weight::from_parts(0, 5481).saturating_mul(v.into())) + .saturating_add(Weight::from_parts(0, 123).saturating_mul(e.into())) + .saturating_add(Weight::from_parts(0, 2560).saturating_mul(c.into())) } } diff --git a/runtime/alphanet/src/weights/pallet_grandpa.rs b/runtime/alphanet/src/weights/pallet_grandpa.rs index 481c1c53..19e96281 100644 --- a/runtime/alphanet/src/weights/pallet_grandpa.rs +++ b/runtime/alphanet/src/weights/pallet_grandpa.rs @@ -33,11 +33,11 @@ pub struct WeightInfo(PhantomData); impl pallet_grandpa::WeightInfo for WeightInfo { /// The range of component `x` is `[0, 1]`. fn check_equivocation_proof(_x: u32, ) -> Weight { - Weight::from_ref_time(86_280_000 as u64) + Weight::from_parts(86_280_000 as u64) } // Storage: Grandpa Stalled (r:0 w:1) fn note_stalled() -> Weight { - Weight::from_ref_time(5_040_000 as u64) + Weight::from_parts(5_040_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/alphanet/src/weights/pallet_identity.rs b/runtime/alphanet/src/weights/pallet_identity.rs index 9a0f665d..ab809bdc 100644 --- a/runtime/alphanet/src/weights/pallet_identity.rs +++ b/runtime/alphanet/src/weights/pallet_identity.rs @@ -31,192 +31,308 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_identity`. pub struct WeightInfo(PhantomData); impl pallet_identity::WeightInfo for WeightInfo { - // Storage: Identity Registrars (r:1 w:1) + /// Storage: Identity Registrars (r:1 w:1) + /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) /// The range of component `r` is `[1, 19]`. fn add_registrar(r: u32, ) -> Weight { - Weight::from_ref_time(50_144_000 as u64) - // Standard Error: 97_672 - .saturating_add(Weight::from_ref_time(2_150_717 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `32 + r * (57 ±0)` + // Estimated: `2626` + // Minimum execution time: 11_971_000 picoseconds. + Weight::from_parts(12_647_916, 0) + .saturating_add(Weight::from_parts(0, 2626)) + // Standard Error: 1_923 + .saturating_add(Weight::from_parts(117_079, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Identity IdentityOf (r:1 w:1) + /// Storage: Identity IdentityOf (r:1 w:1) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn set_identity(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(74_830_000 as u64) - // Standard Error: 74_361 - .saturating_add(Weight::from_ref_time(1_623_229 as u64).saturating_mul(r as u64)) - // Standard Error: 14_849 - .saturating_add(Weight::from_ref_time(996_020 as u64).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Identity IdentityOf (r:1 w:0) - // Storage: Identity SubsOf (r:1 w:1) - // Storage: Identity SuperOf (r:1 w:1) - /// The range of component `s` is `[1, 100]`. + // Proof Size summary in bytes: + // Measured: `442 + r * (5 ±0)` + // Estimated: `11003` + // Minimum execution time: 29_280_000 picoseconds. + Weight::from_parts(30_187_924, 0) + .saturating_add(Weight::from_parts(0, 11003)) + // Standard Error: 4_084 + .saturating_add(Weight::from_parts(6_401, 0).saturating_mul(r.into())) + // Standard Error: 796 + .saturating_add(Weight::from_parts(440_407, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Identity IdentityOf (r:1 w:0) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: Identity SubsOf (r:1 w:1) + /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// Storage: Identity SuperOf (r:100 w:100) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// The range of component `s` is `[0, 100]`. fn set_subs_new(s: u32, ) -> Weight { - Weight::from_ref_time(65_363_000 as u64) - // Standard Error: 46_262 - .saturating_add(Weight::from_ref_time(6_501_901 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) - } - // Storage: Identity IdentityOf (r:1 w:0) - // Storage: Identity SubsOf (r:1 w:1) - // Storage: Identity SuperOf (r:0 w:1) - /// The range of component `p` is `[1, 100]`. + // Proof Size summary in bytes: + // Measured: `101` + // Estimated: `18716 + s * (2589 ±0)` + // Minimum execution time: 9_217_000 picoseconds. + Weight::from_parts(22_366_407, 0) + .saturating_add(Weight::from_parts(0, 18716)) + // Standard Error: 5_217 + .saturating_add(Weight::from_parts(2_681_153, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(s.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) + .saturating_add(Weight::from_parts(0, 2589).saturating_mul(s.into())) + } + /// Storage: Identity IdentityOf (r:1 w:0) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: Identity SubsOf (r:1 w:1) + /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// Storage: Identity SuperOf (r:0 w:100) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// The range of component `p` is `[0, 100]`. fn set_subs_old(p: u32, ) -> Weight { - Weight::from_ref_time(62_777_000 as u64) - // Standard Error: 38_848 - .saturating_add(Weight::from_ref_time(3_435_862 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) - } - // Storage: Identity SubsOf (r:1 w:1) - // Storage: Identity IdentityOf (r:1 w:1) - // Storage: Identity SuperOf (r:0 w:100) + // Proof Size summary in bytes: + // Measured: `194 + p * (32 ±0)` + // Estimated: `17726` + // Minimum execution time: 9_562_000 picoseconds. + Weight::from_parts(22_267_810, 0) + .saturating_add(Weight::from_parts(0, 17726)) + // Standard Error: 3_161 + .saturating_add(Weight::from_parts(1_068_419, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + } + /// Storage: Identity SubsOf (r:1 w:1) + /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// Storage: Identity IdentityOf (r:1 w:1) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: Identity SuperOf (r:0 w:100) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) /// The range of component `r` is `[1, 20]`. - /// The range of component `s` is `[1, 100]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `s` is `[0, 100]`. + /// The range of component `x` is `[0, 100]`. fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - Weight::from_ref_time(134_734_000 as u64) - // Standard Error: 181_488 - .saturating_add(Weight::from_ref_time(17_549 as u64).saturating_mul(r as u64)) - // Standard Error: 36_138 - .saturating_add(Weight::from_ref_time(3_066_219 as u64).saturating_mul(s as u64)) - // Standard Error: 36_138 - .saturating_add(Weight::from_ref_time(357_494 as u64).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) - } - // Storage: Identity Registrars (r:1 w:0) - // Storage: Identity IdentityOf (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `469 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` + // Estimated: `17726` + // Minimum execution time: 49_724_000 picoseconds. + Weight::from_parts(28_433_827, 0) + .saturating_add(Weight::from_parts(0, 17726)) + // Standard Error: 7_197 + .saturating_add(Weight::from_parts(45_635, 0).saturating_mul(r.into())) + // Standard Error: 1_405 + .saturating_add(Weight::from_parts(1_055_850, 0).saturating_mul(s.into())) + // Standard Error: 1_405 + .saturating_add(Weight::from_parts(236_616, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) + } + /// Storage: Identity Registrars (r:1 w:0) + /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) + /// Storage: Identity IdentityOf (r:1 w:1) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn request_judgement(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(100_248_000 as u64) - // Standard Error: 72_059 - .saturating_add(Weight::from_ref_time(1_092_731 as u64).saturating_mul(r as u64)) - // Standard Error: 14_389 - .saturating_add(Weight::from_ref_time(794_417 as u64).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Identity IdentityOf (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `367 + r * (57 ±0) + x * (66 ±0)` + // Estimated: `13629` + // Minimum execution time: 30_181_000 picoseconds. + Weight::from_parts(30_036_356, 0) + .saturating_add(Weight::from_parts(0, 13629)) + // Standard Error: 3_733 + .saturating_add(Weight::from_parts(61_015, 0).saturating_mul(r.into())) + // Standard Error: 728 + .saturating_add(Weight::from_parts(464_610, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Identity IdentityOf (r:1 w:1) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn cancel_request(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(90_971_000 as u64) - // Standard Error: 96_191 - .saturating_add(Weight::from_ref_time(930_067 as u64).saturating_mul(r as u64)) - // Standard Error: 19_209 - .saturating_add(Weight::from_ref_time(964_040 as u64).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Identity Registrars (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `398 + x * (66 ±0)` + // Estimated: `11003` + // Minimum execution time: 27_256_000 picoseconds. + Weight::from_parts(27_361_959, 0) + .saturating_add(Weight::from_parts(0, 11003)) + // Standard Error: 4_547 + .saturating_add(Weight::from_parts(40_254, 0).saturating_mul(r.into())) + // Standard Error: 887 + .saturating_add(Weight::from_parts(464_938, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Identity Registrars (r:1 w:1) + /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) /// The range of component `r` is `[1, 19]`. fn set_fee(r: u32, ) -> Weight { - Weight::from_ref_time(22_241_000 as u64) - // Standard Error: 32_562 - .saturating_add(Weight::from_ref_time(1_178_749 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `89 + r * (57 ±0)` + // Estimated: `2626` + // Minimum execution time: 7_479_000 picoseconds. + Weight::from_parts(7_959_876, 0) + .saturating_add(Weight::from_parts(0, 2626)) + // Standard Error: 1_565 + .saturating_add(Weight::from_parts(91_853, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Identity Registrars (r:1 w:1) + /// Storage: Identity Registrars (r:1 w:1) + /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) /// The range of component `r` is `[1, 19]`. fn set_account_id(r: u32, ) -> Weight { - Weight::from_ref_time(21_981_000 as u64) - // Standard Error: 39_161 - .saturating_add(Weight::from_ref_time(1_564_656 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `89 + r * (57 ±0)` + // Estimated: `2626` + // Minimum execution time: 7_750_000 picoseconds. + Weight::from_parts(8_097_434, 0) + .saturating_add(Weight::from_parts(0, 2626)) + // Standard Error: 1_227 + .saturating_add(Weight::from_parts(88_314, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Identity Registrars (r:1 w:1) + /// Storage: Identity Registrars (r:1 w:1) + /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) /// The range of component `r` is `[1, 19]`. fn set_fields(r: u32, ) -> Weight { - Weight::from_ref_time(21_030_000 as u64) - // Standard Error: 36_678 - .saturating_add(Weight::from_ref_time(1_318_767 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Identity Registrars (r:1 w:0) - // Storage: Identity IdentityOf (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `89 + r * (57 ±0)` + // Estimated: `2626` + // Minimum execution time: 7_686_000 picoseconds. + Weight::from_parts(8_176_717, 0) + .saturating_add(Weight::from_parts(0, 2626)) + // Standard Error: 1_152 + .saturating_add(Weight::from_parts(80_559, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Identity Registrars (r:1 w:0) + /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) + /// Storage: Identity IdentityOf (r:1 w:1) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) /// The range of component `r` is `[1, 19]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn provide_judgement(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(79_019_000 as u64) - // Standard Error: 105_407 - .saturating_add(Weight::from_ref_time(723_064 as u64).saturating_mul(r as u64)) - // Standard Error: 19_991 - .saturating_add(Weight::from_ref_time(1_503_360 as u64).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Identity SubsOf (r:1 w:1) - // Storage: Identity IdentityOf (r:1 w:1) - // Storage: System Account (r:2 w:2) - // Storage: Identity SuperOf (r:0 w:100) + // Proof Size summary in bytes: + // Measured: `445 + r * (57 ±0) + x * (66 ±0)` + // Estimated: `13629` + // Minimum execution time: 22_923_000 picoseconds. + Weight::from_parts(22_446_926, 0) + .saturating_add(Weight::from_parts(0, 13629)) + // Standard Error: 6_242 + .saturating_add(Weight::from_parts(93_223, 0).saturating_mul(r.into())) + // Standard Error: 1_155 + .saturating_add(Weight::from_parts(734_993, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Identity SubsOf (r:1 w:1) + /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// Storage: Identity IdentityOf (r:1 w:1) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: Identity SuperOf (r:0 w:100) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) /// The range of component `r` is `[1, 20]`. - /// The range of component `s` is `[1, 100]`. - /// The range of component `x` is `[1, 100]`. - fn kill_identity(_r: u32, s: u32, x: u32, ) -> Weight { - Weight::from_ref_time(168_517_000 as u64) - // Standard Error: 33_697 - .saturating_add(Weight::from_ref_time(3_084_439 as u64).saturating_mul(s as u64)) - // Standard Error: 33_697 - .saturating_add(Weight::from_ref_time(406_067 as u64).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) - } - // Storage: Identity IdentityOf (r:1 w:0) - // Storage: Identity SuperOf (r:1 w:1) - // Storage: Identity SubsOf (r:1 w:1) - /// The range of component `s` is `[1, 99]`. + /// The range of component `s` is `[0, 100]`. + /// The range of component `x` is `[0, 100]`. + fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `676 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` + // Estimated: `21319` + // Minimum execution time: 63_424_000 picoseconds. + Weight::from_parts(43_509_592, 0) + .saturating_add(Weight::from_parts(0, 21319)) + // Standard Error: 6_118 + .saturating_add(Weight::from_parts(34_163, 0).saturating_mul(r.into())) + // Standard Error: 1_194 + .saturating_add(Weight::from_parts(1_058_669, 0).saturating_mul(s.into())) + // Standard Error: 1_194 + .saturating_add(Weight::from_parts(226_324, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) + } + /// Storage: Identity IdentityOf (r:1 w:0) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: Identity SuperOf (r:1 w:1) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: Identity SubsOf (r:1 w:1) + /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// The range of component `s` is `[0, 99]`. fn add_sub(s: u32, ) -> Weight { - Weight::from_ref_time(82_505_000 as u64) - // Standard Error: 19_144 - .saturating_add(Weight::from_ref_time(986_721 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Identity IdentityOf (r:1 w:0) - // Storage: Identity SuperOf (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `475 + s * (36 ±0)` + // Estimated: `21305` + // Minimum execution time: 27_057_000 picoseconds. + Weight::from_parts(31_676_569, 0) + .saturating_add(Weight::from_parts(0, 21305)) + // Standard Error: 1_426 + .saturating_add(Weight::from_parts(59_355, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: Identity IdentityOf (r:1 w:0) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: Identity SuperOf (r:1 w:1) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) /// The range of component `s` is `[1, 100]`. fn rename_sub(s: u32, ) -> Weight { - Weight::from_ref_time(32_521_000 as u64) - // Standard Error: 14_067 - .saturating_add(Weight::from_ref_time(597_418 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Identity IdentityOf (r:1 w:0) - // Storage: Identity SuperOf (r:1 w:1) - // Storage: Identity SubsOf (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `591 + s * (3 ±0)` + // Estimated: `14582` + // Minimum execution time: 12_795_000 picoseconds. + Weight::from_parts(15_135_109, 0) + .saturating_add(Weight::from_parts(0, 14582)) + // Standard Error: 629 + .saturating_add(Weight::from_parts(16_556, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Identity IdentityOf (r:1 w:0) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: Identity SuperOf (r:1 w:1) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: Identity SubsOf (r:1 w:1) + /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) /// The range of component `s` is `[1, 100]`. fn remove_sub(s: u32, ) -> Weight { - Weight::from_ref_time(81_283_000 as u64) - // Standard Error: 22_844 - .saturating_add(Weight::from_ref_time(1_024_883 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Identity SuperOf (r:1 w:1) - // Storage: Identity SubsOf (r:1 w:1) - /// The range of component `s` is `[1, 99]`. + // Proof Size summary in bytes: + // Measured: `638 + s * (35 ±0)` + // Estimated: `21305` + // Minimum execution time: 30_174_000 picoseconds. + Weight::from_parts(36_094_454, 0) + .saturating_add(Weight::from_parts(0, 21305)) + // Standard Error: 1_570 + .saturating_add(Weight::from_parts(50_442, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: Identity SuperOf (r:1 w:1) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: Identity SubsOf (r:1 w:1) + /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// The range of component `s` is `[0, 99]`. fn quit_sub(s: u32, ) -> Weight { - Weight::from_ref_time(61_896_000 as u64) - // Standard Error: 19_817 - .saturating_add(Weight::from_ref_time(850_170 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `564 + s * (37 ±0)` + // Estimated: `10302` + // Minimum execution time: 19_729_000 picoseconds. + Weight::from_parts(22_325_410, 0) + .saturating_add(Weight::from_parts(0, 10302)) + // Standard Error: 975 + .saturating_add(Weight::from_parts(52_068, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/runtime/alphanet/src/weights/pallet_im_online.rs b/runtime/alphanet/src/weights/pallet_im_online.rs index 654c183f..c628e05e 100644 --- a/runtime/alphanet/src/weights/pallet_im_online.rs +++ b/runtime/alphanet/src/weights/pallet_im_online.rs @@ -31,20 +31,32 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_im_online`. pub struct WeightInfo(PhantomData); impl pallet_im_online::WeightInfo for WeightInfo { - // Storage: Session Validators (r:1 w:0) - // Storage: Session CurrentIndex (r:1 w:0) - // Storage: ImOnline ReceivedHeartbeats (r:1 w:1) - // Storage: ImOnline AuthoredBlocks (r:1 w:0) - // Storage: ImOnline Keys (r:1 w:0) + /// Storage: Session Validators (r:1 w:0) + /// Proof Skipped: Session Validators (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Session CurrentIndex (r:1 w:0) + /// Proof Skipped: Session CurrentIndex (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ImOnline Keys (r:1 w:0) + /// Proof: ImOnline Keys (max_values: Some(1), max_size: Some(320002), added: 320497, mode: MaxEncodedLen) + /// Storage: ImOnline ReceivedHeartbeats (r:1 w:1) + /// Proof: ImOnline ReceivedHeartbeats (max_values: None, max_size: Some(10021032), added: 10023507, mode: MaxEncodedLen) + /// Storage: ImOnline AuthoredBlocks (r:1 w:0) + /// Proof: ImOnline AuthoredBlocks (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) /// The range of component `k` is `[1, 1000]`. /// The range of component `e` is `[1, 100]`. fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { - Weight::from_ref_time(272_723_000 as u64) - // Standard Error: 2_277 - .saturating_add(Weight::from_ref_time(54_764 as u64).saturating_mul(k as u64)) - // Standard Error: 22_794 - .saturating_add(Weight::from_ref_time(649_363 as u64).saturating_mul(e as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `361 + k * (32 ±0)` + // Estimated: `10349676 + e * (35 ±0) + k * (64 ±0)` + // Minimum execution time: 91_159_000 picoseconds. + Weight::from_parts(74_157_856, 0) + .saturating_add(Weight::from_parts(0, 10349676)) + // Standard Error: 275 + .saturating_add(Weight::from_parts(20_308, 0).saturating_mul(k.into())) + // Standard Error: 2_777 + .saturating_add(Weight::from_parts(387_445, 0).saturating_mul(e.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 35).saturating_mul(e.into())) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(k.into())) } } diff --git a/runtime/alphanet/src/weights/pallet_membership.rs b/runtime/alphanet/src/weights/pallet_membership.rs index 2f59ad46..4ab03797 100644 --- a/runtime/alphanet/src/weights/pallet_membership.rs +++ b/runtime/alphanet/src/weights/pallet_membership.rs @@ -31,88 +31,158 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_membership`. pub struct WeightInfo(PhantomData); impl pallet_membership::WeightInfo for WeightInfo { - // Storage: TechnicalMembership Members (r:1 w:1) - // Storage: TechnicalCommittee Proposals (r:1 w:0) - // Storage: TechnicalCommittee Members (r:0 w:1) - // Storage: TechnicalCommittee Prime (r:0 w:1) + /// Storage: TechnicalMembership Members (r:1 w:1) + /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Proposals (r:1 w:0) + /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalCommittee Members (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalCommittee Prime (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[1, 99]`. fn add_member(m: u32, ) -> Weight { - Weight::from_ref_time(46_387_000 as u64) - // Standard Error: 14_163 - .saturating_add(Weight::from_ref_time(531_530 as u64).saturating_mul(m as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `208 + m * (64 ±0)` + // Estimated: `6793 + m * (192 ±0)` + // Minimum execution time: 15_847_000 picoseconds. + Weight::from_parts(16_597_325, 0) + .saturating_add(Weight::from_parts(0, 6793)) + // Standard Error: 411 + .saturating_add(Weight::from_parts(35_801, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into())) } - // Storage: TechnicalMembership Members (r:1 w:1) - // Storage: TechnicalCommittee Proposals (r:1 w:0) - // Storage: TechnicalMembership Prime (r:1 w:0) - // Storage: TechnicalCommittee Members (r:0 w:1) - // Storage: TechnicalCommittee Prime (r:0 w:1) + /// Storage: TechnicalMembership Members (r:1 w:1) + /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Proposals (r:1 w:0) + /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalMembership Prime (r:1 w:0) + /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Members (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalCommittee Prime (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[2, 100]`. fn remove_member(m: u32, ) -> Weight { - Weight::from_ref_time(50_124_000 as u64) - // Standard Error: 20_678 - .saturating_add(Weight::from_ref_time(431_643 as u64).saturating_mul(m as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `312 + m * (64 ±0)` + // Estimated: `8622 + m * (192 ±0)` + // Minimum execution time: 18_412_000 picoseconds. + Weight::from_parts(19_251_698, 0) + .saturating_add(Weight::from_parts(0, 8622)) + // Standard Error: 474 + .saturating_add(Weight::from_parts(32_206, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into())) } - // Storage: TechnicalMembership Members (r:1 w:1) - // Storage: TechnicalCommittee Proposals (r:1 w:0) - // Storage: TechnicalMembership Prime (r:1 w:0) - // Storage: TechnicalCommittee Members (r:0 w:1) - // Storage: TechnicalCommittee Prime (r:0 w:1) + /// Storage: TechnicalMembership Members (r:1 w:1) + /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Proposals (r:1 w:0) + /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalMembership Prime (r:1 w:0) + /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Members (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalCommittee Prime (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[2, 100]`. fn swap_member(m: u32, ) -> Weight { - Weight::from_ref_time(49_763_000 as u64) - // Standard Error: 18_354 - .saturating_add(Weight::from_ref_time(378_642 as u64).saturating_mul(m as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `312 + m * (64 ±0)` + // Estimated: `8622 + m * (192 ±0)` + // Minimum execution time: 18_502_000 picoseconds. + Weight::from_parts(19_583_888, 0) + .saturating_add(Weight::from_parts(0, 8622)) + // Standard Error: 619 + .saturating_add(Weight::from_parts(44_408, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into())) } - // Storage: TechnicalMembership Members (r:1 w:1) - // Storage: TechnicalCommittee Proposals (r:1 w:0) - // Storage: TechnicalMembership Prime (r:1 w:0) - // Storage: TechnicalCommittee Members (r:0 w:1) - // Storage: TechnicalCommittee Prime (r:0 w:1) + /// Storage: TechnicalMembership Members (r:1 w:1) + /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Proposals (r:1 w:0) + /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalMembership Prime (r:1 w:0) + /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Members (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalCommittee Prime (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[1, 100]`. fn reset_member(m: u32, ) -> Weight { - Weight::from_ref_time(52_138_000 as u64) - // Standard Error: 18_079 - .saturating_add(Weight::from_ref_time(627_791 as u64).saturating_mul(m as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `312 + m * (64 ±0)` + // Estimated: `8622 + m * (192 ±0)` + // Minimum execution time: 18_088_000 picoseconds. + Weight::from_parts(19_292_324, 0) + .saturating_add(Weight::from_parts(0, 8622)) + // Standard Error: 759 + .saturating_add(Weight::from_parts(162_348, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into())) } - // Storage: TechnicalMembership Members (r:1 w:1) - // Storage: TechnicalCommittee Proposals (r:1 w:0) - // Storage: TechnicalMembership Prime (r:1 w:1) - // Storage: TechnicalCommittee Members (r:0 w:1) - // Storage: TechnicalCommittee Prime (r:0 w:1) + /// Storage: TechnicalMembership Members (r:1 w:1) + /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Proposals (r:1 w:0) + /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalMembership Prime (r:1 w:1) + /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Members (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalCommittee Prime (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[1, 100]`. fn change_key(m: u32, ) -> Weight { - Weight::from_ref_time(54_302_000 as u64) - // Standard Error: 13_173 - .saturating_add(Weight::from_ref_time(319_372 as u64).saturating_mul(m as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Proof Size summary in bytes: + // Measured: `312 + m * (64 ±0)` + // Estimated: `8622 + m * (192 ±0)` + // Minimum execution time: 19_134_000 picoseconds. + Weight::from_parts(20_242_466, 0) + .saturating_add(Weight::from_parts(0, 8622)) + // Standard Error: 962 + .saturating_add(Weight::from_parts(47_779, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into())) } - // Storage: TechnicalMembership Members (r:1 w:0) - // Storage: TechnicalMembership Prime (r:0 w:1) - // Storage: TechnicalCommittee Prime (r:0 w:1) + /// Storage: TechnicalMembership Members (r:1 w:0) + /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: TechnicalMembership Prime (r:0 w:1) + /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Prime (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[1, 100]`. fn set_prime(m: u32, ) -> Weight { - Weight::from_ref_time(19_036_000 as u64) - // Standard Error: 4_846 - .saturating_add(Weight::from_ref_time(133_389 as u64).saturating_mul(m as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `32 + m * (32 ±0)` + // Estimated: `4719 + m * (32 ±0)` + // Minimum execution time: 6_726_000 picoseconds. + Weight::from_parts(6_966_055, 0) + .saturating_add(Weight::from_parts(0, 4719)) + // Standard Error: 255 + .saturating_add(Weight::from_parts(13_950, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } - // Storage: TechnicalMembership Prime (r:0 w:1) - // Storage: TechnicalCommittee Prime (r:0 w:1) + /// Storage: TechnicalMembership Prime (r:0 w:1) + /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Prime (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[1, 100]`. fn clear_prime(m: u32, ) -> Weight { - Weight::from_ref_time(11_531_000 as u64) - // Standard Error: 3_962 - .saturating_add(Weight::from_ref_time(124_828 as u64).saturating_mul(m as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_010_000 picoseconds. + Weight::from_parts(3_196_429, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 78 + .saturating_add(Weight::from_parts(471, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/runtime/alphanet/src/weights/pallet_multisig.rs b/runtime/alphanet/src/weights/pallet_multisig.rs index 2bd8e11f..c6232944 100644 --- a/runtime/alphanet/src/weights/pallet_multisig.rs +++ b/runtime/alphanet/src/weights/pallet_multisig.rs @@ -33,81 +33,114 @@ pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 10000]`. fn as_multi_threshold_1(z: u32, ) -> Weight { - // Minimum execution time: 20_283 nanoseconds. - Weight::from_ref_time(20_861_089 as u64) - // Standard Error: 5 - .saturating_add(Weight::from_ref_time(583 as u64).saturating_mul(z as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 11_823_000 picoseconds. + Weight::from_parts(12_266_007, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 2 + .saturating_add(Weight::from_parts(498, 0).saturating_mul(z.into())) } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// Storage: Multisig Multisigs (r:1 w:1) + /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 52_699 nanoseconds. - Weight::from_ref_time(40_874_603 as u64) - // Standard Error: 546 - .saturating_add(Weight::from_ref_time(131_727 as u64).saturating_mul(s as u64)) - // Standard Error: 5 - .saturating_add(Weight::from_ref_time(1_537 as u64).saturating_mul(z as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `301 + s * (2 ±0)` + // Estimated: `6811` + // Minimum execution time: 36_427_000 picoseconds. + Weight::from_parts(31_400_908, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 650 + .saturating_add(Weight::from_parts(54_330, 0).saturating_mul(s.into())) + // Standard Error: 6 + .saturating_add(Weight::from_parts(1_198, 0).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Multisig Multisigs (r:1 w:1) + /// Storage: Multisig Multisigs (r:1 w:1) + /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 39_843 nanoseconds. - Weight::from_ref_time(28_912_325 as u64) - // Standard Error: 734 - .saturating_add(Weight::from_ref_time(125_761 as u64).saturating_mul(s as u64)) - // Standard Error: 7 - .saturating_add(Weight::from_ref_time(1_542 as u64).saturating_mul(z as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `320` + // Estimated: `6811` + // Minimum execution time: 26_513_000 picoseconds. + Weight::from_parts(21_729_726, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 412 + .saturating_add(Weight::from_parts(54_766, 0).saturating_mul(s.into())) + // Standard Error: 4 + .saturating_add(Weight::from_parts(1_190, 0).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: System Account (r:1 w:1) + /// Storage: Multisig Multisigs (r:1 w:1) + /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 54_980 nanoseconds. - Weight::from_ref_time(42_087_213 as u64) - // Standard Error: 786 - .saturating_add(Weight::from_ref_time(153_935 as u64).saturating_mul(s as u64)) - // Standard Error: 7 - .saturating_add(Weight::from_ref_time(1_545 as u64).saturating_mul(z as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `426 + s * (33 ±0)` + // Estimated: `10404` + // Minimum execution time: 44_380_000 picoseconds. + Weight::from_parts(35_396_612, 0) + .saturating_add(Weight::from_parts(0, 10404)) + // Standard Error: 1_363 + .saturating_add(Weight::from_parts(95_216, 0).saturating_mul(s.into())) + // Standard Error: 13 + .saturating_add(Weight::from_parts(1_264, 0).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// Storage: Multisig Multisigs (r:1 w:1) + /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { - // Minimum execution time: 37_802 nanoseconds. - Weight::from_ref_time(39_933_623 as u64) - // Standard Error: 1_059 - .saturating_add(Weight::from_ref_time(121_891 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `301 + s * (2 ±0)` + // Estimated: `6811` + // Minimum execution time: 27_881_000 picoseconds. + Weight::from_parts(29_392_537, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 647 + .saturating_add(Weight::from_parts(63_287, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Multisig Multisigs (r:1 w:1) + /// Storage: Multisig Multisigs (r:1 w:1) + /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32, ) -> Weight { - // Minimum execution time: 25_738 nanoseconds. - Weight::from_ref_time(27_676_766 as u64) - // Standard Error: 710 - .saturating_add(Weight::from_ref_time(125_733 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `320` + // Estimated: `6811` + // Minimum execution time: 18_831_000 picoseconds. + Weight::from_parts(20_022_948, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 709 + .saturating_add(Weight::from_parts(57_318, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Multisig Multisigs (r:1 w:1) + /// Storage: Multisig Multisigs (r:1 w:1) + /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { - // Minimum execution time: 36_591 nanoseconds. - Weight::from_ref_time(38_707_543 as u64) - // Standard Error: 881 - .saturating_add(Weight::from_ref_time(126_198 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `492 + s * (1 ±0)` + // Estimated: `6811` + // Minimum execution time: 29_105_000 picoseconds. + Weight::from_parts(30_739_462, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 1_473 + .saturating_add(Weight::from_parts(90_499, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } \ No newline at end of file diff --git a/runtime/alphanet/src/weights/pallet_preimage.rs b/runtime/alphanet/src/weights/pallet_preimage.rs index 79215e78..e5c37853 100644 --- a/runtime/alphanet/src/weights/pallet_preimage.rs +++ b/runtime/alphanet/src/weights/pallet_preimage.rs @@ -31,92 +31,169 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_preimage`. pub struct WeightInfo(PhantomData); impl pallet_preimage::WeightInfo for WeightInfo { - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Preimage PreimageFor (r:0 w:1) + /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(65_062_000 as u64) - // Standard Error: 16 - .saturating_add(Weight::from_ref_time(4_599 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `143` + // Estimated: `3556` + // Minimum execution time: 24_877_000 picoseconds. + Weight::from_parts(25_117_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_971, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:0) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Preimage PreimageFor (r:0 w:1) + /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) /// The range of component `s` is `[0, 4194304]`. fn note_requested_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(44_613_000 as u64) - // Standard Error: 13 - .saturating_add(Weight::from_ref_time(4_542 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `106` + // Estimated: `3556` + // Minimum execution time: 15_956_000 picoseconds. + Weight::from_parts(16_228_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_971, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:0) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Preimage PreimageFor (r:0 w:1) + /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) /// The range of component `s` is `[0, 4194304]`. fn note_no_deposit_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(63_439_000 as u64) - // Standard Error: 14 - .saturating_add(Weight::from_ref_time(4_610 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `106` + // Estimated: `3556` + // Minimum execution time: 15_423_000 picoseconds. + Weight::from_parts(15_623_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_971, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Preimage PreimageFor (r:0 w:1) + /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) fn unnote_preimage() -> Weight { - Weight::from_ref_time(167_656_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `289` + // Estimated: `3556` + // Minimum execution time: 32_025_000 picoseconds. + Weight::from_parts(33_010_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Preimage PreimageFor (r:0 w:1) + /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) fn unnote_no_deposit_preimage() -> Weight { - Weight::from_ref_time(129_424_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `144` + // Estimated: `3556` + // Minimum execution time: 20_745_000 picoseconds. + Weight::from_parts(22_025_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Preimage StatusFor (r:1 w:1) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn request_preimage() -> Weight { - Weight::from_ref_time(159_789_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `188` + // Estimated: `3556` + // Minimum execution time: 18_566_000 picoseconds. + Weight::from_parts(19_645_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Preimage StatusFor (r:1 w:1) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn request_no_deposit_preimage() -> Weight { - Weight::from_ref_time(123_092_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `144` + // Estimated: `3556` + // Minimum execution time: 11_425_000 picoseconds. + Weight::from_parts(11_921_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Preimage StatusFor (r:1 w:1) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn request_unnoted_preimage() -> Weight { - Weight::from_ref_time(74_920_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `3556` + // Minimum execution time: 12_917_000 picoseconds. + Weight::from_parts(13_742_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Preimage StatusFor (r:1 w:1) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn request_requested_preimage() -> Weight { - Weight::from_ref_time(25_368_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `106` + // Estimated: `3556` + // Minimum execution time: 7_930_000 picoseconds. + Weight::from_parts(8_153_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Preimage PreimageFor (r:0 w:1) + /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) fn unrequest_preimage() -> Weight { - Weight::from_ref_time(132_460_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `144` + // Estimated: `3556` + // Minimum execution time: 19_533_000 picoseconds. + Weight::from_parts(20_256_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn unrequest_unnoted_preimage() -> Weight { - Weight::from_ref_time(76_764_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `106` + // Estimated: `3556` + // Minimum execution time: 7_840_000 picoseconds. + Weight::from_parts(8_014_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Preimage StatusFor (r:1 w:1) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn unrequest_multi_referenced_preimage() -> Weight { - Weight::from_ref_time(28_915_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `106` + // Estimated: `3556` + // Minimum execution time: 7_650_000 picoseconds. + Weight::from_parts(8_032_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/alphanet/src/weights/pallet_scheduler.rs b/runtime/alphanet/src/weights/pallet_scheduler.rs index d4a8113c..10b34cd0 100644 --- a/runtime/alphanet/src/weights/pallet_scheduler.rs +++ b/runtime/alphanet/src/weights/pallet_scheduler.rs @@ -31,86 +31,160 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_scheduler`. pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { - // Storage: Scheduler IncompleteSince (r:1 w:1) + /// Storage: Scheduler IncompleteSince (r:1 w:1) + /// Proof: Scheduler IncompleteSince (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn service_agendas_base() -> Weight { - Weight::from_ref_time(4_992_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `69` + // Estimated: `1489` + // Minimum execution time: 3_952_000 picoseconds. + Weight::from_parts(4_041_000, 0) + .saturating_add(Weight::from_parts(0, 1489)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Scheduler Agenda (r:1 w:1) - /// The range of component `s` is `[0, 512]`. + /// Storage: Scheduler Agenda (r:1 w:1) + /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) + /// The range of component `s` is `[0, 50]`. fn service_agenda_base(s: u32, ) -> Weight { - Weight::from_ref_time(4_320_000 as u64) - // Standard Error: 619 - .saturating_add(Weight::from_ref_time(336_713 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `116 + s * (177 ±0)` + // Estimated: `42428` + // Minimum execution time: 3_546_000 picoseconds. + Weight::from_parts(6_896_089, 0) + .saturating_add(Weight::from_parts(0, 42428)) + // Standard Error: 2_110 + .saturating_add(Weight::from_parts(751_504, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } fn service_task_base() -> Weight { - Weight::from_ref_time(10_864_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_524_000 picoseconds. + Weight::from_parts(5_697_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) + /// Storage: Preimage PreimageFor (r:1 w:1) + /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: Measured) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// The range of component `s` is `[128, 4194304]`. fn service_task_fetched(s: u32, ) -> Weight { - Weight::from_ref_time(24_586_000 as u64) + // Proof Size summary in bytes: + // Measured: `179 + s * (1 ±0)` + // Estimated: `7200 + s * (1 ±0)` + // Minimum execution time: 18_739_000 picoseconds. + Weight::from_parts(18_916_000, 0) + .saturating_add(Weight::from_parts(0, 7200)) // Standard Error: 1 - .saturating_add(Weight::from_ref_time(1_138 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(Weight::from_parts(1_168, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into())) } - // Storage: Scheduler Lookup (r:0 w:1) + /// Storage: Scheduler Lookup (r:0 w:1) + /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) fn service_task_named() -> Weight { - Weight::from_ref_time(13_127_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_343_000 picoseconds. + Weight::from_parts(7_519_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } fn service_task_periodic() -> Weight { - Weight::from_ref_time(11_053_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_531_000 picoseconds. + Weight::from_parts(5_699_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } fn execute_dispatch_signed() -> Weight { - Weight::from_ref_time(4_158_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_918_000 picoseconds. + Weight::from_parts(3_037_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } fn execute_dispatch_unsigned() -> Weight { - Weight::from_ref_time(4_104_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_941_000 picoseconds. + Weight::from_parts(3_034_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - // Storage: Scheduler Agenda (r:1 w:1) - /// The range of component `s` is `[0, 511]`. + /// Storage: Scheduler Agenda (r:1 w:1) + /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) + /// The range of component `s` is `[0, 49]`. fn schedule(s: u32, ) -> Weight { - Weight::from_ref_time(20_074_000 as u64) - // Standard Error: 765 - .saturating_add(Weight::from_ref_time(343_285 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `116 + s * (177 ±0)` + // Estimated: `42428` + // Minimum execution time: 14_269_000 picoseconds. + Weight::from_parts(17_390_869, 0) + .saturating_add(Weight::from_parts(0, 42428)) + // Standard Error: 2_065 + .saturating_add(Weight::from_parts(738_805, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - /// The range of component `s` is `[1, 512]`. + /// Storage: Scheduler Agenda (r:1 w:1) + /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) + /// Storage: Scheduler Lookup (r:0 w:1) + /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// The range of component `s` is `[1, 50]`. fn cancel(s: u32, ) -> Weight { - Weight::from_ref_time(21_509_000 as u64) - // Standard Error: 708 - .saturating_add(Weight::from_ref_time(323_013 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `116 + s * (177 ±0)` + // Estimated: `42428` + // Minimum execution time: 18_261_000 picoseconds. + Weight::from_parts(17_908_720, 0) + .saturating_add(Weight::from_parts(0, 42428)) + // Standard Error: 2_214 + .saturating_add(Weight::from_parts(1_318_747, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - /// The range of component `s` is `[0, 511]`. + /// Storage: Scheduler Lookup (r:1 w:1) + /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// Storage: Scheduler Agenda (r:1 w:1) + /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) + /// The range of component `s` is `[0, 49]`. fn schedule_named(s: u32, ) -> Weight { - Weight::from_ref_time(22_427_000 as u64) - // Standard Error: 850 - .saturating_add(Weight::from_ref_time(357_265 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `293 + s * (185 ±0)` + // Estimated: `45941` + // Minimum execution time: 16_924_000 picoseconds. + Weight::from_parts(21_290_922, 0) + .saturating_add(Weight::from_parts(0, 45941)) + // Standard Error: 3_117 + .saturating_add(Weight::from_parts(771_166, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - /// The range of component `s` is `[1, 512]`. + /// Storage: Scheduler Lookup (r:1 w:1) + /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// Storage: Scheduler Agenda (r:1 w:1) + /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) + /// The range of component `s` is `[1, 50]`. fn cancel_named(s: u32, ) -> Weight { - Weight::from_ref_time(22_875_000 as u64) - // Standard Error: 693 - .saturating_add(Weight::from_ref_time(336_643 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `319 + s * (185 ±0)` + // Estimated: `45941` + // Minimum execution time: 19_236_000 picoseconds. + Weight::from_parts(19_949_783, 0) + .saturating_add(Weight::from_parts(0, 45941)) + // Standard Error: 2_288 + .saturating_add(Weight::from_parts(1_338_921, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } } + diff --git a/runtime/alphanet/src/weights/pallet_session.rs b/runtime/alphanet/src/weights/pallet_session.rs index b1d17c34..71491e44 100644 --- a/runtime/alphanet/src/weights/pallet_session.rs +++ b/runtime/alphanet/src/weights/pallet_session.rs @@ -31,20 +31,36 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_session`. pub struct WeightInfo(PhantomData); impl pallet_session::WeightInfo for WeightInfo { - // Storage: Staking Ledger (r:1 w:0) - // Storage: Session NextKeys (r:1 w:1) - // Storage: Session KeyOwner (r:4 w:4) + /// Storage: Staking Ledger (r:1 w:0) + /// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen) + /// Storage: Session NextKeys (r:1 w:1) + /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) + /// Storage: Session KeyOwner (r:6 w:6) + /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn set_keys() -> Weight { - Weight::from_ref_time(172_626_000 as u64) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Proof Size summary in bytes: + // Measured: `2083` + // Estimated: `28027` + // Minimum execution time: 51_544_000 picoseconds. + Weight::from_parts(52_127_000, 0) + .saturating_add(Weight::from_parts(0, 28027)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(7)) } - // Storage: Staking Ledger (r:1 w:0) - // Storage: Session NextKeys (r:1 w:1) - // Storage: Session KeyOwner (r:0 w:4) + /// Storage: Staking Ledger (r:1 w:0) + /// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen) + /// Storage: Session NextKeys (r:1 w:1) + /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) + /// Storage: Session KeyOwner (r:0 w:6) + /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn purge_keys() -> Weight { - Weight::from_ref_time(192_632_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Proof Size summary in bytes: + // Measured: `1947` + // Estimated: `11915` + // Minimum execution time: 37_019_000 picoseconds. + Weight::from_parts(37_594_000, 0) + .saturating_add(Weight::from_parts(0, 11915)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(7)) } -} +} \ No newline at end of file diff --git a/runtime/alphanet/src/weights/pallet_timestamp.rs b/runtime/alphanet/src/weights/pallet_timestamp.rs index 71f31fc3..2e1230d0 100644 --- a/runtime/alphanet/src/weights/pallet_timestamp.rs +++ b/runtime/alphanet/src/weights/pallet_timestamp.rs @@ -24,21 +24,32 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] - use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_timestamp`. pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { - // Storage: Timestamp Now (r:1 w:1) - // Storage: Babe CurrentSlot (r:1 w:0) + /// Storage: Timestamp Now (r:1 w:1) + /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: Babe CurrentSlot (r:1 w:0) + /// Proof: Babe CurrentSlot (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) fn set() -> Weight { - Weight::from_ref_time(23_405_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `345` + // Estimated: `2986` + // Minimum execution time: 9_159_000 picoseconds. + Weight::from_parts(9_663_000, 0) + .saturating_add(Weight::from_parts(0, 2986)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } fn on_finalize() -> Weight { - Weight::from_ref_time(10_480_000 as u64) + // Proof Size summary in bytes: + // Measured: `128` + // Estimated: `0` + // Minimum execution time: 3_803_000 picoseconds. + Weight::from_parts(4_007_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/runtime/alphanet/src/weights/pallet_treasury.rs b/runtime/alphanet/src/weights/pallet_treasury.rs index ad153e53..976e8a0b 100644 --- a/runtime/alphanet/src/weights/pallet_treasury.rs +++ b/runtime/alphanet/src/weights/pallet_treasury.rs @@ -31,50 +31,105 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_treasury`. pub struct WeightInfo(PhantomData); impl pallet_treasury::WeightInfo for WeightInfo { + /// Storage: Treasury ProposalCount (r:1 w:1) + /// Proof: Treasury ProposalCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + /// Storage: Treasury Proposals (r:0 w:1) + /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn spend() -> Weight { - Weight::from_ref_time(781_000 as u64) + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `3376` + // Minimum execution time: 14_516_000 picoseconds. + Weight::from_parts(14_898_000, 0) + .saturating_add(Weight::from_parts(0, 3376)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: Treasury ProposalCount (r:1 w:1) - // Storage: Treasury Proposals (r:0 w:1) + /// Storage: Treasury ProposalCount (r:1 w:1) + /// Proof: Treasury ProposalCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Treasury Proposals (r:0 w:1) + /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn propose_spend() -> Weight { - Weight::from_ref_time(107_363_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `107` + // Estimated: `1489` + // Minimum execution time: 21_971_000 picoseconds. + Weight::from_parts(22_591_000, 0) + .saturating_add(Weight::from_parts(0, 1489)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Treasury Proposals (r:1 w:1) - // Storage: System Account (r:2 w:2) + /// Storage: Treasury Proposals (r:1 w:1) + /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn reject_proposal() -> Weight { - Weight::from_ref_time(139_031_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `265` + // Estimated: `7166` + // Minimum execution time: 34_087_000 picoseconds. + Weight::from_parts(34_367_000, 0) + .saturating_add(Weight::from_parts(0, 7166)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Treasury Proposals (r:1 w:0) - // Storage: Treasury Approvals (r:1 w:1) + /// Storage: Treasury Proposals (r:1 w:0) + /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) /// The range of component `p` is `[0, 99]`. fn approve_proposal(p: u32, ) -> Weight { - Weight::from_ref_time(27_943_000 as u64) - // Standard Error: 14_760 - .saturating_add(Weight::from_ref_time(1_185_423 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `433 + p * (8 ±0)` + // Estimated: `5460` + // Minimum execution time: 9_511_000 picoseconds. + Weight::from_parts(12_247_904, 0) + .saturating_add(Weight::from_parts(0, 5460)) + // Standard Error: 903 + .saturating_add(Weight::from_parts(28_147, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Treasury Approvals (r:1 w:1) + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) fn remove_approval() -> Weight { - Weight::from_ref_time(26_049_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `90` + // Estimated: `1887` + // Minimum execution time: 6_948_000 picoseconds. + Weight::from_parts(7_162_000, 0) + .saturating_add(Weight::from_parts(0, 1887)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: System Account (r:1 w:0) - // Storage: Treasury Approvals (r:1 w:1) - // Storage: Treasury Proposals (r:2 w:2) + /// Storage: Treasury Deactivated (r:1 w:1) + /// Proof: Treasury Deactivated (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// Storage: Balances InactiveIssuance (r:1 w:1) + /// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + /// Storage: Treasury Proposals (r:100 w:100) + /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + /// Storage: System Account (r:201 w:201) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: Bounties BountyApprovals (r:1 w:1) + /// Proof: Bounties BountyApprovals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) /// The range of component `p` is `[0, 100]`. fn on_initialize_proposals(p: u32, ) -> Weight { - Weight::from_ref_time(71_013_000 as u64) - // Standard Error: 406_839 - .saturating_add(Weight::from_ref_time(78_758_389 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(p as u64))) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(p as u64))) + // Proof Size summary in bytes: + // Measured: `297 + p * (251 ±0)` + // Estimated: `11359 + p * (7789 ±0)` + // Minimum execution time: 57_179_000 picoseconds. + Weight::from_parts(61_547_634, 0) + .saturating_add(Weight::from_parts(0, 11359)) + // Standard Error: 30_382 + .saturating_add(Weight::from_parts(32_012_031, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(5)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 7789).saturating_mul(p.into())) } } diff --git a/runtime/alphanet/src/weights/pallet_utility.rs b/runtime/alphanet/src/weights/pallet_utility.rs index b91e73d5..8618b1a4 100644 --- a/runtime/alphanet/src/weights/pallet_utility.rs +++ b/runtime/alphanet/src/weights/pallet_utility.rs @@ -33,26 +33,51 @@ pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - Weight::from_ref_time(34_244_000 as u64) - // Standard Error: 59_938 - .saturating_add(Weight::from_ref_time(10_147_060 as u64).saturating_mul(c as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_159_000 picoseconds. + Weight::from_parts(13_044_055, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 2_765 + .saturating_add(Weight::from_parts(4_553_907, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { - Weight::from_ref_time(15_379_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_562_000 picoseconds. + Weight::from_parts(5_752_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - Weight::from_ref_time(42_379_000 as u64) - // Standard Error: 54_382 - .saturating_add(Weight::from_ref_time(10_198_805 as u64).saturating_mul(c as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_939_000 picoseconds. + Weight::from_parts(16_867_349, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 3_809 + .saturating_add(Weight::from_parts(4_848_850, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { - Weight::from_ref_time(32_541_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 9_243_000 picoseconds. + Weight::from_parts(9_507_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - Weight::from_ref_time(27_612_000 as u64) - // Standard Error: 53_425 - .saturating_add(Weight::from_ref_time(9_801_342 as u64).saturating_mul(c as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_958_000 picoseconds. + Weight::from_parts(14_931_896, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 3_015 + .saturating_add(Weight::from_parts(4_565_357, 0).saturating_mul(c.into())) } } diff --git a/runtime/alphanet/src/weights/ternoa_auction.rs b/runtime/alphanet/src/weights/ternoa_auction.rs index f338b6d1..9fc733c8 100644 --- a/runtime/alphanet/src/weights/ternoa_auction.rs +++ b/runtime/alphanet/src/weights/ternoa_auction.rs @@ -37,22 +37,22 @@ impl ternoa_auction::WeightInfo for WeightInfo { // Storage: Auction Auctions (r:0 w:1) /// The range of component `s` is `[0, 999998]`. fn create_auction(s: u32, ) -> Weight { - Weight::from_ref_time(107_323_000 as u64) + Weight::from_parts(107_323_000 , 0) // Standard Error: 109 - .saturating_add(Weight::from_ref_time(34_273 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + .saturating_add(Weight::from_parts(34_273 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: NFT Nfts (r:1 w:1) // Storage: Auction Auctions (r:1 w:1) // Storage: Auction Deadlines (r:1 w:1) /// The range of component `s` is `[0, 999999]`. fn cancel_auction(s: u32, ) -> Weight { - Weight::from_ref_time(69_049_000 as u64) + Weight::from_parts(69_049_000 , 0) // Standard Error: 64 - .saturating_add(Weight::from_ref_time(31_779 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + .saturating_add(Weight::from_parts(31_779 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: NFT Nfts (r:1 w:1) // Storage: Auction Auctions (r:1 w:1) @@ -62,31 +62,31 @@ impl ternoa_auction::WeightInfo for WeightInfo { // Storage: Auction Deadlines (r:1 w:1) /// The range of component `s` is `[0, 999999]`. fn end_auction(s: u32, ) -> Weight { - Weight::from_ref_time(138_922_000 as u64) + Weight::from_parts(138_922_000 , 0) // Standard Error: 65 - .saturating_add(Weight::from_ref_time(30_873 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(8 as u64)) - .saturating_add(T::DbWeight::get().writes(7 as u64)) + .saturating_add(Weight::from_parts(30_873 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(7)) } // Storage: Auction Auctions (r:1 w:1) // Storage: System Account (r:2 w:2) /// The range of component `s` is `[0, 24]`. fn add_bid(s: u32, ) -> Weight { - Weight::from_ref_time(91_723_000 as u64) + Weight::from_parts(91_723_000 , 0) // Standard Error: 72_254 - .saturating_add(Weight::from_ref_time(2_031_189 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + .saturating_add(Weight::from_parts(2_031_189 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: Auction Auctions (r:1 w:1) // Storage: System Account (r:2 w:2) /// The range of component `s` is `[0, 24]`. fn remove_bid(s: u32, ) -> Weight { - Weight::from_ref_time(88_275_000 as u64) + Weight::from_parts(88_275_000 , 0) // Standard Error: 65_530 - .saturating_add(Weight::from_ref_time(1_283_005 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + .saturating_add(Weight::from_parts(1_283_005 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: NFT Nfts (r:1 w:1) // Storage: Auction Auctions (r:1 w:1) @@ -95,17 +95,17 @@ impl ternoa_auction::WeightInfo for WeightInfo { // Storage: Auction Deadlines (r:1 w:1) /// The range of component `s` is `[0, 999999]`. fn buy_it_now(s: u32, ) -> Weight { - Weight::from_ref_time(152_217_000 as u64) + Weight::from_parts(152_217_000 , 0) // Standard Error: 86 - .saturating_add(Weight::from_ref_time(32_130 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + .saturating_add(Weight::from_parts(32_130 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Auction Claims (r:1 w:1) // Storage: System Account (r:2 w:2) fn claim() -> Weight { - Weight::from_ref_time(123_441_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + Weight::from_parts(123_441_000 , 0) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } } diff --git a/runtime/alphanet/src/weights/ternoa_bridge.rs b/runtime/alphanet/src/weights/ternoa_bridge.rs index 8ce8e321..99c420c0 100644 --- a/runtime/alphanet/src/weights/ternoa_bridge.rs +++ b/runtime/alphanet/src/weights/ternoa_bridge.rs @@ -33,46 +33,46 @@ pub struct WeightInfo(PhantomData); impl ternoa_bridge::WeightInfo for WeightInfo { // Storage: Bridge RelayerVoteThreshold (r:0 w:1) fn set_threshold() -> Weight { - Weight::from_ref_time(34_063_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(34_063_000 , 0) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Bridge ChainNonces (r:1 w:1) fn add_chain() -> Weight { - Weight::from_ref_time(52_018_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(52_018_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Bridge Relayers (r:0 w:1) fn set_relayers() -> Weight { - Weight::from_ref_time(44_643_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(44_643_000 , 0) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Bridge Relayers (r:1 w:0) // Storage: Bridge ChainNonces (r:1 w:0) // Storage: Bridge RelayerVoteThreshold (r:1 w:0) // Storage: Bridge Votes (r:1 w:1) fn vote_for_proposal() -> Weight { - Weight::from_ref_time(57_488_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(57_488_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Bridge BridgeFee (r:1 w:0) // Storage: Bridge ChainNonces (r:1 w:1) // Storage: System Account (r:2 w:2) fn deposit() -> Weight { - Weight::from_ref_time(178_516_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + Weight::from_parts(178_516_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: Bridge BridgeFee (r:0 w:1) fn set_bridge_fee() -> Weight { - Weight::from_ref_time(34_004_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(34_004_000 , 0) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Bridge ChainNonces (r:1 w:1) fn set_deposit_nonce() -> Weight { - Weight::from_ref_time(66_546_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(66_546_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/alphanet/src/weights/ternoa_marketplace.rs b/runtime/alphanet/src/weights/ternoa_marketplace.rs index 70893265..c5145dc4 100644 --- a/runtime/alphanet/src/weights/ternoa_marketplace.rs +++ b/runtime/alphanet/src/weights/ternoa_marketplace.rs @@ -36,55 +36,55 @@ impl ternoa_marketplace::WeightInfo for WeightInfo { // Storage: Marketplace NextMarketplaceId (r:1 w:1) // Storage: Marketplace Marketplaces (r:0 w:1) fn create_marketplace() -> Weight { - Weight::from_ref_time(125_957_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + Weight::from_parts(125_957_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) } // Storage: Marketplace Marketplaces (r:1 w:1) fn set_marketplace_owner() -> Weight { - Weight::from_ref_time(82_786_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(82_786_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Marketplace Marketplaces (r:1 w:1) fn set_marketplace_kind() -> Weight { - Weight::from_ref_time(81_393_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(81_393_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Marketplace Marketplaces (r:1 w:1) fn set_marketplace_configuration() -> Weight { - Weight::from_ref_time(139_403_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(139_403_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Marketplace MarketplaceMintFee (r:0 w:1) fn set_marketplace_mint_fee() -> Weight { - Weight::from_ref_time(29_094_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(29_094_000 , 0) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: NFT Nfts (r:1 w:1) // Storage: Marketplace Marketplaces (r:1 w:0) // Storage: Marketplace ListedNfts (r:0 w:1) fn list_nft() -> Weight { - Weight::from_ref_time(68_008_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + Weight::from_parts(68_008_000 , 0) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: NFT Nfts (r:1 w:1) // Storage: Marketplace ListedNfts (r:1 w:1) fn unlist_nft() -> Weight { - Weight::from_ref_time(76_744_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + Weight::from_parts(76_744_000 , 0) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: NFT Nfts (r:1 w:1) // Storage: Marketplace ListedNfts (r:1 w:1) // Storage: Marketplace Marketplaces (r:1 w:0) // Storage: System Account (r:2 w:2) fn buy_nft() -> Weight { - Weight::from_ref_time(166_253_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + Weight::from_parts(166_253_000 , 0) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) } } diff --git a/runtime/alphanet/src/weights/ternoa_nft.rs b/runtime/alphanet/src/weights/ternoa_nft.rs index 61697755..d53355e5 100644 --- a/runtime/alphanet/src/weights/ternoa_nft.rs +++ b/runtime/alphanet/src/weights/ternoa_nft.rs @@ -38,80 +38,80 @@ impl ternoa_nft::WeightInfo for WeightInfo { // Storage: NFT Nfts (r:0 w:1) /// The range of component `s` is `[0, 999999]`. fn create_nft(s: u32, ) -> Weight { - Weight::from_ref_time(115_467_000 as u64) + Weight::from_parts(115_467_000 , 0) // Standard Error: 74 - .saturating_add(Weight::from_ref_time(18_063 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + .saturating_add(Weight::from_parts(18_063 , 0).saturating_mul(s .into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) } // Storage: NFT Nfts (r:1 w:1) // Storage: NFT Collections (r:1 w:1) /// The range of component `s` is `[0, 999999]`. fn burn_nft(s: u32, ) -> Weight { - Weight::from_ref_time(83_528_000 as u64) + Weight::from_parts(83_528_000 , 0) // Standard Error: 89 - .saturating_add(Weight::from_ref_time(19_906 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(Weight::from_parts(19_906 , 0).saturating_mul(s .into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: NFT Nfts (r:1 w:1) fn transfer_nft() -> Weight { - Weight::from_ref_time(83_436_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(83_436_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: NFT Nfts (r:1 w:1) // Storage: NFT DelegatedNFTs (r:0 w:1) fn delegate_nft() -> Weight { - Weight::from_ref_time(87_534_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + Weight::from_parts(87_534_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: NFT Nfts (r:1 w:1) fn set_royalty() -> Weight { - Weight::from_ref_time(91_223_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(91_223_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: NFT NftMintFee (r:0 w:1) fn set_nft_mint_fee() -> Weight { - Weight::from_ref_time(65_472_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(65_472_000 , 0) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: NFT NextCollectionId (r:1 w:1) // Storage: NFT Collections (r:0 w:1) fn create_collection() -> Weight { - Weight::from_ref_time(130_164_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + Weight::from_parts(130_164_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: NFT Collections (r:1 w:1) fn burn_collection() -> Weight { - Weight::from_ref_time(101_370_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(101_370_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: NFT Collections (r:1 w:1) fn close_collection() -> Weight { - Weight::from_ref_time(70_933_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(70_933_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: NFT Collections (r:1 w:1) fn limit_collection() -> Weight { - Weight::from_ref_time(87_805_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(87_805_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: NFT Collections (r:1 w:1) // Storage: NFT Nfts (r:1 w:1) /// The range of component `s` is `[0, 999999]`. fn add_nft_to_collection(s: u32, ) -> Weight { - Weight::from_ref_time(61_635_000 as u64) + Weight::from_parts(61_635_000 , 0) // Standard Error: 58 - .saturating_add(Weight::from_ref_time(17_429 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(Weight::from_parts(17_429 , 0).saturating_mul(s .into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: NFT NftMintFee (r:1 w:0) // Storage: NFT SecretNftMintFee (r:1 w:0) @@ -122,43 +122,43 @@ impl ternoa_nft::WeightInfo for WeightInfo { // Storage: NFT Nfts (r:0 w:1) /// The range of component `s` is `[0, 999999]`. fn create_secret_nft(s: u32, ) -> Weight { - Weight::from_ref_time(267_193_000 as u64) + Weight::from_parts(267_193_000 , 0) // Standard Error: 60 - .saturating_add(Weight::from_ref_time(17_859 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + .saturating_add(Weight::from_parts(17_859 , 0).saturating_mul(s .into())) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: NFT Nfts (r:1 w:1) // Storage: NFT SecretNftMintFee (r:1 w:0) // Storage: System Account (r:2 w:2) // Storage: NFT SecretNftsOffchainData (r:0 w:1) fn add_secret() -> Weight { - Weight::from_ref_time(209_585_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + Weight::from_parts(209_585_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) } // Storage: TEE EnclaveAccountOperator (r:1 w:0) // Storage: TEE EnclaveClusterId (r:1 w:0) // Storage: NFT Nfts (r:1 w:1) // Storage: NFT SecretNftsShardsCount (r:1 w:1) fn add_secret_shard() -> Weight { - Weight::from_ref_time(147_668_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + Weight::from_parts(147_668_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: NFT SecretNftMintFee (r:0 w:1) fn set_secret_nft_mint_fee() -> Weight { - Weight::from_ref_time(38_874_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(38_874_000 , 0) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: NFT Nfts (r:1 w:1) // Storage: NFT CapsuleMintFee (r:1 w:0) // Storage: System Account (r:2 w:2) // Storage: NFT CapsuleOffchainData (r:0 w:1) fn convert_to_capsule() -> Weight { - Weight::from_ref_time(185_901_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + Weight::from_parts(185_901_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) } // Storage: NFT NftMintFee (r:1 w:0) // Storage: NFT CapsuleMintFee (r:1 w:0) @@ -169,43 +169,43 @@ impl ternoa_nft::WeightInfo for WeightInfo { // Storage: NFT Nfts (r:0 w:1) /// The range of component `s` is `[0, 999999]`. fn create_capsule(s: u32, ) -> Weight { - Weight::from_ref_time(287_011_000 as u64) + Weight::from_parts(287_011_000 , 0) // Standard Error: 81 - .saturating_add(Weight::from_ref_time(18_083 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + .saturating_add(Weight::from_parts(18_083 , 0).saturating_mul(s .into())) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: NFT Nfts (r:1 w:1) // Storage: NFT CapsuleOffchainData (r:0 w:1) fn set_capsule_offchaindata() -> Weight { - Weight::from_ref_time(118_724_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + Weight::from_parts(118_724_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: NFT CapsuleMintFee (r:0 w:1) fn set_capsule_mint_fee() -> Weight { - Weight::from_ref_time(53_340_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(53_340_000 , 0) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE EnclaveAccountOperator (r:1 w:0) // Storage: TEE EnclaveClusterId (r:1 w:0) // Storage: NFT Nfts (r:1 w:1) // Storage: NFT CapsulesShardsCount (r:1 w:1) fn add_capsule_shard() -> Weight { - Weight::from_ref_time(159_811_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + Weight::from_parts(159_811_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: NFT Nfts (r:1 w:1) fn notify_enclave_key_update() -> Weight { - Weight::from_ref_time(140_375_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(140_375_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: NFT Collections (r:1 w:1) fn set_collection_offchaindata() -> Weight { - Weight::from_ref_time(114_467_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(114_467_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/alphanet/src/weights/ternoa_rent.rs b/runtime/alphanet/src/weights/ternoa_rent.rs index 62a754ba..ff61ee3b 100644 --- a/runtime/alphanet/src/weights/ternoa_rent.rs +++ b/runtime/alphanet/src/weights/ternoa_rent.rs @@ -37,11 +37,11 @@ impl ternoa_rent::WeightInfo for WeightInfo { // Storage: Rent Contracts (r:0 w:1) /// The range of component `s` is `[0, 1000000]`. fn create_contract(s: u32, ) -> Weight { - Weight::from_ref_time(96_762_000 as u64) + Weight::from_parts(96_762_000 , 0) // Standard Error: 97 - .saturating_add(Weight::from_ref_time(35_803 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + .saturating_add(Weight::from_parts(35_803 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(5)) } // Storage: Rent Contracts (r:1 w:1) // Storage: System Account (r:2 w:2) @@ -49,11 +49,11 @@ impl ternoa_rent::WeightInfo for WeightInfo { // Storage: NFT Nfts (r:1 w:1) /// The range of component `s` is `[0, 1000000]`. fn revoke_contract(s: u32, ) -> Weight { - Weight::from_ref_time(177_685_000 as u64) + Weight::from_parts(177_685_000 , 0) // Standard Error: 58 - .saturating_add(Weight::from_ref_time(29_833 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + .saturating_add(Weight::from_parts(29_833 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) } // Storage: Rent Contracts (r:1 w:1) // Storage: Rent Queues (r:1 w:1) @@ -62,11 +62,11 @@ impl ternoa_rent::WeightInfo for WeightInfo { // Storage: Rent Offers (r:0 w:1) /// The range of component `s` is `[0, 1000000]`. fn cancel_contract(s: u32, ) -> Weight { - Weight::from_ref_time(117_100_000 as u64) + Weight::from_parts(117_100_000 , 0) // Standard Error: 81 - .saturating_add(Weight::from_ref_time(33_946 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + .saturating_add(Weight::from_parts(33_946 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Rent Contracts (r:1 w:1) // Storage: System Account (r:3 w:3) @@ -74,22 +74,22 @@ impl ternoa_rent::WeightInfo for WeightInfo { // Storage: Rent Offers (r:0 w:1) /// The range of component `s` is `[0, 1000000]`. fn rent(s: u32, ) -> Weight { - Weight::from_ref_time(135_855_000 as u64) + Weight::from_parts(135_855_000 , 0) // Standard Error: 80 - .saturating_add(Weight::from_ref_time(34_145 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + .saturating_add(Weight::from_parts(34_145 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Rent Contracts (r:1 w:0) // Storage: System Account (r:1 w:0) // Storage: Rent Offers (r:1 w:1) /// The range of component `s` is `[0, 1000000]`. fn make_rent_offer(s: u32, ) -> Weight { - Weight::from_ref_time(76_494_000 as u64) + Weight::from_parts(76_494_000 , 0) // Standard Error: 3 - .saturating_add(Weight::from_ref_time(130 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + .saturating_add(Weight::from_parts(130 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Rent Contracts (r:1 w:1) // Storage: Rent Offers (r:1 w:1) @@ -97,38 +97,38 @@ impl ternoa_rent::WeightInfo for WeightInfo { // Storage: Rent Queues (r:1 w:1) /// The range of component `s` is `[0, 1000000]`. fn accept_rent_offer(s: u32, ) -> Weight { - Weight::from_ref_time(100_100_000 as u64) + Weight::from_parts(100_100_000 , 0) // Standard Error: 64 - .saturating_add(Weight::from_ref_time(33_343 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + .saturating_add(Weight::from_parts(33_343 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) } // Storage: Rent Offers (r:1 w:1) /// The range of component `s` is `[0, 10000]`. fn retract_rent_offer(s: u32, ) -> Weight { - Weight::from_ref_time(56_746_000 as u64) + Weight::from_parts(56_746_000 , 0) // Standard Error: 433 - .saturating_add(Weight::from_ref_time(72_355 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + .saturating_add(Weight::from_parts(72_355 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Rent Contracts (r:1 w:1) // Storage: Rent Offers (r:0 w:1) /// The range of component `s` is `[0, 1000000]`. fn change_subscription_terms(s: u32, ) -> Weight { - Weight::from_ref_time(56_276_000 as u64) + Weight::from_parts(56_276_000 , 0) // Standard Error: 2 - .saturating_add(Weight::from_ref_time(108 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(Weight::from_parts(108 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: Rent Contracts (r:1 w:1) /// The range of component `s` is `[0, 1000000]`. fn accept_subscription_terms(s: u32, ) -> Weight { - Weight::from_ref_time(46_427_000 as u64) + Weight::from_parts(46_427_000 , 0) // Standard Error: 2 - .saturating_add(Weight::from_ref_time(116 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + .saturating_add(Weight::from_parts(116 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/alphanet/src/weights/ternoa_staking_rewards.rs b/runtime/alphanet/src/weights/ternoa_staking_rewards.rs index 0bed5f53..d4bdcc5f 100644 --- a/runtime/alphanet/src/weights/ternoa_staking_rewards.rs +++ b/runtime/alphanet/src/weights/ternoa_staking_rewards.rs @@ -33,8 +33,8 @@ pub struct WeightInfo(PhantomData); impl ternoa_staking_rewards::WeightInfo for WeightInfo { // Storage: StakingRewards Data (r:1 w:1) fn set_session_extra_reward_payout() -> Weight { - Weight::from_ref_time(36_849_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(36_849_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/alphanet/src/weights/ternoa_tee.rs b/runtime/alphanet/src/weights/ternoa_tee.rs index a3f7a69f..59721f52 100644 --- a/runtime/alphanet/src/weights/ternoa_tee.rs +++ b/runtime/alphanet/src/weights/ternoa_tee.rs @@ -39,32 +39,32 @@ impl ternoa_tee::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: TEE StakingLedger (r:0 w:1) fn register_enclave() -> Weight { - Weight::from_ref_time(86_901_000 as u64) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + Weight::from_parts(86_901_000 , 0) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) } // Storage: TEE StakingAmount (r:1 w:0) // Storage: TEE EnclaveData (r:1 w:0) // Storage: TEE EnclaveUnregistrations (r:1 w:1) // Storage: TEE StakingLedger (r:1 w:1) fn unregister_enclave() -> Weight { - Weight::from_ref_time(57_690_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + Weight::from_parts(57_690_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: TEE EnclaveData (r:1 w:0) // Storage: TEE EnclaveUpdates (r:1 w:1) // Storage: TEE EnclaveAccountOperator (r:1 w:0) fn update_enclave() -> Weight { - Weight::from_ref_time(50_160_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(50_160_000 , 0) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE EnclaveUpdates (r:1 w:1) fn cancel_update() -> Weight { - Weight::from_ref_time(38_901_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(38_901_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE EnclaveRegistrations (r:1 w:1) // Storage: TEE ClusterData (r:1 w:1) @@ -74,23 +74,23 @@ impl ternoa_tee::WeightInfo for WeightInfo { // Storage: TEE OperatorAssignedEra (r:0 w:1) // Storage: TEE EnclaveClusterId (r:0 w:1) fn assign_enclave() -> Weight { - Weight::from_ref_time(67_690_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + Weight::from_parts(67_690_000 , 0) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: TEE EnclaveRegistrations (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn remove_registration() -> Weight { - Weight::from_ref_time(64_001_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + Weight::from_parts(64_001_000 , 0) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: TEE EnclaveUpdates (r:1 w:1) fn reject_update() -> Weight { - Weight::from_ref_time(37_450_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(37_450_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE EnclaveData (r:1 w:1) // Storage: TEE EnclaveAccountOperator (r:1 w:1) @@ -98,87 +98,87 @@ impl ternoa_tee::WeightInfo for WeightInfo { // Storage: TEE ClusterData (r:1 w:1) // Storage: TEE EnclaveUpdates (r:1 w:1) fn force_remove_enclave() -> Weight { - Weight::from_ref_time(183_441_000 as u64) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) + Weight::from_parts(183_441_000 , 0) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(8)) } // Storage: TEE EnclaveData (r:1 w:1) // Storage: TEE EnclaveAccountOperator (r:1 w:1) // Storage: TEE EnclaveUpdates (r:1 w:1) fn force_update_enclave() -> Weight { - Weight::from_ref_time(75_411_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + Weight::from_parts(75_411_000 , 0) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: TEE NextClusterId (r:1 w:1) // Storage: TEE ClusterData (r:0 w:1) fn create_cluster() -> Weight { - Weight::from_ref_time(41_310_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + Weight::from_parts(41_310_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: TEE ClusterData (r:1 w:1) fn update_cluster() -> Weight { - Weight::from_ref_time(30_350_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(30_350_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE ClusterData (r:1 w:1) fn remove_cluster() -> Weight { - Weight::from_ref_time(29_691_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(29_691_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE StakingLedger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: TEE StakingAmount (r:1 w:0) fn withdraw_unbonded() -> Weight { - Weight::from_ref_time(59_530_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + Weight::from_parts(59_530_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: TEE MetricsServers (r:1 w:1) fn register_metrics_server() -> Weight { - Weight::from_ref_time(30_801_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(30_801_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE MetricsServers (r:1 w:1) fn unregister_metrics_server() -> Weight { - Weight::from_ref_time(36_381_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(36_381_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE MetricsServers (r:1 w:1) fn force_update_metrics_server_type() -> Weight { - Weight::from_ref_time(36_470_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(36_470_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE MetricsServers (r:1 w:0) // Storage: TEE EnclaveData (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: TEE MetricsReports (r:1 w:1) fn submit_metrics_server_report() -> Weight { - Weight::from_ref_time(58_101_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(58_101_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE ReportParamsWeightages (r:0 w:1) fn set_report_params_weightage() -> Weight { - Weight::from_ref_time(32_190_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(32_190_000 , 0) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE StakingAmount (r:0 w:1) fn set_staking_amount() -> Weight { - Weight::from_ref_time(32_220_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(32_220_000 , 0) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE DailyRewardPool (r:0 w:1) fn set_daily_reward_pool() -> Weight { - Weight::from_ref_time(32_201_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(32_201_000 , 0) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE ClaimedRewards (r:1 w:1) // Storage: Staking ActiveEra (r:1 w:0) @@ -188,33 +188,33 @@ impl ternoa_tee::WeightInfo for WeightInfo { // Storage: TEE MetricsReports (r:1 w:0) // Storage: System Account (r:2 w:2) fn claim_rewards() -> Weight { - Weight::from_ref_time(154_782_000 as u64) - .saturating_add(T::DbWeight::get().reads(9 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + Weight::from_parts(154_782_000 , 0) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: TEE OperatorAssignedEra (r:1 w:1) fn update_operator_assigned_era() -> Weight { - Weight::from_ref_time(37_040_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(37_040_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE StakingAmount (r:1 w:0) // Storage: TEE StakingLedger (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn bond_extra() -> Weight { - Weight::from_ref_time(73_730_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + Weight::from_parts(73_730_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: TEE StakingAmount (r:1 w:0) // Storage: TEE StakingLedger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn refund_excess() -> Weight { - Weight::from_ref_time(68_810_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + Weight::from_parts(68_810_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) } } diff --git a/runtime/alphanet/src/weights/ternoa_transmission_protocols.rs b/runtime/alphanet/src/weights/ternoa_transmission_protocols.rs index 4b52204b..2255f14e 100644 --- a/runtime/alphanet/src/weights/ternoa_transmission_protocols.rs +++ b/runtime/alphanet/src/weights/ternoa_transmission_protocols.rs @@ -38,11 +38,11 @@ impl ternoa_transmission_protocols::WeightInfo for Weig // Storage: TransmissionProtocols Transmissions (r:0 w:1) /// The range of component `s` is `[0, 999999]`. fn set_transmission_protocol(s: u32, ) -> Weight { - Weight::from_ref_time(162_275_000 as u64) + Weight::from_parts(162_275_000 , 0) // Standard Error: 124 - .saturating_add(Weight::from_ref_time(40_798 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + .saturating_add(Weight::from_parts(40_798 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) } // Storage: NFT Nfts (r:1 w:1) // Storage: TransmissionProtocols Transmissions (r:1 w:1) @@ -50,22 +50,22 @@ impl ternoa_transmission_protocols::WeightInfo for Weig // Storage: TransmissionProtocols OnConsentData (r:0 w:1) /// The range of component `s` is `[0, 999999]`. fn remove_transmission_protocol(s: u32, ) -> Weight { - Weight::from_ref_time(92_565_000 as u64) + Weight::from_parts(92_565_000 , 0) // Standard Error: 310 - .saturating_add(Weight::from_ref_time(41_764 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + .saturating_add(Weight::from_parts(41_764 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) } // Storage: NFT Nfts (r:1 w:0) // Storage: TransmissionProtocols Transmissions (r:1 w:1) // Storage: TransmissionProtocols AtBlockQueue (r:1 w:1) /// The range of component `s` is `[0, 999999]`. fn reset_timer(s: u32, ) -> Weight { - Weight::from_ref_time(111_330_000 as u64) + Weight::from_parts(111_330_000 , 0) // Standard Error: 288 - .saturating_add(Weight::from_ref_time(43_663 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(Weight::from_parts(43_663 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: NFT Nfts (r:1 w:0) // Storage: TransmissionProtocols Transmissions (r:1 w:0) @@ -73,15 +73,15 @@ impl ternoa_transmission_protocols::WeightInfo for Weig // Storage: TransmissionProtocols OnConsentData (r:1 w:1) /// The range of component `s` is `[0, 999999]`. fn add_consent(s: u32, ) -> Weight { - Weight::from_ref_time(113_495_000 as u64) + Weight::from_parts(113_495_000 , 0) // Standard Error: 252 - .saturating_add(Weight::from_ref_time(65_782 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(Weight::from_parts(65_782 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: TransmissionProtocols AtBlockFee (r:0 w:1) fn set_protocol_fee() -> Weight { - Weight::from_ref_time(47_570_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(47_570_000 , 0) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 0ba04199..099704a1 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -17,7 +17,7 @@ #![cfg_attr(not(feature = "std"), no_std)] use frame_election_provider_support::Weight; -use frame_support::{parameter_types, weights::constants::WEIGHT_PER_SECOND}; +use frame_support::{parameter_types, weights::constants::WEIGHT_REF_TIME_PER_SECOND}; use frame_system::limits; use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment}; use sp_runtime::{FixedPointNumber, Perbill, Perquintill, traits::{Bounded}}; @@ -109,8 +109,7 @@ pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(1); /// by Operational extrinsics. pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for 2 seconds of compute with a 6 second average block time, with maximum proof size. -pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.saturating_mul(2).set_proof_size(u64::MAX); - +pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), u64::MAX); const_assert!(NORMAL_DISPATCH_RATIO.deconstruct() >= AVERAGE_ON_INITIALIZE_RATIO.deconstruct()); /// Implements the weight types for a runtime. @@ -199,7 +198,7 @@ macro_rules! impl_multiplier_tests { pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength::max(2 * 1024); pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); + frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_parts(1024)); } impl frame_system::Config for Runtime { diff --git a/runtime/common/src/phragmen_election.rs b/runtime/common/src/phragmen_election.rs index d7737fd1..dc92014b 100644 --- a/runtime/common/src/phragmen_election.rs +++ b/runtime/common/src/phragmen_election.rs @@ -36,6 +36,7 @@ parameter_types! { pub const PhragmenDesiredMembers: u32 = 7; pub const PhragmenDesiredRunnersUp: u32 = 7; pub const PhragmenElectionPalletId: LockIdentifier = *b"phrelect"; - pub const MaxVoters: u32 = 10 * 1000; - pub const MaxCandidates: u32 = 1000; + pub const MaxVotesPerVoter: u32 = 16; + pub const MaxVoters: u32 = 512; + pub const MaxCandidates: u32 = 64; } diff --git a/runtime/mainnet/Cargo.toml b/runtime/mainnet/Cargo.toml index 73459e17..17339697 100644 --- a/runtime/mainnet/Cargo.toml +++ b/runtime/mainnet/Cargo.toml @@ -25,6 +25,7 @@ pallet-offences = { workspace = true, default-features = false } pallet-preimage = { workspace = true, default-features = false } pallet-session = { workspace = true, features = ["historical"], default-features = false } pallet-staking = { workspace = true, default-features = false } +pallet-staking-runtime-api = { workspace = true, default-features = false } pallet-staking-reward-curve = { workspace = true, default-features = false } pallet-timestamp = { workspace = true, default-features = false } pallet-transaction-payment = { workspace = true, default-features = false } @@ -39,9 +40,13 @@ pallet-elections-phragmen = { workspace = true, default-features = false } pallet-multisig = { workspace = true, default-features = false } pallet-identity = { workspace = true, default-features = false } pallet-assets = { workspace = true, default-features = false } +pallet-contracts = { workspace = true, default-features = false } +pallet-contracts-primitives = { workspace = true, default-features = false } +pallet-insecure-randomness-collective-flip = { workspace = true, default-features = false } # Benchmarking frame-benchmarking = { workspace = true, default-features = false, optional = true } +frame-benchmarking-pallet-pov = { workspace = true, default-features = false } frame-system-benchmarking = { workspace = true, default-features = false, optional = true } pallet-session-benchmarking = { workspace = true, default-features = false, optional = true } pallet-offences-benchmarking = { workspace = true, default-features = false, optional = true } @@ -55,6 +60,7 @@ sp-api = { workspace = true, default-features = false } sp-authority-discovery = { workspace = true, default-features = false } sp-block-builder = { workspace = true, default-features = false } sp-consensus-babe = { workspace = true, default-features = false } +sp-consensus-grandpa = { workspace = true, default-features = false } sp-core = { workspace = true, default-features = false } sp-inherents = { workspace = true, default-features = false } sp-io = { workspace = true, default-features = false } @@ -115,7 +121,8 @@ std = [ "frame-support/std", "frame-system-rpc-runtime-api/std", "frame-system/std", - "frame-benchmarking?/std", + "frame-benchmarking/std", + "frame-benchmarking-pallet-pov/std", "pallet-authority-discovery/std", "pallet-authorship/std", "pallet-babe/std", @@ -130,6 +137,7 @@ std = [ "pallet-session/std", "pallet-session-benchmarking?/std", "pallet-staking/std", + "pallet-staking-runtime-api/std", "pallet-timestamp/std", "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-payment/std", @@ -152,6 +160,8 @@ std = [ "sp-tracing/std", "sp-transaction-pool/std", "sp-version/std", + "sp-consensus-grandpa/std", + "sp-io/std", "frame-try-runtime?/std", "pallet-collective/std", "pallet-membership/std", @@ -161,10 +171,15 @@ std = [ "pallet-multisig/std", "pallet-identity/std", "pallet-assets/std", + "pallet-contracts/std", + "pallet-contracts-primitives/std", + "pallet-insecure-randomness-collective-flip/std", + #"substrate-wasm-builder", ] runtime-benchmarks = [ - "frame-benchmarking", + "frame-benchmarking/runtime-benchmarks", + "frame-benchmarking-pallet-pov/runtime-benchmarks", "frame-election-provider-support/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", @@ -205,6 +220,7 @@ runtime-benchmarks = [ try-runtime = [ "frame-try-runtime", + "frame-benchmarking-pallet-pov/try-runtime", "frame-executive/try-runtime", "frame-support/try-runtime", "frame-system/try-runtime", @@ -233,6 +249,8 @@ try-runtime = [ "pallet-multisig/try-runtime", "pallet-identity/try-runtime", "pallet-assets/try-runtime", + "pallet-contracts/runtime-benchmarks", + "pallet-insecure-randomness-collective-flip/try-runtime", # Ternoa "ternoa-mandate/try-runtime", "ternoa-staking-rewards/try-runtime", diff --git a/runtime/mainnet/build.rs b/runtime/mainnet/build.rs index f751573a..902b4a23 100644 --- a/runtime/mainnet/build.rs +++ b/runtime/mainnet/build.rs @@ -17,9 +17,12 @@ use substrate_wasm_builder::WasmBuilder; fn main() { - WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() - .build() + #[cfg(feature = "std")] + { + substrate_wasm_builder::WasmBuilder::new() + .with_current_project() + .export_heap_base() + .import_memory() + .build(); + } } diff --git a/runtime/mainnet/constants/Cargo.toml b/runtime/mainnet/constants/Cargo.toml index 29f4cc39..89cb6a46 100644 --- a/runtime/mainnet/constants/Cargo.toml +++ b/runtime/mainnet/constants/Cargo.toml @@ -11,9 +11,15 @@ frame-support = { workspace = true, default-features = false } ternoa-core-primitives = { path = "../../../core-primitives", default-features = false } ternoa-runtime-common = { package = "ternoa-runtime-common", path = "../../common", default-features = false } sp-runtime = { workspace = true, default-features = false } +sp-weights = { workspace = true, default-features = false } +sp-core = { workspace = true, default-features = false } [features] default = ["std"] std = [ - "sp-runtime/std" + "frame-support/std", + "sp-core/std", + "sp-runtime/std", + "sp-weights/std" ] + diff --git a/runtime/mainnet/constants/src/weights/block_weights.rs b/runtime/mainnet/constants/src/weights/block_weights.rs index d56852ef..fb9177a9 100644 --- a/runtime/mainnet/constants/src/weights/block_weights.rs +++ b/runtime/mainnet/constants/src/weights/block_weights.rs @@ -36,29 +36,30 @@ use frame_support::{ parameter_types, - weights::{constants::WEIGHT_PER_NANOS, Weight}, + weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}, }; parameter_types! { /// Time to execute an empty block. - /// Calculated by multiplying the *Average* with `1` and adding `0`. + /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 6_070_338, 6_380_029 - /// Average: 6_124_337 - /// Median: 6_110_461 - /// Std-Dev: 52095.81 + /// Min, Max: 6_708_387, 7_042_534 + /// Average: 6_818_965 + /// Median: 6_826_464 + /// Std-Dev: 66350.7 /// /// Percentiles nanoseconds: - /// 99th: 6_274_637 - /// 95th: 6_222_840 - /// 75th: 6_141_364 - pub const BlockExecutionWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(6_124_337); + /// 99th: 6_991_352 + /// 95th: 6_933_543 + /// 75th: 6_854_332 + pub const BlockExecutionWeight: Weight = + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(6_818_965), 0); } #[cfg(test)] mod test_weights { - use frame_support::weights::constants; + use sp_weights::constants; /// Checks that the weight exists and is sane. // NOTE: If this test fails but you are sure that the generated values are fine, @@ -69,13 +70,14 @@ mod test_weights { // At least 100 µs. assert!( - w.ref_time() >= 100u64 * constants::WEIGHT_PER_MICROS.ref_time(), + w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS, "Weight should be at least 100 µs." ); // At most 50 ms. assert!( - w.ref_time() <= 50u64 * constants::WEIGHT_PER_MILLIS.ref_time(), + w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS, "Weight should be at most 50 ms." ); } } + diff --git a/runtime/mainnet/constants/src/weights/extrinsic_weights.rs b/runtime/mainnet/constants/src/weights/extrinsic_weights.rs index a49b494e..7ce2f02e 100644 --- a/runtime/mainnet/constants/src/weights/extrinsic_weights.rs +++ b/runtime/mainnet/constants/src/weights/extrinsic_weights.rs @@ -33,31 +33,30 @@ // --warmup=10 // --repeat=100 -use frame_support::{ - parameter_types, - weights::{constants::WEIGHT_PER_NANOS, Weight}, -}; +use sp_core::parameter_types; +use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; parameter_types! { /// Time to execute a NO-OP extrinsic, for example `System::remark`. - /// Calculated by multiplying the *Average* with `1` and adding `0`. + /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// - /// Stats [NS]: - /// Min, Max: 85_946, 88_408 - /// Average: 86_309 - /// Median: 86_213 - /// Std-Dev: 345.03 + /// Stats nanoseconds: + /// Min, Max: 105_285, 107_713 + /// Average: 106_013 + /// Median: 105_990 + /// Std-Dev: 441.55 /// - /// Percentiles [NS]: - /// 99th: 87_527 - /// 95th: 86_901 - /// 75th: 86_308 - pub const ExtrinsicBaseWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(86_298); + /// Percentiles nanoseconds: + /// 99th: 107_324 + /// 95th: 106_820 + /// 75th: 106_178 + pub const ExtrinsicBaseWeight: Weight = + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(106_013), 0); } #[cfg(test)] mod test_weights { - use frame_support::weights::constants; + use sp_weights::constants; /// Checks that the weight exists and is sane. // NOTE: If this test fails but you are sure that the generated values are fine, @@ -68,12 +67,12 @@ mod test_weights { // At least 10 µs. assert!( - w.ref_time() >= 10u64 * constants::WEIGHT_PER_MICROS.ref_time(), + w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS, "Weight should be at least 10 µs." ); // At most 1 ms. assert!( - w.ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Weight should be at most 1 ms." ); } diff --git a/runtime/mainnet/constants/src/weights/paritydb_weights.rs b/runtime/mainnet/constants/src/weights/paritydb_weights.rs index dabd0f4b..1721f4e9 100644 --- a/runtime/mainnet/constants/src/weights/paritydb_weights.rs +++ b/runtime/mainnet/constants/src/weights/paritydb_weights.rs @@ -24,8 +24,8 @@ pub mod constants { /// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights /// are available for brave runtime engineers who may want to try this out as default. pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 8_000 * constants::WEIGHT_PER_NANOS.ref_time(), - write: 50_000 * constants::WEIGHT_PER_NANOS.ref_time(), + read: 8_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + write: 50_000 * constants::WEIGHT_REF_TIME_PER_NANOS, }; } @@ -41,22 +41,22 @@ pub mod constants { fn sane() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + 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_PER_MICROS.ref_time(), + 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_PER_MILLIS.ref_time(), + 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_PER_MILLIS.ref_time(), + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Write weight should be at most 1 ms." ); } } -} +} \ No newline at end of file diff --git a/runtime/mainnet/constants/src/weights/rocksdb_weights.rs b/runtime/mainnet/constants/src/weights/rocksdb_weights.rs index 91a4ca8a..1896907e 100644 --- a/runtime/mainnet/constants/src/weights/rocksdb_weights.rs +++ b/runtime/mainnet/constants/src/weights/rocksdb_weights.rs @@ -24,8 +24,8 @@ pub mod constants { /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout /// the runtime. pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 25_000 * constants::WEIGHT_PER_NANOS.ref_time(), - write: 100_000 * constants::WEIGHT_PER_NANOS.ref_time(), + read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS, }; } @@ -41,20 +41,20 @@ pub mod constants { fn sane() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + 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_PER_MICROS.ref_time(), + 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_PER_MILLIS.ref_time(), + 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_PER_MILLIS.ref_time(), + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Write weight should be at most 1 ms." ); } diff --git a/runtime/mainnet/src/lib.rs b/runtime/mainnet/src/lib.rs index 3e7bf448..d7e9f8bc 100644 --- a/runtime/mainnet/src/lib.rs +++ b/runtime/mainnet/src/lib.rs @@ -51,7 +51,7 @@ use sp_runtime::{ }; use sp_std::prelude::*; use sp_version::RuntimeVersion; -use ternoa_core_primitives::{AccountId, Balance, BlockNumber, Index, Signature}; +use ternoa_core_primitives::{AccountId, Balance, BlockNumber, Index, Signature, Hash}; use ternoa_runtime_common::{impl_runtime_weights, BlockLength}; pub use version::VERSION; @@ -65,6 +65,11 @@ pub use pallets::StakerStatus; #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); +/// Max size for serialized extrinsic params for this testing runtime. +/// This is a quite arbitrary but empirically battle tested value. +#[cfg(test)] +pub const CALL_PARAMS_MAX_SIZE: usize = 208; + /// Wasm binary unwrapped. If built with `SKIP_WASM_BUILD`, the function panics. #[cfg(feature = "std")] pub fn wasm_binary_unwrap() -> &'static [u8] { @@ -149,6 +154,8 @@ construct_runtime!( Rent: ternoa_rent = 33, TEE: ternoa_tee = 34, TransmissionProtocols: ternoa_transmission_protocols = 35, + RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip = 36, + Contracts: pallet_contracts = 37, } ); @@ -185,9 +192,7 @@ pub type SignedPayload = generic::SignedPayload; pub type CheckedExtrinsic = generic::CheckedExtrinsic; pub type Migrations = ( - pallet_election_provider_multi_phase::migrations::v1::MigrateToV1, - // pallet_balances::migration::MigrateToTrackInactive, - pallet_assets::migration::v1::MigrateToV1, + ); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< @@ -254,21 +259,21 @@ impl_runtime_apis! { } } - impl fg_primitives::GrandpaApi for Runtime { - fn grandpa_authorities() -> GrandpaAuthorityList { + impl sp_consensus_grandpa::GrandpaApi for Runtime { + fn grandpa_authorities() -> sp_consensus_grandpa::AuthorityList { Grandpa::grandpa_authorities() } - fn current_set_id() -> fg_primitives::SetId { + fn current_set_id() -> sp_consensus_grandpa::SetId { Grandpa::current_set_id() } fn submit_report_equivocation_unsigned_extrinsic( - equivocation_proof: fg_primitives::EquivocationProof< + equivocation_proof: sp_consensus_grandpa::EquivocationProof< ::Hash, NumberFor, >, - key_owner_proof: fg_primitives::OpaqueKeyOwnershipProof, + key_owner_proof: sp_consensus_grandpa::OpaqueKeyOwnershipProof, ) -> Option<()> { let key_owner_proof = key_owner_proof.decode()?; @@ -279,17 +284,18 @@ impl_runtime_apis! { } fn generate_key_ownership_proof( - _set_id: fg_primitives::SetId, + _set_id: sp_consensus_grandpa::SetId, authority_id: GrandpaId, - ) -> Option { + ) -> Option { use parity_scale_codec::Encode; - Historical::prove((fg_primitives::KEY_TYPE, authority_id)) + Historical::prove((sp_consensus_grandpa::KEY_TYPE, authority_id)) .map(|p| p.encode()) - .map(fg_primitives::OpaqueKeyOwnershipProof::new) + .map(sp_consensus_grandpa::OpaqueKeyOwnershipProof::new) } } + impl sp_consensus_babe::BabeApi for Runtime { fn configuration() -> sp_consensus_babe::BabeConfiguration { let epoch_config = Babe::epoch_config().unwrap_or(BABE_GENESIS_EPOCH_CONFIG); @@ -351,6 +357,78 @@ impl_runtime_apis! { } } + impl pallet_contracts::ContractsApi for Runtime + { + fn call( + origin: AccountId, + dest: AccountId, + value: Balance, + gas_limit: Option, + storage_deposit_limit: Option, + input_data: Vec, + ) -> pallet_contracts_primitives::ContractExecResult { + let gas_limit = gas_limit.unwrap_or(BlockWeights::get().max_block); + Contracts::bare_call( + origin, + dest, + value, + gas_limit, + storage_deposit_limit, + input_data, + true, + pallet_contracts::Determinism::Deterministic, + ) + } + + fn instantiate( + origin: AccountId, + value: Balance, + gas_limit: Option, + storage_deposit_limit: Option, + code: pallet_contracts_primitives::Code, + data: Vec, + salt: Vec, + ) -> pallet_contracts_primitives::ContractInstantiateResult + { + let gas_limit = gas_limit.unwrap_or(BlockWeights::get().max_block); + Contracts::bare_instantiate( + origin, + value, + gas_limit, + storage_deposit_limit, + code, + data, + salt, + true + ) + } + + fn upload_code( + origin: AccountId, + code: Vec, + storage_deposit_limit: Option, + determinism: pallet_contracts::Determinism, + ) -> pallet_contracts_primitives::CodeUploadResult + { + Contracts::bare_upload_code( + origin, + code, + storage_deposit_limit, + determinism, + ) + } + + fn get_storage( + address: AccountId, + key: Vec, + ) -> pallet_contracts_primitives::GetStorageResult { + Contracts::get_storage( + address, + key + ) + } + } + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi< Block, Balance, @@ -362,6 +440,12 @@ impl_runtime_apis! { fn query_fee_details(uxt: ::Extrinsic, len: u32) -> FeeDetails { TransactionPayment::query_fee_details(uxt, len) } + fn query_weight_to_fee(weight: Weight) -> Balance { + TransactionPayment::weight_to_fee(weight) + } + fn query_length_to_fee(length: u32) -> Balance { + TransactionPayment::length_to_fee(length) + } } impl sp_session::SessionKeys for Runtime { @@ -375,29 +459,25 @@ impl_runtime_apis! { SessionKeys::decode_into_raw_public_keys(&encoded) } } - - #[cfg(feature = "try-runtime")] + #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { - fn on_runtime_upgrade() -> (Weight, Weight) { - log::info!("try-runtime::on_runtime_upgrade."); + fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to // have a backtrace here. If any of the pre/post migration checks fail, we shall stop // right here and right now. - let weight = Executive::try_runtime_upgrade().map_err(|err|{ - log::info!("try-runtime::on_runtime_upgrade failed with: {:?}", err); - err - }).unwrap(); - (weight, BlockWeights::get().max_block) + let weight = Executive::try_runtime_upgrade(checks).unwrap(); + (weight, RuntimeBlockWeights::get().max_block) } fn execute_block( block: Block, state_root_check: bool, + signature_check: bool, select: frame_try_runtime::TryStateSelect ) -> Weight { // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to // have a backtrace here. - Executive::try_execute_block(block, state_root_check, select).expect("execute-block failed") + Executive::try_execute_block(block, state_root_check, signature_check, select).unwrap() } } @@ -461,7 +541,7 @@ extern crate frame_benchmarking; #[cfg(feature = "runtime-benchmarks")] mod benches { - define_benchmarks!( + frame_benchmarking::define_benchmarks!( // Ternoa [ternoa_staking_rewards, StakingRewards] [ternoa_bridge, Bridge] @@ -477,6 +557,7 @@ mod benches { [pallet_balances, Balances] [frame_benchmarking::baseline, Baseline::] [pallet_collective, TechnicalCommittee] + [pallet_contracts, Contracts] [pallet_election_provider_multi_phase, ElectionProviderMultiPhase] [pallet_grandpa, Grandpa] [pallet_im_online, ImOnline] @@ -566,10 +647,10 @@ mod tests { fn call_size() { let size = core::mem::size_of::(); assert!( - size <= 208, - "size of RuntimeCall {} is more than 208 bytes: some calls have too big arguments, use Box to reduce the - size of RuntimeCall. - If the limit is too strong, maybe consider increase the limit to 300.", + size <= CALL_PARAMS_MAX_SIZE, + "size of RuntimeCall {} is more than {CALL_PARAMS_MAX_SIZE} bytes. + Some calls have too big arguments, use Box to reduce the size of RuntimeCall. + If the limit is too strong, maybe consider increase the limit.", size, ); } diff --git a/runtime/mainnet/src/pallets.rs b/runtime/mainnet/src/pallets.rs index 5e65cd09..35cc2085 100644 --- a/runtime/mainnet/src/pallets.rs +++ b/runtime/mainnet/src/pallets.rs @@ -24,7 +24,8 @@ use common::{ use frame_election_provider_support::{SequentialPhragmen, Weight}; use frame_support::{ parameter_types, - traits::{ConstU32, EitherOfDiverse, KeyOwnerProofSystem, U128CurrencyToVote, AsEnsureOriginWithArg}, + dispatch::DispatchClass, + traits::{ConstU32, EitherOfDiverse, KeyOwnerProofSystem, U128CurrencyToVote, AsEnsureOriginWithArg, Nothing, ConstBool}, weights::{constants::RocksDbWeight, ConstantMultiplier, IdentityFee}, PalletId, }; @@ -45,7 +46,7 @@ use sp_version::RuntimeVersion; use static_assertions::const_assert; use ternoa_core_primitives::{AccountId, Balance, BlockNumber, Hash, Index, Moment}; use ternoa_runtime_common as common; -pub use ternoa_runtime_common::constants::currency::UNITS; +pub use ternoa_runtime_common::constants::currency::{ UNITS, deposit }; use crate::{ constants::time::EPOCH_DURATION_IN_SLOTS, AuthorityDiscovery, Babe, BagsList, Balances, @@ -53,7 +54,7 @@ use crate::{ OffchainSolutionLengthLimit, OffchainSolutionWeightLimit, Offences, OriginCaller, PalletInfo, Preimage, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, Scheduler, Session, Signature, SignedPayload, Staking, StakingRewards, System, TechnicalCommittee, Timestamp, - TransactionPayment, Treasury, UncheckedExtrinsic, NFT, TEE, VERSION, + TransactionPayment, Treasury, UncheckedExtrinsic, NFT, TEE, VERSION, RandomnessCollectiveFlip, }; pub use common::babe::BABE_GENESIS_EPOCH_CONFIG; @@ -165,36 +166,24 @@ impl pallet_babe::Config for Runtime { // session module is the trigger type EpochChangeTrigger = common::babe::EpochChangeTrigger; type DisabledValidators = Session; - type KeyOwnerProofSystem = Historical; - type KeyOwnerProof = >::Proof; - type KeyOwnerIdentification = >::IdentificationTuple; - type HandleEquivocation = - pallet_babe::EquivocationHandler; + type KeyOwnerProof = + >::Proof; + type EquivocationReportSystem = + pallet_babe::EquivocationReportSystem; type WeightInfo = (); type MaxAuthorities = common::shared::MaxAuthorities; } +parameter_types! { + pub const MaxSetIdSessionEntries: u32 = BondingDuration::get() * SessionsPerEra::get(); +} // Grandpa impl pallet_grandpa::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type KeyOwnerProofSystem = Historical; - type KeyOwnerProof = - >::Proof; - type KeyOwnerIdentification = >::IdentificationTuple; - type HandleEquivocation = pallet_grandpa::EquivocationHandler< - Self::KeyOwnerIdentification, - Offences, - ReportLongevity, - >; + type MaxSetIdSessionEntries = MaxSetIdSessionEntries; + type KeyOwnerProof = >::Proof; + type EquivocationReportSystem = + pallet_grandpa::EquivocationReportSystem; type WeightInfo = (); type MaxAuthorities = common::shared::MaxAuthorities; } @@ -227,8 +216,6 @@ impl pallet_session::historical::Config for Runtime { impl pallet_authorship::Config for Runtime { type FindAuthor = pallet_session::FindAccountFromAuthorIndex; - type UncleGenerations = common::authorship::UncleGenerations; - type FilterUncle = (); type EventHandler = (Staking, ImOnline); } @@ -340,7 +327,7 @@ impl pallet_staking::Config for Runtime { type BondingDuration = common::staking::BondingDuration; type SlashDeferDuration = common::staking::SlashDeferDuration; /// A super-majority of the council can cancel the slash. - type SlashCancelOrigin = RootOrAtLeastHalfOfCommittee; + type AdminOrigin = RootOrAtLeastHalfOfCommittee; type SessionInterface = Self; type EraPayout = StakingRewards; type NextNewSession = Session; @@ -367,6 +354,7 @@ impl pallet_election_provider_multi_phase::MinerConfig for Runtime { as frame_election_provider_support::ElectionDataProvider >::MaxVotesPerVoter; + type MaxWinners = common::election_provider_multi_phase::MaxActiveValidators; // The unsigned submissions have to respect the weight of the submit_unsigned call, thus their // weight estimate function is wired to this call's weight. @@ -459,6 +447,7 @@ impl pallet_collective::Config for Runtime { type MaxMembers = common::technical_collective::TechnicalMaxMembers; type DefaultVote = pallet_collective::PrimeDefaultVote; type WeightInfo = weights::pallet_collective::WeightInfo; + type SetMembersOrigin = EnsureRoot; } // Pallet Membership @@ -542,6 +531,7 @@ impl pallet_collective::Config for Runtime { type MaxMembers = common::council::CouncilMaxMembers; type DefaultVote = pallet_collective::PrimeDefaultVote; type WeightInfo = weights::pallet_collective::WeightInfo; + type SetMembersOrigin = EnsureRoot; } // Make sure that there are no more than MaxMembers members elected via phragmen. const_assert!( @@ -568,6 +558,7 @@ impl pallet_elections_phragmen::Config for Runtime { type WeightInfo = weights::pallet_elections_phragmen::WeightInfo; type MaxCandidates = common::phragmen_election::MaxCandidates; type MaxVoters = common::phragmen_election::MaxVoters; + type MaxVotesPerVoter = common::phragmen_election::MaxVotesPerVoter; } // Democracy @@ -589,6 +580,7 @@ impl pallet_democracy::Config for Runtime { /// (NTB) vote. type ExternalDefaultOrigin = pallet_collective::EnsureProportionAtLeast; + type SubmitOrigin = EnsureSigned; /// Two thirds of the technical committee can have an `ExternalMajority/ExternalDefault` vote /// be tabled immediately and with a shorter voting/enactment period. type FastTrackOrigin = @@ -709,6 +701,7 @@ impl pallet_assets::Config for Runtime { type StringLimit = common::assets::StringLimit; type Freezer = (); type Extra = (); + type CallbackHandle = (); type WeightInfo = weights::pallet_assets::WeightInfo; type RemoveItemsLimit = ConstU32<1000>; #[cfg(feature = "runtime-benchmarks")] @@ -818,3 +811,47 @@ impl ternoa_transmission_protocols::Config for Runtime { type SimultaneousTransmissionLimit = SimultaneousTransmissionLimit; type ActionsInBlockLimit = ActionsInBlockLimit; } + +impl pallet_insecure_randomness_collective_flip::Config for Runtime {} + +parameter_types! { + pub const DepositPerItem: Balance = deposit(1, 0); + pub const DepositPerByte: Balance = deposit(0, 1); + pub const DeletionQueueDepth: u32 = 128; + // The lazy deletion runs inside on_initialize. + pub DeletionWeightLimit: Weight = BlockWeights::get() + .per_class + .get(DispatchClass::Normal) + .max_total + .unwrap_or(BlockWeights::get().max_block); + pub Schedule: pallet_contracts::Schedule = Default::default(); +} + +impl pallet_contracts::Config for Runtime { + type Time = Timestamp; + type Randomness = RandomnessCollectiveFlip; + type Currency = Balances; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + /// The safest default is to allow no calls at all. + /// + /// Runtimes should whitelist dispatchables that are allowed to be called from contracts + /// and make sure they are stable. Dispatchables exposed to contracts are not allowed to + /// change because that would break already deployed contracts. The `Call` structure itself + /// is not allowed to change the indices of existing pallets, too. + type CallFilter = Nothing; + type DepositPerItem = DepositPerItem; + type DepositPerByte = DepositPerByte; + type CallStack = [pallet_contracts::Frame; 5]; + type WeightPrice = pallet_transaction_payment::Pallet; + type WeightInfo = pallet_contracts::weights::SubstrateWeight; + type ChainExtension = (); + type DeletionQueueDepth = DeletionQueueDepth; + type DeletionWeightLimit = DeletionWeightLimit; + type Schedule = Schedule; + type AddressGenerator = pallet_contracts::DefaultAddressGenerator; + type MaxCodeLen = ConstU32<{ 123 * 1024 }>; + type MaxStorageKeyLen = ConstU32<128>; + type UnsafeUnstableInterface = ConstBool; + type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>; +} \ No newline at end of file diff --git a/runtime/mainnet/src/version.rs b/runtime/mainnet/src/version.rs index d5ec6d5c..975acd6b 100644 --- a/runtime/mainnet/src/version.rs +++ b/runtime/mainnet/src/version.rs @@ -44,7 +44,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { /// Version of the runtime specification. A full-node will not attempt to use its native /// runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`, /// `spec_version` and `authoring_version` are the same between Wasm and native. - spec_version: 24, + spec_version: 25, /// Version of the implementation of the specification. Nodes are free to ignore this; it /// serves only as an indication that the code is different; as long as the other two versions diff --git a/runtime/mainnet/src/weights/frame_benchmarking_baseline.rs b/runtime/mainnet/src/weights/frame_benchmarking_baseline.rs index d8d5bf98..77c7d0a7 100644 --- a/runtime/mainnet/src/weights/frame_benchmarking_baseline.rs +++ b/runtime/mainnet/src/weights/frame_benchmarking_baseline.rs @@ -33,46 +33,57 @@ pub struct WeightInfo(PhantomData); impl frame_benchmarking::baseline::WeightInfo for WeightInfo { /// The range of component `i` is `[0, 1000000]`. fn addition(_i: u32, ) -> Weight { - Weight::from_ref_time(280_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 181_000 picoseconds. + Weight::from_parts(213_057, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. fn subtraction(_i: u32, ) -> Weight { - Weight::from_ref_time(270_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 187_000 picoseconds. + Weight::from_parts(218_567, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. fn multiplication(_i: u32, ) -> Weight { - Weight::from_ref_time(291_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 186_000 picoseconds. + Weight::from_parts(217_697, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. fn division(_i: u32, ) -> Weight { - Weight::from_ref_time(270_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 175_000 picoseconds. + Weight::from_parts(215_174, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// The range of component `i` is `[0, 100]`. - fn hashing(i: u32, ) -> Weight { - Weight::from_ref_time(47_567_406_000 as u64) - // Standard Error: 4_739_921 - .saturating_add(Weight::from_ref_time(186_268_319 as u64).saturating_mul(i as u64)) + fn hashing() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 19_355_019_000 picoseconds. + Weight::from_parts(19_438_410_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// The range of component `i` is `[1, 100]`. + /// The range of component `i` is `[0, 100]`. fn sr25519_verification(i: u32, ) -> Weight { - Weight::from_ref_time(179_710_000 as u64) - // Standard Error: 593_822 - .saturating_add(Weight::from_ref_time(164_577_638 as u64).saturating_mul(i as u64)) - } - // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `i` is `[0, 1000]`. - fn storage_read(i: u32, ) -> Weight { - Weight::from_ref_time(692_000 as u64) - // Standard Error: 39_572 - .saturating_add(Weight::from_ref_time(9_200_767 as u64).saturating_mul(i as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(i as u64))) - } - // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `i` is `[0, 1000]`. - fn storage_write(i: u32, ) -> Weight { - Weight::from_ref_time(741_000 as u64) - // Standard Error: 7_313 - .saturating_add(Weight::from_ref_time(1_298_065 as u64).saturating_mul(i as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 215_000 picoseconds. + Weight::from_parts(225_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 21_389 + .saturating_add(Weight::from_parts(47_593_832, 0).saturating_mul(i.into())) } -} +} \ No newline at end of file diff --git a/runtime/mainnet/src/weights/frame_system.rs b/runtime/mainnet/src/weights/frame_system.rs index 6f9b41a6..77036eff 100644 --- a/runtime/mainnet/src/weights/frame_system.rs +++ b/runtime/mainnet/src/weights/frame_system.rs @@ -33,48 +33,83 @@ pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { /// The range of component `b` is `[0, 3932160]`. fn remark(b: u32, ) -> Weight { - Weight::from_ref_time(13_095_000 as u64) - // Standard Error: 3 - .saturating_add(Weight::from_ref_time(1_169 as u64).saturating_mul(b as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_184_000 picoseconds. + Weight::from_parts(2_232_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 0 + .saturating_add(Weight::from_parts(374, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { - Weight::from_ref_time(30_297_000 as u64) - // Standard Error: 17 - .saturating_add(Weight::from_ref_time(3_801 as u64).saturating_mul(b as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_626_000 picoseconds. + Weight::from_parts(7_777_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 0 + .saturating_add(Weight::from_parts(1_410, 0).saturating_mul(b.into())) } - // Storage: System Digest (r:1 w:1) - // Storage: unknown [0x3a686561707061676573] (r:0 w:1) + /// Storage: System Digest (r:1 w:1) + /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: unknown `0x3a686561707061676573` (r:0 w:1) + /// Proof Skipped: unknown `0x3a686561707061676573` (r:0 w:1) fn set_heap_pages() -> Weight { - Weight::from_ref_time(25_318_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 4_094_000 picoseconds. + Weight::from_parts(4_332_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `i` is `[1, 1000]`. + /// Storage: Skipped Metadata (r:0 w:0) + /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// The range of component `i` is `[0, 1000]`. fn set_storage(i: u32, ) -> Weight { - Weight::from_ref_time(11_472_000 as u64) - // Standard Error: 11_093 - .saturating_add(Weight::from_ref_time(1_934_247 as u64).saturating_mul(i as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_142_000 picoseconds. + Weight::from_parts(2_256_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 1_736 + .saturating_add(Weight::from_parts(658_559, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } - // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `i` is `[1, 1000]`. + /// Storage: Skipped Metadata (r:0 w:0) + /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// The range of component `i` is `[0, 1000]`. fn kill_storage(i: u32, ) -> Weight { - Weight::from_ref_time(11_882_000 as u64) - // Standard Error: 15_760 - .saturating_add(Weight::from_ref_time(1_931_656 as u64).saturating_mul(i as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_179_000 picoseconds. + Weight::from_parts(2_226_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 817 + .saturating_add(Weight::from_parts(485_258, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } - // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `p` is `[1, 1000]`. + /// Storage: Skipped Metadata (r:0 w:0) + /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// The range of component `p` is `[0, 1000]`. fn kill_prefix(p: u32, ) -> Weight { - Weight::from_ref_time(31_419_000 as u64) - // Standard Error: 30_041 - .saturating_add(Weight::from_ref_time(4_162_627 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) + // Proof Size summary in bytes: + // Measured: `120 + p * (69 ±0)` + // Estimated: `121 + p * (70 ±0)` + // Minimum execution time: 4_109_000 picoseconds. + Weight::from_parts(4_255_000, 0) + .saturating_add(Weight::from_parts(0, 121)) + // Standard Error: 1_259 + .saturating_add(Weight::from_parts(1_043_188, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } } + diff --git a/runtime/mainnet/src/weights/pallet_assets.rs b/runtime/mainnet/src/weights/pallet_assets.rs index c8ed7800..b63b82bf 100644 --- a/runtime/mainnet/src/weights/pallet_assets.rs +++ b/runtime/mainnet/src/weights/pallet_assets.rs @@ -31,233 +31,372 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_assets`. pub struct WeightInfo(PhantomData); impl pallet_assets::WeightInfo for WeightInfo { - // Storage: Assets Asset (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn create() -> Weight { - // Minimum execution time: 33_241 nanoseconds. - Weight::from_ref_time(33_873_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `325` + // Estimated: `7268` + // Minimum execution time: 28_265_000 picoseconds. + Weight::from_parts(28_764_000, 7268) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } - // Storage: Assets Asset (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) fn force_create() -> Weight { - // Minimum execution time: 19_883 nanoseconds. - Weight::from_ref_time(20_651_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `153` + // Estimated: `3675` + // Minimum execution time: 15_125_000 picoseconds. + Weight::from_parts(15_468_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - - // Storage: Assets Asset (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) fn start_destroy() -> Weight { - Weight::from_ref_time(31_000_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `417` + // Estimated: `3675` + // Minimum execution time: 15_368_000 picoseconds. + Weight::from_parts(15_625_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:0) - // Storage: System Account (r:20 w:20) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:1001 w:1000) + /// Proof: Assets Account (max_values: None, max_size: Some(102), added: 2577, mode: MaxEncodedLen) + /// Storage: System Account (r:1000 w:1000) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// The range of component `c` is `[0, 1000]`. fn destroy_accounts(c: u32, ) -> Weight { - Weight::from_ref_time(37_000_000 as u64) - // Standard Error: 19_301 - .saturating_add(Weight::from_ref_time(25_467_908 as u64).saturating_mul(c as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(c as u64))) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(c as u64))) + // Proof Size summary in bytes: + // Measured: `25 + c * (240 ±0)` + // Estimated: `8232 + c * (5180 ±0)` + // Minimum execution time: 20_816_000 picoseconds. + Weight::from_parts(21_045_000, 8232) + // Standard Error: 7_118 + .saturating_add(Weight::from_parts(12_723_454, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(c.into()))) + .saturating_add(Weight::from_parts(0, 5180).saturating_mul(c.into())) } - - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:0) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Approvals (r:1001 w:1000) + /// Proof: Assets Approvals (max_values: None, max_size: Some(148), added: 2623, mode: MaxEncodedLen) /// The range of component `a` is `[0, 1000]`. fn destroy_approvals(a: u32, ) -> Weight { - Weight::from_ref_time(39_000_000 as u64) - // Standard Error: 14_298 - .saturating_add(Weight::from_ref_time(27_632_144 as u64).saturating_mul(a as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(a as u64))) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(a as u64))) + // Proof Size summary in bytes: + // Measured: `554 + a * (86 ±0)` + // Estimated: `7288 + a * (2623 ±0)` + // Minimum execution time: 20_923_000 picoseconds. + Weight::from_parts(21_229_000, 7288) + // Standard Error: 7_215 + .saturating_add(Weight::from_parts(12_915_292, 0).saturating_mul(a.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into()))) + .saturating_add(Weight::from_parts(0, 2623).saturating_mul(a.into())) } - - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Metadata (r:1 w:0) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Metadata (r:1 w:0) + /// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen) fn finish_destroy() -> Weight { - Weight::from_ref_time(33_000_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `383` + // Estimated: `7280` + // Minimum execution time: 15_764_000 picoseconds. + Weight::from_parts(16_245_000, 7280) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:1 w:1) + /// Proof: Assets Account (max_values: None, max_size: Some(102), added: 2577, mode: MaxEncodedLen) fn mint() -> Weight { - // Minimum execution time: 36_782 nanoseconds. - Weight::from_ref_time(37_340_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `383` + // Estimated: `7242` + // Minimum execution time: 28_814_000 picoseconds. + Weight::from_parts(29_407_000, 7242) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:1 w:1) + /// Proof: Assets Account (max_values: None, max_size: Some(102), added: 2577, mode: MaxEncodedLen) fn burn() -> Weight { - // Minimum execution time: 44_425 nanoseconds. - Weight::from_ref_time(45_485_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `491` + // Estimated: `7242` + // Minimum execution time: 34_784_000 picoseconds. + Weight::from_parts(35_402_000, 7242) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:2 w:2) + /// Proof: Assets Account (max_values: None, max_size: Some(102), added: 2577, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn transfer() -> Weight { - // Minimum execution time: 58_294 nanoseconds. - Weight::from_ref_time(59_447_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Proof Size summary in bytes: + // Measured: `530` + // Estimated: `13412` + // Minimum execution time: 49_110_000 picoseconds. + Weight::from_parts(50_483_000, 13412) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:2 w:2) + /// Proof: Assets Account (max_values: None, max_size: Some(102), added: 2577, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn transfer_keep_alive() -> Weight { - // Minimum execution time: 46_704 nanoseconds. - Weight::from_ref_time(47_521_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Proof Size summary in bytes: + // Measured: `530` + // Estimated: `13412` + // Minimum execution time: 43_585_000 picoseconds. + Weight::from_parts(44_207_000, 13412) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:2 w:2) + /// Proof: Assets Account (max_values: None, max_size: Some(102), added: 2577, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn force_transfer() -> Weight { - // Minimum execution time: 57_647 nanoseconds. - Weight::from_ref_time(58_417_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Proof Size summary in bytes: + // Measured: `530` + // Estimated: `13412` + // Minimum execution time: 49_238_000 picoseconds. + Weight::from_parts(77_664_000, 13412) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Account (r:1 w:1) + /// Storage: Assets Asset (r:1 w:0) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:1 w:1) + /// Proof: Assets Account (max_values: None, max_size: Some(102), added: 2577, mode: MaxEncodedLen) fn freeze() -> Weight { - // Minimum execution time: 26_827 nanoseconds. - Weight::from_ref_time(27_373_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `491` + // Estimated: `7242` + // Minimum execution time: 19_198_000 picoseconds. + Weight::from_parts(19_585_000, 7242) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Account (r:1 w:1) + /// Storage: Assets Asset (r:1 w:0) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:1 w:1) + /// Proof: Assets Account (max_values: None, max_size: Some(102), added: 2577, mode: MaxEncodedLen) fn thaw() -> Weight { - // Minimum execution time: 26_291 nanoseconds. - Weight::from_ref_time(26_854_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `491` + // Estimated: `7242` + // Minimum execution time: 19_659_000 picoseconds. + Weight::from_parts(20_079_000, 7242) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - // Storage: Assets Asset (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) fn freeze_asset() -> Weight { - // Minimum execution time: 22_694 nanoseconds. - Weight::from_ref_time(23_613_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `417` + // Estimated: `3675` + // Minimum execution time: 15_035_000 picoseconds. + Weight::from_parts(15_594_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - // Storage: Assets Asset (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) fn thaw_asset() -> Weight { - // Minimum execution time: 22_572 nanoseconds. - Weight::from_ref_time(24_121_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `417` + // Estimated: `3675` + // Minimum execution time: 15_073_000 picoseconds. + Weight::from_parts(15_862_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Metadata (r:1 w:0) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Metadata (r:1 w:0) + /// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen) fn transfer_ownership() -> Weight { - // Minimum execution time: 23_949 nanoseconds. - Weight::from_ref_time(24_347_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `383` + // Estimated: `7280` + // Minimum execution time: 17_343_000 picoseconds. + Weight::from_parts(17_656_000, 7280) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - // Storage: Assets Asset (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) fn set_team() -> Weight { - // Minimum execution time: 23_102 nanoseconds. - Weight::from_ref_time(23_518_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `383` + // Estimated: `3675` + // Minimum execution time: 15_902_000 picoseconds. + Weight::from_parts(16_439_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) + /// Storage: Assets Asset (r:1 w:0) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Metadata (r:1 w:1) + /// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn set_metadata(_n: u32, s: u32, ) -> Weight { - // Minimum execution time: 41_032 nanoseconds. - Weight::from_ref_time(42_845_624 as u64) - // Standard Error: 1_274 - .saturating_add(Weight::from_ref_time(1_875 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + fn set_metadata(_n: u32, _s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `383` + // Estimated: `7280` + // Minimum execution time: 27_222_000 picoseconds. + Weight::from_parts(29_151_657, 7280) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) + /// Storage: Assets Asset (r:1 w:0) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Metadata (r:1 w:1) + /// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen) fn clear_metadata() -> Weight { - // Minimum execution time: 42_570 nanoseconds. - Weight::from_ref_time(42_957_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `579` + // Estimated: `7280` + // Minimum execution time: 27_976_000 picoseconds. + Weight::from_parts(28_289_000, 7280) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) + /// Storage: Assets Asset (r:1 w:0) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Metadata (r:1 w:1) + /// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn force_set_metadata(n: u32, s: u32, ) -> Weight { - // Minimum execution time: 22_768 nanoseconds. - Weight::from_ref_time(23_868_816 as u64) - // Standard Error: 612 - .saturating_add(Weight::from_ref_time(1_602 as u64).saturating_mul(n as u64)) - // Standard Error: 612 - .saturating_add(Weight::from_ref_time(2_097 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + fn force_set_metadata(_n: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `190` + // Estimated: `7280` + // Minimum execution time: 16_162_000 picoseconds. + Weight::from_parts(17_137_043, 7280) + // Standard Error: 982 + .saturating_add(Weight::from_parts(4_180, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) + /// Storage: Assets Asset (r:1 w:0) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Metadata (r:1 w:1) + /// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen) fn force_clear_metadata() -> Weight { - // Minimum execution time: 41_863 nanoseconds. - Weight::from_ref_time(42_643_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `579` + // Estimated: `7280` + // Minimum execution time: 27_219_000 picoseconds. + Weight::from_parts(27_931_000, 7280) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - // Storage: Assets Asset (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) fn force_asset_status() -> Weight { - // Minimum execution time: 21_747 nanoseconds. - Weight::from_ref_time(22_595_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `383` + // Estimated: `3675` + // Minimum execution time: 15_313_000 picoseconds. + Weight::from_parts(15_775_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Approvals (r:1 w:1) + /// Proof: Assets Approvals (max_values: None, max_size: Some(148), added: 2623, mode: MaxEncodedLen) fn approve_transfer() -> Weight { - // Minimum execution time: 45_602 nanoseconds. - Weight::from_ref_time(46_004_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `417` + // Estimated: `7288` + // Minimum execution time: 31_865_000 picoseconds. + Weight::from_parts(32_316_000, 7288) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } - // Storage: Assets Approvals (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Approvals (r:1 w:1) + /// Proof: Assets Approvals (max_values: None, max_size: Some(148), added: 2623, mode: MaxEncodedLen) + /// Storage: Assets Account (r:2 w:2) + /// Proof: Assets Account (max_values: None, max_size: Some(102), added: 2577, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn transfer_approved() -> Weight { - // Minimum execution time: 70_944 nanoseconds. - Weight::from_ref_time(71_722_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Proof Size summary in bytes: + // Measured: `700` + // Estimated: `17025` + // Minimum execution time: 67_203_000 picoseconds. + Weight::from_parts(109_742_000, 17025) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(5_u64)) } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Approvals (r:1 w:1) + /// Proof: Assets Approvals (max_values: None, max_size: Some(148), added: 2623, mode: MaxEncodedLen) fn cancel_approval() -> Weight { - // Minimum execution time: 46_316 nanoseconds. - Weight::from_ref_time(46_910_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `587` + // Estimated: `7288` + // Minimum execution time: 33_430_000 picoseconds. + Weight::from_parts(33_824_000, 7288) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Approvals (r:1 w:1) + /// Proof: Assets Approvals (max_values: None, max_size: Some(148), added: 2623, mode: MaxEncodedLen) fn force_cancel_approval() -> Weight { - // Minimum execution time: 47_145 nanoseconds. - Weight::from_ref_time(47_611_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `587` + // Estimated: `7288` + // Minimum execution time: 33_596_000 picoseconds. + Weight::from_parts(34_226_000, 7288) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + fn set_min_balance() -> Weight { + // Proof Size summary in bytes: + // Measured: `383` + // Estimated: `3675` + // Minimum execution time: 16_367_000 picoseconds. + Weight::from_parts(16_703_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } } diff --git a/runtime/mainnet/src/weights/pallet_babe.rs b/runtime/mainnet/src/weights/pallet_babe.rs index 9e26d089..5063c9bd 100644 --- a/runtime/mainnet/src/weights/pallet_babe.rs +++ b/runtime/mainnet/src/weights/pallet_babe.rs @@ -33,8 +33,8 @@ pub struct WeightInfo(PhantomData); impl pallet_babe::WeightInfo for WeightInfo { /// The range of component `x` is `[0, 1]`. fn check_equivocation_proof(x: u32, ) -> Weight { - Weight::from_ref_time(93_348_000 as u64) + Weight::from_parts(93_348_000 as u64) // Standard Error: 100_000 - .saturating_add(Weight::from_ref_time(1_114_000 as u64).saturating_mul(x as u64)) + .saturating_add(Weight::from_parts(1_114_000 as u64).saturating_mul(x as u64)) } } diff --git a/runtime/mainnet/src/weights/pallet_bags_list.rs b/runtime/mainnet/src/weights/pallet_bags_list.rs index 46b5fc24..04893d73 100644 --- a/runtime/mainnet/src/weights/pallet_bags_list.rs +++ b/runtime/mainnet/src/weights/pallet_bags_list.rs @@ -31,32 +31,60 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_bags_list`. pub struct WeightInfo(PhantomData); impl pallet_bags_list::WeightInfo for WeightInfo { - // Storage: Staking Bonded (r:1 w:0) - // Storage: Staking Ledger (r:1 w:0) - // Storage: BagsList ListNodes (r:4 w:4) - // Storage: BagsList ListBags (r:1 w:1) + /// Storage: Staking Bonded (r:1 w:0) + /// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: Staking Ledger (r:1 w:0) + /// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen) + /// Storage: VoterList ListNodes (r:4 w:4) + /// Proof: VoterList ListNodes (max_values: None, max_size: Some(154), added: 2629, mode: MaxEncodedLen) + /// Storage: VoterList ListBags (r:1 w:1) + /// Proof: VoterList ListBags (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen) fn rebag_non_terminal() -> Weight { - Weight::from_ref_time(180_480_000 as u64) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Proof Size summary in bytes: + // Measured: `1654` + // Estimated: `23146` + // Minimum execution time: 60_668_000 picoseconds. + Weight::from_parts(62_285_000, 0) + .saturating_add(Weight::from_parts(0, 23146)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(5)) } - // Storage: Staking Bonded (r:1 w:0) - // Storage: Staking Ledger (r:1 w:0) - // Storage: BagsList ListNodes (r:3 w:3) - // Storage: BagsList ListBags (r:2 w:2) + /// Storage: Staking Bonded (r:1 w:0) + /// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: Staking Ledger (r:1 w:0) + /// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen) + /// Storage: VoterList ListNodes (r:3 w:3) + /// Proof: VoterList ListNodes (max_values: None, max_size: Some(154), added: 2629, mode: MaxEncodedLen) + /// Storage: VoterList ListBags (r:2 w:2) + /// Proof: VoterList ListBags (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen) fn rebag_terminal() -> Weight { - Weight::from_ref_time(178_796_000 as u64) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Proof Size summary in bytes: + // Measured: `1548` + // Estimated: `23074` + // Minimum execution time: 58_418_000 picoseconds. + Weight::from_parts(59_124_000, 0) + .saturating_add(Weight::from_parts(0, 23074)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(5)) } - // Storage: BagsList ListNodes (r:4 w:4) - // Storage: Staking Bonded (r:2 w:0) - // Storage: Staking Ledger (r:2 w:0) - // Storage: BagsList CounterForListNodes (r:1 w:1) - // Storage: BagsList ListBags (r:1 w:1) + /// Storage: VoterList ListNodes (r:4 w:4) + /// Proof: VoterList ListNodes (max_values: None, max_size: Some(154), added: 2629, mode: MaxEncodedLen) + /// Storage: Staking Bonded (r:2 w:0) + /// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: Staking Ledger (r:2 w:0) + /// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen) + /// Storage: VoterList CounterForListNodes (r:1 w:1) + /// Proof: VoterList CounterForListNodes (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: VoterList ListBags (r:1 w:1) + /// Proof: VoterList ListBags (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen) fn put_in_front_of() -> Weight { - Weight::from_ref_time(176_361_000 as u64) - .saturating_add(T::DbWeight::get().reads(10 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Proof Size summary in bytes: + // Measured: `1857` + // Estimated: `30748` + // Minimum execution time: 64_409_000 picoseconds. + Weight::from_parts(65_566_000, 0) + .saturating_add(Weight::from_parts(0, 30748)) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(6)) } -} +} \ No newline at end of file diff --git a/runtime/mainnet/src/weights/pallet_balances.rs b/runtime/mainnet/src/weights/pallet_balances.rs index de9bffba..f5b82b81 100644 --- a/runtime/mainnet/src/weights/pallet_balances.rs +++ b/runtime/mainnet/src/weights/pallet_balances.rs @@ -33,43 +33,50 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - Weight::from_ref_time(98_375_000 as u64) + // Minimum execution time: 40_902 nanoseconds. + Weight::from_parts(41_638_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - Weight::from_ref_time(70_402_000 as u64) + // Minimum execution time: 30_093 nanoseconds. + Weight::from_parts(30_732_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - Weight::from_ref_time(53_652_000 as u64) + // Minimum execution time: 23_901 nanoseconds. + Weight::from_parts(24_238_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - Weight::from_ref_time(60_784_000 as u64) + // Minimum execution time: 26_402 nanoseconds. + Weight::from_parts(27_026_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:2 w:2) fn force_transfer() -> Weight { - Weight::from_ref_time(92_484_000 as u64) + // Minimum execution time: 40_328 nanoseconds. + Weight::from_parts(41_242_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - Weight::from_ref_time(81_864_000 as u64) + // Minimum execution time: 35_401 nanoseconds. + Weight::from_parts(36_122_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - Weight::from_ref_time(46_036_000 as u64) + // Minimum execution time: 20_178 nanoseconds. + Weight::from_parts(20_435_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/mainnet/src/weights/pallet_collective.rs b/runtime/mainnet/src/weights/pallet_collective.rs index 7802ab59..0c4d54c0 100644 --- a/runtime/mainnet/src/weights/pallet_collective.rs +++ b/runtime/mainnet/src/weights/pallet_collective.rs @@ -31,153 +31,278 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_collective`. pub struct WeightInfo(PhantomData); impl pallet_collective::WeightInfo for WeightInfo { - // Storage: TechnicalCommittee Members (r:1 w:1) - // Storage: TechnicalCommittee Proposals (r:1 w:0) - // Storage: TechnicalCommittee Voting (r:100 w:100) - // Storage: TechnicalCommittee Prime (r:0 w:1) - /// The range of component `m` is `[1, 100]`. - /// The range of component `n` is `[1, 100]`. - /// The range of component `p` is `[1, 100]`. + /// Storage: Council Members (r:1 w:1) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:0) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Voting (r:100 w:100) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Prime (r:0 w:1) + /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - Weight::from_ref_time(100_658_000 as u64) - // Standard Error: 233_518 - .saturating_add(Weight::from_ref_time(15_031_886 as u64).saturating_mul(m as u64)) - // Standard Error: 233_518 - .saturating_add(Weight::from_ref_time(23_089_390 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) + // Proof Size summary in bytes: + // Measured: `0 + m * (3232 ±0) + p * (3190 ±0)` + // Estimated: `19164 + m * (7799 ±17) + p * (10110 ±17)` + // Minimum execution time: 17_032_000 picoseconds. + Weight::from_parts(17_263_000, 0) + .saturating_add(Weight::from_parts(0, 19164)) + // Standard Error: 51_363 + .saturating_add(Weight::from_parts(5_779_193, 0).saturating_mul(m.into())) + // Standard Error: 51_363 + .saturating_add(Weight::from_parts(8_434_866, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 7799).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 10110).saturating_mul(p.into())) } - // Storage: TechnicalCommittee Members (r:1 w:0) - /// The range of component `b` is `[1, 1024]`. + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[1, 100]`. fn execute(b: u32, m: u32, ) -> Weight { - Weight::from_ref_time(44_393_000 as u64) - // Standard Error: 884 - .saturating_add(Weight::from_ref_time(16_913 as u64).saturating_mul(b as u64)) - // Standard Error: 9_064 - .saturating_add(Weight::from_ref_time(98_094 as u64).saturating_mul(m as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) + // Proof Size summary in bytes: + // Measured: `136 + m * (32 ±0)` + // Estimated: `1622 + m * (32 ±0)` + // Minimum execution time: 15_686_000 picoseconds. + Weight::from_parts(15_185_500, 0) + .saturating_add(Weight::from_parts(0, 1622)) + // Standard Error: 26 + .saturating_add(Weight::from_parts(1_363, 0).saturating_mul(b.into())) + // Standard Error: 277 + .saturating_add(Weight::from_parts(15_720, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } - // Storage: TechnicalCommittee Members (r:1 w:0) - // Storage: TechnicalCommittee ProposalOf (r:1 w:0) - /// The range of component `b` is `[1, 1024]`. + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:1 w:0) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[1, 100]`. fn propose_execute(b: u32, m: u32, ) -> Weight { - Weight::from_ref_time(47_449_000 as u64) - // Standard Error: 923 - .saturating_add(Weight::from_ref_time(22_466 as u64).saturating_mul(b as u64)) - // Standard Error: 9_471 - .saturating_add(Weight::from_ref_time(158_882 as u64).saturating_mul(m as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) + // Proof Size summary in bytes: + // Measured: `136 + m * (32 ±0)` + // Estimated: `5224 + m * (64 ±0)` + // Minimum execution time: 18_314_000 picoseconds. + Weight::from_parts(17_659_522, 0) + .saturating_add(Weight::from_parts(0, 5224)) + // Standard Error: 22 + .saturating_add(Weight::from_parts(1_153, 0).saturating_mul(b.into())) + // Standard Error: 237 + .saturating_add(Weight::from_parts(25_439, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) } - // Storage: TechnicalCommittee Members (r:1 w:0) - // Storage: TechnicalCommittee ProposalOf (r:1 w:1) - // Storage: TechnicalCommittee Proposals (r:1 w:1) - // Storage: TechnicalCommittee ProposalCount (r:1 w:1) - // Storage: TechnicalCommittee Voting (r:0 w:1) - /// The range of component `b` is `[1, 1024]`. + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:1 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalCount (r:1 w:1) + /// Proof Skipped: Council ProposalCount (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Voting (r:0 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[2, 100]`. + /// The range of component `p` is `[1, 100]`. + /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[2, 100]`. /// The range of component `p` is `[1, 100]`. fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(65_534_000 as u64) - // Standard Error: 1_503 - .saturating_add(Weight::from_ref_time(25_794 as u64).saturating_mul(b as u64)) - // Standard Error: 15_522 - .saturating_add(Weight::from_ref_time(186_949 as u64).saturating_mul(m as u64)) - // Standard Error: 15_432 - .saturating_add(Weight::from_ref_time(1_052_850 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Proof Size summary in bytes: + // Measured: `426 + m * (32 ±0) + p * (36 ±0)` + // Estimated: `9685 + m * (165 ±0) + p * (180 ±0)` + // Minimum execution time: 23_916_000 picoseconds. + Weight::from_parts(25_192_989, 0) + .saturating_add(Weight::from_parts(0, 9685)) + // Standard Error: 50 + .saturating_add(Weight::from_parts(2_327, 0).saturating_mul(b.into())) + // Standard Error: 528 + .saturating_add(Weight::from_parts(17_763, 0).saturating_mul(m.into())) + // Standard Error: 522 + .saturating_add(Weight::from_parts(116_903, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 165).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 180).saturating_mul(p.into())) } - // Storage: TechnicalCommittee Members (r:1 w:0) - // Storage: TechnicalCommittee Voting (r:1 w:1) + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Voting (r:1 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// The range of component `m` is `[5, 100]`. /// The range of component `m` is `[5, 100]`. fn vote(m: u32, ) -> Weight { - Weight::from_ref_time(124_134_000 as u64) - // Standard Error: 19_022 - .saturating_add(Weight::from_ref_time(513_889 as u64).saturating_mul(m as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `875 + m * (64 ±0)` + // Estimated: `6698 + m * (128 ±0)` + // Minimum execution time: 21_641_000 picoseconds. + Weight::from_parts(22_373_888, 0) + .saturating_add(Weight::from_parts(0, 6698)) + // Standard Error: 299 + .saturating_add(Weight::from_parts(41_168, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 128).saturating_mul(m.into())) } - // Storage: TechnicalCommittee Voting (r:1 w:1) - // Storage: TechnicalCommittee Members (r:1 w:0) - // Storage: TechnicalCommittee Proposals (r:1 w:1) - // Storage: TechnicalCommittee ProposalOf (r:0 w:1) + /// Storage: Council Voting (r:1 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:0 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(86_964_000 as u64) - // Standard Error: 13_320 - .saturating_add(Weight::from_ref_time(169_329 as u64).saturating_mul(m as u64)) - // Standard Error: 13_382 - .saturating_add(Weight::from_ref_time(944_082 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `464 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `8211 + m * (260 ±0) + p * (144 ±0)` + // Minimum execution time: 26_158_000 picoseconds. + Weight::from_parts(27_675_242, 0) + .saturating_add(Weight::from_parts(0, 8211)) + // Standard Error: 845 + .saturating_add(Weight::from_parts(10_799, 0).saturating_mul(m.into())) + // Standard Error: 824 + .saturating_add(Weight::from_parts(141_199, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 260).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 144).saturating_mul(p.into())) } - // Storage: TechnicalCommittee Voting (r:1 w:1) - // Storage: TechnicalCommittee Members (r:1 w:0) - // Storage: TechnicalCommittee ProposalOf (r:1 w:1) - // Storage: TechnicalCommittee Proposals (r:1 w:1) - /// The range of component `b` is `[1, 1024]`. + /// Storage: Council Voting (r:1 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:1 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(118_412_000 as u64) - // Standard Error: 1_717 - .saturating_add(Weight::from_ref_time(23_949 as u64).saturating_mul(b as u64)) - // Standard Error: 17_831 - .saturating_add(Weight::from_ref_time(165_454 as u64).saturating_mul(m as u64)) - // Standard Error: 17_638 - .saturating_add(Weight::from_ref_time(833_786 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `766 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `12372 + b * (4 ±0) + m * (264 ±0) + p * (160 ±0)` + // Minimum execution time: 37_601_000 picoseconds. + Weight::from_parts(41_302_278, 0) + .saturating_add(Weight::from_parts(0, 12372)) + // Standard Error: 67 + .saturating_add(Weight::from_parts(1_608, 0).saturating_mul(b.into())) + // Standard Error: 716 + .saturating_add(Weight::from_parts(14_628, 0).saturating_mul(m.into())) + // Standard Error: 698 + .saturating_add(Weight::from_parts(129_997, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 4).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 264).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 160).saturating_mul(p.into())) } - // Storage: TechnicalCommittee Voting (r:1 w:1) - // Storage: TechnicalCommittee Members (r:1 w:0) - // Storage: TechnicalCommittee Prime (r:1 w:0) - // Storage: TechnicalCommittee Proposals (r:1 w:1) - // Storage: TechnicalCommittee ProposalOf (r:0 w:1) + /// Storage: Council Voting (r:1 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Prime (r:1 w:0) + /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:0 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_disapproved(m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(97_233_000 as u64) - // Standard Error: 13_820 - .saturating_add(Weight::from_ref_time(232_591 as u64).saturating_mul(m as u64)) - // Standard Error: 13_884 - .saturating_add(Weight::from_ref_time(871_486 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `484 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `10240 + m * (325 ±0) + p * (180 ±0)` + // Minimum execution time: 29_185_000 picoseconds. + Weight::from_parts(30_594_183, 0) + .saturating_add(Weight::from_parts(0, 10240)) + // Standard Error: 865 + .saturating_add(Weight::from_parts(30_165, 0).saturating_mul(m.into())) + // Standard Error: 844 + .saturating_add(Weight::from_parts(131_623, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 325).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 180).saturating_mul(p.into())) } - // Storage: TechnicalCommittee Voting (r:1 w:1) - // Storage: TechnicalCommittee Members (r:1 w:0) - // Storage: TechnicalCommittee Prime (r:1 w:0) - // Storage: TechnicalCommittee ProposalOf (r:1 w:1) - // Storage: TechnicalCommittee Proposals (r:1 w:1) - /// The range of component `b` is `[1, 1024]`. + /// Storage: Council Voting (r:1 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Prime (r:1 w:0) + /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:1 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(117_941_000 as u64) - // Standard Error: 1_940 - .saturating_add(Weight::from_ref_time(19_420 as u64).saturating_mul(b as u64)) - // Standard Error: 20_145 - .saturating_add(Weight::from_ref_time(205_676 as u64).saturating_mul(m as u64)) - // Standard Error: 19_927 - .saturating_add(Weight::from_ref_time(962_962 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `786 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `14575 + b * (5 ±0) + m * (330 ±0) + p * (200 ±0)` + // Minimum execution time: 43_157_000 picoseconds. + Weight::from_parts(43_691_874, 0) + .saturating_add(Weight::from_parts(0, 14575)) + // Standard Error: 61 + .saturating_add(Weight::from_parts(1_862, 0).saturating_mul(b.into())) + // Standard Error: 654 + .saturating_add(Weight::from_parts(17_183, 0).saturating_mul(m.into())) + // Standard Error: 638 + .saturating_add(Weight::from_parts(133_193, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 5).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 330).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 200).saturating_mul(p.into())) } - // Storage: TechnicalCommittee Proposals (r:1 w:1) - // Storage: TechnicalCommittee Voting (r:0 w:1) - // Storage: TechnicalCommittee ProposalOf (r:0 w:1) + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Voting (r:0 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:0 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `p` is `[1, 100]`. /// The range of component `p` is `[1, 100]`. fn disapprove_proposal(p: u32, ) -> Weight { - Weight::from_ref_time(48_952_000 as u64) - // Standard Error: 14_837 - .saturating_add(Weight::from_ref_time(1_234_605 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `293 + p * (32 ±0)` + // Estimated: `2364 + p * (96 ±0)` + // Minimum execution time: 14_666_000 picoseconds. + Weight::from_parts(16_623_386, 0) + .saturating_add(Weight::from_parts(0, 2364)) + // Standard Error: 430 + .saturating_add(Weight::from_parts(111_461, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 96).saturating_mul(p.into())) } -} +} \ No newline at end of file diff --git a/runtime/mainnet/src/weights/pallet_democracy.rs b/runtime/mainnet/src/weights/pallet_democracy.rs index 6a36b47b..53f313aa 100644 --- a/runtime/mainnet/src/weights/pallet_democracy.rs +++ b/runtime/mainnet/src/weights/pallet_democracy.rs @@ -30,198 +30,469 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_democracy`. pub struct WeightInfo(PhantomData); impl pallet_democracy::WeightInfo for WeightInfo { - // Storage: Democracy PublicPropCount (r:1 w:1) - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:0) - // Storage: Democracy DepositOf (r:0 w:1) + /// Storage: Democracy PublicPropCount (r:1 w:1) + /// Proof: Democracy PublicPropCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Democracy PublicProps (r:1 w:1) + /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) + /// Storage: Democracy Blacklist (r:1 w:0) + /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) + /// Storage: Democracy DepositOf (r:0 w:1) + /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) fn propose() -> Weight { - Weight::from_ref_time(57_410_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `4768` + // Estimated: `26379` + // Minimum execution time: 35_098_000 picoseconds. + Weight::from_parts(35_696_000, 0) + .saturating_add(Weight::from_parts(0, 26379)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: Democracy DepositOf (r:1 w:1) + /// Storage: Democracy DepositOf (r:1 w:1) + /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) fn second() -> Weight { - Weight::from_ref_time(49_224_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `3523` + // Estimated: `6695` + // Minimum execution time: 32_218_000 picoseconds. + Weight::from_parts(32_458_000, 0) + .saturating_add(Weight::from_parts(0, 6695)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) + /// Storage: Democracy ReferendumInfoOf (r:1 w:1) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: Democracy VotingOf (r:1 w:1) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) + /// Storage: Balances Locks (r:1 w:1) + /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) fn vote_new() -> Weight { - Weight::from_ref_time(60_933_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `3437` + // Estimated: `15690` + // Minimum execution time: 46_641_000 picoseconds. + Weight::from_parts(47_324_000, 0) + .saturating_add(Weight::from_parts(0, 15690)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) + /// Storage: Democracy ReferendumInfoOf (r:1 w:1) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: Democracy VotingOf (r:1 w:1) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) + /// Storage: Balances Locks (r:1 w:1) + /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) fn vote_existing() -> Weight { - Weight::from_ref_time(60_393_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `3459` + // Estimated: `15690` + // Minimum execution time: 47_172_000 picoseconds. + Weight::from_parts(47_732_000, 0) + .saturating_add(Weight::from_parts(0, 15690)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy Cancellations (r:1 w:1) + /// Storage: Democracy ReferendumInfoOf (r:1 w:1) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: Democracy Cancellations (r:1 w:1) + /// Proof: Democracy Cancellations (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:1 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) fn emergency_cancel() -> Weight { - Weight::from_ref_time(24_588_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy DepositOf (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy Blacklist (r:0 w:1) + // Proof Size summary in bytes: + // Measured: `333` + // Estimated: `10682` + // Minimum execution time: 25_744_000 picoseconds. + Weight::from_parts(26_226_000, 0) + .saturating_add(Weight::from_parts(0, 10682)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: Democracy PublicProps (r:1 w:1) + /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) + /// Storage: Democracy DepositOf (r:1 w:1) + /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:3 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: Democracy NextExternal (r:1 w:1) + /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) + /// Storage: Democracy ReferendumInfoOf (r:1 w:1) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: Democracy Blacklist (r:0 w:1) + /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) fn blacklist() -> Weight { - Weight::from_ref_time(91_226_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Proof Size summary in bytes: + // Measured: `5877` + // Estimated: `42332` + // Minimum execution time: 88_365_000 picoseconds. + Weight::from_parts(90_080_000, 0) + .saturating_add(Weight::from_parts(0, 42332)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(7)) } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:0) + /// Storage: Democracy NextExternal (r:1 w:1) + /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) + /// Storage: Democracy Blacklist (r:1 w:0) + /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) fn external_propose() -> Weight { - Weight::from_ref_time(18_898_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `3383` + // Estimated: `8320` + // Minimum execution time: 12_868_000 picoseconds. + Weight::from_parts(13_178_000, 0) + .saturating_add(Weight::from_parts(0, 8320)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Democracy NextExternal (r:0 w:1) + /// Storage: Democracy NextExternal (r:0 w:1) + /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) fn external_propose_majority() -> Weight { - Weight::from_ref_time(5_136_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_714_000 picoseconds. + Weight::from_parts(3_895_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Democracy NextExternal (r:0 w:1) + /// Storage: Democracy NextExternal (r:0 w:1) + /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) fn external_propose_default() -> Weight { - Weight::from_ref_time(5_243_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_565_000 picoseconds. + Weight::from_parts(3_831_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:1) - // Storage: Democracy ReferendumInfoOf (r:0 w:1) + /// Storage: Democracy NextExternal (r:1 w:1) + /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) + /// Storage: Democracy ReferendumCount (r:1 w:1) + /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:1 w:2) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: Democracy ReferendumInfoOf (r:0 w:1) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) fn fast_track() -> Weight { - Weight::from_ref_time(24_275_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `253` + // Estimated: `6624` + // Minimum execution time: 26_453_000 picoseconds. + Weight::from_parts(26_938_000, 0) + .saturating_add(Weight::from_parts(0, 6624)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(5)) } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:1) + /// Storage: Democracy NextExternal (r:1 w:1) + /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) + /// Storage: Democracy Blacklist (r:1 w:1) + /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:1 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) fn veto_external() -> Weight { - Weight::from_ref_time(30_988_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `3486` + // Estimated: `11838` + // Minimum execution time: 30_869_000 picoseconds. + Weight::from_parts(31_397_000, 0) + .saturating_add(Weight::from_parts(0, 11838)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy DepositOf (r:1 w:1) - // Storage: System Account (r:1 w:1) + /// Storage: Democracy PublicProps (r:1 w:1) + /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) + /// Storage: Democracy DepositOf (r:1 w:1) + /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:1 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) fn cancel_proposal() -> Weight { - Weight::from_ref_time(78_515_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `5788` + // Estimated: `31993` + // Minimum execution time: 72_692_000 picoseconds. + Weight::from_parts(73_692_000, 0) + .saturating_add(Weight::from_parts(0, 31993)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) } - // Storage: Democracy ReferendumInfoOf (r:0 w:1) + /// Storage: Democracy MetadataOf (r:1 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: Democracy ReferendumInfoOf (r:0 w:1) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) fn cancel_referendum() -> Weight { - Weight::from_ref_time(16_155_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `238` + // Estimated: `3518` + // Minimum execution time: 19_506_000 picoseconds. + Weight::from_parts(19_823_000, 0) + .saturating_add(Weight::from_parts(0, 3518)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Democracy LowestUnbaked (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:0) - // Storage: Democracy ReferendumInfoOf (r:2 w:0) + /// Storage: Democracy LowestUnbaked (r:1 w:1) + /// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Democracy ReferendumCount (r:1 w:0) + /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Democracy ReferendumInfoOf (r:99 w:0) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) /// The range of component `r` is `[0, 99]`. fn on_initialize_base(r: u32, ) -> Weight { - Weight::from_ref_time(7_007_000 as u64) - // Standard Error: 2_686 - .saturating_add(Weight::from_ref_time(2_288_781 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Democracy LowestUnbaked (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:0) - // Storage: Democracy LastTabledWasExternal (r:1 w:0) - // Storage: Democracy NextExternal (r:1 w:0) - // Storage: Democracy PublicProps (r:1 w:0) - // Storage: Democracy ReferendumInfoOf (r:2 w:0) + // Proof Size summary in bytes: + // Measured: `211 + r * (86 ±0)` + // Estimated: `3968 + r * (2676 ±0)` + // Minimum execution time: 6_019_000 picoseconds. + Weight::from_parts(9_632_674, 0) + .saturating_add(Weight::from_parts(0, 3968)) + // Standard Error: 6_651 + .saturating_add(Weight::from_parts(2_769_264, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) + } + /// Storage: Democracy LowestUnbaked (r:1 w:1) + /// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Democracy ReferendumCount (r:1 w:0) + /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Democracy LastTabledWasExternal (r:1 w:0) + /// Proof: Democracy LastTabledWasExternal (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: Democracy NextExternal (r:1 w:0) + /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) + /// Storage: Democracy PublicProps (r:1 w:0) + /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) + /// Storage: Democracy ReferendumInfoOf (r:99 w:0) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) /// The range of component `r` is `[0, 99]`. fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - Weight::from_ref_time(9_528_000 as u64) - // Standard Error: 2_521 - .saturating_add(Weight::from_ref_time(2_291_780 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Democracy VotingOf (r:3 w:3) - // Storage: Balances Locks (r:1 w:1) - // Storage: Democracy ReferendumInfoOf (r:2 w:2) + // Proof Size summary in bytes: + // Measured: `211 + r * (86 ±0)` + // Estimated: `25258 + r * (2676 ±0)` + // Minimum execution time: 9_143_000 picoseconds. + Weight::from_parts(12_247_629, 0) + .saturating_add(Weight::from_parts(0, 25258)) + // Standard Error: 6_077 + .saturating_add(Weight::from_parts(2_764_547, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) + } + /// Storage: Democracy VotingOf (r:3 w:3) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) + /// Storage: Democracy ReferendumInfoOf (r:99 w:99) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: Balances Locks (r:1 w:1) + /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) /// The range of component `r` is `[0, 99]`. fn delegate(r: u32, ) -> Weight { - Weight::from_ref_time(46_787_000 as u64) - // Standard Error: 2_943 - .saturating_add(Weight::from_ref_time(3_460_194 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) - .saturating_add(T::DbWeight::get().writes(4 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(r as u64))) - } - // Storage: Democracy VotingOf (r:2 w:2) - // Storage: Democracy ReferendumInfoOf (r:2 w:2) + // Proof Size summary in bytes: + // Measured: `797 + r * (108 ±0)` + // Estimated: `25554 + r * (2676 ±0)` + // Minimum execution time: 41_153_000 picoseconds. + Weight::from_parts(42_787_487, 0) + .saturating_add(Weight::from_parts(0, 25554)) + // Standard Error: 7_883 + .saturating_add(Weight::from_parts(3_862_521, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) + } + /// Storage: Democracy VotingOf (r:2 w:2) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) + /// Storage: Democracy ReferendumInfoOf (r:99 w:99) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) /// The range of component `r` is `[0, 99]`. fn undelegate(r: u32, ) -> Weight { - Weight::from_ref_time(29_789_000 as u64) - // Standard Error: 2_324 - .saturating_add(Weight::from_ref_time(3_360_918 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(r as u64))) - } - // Storage: Democracy PublicProps (r:0 w:1) + // Proof Size summary in bytes: + // Measured: `460 + r * (108 ±0)` + // Estimated: `14520 + r * (2676 ±0)` + // Minimum execution time: 20_767_000 picoseconds. + Weight::from_parts(21_768_239, 0) + .saturating_add(Weight::from_parts(0, 14520)) + // Standard Error: 9_791 + .saturating_add(Weight::from_parts(3_862_103, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) + } + /// Storage: Democracy PublicProps (r:0 w:1) + /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) fn clear_public_proposals() -> Weight { - Weight::from_ref_time(6_519_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_663_000 picoseconds. + Weight::from_parts(3_798_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) + /// Storage: Democracy VotingOf (r:1 w:1) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) + /// Storage: Balances Locks (r:1 w:1) + /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// The range of component `r` is `[0, 99]`. fn unlock_remove(r: u32, ) -> Weight { - Weight::from_ref_time(28_884_000 as u64) - // Standard Error: 2_631 - .saturating_add(Weight::from_ref_time(163_516 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - } - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `530` + // Estimated: `15617` + // Minimum execution time: 19_923_000 picoseconds. + Weight::from_parts(25_945_279, 0) + .saturating_add(Weight::from_parts(0, 15617)) + // Standard Error: 1_366 + .saturating_add(Weight::from_parts(22_003, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: Democracy VotingOf (r:1 w:1) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) + /// Storage: Balances Locks (r:1 w:1) + /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// The range of component `r` is `[0, 99]`. fn unlock_set(r: u32, ) -> Weight { - Weight::from_ref_time(33_498_000 as u64) - // Standard Error: 622 - .saturating_add(Weight::from_ref_time(133_421 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `531 + r * (22 ±0)` + // Estimated: `15617` + // Minimum execution time: 24_393_000 picoseconds. + Weight::from_parts(25_690_593, 0) + .saturating_add(Weight::from_parts(0, 15617)) + // Standard Error: 553 + .saturating_add(Weight::from_parts(59_042, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: Democracy ReferendumInfoOf (r:1 w:1) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: Democracy VotingOf (r:1 w:1) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) /// The range of component `r` is `[1, 100]`. fn remove_vote(r: u32, ) -> Weight { - Weight::from_ref_time(18_201_000 as u64) - // Standard Error: 1_007 - .saturating_add(Weight::from_ref_time(152_699 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `695 + r * (26 ±0)` + // Estimated: `10926` + // Minimum execution time: 15_551_000 picoseconds. + Weight::from_parts(17_809_948, 0) + .saturating_add(Weight::from_parts(0, 10926)) + // Standard Error: 1_907 + .saturating_add(Weight::from_parts(86_496, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: Democracy ReferendumInfoOf (r:1 w:1) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: Democracy VotingOf (r:1 w:1) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) /// The range of component `r` is `[1, 100]`. fn remove_other_vote(r: u32, ) -> Weight { - Weight::from_ref_time(18_455_000 as u64) - // Standard Error: 951 - .saturating_add(Weight::from_ref_time(150_907 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `695 + r * (26 ±0)` + // Estimated: `10926` + // Minimum execution time: 16_027_000 picoseconds. + Weight::from_parts(17_860_077, 0) + .saturating_add(Weight::from_parts(0, 10926)) + // Standard Error: 1_950 + .saturating_add(Weight::from_parts(87_722, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: Democracy NextExternal (r:1 w:0) + /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) + /// Storage: Preimage StatusFor (r:1 w:0) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:0 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + fn set_external_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `323` + // Estimated: `5173` + // Minimum execution time: 17_551_000 picoseconds. + Weight::from_parts(17_776_000, 0) + .saturating_add(Weight::from_parts(0, 5173)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Democracy NextExternal (r:1 w:0) + /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:1 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + fn clear_external_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `253` + // Estimated: `5135` + // Minimum execution time: 16_020_000 picoseconds. + Weight::from_parts(16_477_000, 0) + .saturating_add(Weight::from_parts(0, 5135)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Democracy PublicProps (r:1 w:0) + /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) + /// Storage: Preimage StatusFor (r:1 w:0) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:0 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + fn set_proposal_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `4855` + // Estimated: `21743` + // Minimum execution time: 33_144_000 picoseconds. + Weight::from_parts(33_457_000, 0) + .saturating_add(Weight::from_parts(0, 21743)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Democracy PublicProps (r:1 w:0) + /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:1 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + fn clear_proposal_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `4789` + // Estimated: `21705` + // Minimum execution time: 31_022_000 picoseconds. + Weight::from_parts(31_534_000, 0) + .saturating_add(Weight::from_parts(0, 21705)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Preimage StatusFor (r:1 w:0) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:0 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + fn set_referendum_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `144` + // Estimated: `3556` + // Minimum execution time: 14_512_000 picoseconds. + Weight::from_parts(14_769_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Democracy ReferendumInfoOf (r:1 w:0) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:1 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + fn clear_referendum_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `269` + // Estimated: `7184` + // Minimum execution time: 17_966_000 picoseconds. + Weight::from_parts(18_270_000, 0) + .saturating_add(Weight::from_parts(0, 7184)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } } - diff --git a/runtime/mainnet/src/weights/pallet_election_provider_multi_phase.rs b/runtime/mainnet/src/weights/pallet_election_provider_multi_phase.rs index cb0454d3..e1bcfd33 100644 --- a/runtime/mainnet/src/weights/pallet_election_provider_multi_phase.rs +++ b/runtime/mainnet/src/weights/pallet_election_provider_multi_phase.rs @@ -31,126 +31,221 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_election_provider_multi_phase`. pub struct WeightInfo(PhantomData); impl pallet_election_provider_multi_phase::WeightInfo for WeightInfo { - // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking CurrentPlannedSession (r:1 w:0) - // Storage: Staking ErasStartSessionIndex (r:1 w:0) - // Storage: Babe EpochIndex (r:1 w:0) - // Storage: Babe GenesisSlot (r:1 w:0) - // Storage: Babe CurrentSlot (r:1 w:0) - // Storage: Staking ForceEra (r:1 w:0) - // Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) + /// Storage: Staking CurrentEra (r:1 w:0) + /// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Staking CurrentPlannedSession (r:1 w:0) + /// Proof: Staking CurrentPlannedSession (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Staking ErasStartSessionIndex (r:1 w:0) + /// Proof: Staking ErasStartSessionIndex (max_values: None, max_size: Some(16), added: 2491, mode: MaxEncodedLen) + /// Storage: Babe EpochIndex (r:1 w:0) + /// Proof: Babe EpochIndex (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: Babe GenesisSlot (r:1 w:0) + /// Proof: Babe GenesisSlot (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: Babe CurrentSlot (r:1 w:0) + /// Proof: Babe CurrentSlot (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: Staking ForceEra (r:1 w:0) + /// Proof: Staking ForceEra (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured) fn on_initialize_nothing() -> Weight { - Weight::from_ref_time(23_070_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) + // Proof Size summary in bytes: + // Measured: `1027` + // Estimated: `14936` + // Minimum execution time: 21_024_000 picoseconds. + Weight::from_parts(21_697_000, 0) + .saturating_add(Weight::from_parts(0, 14936)) + .saturating_add(T::DbWeight::get().reads(8)) } - // Storage: ElectionProviderMultiPhase Round (r:1 w:0) - // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) + /// Storage: ElectionProviderMultiPhase Round (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase Round (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:1) + /// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured) fn on_initialize_open_signed() -> Weight { - Weight::from_ref_time(27_530_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `148` + // Estimated: `3266` + // Minimum execution time: 13_251_000 picoseconds. + Weight::from_parts(13_556_000, 0) + .saturating_add(Weight::from_parts(0, 3266)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: ElectionProviderMultiPhase Round (r:1 w:0) - // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) + /// Storage: ElectionProviderMultiPhase Round (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase Round (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:1) + /// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured) fn on_initialize_open_unsigned() -> Weight { - Weight::from_ref_time(26_270_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `148` + // Estimated: `3266` + // Minimum execution time: 14_586_000 picoseconds. + Weight::from_parts(14_932_000, 0) + .saturating_add(Weight::from_parts(0, 3266)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: System Account (r:1 w:1) - // Storage: ElectionProviderMultiPhase QueuedSolution (r:0 w:1) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: ElectionProviderMultiPhase QueuedSolution (r:0 w:1) + /// Proof Skipped: ElectionProviderMultiPhase QueuedSolution (max_values: Some(1), max_size: None, mode: Measured) fn finalize_signed_phase_accept_solution() -> Weight { - Weight::from_ref_time(37_820_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `174` + // Estimated: `3767` + // Minimum execution time: 24_044_000 picoseconds. + Weight::from_parts(24_456_000, 0) + .saturating_add(Weight::from_parts(0, 3767)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: System Account (r:1 w:1) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn finalize_signed_phase_reject_solution() -> Weight { - Weight::from_ref_time(37_301_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `174` + // Estimated: `3593` + // Minimum execution time: 16_778_000 picoseconds. + Weight::from_parts(17_098_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: ElectionProviderMultiPhase SnapshotMetadata (r:0 w:1) - // Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1) - // Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1) + /// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:0 w:1) + /// Proof Skipped: ElectionProviderMultiPhase SnapshotMetadata (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1) + /// Proof Skipped: ElectionProviderMultiPhase DesiredTargets (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1) + /// Proof Skipped: ElectionProviderMultiPhase Snapshot (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. - fn create_snapshot_internal(v: u32, t: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 81_000 - .saturating_add(Weight::from_ref_time(591_000 as u64).saturating_mul(v as u64)) - // Standard Error: 163_000 - .saturating_add(Weight::from_ref_time(377_000 as u64).saturating_mul(t as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + fn create_snapshot_internal(v: u32, _t: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 658_110_000 picoseconds. + Weight::from_parts(673_151_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 3_369 + .saturating_add(Weight::from_parts(392_624, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1) - // Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1) - // Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:1) - // Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:1 w:0) - // Storage: System BlockWeight (r:1 w:1) - // Storage: ElectionProviderMultiPhase QueuedSolution (r:1 w:1) - // Storage: ElectionProviderMultiPhase Round (r:1 w:1) - // Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1) - // Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1) - // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) + /// Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1) + /// Proof Skipped: ElectionProviderMultiPhase SignedSubmissionIndices (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1) + /// Proof Skipped: ElectionProviderMultiPhase SignedSubmissionNextIndex (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:1) + /// Proof Skipped: ElectionProviderMultiPhase SnapshotMetadata (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase SignedSubmissionsMap (max_values: None, max_size: None, mode: Measured) + /// Storage: System BlockWeight (r:1 w:1) + /// Proof: System BlockWeight (max_values: Some(1), max_size: Some(48), added: 543, mode: MaxEncodedLen) + /// Storage: ElectionProviderMultiPhase QueuedSolution (r:1 w:1) + /// Proof Skipped: ElectionProviderMultiPhase QueuedSolution (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase Round (r:1 w:1) + /// Proof Skipped: ElectionProviderMultiPhase Round (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:1) + /// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1) + /// Proof Skipped: ElectionProviderMultiPhase DesiredTargets (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1) + /// Proof Skipped: ElectionProviderMultiPhase Snapshot (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `a` is `[500, 800]`. /// The range of component `d` is `[200, 400]`. - fn elect_queued(a: u32, _d: u32, ) -> Weight { - Weight::from_ref_time(664_418_000 as u64) - // Standard Error: 398_000 - .saturating_add(Weight::from_ref_time(1_147_000 as u64).saturating_mul(a as u64)) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(9 as u64)) + fn elect_queued(a: u32, d: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `900 + a * (1152 ±0) + d * (47 ±0)` + // Estimated: `21873 + a * (10368 ±0) + d * (432 ±0)` + // Minimum execution time: 374_177_000 picoseconds. + Weight::from_parts(383_707_000, 0) + .saturating_add(Weight::from_parts(0, 21873)) + // Standard Error: 8_930 + .saturating_add(Weight::from_parts(575_485, 0).saturating_mul(a.into())) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(9)) + .saturating_add(Weight::from_parts(0, 10368).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(0, 432).saturating_mul(d.into())) } - // Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) - // Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:0) - // Storage: TransactionPayment NextFeeMultiplier (r:1 w:0) - // Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1) - // Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1) - // Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:0 w:1) + /// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase SnapshotMetadata (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TransactionPayment NextFeeMultiplier (r:1 w:0) + /// Proof: TransactionPayment NextFeeMultiplier (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1) + /// Proof Skipped: ElectionProviderMultiPhase SignedSubmissionIndices (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1) + /// Proof Skipped: ElectionProviderMultiPhase SignedSubmissionNextIndex (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:0 w:1) + /// Proof Skipped: ElectionProviderMultiPhase SignedSubmissionsMap (max_values: None, max_size: None, mode: Measured) fn submit() -> Weight { - Weight::from_ref_time(65_721_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `1238` + // Estimated: `13631` + // Minimum execution time: 45_426_000 picoseconds. + Weight::from_parts(46_000_000, 0) + .saturating_add(Weight::from_parts(0, 13631)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) - // Storage: ElectionProviderMultiPhase Round (r:1 w:0) - // Storage: ElectionProviderMultiPhase DesiredTargets (r:1 w:0) - // Storage: ElectionProviderMultiPhase QueuedSolution (r:1 w:1) - // Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:0) - // Storage: ElectionProviderMultiPhase MinimumUntrustedScore (r:1 w:0) - // Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0) + /// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase Round (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase Round (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase DesiredTargets (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase DesiredTargets (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase QueuedSolution (r:1 w:1) + /// Proof Skipped: ElectionProviderMultiPhase QueuedSolution (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase SnapshotMetadata (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase Snapshot (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase MinimumUntrustedScore (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase MinimumUntrustedScore (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. /// The range of component `a` is `[500, 800]`. /// The range of component `d` is `[200, 400]`. - fn submit_unsigned(v: u32, _t: u32, a: u32, d: u32, ) -> Weight { - Weight::from_ref_time(794_070_000 as u64) - // Standard Error: 286_000 - .saturating_add(Weight::from_ref_time(992_000 as u64).saturating_mul(v as u64)) - // Standard Error: 953_000 - .saturating_add(Weight::from_ref_time(9_026_000 as u64).saturating_mul(a as u64)) - // Standard Error: 1_430_000 - .saturating_add(Weight::from_ref_time(2_144_000 as u64).saturating_mul(d as u64)) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + fn submit_unsigned(v: u32, t: u32, a: u32, _d: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `253 + v * (809 ±0) + t * (32 ±0)` + // Estimated: `12166 + v * (5663 ±0) + t * (224 ±0)` + // Minimum execution time: 7_353_352_000 picoseconds. + Weight::from_parts(7_409_425_000, 0) + .saturating_add(Weight::from_parts(0, 12166)) + // Standard Error: 24_654 + .saturating_add(Weight::from_parts(9_966, 0).saturating_mul(v.into())) + // Standard Error: 73_060 + .saturating_add(Weight::from_parts(7_603_657, 0).saturating_mul(a.into())) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 5663).saturating_mul(v.into())) + .saturating_add(Weight::from_parts(0, 224).saturating_mul(t.into())) } - // Storage: ElectionProviderMultiPhase Round (r:1 w:0) - // Storage: ElectionProviderMultiPhase DesiredTargets (r:1 w:0) - // Storage: ElectionProviderMultiPhase MinimumUntrustedScore (r:1 w:0) - // Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0) + /// Storage: ElectionProviderMultiPhase DesiredTargets (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase DesiredTargets (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase Snapshot (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase Round (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase Round (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ElectionProviderMultiPhase MinimumUntrustedScore (r:1 w:0) + /// Proof Skipped: ElectionProviderMultiPhase MinimumUntrustedScore (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. /// The range of component `a` is `[500, 800]`. /// The range of component `d` is `[200, 400]`. - fn feasibility_check(v: u32, _t: u32, a: u32, d: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 439_000 - .saturating_add(Weight::from_ref_time(1_236_000 as u64).saturating_mul(v as u64)) - // Standard Error: 1_463_000 - .saturating_add(Weight::from_ref_time(8_868_000 as u64).saturating_mul(a as u64)) - // Standard Error: 2_195_000 - .saturating_add(Weight::from_ref_time(584_000 as u64).saturating_mul(d as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) + fn feasibility_check(v: u32, t: u32, a: u32, _d: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `228 + v * (809 ±0) + t * (32 ±0)` + // Estimated: `6852 + v * (3236 ±0) + t * (128 ±0)` + // Minimum execution time: 6_174_792_000 picoseconds. + Weight::from_parts(6_244_237_000, 0) + .saturating_add(Weight::from_parts(0, 6852)) + // Standard Error: 21_322 + .saturating_add(Weight::from_parts(142_059, 0).saturating_mul(v.into())) + // Standard Error: 63_186 + .saturating_add(Weight::from_parts(5_948_175, 0).saturating_mul(a.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(Weight::from_parts(0, 3236).saturating_mul(v.into())) + .saturating_add(Weight::from_parts(0, 128).saturating_mul(t.into())) } -} +} \ No newline at end of file diff --git a/runtime/mainnet/src/weights/pallet_elections_phragmen.rs b/runtime/mainnet/src/weights/pallet_elections_phragmen.rs index dcea6940..c1ac2e3e 100644 --- a/runtime/mainnet/src/weights/pallet_elections_phragmen.rs +++ b/runtime/mainnet/src/weights/pallet_elections_phragmen.rs @@ -31,142 +31,259 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_elections_phragmen`. pub struct WeightInfo(PhantomData); impl pallet_elections_phragmen::WeightInfo for WeightInfo { - // Storage: PhragmenElection Candidates (r:1 w:0) - // Storage: PhragmenElection Members (r:1 w:0) - // Storage: PhragmenElection RunnersUp (r:1 w:0) - // Storage: PhragmenElection Voting (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) + /// Storage: PhragmenElection Candidates (r:1 w:0) + /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection Members (r:1 w:0) + /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection RunnersUp (r:1 w:0) + /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection Voting (r:1 w:1) + /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Balances Locks (r:1 w:1) + /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) /// The range of component `v` is `[1, 16]`. fn vote_equal(v: u32, ) -> Weight { - Weight::from_ref_time(36_912_000 as u64) - // Standard Error: 16_000 - .saturating_add(Weight::from_ref_time(179_000 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `403 + v * (80 ±0)` + // Estimated: `14292 + v * (320 ±0)` + // Minimum execution time: 27_353_000 picoseconds. + Weight::from_parts(28_103_445, 0) + .saturating_add(Weight::from_parts(0, 14292)) + // Standard Error: 4_556 + .saturating_add(Weight::from_parts(117_766, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 320).saturating_mul(v.into())) } - // Storage: PhragmenElection Candidates (r:1 w:0) - // Storage: PhragmenElection Members (r:1 w:0) - // Storage: PhragmenElection RunnersUp (r:1 w:0) - // Storage: PhragmenElection Voting (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) + /// Storage: PhragmenElection Candidates (r:1 w:0) + /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection Members (r:1 w:0) + /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection RunnersUp (r:1 w:0) + /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection Voting (r:1 w:1) + /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Balances Locks (r:1 w:1) + /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) /// The range of component `v` is `[2, 16]`. fn vote_more(v: u32, ) -> Weight { - Weight::from_ref_time(46_265_000 as u64) - // Standard Error: 223_000 - .saturating_add(Weight::from_ref_time(743_000 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `371 + v * (80 ±0)` + // Estimated: `14164 + v * (320 ±0)` + // Minimum execution time: 36_885_000 picoseconds. + Weight::from_parts(37_769_975, 0) + .saturating_add(Weight::from_parts(0, 14164)) + // Standard Error: 6_586 + .saturating_add(Weight::from_parts(123_567, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 320).saturating_mul(v.into())) } - // Storage: PhragmenElection Candidates (r:1 w:0) - // Storage: PhragmenElection Members (r:1 w:0) - // Storage: PhragmenElection RunnersUp (r:1 w:0) - // Storage: PhragmenElection Voting (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) + /// Storage: PhragmenElection Candidates (r:1 w:0) + /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection Members (r:1 w:0) + /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection RunnersUp (r:1 w:0) + /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection Voting (r:1 w:1) + /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Balances Locks (r:1 w:1) + /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) /// The range of component `v` is `[2, 16]`. fn vote_less(v: u32, ) -> Weight { - Weight::from_ref_time(49_651_000 as u64) - // Standard Error: 37_000 - .saturating_add(Weight::from_ref_time(154_000 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `403 + v * (80 ±0)` + // Estimated: `14292 + v * (320 ±0)` + // Minimum execution time: 36_610_000 picoseconds. + Weight::from_parts(37_524_808, 0) + .saturating_add(Weight::from_parts(0, 14292)) + // Standard Error: 6_164 + .saturating_add(Weight::from_parts(147_944, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 320).saturating_mul(v.into())) } - // Storage: PhragmenElection Voting (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) + /// Storage: PhragmenElection Voting (r:1 w:1) + /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Balances Locks (r:1 w:1) + /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) fn remove_voter() -> Weight { - Weight::from_ref_time(47_030_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `925` + // Estimated: `9154` + // Minimum execution time: 33_052_000 picoseconds. + Weight::from_parts(33_677_000, 0) + .saturating_add(Weight::from_parts(0, 9154)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: PhragmenElection Candidates (r:1 w:1) - // Storage: PhragmenElection Members (r:1 w:0) - // Storage: PhragmenElection RunnersUp (r:1 w:0) + /// Storage: PhragmenElection Candidates (r:1 w:1) + /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection Members (r:1 w:0) + /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection RunnersUp (r:1 w:0) + /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `c` is `[1, 1000]`. fn submit_candidacy(c: u32, ) -> Weight { - Weight::from_ref_time(48_816_000 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(62_000 as u64).saturating_mul(c as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `2712 + c * (48 ±0)` + // Estimated: `12585 + c * (144 ±0)` + // Minimum execution time: 32_163_000 picoseconds. + Weight::from_parts(24_757_419, 0) + .saturating_add(Weight::from_parts(0, 12585)) + // Standard Error: 902 + .saturating_add(Weight::from_parts(79_765, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 144).saturating_mul(c.into())) } - // Storage: PhragmenElection Candidates (r:1 w:1) + /// Storage: PhragmenElection Candidates (r:1 w:1) + /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `c` is `[1, 1000]`. fn renounce_candidacy_candidate(c: u32, ) -> Weight { - Weight::from_ref_time(44_736_000 as u64) - // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(57_000 as u64).saturating_mul(c as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `284 + c * (48 ±0)` + // Estimated: `1756 + c * (48 ±0)` + // Minimum execution time: 24_805_000 picoseconds. + Weight::from_parts(17_940_635, 0) + .saturating_add(Weight::from_parts(0, 1756)) + // Standard Error: 888 + .saturating_add(Weight::from_parts(59_369, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into())) } - // Storage: PhragmenElection Members (r:1 w:1) - // Storage: PhragmenElection RunnersUp (r:1 w:1) - // Storage: Council Prime (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: Council Members (r:0 w:1) + /// Storage: PhragmenElection Members (r:1 w:1) + /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection RunnersUp (r:1 w:1) + /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Prime (r:1 w:1) + /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:0) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Members (r:0 w:1) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) fn renounce_candidacy_members() -> Weight { - Weight::from_ref_time(49_251_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Proof Size summary in bytes: + // Measured: `2986` + // Estimated: `20870` + // Minimum execution time: 42_908_000 picoseconds. + Weight::from_parts(43_409_000, 0) + .saturating_add(Weight::from_parts(0, 20870)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) } - // Storage: PhragmenElection RunnersUp (r:1 w:1) + /// Storage: PhragmenElection RunnersUp (r:1 w:1) + /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) fn renounce_candidacy_runners_up() -> Weight { - Weight::from_ref_time(37_941_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `1681` + // Estimated: `3166` + // Minimum execution time: 27_419_000 picoseconds. + Weight::from_parts(27_912_000, 0) + .saturating_add(Weight::from_parts(0, 3166)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Benchmark Override (r:0 w:0) + /// Storage: Benchmark Override (r:0 w:0) + /// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured) fn remove_member_without_replacement() -> Weight { - Weight::from_ref_time(2_000_000_000_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_000_000_000_000 picoseconds. + Weight::from_parts(2_000_000_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - // Storage: PhragmenElection Members (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: PhragmenElection RunnersUp (r:1 w:1) - // Storage: Council Prime (r:1 w:1) - // Storage: Council Proposals (r:1 w:0) - // Storage: Council Members (r:0 w:1) + /// Storage: PhragmenElection Members (r:1 w:1) + /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: PhragmenElection RunnersUp (r:1 w:1) + /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Prime (r:1 w:1) + /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:0) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Members (r:0 w:1) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) fn remove_member_with_replacement() -> Weight { - Weight::from_ref_time(65_640_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Proof Size summary in bytes: + // Measured: `2986` + // Estimated: `24463` + // Minimum execution time: 57_465_000 picoseconds. + Weight::from_parts(58_107_000, 0) + .saturating_add(Weight::from_parts(0, 24463)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) } - // Storage: PhragmenElection Voting (r:5001 w:5000) - // Storage: PhragmenElection Members (r:1 w:0) - // Storage: PhragmenElection RunnersUp (r:1 w:0) - // Storage: PhragmenElection Candidates (r:1 w:0) - // Storage: Balances Locks (r:5000 w:5000) - // Storage: System Account (r:5000 w:5000) + /// Storage: PhragmenElection Voting (r:10001 w:10000) + /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: PhragmenElection Members (r:1 w:0) + /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection RunnersUp (r:1 w:0) + /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection Candidates (r:1 w:0) + /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Balances Locks (r:10000 w:10000) + /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: System Account (r:10000 w:10000) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// The range of component `v` is `[5000, 10000]`. - /// The range of component `d` is `[1, 5000]`. + /// The range of component `d` is `[0, 5000]`. fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 711_000 - .saturating_add(Weight::from_ref_time(77_039_000 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(v as u64))) - .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(v as u64))) + // Proof Size summary in bytes: + // Measured: `35989 + v * (808 ±0)` + // Estimated: `154956 + v * (12084 ±0)` + // Minimum execution time: 319_677_473_000 picoseconds. + Weight::from_parts(320_382_361_000, 0) + .saturating_add(Weight::from_parts(0, 154956)) + // Standard Error: 270_292 + .saturating_add(Weight::from_parts(38_671_603, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(v.into()))) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(v.into()))) + .saturating_add(Weight::from_parts(0, 12084).saturating_mul(v.into())) } - // Storage: PhragmenElection Candidates (r:1 w:1) - // Storage: PhragmenElection Members (r:1 w:1) - // Storage: PhragmenElection RunnersUp (r:1 w:1) - // Storage: PhragmenElection Voting (r:10001 w:0) - // Storage: Council Proposals (r:1 w:0) - // Storage: PhragmenElection ElectionRounds (r:1 w:1) - // Storage: Council Members (r:0 w:1) - // Storage: Council Prime (r:0 w:1) - // Storage: System Account (r:98 w:98) + /// Storage: PhragmenElection Candidates (r:1 w:1) + /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection Members (r:1 w:1) + /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection RunnersUp (r:1 w:1) + /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PhragmenElection Voting (r:10001 w:0) + /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:0) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: System Account (r:962 w:962) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: PhragmenElection ElectionRounds (r:1 w:1) + /// Proof Skipped: PhragmenElection ElectionRounds (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Members (r:0 w:1) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Prime (r:0 w:1) + /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `c` is `[1, 1000]`. /// The range of component `v` is `[1, 10000]`. /// The range of component `e` is `[10000, 160000]`. fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 21_257_000 - .saturating_add(Weight::from_ref_time(45_937_000 as u64).saturating_mul(c as u64)) - // Standard Error: 2_123_000 - .saturating_add(Weight::from_ref_time(35_966_000 as u64).saturating_mul(v as u64)) - // Standard Error: 141_000 - .saturating_add(Weight::from_ref_time(1_610_000 as u64).saturating_mul(e as u64)) - .saturating_add(T::DbWeight::get().reads(444 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(c as u64))) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(v as u64))) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(c as u64))) + // Proof Size summary in bytes: + // Measured: `0 + v * (607 ±0) + e * (28 ±0)` + // Estimated: `4839313 + v * (5481 ±4) + e * (123 ±0) + c * (2560 ±0)` + // Minimum execution time: 30_795_431_000 picoseconds. + Weight::from_parts(30_861_700_000, 0) + .saturating_add(Weight::from_parts(0, 4839313)) + // Standard Error: 482_348 + .saturating_add(Weight::from_parts(37_626_560, 0).saturating_mul(v.into())) + // Standard Error: 30_954 + .saturating_add(Weight::from_parts(2_016_889, 0).saturating_mul(e.into())) + .saturating_add(T::DbWeight::get().reads(265)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) + .saturating_add(T::DbWeight::get().writes(6)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) + .saturating_add(Weight::from_parts(0, 5481).saturating_mul(v.into())) + .saturating_add(Weight::from_parts(0, 123).saturating_mul(e.into())) + .saturating_add(Weight::from_parts(0, 2560).saturating_mul(c.into())) } } diff --git a/runtime/mainnet/src/weights/pallet_grandpa.rs b/runtime/mainnet/src/weights/pallet_grandpa.rs index 481c1c53..19e96281 100644 --- a/runtime/mainnet/src/weights/pallet_grandpa.rs +++ b/runtime/mainnet/src/weights/pallet_grandpa.rs @@ -33,11 +33,11 @@ pub struct WeightInfo(PhantomData); impl pallet_grandpa::WeightInfo for WeightInfo { /// The range of component `x` is `[0, 1]`. fn check_equivocation_proof(_x: u32, ) -> Weight { - Weight::from_ref_time(86_280_000 as u64) + Weight::from_parts(86_280_000 as u64) } // Storage: Grandpa Stalled (r:0 w:1) fn note_stalled() -> Weight { - Weight::from_ref_time(5_040_000 as u64) + Weight::from_parts(5_040_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/mainnet/src/weights/pallet_identity.rs b/runtime/mainnet/src/weights/pallet_identity.rs index 9a0f665d..ab809bdc 100644 --- a/runtime/mainnet/src/weights/pallet_identity.rs +++ b/runtime/mainnet/src/weights/pallet_identity.rs @@ -31,192 +31,308 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_identity`. pub struct WeightInfo(PhantomData); impl pallet_identity::WeightInfo for WeightInfo { - // Storage: Identity Registrars (r:1 w:1) + /// Storage: Identity Registrars (r:1 w:1) + /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) /// The range of component `r` is `[1, 19]`. fn add_registrar(r: u32, ) -> Weight { - Weight::from_ref_time(50_144_000 as u64) - // Standard Error: 97_672 - .saturating_add(Weight::from_ref_time(2_150_717 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `32 + r * (57 ±0)` + // Estimated: `2626` + // Minimum execution time: 11_971_000 picoseconds. + Weight::from_parts(12_647_916, 0) + .saturating_add(Weight::from_parts(0, 2626)) + // Standard Error: 1_923 + .saturating_add(Weight::from_parts(117_079, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Identity IdentityOf (r:1 w:1) + /// Storage: Identity IdentityOf (r:1 w:1) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn set_identity(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(74_830_000 as u64) - // Standard Error: 74_361 - .saturating_add(Weight::from_ref_time(1_623_229 as u64).saturating_mul(r as u64)) - // Standard Error: 14_849 - .saturating_add(Weight::from_ref_time(996_020 as u64).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Identity IdentityOf (r:1 w:0) - // Storage: Identity SubsOf (r:1 w:1) - // Storage: Identity SuperOf (r:1 w:1) - /// The range of component `s` is `[1, 100]`. + // Proof Size summary in bytes: + // Measured: `442 + r * (5 ±0)` + // Estimated: `11003` + // Minimum execution time: 29_280_000 picoseconds. + Weight::from_parts(30_187_924, 0) + .saturating_add(Weight::from_parts(0, 11003)) + // Standard Error: 4_084 + .saturating_add(Weight::from_parts(6_401, 0).saturating_mul(r.into())) + // Standard Error: 796 + .saturating_add(Weight::from_parts(440_407, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Identity IdentityOf (r:1 w:0) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: Identity SubsOf (r:1 w:1) + /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// Storage: Identity SuperOf (r:100 w:100) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// The range of component `s` is `[0, 100]`. fn set_subs_new(s: u32, ) -> Weight { - Weight::from_ref_time(65_363_000 as u64) - // Standard Error: 46_262 - .saturating_add(Weight::from_ref_time(6_501_901 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) - } - // Storage: Identity IdentityOf (r:1 w:0) - // Storage: Identity SubsOf (r:1 w:1) - // Storage: Identity SuperOf (r:0 w:1) - /// The range of component `p` is `[1, 100]`. + // Proof Size summary in bytes: + // Measured: `101` + // Estimated: `18716 + s * (2589 ±0)` + // Minimum execution time: 9_217_000 picoseconds. + Weight::from_parts(22_366_407, 0) + .saturating_add(Weight::from_parts(0, 18716)) + // Standard Error: 5_217 + .saturating_add(Weight::from_parts(2_681_153, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(s.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) + .saturating_add(Weight::from_parts(0, 2589).saturating_mul(s.into())) + } + /// Storage: Identity IdentityOf (r:1 w:0) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: Identity SubsOf (r:1 w:1) + /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// Storage: Identity SuperOf (r:0 w:100) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// The range of component `p` is `[0, 100]`. fn set_subs_old(p: u32, ) -> Weight { - Weight::from_ref_time(62_777_000 as u64) - // Standard Error: 38_848 - .saturating_add(Weight::from_ref_time(3_435_862 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) - } - // Storage: Identity SubsOf (r:1 w:1) - // Storage: Identity IdentityOf (r:1 w:1) - // Storage: Identity SuperOf (r:0 w:100) + // Proof Size summary in bytes: + // Measured: `194 + p * (32 ±0)` + // Estimated: `17726` + // Minimum execution time: 9_562_000 picoseconds. + Weight::from_parts(22_267_810, 0) + .saturating_add(Weight::from_parts(0, 17726)) + // Standard Error: 3_161 + .saturating_add(Weight::from_parts(1_068_419, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + } + /// Storage: Identity SubsOf (r:1 w:1) + /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// Storage: Identity IdentityOf (r:1 w:1) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: Identity SuperOf (r:0 w:100) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) /// The range of component `r` is `[1, 20]`. - /// The range of component `s` is `[1, 100]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `s` is `[0, 100]`. + /// The range of component `x` is `[0, 100]`. fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - Weight::from_ref_time(134_734_000 as u64) - // Standard Error: 181_488 - .saturating_add(Weight::from_ref_time(17_549 as u64).saturating_mul(r as u64)) - // Standard Error: 36_138 - .saturating_add(Weight::from_ref_time(3_066_219 as u64).saturating_mul(s as u64)) - // Standard Error: 36_138 - .saturating_add(Weight::from_ref_time(357_494 as u64).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) - } - // Storage: Identity Registrars (r:1 w:0) - // Storage: Identity IdentityOf (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `469 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` + // Estimated: `17726` + // Minimum execution time: 49_724_000 picoseconds. + Weight::from_parts(28_433_827, 0) + .saturating_add(Weight::from_parts(0, 17726)) + // Standard Error: 7_197 + .saturating_add(Weight::from_parts(45_635, 0).saturating_mul(r.into())) + // Standard Error: 1_405 + .saturating_add(Weight::from_parts(1_055_850, 0).saturating_mul(s.into())) + // Standard Error: 1_405 + .saturating_add(Weight::from_parts(236_616, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) + } + /// Storage: Identity Registrars (r:1 w:0) + /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) + /// Storage: Identity IdentityOf (r:1 w:1) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn request_judgement(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(100_248_000 as u64) - // Standard Error: 72_059 - .saturating_add(Weight::from_ref_time(1_092_731 as u64).saturating_mul(r as u64)) - // Standard Error: 14_389 - .saturating_add(Weight::from_ref_time(794_417 as u64).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Identity IdentityOf (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `367 + r * (57 ±0) + x * (66 ±0)` + // Estimated: `13629` + // Minimum execution time: 30_181_000 picoseconds. + Weight::from_parts(30_036_356, 0) + .saturating_add(Weight::from_parts(0, 13629)) + // Standard Error: 3_733 + .saturating_add(Weight::from_parts(61_015, 0).saturating_mul(r.into())) + // Standard Error: 728 + .saturating_add(Weight::from_parts(464_610, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Identity IdentityOf (r:1 w:1) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn cancel_request(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(90_971_000 as u64) - // Standard Error: 96_191 - .saturating_add(Weight::from_ref_time(930_067 as u64).saturating_mul(r as u64)) - // Standard Error: 19_209 - .saturating_add(Weight::from_ref_time(964_040 as u64).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Identity Registrars (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `398 + x * (66 ±0)` + // Estimated: `11003` + // Minimum execution time: 27_256_000 picoseconds. + Weight::from_parts(27_361_959, 0) + .saturating_add(Weight::from_parts(0, 11003)) + // Standard Error: 4_547 + .saturating_add(Weight::from_parts(40_254, 0).saturating_mul(r.into())) + // Standard Error: 887 + .saturating_add(Weight::from_parts(464_938, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Identity Registrars (r:1 w:1) + /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) /// The range of component `r` is `[1, 19]`. fn set_fee(r: u32, ) -> Weight { - Weight::from_ref_time(22_241_000 as u64) - // Standard Error: 32_562 - .saturating_add(Weight::from_ref_time(1_178_749 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `89 + r * (57 ±0)` + // Estimated: `2626` + // Minimum execution time: 7_479_000 picoseconds. + Weight::from_parts(7_959_876, 0) + .saturating_add(Weight::from_parts(0, 2626)) + // Standard Error: 1_565 + .saturating_add(Weight::from_parts(91_853, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Identity Registrars (r:1 w:1) + /// Storage: Identity Registrars (r:1 w:1) + /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) /// The range of component `r` is `[1, 19]`. fn set_account_id(r: u32, ) -> Weight { - Weight::from_ref_time(21_981_000 as u64) - // Standard Error: 39_161 - .saturating_add(Weight::from_ref_time(1_564_656 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `89 + r * (57 ±0)` + // Estimated: `2626` + // Minimum execution time: 7_750_000 picoseconds. + Weight::from_parts(8_097_434, 0) + .saturating_add(Weight::from_parts(0, 2626)) + // Standard Error: 1_227 + .saturating_add(Weight::from_parts(88_314, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Identity Registrars (r:1 w:1) + /// Storage: Identity Registrars (r:1 w:1) + /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) /// The range of component `r` is `[1, 19]`. fn set_fields(r: u32, ) -> Weight { - Weight::from_ref_time(21_030_000 as u64) - // Standard Error: 36_678 - .saturating_add(Weight::from_ref_time(1_318_767 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Identity Registrars (r:1 w:0) - // Storage: Identity IdentityOf (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `89 + r * (57 ±0)` + // Estimated: `2626` + // Minimum execution time: 7_686_000 picoseconds. + Weight::from_parts(8_176_717, 0) + .saturating_add(Weight::from_parts(0, 2626)) + // Standard Error: 1_152 + .saturating_add(Weight::from_parts(80_559, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Identity Registrars (r:1 w:0) + /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) + /// Storage: Identity IdentityOf (r:1 w:1) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) /// The range of component `r` is `[1, 19]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn provide_judgement(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(79_019_000 as u64) - // Standard Error: 105_407 - .saturating_add(Weight::from_ref_time(723_064 as u64).saturating_mul(r as u64)) - // Standard Error: 19_991 - .saturating_add(Weight::from_ref_time(1_503_360 as u64).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Identity SubsOf (r:1 w:1) - // Storage: Identity IdentityOf (r:1 w:1) - // Storage: System Account (r:2 w:2) - // Storage: Identity SuperOf (r:0 w:100) + // Proof Size summary in bytes: + // Measured: `445 + r * (57 ±0) + x * (66 ±0)` + // Estimated: `13629` + // Minimum execution time: 22_923_000 picoseconds. + Weight::from_parts(22_446_926, 0) + .saturating_add(Weight::from_parts(0, 13629)) + // Standard Error: 6_242 + .saturating_add(Weight::from_parts(93_223, 0).saturating_mul(r.into())) + // Standard Error: 1_155 + .saturating_add(Weight::from_parts(734_993, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Identity SubsOf (r:1 w:1) + /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// Storage: Identity IdentityOf (r:1 w:1) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: Identity SuperOf (r:0 w:100) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) /// The range of component `r` is `[1, 20]`. - /// The range of component `s` is `[1, 100]`. - /// The range of component `x` is `[1, 100]`. - fn kill_identity(_r: u32, s: u32, x: u32, ) -> Weight { - Weight::from_ref_time(168_517_000 as u64) - // Standard Error: 33_697 - .saturating_add(Weight::from_ref_time(3_084_439 as u64).saturating_mul(s as u64)) - // Standard Error: 33_697 - .saturating_add(Weight::from_ref_time(406_067 as u64).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) - } - // Storage: Identity IdentityOf (r:1 w:0) - // Storage: Identity SuperOf (r:1 w:1) - // Storage: Identity SubsOf (r:1 w:1) - /// The range of component `s` is `[1, 99]`. + /// The range of component `s` is `[0, 100]`. + /// The range of component `x` is `[0, 100]`. + fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `676 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` + // Estimated: `21319` + // Minimum execution time: 63_424_000 picoseconds. + Weight::from_parts(43_509_592, 0) + .saturating_add(Weight::from_parts(0, 21319)) + // Standard Error: 6_118 + .saturating_add(Weight::from_parts(34_163, 0).saturating_mul(r.into())) + // Standard Error: 1_194 + .saturating_add(Weight::from_parts(1_058_669, 0).saturating_mul(s.into())) + // Standard Error: 1_194 + .saturating_add(Weight::from_parts(226_324, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) + } + /// Storage: Identity IdentityOf (r:1 w:0) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: Identity SuperOf (r:1 w:1) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: Identity SubsOf (r:1 w:1) + /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// The range of component `s` is `[0, 99]`. fn add_sub(s: u32, ) -> Weight { - Weight::from_ref_time(82_505_000 as u64) - // Standard Error: 19_144 - .saturating_add(Weight::from_ref_time(986_721 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Identity IdentityOf (r:1 w:0) - // Storage: Identity SuperOf (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `475 + s * (36 ±0)` + // Estimated: `21305` + // Minimum execution time: 27_057_000 picoseconds. + Weight::from_parts(31_676_569, 0) + .saturating_add(Weight::from_parts(0, 21305)) + // Standard Error: 1_426 + .saturating_add(Weight::from_parts(59_355, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: Identity IdentityOf (r:1 w:0) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: Identity SuperOf (r:1 w:1) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) /// The range of component `s` is `[1, 100]`. fn rename_sub(s: u32, ) -> Weight { - Weight::from_ref_time(32_521_000 as u64) - // Standard Error: 14_067 - .saturating_add(Weight::from_ref_time(597_418 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Identity IdentityOf (r:1 w:0) - // Storage: Identity SuperOf (r:1 w:1) - // Storage: Identity SubsOf (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `591 + s * (3 ±0)` + // Estimated: `14582` + // Minimum execution time: 12_795_000 picoseconds. + Weight::from_parts(15_135_109, 0) + .saturating_add(Weight::from_parts(0, 14582)) + // Standard Error: 629 + .saturating_add(Weight::from_parts(16_556, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Identity IdentityOf (r:1 w:0) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: Identity SuperOf (r:1 w:1) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: Identity SubsOf (r:1 w:1) + /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) /// The range of component `s` is `[1, 100]`. fn remove_sub(s: u32, ) -> Weight { - Weight::from_ref_time(81_283_000 as u64) - // Standard Error: 22_844 - .saturating_add(Weight::from_ref_time(1_024_883 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Identity SuperOf (r:1 w:1) - // Storage: Identity SubsOf (r:1 w:1) - /// The range of component `s` is `[1, 99]`. + // Proof Size summary in bytes: + // Measured: `638 + s * (35 ±0)` + // Estimated: `21305` + // Minimum execution time: 30_174_000 picoseconds. + Weight::from_parts(36_094_454, 0) + .saturating_add(Weight::from_parts(0, 21305)) + // Standard Error: 1_570 + .saturating_add(Weight::from_parts(50_442, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: Identity SuperOf (r:1 w:1) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: Identity SubsOf (r:1 w:1) + /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// The range of component `s` is `[0, 99]`. fn quit_sub(s: u32, ) -> Weight { - Weight::from_ref_time(61_896_000 as u64) - // Standard Error: 19_817 - .saturating_add(Weight::from_ref_time(850_170 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `564 + s * (37 ±0)` + // Estimated: `10302` + // Minimum execution time: 19_729_000 picoseconds. + Weight::from_parts(22_325_410, 0) + .saturating_add(Weight::from_parts(0, 10302)) + // Standard Error: 975 + .saturating_add(Weight::from_parts(52_068, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/runtime/mainnet/src/weights/pallet_im_online.rs b/runtime/mainnet/src/weights/pallet_im_online.rs index 654c183f..c628e05e 100644 --- a/runtime/mainnet/src/weights/pallet_im_online.rs +++ b/runtime/mainnet/src/weights/pallet_im_online.rs @@ -31,20 +31,32 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_im_online`. pub struct WeightInfo(PhantomData); impl pallet_im_online::WeightInfo for WeightInfo { - // Storage: Session Validators (r:1 w:0) - // Storage: Session CurrentIndex (r:1 w:0) - // Storage: ImOnline ReceivedHeartbeats (r:1 w:1) - // Storage: ImOnline AuthoredBlocks (r:1 w:0) - // Storage: ImOnline Keys (r:1 w:0) + /// Storage: Session Validators (r:1 w:0) + /// Proof Skipped: Session Validators (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Session CurrentIndex (r:1 w:0) + /// Proof Skipped: Session CurrentIndex (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ImOnline Keys (r:1 w:0) + /// Proof: ImOnline Keys (max_values: Some(1), max_size: Some(320002), added: 320497, mode: MaxEncodedLen) + /// Storage: ImOnline ReceivedHeartbeats (r:1 w:1) + /// Proof: ImOnline ReceivedHeartbeats (max_values: None, max_size: Some(10021032), added: 10023507, mode: MaxEncodedLen) + /// Storage: ImOnline AuthoredBlocks (r:1 w:0) + /// Proof: ImOnline AuthoredBlocks (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) /// The range of component `k` is `[1, 1000]`. /// The range of component `e` is `[1, 100]`. fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { - Weight::from_ref_time(272_723_000 as u64) - // Standard Error: 2_277 - .saturating_add(Weight::from_ref_time(54_764 as u64).saturating_mul(k as u64)) - // Standard Error: 22_794 - .saturating_add(Weight::from_ref_time(649_363 as u64).saturating_mul(e as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `361 + k * (32 ±0)` + // Estimated: `10349676 + e * (35 ±0) + k * (64 ±0)` + // Minimum execution time: 91_159_000 picoseconds. + Weight::from_parts(74_157_856, 0) + .saturating_add(Weight::from_parts(0, 10349676)) + // Standard Error: 275 + .saturating_add(Weight::from_parts(20_308, 0).saturating_mul(k.into())) + // Standard Error: 2_777 + .saturating_add(Weight::from_parts(387_445, 0).saturating_mul(e.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 35).saturating_mul(e.into())) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(k.into())) } } diff --git a/runtime/mainnet/src/weights/pallet_membership.rs b/runtime/mainnet/src/weights/pallet_membership.rs index 2f59ad46..4ab03797 100644 --- a/runtime/mainnet/src/weights/pallet_membership.rs +++ b/runtime/mainnet/src/weights/pallet_membership.rs @@ -31,88 +31,158 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_membership`. pub struct WeightInfo(PhantomData); impl pallet_membership::WeightInfo for WeightInfo { - // Storage: TechnicalMembership Members (r:1 w:1) - // Storage: TechnicalCommittee Proposals (r:1 w:0) - // Storage: TechnicalCommittee Members (r:0 w:1) - // Storage: TechnicalCommittee Prime (r:0 w:1) + /// Storage: TechnicalMembership Members (r:1 w:1) + /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Proposals (r:1 w:0) + /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalCommittee Members (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalCommittee Prime (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[1, 99]`. fn add_member(m: u32, ) -> Weight { - Weight::from_ref_time(46_387_000 as u64) - // Standard Error: 14_163 - .saturating_add(Weight::from_ref_time(531_530 as u64).saturating_mul(m as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `208 + m * (64 ±0)` + // Estimated: `6793 + m * (192 ±0)` + // Minimum execution time: 15_847_000 picoseconds. + Weight::from_parts(16_597_325, 0) + .saturating_add(Weight::from_parts(0, 6793)) + // Standard Error: 411 + .saturating_add(Weight::from_parts(35_801, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into())) } - // Storage: TechnicalMembership Members (r:1 w:1) - // Storage: TechnicalCommittee Proposals (r:1 w:0) - // Storage: TechnicalMembership Prime (r:1 w:0) - // Storage: TechnicalCommittee Members (r:0 w:1) - // Storage: TechnicalCommittee Prime (r:0 w:1) + /// Storage: TechnicalMembership Members (r:1 w:1) + /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Proposals (r:1 w:0) + /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalMembership Prime (r:1 w:0) + /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Members (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalCommittee Prime (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[2, 100]`. fn remove_member(m: u32, ) -> Weight { - Weight::from_ref_time(50_124_000 as u64) - // Standard Error: 20_678 - .saturating_add(Weight::from_ref_time(431_643 as u64).saturating_mul(m as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `312 + m * (64 ±0)` + // Estimated: `8622 + m * (192 ±0)` + // Minimum execution time: 18_412_000 picoseconds. + Weight::from_parts(19_251_698, 0) + .saturating_add(Weight::from_parts(0, 8622)) + // Standard Error: 474 + .saturating_add(Weight::from_parts(32_206, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into())) } - // Storage: TechnicalMembership Members (r:1 w:1) - // Storage: TechnicalCommittee Proposals (r:1 w:0) - // Storage: TechnicalMembership Prime (r:1 w:0) - // Storage: TechnicalCommittee Members (r:0 w:1) - // Storage: TechnicalCommittee Prime (r:0 w:1) + /// Storage: TechnicalMembership Members (r:1 w:1) + /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Proposals (r:1 w:0) + /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalMembership Prime (r:1 w:0) + /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Members (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalCommittee Prime (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[2, 100]`. fn swap_member(m: u32, ) -> Weight { - Weight::from_ref_time(49_763_000 as u64) - // Standard Error: 18_354 - .saturating_add(Weight::from_ref_time(378_642 as u64).saturating_mul(m as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `312 + m * (64 ±0)` + // Estimated: `8622 + m * (192 ±0)` + // Minimum execution time: 18_502_000 picoseconds. + Weight::from_parts(19_583_888, 0) + .saturating_add(Weight::from_parts(0, 8622)) + // Standard Error: 619 + .saturating_add(Weight::from_parts(44_408, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into())) } - // Storage: TechnicalMembership Members (r:1 w:1) - // Storage: TechnicalCommittee Proposals (r:1 w:0) - // Storage: TechnicalMembership Prime (r:1 w:0) - // Storage: TechnicalCommittee Members (r:0 w:1) - // Storage: TechnicalCommittee Prime (r:0 w:1) + /// Storage: TechnicalMembership Members (r:1 w:1) + /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Proposals (r:1 w:0) + /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalMembership Prime (r:1 w:0) + /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Members (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalCommittee Prime (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[1, 100]`. fn reset_member(m: u32, ) -> Weight { - Weight::from_ref_time(52_138_000 as u64) - // Standard Error: 18_079 - .saturating_add(Weight::from_ref_time(627_791 as u64).saturating_mul(m as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `312 + m * (64 ±0)` + // Estimated: `8622 + m * (192 ±0)` + // Minimum execution time: 18_088_000 picoseconds. + Weight::from_parts(19_292_324, 0) + .saturating_add(Weight::from_parts(0, 8622)) + // Standard Error: 759 + .saturating_add(Weight::from_parts(162_348, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into())) } - // Storage: TechnicalMembership Members (r:1 w:1) - // Storage: TechnicalCommittee Proposals (r:1 w:0) - // Storage: TechnicalMembership Prime (r:1 w:1) - // Storage: TechnicalCommittee Members (r:0 w:1) - // Storage: TechnicalCommittee Prime (r:0 w:1) + /// Storage: TechnicalMembership Members (r:1 w:1) + /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Proposals (r:1 w:0) + /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalMembership Prime (r:1 w:1) + /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Members (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalCommittee Prime (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[1, 100]`. fn change_key(m: u32, ) -> Weight { - Weight::from_ref_time(54_302_000 as u64) - // Standard Error: 13_173 - .saturating_add(Weight::from_ref_time(319_372 as u64).saturating_mul(m as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Proof Size summary in bytes: + // Measured: `312 + m * (64 ±0)` + // Estimated: `8622 + m * (192 ±0)` + // Minimum execution time: 19_134_000 picoseconds. + Weight::from_parts(20_242_466, 0) + .saturating_add(Weight::from_parts(0, 8622)) + // Standard Error: 962 + .saturating_add(Weight::from_parts(47_779, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into())) } - // Storage: TechnicalMembership Members (r:1 w:0) - // Storage: TechnicalMembership Prime (r:0 w:1) - // Storage: TechnicalCommittee Prime (r:0 w:1) + /// Storage: TechnicalMembership Members (r:1 w:0) + /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: TechnicalMembership Prime (r:0 w:1) + /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Prime (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[1, 100]`. fn set_prime(m: u32, ) -> Weight { - Weight::from_ref_time(19_036_000 as u64) - // Standard Error: 4_846 - .saturating_add(Weight::from_ref_time(133_389 as u64).saturating_mul(m as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `32 + m * (32 ±0)` + // Estimated: `4719 + m * (32 ±0)` + // Minimum execution time: 6_726_000 picoseconds. + Weight::from_parts(6_966_055, 0) + .saturating_add(Weight::from_parts(0, 4719)) + // Standard Error: 255 + .saturating_add(Weight::from_parts(13_950, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } - // Storage: TechnicalMembership Prime (r:0 w:1) - // Storage: TechnicalCommittee Prime (r:0 w:1) + /// Storage: TechnicalMembership Prime (r:0 w:1) + /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Prime (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[1, 100]`. fn clear_prime(m: u32, ) -> Weight { - Weight::from_ref_time(11_531_000 as u64) - // Standard Error: 3_962 - .saturating_add(Weight::from_ref_time(124_828 as u64).saturating_mul(m as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_010_000 picoseconds. + Weight::from_parts(3_196_429, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 78 + .saturating_add(Weight::from_parts(471, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/runtime/mainnet/src/weights/pallet_multisig.rs b/runtime/mainnet/src/weights/pallet_multisig.rs index dfdb5f98..c6232944 100644 --- a/runtime/mainnet/src/weights/pallet_multisig.rs +++ b/runtime/mainnet/src/weights/pallet_multisig.rs @@ -33,81 +33,114 @@ pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 10000]`. fn as_multi_threshold_1(z: u32, ) -> Weight { - // Minimum execution time: 20_283 nanoseconds. - Weight::from_ref_time(20_861_089 as u64) - // Standard Error: 5 - .saturating_add(Weight::from_ref_time(583 as u64).saturating_mul(z as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 11_823_000 picoseconds. + Weight::from_parts(12_266_007, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 2 + .saturating_add(Weight::from_parts(498, 0).saturating_mul(z.into())) } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// Storage: Multisig Multisigs (r:1 w:1) + /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 52_699 nanoseconds. - Weight::from_ref_time(40_874_603 as u64) - // Standard Error: 546 - .saturating_add(Weight::from_ref_time(131_727 as u64).saturating_mul(s as u64)) - // Standard Error: 5 - .saturating_add(Weight::from_ref_time(1_537 as u64).saturating_mul(z as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `301 + s * (2 ±0)` + // Estimated: `6811` + // Minimum execution time: 36_427_000 picoseconds. + Weight::from_parts(31_400_908, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 650 + .saturating_add(Weight::from_parts(54_330, 0).saturating_mul(s.into())) + // Standard Error: 6 + .saturating_add(Weight::from_parts(1_198, 0).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Multisig Multisigs (r:1 w:1) + /// Storage: Multisig Multisigs (r:1 w:1) + /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 39_843 nanoseconds. - Weight::from_ref_time(28_912_325 as u64) - // Standard Error: 734 - .saturating_add(Weight::from_ref_time(125_761 as u64).saturating_mul(s as u64)) - // Standard Error: 7 - .saturating_add(Weight::from_ref_time(1_542 as u64).saturating_mul(z as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `320` + // Estimated: `6811` + // Minimum execution time: 26_513_000 picoseconds. + Weight::from_parts(21_729_726, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 412 + .saturating_add(Weight::from_parts(54_766, 0).saturating_mul(s.into())) + // Standard Error: 4 + .saturating_add(Weight::from_parts(1_190, 0).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: System Account (r:1 w:1) + /// Storage: Multisig Multisigs (r:1 w:1) + /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 54_980 nanoseconds. - Weight::from_ref_time(42_087_213 as u64) - // Standard Error: 786 - .saturating_add(Weight::from_ref_time(153_935 as u64).saturating_mul(s as u64)) - // Standard Error: 7 - .saturating_add(Weight::from_ref_time(1_545 as u64).saturating_mul(z as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `426 + s * (33 ±0)` + // Estimated: `10404` + // Minimum execution time: 44_380_000 picoseconds. + Weight::from_parts(35_396_612, 0) + .saturating_add(Weight::from_parts(0, 10404)) + // Standard Error: 1_363 + .saturating_add(Weight::from_parts(95_216, 0).saturating_mul(s.into())) + // Standard Error: 13 + .saturating_add(Weight::from_parts(1_264, 0).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// Storage: Multisig Multisigs (r:1 w:1) + /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { - // Minimum execution time: 37_802 nanoseconds. - Weight::from_ref_time(39_933_623 as u64) - // Standard Error: 1_059 - .saturating_add(Weight::from_ref_time(121_891 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `301 + s * (2 ±0)` + // Estimated: `6811` + // Minimum execution time: 27_881_000 picoseconds. + Weight::from_parts(29_392_537, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 647 + .saturating_add(Weight::from_parts(63_287, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Multisig Multisigs (r:1 w:1) + /// Storage: Multisig Multisigs (r:1 w:1) + /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32, ) -> Weight { - // Minimum execution time: 25_738 nanoseconds. - Weight::from_ref_time(27_676_766 as u64) - // Standard Error: 710 - .saturating_add(Weight::from_ref_time(125_733 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `320` + // Estimated: `6811` + // Minimum execution time: 18_831_000 picoseconds. + Weight::from_parts(20_022_948, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 709 + .saturating_add(Weight::from_parts(57_318, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Multisig Multisigs (r:1 w:1) + /// Storage: Multisig Multisigs (r:1 w:1) + /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { - // Minimum execution time: 36_591 nanoseconds. - Weight::from_ref_time(38_707_543 as u64) - // Standard Error: 881 - .saturating_add(Weight::from_ref_time(126_198 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `492 + s * (1 ±0)` + // Estimated: `6811` + // Minimum execution time: 29_105_000 picoseconds. + Weight::from_parts(30_739_462, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 1_473 + .saturating_add(Weight::from_parts(90_499, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } -} +} \ No newline at end of file diff --git a/runtime/mainnet/src/weights/pallet_preimage.rs b/runtime/mainnet/src/weights/pallet_preimage.rs index 79215e78..e5c37853 100644 --- a/runtime/mainnet/src/weights/pallet_preimage.rs +++ b/runtime/mainnet/src/weights/pallet_preimage.rs @@ -31,92 +31,169 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_preimage`. pub struct WeightInfo(PhantomData); impl pallet_preimage::WeightInfo for WeightInfo { - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Preimage PreimageFor (r:0 w:1) + /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(65_062_000 as u64) - // Standard Error: 16 - .saturating_add(Weight::from_ref_time(4_599 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `143` + // Estimated: `3556` + // Minimum execution time: 24_877_000 picoseconds. + Weight::from_parts(25_117_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_971, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:0) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Preimage PreimageFor (r:0 w:1) + /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) /// The range of component `s` is `[0, 4194304]`. fn note_requested_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(44_613_000 as u64) - // Standard Error: 13 - .saturating_add(Weight::from_ref_time(4_542 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `106` + // Estimated: `3556` + // Minimum execution time: 15_956_000 picoseconds. + Weight::from_parts(16_228_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_971, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:0) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Preimage PreimageFor (r:0 w:1) + /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) /// The range of component `s` is `[0, 4194304]`. fn note_no_deposit_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(63_439_000 as u64) - // Standard Error: 14 - .saturating_add(Weight::from_ref_time(4_610 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `106` + // Estimated: `3556` + // Minimum execution time: 15_423_000 picoseconds. + Weight::from_parts(15_623_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_971, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Preimage PreimageFor (r:0 w:1) + /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) fn unnote_preimage() -> Weight { - Weight::from_ref_time(167_656_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `289` + // Estimated: `3556` + // Minimum execution time: 32_025_000 picoseconds. + Weight::from_parts(33_010_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Preimage PreimageFor (r:0 w:1) + /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) fn unnote_no_deposit_preimage() -> Weight { - Weight::from_ref_time(129_424_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `144` + // Estimated: `3556` + // Minimum execution time: 20_745_000 picoseconds. + Weight::from_parts(22_025_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Preimage StatusFor (r:1 w:1) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn request_preimage() -> Weight { - Weight::from_ref_time(159_789_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `188` + // Estimated: `3556` + // Minimum execution time: 18_566_000 picoseconds. + Weight::from_parts(19_645_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Preimage StatusFor (r:1 w:1) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn request_no_deposit_preimage() -> Weight { - Weight::from_ref_time(123_092_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `144` + // Estimated: `3556` + // Minimum execution time: 11_425_000 picoseconds. + Weight::from_parts(11_921_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Preimage StatusFor (r:1 w:1) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn request_unnoted_preimage() -> Weight { - Weight::from_ref_time(74_920_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `3556` + // Minimum execution time: 12_917_000 picoseconds. + Weight::from_parts(13_742_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Preimage StatusFor (r:1 w:1) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn request_requested_preimage() -> Weight { - Weight::from_ref_time(25_368_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `106` + // Estimated: `3556` + // Minimum execution time: 7_930_000 picoseconds. + Weight::from_parts(8_153_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Preimage PreimageFor (r:0 w:1) + /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) fn unrequest_preimage() -> Weight { - Weight::from_ref_time(132_460_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `144` + // Estimated: `3556` + // Minimum execution time: 19_533_000 picoseconds. + Weight::from_parts(20_256_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn unrequest_unnoted_preimage() -> Weight { - Weight::from_ref_time(76_764_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `106` + // Estimated: `3556` + // Minimum execution time: 7_840_000 picoseconds. + Weight::from_parts(8_014_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Preimage StatusFor (r:1 w:1) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn unrequest_multi_referenced_preimage() -> Weight { - Weight::from_ref_time(28_915_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `106` + // Estimated: `3556` + // Minimum execution time: 7_650_000 picoseconds. + Weight::from_parts(8_032_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/mainnet/src/weights/pallet_scheduler.rs b/runtime/mainnet/src/weights/pallet_scheduler.rs index d4a8113c..10b34cd0 100644 --- a/runtime/mainnet/src/weights/pallet_scheduler.rs +++ b/runtime/mainnet/src/weights/pallet_scheduler.rs @@ -31,86 +31,160 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_scheduler`. pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { - // Storage: Scheduler IncompleteSince (r:1 w:1) + /// Storage: Scheduler IncompleteSince (r:1 w:1) + /// Proof: Scheduler IncompleteSince (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn service_agendas_base() -> Weight { - Weight::from_ref_time(4_992_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `69` + // Estimated: `1489` + // Minimum execution time: 3_952_000 picoseconds. + Weight::from_parts(4_041_000, 0) + .saturating_add(Weight::from_parts(0, 1489)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Scheduler Agenda (r:1 w:1) - /// The range of component `s` is `[0, 512]`. + /// Storage: Scheduler Agenda (r:1 w:1) + /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) + /// The range of component `s` is `[0, 50]`. fn service_agenda_base(s: u32, ) -> Weight { - Weight::from_ref_time(4_320_000 as u64) - // Standard Error: 619 - .saturating_add(Weight::from_ref_time(336_713 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `116 + s * (177 ±0)` + // Estimated: `42428` + // Minimum execution time: 3_546_000 picoseconds. + Weight::from_parts(6_896_089, 0) + .saturating_add(Weight::from_parts(0, 42428)) + // Standard Error: 2_110 + .saturating_add(Weight::from_parts(751_504, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } fn service_task_base() -> Weight { - Weight::from_ref_time(10_864_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_524_000 picoseconds. + Weight::from_parts(5_697_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) + /// Storage: Preimage PreimageFor (r:1 w:1) + /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: Measured) + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// The range of component `s` is `[128, 4194304]`. fn service_task_fetched(s: u32, ) -> Weight { - Weight::from_ref_time(24_586_000 as u64) + // Proof Size summary in bytes: + // Measured: `179 + s * (1 ±0)` + // Estimated: `7200 + s * (1 ±0)` + // Minimum execution time: 18_739_000 picoseconds. + Weight::from_parts(18_916_000, 0) + .saturating_add(Weight::from_parts(0, 7200)) // Standard Error: 1 - .saturating_add(Weight::from_ref_time(1_138 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(Weight::from_parts(1_168, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into())) } - // Storage: Scheduler Lookup (r:0 w:1) + /// Storage: Scheduler Lookup (r:0 w:1) + /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) fn service_task_named() -> Weight { - Weight::from_ref_time(13_127_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_343_000 picoseconds. + Weight::from_parts(7_519_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } fn service_task_periodic() -> Weight { - Weight::from_ref_time(11_053_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_531_000 picoseconds. + Weight::from_parts(5_699_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } fn execute_dispatch_signed() -> Weight { - Weight::from_ref_time(4_158_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_918_000 picoseconds. + Weight::from_parts(3_037_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } fn execute_dispatch_unsigned() -> Weight { - Weight::from_ref_time(4_104_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_941_000 picoseconds. + Weight::from_parts(3_034_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - // Storage: Scheduler Agenda (r:1 w:1) - /// The range of component `s` is `[0, 511]`. + /// Storage: Scheduler Agenda (r:1 w:1) + /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) + /// The range of component `s` is `[0, 49]`. fn schedule(s: u32, ) -> Weight { - Weight::from_ref_time(20_074_000 as u64) - // Standard Error: 765 - .saturating_add(Weight::from_ref_time(343_285 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `116 + s * (177 ±0)` + // Estimated: `42428` + // Minimum execution time: 14_269_000 picoseconds. + Weight::from_parts(17_390_869, 0) + .saturating_add(Weight::from_parts(0, 42428)) + // Standard Error: 2_065 + .saturating_add(Weight::from_parts(738_805, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - /// The range of component `s` is `[1, 512]`. + /// Storage: Scheduler Agenda (r:1 w:1) + /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) + /// Storage: Scheduler Lookup (r:0 w:1) + /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// The range of component `s` is `[1, 50]`. fn cancel(s: u32, ) -> Weight { - Weight::from_ref_time(21_509_000 as u64) - // Standard Error: 708 - .saturating_add(Weight::from_ref_time(323_013 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `116 + s * (177 ±0)` + // Estimated: `42428` + // Minimum execution time: 18_261_000 picoseconds. + Weight::from_parts(17_908_720, 0) + .saturating_add(Weight::from_parts(0, 42428)) + // Standard Error: 2_214 + .saturating_add(Weight::from_parts(1_318_747, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - /// The range of component `s` is `[0, 511]`. + /// Storage: Scheduler Lookup (r:1 w:1) + /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// Storage: Scheduler Agenda (r:1 w:1) + /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) + /// The range of component `s` is `[0, 49]`. fn schedule_named(s: u32, ) -> Weight { - Weight::from_ref_time(22_427_000 as u64) - // Standard Error: 850 - .saturating_add(Weight::from_ref_time(357_265 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `293 + s * (185 ±0)` + // Estimated: `45941` + // Minimum execution time: 16_924_000 picoseconds. + Weight::from_parts(21_290_922, 0) + .saturating_add(Weight::from_parts(0, 45941)) + // Standard Error: 3_117 + .saturating_add(Weight::from_parts(771_166, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - /// The range of component `s` is `[1, 512]`. + /// Storage: Scheduler Lookup (r:1 w:1) + /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// Storage: Scheduler Agenda (r:1 w:1) + /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) + /// The range of component `s` is `[1, 50]`. fn cancel_named(s: u32, ) -> Weight { - Weight::from_ref_time(22_875_000 as u64) - // Standard Error: 693 - .saturating_add(Weight::from_ref_time(336_643 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `319 + s * (185 ±0)` + // Estimated: `45941` + // Minimum execution time: 19_236_000 picoseconds. + Weight::from_parts(19_949_783, 0) + .saturating_add(Weight::from_parts(0, 45941)) + // Standard Error: 2_288 + .saturating_add(Weight::from_parts(1_338_921, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } } + diff --git a/runtime/mainnet/src/weights/pallet_session.rs b/runtime/mainnet/src/weights/pallet_session.rs index b1d17c34..71491e44 100644 --- a/runtime/mainnet/src/weights/pallet_session.rs +++ b/runtime/mainnet/src/weights/pallet_session.rs @@ -31,20 +31,36 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_session`. pub struct WeightInfo(PhantomData); impl pallet_session::WeightInfo for WeightInfo { - // Storage: Staking Ledger (r:1 w:0) - // Storage: Session NextKeys (r:1 w:1) - // Storage: Session KeyOwner (r:4 w:4) + /// Storage: Staking Ledger (r:1 w:0) + /// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen) + /// Storage: Session NextKeys (r:1 w:1) + /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) + /// Storage: Session KeyOwner (r:6 w:6) + /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn set_keys() -> Weight { - Weight::from_ref_time(172_626_000 as u64) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Proof Size summary in bytes: + // Measured: `2083` + // Estimated: `28027` + // Minimum execution time: 51_544_000 picoseconds. + Weight::from_parts(52_127_000, 0) + .saturating_add(Weight::from_parts(0, 28027)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(7)) } - // Storage: Staking Ledger (r:1 w:0) - // Storage: Session NextKeys (r:1 w:1) - // Storage: Session KeyOwner (r:0 w:4) + /// Storage: Staking Ledger (r:1 w:0) + /// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen) + /// Storage: Session NextKeys (r:1 w:1) + /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) + /// Storage: Session KeyOwner (r:0 w:6) + /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn purge_keys() -> Weight { - Weight::from_ref_time(192_632_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Proof Size summary in bytes: + // Measured: `1947` + // Estimated: `11915` + // Minimum execution time: 37_019_000 picoseconds. + Weight::from_parts(37_594_000, 0) + .saturating_add(Weight::from_parts(0, 11915)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(7)) } -} +} \ No newline at end of file diff --git a/runtime/mainnet/src/weights/pallet_timestamp.rs b/runtime/mainnet/src/weights/pallet_timestamp.rs index 71f31fc3..2e1230d0 100644 --- a/runtime/mainnet/src/weights/pallet_timestamp.rs +++ b/runtime/mainnet/src/weights/pallet_timestamp.rs @@ -24,21 +24,32 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] - use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_timestamp`. pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { - // Storage: Timestamp Now (r:1 w:1) - // Storage: Babe CurrentSlot (r:1 w:0) + /// Storage: Timestamp Now (r:1 w:1) + /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: Babe CurrentSlot (r:1 w:0) + /// Proof: Babe CurrentSlot (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) fn set() -> Weight { - Weight::from_ref_time(23_405_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `345` + // Estimated: `2986` + // Minimum execution time: 9_159_000 picoseconds. + Weight::from_parts(9_663_000, 0) + .saturating_add(Weight::from_parts(0, 2986)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } fn on_finalize() -> Weight { - Weight::from_ref_time(10_480_000 as u64) + // Proof Size summary in bytes: + // Measured: `128` + // Estimated: `0` + // Minimum execution time: 3_803_000 picoseconds. + Weight::from_parts(4_007_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/runtime/mainnet/src/weights/pallet_treasury.rs b/runtime/mainnet/src/weights/pallet_treasury.rs index ad153e53..976e8a0b 100644 --- a/runtime/mainnet/src/weights/pallet_treasury.rs +++ b/runtime/mainnet/src/weights/pallet_treasury.rs @@ -31,50 +31,105 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_treasury`. pub struct WeightInfo(PhantomData); impl pallet_treasury::WeightInfo for WeightInfo { + /// Storage: Treasury ProposalCount (r:1 w:1) + /// Proof: Treasury ProposalCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + /// Storage: Treasury Proposals (r:0 w:1) + /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn spend() -> Weight { - Weight::from_ref_time(781_000 as u64) + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `3376` + // Minimum execution time: 14_516_000 picoseconds. + Weight::from_parts(14_898_000, 0) + .saturating_add(Weight::from_parts(0, 3376)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: Treasury ProposalCount (r:1 w:1) - // Storage: Treasury Proposals (r:0 w:1) + /// Storage: Treasury ProposalCount (r:1 w:1) + /// Proof: Treasury ProposalCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Treasury Proposals (r:0 w:1) + /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn propose_spend() -> Weight { - Weight::from_ref_time(107_363_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `107` + // Estimated: `1489` + // Minimum execution time: 21_971_000 picoseconds. + Weight::from_parts(22_591_000, 0) + .saturating_add(Weight::from_parts(0, 1489)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Treasury Proposals (r:1 w:1) - // Storage: System Account (r:2 w:2) + /// Storage: Treasury Proposals (r:1 w:1) + /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn reject_proposal() -> Weight { - Weight::from_ref_time(139_031_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `265` + // Estimated: `7166` + // Minimum execution time: 34_087_000 picoseconds. + Weight::from_parts(34_367_000, 0) + .saturating_add(Weight::from_parts(0, 7166)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Treasury Proposals (r:1 w:0) - // Storage: Treasury Approvals (r:1 w:1) + /// Storage: Treasury Proposals (r:1 w:0) + /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) /// The range of component `p` is `[0, 99]`. fn approve_proposal(p: u32, ) -> Weight { - Weight::from_ref_time(27_943_000 as u64) - // Standard Error: 14_760 - .saturating_add(Weight::from_ref_time(1_185_423 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `433 + p * (8 ±0)` + // Estimated: `5460` + // Minimum execution time: 9_511_000 picoseconds. + Weight::from_parts(12_247_904, 0) + .saturating_add(Weight::from_parts(0, 5460)) + // Standard Error: 903 + .saturating_add(Weight::from_parts(28_147, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Treasury Approvals (r:1 w:1) + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) fn remove_approval() -> Weight { - Weight::from_ref_time(26_049_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `90` + // Estimated: `1887` + // Minimum execution time: 6_948_000 picoseconds. + Weight::from_parts(7_162_000, 0) + .saturating_add(Weight::from_parts(0, 1887)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: System Account (r:1 w:0) - // Storage: Treasury Approvals (r:1 w:1) - // Storage: Treasury Proposals (r:2 w:2) + /// Storage: Treasury Deactivated (r:1 w:1) + /// Proof: Treasury Deactivated (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// Storage: Balances InactiveIssuance (r:1 w:1) + /// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + /// Storage: Treasury Proposals (r:100 w:100) + /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + /// Storage: System Account (r:201 w:201) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: Bounties BountyApprovals (r:1 w:1) + /// Proof: Bounties BountyApprovals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) /// The range of component `p` is `[0, 100]`. fn on_initialize_proposals(p: u32, ) -> Weight { - Weight::from_ref_time(71_013_000 as u64) - // Standard Error: 406_839 - .saturating_add(Weight::from_ref_time(78_758_389 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(p as u64))) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(p as u64))) + // Proof Size summary in bytes: + // Measured: `297 + p * (251 ±0)` + // Estimated: `11359 + p * (7789 ±0)` + // Minimum execution time: 57_179_000 picoseconds. + Weight::from_parts(61_547_634, 0) + .saturating_add(Weight::from_parts(0, 11359)) + // Standard Error: 30_382 + .saturating_add(Weight::from_parts(32_012_031, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(5)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 7789).saturating_mul(p.into())) } } diff --git a/runtime/mainnet/src/weights/pallet_utility.rs b/runtime/mainnet/src/weights/pallet_utility.rs index b91e73d5..8618b1a4 100644 --- a/runtime/mainnet/src/weights/pallet_utility.rs +++ b/runtime/mainnet/src/weights/pallet_utility.rs @@ -33,26 +33,51 @@ pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - Weight::from_ref_time(34_244_000 as u64) - // Standard Error: 59_938 - .saturating_add(Weight::from_ref_time(10_147_060 as u64).saturating_mul(c as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_159_000 picoseconds. + Weight::from_parts(13_044_055, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 2_765 + .saturating_add(Weight::from_parts(4_553_907, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { - Weight::from_ref_time(15_379_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_562_000 picoseconds. + Weight::from_parts(5_752_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - Weight::from_ref_time(42_379_000 as u64) - // Standard Error: 54_382 - .saturating_add(Weight::from_ref_time(10_198_805 as u64).saturating_mul(c as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_939_000 picoseconds. + Weight::from_parts(16_867_349, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 3_809 + .saturating_add(Weight::from_parts(4_848_850, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { - Weight::from_ref_time(32_541_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 9_243_000 picoseconds. + Weight::from_parts(9_507_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - Weight::from_ref_time(27_612_000 as u64) - // Standard Error: 53_425 - .saturating_add(Weight::from_ref_time(9_801_342 as u64).saturating_mul(c as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_958_000 picoseconds. + Weight::from_parts(14_931_896, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 3_015 + .saturating_add(Weight::from_parts(4_565_357, 0).saturating_mul(c.into())) } } diff --git a/runtime/mainnet/src/weights/ternoa_auction.rs b/runtime/mainnet/src/weights/ternoa_auction.rs index f338b6d1..9fc733c8 100644 --- a/runtime/mainnet/src/weights/ternoa_auction.rs +++ b/runtime/mainnet/src/weights/ternoa_auction.rs @@ -37,22 +37,22 @@ impl ternoa_auction::WeightInfo for WeightInfo { // Storage: Auction Auctions (r:0 w:1) /// The range of component `s` is `[0, 999998]`. fn create_auction(s: u32, ) -> Weight { - Weight::from_ref_time(107_323_000 as u64) + Weight::from_parts(107_323_000 , 0) // Standard Error: 109 - .saturating_add(Weight::from_ref_time(34_273 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + .saturating_add(Weight::from_parts(34_273 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: NFT Nfts (r:1 w:1) // Storage: Auction Auctions (r:1 w:1) // Storage: Auction Deadlines (r:1 w:1) /// The range of component `s` is `[0, 999999]`. fn cancel_auction(s: u32, ) -> Weight { - Weight::from_ref_time(69_049_000 as u64) + Weight::from_parts(69_049_000 , 0) // Standard Error: 64 - .saturating_add(Weight::from_ref_time(31_779 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + .saturating_add(Weight::from_parts(31_779 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: NFT Nfts (r:1 w:1) // Storage: Auction Auctions (r:1 w:1) @@ -62,31 +62,31 @@ impl ternoa_auction::WeightInfo for WeightInfo { // Storage: Auction Deadlines (r:1 w:1) /// The range of component `s` is `[0, 999999]`. fn end_auction(s: u32, ) -> Weight { - Weight::from_ref_time(138_922_000 as u64) + Weight::from_parts(138_922_000 , 0) // Standard Error: 65 - .saturating_add(Weight::from_ref_time(30_873 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(8 as u64)) - .saturating_add(T::DbWeight::get().writes(7 as u64)) + .saturating_add(Weight::from_parts(30_873 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(7)) } // Storage: Auction Auctions (r:1 w:1) // Storage: System Account (r:2 w:2) /// The range of component `s` is `[0, 24]`. fn add_bid(s: u32, ) -> Weight { - Weight::from_ref_time(91_723_000 as u64) + Weight::from_parts(91_723_000 , 0) // Standard Error: 72_254 - .saturating_add(Weight::from_ref_time(2_031_189 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + .saturating_add(Weight::from_parts(2_031_189 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: Auction Auctions (r:1 w:1) // Storage: System Account (r:2 w:2) /// The range of component `s` is `[0, 24]`. fn remove_bid(s: u32, ) -> Weight { - Weight::from_ref_time(88_275_000 as u64) + Weight::from_parts(88_275_000 , 0) // Standard Error: 65_530 - .saturating_add(Weight::from_ref_time(1_283_005 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + .saturating_add(Weight::from_parts(1_283_005 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: NFT Nfts (r:1 w:1) // Storage: Auction Auctions (r:1 w:1) @@ -95,17 +95,17 @@ impl ternoa_auction::WeightInfo for WeightInfo { // Storage: Auction Deadlines (r:1 w:1) /// The range of component `s` is `[0, 999999]`. fn buy_it_now(s: u32, ) -> Weight { - Weight::from_ref_time(152_217_000 as u64) + Weight::from_parts(152_217_000 , 0) // Standard Error: 86 - .saturating_add(Weight::from_ref_time(32_130 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + .saturating_add(Weight::from_parts(32_130 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Auction Claims (r:1 w:1) // Storage: System Account (r:2 w:2) fn claim() -> Weight { - Weight::from_ref_time(123_441_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + Weight::from_parts(123_441_000 , 0) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } } diff --git a/runtime/mainnet/src/weights/ternoa_bridge.rs b/runtime/mainnet/src/weights/ternoa_bridge.rs index 8ce8e321..99c420c0 100644 --- a/runtime/mainnet/src/weights/ternoa_bridge.rs +++ b/runtime/mainnet/src/weights/ternoa_bridge.rs @@ -33,46 +33,46 @@ pub struct WeightInfo(PhantomData); impl ternoa_bridge::WeightInfo for WeightInfo { // Storage: Bridge RelayerVoteThreshold (r:0 w:1) fn set_threshold() -> Weight { - Weight::from_ref_time(34_063_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(34_063_000 , 0) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Bridge ChainNonces (r:1 w:1) fn add_chain() -> Weight { - Weight::from_ref_time(52_018_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(52_018_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Bridge Relayers (r:0 w:1) fn set_relayers() -> Weight { - Weight::from_ref_time(44_643_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(44_643_000 , 0) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Bridge Relayers (r:1 w:0) // Storage: Bridge ChainNonces (r:1 w:0) // Storage: Bridge RelayerVoteThreshold (r:1 w:0) // Storage: Bridge Votes (r:1 w:1) fn vote_for_proposal() -> Weight { - Weight::from_ref_time(57_488_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(57_488_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Bridge BridgeFee (r:1 w:0) // Storage: Bridge ChainNonces (r:1 w:1) // Storage: System Account (r:2 w:2) fn deposit() -> Weight { - Weight::from_ref_time(178_516_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + Weight::from_parts(178_516_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: Bridge BridgeFee (r:0 w:1) fn set_bridge_fee() -> Weight { - Weight::from_ref_time(34_004_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(34_004_000 , 0) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Bridge ChainNonces (r:1 w:1) fn set_deposit_nonce() -> Weight { - Weight::from_ref_time(66_546_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(66_546_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/mainnet/src/weights/ternoa_marketplace.rs b/runtime/mainnet/src/weights/ternoa_marketplace.rs index 70893265..c5145dc4 100644 --- a/runtime/mainnet/src/weights/ternoa_marketplace.rs +++ b/runtime/mainnet/src/weights/ternoa_marketplace.rs @@ -36,55 +36,55 @@ impl ternoa_marketplace::WeightInfo for WeightInfo { // Storage: Marketplace NextMarketplaceId (r:1 w:1) // Storage: Marketplace Marketplaces (r:0 w:1) fn create_marketplace() -> Weight { - Weight::from_ref_time(125_957_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + Weight::from_parts(125_957_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) } // Storage: Marketplace Marketplaces (r:1 w:1) fn set_marketplace_owner() -> Weight { - Weight::from_ref_time(82_786_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(82_786_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Marketplace Marketplaces (r:1 w:1) fn set_marketplace_kind() -> Weight { - Weight::from_ref_time(81_393_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(81_393_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Marketplace Marketplaces (r:1 w:1) fn set_marketplace_configuration() -> Weight { - Weight::from_ref_time(139_403_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(139_403_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Marketplace MarketplaceMintFee (r:0 w:1) fn set_marketplace_mint_fee() -> Weight { - Weight::from_ref_time(29_094_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(29_094_000 , 0) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: NFT Nfts (r:1 w:1) // Storage: Marketplace Marketplaces (r:1 w:0) // Storage: Marketplace ListedNfts (r:0 w:1) fn list_nft() -> Weight { - Weight::from_ref_time(68_008_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + Weight::from_parts(68_008_000 , 0) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: NFT Nfts (r:1 w:1) // Storage: Marketplace ListedNfts (r:1 w:1) fn unlist_nft() -> Weight { - Weight::from_ref_time(76_744_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + Weight::from_parts(76_744_000 , 0) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: NFT Nfts (r:1 w:1) // Storage: Marketplace ListedNfts (r:1 w:1) // Storage: Marketplace Marketplaces (r:1 w:0) // Storage: System Account (r:2 w:2) fn buy_nft() -> Weight { - Weight::from_ref_time(166_253_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + Weight::from_parts(166_253_000 , 0) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) } } diff --git a/runtime/mainnet/src/weights/ternoa_nft.rs b/runtime/mainnet/src/weights/ternoa_nft.rs index 61697755..d53355e5 100644 --- a/runtime/mainnet/src/weights/ternoa_nft.rs +++ b/runtime/mainnet/src/weights/ternoa_nft.rs @@ -38,80 +38,80 @@ impl ternoa_nft::WeightInfo for WeightInfo { // Storage: NFT Nfts (r:0 w:1) /// The range of component `s` is `[0, 999999]`. fn create_nft(s: u32, ) -> Weight { - Weight::from_ref_time(115_467_000 as u64) + Weight::from_parts(115_467_000 , 0) // Standard Error: 74 - .saturating_add(Weight::from_ref_time(18_063 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + .saturating_add(Weight::from_parts(18_063 , 0).saturating_mul(s .into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) } // Storage: NFT Nfts (r:1 w:1) // Storage: NFT Collections (r:1 w:1) /// The range of component `s` is `[0, 999999]`. fn burn_nft(s: u32, ) -> Weight { - Weight::from_ref_time(83_528_000 as u64) + Weight::from_parts(83_528_000 , 0) // Standard Error: 89 - .saturating_add(Weight::from_ref_time(19_906 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(Weight::from_parts(19_906 , 0).saturating_mul(s .into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: NFT Nfts (r:1 w:1) fn transfer_nft() -> Weight { - Weight::from_ref_time(83_436_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(83_436_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: NFT Nfts (r:1 w:1) // Storage: NFT DelegatedNFTs (r:0 w:1) fn delegate_nft() -> Weight { - Weight::from_ref_time(87_534_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + Weight::from_parts(87_534_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: NFT Nfts (r:1 w:1) fn set_royalty() -> Weight { - Weight::from_ref_time(91_223_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(91_223_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: NFT NftMintFee (r:0 w:1) fn set_nft_mint_fee() -> Weight { - Weight::from_ref_time(65_472_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(65_472_000 , 0) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: NFT NextCollectionId (r:1 w:1) // Storage: NFT Collections (r:0 w:1) fn create_collection() -> Weight { - Weight::from_ref_time(130_164_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + Weight::from_parts(130_164_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: NFT Collections (r:1 w:1) fn burn_collection() -> Weight { - Weight::from_ref_time(101_370_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(101_370_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: NFT Collections (r:1 w:1) fn close_collection() -> Weight { - Weight::from_ref_time(70_933_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(70_933_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: NFT Collections (r:1 w:1) fn limit_collection() -> Weight { - Weight::from_ref_time(87_805_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(87_805_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: NFT Collections (r:1 w:1) // Storage: NFT Nfts (r:1 w:1) /// The range of component `s` is `[0, 999999]`. fn add_nft_to_collection(s: u32, ) -> Weight { - Weight::from_ref_time(61_635_000 as u64) + Weight::from_parts(61_635_000 , 0) // Standard Error: 58 - .saturating_add(Weight::from_ref_time(17_429 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(Weight::from_parts(17_429 , 0).saturating_mul(s .into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: NFT NftMintFee (r:1 w:0) // Storage: NFT SecretNftMintFee (r:1 w:0) @@ -122,43 +122,43 @@ impl ternoa_nft::WeightInfo for WeightInfo { // Storage: NFT Nfts (r:0 w:1) /// The range of component `s` is `[0, 999999]`. fn create_secret_nft(s: u32, ) -> Weight { - Weight::from_ref_time(267_193_000 as u64) + Weight::from_parts(267_193_000 , 0) // Standard Error: 60 - .saturating_add(Weight::from_ref_time(17_859 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + .saturating_add(Weight::from_parts(17_859 , 0).saturating_mul(s .into())) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: NFT Nfts (r:1 w:1) // Storage: NFT SecretNftMintFee (r:1 w:0) // Storage: System Account (r:2 w:2) // Storage: NFT SecretNftsOffchainData (r:0 w:1) fn add_secret() -> Weight { - Weight::from_ref_time(209_585_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + Weight::from_parts(209_585_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) } // Storage: TEE EnclaveAccountOperator (r:1 w:0) // Storage: TEE EnclaveClusterId (r:1 w:0) // Storage: NFT Nfts (r:1 w:1) // Storage: NFT SecretNftsShardsCount (r:1 w:1) fn add_secret_shard() -> Weight { - Weight::from_ref_time(147_668_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + Weight::from_parts(147_668_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: NFT SecretNftMintFee (r:0 w:1) fn set_secret_nft_mint_fee() -> Weight { - Weight::from_ref_time(38_874_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(38_874_000 , 0) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: NFT Nfts (r:1 w:1) // Storage: NFT CapsuleMintFee (r:1 w:0) // Storage: System Account (r:2 w:2) // Storage: NFT CapsuleOffchainData (r:0 w:1) fn convert_to_capsule() -> Weight { - Weight::from_ref_time(185_901_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + Weight::from_parts(185_901_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) } // Storage: NFT NftMintFee (r:1 w:0) // Storage: NFT CapsuleMintFee (r:1 w:0) @@ -169,43 +169,43 @@ impl ternoa_nft::WeightInfo for WeightInfo { // Storage: NFT Nfts (r:0 w:1) /// The range of component `s` is `[0, 999999]`. fn create_capsule(s: u32, ) -> Weight { - Weight::from_ref_time(287_011_000 as u64) + Weight::from_parts(287_011_000 , 0) // Standard Error: 81 - .saturating_add(Weight::from_ref_time(18_083 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + .saturating_add(Weight::from_parts(18_083 , 0).saturating_mul(s .into())) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: NFT Nfts (r:1 w:1) // Storage: NFT CapsuleOffchainData (r:0 w:1) fn set_capsule_offchaindata() -> Weight { - Weight::from_ref_time(118_724_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + Weight::from_parts(118_724_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: NFT CapsuleMintFee (r:0 w:1) fn set_capsule_mint_fee() -> Weight { - Weight::from_ref_time(53_340_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(53_340_000 , 0) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE EnclaveAccountOperator (r:1 w:0) // Storage: TEE EnclaveClusterId (r:1 w:0) // Storage: NFT Nfts (r:1 w:1) // Storage: NFT CapsulesShardsCount (r:1 w:1) fn add_capsule_shard() -> Weight { - Weight::from_ref_time(159_811_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + Weight::from_parts(159_811_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: NFT Nfts (r:1 w:1) fn notify_enclave_key_update() -> Weight { - Weight::from_ref_time(140_375_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(140_375_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: NFT Collections (r:1 w:1) fn set_collection_offchaindata() -> Weight { - Weight::from_ref_time(114_467_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(114_467_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/mainnet/src/weights/ternoa_rent.rs b/runtime/mainnet/src/weights/ternoa_rent.rs index 62a754ba..ff61ee3b 100644 --- a/runtime/mainnet/src/weights/ternoa_rent.rs +++ b/runtime/mainnet/src/weights/ternoa_rent.rs @@ -37,11 +37,11 @@ impl ternoa_rent::WeightInfo for WeightInfo { // Storage: Rent Contracts (r:0 w:1) /// The range of component `s` is `[0, 1000000]`. fn create_contract(s: u32, ) -> Weight { - Weight::from_ref_time(96_762_000 as u64) + Weight::from_parts(96_762_000 , 0) // Standard Error: 97 - .saturating_add(Weight::from_ref_time(35_803 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + .saturating_add(Weight::from_parts(35_803 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(5)) } // Storage: Rent Contracts (r:1 w:1) // Storage: System Account (r:2 w:2) @@ -49,11 +49,11 @@ impl ternoa_rent::WeightInfo for WeightInfo { // Storage: NFT Nfts (r:1 w:1) /// The range of component `s` is `[0, 1000000]`. fn revoke_contract(s: u32, ) -> Weight { - Weight::from_ref_time(177_685_000 as u64) + Weight::from_parts(177_685_000 , 0) // Standard Error: 58 - .saturating_add(Weight::from_ref_time(29_833 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + .saturating_add(Weight::from_parts(29_833 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) } // Storage: Rent Contracts (r:1 w:1) // Storage: Rent Queues (r:1 w:1) @@ -62,11 +62,11 @@ impl ternoa_rent::WeightInfo for WeightInfo { // Storage: Rent Offers (r:0 w:1) /// The range of component `s` is `[0, 1000000]`. fn cancel_contract(s: u32, ) -> Weight { - Weight::from_ref_time(117_100_000 as u64) + Weight::from_parts(117_100_000 , 0) // Standard Error: 81 - .saturating_add(Weight::from_ref_time(33_946 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + .saturating_add(Weight::from_parts(33_946 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Rent Contracts (r:1 w:1) // Storage: System Account (r:3 w:3) @@ -74,22 +74,22 @@ impl ternoa_rent::WeightInfo for WeightInfo { // Storage: Rent Offers (r:0 w:1) /// The range of component `s` is `[0, 1000000]`. fn rent(s: u32, ) -> Weight { - Weight::from_ref_time(135_855_000 as u64) + Weight::from_parts(135_855_000 , 0) // Standard Error: 80 - .saturating_add(Weight::from_ref_time(34_145 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + .saturating_add(Weight::from_parts(34_145 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Rent Contracts (r:1 w:0) // Storage: System Account (r:1 w:0) // Storage: Rent Offers (r:1 w:1) /// The range of component `s` is `[0, 1000000]`. fn make_rent_offer(s: u32, ) -> Weight { - Weight::from_ref_time(76_494_000 as u64) + Weight::from_parts(76_494_000 , 0) // Standard Error: 3 - .saturating_add(Weight::from_ref_time(130 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + .saturating_add(Weight::from_parts(130 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Rent Contracts (r:1 w:1) // Storage: Rent Offers (r:1 w:1) @@ -97,38 +97,38 @@ impl ternoa_rent::WeightInfo for WeightInfo { // Storage: Rent Queues (r:1 w:1) /// The range of component `s` is `[0, 1000000]`. fn accept_rent_offer(s: u32, ) -> Weight { - Weight::from_ref_time(100_100_000 as u64) + Weight::from_parts(100_100_000 , 0) // Standard Error: 64 - .saturating_add(Weight::from_ref_time(33_343 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + .saturating_add(Weight::from_parts(33_343 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) } // Storage: Rent Offers (r:1 w:1) /// The range of component `s` is `[0, 10000]`. fn retract_rent_offer(s: u32, ) -> Weight { - Weight::from_ref_time(56_746_000 as u64) + Weight::from_parts(56_746_000 , 0) // Standard Error: 433 - .saturating_add(Weight::from_ref_time(72_355 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + .saturating_add(Weight::from_parts(72_355 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Rent Contracts (r:1 w:1) // Storage: Rent Offers (r:0 w:1) /// The range of component `s` is `[0, 1000000]`. fn change_subscription_terms(s: u32, ) -> Weight { - Weight::from_ref_time(56_276_000 as u64) + Weight::from_parts(56_276_000 , 0) // Standard Error: 2 - .saturating_add(Weight::from_ref_time(108 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(Weight::from_parts(108 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: Rent Contracts (r:1 w:1) /// The range of component `s` is `[0, 1000000]`. fn accept_subscription_terms(s: u32, ) -> Weight { - Weight::from_ref_time(46_427_000 as u64) + Weight::from_parts(46_427_000 , 0) // Standard Error: 2 - .saturating_add(Weight::from_ref_time(116 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + .saturating_add(Weight::from_parts(116 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/mainnet/src/weights/ternoa_staking_rewards.rs b/runtime/mainnet/src/weights/ternoa_staking_rewards.rs index 0bed5f53..d4bdcc5f 100644 --- a/runtime/mainnet/src/weights/ternoa_staking_rewards.rs +++ b/runtime/mainnet/src/weights/ternoa_staking_rewards.rs @@ -33,8 +33,8 @@ pub struct WeightInfo(PhantomData); impl ternoa_staking_rewards::WeightInfo for WeightInfo { // Storage: StakingRewards Data (r:1 w:1) fn set_session_extra_reward_payout() -> Weight { - Weight::from_ref_time(36_849_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(36_849_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/mainnet/src/weights/ternoa_tee.rs b/runtime/mainnet/src/weights/ternoa_tee.rs index a3f7a69f..59721f52 100644 --- a/runtime/mainnet/src/weights/ternoa_tee.rs +++ b/runtime/mainnet/src/weights/ternoa_tee.rs @@ -39,32 +39,32 @@ impl ternoa_tee::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: TEE StakingLedger (r:0 w:1) fn register_enclave() -> Weight { - Weight::from_ref_time(86_901_000 as u64) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + Weight::from_parts(86_901_000 , 0) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) } // Storage: TEE StakingAmount (r:1 w:0) // Storage: TEE EnclaveData (r:1 w:0) // Storage: TEE EnclaveUnregistrations (r:1 w:1) // Storage: TEE StakingLedger (r:1 w:1) fn unregister_enclave() -> Weight { - Weight::from_ref_time(57_690_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + Weight::from_parts(57_690_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: TEE EnclaveData (r:1 w:0) // Storage: TEE EnclaveUpdates (r:1 w:1) // Storage: TEE EnclaveAccountOperator (r:1 w:0) fn update_enclave() -> Weight { - Weight::from_ref_time(50_160_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(50_160_000 , 0) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE EnclaveUpdates (r:1 w:1) fn cancel_update() -> Weight { - Weight::from_ref_time(38_901_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(38_901_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE EnclaveRegistrations (r:1 w:1) // Storage: TEE ClusterData (r:1 w:1) @@ -74,23 +74,23 @@ impl ternoa_tee::WeightInfo for WeightInfo { // Storage: TEE OperatorAssignedEra (r:0 w:1) // Storage: TEE EnclaveClusterId (r:0 w:1) fn assign_enclave() -> Weight { - Weight::from_ref_time(67_690_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + Weight::from_parts(67_690_000 , 0) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: TEE EnclaveRegistrations (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn remove_registration() -> Weight { - Weight::from_ref_time(64_001_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + Weight::from_parts(64_001_000 , 0) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: TEE EnclaveUpdates (r:1 w:1) fn reject_update() -> Weight { - Weight::from_ref_time(37_450_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(37_450_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE EnclaveData (r:1 w:1) // Storage: TEE EnclaveAccountOperator (r:1 w:1) @@ -98,87 +98,87 @@ impl ternoa_tee::WeightInfo for WeightInfo { // Storage: TEE ClusterData (r:1 w:1) // Storage: TEE EnclaveUpdates (r:1 w:1) fn force_remove_enclave() -> Weight { - Weight::from_ref_time(183_441_000 as u64) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) + Weight::from_parts(183_441_000 , 0) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(8)) } // Storage: TEE EnclaveData (r:1 w:1) // Storage: TEE EnclaveAccountOperator (r:1 w:1) // Storage: TEE EnclaveUpdates (r:1 w:1) fn force_update_enclave() -> Weight { - Weight::from_ref_time(75_411_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + Weight::from_parts(75_411_000 , 0) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: TEE NextClusterId (r:1 w:1) // Storage: TEE ClusterData (r:0 w:1) fn create_cluster() -> Weight { - Weight::from_ref_time(41_310_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + Weight::from_parts(41_310_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: TEE ClusterData (r:1 w:1) fn update_cluster() -> Weight { - Weight::from_ref_time(30_350_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(30_350_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE ClusterData (r:1 w:1) fn remove_cluster() -> Weight { - Weight::from_ref_time(29_691_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(29_691_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE StakingLedger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: TEE StakingAmount (r:1 w:0) fn withdraw_unbonded() -> Weight { - Weight::from_ref_time(59_530_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + Weight::from_parts(59_530_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: TEE MetricsServers (r:1 w:1) fn register_metrics_server() -> Weight { - Weight::from_ref_time(30_801_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(30_801_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE MetricsServers (r:1 w:1) fn unregister_metrics_server() -> Weight { - Weight::from_ref_time(36_381_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(36_381_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE MetricsServers (r:1 w:1) fn force_update_metrics_server_type() -> Weight { - Weight::from_ref_time(36_470_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(36_470_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE MetricsServers (r:1 w:0) // Storage: TEE EnclaveData (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: TEE MetricsReports (r:1 w:1) fn submit_metrics_server_report() -> Weight { - Weight::from_ref_time(58_101_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(58_101_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE ReportParamsWeightages (r:0 w:1) fn set_report_params_weightage() -> Weight { - Weight::from_ref_time(32_190_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(32_190_000 , 0) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE StakingAmount (r:0 w:1) fn set_staking_amount() -> Weight { - Weight::from_ref_time(32_220_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(32_220_000 , 0) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE DailyRewardPool (r:0 w:1) fn set_daily_reward_pool() -> Weight { - Weight::from_ref_time(32_201_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(32_201_000 , 0) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE ClaimedRewards (r:1 w:1) // Storage: Staking ActiveEra (r:1 w:0) @@ -188,33 +188,33 @@ impl ternoa_tee::WeightInfo for WeightInfo { // Storage: TEE MetricsReports (r:1 w:0) // Storage: System Account (r:2 w:2) fn claim_rewards() -> Weight { - Weight::from_ref_time(154_782_000 as u64) - .saturating_add(T::DbWeight::get().reads(9 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + Weight::from_parts(154_782_000 , 0) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: TEE OperatorAssignedEra (r:1 w:1) fn update_operator_assigned_era() -> Weight { - Weight::from_ref_time(37_040_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(37_040_000 , 0) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: TEE StakingAmount (r:1 w:0) // Storage: TEE StakingLedger (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn bond_extra() -> Weight { - Weight::from_ref_time(73_730_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + Weight::from_parts(73_730_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: TEE StakingAmount (r:1 w:0) // Storage: TEE StakingLedger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn refund_excess() -> Weight { - Weight::from_ref_time(68_810_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + Weight::from_parts(68_810_000 , 0) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) } } diff --git a/runtime/mainnet/src/weights/ternoa_transmission_protocols.rs b/runtime/mainnet/src/weights/ternoa_transmission_protocols.rs index 4b52204b..2255f14e 100644 --- a/runtime/mainnet/src/weights/ternoa_transmission_protocols.rs +++ b/runtime/mainnet/src/weights/ternoa_transmission_protocols.rs @@ -38,11 +38,11 @@ impl ternoa_transmission_protocols::WeightInfo for Weig // Storage: TransmissionProtocols Transmissions (r:0 w:1) /// The range of component `s` is `[0, 999999]`. fn set_transmission_protocol(s: u32, ) -> Weight { - Weight::from_ref_time(162_275_000 as u64) + Weight::from_parts(162_275_000 , 0) // Standard Error: 124 - .saturating_add(Weight::from_ref_time(40_798 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + .saturating_add(Weight::from_parts(40_798 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) } // Storage: NFT Nfts (r:1 w:1) // Storage: TransmissionProtocols Transmissions (r:1 w:1) @@ -50,22 +50,22 @@ impl ternoa_transmission_protocols::WeightInfo for Weig // Storage: TransmissionProtocols OnConsentData (r:0 w:1) /// The range of component `s` is `[0, 999999]`. fn remove_transmission_protocol(s: u32, ) -> Weight { - Weight::from_ref_time(92_565_000 as u64) + Weight::from_parts(92_565_000 , 0) // Standard Error: 310 - .saturating_add(Weight::from_ref_time(41_764 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + .saturating_add(Weight::from_parts(41_764 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) } // Storage: NFT Nfts (r:1 w:0) // Storage: TransmissionProtocols Transmissions (r:1 w:1) // Storage: TransmissionProtocols AtBlockQueue (r:1 w:1) /// The range of component `s` is `[0, 999999]`. fn reset_timer(s: u32, ) -> Weight { - Weight::from_ref_time(111_330_000 as u64) + Weight::from_parts(111_330_000 , 0) // Standard Error: 288 - .saturating_add(Weight::from_ref_time(43_663 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(Weight::from_parts(43_663 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: NFT Nfts (r:1 w:0) // Storage: TransmissionProtocols Transmissions (r:1 w:0) @@ -73,15 +73,15 @@ impl ternoa_transmission_protocols::WeightInfo for Weig // Storage: TransmissionProtocols OnConsentData (r:1 w:1) /// The range of component `s` is `[0, 999999]`. fn add_consent(s: u32, ) -> Weight { - Weight::from_ref_time(113_495_000 as u64) + Weight::from_parts(113_495_000 , 0) // Standard Error: 252 - .saturating_add(Weight::from_ref_time(65_782 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(Weight::from_parts(65_782 , 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: TransmissionProtocols AtBlockFee (r:0 w:1) fn set_protocol_fee() -> Weight { - Weight::from_ref_time(47_570_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(47_570_000 , 0) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index f20fa155..e1525a4f 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,6 @@ [toolchain] channel = "nightly-2023-01-01" targets = ["wasm32-unknown-unknown"] -profile = "minimal" # include rustfmt, clippy \ No newline at end of file +profile = "minimal" # include rustfmt, clippy + + diff --git a/ternoa-pallets b/ternoa-pallets index b95ecaa7..15ce393f 160000 --- a/ternoa-pallets +++ b/ternoa-pallets @@ -1 +1 @@ -Subproject commit b95ecaa7cf264bb6ad89af612a56607d7c2a9fe9 +Subproject commit 15ce393f6d9ac0d26cdcd3773bd3d3072d4b9d0a