diff --git a/Cargo.lock b/Cargo.lock index 9f15206c6d2c8ce3730cbce98c41837812f10ed9..0346bf09cc95f731c65d2065ee61f17036927d55 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -481,7 +481,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", - "rand", + "rand 0.8.5", "rayon", ] @@ -537,6 +537,12 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +[[package]] +name = "ascii" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" + [[package]] name = "asn1-rs" version = "0.5.2" @@ -805,7 +811,7 @@ dependencies = [ "dleq_vrf", "fflonk", "merlin 3.0.0", - "rand_chacha", + "rand_chacha 0.3.1", "rand_core 0.6.4", "ring 0.1.0", "sha2 0.10.8", @@ -896,12 +902,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ "bitcoin_hashes", - "rand", + "rand 0.8.5", "rand_core 0.6.4", "serde", "unicode-normalization", ] +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitcoin_hashes" version = "0.11.0" @@ -1465,6 +1486,19 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "combine" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" +dependencies = [ + "ascii", + "byteorder", + "either", + "memchr", + "unreachable", +] + [[package]] name = "comfy-table" version = "7.1.0" @@ -1489,7 +1523,7 @@ dependencies = [ "fflonk", "getrandom_or_panic", "merlin 3.0.0", - "rand_chacha", + "rand_chacha 0.3.1", ] [[package]] @@ -1622,6 +1656,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -2220,7 +2263,7 @@ version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "convert_case", + "convert_case 0.4.0", "proc-macro2", "quote", "rustc_version", @@ -2661,6 +2704,15 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +[[package]] +name = "encoding_rs" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +dependencies = [ + "cfg-if 1.0.0", +] + [[package]] name = "enum-as-inner" version = "0.5.1" @@ -2780,6 +2832,28 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "failure" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" +dependencies = [ + "backtrace", + "failure_derive", +] + +[[package]] +name = "failure_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure", +] + [[package]] name = "fake-simd" version = "0.1.2" @@ -2792,6 +2866,16 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fancy-regex" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b95f7c0680e4142284cf8b22c14a476e87d61b004a3a0861872b32ef7ead40a2" +dependencies = [ + "bit-set", + "regex", +] + [[package]] name = "fastrand" version = "2.0.1" @@ -2882,7 +2966,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand", + "rand 0.8.5", "rustc-hex", "static_assertions", ] @@ -2919,6 +3003,21 @@ 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 = "3.0.0" @@ -2987,7 +3086,7 @@ dependencies = [ "linked-hash-map", "log", "parity-scale-codec", - "rand", + "rand 0.8.5", "rand_pcg", "sc-block-builder", "sc-cli", @@ -3258,6 +3357,10 @@ name = "fsio" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1fd087255f739f4f1aeea69f11b72f8080e9c2e7645cd06955dad4a178a49e3" +dependencies = [ + "rand 0.7.3", + "users", +] [[package]] name = "fuchsia-zircon" @@ -3637,7 +3740,7 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" dependencies = [ - "rand", + "rand 0.8.5", "rand_core 0.6.4", ] @@ -3696,6 +3799,26 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +[[package]] +name = "git-version" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad568aa3db0fcbc81f2f116137f263d7304f512a1209b35b85150d3ef88ad19" +dependencies = [ + "git-version-macro", +] + +[[package]] +name = "git-version-macro" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "glob" version = "0.3.1" @@ -3726,6 +3849,64 @@ dependencies = [ "walkdir", ] +[[package]] +name = "graphql-introspection-query" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f2a4732cf5140bd6c082434494f785a19cfb566ab07d1382c3671f5812fed6d" +dependencies = [ + "serde", +] + +[[package]] +name = "graphql-parser" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5613c31f18676f164112732202124f373bb2103ff017b3b85ca954ea6a66ada" +dependencies = [ + "combine", + "failure", +] + +[[package]] +name = "graphql_client" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9b58571cfc3cc42c3e8ff44fc6cfbb6c0dea17ed22d20f9d8f1efc4e8209a3f" +dependencies = [ + "graphql_query_derive", + "serde", + "serde_json", +] + +[[package]] +name = "graphql_client_codegen" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4bf9cd823359d74ad3d3ecf1afd4a975f4ff2f891cdf9a66744606daf52de8c" +dependencies = [ + "graphql-introspection-query", + "graphql-parser", + "heck 0.3.3", + "lazy_static", + "proc-macro2", + "quote", + "serde", + "serde_json", + "syn 1.0.109", +] + +[[package]] +name = "graphql_query_derive" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e56b093bfda71de1da99758b036f4cc811fd2511c8a76f75680e9ffbd2bb4251" +dependencies = [ + "graphql_client_codegen", + "proc-macro2", + "syn 1.0.109", +] + [[package]] name = "group" version = "0.13.0" @@ -4096,6 +4277,19 @@ dependencies = [ "webpki-roots 0.25.3", ] +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + [[package]] name = "iana-time-zone" version = "0.1.59" @@ -4526,7 +4720,7 @@ dependencies = [ "hyper", "jsonrpsee-types 0.16.3", "parking_lot 0.12.1", - "rand", + "rand 0.8.5", "rustc-hash", "serde", "serde_json", @@ -4855,7 +5049,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project", "quick-protobuf", - "rand", + "rand 0.8.5", "rw-stream-sink", "smallvec", "thiserror", @@ -4911,7 +5105,7 @@ dependencies = [ "multiaddr", "multihash", "quick-protobuf", - "rand", + "rand 0.8.5", "sha2 0.10.8", "thiserror", "zeroize", @@ -4936,7 +5130,7 @@ dependencies = [ "libp2p-swarm", "log", "quick-protobuf", - "rand", + "rand 0.8.5", "sha2 0.10.8", "smallvec", "thiserror", @@ -4958,7 +5152,7 @@ dependencies = [ "libp2p-identity", "libp2p-swarm", "log", - "rand", + "rand 0.8.5", "smallvec", "socket2 0.4.10", "tokio", @@ -4994,7 +5188,7 @@ dependencies = [ "log", "once_cell", "quick-protobuf", - "rand", + "rand 0.8.5", "sha2 0.10.8", "snow", "static_assertions", @@ -5016,7 +5210,7 @@ dependencies = [ "libp2p-core", "libp2p-swarm", "log", - "rand", + "rand 0.8.5", "void", ] @@ -5036,7 +5230,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "quinn-proto", - "rand", + "rand 0.8.5", "rustls 0.20.9", "thiserror", "tokio", @@ -5054,7 +5248,7 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-swarm", - "rand", + "rand 0.8.5", "smallvec", ] @@ -5073,7 +5267,7 @@ dependencies = [ "libp2p-identity", "libp2p-swarm-derive", "log", - "rand", + "rand 0.8.5", "smallvec", "tokio", "void", @@ -5210,7 +5404,7 @@ dependencies = [ "libsecp256k1-core", "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", - "rand", + "rand 0.8.5", "serde", "sha2 0.9.9", "typenum", @@ -5547,6 +5741,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -5633,8 +5833,8 @@ dependencies = [ "lioness", "log", "parking_lot 0.12.1", - "rand", - "rand_chacha", + "rand 0.8.5", + "rand_chacha 0.3.1", "rand_distr", "subtle 2.5.0", "thiserror", @@ -5782,7 +5982,25 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7bddcd3bf5144b6392de80e04c347cd7fab2508f6df16a85fc496ecd5cec39bc" dependencies = [ - "rand", + "rand 0.8.5", +] + +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", ] [[package]] @@ -6120,12 +6338,50 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +[[package]] +name = "openssl" +version = "0.10.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" +dependencies = [ + "bitflags 2.4.2", + "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.48", +] + [[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.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "option-ext" version = "0.2.0" @@ -6813,7 +7069,7 @@ dependencies = [ "lz4", "memmap2 0.5.10", "parking_lot 0.12.1", - "rand", + "rand 0.8.5", "siphasher 0.3.11", "snap", "winapi 0.3.9", @@ -7110,6 +7366,16 @@ version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" +[[package]] +name = "placeholder" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1b691ea66d1ec20b3f725bab409c6600215fe556e67aff316c875d6aa2deb20" +dependencies = [ + "lazy_static", + "regex", +] + [[package]] name = "platforms" version = "3.3.0" @@ -7165,7 +7431,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be97d76faf1bfab666e1375477b23fde79eccf0276e9b63b92a39d676a889ba9" dependencies = [ - "rand", + "rand 0.8.5", ] [[package]] @@ -7461,7 +7727,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" dependencies = [ "bytes", - "rand", + "rand 0.8.5", "ring 0.16.20", "rustc-hash", "rustls 0.20.9", @@ -7487,6 +7753,19 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + [[package]] name = "rand" version = "0.8.5" @@ -7494,10 +7773,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", + "rand_chacha 0.3.1", "rand_core 0.6.4", ] +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + [[package]] name = "rand_chacha" version = "0.3.1" @@ -7533,7 +7822,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" dependencies = [ "num-traits", - "rand", + "rand 0.8.5", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", ] [[package]] @@ -7688,6 +7986,44 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +[[package]] +name = "reqwest" +version = "0.11.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" +dependencies = [ + "base64 0.21.7", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-tls", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite 0.2.13", + "serde", + "serde_json", + "serde_urlencoded", + "system-configuration", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + [[package]] name = "resolv-conf" version = "0.7.0" @@ -7799,6 +8135,15 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "run_script" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70f5efb6762d8cafcab5b2a5545dad239d896989b15304e7d1a03cc6cf1aa626" +dependencies = [ + "fsio", +] + [[package]] name = "rustc-demangle" version = "0.1.23" @@ -8135,7 +8480,7 @@ dependencies = [ "log", "names", "parity-scale-codec", - "rand", + "rand 0.8.5", "regex", "rpassword", "sc-client-api", @@ -8353,7 +8698,7 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "rand", + "rand 0.8.5", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -8572,7 +8917,7 @@ dependencies = [ "parking_lot 0.12.1", "partial_sort", "pin-project", - "rand", + "rand 0.8.5", "sc-client-api", "sc-network-common", "sc-utils", @@ -8742,7 +9087,7 @@ dependencies = [ "once_cell", "parity-scale-codec", "parking_lot 0.12.1", - "rand", + "rand 0.8.5", "sc-client-api", "sc-network", "sc-network-common", @@ -8878,7 +9223,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "pin-project", - "rand", + "rand 0.8.5", "sc-chain-spec", "sc-client-api", "sc-client-db", @@ -8946,7 +9291,7 @@ dependencies = [ "futures 0.3.30", "libc", "log", - "rand", + "rand 0.8.5", "rand_pcg", "regex", "sc-telemetry", @@ -8968,7 +9313,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "pin-project", - "rand", + "rand 0.8.5", "sc-utils", "serde", "serde_json", @@ -9438,6 +9783,18 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + [[package]] name = "serde_yaml" version = "0.9.30" @@ -9667,8 +10024,8 @@ dependencies = [ "pbkdf2 0.12.2", "pin-project", "poly1305", - "rand", - "rand_chacha", + "rand 0.8.5", + "rand_chacha 0.3.1", "ruzstd", "schnorrkel 0.11.4", "serde", @@ -9710,8 +10067,8 @@ dependencies = [ "no-std-net", "parking_lot 0.12.1", "pin-project", - "rand", - "rand_chacha", + "rand 0.8.5", + "rand_chacha 0.3.1", "serde", "serde_json", "siphasher 1.0.0", @@ -9777,7 +10134,7 @@ dependencies = [ "http", "httparse", "log", - "rand", + "rand 0.8.5", "sha-1", ] @@ -10039,7 +10396,7 @@ dependencies = [ "parking_lot 0.12.1", "paste", "primitive-types", - "rand", + "rand 0.8.5", "scale-info", "schnorrkel 0.11.4", "secp256k1", @@ -10085,7 +10442,7 @@ dependencies = [ "parking_lot 0.12.1", "paste", "primitive-types", - "rand", + "rand 0.8.5", "scale-info", "schnorrkel 0.11.4", "secp256k1", @@ -10470,7 +10827,7 @@ dependencies = [ "log", "parity-scale-codec", "paste", - "rand", + "rand 0.8.5", "scale-info", "serde", "simple-mermaid 0.1.0", @@ -10495,7 +10852,7 @@ dependencies = [ "log", "parity-scale-codec", "paste", - "rand", + "rand 0.8.5", "scale-info", "serde", "simple-mermaid 0.1.1", @@ -10640,7 +10997,7 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "rand", + "rand 0.8.5", "smallvec", "sp-core 21.0.0", "sp-externalities 0.19.0 (git+https://github.com/bgallois/duniter-polkadot-sdk?branch=duniter-v1.6.0)", @@ -10662,7 +11019,7 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "rand", + "rand 0.8.5", "smallvec", "sp-core 28.0.0", "sp-externalities 0.25.0", @@ -10684,7 +11041,7 @@ dependencies = [ "ed25519-dalek", "hkdf", "parity-scale-codec", - "rand", + "rand 0.8.5", "scale-info", "sha2 0.10.8", "sp-api", @@ -10840,7 +11197,7 @@ dependencies = [ "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", - "rand", + "rand 0.8.5", "scale-info", "schnellru", "sp-core 21.0.0", @@ -10865,7 +11222,7 @@ dependencies = [ "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", - "rand", + "rand 0.8.5", "scale-info", "schnellru", "sp-core 28.0.0", @@ -11203,6 +11560,25 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +[[package]] +name = "subweight-core" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee5751d8385836e91a9b7c613e1e7e11f97a4c8a867d6f45f556497d2cfb53c1" +dependencies = [ + "clap 4.4.18", + "fancy-regex", + "git-version", + "glob", + "lazy_static", + "log", + "proc-macro2", + "semver 1.0.21", + "serde", + "serde_json", + "syn 2.0.48", +] + [[package]] name = "subxt" version = "0.34.0" @@ -11415,6 +11791,22 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "tera" +version = "1.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "970dff17c11e884a4a09bc76e3a17ef71e01bb13447a11e85226e254fe6d10b8" +dependencies = [ + "globwalk", + "lazy_static", + "pest", + "pest_derive", + "regex", + "serde", + "serde_json", + "unic-segment", +] + [[package]] name = "termcolor" version = "1.4.1" @@ -11595,6 +11987,16 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + [[package]] name = "tokio-retry" version = "0.3.0" @@ -11602,7 +12004,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" dependencies = [ "pin-project", - "rand", + "rand 0.8.5", "tokio", ] @@ -11878,7 +12280,7 @@ dependencies = [ "idna 0.2.3", "ipnet", "lazy_static", - "rand", + "rand 0.8.5", "smallvec", "socket2 0.4.10", "thiserror", @@ -11963,7 +12365,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if 1.0.0", "digest 0.10.7", - "rand", + "rand 0.8.5", "static_assertions", ] @@ -12002,6 +12404,56 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "unic-char-property" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" +dependencies = [ + "unic-char-range", +] + +[[package]] +name = "unic-char-range" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" + +[[package]] +name = "unic-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" + +[[package]] +name = "unic-segment" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4ed5d26be57f84f176157270c112ef57b86debac9cd21daaabbe56db0f88f23" +dependencies = [ + "unic-ucd-segment", +] + +[[package]] +name = "unic-ucd-segment" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2079c122a62205b421f499da10f3ee0f7697f012f55b675e002483c73ea34700" +dependencies = [ + "unic-char-property", + "unic-char-range", + "unic-ucd-version", +] + +[[package]] +name = "unic-ucd-version" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" +dependencies = [ + "unic-common", +] + [[package]] name = "unicode-bidi" version = "0.3.15" @@ -12051,6 +12503,15 @@ dependencies = [ "subtle 2.5.0", ] +[[package]] +name = "unreachable" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" +dependencies = [ + "void", +] + [[package]] name = "unsafe-libyaml" version = "0.2.10" @@ -12092,6 +12553,16 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "users" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa4227e95324a443c9fcb06e03d4d85e91aabe9a5a02aa818688b6918b6af486" +dependencies = [ + "libc", + "log", +] + [[package]] name = "utf8parse" version = "0.2.1" @@ -12110,6 +12581,12 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +[[package]] +name = "version-compare" +version = "0.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c18c859eead79d8b95d09e4678566e8d70105c4e7b251f707a03df32442661b" + [[package]] name = "version_check" version = "0.9.4" @@ -12137,8 +12614,8 @@ dependencies = [ "arrayref", "constcat", "digest 0.10.7", - "rand", - "rand_chacha", + "rand 0.8.5", + "rand_chacha 0.3.1", "rand_core 0.6.4", "sha2 0.10.8", "sha3", @@ -12532,7 +13009,7 @@ dependencies = [ "memfd", "memoffset", "paste", - "rand", + "rand 0.8.5", "rustix 0.36.17", "wasmtime-asm-macros", "wasmtime-environ", @@ -12587,6 +13064,16 @@ version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" +[[package]] +name = "weight-analyzer" +version = "0.0.0" +dependencies = [ + "convert_case 0.6.0", + "glob", + "serde", + "subweight-core", +] + [[package]] name = "which" version = "4.4.2" @@ -12963,6 +13450,31 @@ dependencies = [ "time", ] +[[package]] +name = "xtask" +version = "0.1.0" +dependencies = [ + "anyhow", + "clap 4.4.18", + "frame-metadata 16.0.0", + "graphql_client", + "hex", + "memmap2 0.5.10", + "parity-scale-codec", + "placeholder", + "reqwest", + "run_script", + "scale-info", + "scale-value", + "serde", + "serde_json", + "tera", + "tokio", + "version-compare", + "version_check", + "weight-analyzer", +] + [[package]] name = "yamux" version = "0.10.2" @@ -12973,7 +13485,7 @@ dependencies = [ "log", "nohash-hasher", "parking_lot 0.12.1", - "rand", + "rand 0.8.5", "static_assertions", ] diff --git a/Cargo.toml b/Cargo.toml index 67288e0667fd58d8c241ef818fa86091f0cad955..5f9ff1a926b9b9a8790d0fd44f11556de645909a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -172,10 +172,10 @@ members = [ 'pallets/upgrade-origin', 'primitives/distance', 'primitives/membership', - #'resources/weight_analyzer', + 'resources/weight_analyzer', 'runtime/common', 'runtime/gdev', - #'xtask' + 'xtask' ] # The list of dependencies below (which can be both direct and indirect dependencies) are crates diff --git a/docs/api/runtime-calls.md b/docs/api/runtime-calls.md index 3c96e8358dfda38ca1dc6434860180de1e675926..92a50c0b5b60bdb3da01b7ebee2e6ecf5a4beba4 100644 --- a/docs/api/runtime-calls.md +++ b/docs/api/runtime-calls.md @@ -13,7 +13,7 @@ through on-chain governance mechanisms. ## User calls -There are **77** user calls from **21** pallets. +There are **80** user calls from **21** pallets. ### Account - 1 @@ -21,14 +21,14 @@ There are **77** user calls from **21** pallets. <details><summary><code>unlink_identity()</code></summary> -Taking 0.0076 % of a block. +Taking 0.0107 % of a block. ```rust ``` </details> -unlink the identity associated with the account +See [`Pallet::unlink_identity`]. ### Scheduler - 2 @@ -36,57 +36,57 @@ unlink the identity associated with the account <details><summary><code>schedule(when, maybe_periodic, priority, call)</code></summary> -Taking 0.0088 % of a block. +Taking 0.0118 % of a block. ```rust -when: T::BlockNumber -maybe_periodic: Option<schedule::Period<T::BlockNumber>> +when: BlockNumberFor<T> +maybe_periodic: Option<schedule::Period<BlockNumberFor<T>>> priority: schedule::Priority call: Box<<T as Config>::RuntimeCall> ``` </details> -Anonymously schedule a task. +See [`Pallet::schedule`]. #### cancel - 1 <details><summary><code>cancel(when, index)</code></summary> -Taking 0.0118 % of a block. +Taking 0.0181 % of a block. ```rust -when: T::BlockNumber +when: BlockNumberFor<T> index: u32 ``` </details> -Cancel an anonymously scheduled task. +See [`Pallet::cancel`]. #### schedule_named - 2 <details><summary><code>schedule_named(id, when, maybe_periodic, priority, call)</code></summary> -Taking 0.012 % of a block. +Taking 0.0191 % of a block. ```rust id: TaskName -when: T::BlockNumber -maybe_periodic: Option<schedule::Period<T::BlockNumber>> +when: BlockNumberFor<T> +maybe_periodic: Option<schedule::Period<BlockNumberFor<T>>> priority: schedule::Priority call: Box<<T as Config>::RuntimeCall> ``` </details> -Schedule a named task. +See [`Pallet::schedule_named`]. #### cancel_named - 3 <details><summary><code>cancel_named(id)</code></summary> -Taking 0.0123 % of a block. +Taking 0.0195 % of a block. ```rust id: TaskName @@ -94,7 +94,7 @@ id: TaskName </details> -Cancel a named scheduled task. +See [`Pallet::cancel_named`]. #### schedule_after - 4 @@ -103,15 +103,15 @@ Cancel a named scheduled task. No weight available. ```rust -after: T::BlockNumber -maybe_periodic: Option<schedule::Period<T::BlockNumber>> +after: BlockNumberFor<T> +maybe_periodic: Option<schedule::Period<BlockNumberFor<T>>> priority: schedule::Priority call: Box<<T as Config>::RuntimeCall> ``` </details> -Anonymously schedule a task after a delay. +See [`Pallet::schedule_after`]. #### schedule_named_after - 5 @@ -121,15 +121,15 @@ No weight available. ```rust id: TaskName -after: T::BlockNumber -maybe_periodic: Option<schedule::Period<T::BlockNumber>> +after: BlockNumberFor<T> +maybe_periodic: Option<schedule::Period<BlockNumberFor<T>>> priority: schedule::Priority call: Box<<T as Config>::RuntimeCall> ``` </details> -Schedule a named task after a delay. +See [`Pallet::schedule_named_after`]. ### Babe - 3 @@ -140,16 +140,13 @@ Schedule a named task after a delay. No weight available. ```rust -equivocation_proof: Box<EquivocationProof<T::Header>> +equivocation_proof: Box<EquivocationProof<HeaderFor<T>>> key_owner_proof: T::KeyOwnerProof ``` </details> -Report authority equivocation/misbehavior. This method will verify -the equivocation proof and validate the given key ownership proof -against the extracted offender. If both are valid, the offence will -be reported. +See [`Pallet::report_equivocation`]. ### Balances - 6 @@ -157,7 +154,7 @@ be reported. <details><summary><code>transfer_allow_death(dest, value)</code></summary> -Taking 0.0129 % of a block. +Taking 0.0259 % of a block. ```rust dest: AccountIdLookupOf<T> @@ -166,40 +163,13 @@ value: T::Balance </details> -Transfer some liquid free balance to another account. - -`transfer_allow_death` will set the `FreeBalance` of the sender and receiver. -If the sender's account is below the existential deposit as a result -of the transfer, the account will be reaped. - -The dispatch origin for this call must be `Signed` by the transactor. - -#### set_balance_deprecated - 1 - -<details><summary><code>set_balance_deprecated(who, new_free, old_reserved)</code></summary> - -No weight available. - -```rust -who: AccountIdLookupOf<T> -new_free: T::Balance -old_reserved: T::Balance -``` -</details> - - -Set the regular balance of a given account; it also takes a reserved balance but this -must be the same as the account's current reserved balance. - -The dispatch origin for this call is `root`. - -WARNING: This call is DEPRECATED! Use `force_set_balance` instead. +See [`Pallet::transfer_allow_death`]. #### transfer_keep_alive - 3 <details><summary><code>transfer_keep_alive(dest, value)</code></summary> -Taking 0.0119 % of a block. +Taking 0.0181 % of a block. ```rust dest: AccountIdLookupOf<T> @@ -208,18 +178,13 @@ value: T::Balance </details> -Same as the [`transfer_allow_death`] call, but with a check that the transfer will not -kill the origin account. - -99% of the time you want [`transfer_allow_death`] instead. - -[`transfer_allow_death`]: struct.Pallet.html#method.transfer +See [`Pallet::transfer_keep_alive`]. #### transfer_all - 4 <details><summary><code>transfer_all(dest, keep_alive)</code></summary> -Taking 0.0122 % of a block. +Taking 0.0184 % of a block. ```rust dest: AccountIdLookupOf<T> @@ -228,38 +193,7 @@ keep_alive: bool </details> -Transfer the entire transferable balance from the caller account. - -NOTE: This function only attempts to transfer _transferable_ balances. This means that -any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be -transferred by this function. To ensure that this function results in a killed account, -you might need to prepare the account by removing any reference counters, storage -deposits, etc... - -The dispatch origin of this call must be Signed. - -- `dest`: The recipient of the transfer. -- `keep_alive`: A boolean to determine if the `transfer_all` operation should send all - of the funds the account has, causing the sender account to be killed (false), or - transfer everything except at least the existential deposit, which will guarantee to - keep the sender account alive (true). - -#### transfer - 7 - -<details><summary><code>transfer(dest, value)</code></summary> - -No weight available. - -```rust -dest: AccountIdLookupOf<T> -value: T::Balance -``` -</details> - - -Alias for `transfer_allow_death`, provided only for name-wise compatibility. - -WARNING: DEPRECATED! Will be released in approximately 3 months. +See [`Pallet::transfer_all`]. #### force_set_balance - 8 @@ -274,17 +208,15 @@ new_free: T::Balance </details> -Set the regular balance of a given account. - -The dispatch origin for this call is `root`. +See [`Pallet::force_set_balance`]. -### OneshotAccount - 7 +### OneshotAccount - 8 #### create_oneshot_account - 0 <details><summary><code>create_oneshot_account(dest, value)</code></summary> -Taking 0.0084 % of a block. +Taking 0.0114 % of a block. ```rust dest: <T::Lookup as StaticLookup>::Source @@ -293,40 +225,31 @@ value: <T::Currency as Currency<T::AccountId>>::Balance </details> -Create an account that can only be consumed once - -- `dest`: The oneshot account to be created. -- `balance`: The balance to be transfered to this oneshot account. - -Origin account is kept alive. +See [`Pallet::create_oneshot_account`]. #### consume_oneshot_account - 1 <details><summary><code>consume_oneshot_account(block_height, dest)</code></summary> -Taking 0.012 % of a block. +Taking 0.0198 % of a block. ```rust -block_height: T::BlockNumber +block_height: BlockNumberFor<T> dest: Account<<T::Lookup as StaticLookup>::Source> ``` </details> -Consume a oneshot account and transfer its balance to an account - -- `block_height`: Must be a recent block number. The limit is `BlockHashCount` in the past. (this is to prevent replay attacks) -- `dest`: The destination account. -- `dest_is_oneshot`: If set to `true`, then a oneshot account is created at `dest`. Else, `dest` has to be an existing account. +See [`Pallet::consume_oneshot_account`]. #### consume_oneshot_account_with_remaining - 2 <details><summary><code>consume_oneshot_account_with_remaining(block_height, dest, remaining_to, balance)</code></summary> -Taking 0.0155 % of a block. +Taking 0.0274 % of a block. ```rust -block_height: T::BlockNumber +block_height: BlockNumberFor<T> dest: Account<<T::Lookup as StaticLookup>::Source> remaining_to: Account<<T::Lookup as StaticLookup>::Source> balance: <T::Currency as Currency<T::AccountId>>::Balance @@ -334,16 +257,7 @@ balance: <T::Currency as Currency<T::AccountId>>::Balance </details> -Consume a oneshot account then transfer some amount to an account, -and the remaining amount to another account. - -- `block_height`: Must be a recent block number. - The limit is `BlockHashCount` in the past. (this is to prevent replay attacks) -- `dest`: The destination account. -- `dest_is_oneshot`: If set to `true`, then a oneshot account is created at `dest`. Else, `dest` has to be an existing account. -- `dest2`: The second destination account. -- `dest2_is_oneshot`: If set to `true`, then a oneshot account is created at `dest2`. Else, `dest2` has to be an existing account. -- `balance1`: The amount transfered to `dest`, the leftover being transfered to `dest2`. +See [`Pallet::consume_oneshot_account_with_remaining`]. ### SmithMembers - 10 @@ -351,7 +265,7 @@ and the remaining amount to another account. <details><summary><code>invite_smith(receiver)</code></summary> -Taking 0.0136 % of a block. +Taking 0.0247 % of a block. ```rust receiver: T::IdtyIndex @@ -359,26 +273,26 @@ receiver: T::IdtyIndex </details> - +See [`Pallet::invite_smith`]. #### accept_invitation - 1 <details><summary><code>accept_invitation()</code></summary> -Taking 0.0085 % of a block. +Taking 0.0124 % of a block. ```rust ``` </details> - +See [`Pallet::accept_invitation`]. #### certify_smith - 2 <details><summary><code>certify_smith(receiver)</code></summary> -Taking 0.0126 % of a block. +Taking 0.0222 % of a block. ```rust receiver: T::IdtyIndex @@ -386,7 +300,7 @@ receiver: T::IdtyIndex </details> - +See [`Pallet::certify_smith`]. ### AuthorityMembers - 11 @@ -394,33 +308,33 @@ receiver: T::IdtyIndex <details><summary><code>go_offline()</code></summary> -Taking 0.0103 % of a block. +Taking 0.0173 % of a block. ```rust ``` </details> -ask to leave the set of validators two sessions after +See [`Pallet::go_offline`]. #### go_online - 1 <details><summary><code>go_online()</code></summary> -Taking 0.0114 % of a block. +Taking 0.0199 % of a block. ```rust ``` </details> -ask to join the set of validators two sessions after +See [`Pallet::go_online`]. #### set_session_keys - 2 <details><summary><code>set_session_keys(keys)</code></summary> -Taking 0.0142 % of a block. +Taking 0.0261 % of a block. ```rust keys: T::Keys @@ -428,13 +342,13 @@ keys: T::Keys </details> -declare new session keys to replace current ones +See [`Pallet::set_session_keys`]. #### remove_member_from_blacklist - 4 <details><summary><code>remove_member_from_blacklist(member_id)</code></summary> -Taking 0.0079 % of a block. +Taking 0.0109 % of a block. ```rust member_id: T::MemberId @@ -442,7 +356,7 @@ member_id: T::MemberId </details> -remove an identity from the blacklist +See [`Pallet::remove_member_from_blacklist`]. ### Grandpa - 16 @@ -453,18 +367,15 @@ remove an identity from the blacklist No weight available. ```rust -equivocation_proof: Box<EquivocationProof<T::Hash, T::BlockNumber>> +equivocation_proof: Box<EquivocationProof<T::Hash, BlockNumberFor<T>>> key_owner_proof: T::KeyOwnerProof ``` </details> -Report voter equivocation/misbehavior. This method will verify the -equivocation proof and validate the given key ownership proof -against the extracted offender. If both are valid, the offence -will be reported. +See [`Pallet::report_equivocation`]. -### UpgradeOrigin - 21 +### UpgradeOrigin - 20 #### dispatch_as_root_unchecked_weight - 1 @@ -479,19 +390,15 @@ weight: Weight </details> -Dispatches a function call from root origin. -This function does not check the weight of the call, and instead allows the -caller to specify the weight of the call. - -The weight of this call is defined by the caller. +See [`Pallet::dispatch_as_root_unchecked_weight`]. -### Preimage - 22 +### Preimage - 21 #### note_preimage - 0 <details><summary><code>note_preimage(bytes)</code></summary> -Taking 0.2804 % of a block. +Taking 0.2863 % of a block. ```rust bytes: Vec<u8> @@ -499,16 +406,13 @@ bytes: Vec<u8> </details> -Register a preimage on-chain. - -If the preimage was previously requested, no fees or deposits are taken for providing -the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. +See [`Pallet::note_preimage`]. #### unnote_preimage - 1 <details><summary><code>unnote_preimage(hash)</code></summary> -Taking 0.0119 % of a block. +Taking 0.0187 % of a block. ```rust hash: T::Hash @@ -516,18 +420,13 @@ hash: T::Hash </details> -Clear an unrequested preimage from the runtime storage. - -If `len` is provided, then it will be a much cheaper operation. - -- `hash`: The hash of the preimage to be removed from the store. -- `len`: The length of the preimage of `hash`. +See [`Pallet::unnote_preimage`]. #### request_preimage - 2 <details><summary><code>request_preimage(hash)</code></summary> -Taking 0.0085 % of a block. +Taking 0.0127 % of a block. ```rust hash: T::Hash @@ -535,16 +434,13 @@ hash: T::Hash </details> -Request a preimage be uploaded to the chain without paying any fees or deposits. - -If the preimage requests has already been provided on-chain, we unreserve any deposit -a user may have paid, and take the control of the preimage out of their hands. +See [`Pallet::request_preimage`]. #### unrequest_preimage - 3 <details><summary><code>unrequest_preimage(hash)</code></summary> -Taking 0.0112 % of a block. +Taking 0.0186 % of a block. ```rust hash: T::Hash @@ -552,17 +448,29 @@ hash: T::Hash </details> -Clear a previously made request for a preimage. +See [`Pallet::unrequest_preimage`]. + +#### ensure_updated - 4 -NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. +<details><summary><code>ensure_updated(hashes)</code></summary> -### TechnicalCommittee - 23 +Taking 21.0381 % of a block. + +```rust +hashes: Vec<T::Hash> +``` +</details> + + +See [`Pallet::ensure_updated`]. + +### TechnicalCommittee - 22 #### execute - 1 <details><summary><code>execute(proposal, length_bound)</code></summary> -Taking 0.0056 % of a block. +Taking 0.0053 % of a block. ```rust proposal: Box<<T as Config<I>>::Proposal> @@ -571,15 +479,7 @@ length_bound: u32 </details> -Dispatch a proposal from a member using the `Member` origin. - -Origin must be a member of the collective. - -**Complexity**: -- `O(B + M + P)` where: -- `B` is `proposal` size in bytes (length-fee-bounded) -- `M` members-count (code-bounded) -- `P` complexity of dispatching `proposal` +See [`Pallet::execute`]. #### propose - 2 @@ -595,26 +495,13 @@ length_bound: u32 </details> -Add a new proposal to either be voted on or executed directly. - -Requires the sender to be member. - -`threshold` determines whether `proposal` is executed directly (`threshold < 2`) -or put up for voting. - -**Complexity** -- `O(B + M + P1)` or `O(B + M + P2)` where: - - `B` is `proposal` size in bytes (length-fee-bounded) - - `M` is members-count (code- and governance-bounded) - - branching is influenced by `threshold` where: - - `P1` is proposal execution complexity (`threshold < 2`) - - `P2` is proposals-count (code-bounded) (`threshold >= 2`) +See [`Pallet::propose`]. #### vote - 3 <details><summary><code>vote(proposal, index, approve)</code></summary> -Taking 0.0088 % of a block. +Taking 0.0127 % of a block. ```rust proposal: T::Hash @@ -624,15 +511,7 @@ approve: bool </details> -Add an aye or nay vote for the sender to the given proposal. - -Requires the sender to be a member. - -Transaction fees will be waived if the member is voting on any particular proposal -for the first time and the call is successful. Subsequent vote changes will charge a -fee. -**Complexity** -- `O(M)` where `M` is members-count (code- and governance-bounded) +See [`Pallet::vote`]. #### close - 6 @@ -649,51 +528,28 @@ length_bound: u32 </details> -Close a vote that is either approved, disapproved or whose voting period has ended. - -May be called by any signed account in order to finish voting and close the proposal. - -If called before the end of the voting period it will only close the vote if it is -has enough votes to be approved or disapproved. +See [`Pallet::close`]. -If called after the end of the voting period abstentions are counted as rejections -unless there is a prime member set and the prime member cast an approval. - -If the close operation completes successfully with disapproval, the transaction fee will -be waived. Otherwise execution of the approved operation will be charged to the caller. - -+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed -proposal. -+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via -`storage::read` so it is `size_of::<u32>() == 4` larger than the pure length. - -**Complexity** -- `O(B + M + P1 + P2)` where: - - `B` is `proposal` size in bytes (length-fee-bounded) - - `M` is members-count (code- and governance-bounded) - - `P1` is the complexity of `proposal` preimage. - - `P2` is proposal-count (code-bounded) - -### UniversalDividend - 30 +### UniversalDividend - 23 #### claim_uds - 0 <details><summary><code>claim_uds()</code></summary> -Taking 0.0131 % of a block. +Taking 0.0224 % of a block. ```rust ``` </details> -Claim Universal Dividends +See [`Pallet::claim_uds`]. #### transfer_ud - 1 <details><summary><code>transfer_ud(dest, value)</code></summary> -Taking 0.0134 % of a block. +Taking 0.027 % of a block. ```rust dest: <T::Lookup as StaticLookup>::Source @@ -702,13 +558,13 @@ value: BalanceOf<T> </details> -Transfer some liquid free balance to another account, in milliUD. +See [`Pallet::transfer_ud`]. #### transfer_ud_keep_alive - 2 <details><summary><code>transfer_ud_keep_alive(dest, value)</code></summary> -Taking 0.0125 % of a block. +Taking 0.0193 % of a block. ```rust dest: <T::Lookup as StaticLookup>::Source @@ -717,15 +573,15 @@ value: BalanceOf<T> </details> -Transfer some liquid free balance to another account, in milliUD. +See [`Pallet::transfer_ud_keep_alive`]. -### Identity - 41 +### Identity - 25 #### create_identity - 0 <details><summary><code>create_identity(owner_key)</code></summary> -Taking 0.0439 % of a block. +Taking 0.0918 % of a block. ```rust owner_key: T::AccountId @@ -733,17 +589,13 @@ owner_key: T::AccountId </details> -Create an identity for an existing account - -- `owner_key`: the public key corresponding to the identity to be created - -The origin must be allowed to create an identity. +See [`Pallet::create_identity`]. #### confirm_identity - 1 <details><summary><code>confirm_identity(idty_name)</code></summary> -Taking 0.0181 % of a block. +Taking 0.0341 % of a block. ```rust idty_name: IdtyName @@ -751,17 +603,13 @@ idty_name: IdtyName </details> -Confirm the creation of an identity and give it a name - -- `idty_name`: the name uniquely associated to this identity. Must match the validation rules defined by the runtime. - -The identity must have been created using `create_identity` before it can be confirmed. +See [`Pallet::confirm_identity`]. #### change_owner_key - 3 <details><summary><code>change_owner_key(new_key, new_key_sig)</code></summary> -Taking 0.0238 % of a block. +Taking 0.0437 % of a block. ```rust new_key: T::AccountId @@ -770,19 +618,13 @@ new_key_sig: T::Signature </details> -Change identity owner key. - -- `new_key`: the new owner key. -- `new_key_sig`: the signature of the encoded form of `IdtyIndexAccountIdPayload`. - Must be signed by `new_key`. - -The origin should be the old identity owner key. +See [`Pallet::change_owner_key`]. #### revoke_identity - 4 <details><summary><code>revoke_identity(idty_index, revocation_key, revocation_sig)</code></summary> -Taking 0.0227 % of a block. +Taking 0.042 % of a block. ```rust idty_index: T::IdtyIndex @@ -792,20 +634,13 @@ revocation_sig: T::Signature </details> -Revoke an identity using a revocation signature - -- `idty_index`: the index of the identity to be revoked. -- `revocation_key`: the key used to sign the revocation payload. -- `revocation_sig`: the signature of the encoded form of `RevocationPayload`. - Must be signed by `revocation_key`. - -Any signed origin can execute this call. +See [`Pallet::revoke_identity`]. #### fix_sufficients - 7 <details><summary><code>fix_sufficients(owner_key, inc)</code></summary> -Taking 0.0077 % of a block. +Taking 0.0109 % of a block. ```rust owner_key: T::AccountId @@ -814,13 +649,13 @@ inc: bool </details> -change sufficient ref count for given key +See [`Pallet::fix_sufficients`]. #### link_account - 8 <details><summary><code>link_account(account_id, payload_sig)</code></summary> -Taking 0.011 % of a block. +Taking 0.0157 % of a block. ```rust account_id: T::AccountId @@ -829,15 +664,15 @@ payload_sig: T::Signature </details> -Link an account to an identity +See [`Pallet::link_account`]. -### Certification - 43 +### Certification - 27 #### add_cert - 0 <details><summary><code>add_cert(issuer, receiver)</code></summary> -Taking 0.019 % of a block. +Taking 0.0365 % of a block. ```rust issuer: T::IdtyIndex @@ -846,17 +681,13 @@ receiver: T::IdtyIndex </details> -Add a new certification or renew an existing one - -- `receiver`: the account receiving the certification from the origin - -The origin must be allow to certify. +See [`Pallet::add_cert`]. #### del_cert - 1 <details><summary><code>del_cert(issuer, receiver)</code></summary> -Taking 0.0153 % of a block. +Taking 0.0281 % of a block. ```rust issuer: T::IdtyIndex @@ -865,13 +696,13 @@ receiver: T::IdtyIndex </details> -remove a certification (only root) +See [`Pallet::del_cert`]. #### remove_all_certs_received_by - 2 <details><summary><code>remove_all_certs_received_by(idty_index)</code></summary> -Taking 3.5004 % of a block. +Taking 7.4368 % of a block. ```rust idty_index: T::IdtyIndex @@ -879,30 +710,28 @@ idty_index: T::IdtyIndex </details> -remove all certifications received by an identity (only root) +See [`Pallet::remove_all_certs_received_by`]. -### Distance - 44 +### Distance - 28 #### request_distance_evaluation - 0 <details><summary><code>request_distance_evaluation()</code></summary> -Taking 0.06 % of a block. +Taking 0.0338 % of a block. ```rust ``` </details> -Request caller identity to be evaluated -positive evaluation will result in claim/renew membership -negative evaluation will result in slash for caller +See [`Pallet::request_distance_evaluation`]. #### request_distance_evaluation_for - 4 <details><summary><code>request_distance_evaluation_for(target)</code></summary> -Taking 0.0805 % of a block. +Taking 0.0351 % of a block. ```rust target: T::IdtyIndex @@ -910,14 +739,13 @@ target: T::IdtyIndex </details> -Request target identity to be evaluated -only possible for unvalidated identity +See [`Pallet::request_distance_evaluation_for`]. #### update_evaluation - 1 <details><summary><code>update_evaluation(computation_result)</code></summary> -Taking 0.0914 % of a block. +Taking 0.0323 % of a block. ```rust computation_result: ComputationResult @@ -925,14 +753,13 @@ computation_result: ComputationResult </details> -(Inherent) Push an evaluation result to the pool -this is called internally by validators (= inherent) +See [`Pallet::update_evaluation`]. #### force_update_evaluation - 2 <details><summary><code>force_update_evaluation(evaluator, computation_result)</code></summary> -Taking 0.0759 % of a block. +Taking 0.0154 % of a block. ```rust evaluator: <T as frame_system::Config>::AccountId @@ -941,13 +768,13 @@ computation_result: ComputationResult </details> -Force push an evaluation result to the pool +See [`Pallet::force_update_evaluation`]. #### force_valid_distance_status - 3 <details><summary><code>force_valid_distance_status(identity)</code></summary> -Taking 0.074 % of a block. +Taking 0.0281 % of a block. ```rust identity: <T as pallet_identity::Config>::IdtyIndex @@ -955,9 +782,9 @@ identity: <T as pallet_identity::Config>::IdtyIndex </details> -Force set the distance evaluation status of an identity +See [`Pallet::force_valid_distance_status`]. -### AtomicSwap - 50 +### AtomicSwap - 29 #### create_swap - 0 @@ -969,23 +796,12 @@ No weight available. target: T::AccountId hashed_proof: HashedProof action: T::SwapAction -duration: T::BlockNumber +duration: BlockNumberFor<T> ``` </details> -Register a new atomic swap, declaring an intention to send funds from origin to target -on the current blockchain. The target can claim the fund using the revealed proof. If -the fund is not claimed after `duration` blocks, then the sender can cancel the swap. - -The dispatch origin for this call must be _Signed_. - -- `target`: Receiver of the atomic swap. -- `hashed_proof`: The blake2_256 hash of the secret proof. -- `balance`: Funds to be sent from origin. -- `duration`: Locked duration of the atomic swap. For safety reasons, it is recommended - that the revealer uses a shorter duration than the counterparty, to prevent the - situation where the revealer reveals the proof too late around the end block. +See [`Pallet::create_swap`]. #### claim_swap - 1 @@ -1000,13 +816,7 @@ action: T::SwapAction </details> -Claim an atomic swap. - -The dispatch origin for this call must be _Signed_. - -- `proof`: Revealed proof of the claim. -- `action`: Action defined in the swap, it must match the entry in blockchain. Otherwise - the operation fails. This is used for weight calculation. +See [`Pallet::claim_swap`]. #### cancel_swap - 2 @@ -1021,20 +831,15 @@ hashed_proof: HashedProof </details> -Cancel an atomic swap. Only possible after the originally set duration has passed. +See [`Pallet::cancel_swap`]. -The dispatch origin for this call must be _Signed_. - -- `target`: Target of the original atomic swap. -- `hashed_proof`: Hashed proof of the original atomic swap. - -### Multisig - 51 +### Multisig - 30 #### as_multi_threshold_1 - 0 <details><summary><code>as_multi_threshold_1(other_signatories, call)</code></summary> -Taking 0.0049 % of a block. +Taking 0.004 % of a block. ```rust other_signatories: Vec<T::AccountId> @@ -1043,18 +848,7 @@ call: Box<<T as Config>::RuntimeCall> </details> -Immediately dispatch a multi-signature call using a single approval from the caller. - -The dispatch origin for this call must be _Signed_. - -- `other_signatories`: The accounts (other than the sender) who are part of the -multi-signature, but do not participate in the approval process. -- `call`: The call to be executed. - -Result is equivalent to the dispatched result. - -**Complexity** -O(Z + C) where Z is the length of the call and C its execution weight. +See [`Pallet::as_multi_threshold_1`]. #### as_multi - 1 @@ -1065,52 +859,14 @@ No weight available. ```rust threshold: u16 other_signatories: Vec<T::AccountId> -maybe_timepoint: Option<Timepoint<T::BlockNumber>> +maybe_timepoint: Option<Timepoint<BlockNumberFor<T>>> call: Box<<T as Config>::RuntimeCall> max_weight: Weight ``` </details> -Register approval for a dispatch to be made from a deterministic composite account if -approved by a total of `threshold - 1` of `other_signatories`. - -If there are enough, then dispatch the call. - -Payment: `DepositBase` will be reserved if this is the first approval, plus -`threshold` times `DepositFactor`. It is returned once this dispatch happens or -is cancelled. - -The dispatch origin for this call must be _Signed_. - -- `threshold`: The total number of approvals for this dispatch before it is executed. -- `other_signatories`: The accounts (other than the sender) who can approve this -dispatch. May not be empty. -- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is -not the first approval, then it must be `Some`, with the timepoint (block number and -transaction index) of the first approval transaction. -- `call`: The call to be executed. - -NOTE: Unless this is the final approval, you will generally want to use -`approve_as_multi` instead, since it only requires a hash of the call. - -Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise -on success, result is `Ok` and the result from the interior call, if it was executed, -may be found in the deposited `MultisigExecuted` event. - -**Complexity** -- `O(S + Z + Call)`. -- Up to one balance-reserve or unreserve operation. -- One passthrough operation, one insert, both `O(S)` where `S` is the number of - signatories. `S` is capped by `MaxSignatories`, with weight being proportional. -- One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. -- One encode & hash, both of complexity `O(S)`. -- Up to one binary search and insert (`O(logS + S)`). -- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. -- One event. -- The weight of the `call`. -- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit - taken for its lifetime of `DepositBase + threshold * DepositFactor`. +See [`Pallet::as_multi`]. #### approve_as_multi - 2 @@ -1121,88 +877,39 @@ No weight available. ```rust threshold: u16 other_signatories: Vec<T::AccountId> -maybe_timepoint: Option<Timepoint<T::BlockNumber>> +maybe_timepoint: Option<Timepoint<BlockNumberFor<T>>> call_hash: [u8; 32] max_weight: Weight ``` </details> -Register approval for a dispatch to be made from a deterministic composite account if -approved by a total of `threshold - 1` of `other_signatories`. - -Payment: `DepositBase` will be reserved if this is the first approval, plus -`threshold` times `DepositFactor`. It is returned once this dispatch happens or -is cancelled. - -The dispatch origin for this call must be _Signed_. - -- `threshold`: The total number of approvals for this dispatch before it is executed. -- `other_signatories`: The accounts (other than the sender) who can approve this -dispatch. May not be empty. -- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is -not the first approval, then it must be `Some`, with the timepoint (block number and -transaction index) of the first approval transaction. -- `call_hash`: The hash of the call to be executed. - -NOTE: If this is the final approval, you will want to use `as_multi` instead. - -**Complexity** -- `O(S)`. -- Up to one balance-reserve or unreserve operation. -- One passthrough operation, one insert, both `O(S)` where `S` is the number of - signatories. `S` is capped by `MaxSignatories`, with weight being proportional. -- One encode & hash, both of complexity `O(S)`. -- Up to one binary search and insert (`O(logS + S)`). -- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. -- One event. -- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit - taken for its lifetime of `DepositBase + threshold * DepositFactor`. +See [`Pallet::approve_as_multi`]. #### cancel_as_multi - 3 <details><summary><code>cancel_as_multi(threshold, other_signatories, timepoint, call_hash)</code></summary> -Taking 0.0088 % of a block. +Taking 0.0118 % of a block. ```rust threshold: u16 other_signatories: Vec<T::AccountId> -timepoint: Timepoint<T::BlockNumber> +timepoint: Timepoint<BlockNumberFor<T>> call_hash: [u8; 32] ``` </details> -Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously -for this operation will be unreserved on success. - -The dispatch origin for this call must be _Signed_. +See [`Pallet::cancel_as_multi`]. -- `threshold`: The total number of approvals for this dispatch before it is executed. -- `other_signatories`: The accounts (other than the sender) who can approve this -dispatch. May not be empty. -- `timepoint`: The timepoint (block number and transaction index) of the first approval -transaction for this dispatch. -- `call_hash`: The hash of the call to be executed. - -**Complexity** -- `O(S)`. -- Up to one balance-reserve or unreserve operation. -- One passthrough operation, one insert, both `O(S)` where `S` is the number of - signatories. `S` is capped by `MaxSignatories`, with weight being proportional. -- One encode & hash, both of complexity `O(S)`. -- One event. -- I/O: 1 read `O(S)`, one remove. -- Storage: removes one item. - -### ProvideRandomness - 52 +### ProvideRandomness - 31 #### request - 0 <details><summary><code>request(randomness_type, salt)</code></summary> -Taking 0.0191 % of a block. +Taking 0.0426 % of a block. ```rust randomness_type: RandomnessType @@ -1211,15 +918,15 @@ salt: H256 </details> -Request a randomness +See [`Pallet::request`]. -### Proxy - 53 +### Proxy - 32 #### proxy - 0 <details><summary><code>proxy(real, force_proxy_type, call)</code></summary> -Taking 0.0055 % of a block. +Taking 0.0054 % of a block. ```rust real: AccountIdLookupOf<T> @@ -1229,151 +936,92 @@ call: Box<<T as Config>::RuntimeCall> </details> -Dispatch the given `call` from an account that the sender is authorised for through -`add_proxy`. - -The dispatch origin for this call must be _Signed_. - -Parameters: -- `real`: The account that the proxy will make a call on behalf of. -- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. -- `call`: The call to be made by the `real` account. +See [`Pallet::proxy`]. #### add_proxy - 1 <details><summary><code>add_proxy(delegate, proxy_type, delay)</code></summary> -Taking 0.0085 % of a block. +Taking 0.0115 % of a block. ```rust delegate: AccountIdLookupOf<T> proxy_type: T::ProxyType -delay: T::BlockNumber +delay: BlockNumberFor<T> ``` </details> -Register a proxy account for the sender that is able to make calls on its behalf. - -The dispatch origin for this call must be _Signed_. - -Parameters: -- `proxy`: The account that the `caller` would like to make a proxy. -- `proxy_type`: The permissions allowed for this proxy account. -- `delay`: The announcement period required of the initial proxy. Will generally be -zero. +See [`Pallet::add_proxy`]. #### remove_proxy - 2 <details><summary><code>remove_proxy(delegate, proxy_type, delay)</code></summary> -Taking 0.0085 % of a block. +Taking 0.0115 % of a block. ```rust delegate: AccountIdLookupOf<T> proxy_type: T::ProxyType -delay: T::BlockNumber +delay: BlockNumberFor<T> ``` </details> -Unregister a proxy account for the sender. - -The dispatch origin for this call must be _Signed_. - -Parameters: -- `proxy`: The account that the `caller` would like to remove as a proxy. -- `proxy_type`: The permissions currently enabled for the removed proxy account. +See [`Pallet::remove_proxy`]. #### remove_proxies - 3 <details><summary><code>remove_proxies()</code></summary> -Taking 0.0084 % of a block. +Taking 0.0115 % of a block. ```rust ``` </details> -Unregister all proxy accounts for the sender. - -The dispatch origin for this call must be _Signed_. - -WARNING: This may be called on accounts created by `pure`, however if done, then -the unreserved fees will be inaccessible. **All access to this account will be lost.** +See [`Pallet::remove_proxies`]. #### create_pure - 4 <details><summary><code>create_pure(proxy_type, delay, index)</code></summary> -Taking 0.0085 % of a block. +Taking 0.0115 % of a block. ```rust proxy_type: T::ProxyType -delay: T::BlockNumber +delay: BlockNumberFor<T> index: u16 ``` </details> -Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and -initialize it with a proxy of `proxy_type` for `origin` sender. - -Requires a `Signed` origin. - -- `proxy_type`: The type of the proxy that the sender will be registered as over the -new account. This will almost always be the most permissive `ProxyType` possible to -allow for maximum flexibility. -- `index`: A disambiguation index, in case this is called multiple times in the same -transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just -want to use `0`. -- `delay`: The announcement period required of the initial proxy. Will generally be -zero. - -Fails with `Duplicate` if this has already been called in this transaction, from the -same sender, with the same parameters. - -Fails if there are insufficient funds to pay for deposit. +See [`Pallet::create_pure`]. #### kill_pure - 5 <details><summary><code>kill_pure(spawner, proxy_type, index, height, ext_index)</code></summary> -Taking 0.0084 % of a block. +Taking 0.0115 % of a block. ```rust spawner: AccountIdLookupOf<T> proxy_type: T::ProxyType index: u16 -height: T::BlockNumber +height: BlockNumberFor<T> ext_index: u32 ``` </details> -Removes a previously spawned pure proxy. - -WARNING: **All access to this account will be lost.** Any funds held in it will be -inaccessible. - -Requires a `Signed` origin, and the sender account must have been created by a call to -`pure` with corresponding parameters. - -- `spawner`: The account that originally called `pure` to create this account. -- `index`: The disambiguation index originally passed to `pure`. Probably `0`. -- `proxy_type`: The proxy type originally passed to `pure`. -- `height`: The height of the chain when the call to `pure` was processed. -- `ext_index`: The extrinsic index in which the call to `pure` was processed. - -Fails with `NoPermission` in case the caller is not a previously created pure -account whose `pure` call has corresponding parameters. +See [`Pallet::kill_pure`]. #### announce - 6 <details><summary><code>announce(real, call_hash)</code></summary> -Taking 0.0123 % of a block. +Taking 0.0202 % of a block. ```rust real: AccountIdLookupOf<T> @@ -1382,27 +1030,13 @@ call_hash: CallHashOf<T> </details> -Publish the hash of a proxy-call that will be made in the future. - -This must be called some number of blocks before the corresponding `proxy` is attempted -if the delay associated with the proxy relationship is greater than zero. - -No more than `MaxPending` announcements may be made at any one time. - -This will take a deposit of `AnnouncementDepositFactor` as well as -`AnnouncementDepositBase` if there are no other pending announcements. - -The dispatch origin for this call must be _Signed_ and a proxy of `real`. - -Parameters: -- `real`: The account that the proxy will make a call on behalf of. -- `call_hash`: The hash of the call to be made by the `real` account. +See [`Pallet::announce`]. #### remove_announcement - 7 <details><summary><code>remove_announcement(real, call_hash)</code></summary> -Taking 0.0116 % of a block. +Taking 0.0187 % of a block. ```rust real: AccountIdLookupOf<T> @@ -1411,22 +1045,13 @@ call_hash: CallHashOf<T> </details> -Remove a given announcement. - -May be called by a proxy account to remove a call they previously announced and return -the deposit. - -The dispatch origin for this call must be _Signed_. - -Parameters: -- `real`: The account that the proxy will make a call on behalf of. -- `call_hash`: The hash of the call to be made by the `real` account. +See [`Pallet::remove_announcement`]. #### reject_announcement - 8 <details><summary><code>reject_announcement(delegate, call_hash)</code></summary> -Taking 0.0116 % of a block. +Taking 0.0187 % of a block. ```rust delegate: AccountIdLookupOf<T> @@ -1435,22 +1060,13 @@ call_hash: CallHashOf<T> </details> -Remove the given announcement of a delegate. - -May be called by a target (proxied) account to remove a call that one of their delegates -(`delegate`) has announced they want to execute. The deposit is returned. - -The dispatch origin for this call must be _Signed_. - -Parameters: -- `delegate`: The account that previously announced the call. -- `call_hash`: The hash of the call to be made. +See [`Pallet::reject_announcement`]. #### proxy_announced - 9 <details><summary><code>proxy_announced(delegate, real, force_proxy_type, call)</code></summary> -Taking 0.0125 % of a block. +Taking 0.0204 % of a block. ```rust delegate: AccountIdLookupOf<T> @@ -1461,25 +1077,15 @@ call: Box<<T as Config>::RuntimeCall> </details> -Dispatch the given `call` from an account that the sender is authorized for through -`add_proxy`. - -Removes any corresponding announcement(s). +See [`Pallet::proxy_announced`]. -The dispatch origin for this call must be _Signed_. - -Parameters: -- `real`: The account that the proxy will make a call on behalf of. -- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. -- `call`: The call to be made by the `real` account. - -### Utility - 54 +### Utility - 33 #### batch - 0 <details><summary><code>batch(calls)</code></summary> -Taking 0.1825 % of a block. +Taking 0.1101 % of a block. ```rust calls: Vec<<T as Config>::RuntimeCall> @@ -1487,30 +1093,13 @@ calls: Vec<<T as Config>::RuntimeCall> </details> -Send a batch of dispatch calls. - -May be called from any origin except `None`. - -- `calls`: The calls to be dispatched from the same origin. The number of call must not - exceed the constant: `batched_calls_limit` (available in constant metadata). - -If origin is root then the calls are dispatched without checking origin filter. (This -includes bypassing `frame_system::Config::BaseCallFilter`). - -**Complexity** -- O(C) where C is the number of calls to be batched. - -This will return `Ok` in all circumstances. To determine the success of the batch, an -event is deposited. If a call failed and the batch was interrupted, then the -`BatchInterrupted` event is deposited, along with the number of successful calls made -and the error of the failed call. If all were successful, then the `BatchCompleted` -event is deposited. +See [`Pallet::batch`]. #### as_derivative - 1 <details><summary><code>as_derivative(index, call)</code></summary> -Taking 0.0046 % of a block. +Taking 0.0037 % of a block. ```rust index: u16 @@ -1519,25 +1108,13 @@ call: Box<<T as Config>::RuntimeCall> </details> -Send a call through an indexed pseudonym of the sender. - -Filter from origin are passed along. The call will be dispatched with an origin which -use the same filter as the origin of this call. - -NOTE: If you need to ensure that any account-based filtering is not honored (i.e. -because you expect `proxy` to have been used prior in the call stack and you do not want -the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` -in the Multisig pallet instead. - -NOTE: Prior to version *12, this was called `as_limited_sub`. - -The dispatch origin for this call must be _Signed_. +See [`Pallet::as_derivative`]. #### batch_all - 2 <details><summary><code>batch_all(calls)</code></summary> -Taking 0.1899 % of a block. +Taking 0.1218 % of a block. ```rust calls: Vec<<T as Config>::RuntimeCall> @@ -1545,25 +1122,13 @@ calls: Vec<<T as Config>::RuntimeCall> </details> -Send a batch of dispatch calls and atomically execute them. -The whole transaction will rollback and fail if any of the calls failed. - -May be called from any origin except `None`. - -- `calls`: The calls to be dispatched from the same origin. The number of call must not - exceed the constant: `batched_calls_limit` (available in constant metadata). - -If origin is root then the calls are dispatched without checking origin filter. (This -includes bypassing `frame_system::Config::BaseCallFilter`). - -**Complexity** -- O(C) where C is the number of calls to be batched. +See [`Pallet::batch_all`]. #### force_batch - 4 <details><summary><code>force_batch(calls)</code></summary> -Taking 0.1833 % of a block. +Taking 0.1076 % of a block. ```rust calls: Vec<<T as Config>::RuntimeCall> @@ -1571,19 +1136,7 @@ calls: Vec<<T as Config>::RuntimeCall> </details> -Send a batch of dispatch calls. -Unlike `batch`, it allows errors and won't interrupt. - -May be called from any origin except `None`. - -- `calls`: The calls to be dispatched from the same origin. The number of call must not - exceed the constant: `batched_calls_limit` (available in constant metadata). - -If origin is root then the calls are dispatch without checking origin filter. (This -includes bypassing `frame_system::Config::BaseCallFilter`). - -**Complexity** -- O(C) where C is the number of calls to be batched. +See [`Pallet::force_batch`]. #### with_weight - 5 @@ -1598,20 +1151,15 @@ weight: Weight </details> -Dispatch a function call with a specified weight. - -This function does not check the weight of the call, and instead allows the -Root origin to specify the weight of the call. +See [`Pallet::with_weight`]. -The dispatch origin for this call must be _Root_. - -### Treasury - 55 +### Treasury - 34 #### propose_spend - 0 <details><summary><code>propose_spend(value, beneficiary)</code></summary> -Taking 0.0111 % of a block. +Taking 0.0173 % of a block. ```rust value: BalanceOf<T, I> @@ -1620,18 +1168,13 @@ beneficiary: AccountIdLookupOf<T> </details> -Put forward a suggestion for spending. A deposit proportional to the value -is reserved and slashed if the proposal is rejected. It is returned once the -proposal is awarded. - -**Complexity** -- O(1) +See [`Pallet::propose_spend`]. -#### spend - 3 +#### spend_local - 3 -<details><summary><code>spend(amount, beneficiary)</code></summary> +<details><summary><code>spend_local(amount, beneficiary)</code></summary> -Taking 0.0045 % of a block. +Taking 0.0035 % of a block. ```rust amount: BalanceOf<T, I> @@ -1640,20 +1183,13 @@ beneficiary: AccountIdLookupOf<T> </details> -Propose and approve a spend of treasury funds. - -- `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`. -- `amount`: The amount to be transferred from the treasury to the `beneficiary`. -- `beneficiary`: The destination account for the transfer. - -NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the -beneficiary. +See [`Pallet::spend_local`]. #### remove_approval - 4 <details><summary><code>remove_approval(proposal_id)</code></summary> -Taking 0.0077 % of a block. +Taking 0.0108 % of a block. ```rust proposal_id: ProposalIndex @@ -1661,25 +1197,72 @@ proposal_id: ProposalIndex </details> -Force a previously approved proposal to be removed from the approval queue. -The original deposit will no longer be returned. +See [`Pallet::remove_approval`]. + +#### spend - 5 + +<details><summary><code>spend(asset_kind, amount, beneficiary, valid_from)</code></summary> + +Taking 0.0035 % of a block. + +```rust +asset_kind: Box<T::AssetKind> +amount: AssetBalanceOf<T, I> +beneficiary: Box<BeneficiaryLookupOf<T, I>> +valid_from: Option<BlockNumberFor<T>> +``` +</details> + + +See [`Pallet::spend`]. + +#### payout - 6 + +<details><summary><code>payout(index)</code></summary> + +Taking 0.0035 % of a block. + +```rust +index: SpendIndex +``` +</details> + + +See [`Pallet::payout`]. + +#### check_status - 7 + +<details><summary><code>check_status(index)</code></summary> -May only be called from `T::RejectOrigin`. -- `proposal_id`: The index of a proposal +Taking 0.0035 % of a block. + +```rust +index: SpendIndex +``` +</details> -**Complexity** -- O(A) where `A` is the number of approvals -Errors: -- `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue, -i.e., the proposal has not been approved. This could also mean the proposal does not -exist altogether, thus there is no way it would have been approved in the first place. +See [`Pallet::check_status`]. + +#### void_spend - 8 + +<details><summary><code>void_spend(index)</code></summary> + +Taking 0.0035 % of a block. + +```rust +index: SpendIndex +``` +</details> + + +See [`Pallet::void_spend`]. ## Root calls -There are **15** root calls from **8** pallets. +There are **18** root calls from **8** pallets. ### System - 0 @@ -1687,7 +1270,7 @@ There are **15** root calls from **8** pallets. <details><summary><code>set_heap_pages(pages)</code></summary> -Taking 0.0101 % of a block. +Taking 0.0165 % of a block. ```rust pages: u64 @@ -1695,13 +1278,13 @@ pages: u64 </details> -Set the number of pages in the WebAssembly environment's heap. +See [`Pallet::set_heap_pages`]. #### set_code - 2 <details><summary><code>set_code(code)</code></summary> -No weight available. +Taking 3.9604 % of a block. ```rust code: Vec<u8> @@ -1709,10 +1292,7 @@ code: Vec<u8> </details> -Set the new runtime code. - -**Complexity** -- `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` +See [`Pallet::set_code`]. #### set_code_without_checks - 3 @@ -1726,16 +1306,13 @@ code: Vec<u8> </details> -Set the new runtime code without doing any checks of the given `code`. - -**Complexity** -- `O(C)` where `C` length of `code` +See [`Pallet::set_code_without_checks`]. #### set_storage - 4 <details><summary><code>set_storage(items)</code></summary> -Taking 2.6239 % of a block. +Taking 5.8783 % of a block. ```rust items: Vec<KeyValue> @@ -1743,13 +1320,13 @@ items: Vec<KeyValue> </details> -Set some items of storage. +See [`Pallet::set_storage`]. #### kill_storage - 5 <details><summary><code>kill_storage(keys)</code></summary> -Taking 2.6145 % of a block. +Taking 5.8703 % of a block. ```rust keys: Vec<Key> @@ -1757,13 +1334,13 @@ keys: Vec<Key> </details> -Kill some items from storage. +See [`Pallet::kill_storage`]. #### kill_prefix - 6 <details><summary><code>kill_prefix(prefix, subkeys)</code></summary> -Taking 3.0011 % of a block. +Taking 7.0517 % of a block. ```rust prefix: Key @@ -1772,10 +1349,49 @@ subkeys: u32 </details> -Kill all storage items with a key that starts with the given prefix. +See [`Pallet::kill_prefix`]. + +#### authorize_upgrade - 9 + +<details><summary><code>authorize_upgrade(code_hash)</code></summary> + +Taking 0.0098 % of a block. + +```rust +code_hash: T::Hash +``` +</details> + + +See [`Pallet::authorize_upgrade`]. + +#### authorize_upgrade_without_checks - 10 + +<details><summary><code>authorize_upgrade_without_checks(code_hash)</code></summary> + +No weight available. + +```rust +code_hash: T::Hash +``` +</details> + + +See [`Pallet::authorize_upgrade_without_checks`]. + +#### apply_authorized_upgrade - 11 -**NOTE:** We rely on the Root origin to provide us the number of subkeys under -the prefix we are removing to accurately calculate the weight of this function. +<details><summary><code>apply_authorized_upgrade(code)</code></summary> + +Taking 4.1178 % of a block. + +```rust +code: Vec<u8> +``` +</details> + + +See [`Pallet::apply_authorized_upgrade`]. ### Babe - 3 @@ -1791,10 +1407,7 @@ config: NextConfigDescriptor </details> -Plan an epoch config change. The epoch config change is recorded and will be enacted on -the next call to `enact_epoch_change`. The config will be activated one epoch after. -Multiple calls to this method will replace any existing planned config change that had -not been enacted yet. +See [`Pallet::plan_config_change`]. ### Balances - 6 @@ -1802,7 +1415,7 @@ not been enacted yet. <details><summary><code>force_transfer(source, dest, value)</code></summary> -Taking 0.0157 % of a block. +Taking 0.0328 % of a block. ```rust source: AccountIdLookupOf<T> @@ -1812,14 +1425,13 @@ value: T::Balance </details> -Exactly as `transfer_allow_death`, except the origin must be root and the source account -may be specified. +See [`Pallet::force_transfer`]. #### force_unreserve - 5 <details><summary><code>force_unreserve(who, amount)</code></summary> -Taking 0.0081 % of a block. +Taking 0.0112 % of a block. ```rust who: AccountIdLookupOf<T> @@ -1828,9 +1440,7 @@ amount: T::Balance </details> -Unreserve some balance from a user by force. - -Can only be called by ROOT. +See [`Pallet::force_unreserve`]. ### AuthorityMembers - 11 @@ -1838,7 +1448,7 @@ Can only be called by ROOT. <details><summary><code>remove_member(member_id)</code></summary> -Taking 0.0345 % of a block. +Taking 0.0706 % of a block. ```rust member_id: T::MemberId @@ -1846,7 +1456,7 @@ member_id: T::MemberId </details> -remove an identity from the set of authorities +See [`Pallet::remove_member`]. ### Grandpa - 16 @@ -1857,32 +1467,21 @@ remove an identity from the set of authorities No weight available. ```rust -delay: T::BlockNumber -best_finalized_block_number: T::BlockNumber +delay: BlockNumberFor<T> +best_finalized_block_number: BlockNumberFor<T> ``` </details> -Note that the current authority set of the GRANDPA finality gadget has stalled. - -This will trigger a forced authority set change at the beginning of the next session, to -be enacted `delay` blocks after that. The `delay` should be high enough to safely assume -that the block signalling the forced change will not be re-orged e.g. 1000 blocks. -The block production rate (which may be slowed down because of finality lagging) should -be taken into account when choosing the `delay`. The GRANDPA voters based on the new -authority will start voting on top of `best_finalized_block_number` for new finalized -blocks. `best_finalized_block_number` should be the highest of the latest finalized -block of all validators of the new authority set. +See [`Pallet::note_stalled`]. -Only callable by root. - -### TechnicalCommittee - 23 +### TechnicalCommittee - 22 #### set_members - 0 <details><summary><code>set_members(new_members, prime, old_count)</code></summary> -Taking 0.0823 % of a block. +Taking 0.1692 % of a block. ```rust new_members: Vec<T::AccountId> @@ -1892,36 +1491,13 @@ old_count: MemberCount </details> -Set the collective's membership. - -- `new_members`: The new member list. Be nice to the chain and provide it sorted. -- `prime`: The prime member whose vote sets the default. -- `old_count`: The upper bound for the previous number of members in storage. Used for - weight estimation. - -The dispatch of this call must be `SetMembersOrigin`. - -NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but - the weight estimations rely on it to estimate dispatchable weight. - -WARNING: - -The `pallet-collective` can also be managed by logic outside of the pallet through the -implementation of the trait [`ChangeMembers`]. -Any call to `set_members` must be careful that the member set doesn't get out of sync -with other logic managing the member set. - -**Complexity**: -- `O(MP + N)` where: - - `M` old-members-count (code- and governance-bounded) - - `N` new-members-count (code- and governance-bounded) - - `P` proposals-count (code-bounded) +See [`Pallet::set_members`]. #### disapprove_proposal - 5 <details><summary><code>disapprove_proposal(proposal_hash)</code></summary> -Taking 0.0134 % of a block. +Taking 0.0229 % of a block. ```rust proposal_hash: T::Hash @@ -1929,24 +1505,15 @@ proposal_hash: T::Hash </details> -Disapprove a proposal, close, and remove it from the system, regardless of its current -state. - -Must be called by the Root origin. +See [`Pallet::disapprove_proposal`]. -Parameters: -* `proposal_hash`: The hash of the proposal that should be disapproved. - -**Complexity** -O(P) where P is the number of max proposals - -### Identity - 41 +### Identity - 25 #### prune_item_identities_names - 6 <details><summary><code>prune_item_identities_names(names)</code></summary> -Taking 2.6583 % of a block. +Taking 5.91 % of a block. ```rust names: Vec<IdtyName> @@ -1954,15 +1521,15 @@ names: Vec<IdtyName> </details> -remove identity names from storage +See [`Pallet::prune_item_identities_names`]. -### Utility - 54 +### Utility - 33 #### dispatch_as - 3 <details><summary><code>dispatch_as(as_origin, call)</code></summary> -Taking 0.0048 % of a block. +Taking 0.0038 % of a block. ```rust as_origin: Box<T::PalletsOrigin> @@ -1971,12 +1538,7 @@ call: Box<<T as Config>::RuntimeCall> </details> -Dispatches a function call with a provided origin. - -The dispatch origin for this call must be _Root_. - -**Complexity** -- O(1). +See [`Pallet::dispatch_as`]. @@ -1993,7 +1555,7 @@ There are **4** disabled calls from **2** pallets. <details><summary><code>remark(remark)</code></summary> -Taking 0.0544 % of a block. +Taking 0.0536 % of a block. ```rust remark: Vec<u8> @@ -2001,16 +1563,13 @@ remark: Vec<u8> </details> -Make some on-chain remark. - -**Complexity** -- `O(1)` +See [`Pallet::remark`]. #### remark_with_event - 7 <details><summary><code>remark_with_event(remark)</code></summary> -Taking 0.2043 % of a block. +Taking 0.2031 % of a block. ```rust remark: Vec<u8> @@ -2018,7 +1577,7 @@ remark: Vec<u8> </details> -Make some on-chain remark and emit event. +See [`Pallet::remark_with_event`]. ### Session - 15 @@ -2026,7 +1585,7 @@ Make some on-chain remark and emit event. <details><summary><code>set_keys(keys, proof)</code></summary> -Taking 0.0204 % of a block. +Taking 0.0398 % of a block. ```rust keys: T::Keys @@ -2035,37 +1594,18 @@ proof: Vec<u8> </details> -Sets the session key(s) of the function caller to `keys`. -Allows an account to set its session key prior to becoming a validator. -This doesn't take effect until the next session. - -The dispatch origin of this function must be signed. - -**Complexity** -- `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is - fixed. +See [`Pallet::set_keys`]. #### purge_keys - 1 <details><summary><code>purge_keys()</code></summary> -Taking 0.0185 % of a block. +Taking 0.0347 % of a block. ```rust ``` </details> -Removes any session key(s) of the function caller. - -This doesn't take effect until the next session. - -The dispatch origin of this function must be Signed and the account must be either be -convertible to a validator ID using the chain's typical addressing system (this usually -means being a controller account) or directly convertible into a validator ID (which -usually means being a stash account). - -**Complexity** -- `O(1)` in number of key types. Actual cost depends on the number of length of - `T::Keys::key_ids()` which is fixed. +See [`Pallet::purge_keys`]. diff --git a/docs/api/runtime-errors.md b/docs/api/runtime-errors.md index 620c1674c34a0644c650d1e06969d0c6dbe56460..10dcad178da2c4a59365b5c97a7f529f0805189b 100644 --- a/docs/api/runtime-errors.md +++ b/docs/api/runtime-errors.md @@ -1,6 +1,6 @@ # Runtime errors -There are **176** errors from **35** pallets. +There are **188** errors from **35** pallets. <ul> <li>System - 0 @@ -51,6 +51,20 @@ There is a non-zero reference count preventing the account from being purged. The origin filter prevent the call to be dispatched. </details> </li> +<li> +<details> +<summary> +<code>NothingAuthorized</code> - 6</summary> +No upgrade authorized. +</details> +</li> +<li> +<details> +<summary> +<code>Unauthorized</code> - 7</summary> +The submitted code is not authorized. +</details> +</li> </ul> </li> <li>Account - 1 @@ -210,11 +224,11 @@ Number of freezes exceed `MaxFreezes`. </li> </ul> </li> -<li>TransactionPayment - 32 +<li>TransactionPayment - 7 <ul> </ul> </li> -<li>OneshotAccount - 7 +<li>OneshotAccount - 8 <ul> <li> <details> @@ -267,7 +281,7 @@ Source oneshot account does not exist. </li> </ul> </li> -<li>Quota - 66 +<li>Quota - 9 <ul> </ul> </li> @@ -589,22 +603,22 @@ Duplicated heartbeat. <ul> </ul> </li> -<li>Sudo - 20 +<li>Sudo - 19 <ul> <li> <details> <summary> <code>RequireSudo</code> - 0</summary> -Sender must be the Sudo account +Sender must be the Sudo account. </details> </li> </ul> </li> -<li>UpgradeOrigin - 21 +<li>UpgradeOrigin - 20 <ul> </ul> </li> -<li>Preimage - 22 +<li>Preimage - 21 <ul> <li> <details> @@ -648,9 +662,23 @@ A preimage may not be removed when there are outstanding requests. The preimage request cannot be removed since no outstanding requests exist. </details> </li> +<li> +<details> +<summary> +<code>TooMany</code> - 6</summary> +More than `MAX_HASH_UPGRADE_BULK_COUNT` hashes were requested to be upgraded at once. +</details> +</li> +<li> +<details> +<summary> +<code>TooFew</code> - 7</summary> +Too few hashes were requested to be upgraded (i.e. zero). +</details> +</li> </ul> </li> -<li>TechnicalCommittee - 23 +<li>TechnicalCommittee - 22 <ul> <li> <details> @@ -722,9 +750,16 @@ The given weight bound for the proposal was too low. The given length bound for the proposal was too low. </details> </li> +<li> +<details> +<summary> +<code>PrimeAccountNotMember</code> - 10</summary> +Prime account is not a member +</details> +</li> </ul> </li> -<li>UniversalDividend - 30 +<li>UniversalDividend - 23 <ul> <li> <details> @@ -735,7 +770,7 @@ This account is not allowed to claim UDs. </li> </ul> </li> -<li>Wot - 40 +<li>Wot - 24 <ul> <li> <details> @@ -795,7 +830,7 @@ Membership can only be renewed after an antispam delay. </li> </ul> </li> -<li>Identity - 41 +<li>Identity - 25 <ul> <li> <details> @@ -932,7 +967,7 @@ Cannot link to an inexisting account. </li> </ul> </li> -<li>Membership - 42 +<li>Membership - 26 <ul> <li> <details> @@ -964,7 +999,7 @@ Already member, can not claim membership. </li> </ul> </li> -<li>Certification - 43 +<li>Certification - 27 <ul> <li> <details> @@ -1003,7 +1038,7 @@ Identity has issued a certification too recently. </li> </ul> </li> -<li>Distance - 44 +<li>Distance - 28 <ul> <li> <details> @@ -1098,7 +1133,7 @@ Targeted distance evaluation request is only possible for an unvalidated identit </li> </ul> </li> -<li>AtomicSwap - 50 +<li>AtomicSwap - 29 <ul> <li> <details> @@ -1158,7 +1193,7 @@ Duration has not yet passed for the swap to be cancelled. </li> </ul> </li> -<li>Multisig - 51 +<li>Multisig - 30 <ul> <li> <details> @@ -1260,7 +1295,7 @@ The data to be stored is already stored. </li> </ul> </li> -<li>ProvideRandomness - 52 +<li>ProvideRandomness - 31 <ul> <li> <details> @@ -1271,7 +1306,7 @@ Request randomness queue is full. </li> </ul> </li> -<li>Proxy - 53 +<li>Proxy - 32 <ul> <li> <details> @@ -1331,7 +1366,7 @@ Cannot add self as proxy. </li> </ul> </li> -<li>Utility - 54 +<li>Utility - 33 <ul> <li> <details> @@ -1342,7 +1377,7 @@ Too many calls batched. </li> </ul> </li> -<li>Treasury - 55 +<li>Treasury - 34 <ul> <li> <details> @@ -1355,7 +1390,7 @@ Proposer's balance is too low. <details> <summary> <code>InvalidIndex</code> - 1</summary> -No proposal or bounty at that index. +No proposal, bounty or spend at that index. </details> </li> <li> @@ -1380,6 +1415,55 @@ amount to be spent. Proposal has not been approved. </details> </li> +<li> +<details> +<summary> +<code>FailedToConvertBalance</code> - 5</summary> +The balance of the asset kind is not convertible to the balance of the native asset. +</details> +</li> +<li> +<details> +<summary> +<code>SpendExpired</code> - 6</summary> +The spend has expired and cannot be claimed. +</details> +</li> +<li> +<details> +<summary> +<code>EarlyPayout</code> - 7</summary> +The spend is not yet eligible for payout. +</details> +</li> +<li> +<details> +<summary> +<code>AlreadyAttempted</code> - 8</summary> +The payment has already been attempted. +</details> +</li> +<li> +<details> +<summary> +<code>PayoutError</code> - 9</summary> +There was some issue with the mechanism of payment. +</details> +</li> +<li> +<details> +<summary> +<code>NotAttempted</code> - 10</summary> +The payout was not yet attempted/claimed. +</details> +</li> +<li> +<details> +<summary> +<code>Inconclusive</code> - 11</summary> +The payment has neither failed nor succeeded yet. +</details> +</li> </ul> </li> </ul> \ No newline at end of file diff --git a/docs/api/runtime-events.md b/docs/api/runtime-events.md index 566e7383905fab4996865f7a71390aefa0b0c6cb..8a6a8c0078dcb07dc56e7c73400bfcae4c472429 100644 --- a/docs/api/runtime-events.md +++ b/docs/api/runtime-events.md @@ -1,6 +1,6 @@ # Runtime events -There are **128** events from **35** pallets. +There are **135** events from **35** pallets. <ul> <li>System - 0 @@ -77,6 +77,19 @@ sender: T::AccountId hash: T::Hash ``` +</details> +</li> +<li> +<details> +<summary> +<code>UpgradeAuthorized(code_hash, check_version)</code> - 6</summary> +An upgrade was authorized. + +```rust +code_hash: T::Hash +check_version: bool +``` + </details> </li> </ul> @@ -145,7 +158,7 @@ The account was unlinked from its identity. Scheduled some task. ```rust -when: T::BlockNumber +when: BlockNumberFor<T> index: u32 ``` @@ -158,7 +171,7 @@ index: u32 Canceled some task. ```rust -when: T::BlockNumber +when: BlockNumberFor<T> index: u32 ``` @@ -171,7 +184,7 @@ index: u32 Dispatched some task. ```rust -task: TaskAddress<T::BlockNumber> +task: TaskAddress<BlockNumberFor<T>> id: Option<TaskName> result: DispatchResult ``` @@ -185,7 +198,7 @@ result: DispatchResult The call for the provided hash was not found so the task has been aborted. ```rust -task: TaskAddress<T::BlockNumber> +task: TaskAddress<BlockNumberFor<T>> id: Option<TaskName> ``` @@ -198,7 +211,7 @@ id: Option<TaskName> The given task was unable to be renewed since the agenda is full at that block. ```rust -task: TaskAddress<T::BlockNumber> +task: TaskAddress<BlockNumberFor<T>> id: Option<TaskName> ``` @@ -211,7 +224,7 @@ id: Option<TaskName> The given task can never be executed since it is overweight. ```rust -task: TaskAddress<T::BlockNumber> +task: TaskAddress<BlockNumberFor<T>> id: Option<TaskName> ``` @@ -510,7 +523,7 @@ amount: T::Balance </li> </ul> </li> -<li>TransactionPayment - 32 +<li>TransactionPayment - 7 <ul> <li> <details> @@ -529,7 +542,7 @@ tip: BalanceOf<T> </li> </ul> </li> -<li>OneshotAccount - 7 +<li>OneshotAccount - 8 <ul> <li> <details> @@ -576,7 +589,7 @@ balance: <T::Currency as Currency<T::AccountId>>::Balance </li> </ul> </li> -<li>Quota - 66 +<li>Quota - 9 <ul> <li> <details> @@ -924,13 +937,13 @@ offline: Vec<IdentificationTuple<T>> <ul> </ul> </li> -<li>Sudo - 20 +<li>Sudo - 19 <ul> <li> <details> <summary> <code>Sudid(sudo_result)</code> - 0</summary> -A sudo just took place. \[result\] +A sudo call just took place. ```rust sudo_result: DispatchResult @@ -941,11 +954,24 @@ sudo_result: DispatchResult <li> <details> <summary> -<code>KeyChanged(old_sudoer)</code> - 1</summary> -The \[sudoer\] just switched identity; the old key is supplied if one existed. +<code>KeyChanged(old, new)</code> - 1</summary> +The sudo key has been updated. + +```rust +old: Option<T::AccountId> +new: T::AccountId +``` + +</details> +</li> +<li> +<details> +<summary> +<code>KeyRemoved()</code> - 2</summary> +The key was permanently removed. ```rust -old_sudoer: Option<T::AccountId> +no args ``` </details> @@ -953,8 +979,8 @@ old_sudoer: Option<T::AccountId> <li> <details> <summary> -<code>SudoAsDone(sudo_result)</code> - 2</summary> -A sudo just took place. \[result\] +<code>SudoAsDone(sudo_result)</code> - 3</summary> +A [sudo_as](Pallet::sudo_as) call just took place. ```rust sudo_result: DispatchResult @@ -964,7 +990,7 @@ sudo_result: DispatchResult </li> </ul> </li> -<li>UpgradeOrigin - 21 +<li>UpgradeOrigin - 20 <ul> <li> <details> @@ -980,7 +1006,7 @@ result: DispatchResult </li> </ul> </li> -<li>Preimage - 22 +<li>Preimage - 21 <ul> <li> <details> @@ -1020,7 +1046,7 @@ hash: T::Hash </li> </ul> </li> -<li>TechnicalCommittee - 23 +<li>TechnicalCommittee - 22 <ul> <li> <details> @@ -1121,7 +1147,7 @@ no: MemberCount </li> </ul> </li> -<li>UniversalDividend - 30 +<li>UniversalDividend - 23 <ul> <li> <details> @@ -1182,11 +1208,11 @@ who: T::AccountId </li> </ul> </li> -<li>Wot - 40 +<li>Wot - 24 <ul> </ul> </li> -<li>Identity - 41 +<li>Identity - 25 <ul> <li> <details> @@ -1268,7 +1294,7 @@ reason: RemovalReason </li> </ul> </li> -<li>Membership - 42 +<li>Membership - 26 <ul> <li> <details> @@ -1311,7 +1337,7 @@ reason: MembershipRemovalReason </li> </ul> </li> -<li>Certification - 43 +<li>Certification - 27 <ul> <li> <details> @@ -1355,7 +1381,7 @@ receiver: T::IdtyIndex </li> </ul> </li> -<li>Distance - 44 +<li>Distance - 28 <ul> <li> <details> @@ -1396,7 +1422,7 @@ idty_index: T::IdtyIndex </li> </ul> </li> -<li>AtomicSwap - 50 +<li>AtomicSwap - 29 <ul> <li> <details> @@ -1441,7 +1467,7 @@ proof: HashedProof </li> </ul> </li> -<li>Multisig - 51 +<li>Multisig - 30 <ul> <li> <details> @@ -1465,7 +1491,7 @@ A multisig operation has been approved by someone. ```rust approving: T::AccountId -timepoint: Timepoint<T::BlockNumber> +timepoint: Timepoint<BlockNumberFor<T>> multisig: T::AccountId call_hash: CallHash ``` @@ -1480,7 +1506,7 @@ A multisig operation has been executed. ```rust approving: T::AccountId -timepoint: Timepoint<T::BlockNumber> +timepoint: Timepoint<BlockNumberFor<T>> multisig: T::AccountId call_hash: CallHash result: DispatchResult @@ -1496,7 +1522,7 @@ A multisig operation has been cancelled. ```rust cancelling: T::AccountId -timepoint: Timepoint<T::BlockNumber> +timepoint: Timepoint<BlockNumberFor<T>> multisig: T::AccountId call_hash: CallHash ``` @@ -1505,7 +1531,7 @@ call_hash: CallHash </li> </ul> </li> -<li>ProvideRandomness - 52 +<li>ProvideRandomness - 31 <ul> <li> <details> @@ -1536,7 +1562,7 @@ r#type: RandomnessType </li> </ul> </li> -<li>Proxy - 53 +<li>Proxy - 32 <ul> <li> <details> @@ -1590,7 +1616,7 @@ A proxy was added. delegator: T::AccountId delegatee: T::AccountId proxy_type: T::ProxyType -delay: T::BlockNumber +delay: BlockNumberFor<T> ``` </details> @@ -1605,14 +1631,14 @@ A proxy was removed. delegator: T::AccountId delegatee: T::AccountId proxy_type: T::ProxyType -delay: T::BlockNumber +delay: BlockNumberFor<T> ``` </details> </li> </ul> </li> -<li>Utility - 54 +<li>Utility - 33 <ul> <li> <details> @@ -1690,7 +1716,7 @@ result: DispatchResult </li> </ul> </li> -<li>Treasury - 55 +<li>Treasury - 34 <ul> <li> <details> @@ -1804,6 +1830,74 @@ reactivated: BalanceOf<T, I> deactivated: BalanceOf<T, I> ``` +</details> +</li> +<li> +<details> +<summary> +<code>AssetSpendApproved(index, asset_kind, amount, beneficiary, valid_from, expire_at)</code> - 9</summary> +A new asset spend proposal has been approved. + +```rust +index: SpendIndex +asset_kind: T::AssetKind +amount: AssetBalanceOf<T, I> +beneficiary: T::Beneficiary +valid_from: BlockNumberFor<T> +expire_at: BlockNumberFor<T> +``` + +</details> +</li> +<li> +<details> +<summary> +<code>AssetSpendVoided(index)</code> - 10</summary> +An approved spend was voided. + +```rust +index: SpendIndex +``` + +</details> +</li> +<li> +<details> +<summary> +<code>Paid(index, payment_id)</code> - 11</summary> +A payment happened. + +```rust +index: SpendIndex +payment_id: <T::Paymaster as Pay>::Id +``` + +</details> +</li> +<li> +<details> +<summary> +<code>PaymentFailed(index, payment_id)</code> - 12</summary> +A payment failed and can be retried. + +```rust +index: SpendIndex +payment_id: <T::Paymaster as Pay>::Id +``` + +</details> +</li> +<li> +<details> +<summary> +<code>SpendProcessed(index)</code> - 13</summary> +A spend was processed and removed from the storage. It might have been successfully +paid or it may have expired. + +```rust +index: SpendIndex +``` + </details> </li> </ul> diff --git a/resources/metadata.scale b/resources/metadata.scale index 6ea8691e472e1217623813c541a06d78fe593d27..aec10e49d176edbf0fb205f2219ffb8e31b75f50 100644 Binary files a/resources/metadata.scale and b/resources/metadata.scale differ diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index 0d08551bcbc458abb1eaec5133a6d18b952e43c6..c996fece88646766487b5a81bf37b01513e4e270 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -16,7 +16,7 @@ name = "xtask" anyhow = "1.0.32" clap = { version = "4.0", features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "full", "bit-vec"] } -frame-metadata = "15.0.0" +frame-metadata = "16.0.0" graphql_client = "0.10.0" hex = "0.4" memmap2 = "0.5.0" diff --git a/xtask/src/gen_doc.rs b/xtask/src/gen_doc.rs index 4f847e14df5a33dff3453e3fde708de93ca0caa6..c1a5820b797b393d1727a2bd2a04cd12b1ff609e 100644 --- a/xtask/src/gen_doc.rs +++ b/xtask/src/gen_doc.rs @@ -256,10 +256,10 @@ pub(super) fn gen_doc() -> Result<()> { println!("Metadata successfully loaded!"); let (mut runtime, max_weight) = - if let frame_metadata::RuntimeMetadata::V14(ref metadata_v14) = metadata.1 { + if let frame_metadata::RuntimeMetadata::V15(ref metadata_v15) = metadata.1 { ( - get_from_metadata_v14(metadata_v14.clone())?, - get_max_weight_from_metadata_v14(metadata_v14.clone())?, + get_from_metadata_v15(metadata_v15.clone())?, + get_max_weight_from_metadata_v15(metadata_v15.clone())?, ) } else { bail!("unsuported metadata version") @@ -280,7 +280,6 @@ pub(super) fn gen_doc() -> Result<()> { // For pallets with manual or no weight, we define a default value. weights.insert("Babe".to_string(), Default::default()); // Manual weights.insert("Grandpa".to_string(), Default::default()); // Manual - weights.insert("Sudo".to_string(), Default::default()); // Only > v1.0 has WeightInfo TODO at update weights.insert("AtomicSwap".to_string(), Default::default()); // No weight // Insert weights for each call of each pallet. @@ -320,12 +319,12 @@ pub(super) fn gen_doc() -> Result<()> { Ok(()) } -fn get_max_weight_from_metadata_v14( - metadata_v14: frame_metadata::v14::RuntimeMetadataV14, +fn get_max_weight_from_metadata_v15( + metadata_v15: frame_metadata::v15::RuntimeMetadataV15, ) -> Result<u128> { // Extract the maximal weight available in one block // from the metadata. - let block_weights = metadata_v14 + let block_weights = metadata_v15 .pallets .iter() .find(|pallet| pallet.name == "System") @@ -338,7 +337,7 @@ fn get_max_weight_from_metadata_v14( let block_weights = scale_value::scale::decode_as_type( &mut &*block_weights.value, block_weights.ty.id, - &metadata_v14.types, + &metadata_v15.types, ) .expect("Can't decode max_weight") .value; @@ -355,14 +354,14 @@ fn get_max_weight_from_metadata_v14( } } -fn get_from_metadata_v14( - metadata_v14: frame_metadata::v14::RuntimeMetadataV14, +fn get_from_metadata_v15( + metadata_v15: frame_metadata::v15::RuntimeMetadataV15, ) -> Result<RuntimePallets> { - println!("Number of pallets: {}", metadata_v14.pallets.len()); + println!("Number of pallets: {}", metadata_v15.pallets.len()); let mut pallets = Vec::new(); - for pallet in metadata_v14.pallets { + for pallet in metadata_v15.pallets { let calls_type_def = if let Some(calls) = pallet.calls { - let Some(calls_type) = metadata_v14.types.resolve(calls.ty.id) else { + let Some(calls_type) = metadata_v15.types.resolve(calls.ty.id) else { bail!("Invalid metadata") }; Some(calls_type.type_def.clone()) @@ -371,7 +370,7 @@ fn get_from_metadata_v14( None }; let events_type_def = if let Some(events) = pallet.event { - let Some(events_type) = metadata_v14.types.resolve(events.ty.id) else { + let Some(events_type) = metadata_v15.types.resolve(events.ty.id) else { bail!("Invalid metadata") }; Some(events_type.type_def.clone()) @@ -380,7 +379,7 @@ fn get_from_metadata_v14( None }; let errors_type_def = if let Some(errors) = pallet.error { - let Some(errors_type) = metadata_v14.types.resolve(errors.ty.id) else { + let Some(errors_type) = metadata_v15.types.resolve(errors.ty.id) else { bail!("Invalid metadata") }; Some(errors_type.type_def.clone())