From 8413e951c906241fa2e1de5580629a3a9407d030 Mon Sep 17 00:00:00 2001 From: Alain Brenzikofer Date: Sat, 2 Mar 2024 12:37:55 +0100 Subject: [PATCH] WIP before migrating to async api client --- Cargo.lock | 299 +++--------------- Cargo.toml | 6 +- .../encointer-api-client-extension/Cargo.toml | 1 + .../src/ceremonies.rs | 3 +- .../encointer-api-client-extension/src/lib.rs | 8 +- runtime/src/lib.rs | 71 ++--- runtime/src/weights/pallet_treasury.rs | 190 +++++++---- rust-toolchain.toml | 3 +- 8 files changed, 217 insertions(+), 364 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 89a8ce87..cdf97971 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -227,7 +227,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -573,7 +573,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4057f2c32adbb2fc158e22fb38433c8e9bbf76b75a4732c7c0cbaf695fb65568" dependencies = [ - "bytes 1.4.0", + "bytes", "futures-sink", "futures-util", "memchr", @@ -588,7 +588,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi 0.1.19", "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -895,16 +895,6 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" -[[package]] -name = "bytes" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -dependencies = [ - "byteorder", - "iovec", -] - [[package]] name = "bytes" version = "1.4.0" @@ -1880,7 +1870,7 @@ checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", "redox_users", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2059,6 +2049,7 @@ dependencies = [ "sp-runtime", "substrate-api-client", "substrate-client-keystore", + "tokio", ] [[package]] @@ -2585,21 +2576,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "fork-tree" version = "12.0.0" @@ -2900,25 +2876,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags 1.3.2", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" - [[package]] name = "funty" version = "2.0.0" @@ -3095,7 +3055,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3225,7 +3185,7 @@ version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ - "bytes 1.4.0", + "bytes", "fnv", "futures-core", "futures-sink", @@ -3394,7 +3354,7 @@ checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" dependencies = [ "libc", "match_cfg", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3403,7 +3363,7 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ - "bytes 1.4.0", + "bytes", "fnv", "itoa", ] @@ -3414,7 +3374,7 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ - "bytes 1.4.0", + "bytes", "http", "pin-project-lite 0.2.12", ] @@ -3449,7 +3409,7 @@ version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ - "bytes 1.4.0", + "bytes", "futures-channel", "futures-core", "futures-util", @@ -3540,7 +3500,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cbc0fa01ffc752e9dbc72818cdb072cd028b86be5e09dd04c5a643704fe101a9" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3669,15 +3629,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] - [[package]] name = "ip_network" version = "0.4.1" @@ -3962,16 +3913,6 @@ dependencies = [ "cpufeatures", ] -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "keystream" version = "1.0.0" @@ -4036,7 +3977,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ "cfg-if 1.0.0", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -4051,7 +3992,7 @@ version = "0.51.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f35eae38201a993ece6bdc823292d6abd1bffed1c4d0f4a3517d2bd8e1d917fe" dependencies = [ - "bytes 1.4.0", + "bytes", "futures", "futures-timer", "getrandom 0.2.10", @@ -4192,7 +4133,7 @@ checksum = "39d5ef876a2b2323d63c258e63c2f8e36f205fe5a11f0b3095d59635650790ff" dependencies = [ "arrayvec 0.7.4", "asynchronous-codec", - "bytes 1.4.0", + "bytes", "either", "fnv", "futures", @@ -4253,7 +4194,7 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3673da89d29936bc6435bafc638e2f184180d554ce844db65915113f86ec5e" dependencies = [ - "bytes 1.4.0", + "bytes", "curve25519-dalek 3.2.0", "futures", "libp2p-core", @@ -4293,7 +4234,7 @@ version = "0.7.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6b26abd81cd2398382a1edfe739b539775be8a90fa6914f39b2ab49571ec735" dependencies = [ - "bytes 1.4.0", + "bytes", "futures", "futures-timer", "if-watch", @@ -4836,25 +4777,6 @@ dependencies = [ "adler", ] -[[package]] -name = "mio" -version = "0.6.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" -dependencies = [ - "cfg-if 0.1.10", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", - "libc", - "log", - "miow", - "net2", - "slab", - "winapi 0.2.8", -] - [[package]] name = "mio" version = "0.8.8" @@ -4866,30 +4788,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "mio-extras" -version = "2.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" -dependencies = [ - "lazycell", - "log", - "mio 0.6.23", - "slab", -] - -[[package]] -name = "miow" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" -dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", -] - [[package]] name = "mixnet" version = "0.7.0" @@ -5015,7 +4913,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8552ab875c1313b97b8d20cb857b9fd63e2d1d6a0a1b53ce9821e575405f27a" dependencies = [ - "bytes 1.4.0", + "bytes", "futures", "log", "pin-project", @@ -5059,17 +4957,6 @@ dependencies = [ "rand 0.8.5", ] -[[package]] -name = "net2" -version = "0.2.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b13b648036a2339d06de780866fbdfda0dde886de7b3af2ddeba8b14f4ee34ac" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "winapi 0.3.9", -] - [[package]] name = "netlink-packet-core" version = "0.4.2" @@ -5114,7 +5001,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65b4b14489ab424703c092062176d52ba55485a89c076b4f9db05092b7223aa6" dependencies = [ - "bytes 1.4.0", + "bytes", "futures", "log", "netlink-packet-core", @@ -5129,7 +5016,7 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" dependencies = [ - "bytes 1.4.0", + "bytes", "futures", "libc", "log", @@ -5300,50 +5187,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" -[[package]] -name = "openssl" -version = "0.10.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" -dependencies = [ - "bitflags 2.4.0", - "cfg-if 1.0.0", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.50", -] - [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "openssl-sys" -version = "0.9.101" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "option-ext" version = "0.2.0" @@ -5929,7 +5778,7 @@ dependencies = [ "arrayvec 0.7.4", "bitvec", "byte-slice-cast", - "bytes 1.4.0", + "bytes", "impl-trait-for-tuples", "parity-scale-codec-derive", "serde", @@ -5997,7 +5846,7 @@ dependencies = [ "libc", "redox_syscall 0.2.16", "smallvec", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -6453,7 +6302,7 @@ version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ - "bytes 1.4.0", + "bytes", "prost-derive 0.11.9", ] @@ -6463,7 +6312,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" dependencies = [ - "bytes 1.4.0", + "bytes", "prost-derive 0.12.3", ] @@ -6473,7 +6322,7 @@ version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ - "bytes 1.4.0", + "bytes", "heck", "itertools 0.10.5", "lazy_static", @@ -6546,7 +6395,7 @@ dependencies = [ "raw-cpuid", "wasi 0.11.0+wasi-snapshot-preview1", "web-sys", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -6571,7 +6420,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1693116345026436eb2f10b677806169c1a1260c1c60eaaffe3fb5a29ae23d8b" dependencies = [ "asynchronous-codec", - "bytes 1.4.0", + "bytes", "quick-protobuf", "thiserror", "unsigned-varint", @@ -6594,7 +6443,7 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c956be1b23f4261676aed05a0046e204e8a6836e50203902683a718af0797989" dependencies = [ - "bytes 1.4.0", + "bytes", "rand 0.8.5", "ring 0.16.20", "rustc-hash", @@ -6919,7 +6768,7 @@ dependencies = [ "spin 0.5.2", "untrusted 0.7.1", "web-sys", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -6960,7 +6809,7 @@ checksum = "6678cf63ab3491898c0d021b493c94c9b221d91295294a2a5746eacbe5928322" dependencies = [ "libc", "rtoolbox", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -6985,7 +6834,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "034e22c514f5c0cb8a10ff341b9b048b5ceb21591f31c8f44c43b960f9b3524a" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -7641,7 +7490,7 @@ dependencies = [ "array-bytes 4.2.0", "arrayvec 0.7.4", "blake2 0.10.6", - "bytes 1.4.0", + "bytes", "futures", "futures-timer", "libp2p-identity", @@ -7672,7 +7521,7 @@ dependencies = [ "async-channel", "async-trait", "asynchronous-codec", - "bytes 1.4.0", + "bytes", "either", "fnv", "futures", @@ -7851,7 +7700,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d099f8d2f399be5b7d163e4236faaa47e7ce131f4021b9fe8e3e607e0ca51364" dependencies = [ "array-bytes 6.2.2", - "bytes 1.4.0", + "bytes", "fnv", "futures", "futures-timer", @@ -8549,18 +8398,6 @@ dependencies = [ "serde", ] -[[package]] -name = "sha-1" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" -dependencies = [ - "block-buffer 0.7.3", - "digest 0.8.1", - "fake-simd", - "opaque-debug 0.2.3", -] - [[package]] name = "sha-1" version = "0.9.8" @@ -8730,7 +8567,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -8750,14 +8587,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" dependencies = [ "base64 0.13.1", - "bytes 1.4.0", + "bytes", "flate2", "futures", "http", "httparse", "log", "rand 0.8.5", - "sha-1 0.9.8", + "sha-1", ] [[package]] @@ -9061,7 +8898,7 @@ version = "32.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ca29e042628cb94cbcaefa935e624a9b48f9230dbce6324908e9b4f768317ef" dependencies = [ - "bytes 1.4.0", + "bytes", "ed25519-dalek", "libsecp256k1", "log", @@ -9203,7 +9040,7 @@ version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48a675ea4858333d4d755899ed5ed780174aa34fec15953428d516af5452295" dependencies = [ - "bytes 1.4.0", + "bytes", "impl-trait-for-tuples", "parity-scale-codec", "polkavm-derive", @@ -9529,7 +9366,7 @@ dependencies = [ "parking_lot 0.11.2", "parking_lot_core 0.8.6", "static_init_macro", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -9631,7 +9468,6 @@ dependencies = [ "sp-storage", "sp-version", "url", - "ws", ] [[package]] @@ -9994,9 +9830,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" dependencies = [ "backtrace", - "bytes 1.4.0", + "bytes", "libc", - "mio 0.8.8", + "mio", "num_cpus", "parking_lot 0.12.1", "pin-project-lite 0.2.12", @@ -10056,7 +9892,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ - "bytes 1.4.0", + "bytes", "futures-core", "futures-io", "futures-sink", @@ -10141,7 +9977,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55ae70283aba8d2a8b411c695c437fe25b8b5e44e23e780662002fc72fb47a82" dependencies = [ "bitflags 2.4.0", - "bytes 1.4.0", + "bytes", "futures-core", "futures-util", "http", @@ -10428,7 +10264,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d86a8dc7f45e4c1b0d30e43038c38f274e77af056aa5f74b93c2cf9eb3c1c836" dependencies = [ "asynchronous-codec", - "bytes 1.4.0", + "bytes", "futures-io", "futures-util", ] @@ -10944,12 +10780,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - [[package]] name = "winapi" version = "0.3.9" @@ -10960,12 +10790,6 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -10978,7 +10802,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -11256,35 +11080,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "ws" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25fe90c75f236a0a00247d5900226aea4f2d7b05ccc34da9e7a8880ff59b5848" -dependencies = [ - "byteorder", - "bytes 0.4.12", - "httparse", - "log", - "mio 0.6.23", - "mio-extras", - "openssl", - "rand 0.7.3", - "sha-1 0.8.2", - "slab", - "url", -] - -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "wyz" version = "0.5.1" diff --git a/Cargo.toml b/Cargo.toml index bff0e648..373e6fda 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,7 +48,7 @@ pallet-encointer-scheduler = { default-features = false, version = "7.0.0" } # substrate deps frame-benchmarking = { default-features = false, version = "30.0.0" } frame-benchmarking-cli = { version = "34.0.0" } -frame-executive = { version = "30.0.0" } +frame-executive = { version = "30.0.0", default-features = false } frame-support = { default-features = false, version = "30.0.0" } frame-system = { default-features = false, version = "30.0.0" } frame-system-benchmarking = { version = "30.0.0", default-features = false } @@ -95,7 +95,7 @@ sp-consensus = { version = "0.34.0" } sp-consensus-aura = { version = "0.34.0", default-features = false } sp-consensus-grandpa = { version = "15.0.0" } sp-core = { default-features = false, version = "30.0.0" } -sp-inherents = "28.0.0" +sp-inherents = { default-features = false, version = "28.0.0" } sp-io = { default-features = false, version = "32.0.0" } sp-keyring = "33.0.0" sp-keystore = "0.36.0" @@ -114,7 +114,7 @@ substrate-frame-rpc-system = { version = "30.0.0" } substrate-wasm-builder = "19.0.0" substrate-build-script-utils = "11.0.0" -substrate-api-client = { version = "0.17.0", features = ["ws-client"] } +substrate-api-client = { version = "0.17.0", features = ["jsonrpsee-client"] } substrate-client-keystore = "0.10.0" diff --git a/client/encointer-api-client-extension/Cargo.toml b/client/encointer-api-client-extension/Cargo.toml index 5f6c6a23..48cca935 100644 --- a/client/encointer-api-client-extension/Cargo.toml +++ b/client/encointer-api-client-extension/Cargo.toml @@ -8,6 +8,7 @@ log = { workspace = true } parity-scale-codec = { workspace = true } serde = { workspace = true, features = ["std"] } serde_json = { workspace = true } +tokio = { workspace = true } # encointer deps encointer-ceremonies-assignment = { workspace = true, features = ["std"] } diff --git a/client/encointer-api-client-extension/src/ceremonies.rs b/client/encointer-api-client-extension/src/ceremonies.rs index 023222d0..614b8ee3 100644 --- a/client/encointer-api-client-extension/src/ceremonies.rs +++ b/client/encointer-api-client-extension/src/ceremonies.rs @@ -102,8 +102,9 @@ pub trait CeremoniesApi { impl CeremoniesApi for Api { fn get_assignments(&self, community_ceremony: &CommunityCeremony) -> Result { + tokio::try!( self.get_storage_map(ENCOINTER_CEREMONIES, "Assignments", community_ceremony, None)? - .ok_or_else(|| ApiClientError::Other("Assignments don't exist".into())) + .ok_or_else(|| ApiClientError::Other("Assignments don't exist".into()))) } fn get_assignment_counts( diff --git a/client/encointer-api-client-extension/src/lib.rs b/client/encointer-api-client-extension/src/lib.rs index cc0af1c0..3fa004fe 100644 --- a/client/encointer-api-client-extension/src/lib.rs +++ b/client/encointer-api-client-extension/src/lib.rs @@ -1,6 +1,6 @@ use extrinsic_params::CommunityCurrencyTipExtrinsicParams; use substrate_api_client::{ - ac_primitives::{Config, ExtrinsicSigner, SubstrateKitchensinkConfig, WithExtrinsicParams}, + ac_primitives::{Config, DefaultRuntimeConfig, ExtrinsicSigner, WithExtrinsicParams}, rpc::JsonrpseeClient, }; @@ -8,13 +8,13 @@ pub use encointer_node_notee_runtime::Runtime; pub use substrate_api_client::{api::error::Error as ApiClientError, Result}; pub type EncointerConfig = WithExtrinsicParams< - SubstrateKitchensinkConfig, - CommunityCurrencyTipExtrinsicParams, + DefaultRuntimeConfig, + CommunityCurrencyTipExtrinsicParams, >; pub type Api = substrate_api_client::Api; -pub type ParentchainExtrinsicSigner = ExtrinsicSigner; +pub type ParentchainExtrinsicSigner = ExtrinsicSigner; pub type ExtrinsicAddress = ::Address; pub use ceremonies::*; diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 5bbc02b8..35afd50a 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -6,9 +6,9 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); -use frame_support::{ - traits::{tokens::ConversionToAssetBalance, ConstU128, EqualPrivilegeOnly, InstanceFilter}, - RuntimeDebug, +use frame_support::derive_impl; +use frame_support::traits::{ + tokens::ConversionToAssetBalance, ConstU128, EqualPrivilegeOnly, InstanceFilter, }; use pallet_grandpa::{ fg_primitives, AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList, @@ -22,7 +22,7 @@ use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, IdentifyAccount, NumberFor, Verify}, transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, MultiSignature, + ApplyExtrinsicResult, MultiSignature, RuntimeDebug, }; use sp_std::prelude::*; #[cfg(feature = "std")] @@ -67,8 +67,10 @@ pub use encointer_primitives::{ communities::{CommunityIdentifier, Location}, scheduler::CeremonyPhaseType, }; +use frame_support::traits::tokens::{ConversionFromAssetBalance, PayFromAccount}; use frame_support::traits::ConstBool; use frame_system::{EnsureRoot, EnsureSigned}; +use sp_runtime::traits::IdentityLookup; mod weights; @@ -206,9 +208,9 @@ impl InstanceFilter for ProxyType { ProxyType::NonTransfer => matches!(c, RuntimeCall::EncointerBazaar(..)), ProxyType::BazaarEdit => matches!( c, - RuntimeCall::EncointerBazaar(EncointerBazaarCall::create_offering { .. }) | - RuntimeCall::EncointerBazaar(EncointerBazaarCall::update_offering { .. }) | - RuntimeCall::EncointerBazaar(EncointerBazaarCall::delete_offering { .. }) + RuntimeCall::EncointerBazaar(EncointerBazaarCall::create_offering { .. }) + | RuntimeCall::EncointerBazaar(EncointerBazaarCall::update_offering { .. }) + | RuntimeCall::EncointerBazaar(EncointerBazaarCall::delete_offering { .. }) ), } } @@ -254,7 +256,7 @@ parameter_types! { } // Configure FRAME pallets to include in runtime. - +#[derive_impl(frame_system::config_preludes::SolochainDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { /// The basic call filter to use in dispatchable. type BaseCallFilter = frame_support::traits::Everything; @@ -266,42 +268,20 @@ impl frame_system::Config for Runtime { type BlockLength = BlockLength; /// The identifier used to distinguish between accounts. type AccountId = AccountId; - /// The aggregated dispatch type that is available for extrinsics. - type RuntimeCall = RuntimeCall; - /// The lookup mechanism to get account ID from whatever is passed in dispatchers. - type Lookup = AccountIdLookup; /// The index type for storing how many extrinsics an account has signed. type Nonce = Index; /// The type for hashing blocks and tries. type Hash = Hash; - /// The hashing algorithm used. - type Hashing = BlakeTwo256; - /// The ubiquitous event type. - type RuntimeEvent = RuntimeEvent; - /// The ubiquitous origin type. - type RuntimeOrigin = RuntimeOrigin; /// Maximum number of block number to block hash mappings to keep (oldest pruned first). type BlockHashCount = BlockHashCount; /// The weight of database operations that the runtime can invoke. type DbWeight = RocksDbWeight; /// Version of the runtime. type Version = Version; - /// Converts a module to the index of the module in `construct_runtime!`. - /// - /// This type is being generated by `construct_runtime!`. - type PalletInfo = PalletInfo; - /// What to do if a new account is created. - type OnNewAccount = (); - /// What to do if an account is fully reaped from the system. - type OnKilledAccount = (); /// The data to be stored in an account. type AccountData = pallet_balances::AccountData; - /// Weight information for the extrinsics of this pallet. - type SystemWeightInfo = frame_system::weights::SubstrateWeight; /// This is used as an identifier of the chain. 42 is the generic substrate prefix. type SS58Prefix = SS58Prefix; - /// The set code logic, just the default since we're not a parachain. - type OnSetCode = (); type MaxConsumers = frame_support::traits::ConstU32<16>; } @@ -323,13 +303,11 @@ impl pallet_aura::Config for Runtime { impl pallet_grandpa::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type KeyOwnerProof = <() as KeyOwnerProofSystem<(KeyTypeId, GrandpaId)>>::Proof; - type EquivocationReportSystem = (); - type WeightInfo = (); // grandpa has default non-zero implementations for `()` type MaxAuthorities = MaxAuthorities; + type MaxNominators = ConstU32<0>; type MaxSetIdSessionEntries = MaxSetIdSessionEntries; } @@ -365,8 +343,8 @@ impl pallet_balances::Config for Runtime { type WeightInfo = pallet_balances::weights::SubstrateWeight; type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; + type RuntimeFreezeReason = (); } parameter_types! { @@ -487,9 +465,21 @@ parameter_types! { pub const ProposalBondMinimum: Balance = 100 * MILLICENTS; pub const ProposalBondMaximum: Balance = 500 * CENTS; pub const SpendPeriod: BlockNumber = 6 * DAYS; + pub const PayoutSpendPeriod: BlockNumber = 6 * DAYS; pub const Burn: Permill = Permill::from_percent(1); pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry"); pub const MaxApprovals: u32 = 10; + pub TreasuryAccount: AccountId = Treasury::account_id(); +} + +pub struct NoConversion; +impl ConversionFromAssetBalance for NoConversion { + type Error = (); + fn from_asset_balance(balance: Balance, _asset_id: ()) -> Result { + return Ok(balance); + } + #[cfg(feature = "runtime-benchmarks")] + fn ensure_successful(_: ()) {} } impl pallet_treasury::Config for Runtime { @@ -509,6 +499,14 @@ impl pallet_treasury::Config for Runtime { type MaxApprovals = MaxApprovals; type WeightInfo = weights::pallet_treasury::WeightInfo; type SpendOrigin = frame_support::traits::NeverEnsureOrigin; //No spend, no bounty + type AssetKind = (); + type Beneficiary = AccountId; + type BeneficiaryLookup = IdentityLookup; + type Paymaster = PayFromAccount; + type BalanceConverter = NoConversion; + type PayoutPeriod = PayoutSpendPeriod; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); } impl pallet_encointer_reputation_commitments::Config for Runtime { @@ -526,15 +524,14 @@ impl pallet_encointer_faucet::Config for Runtime { parameter_types! { pub const ConfirmationPeriod:BlockNumber = 20; - pub const ProposalLifetime: BlockNumber = 40; + pub const ProposalLifetime: Moment = 20 * 60 * 1000; // [ms] } impl pallet_encointer_democracy::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type MaxReputationVecLength = ConstU32<1024>; + type MaxReputationVecLength = ConstU32<64>; type ConfirmationPeriod = ConfirmationPeriod; type ProposalLifetime = ProposalLifetime; - type ProposalLifetimeCycles = ConstU32<1>; type MinTurnout = ConstU128<1>; type WeightInfo = weights::pallet_encointer_democracy::WeightInfo; } diff --git a/runtime/src/weights/pallet_treasury.rs b/runtime/src/weights/pallet_treasury.rs index 1d1872cc..52b59a25 100644 --- a/runtime/src/weights/pallet_treasury.rs +++ b/runtime/src/weights/pallet_treasury.rs @@ -17,24 +17,22 @@ //! Autogenerated weights for `pallet_treasury` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 +//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// /builds/polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=kusama-dev -// --steps=50 -// --repeat=20 +// --chain=spec-kusama.json // --pallet=pallet_treasury -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/kusama/src/weights/ +// --extrinsic= +// --output=/builds/runtimes/relay/kusama/src/weights +// --header=/builds/bench/header.txt +// --no-median-slopes +// --no-min-squares #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -47,105 +45,167 @@ use core::marker::PhantomData; /// Weight functions for `pallet_treasury`. pub struct WeightInfo(PhantomData); impl pallet_treasury::WeightInfo for WeightInfo { - /// Storage: Treasury ProposalCount (r:1 w:1) - /// Proof: Treasury ProposalCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Treasury Approvals (r:1 w:1) - /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) - /// Storage: Treasury Proposals (r:0 w:1) - /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn spend() -> Weight { + /// Storage: `Treasury::ProposalCount` (r:1 w:1) + /// Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Approvals` (r:1 w:1) + /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Proposals` (r:0 w:1) + /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + fn spend_local() -> Weight { // Proof Size summary in bytes: // Measured: `6` // Estimated: `1887` - // Minimum execution time: 14_692_000 picoseconds. - Weight::from_parts(15_059_000, 0) + // Minimum execution time: 7_563_000 picoseconds. + Weight::from_parts(7_868_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Treasury ProposalCount (r:1 w:1) - /// Proof: Treasury ProposalCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Treasury Proposals (r:0 w:1) - /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + /// Storage: `Treasury::ProposalCount` (r:1 w:1) + /// Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Proposals` (r:0 w:1) + /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn propose_spend() -> Weight { // Proof Size summary in bytes: // Measured: `107` // Estimated: `1489` - // Minimum execution time: 26_358_000 picoseconds. - Weight::from_parts(26_761_000, 0) + // Minimum execution time: 16_827_000 picoseconds. + Weight::from_parts(17_262_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Treasury Proposals (r:1 w:1) - /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Treasury::Proposals` (r:1 w:1) + /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn reject_proposal() -> Weight { // Proof Size summary in bytes: // Measured: `265` // Estimated: `3593` - // Minimum execution time: 39_586_000 picoseconds. - Weight::from_parts(40_113_000, 0) + // Minimum execution time: 25_789_000 picoseconds. + Weight::from_parts(26_398_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Treasury Proposals (r:1 w:0) - /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - /// Storage: Treasury Approvals (r:1 w:1) - /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + /// Storage: `Treasury::Proposals` (r:1 w:0) + /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Approvals` (r:1 w:1) + /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) /// The range of component `p` is `[0, 99]`. fn approve_proposal(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `433 + p * (8 ±0)` // Estimated: `3573` - // Minimum execution time: 9_225_000 picoseconds. - Weight::from_parts(11_898_418, 0) + // Minimum execution time: 5_353_000 picoseconds. + Weight::from_parts(8_423_989, 0) .saturating_add(Weight::from_parts(0, 3573)) - // Standard Error: 888 - .saturating_add(Weight::from_parts(30_177, 0).saturating_mul(p.into())) + // Standard Error: 1_120 + .saturating_add(Weight::from_parts(45_883, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Treasury Approvals (r:1 w:1) - /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + /// Storage: `Treasury::Approvals` (r:1 w:1) + /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) fn remove_approval() -> Weight { // Proof Size summary in bytes: // Measured: `90` // Estimated: `1887` - // Minimum execution time: 6_896_000 picoseconds. - Weight::from_parts(7_093_000, 0) + // Minimum execution time: 4_075_000 picoseconds. + Weight::from_parts(4_286_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Treasury Deactivated (r:1 w:1) - /// Proof: Treasury Deactivated (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - /// Storage: 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]`. + /// Storage: `Treasury::Deactivated` (r:1 w:1) + /// Proof: `Treasury::Deactivated` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Approvals` (r:1 w:1) + /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Proposals` (r:99 w:99) + /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:199 w:199) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Bounties::BountyApprovals` (r:1 w:1) + /// Proof: `Bounties::BountyApprovals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + /// The range of component `p` is `[0, 99]`. fn on_initialize_proposals(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `264 + p * (251 ±0)` + // Measured: `294 + p * (251 ±0)` // Estimated: `3593 + p * (5206 ±0)` - // Minimum execution time: 62_552_000 picoseconds. - Weight::from_parts(65_526_861, 0) + // Minimum execution time: 34_895_000 picoseconds. + Weight::from_parts(40_046_318, 0) .saturating_add(Weight::from_parts(0, 3593)) - // Standard Error: 20_034 - .saturating_add(Weight::from_parts(37_730_613, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(5)) + // Standard Error: 6_188 + .saturating_add(Weight::from_parts(25_772_314, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(p.into()))) - .saturating_add(T::DbWeight::get().writes(5)) + .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 5206).saturating_mul(p.into())) } + /// Storage: `Treasury::SpendCount` (r:1 w:1) + /// Proof: `Treasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Spends` (r:0 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + fn spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `1489` + // Minimum execution time: 8_598_000 picoseconds. + Weight::from_parts(8_937_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::Spends` (r:1 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + /// Storage: `XcmPallet::QueryCounter` (r:1 w:1) + /// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0) + /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0) + /// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1) + /// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) + /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::Queries` (r:0 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn payout() -> Weight { + // Proof Size summary in bytes: + // Measured: `251` + // Estimated: `5318` + // Minimum execution time: 29_981_000 picoseconds. + Weight::from_parts(30_787_000, 0) + .saturating_add(Weight::from_parts(0, 5318)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `Treasury::Spends` (r:1 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + /// Storage: `XcmPallet::Queries` (r:1 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn check_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `170` + // Estimated: `5318` + // Minimum execution time: 15_985_000 picoseconds. + Weight::from_parts(16_431_000, 0) + .saturating_add(Weight::from_parts(0, 5318)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Treasury::Spends` (r:1 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + fn void_spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `142` + // Estimated: `5318` + // Minimum execution time: 8_515_000 picoseconds. + Weight::from_parts(8_795_000, 0) + .saturating_add(Weight::from_parts(0, 5318)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 38a95c9f..b01d6494 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "nightly-2024-02-08" +channel = "stable" profile = "default" # include rustfmt, clippy components = [ "cargo", @@ -8,7 +8,6 @@ components = [ "rust-src", "rust-std", "rustc", - "rustc-dev", "rustfmt", ] targets = ["wasm32-unknown-unknown"]