diff --git a/Cargo.lock b/Cargo.lock index ab1569c41c4b14ecdec962f0441c54526dce86de..ca9a148779ecdb2e22f08c7e9cbd2e53c9e9a6bb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -222,7 +222,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -615,16 +615,16 @@ checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" dependencies = [ "concurrent-queue", "event-listener 5.2.0", - "event-listener-strategy 0.5.0", + "event-listener-strategy 0.5.1", "futures-core", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] name = "async-executor" -version = "1.8.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" +checksum = "10b3e585719c2358d2660232671ca8ca4ddb4be4ce8a1842d6c2dc8685303316" dependencies = [ "async-lock 3.3.0", "async-task", @@ -681,7 +681,7 @@ checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" dependencies = [ "event-listener 4.0.3", "event-listener-strategy 0.4.0", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] @@ -697,19 +697,21 @@ dependencies = [ [[package]] name = "async-process" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "451e3cf68011bd56771c79db04a9e333095ab6349f7e47592b788e9b98720cc8" +checksum = "d999d925640d51b662b7b4e404224dd81de70f4aa4a199383c2c5e5b86885fa3" dependencies = [ "async-channel 2.2.0", "async-io", "async-lock 3.3.0", "async-signal", + "async-task", "blocking", "cfg-if", "event-listener 5.2.0", "futures-lite", "rustix 0.38.32", + "tracing", "windows-sys 0.52.0", ] @@ -745,7 +747,7 @@ checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -758,7 +760,7 @@ dependencies = [ "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] @@ -889,7 +891,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -1279,9 +1281,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.35" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" +checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1354,7 +1356,7 @@ dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim 0.11.0", + "strsim 0.11.1", "terminal_size", ] @@ -1376,7 +1378,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -1902,7 +1904,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.55", + "syn 2.0.58", "synthez", ] @@ -1958,7 +1960,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -1985,7 +1987,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -2002,7 +2004,7 @@ checksum = "b404f596046b0bb2d903a9c786b875a126261b52b7c3a64bbb66382c41c771df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -2050,7 +2052,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -2072,7 +2074,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core 0.20.8", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -2133,9 +2135,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", "zeroize", @@ -2186,6 +2188,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive-syn-parse" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + [[package]] name = "derive_more" version = "0.99.17" @@ -2285,7 +2298,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -2328,26 +2341,26 @@ dependencies = [ [[package]] name = "docify" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc4fd38aaa9fb98ac70794c82a00360d1e165a87fbf96a8a91f9dfc602aaee2" +checksum = "43a2f138ad521dc4a2ced1a4576148a6a610b4c5923933b062a263130a6802ce" dependencies = [ "docify_macros", ] [[package]] name = "docify_macros" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63fa215f3a0d40fb2a221b3aa90d8e1fbb8379785a990cb60d62ac71ebdc6460" +checksum = "1a081e51fb188742f5a7a1164ad752121abcb22874b21e2c3b0dd040c515fdad" dependencies = [ "common-path", - "derive-syn-parse", + "derive-syn-parse 0.2.0", "once_cell", "proc-macro2", "quote", "regex", - "syn 2.0.55", + "syn 2.0.58", "termcolor", "toml 0.8.12", "walkdir", @@ -2718,7 +2731,7 @@ checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" dependencies = [ "concurrent-queue", "parking", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] @@ -2729,7 +2742,7 @@ checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91" dependencies = [ "concurrent-queue", "parking", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] @@ -2739,17 +2752,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" dependencies = [ "event-listener 4.0.3", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] name = "event-listener-strategy" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291" +checksum = "332f51cb23d20b0de8458b86580878211da09bcd4503cb579c225b3d124cabb3" dependencies = [ "event-listener 5.2.0", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] @@ -2772,7 +2785,7 @@ dependencies = [ "prettier-please", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -2795,7 +2808,7 @@ checksum = "531e46835a22af56d1e3b66f04844bed63158bc094a628bec1d321d9b4c44bf2" dependencies = [ "bit-set", "regex-automata 0.4.6", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] @@ -3133,7 +3146,7 @@ source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-sub dependencies = [ "Inflector", "cfg-expr", - "derive-syn-parse", + "derive-syn-parse 0.1.5", "expander", "frame-support-procedural-tools", "itertools 0.10.5", @@ -3142,7 +3155,7 @@ dependencies = [ "proc-macro2", "quote", "sp-crypto-hashing", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -3154,7 +3167,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -3164,7 +3177,7 @@ source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-sub dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -3322,7 +3335,7 @@ dependencies = [ "futures-core", "futures-io", "parking", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] @@ -3333,7 +3346,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -3379,7 +3392,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "pin-utils", "slab", ] @@ -3629,7 +3642,7 @@ dependencies = [ "quote", "serde", "serde_json", - "syn 2.0.55", + "syn 2.0.58", "textwrap", "thiserror", "typed-builder", @@ -3673,7 +3686,7 @@ checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -3692,7 +3705,7 @@ dependencies = [ "bstr", "log", "regex-automata 0.4.6", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] @@ -4080,7 +4093,7 @@ checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http 0.2.12", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] @@ -4103,7 +4116,7 @@ dependencies = [ "futures-core", "http 1.1.0", "http-body 1.0.0", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] @@ -4146,7 +4159,7 @@ dependencies = [ "httparse", "httpdate", "itoa", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "socket2 0.5.6", "tokio", "tower-service", @@ -4167,7 +4180,7 @@ dependencies = [ "http-body 1.0.0", "httparse", "itoa", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "smallvec", "tokio", "want", @@ -4201,7 +4214,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.0", "hyper 1.2.0", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "socket2 0.5.6", "tokio", "tower", @@ -4718,7 +4731,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -4886,7 +4899,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -5318,13 +5331,12 @@ dependencies = [ [[package]] name = "libredox" -version = "0.0.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.5.0", "libc", - "redox_syscall 0.4.1", ] [[package]] @@ -5541,7 +5553,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -5551,11 +5563,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "468155613a44cfd825f1fb0ffa532b018253920d404e6fca1e8d43155198a46d" dependencies = [ "const-random", - "derive-syn-parse", + "derive-syn-parse 0.1.5", "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -5566,7 +5578,7 @@ checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -5577,7 +5589,7 @@ checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -5619,9 +5631,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "memfd" @@ -5848,9 +5860,9 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.32.4" +version = "0.32.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4541eb06dce09c0241ebbaab7102f0a01a0c8994afed2e5d0d66775016e25ac2" +checksum = "3ea4908d4f23254adda3daa60ffef0f1ac7b8c3e9a864cf3cc154b251908a2ef" dependencies = [ "approx", "matrixmultiply", @@ -6429,7 +6441,7 @@ version = "1.0.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -7079,9 +7091,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.8" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f8023d0fb78c8e03784ea1c7f3fa36e68a723138990b8d5a47d916b651e7a8" +checksum = "311fb059dee1a7b802f036316d790138c613a4e8b180c822e3925a662e9f0c95" dependencies = [ "memchr", "thiserror", @@ -7090,9 +7102,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.8" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0d24f72393fd16ab6ac5738bc33cdb6a9aa73f8b902e8fe29cf4e67d7dd1026" +checksum = "f73541b156d32197eecda1a4014d7f868fd2bcb3c550d5386087cfba442bf69c" dependencies = [ "pest", "pest_generator", @@ -7100,22 +7112,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.8" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc17e2a6c7d0a492f0158d7a4bd66cc17280308bbaff78d5bef566dca35ab80" +checksum = "c35eeed0a3fab112f75165fdc026b3913f4183133f19b49be773ac9ea966e8bd" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] name = "pest_meta" -version = "2.7.8" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "934cd7631c050f4674352a6e835d5f6711ffbfb9345c2fc0107155ac495ae293" +checksum = "2adbf29bb9776f28caece835398781ab24435585fe0d4dc1374a61db5accedca" dependencies = [ "once_cell", "pest", @@ -7149,7 +7161,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -7160,9 +7172,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -7209,9 +7221,9 @@ dependencies = [ [[package]] name = "platforms" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" +checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" [[package]] name = "polkavm" @@ -7262,7 +7274,7 @@ dependencies = [ "polkavm-common", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -7272,7 +7284,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ba81f7b5faac81e528eb6158a6f3c9e0bb1008e0ffa19653bc8dea925ecb429" dependencies = [ "polkavm-derive-impl", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -7305,7 +7317,7 @@ dependencies = [ "cfg-if", "concurrent-queue", "hermit-abi", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "rustix 0.38.32", "tracing", "windows-sys 0.52.0", @@ -7398,7 +7410,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22020dfcf177fcc7bf5deaf7440af371400c67c0de14c399938d8ed4fb4645d3" dependencies = [ "proc-macro2", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -7418,7 +7430,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d3928fb5db768cb86f891ff014f0144589297e3c6a1aba6ed7cecfdace270c7" dependencies = [ "proc-macro2", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -7494,7 +7506,7 @@ checksum = "834da187cfe638ae8abb0203f0b33e5ccdb02a28e7199f2f47b3e2754f50edca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -7540,7 +7552,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -7608,7 +7620,7 @@ dependencies = [ "itertools 0.11.0", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -7631,9 +7643,9 @@ dependencies = [ [[package]] name = "quanta" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca0b7bac0b97248c40bb77288fc52029cf1459c0461ea1b05ee32ccf011de2c" +checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5" dependencies = [ "crossbeam-utils", "libc", @@ -7841,9 +7853,9 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ "getrandom 0.2.12", "libredox", @@ -7867,7 +7879,7 @@ checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -7904,7 +7916,7 @@ dependencies = [ "aho-corasick", "memchr", "regex-automata 0.4.6", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] @@ -7924,7 +7936,7 @@ checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] @@ -7941,9 +7953,9 @@ checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "reqwest" @@ -7966,7 +7978,7 @@ dependencies = [ "mime", "once_cell", "percent-encoding", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "serde", "serde_json", "serde_urlencoded", @@ -8245,9 +8257,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "868e20fada228fefaf6b652e00cc73623d54f8171e7352c18bb281571f2d92da" +checksum = "ecd36cc4259e3e4514335c4a138c6b43171a8d61d8f5c9348f9fc7529416f247" [[package]] name = "rustls-webpki" @@ -8404,7 +8416,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -9324,7 +9336,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -9535,7 +9547,7 @@ dependencies = [ "proc-macro2", "quote", "scale-info", - "syn 2.0.55", + "syn 2.0.58", "thiserror", ] @@ -9646,7 +9658,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -9693,9 +9705,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.2" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -9706,9 +9718,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" dependencies = [ "core-foundation-sys", "libc", @@ -9764,7 +9776,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -9973,7 +9985,7 @@ checksum = "0eb01866308440fc64d6c44d9e86c5cc17adfe33c4d6eed55da9145044d0ffc1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -10183,7 +10195,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -10450,7 +10462,7 @@ source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-sub dependencies = [ "quote", "sp-crypto-hashing", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -10469,7 +10481,7 @@ source = "git+https://github.com/duniter/duniter-polkadot-sdk#c84530c57a6f9ab808 dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -10479,7 +10491,7 @@ source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-sub dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -10745,7 +10757,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -10758,7 +10770,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -10982,7 +10994,7 @@ dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -11131,9 +11143,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "strsim" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" @@ -11173,7 +11185,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -11288,9 +11300,9 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "subweight-core" -version = "3.4.1" +version = "3.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "715b75bcbcee44fab4847560579a822397f2f9765248bc0df52215e8cc5dfd8c" +checksum = "34c772d65a8a9d3180a0701180acf5af449dec7fe42123bfda3438274b48da80" dependencies = [ "clap", "fancy-regex", @@ -11302,7 +11314,7 @@ dependencies = [ "semver 1.0.22", "serde", "serde_json", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -11357,7 +11369,7 @@ dependencies = [ "scale-info", "scale-typegen", "subxt-metadata", - "syn 2.0.55", + "syn 2.0.58", "thiserror", "tokio", ] @@ -11389,7 +11401,7 @@ dependencies = [ "quote", "scale-typegen", "subxt-codegen", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -11417,9 +11429,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.55" +version = "2.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "002a1b3dbf967edfafc32655d0f377ab0bb7b994aa1d32c8cc7e9b8bf3ebb8f0" +checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" dependencies = [ "proc-macro2", "quote", @@ -11450,7 +11462,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3d2c2202510a1e186e63e596d9318c91a8cbe85cd1a56a7be0c333e5f59ec8d" dependencies = [ - "syn 2.0.55", + "syn 2.0.58", "synthez-codegen", "synthez-core", ] @@ -11461,7 +11473,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f724aa6d44b7162f3158a57bccd871a77b39a4aef737e01bcdff41f4772c7746" dependencies = [ - "syn 2.0.55", + "syn 2.0.58", "synthez-core", ] @@ -11474,7 +11486,7 @@ dependencies = [ "proc-macro2", "quote", "sealed", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -11591,7 +11603,7 @@ checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -11686,9 +11698,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.36.0" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ "backtrace", "bytes", @@ -11696,7 +11708,7 @@ dependencies = [ "mio", "num_cpus", "parking_lot 0.12.1", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "signal-hook-registry", "socket2 0.5.6", "tokio-macros", @@ -11711,7 +11723,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -11753,7 +11765,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "tokio", "tokio-util", ] @@ -11768,7 +11780,7 @@ dependencies = [ "futures-core", "futures-io", "futures-sink", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "tokio", "tracing", ] @@ -11847,7 +11859,7 @@ dependencies = [ "futures-core", "futures-util", "pin-project", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "tokio", "tower-layer", "tower-service", @@ -11867,7 +11879,7 @@ dependencies = [ "http 0.2.12", "http-body 0.4.6", "http-range-header", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "tower-layer", "tower-service", ] @@ -11891,7 +11903,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "log", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "tracing-attributes", "tracing-core", ] @@ -11904,7 +11916,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -12116,7 +12128,7 @@ checksum = "29a3151c41d0b13e3d011f98adc24434560ef06673a155a6c7f66b9879eecce2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -12404,7 +12416,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", "wasm-bindgen-shared", ] @@ -12438,7 +12450,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -12460,9 +12472,9 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.116.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc942673e7684671f0c5708fc18993569d184265fd5223bb51fc8e5b9b6cfd52" +checksum = "2fd87a4c135535ffed86123b6fb0f0a5a0bc89e50416c942c5f0662c645f679c" dependencies = [ "anyhow", "libc", @@ -13229,7 +13241,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -13249,7 +13261,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -13292,9 +13304,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +version = "2.0.10+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" dependencies = [ "cc", "pkg-config", diff --git a/README.md b/README.md index 87da44bff3379104081c5514900741e176c80e87..8d6b38def5e6327ac97147674eed56fc137bcbb4 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ - [api](./docs/api/) - [manual](./docs/api/manual.md) - [runtime-calls](./docs/api/runtime-calls.md) the calls you can submit through the RPC API + - [runtime-errors](./docs/api/runtime-errors.md) the errors you can get submitting a call + - [runtime-events](./docs/api/runtime-events.md) the events you can get submitting a call - [dev](./docs/dev/) - [beginner-walkthrough](./docs/dev/beginner-walkthrough.md) - [git-conventions](./docs/dev/git-conventions.md) diff --git a/docs/api/runtime-calls.md b/docs/api/runtime-calls.md index 21d0d0a3236d90a80e9d464416410064625b9d34..a1bc106c1a017bc65f7c55a12bc9a9575040b91b 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 **81** user calls from **21** pallets. +There are **86** user calls from **21** pallets. ### Account - 1 @@ -21,14 +21,14 @@ There are **81** user calls from **21** pallets. <details><summary><code>unlink_identity()</code></summary> -Taking 0.0113 % of a block. +Taking 0.0107 % of a block. ```rust ``` </details> -See [`Pallet::unlink_identity`]. +unlink the identity associated with the account ### Scheduler - 2 @@ -36,7 +36,7 @@ See [`Pallet::unlink_identity`]. <details><summary><code>schedule(when, maybe_periodic, priority, call)</code></summary> -Taking 0.013 % of a block. +Taking 0.0117 % of a block. ```rust when: BlockNumberFor<T> @@ -47,13 +47,13 @@ call: Box<<T as Config>::RuntimeCall> </details> -See [`Pallet::schedule`]. +Anonymously schedule a task. #### cancel - 1 <details><summary><code>cancel(when, index)</code></summary> -Taking 0.0195 % of a block. +Taking 0.0239 % of a block. ```rust when: BlockNumberFor<T> @@ -62,13 +62,13 @@ index: u32 </details> -See [`Pallet::cancel`]. +Cancel an anonymously scheduled task. #### schedule_named - 2 <details><summary><code>schedule_named(id, when, maybe_periodic, priority, call)</code></summary> -Taking 0.0203 % of a block. +Taking 0.0189 % of a block. ```rust id: TaskName @@ -80,13 +80,13 @@ call: Box<<T as Config>::RuntimeCall> </details> -See [`Pallet::schedule_named`]. +Schedule a named task. #### cancel_named - 3 <details><summary><code>cancel_named(id)</code></summary> -Taking 0.0209 % of a block. +Taking 0.0252 % of a block. ```rust id: TaskName @@ -94,7 +94,7 @@ id: TaskName </details> -See [`Pallet::cancel_named`]. +Cancel a named scheduled task. #### schedule_after - 4 @@ -111,7 +111,7 @@ call: Box<<T as Config>::RuntimeCall> </details> -See [`Pallet::schedule_after`]. +Anonymously schedule a task after a delay. #### schedule_named_after - 5 @@ -129,7 +129,89 @@ call: Box<<T as Config>::RuntimeCall> </details> -See [`Pallet::schedule_named_after`]. +Schedule a named task after a delay. + +#### set_retry - 6 + +<details><summary><code>set_retry(task, retries, period)</code></summary> + +Taking 0.0115 % of a block. + +```rust +task: TaskAddress<BlockNumberFor<T>> +retries: u8 +period: BlockNumberFor<T> +``` +</details> + + +Set a retry configuration for a task so that, in case its scheduled run fails, it will +be retried after `period` blocks, for a total amount of `retries` retries or until it +succeeds. + +Tasks which need to be scheduled for a retry are still subject to weight metering and +agenda space, same as a regular task. If a periodic task fails, it will be scheduled +normally while the task is retrying. + +Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic +clones of the original task. Their retry configuration will be derived from the +original task's configuration, but will have a lower value for `remaining` than the +original `total_retries`. + +#### set_retry_named - 7 + +<details><summary><code>set_retry_named(id, retries, period)</code></summary> + +Taking 0.0129 % of a block. + +```rust +id: TaskName +retries: u8 +period: BlockNumberFor<T> +``` +</details> + + +Set a retry configuration for a named task so that, in case its scheduled run fails, it +will be retried after `period` blocks, for a total amount of `retries` retries or until +it succeeds. + +Tasks which need to be scheduled for a retry are still subject to weight metering and +agenda space, same as a regular task. If a periodic task fails, it will be scheduled +normally while the task is retrying. + +Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic +clones of the original task. Their retry configuration will be derived from the +original task's configuration, but will have a lower value for `remaining` than the +original `total_retries`. + +#### cancel_retry - 8 + +<details><summary><code>cancel_retry(task)</code></summary> + +Taking 0.0115 % of a block. + +```rust +task: TaskAddress<BlockNumberFor<T>> +``` +</details> + + +Removes the retry configuration of a task. + +#### cancel_retry_named - 9 + +<details><summary><code>cancel_retry_named(id)</code></summary> + +Taking 0.0128 % of a block. + +```rust +id: TaskName +``` +</details> + + +Cancel the retry configuration of a named task. ### Babe - 3 @@ -146,7 +228,10 @@ key_owner_proof: T::KeyOwnerProof </details> -See [`Pallet::report_equivocation`]. +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. ### Balances - 6 @@ -154,7 +239,7 @@ See [`Pallet::report_equivocation`]. <details><summary><code>transfer_allow_death(dest, value)</code></summary> -Taking 0.0216 % of a block. +Taking 0.0196 % of a block. ```rust dest: AccountIdLookupOf<T> @@ -163,13 +248,19 @@ value: T::Balance </details> -See [`Pallet::transfer_allow_death`]. +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. #### transfer_keep_alive - 3 <details><summary><code>transfer_keep_alive(dest, value)</code></summary> -Taking 0.0232 % of a block. +Taking 0.012 % of a block. ```rust dest: AccountIdLookupOf<T> @@ -178,13 +269,18 @@ value: T::Balance </details> -See [`Pallet::transfer_keep_alive`]. +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 #### transfer_all - 4 <details><summary><code>transfer_all(dest, keep_alive)</code></summary> -Taking 0.0184 % of a block. +Taking 0.0123 % of a block. ```rust dest: AccountIdLookupOf<T> @@ -193,7 +289,21 @@ keep_alive: bool </details> -See [`Pallet::transfer_all`]. +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). #### force_set_balance - 8 @@ -208,7 +318,36 @@ new_free: T::Balance </details> -See [`Pallet::force_set_balance`]. +Upgrade a specified account. + +- `origin`: Must be `Signed`. +- `who`: The account to be upgraded. + +This will waive the transaction fee if at least all but 10% of the accounts needed to +be upgraded. (We let some not have to be upgraded just in order to allow for the +possibililty of churn). +Set the regular balance of a given account. + +The dispatch origin for this call is `root`. + +#### force_adjust_total_issuance - 9 + +<details><summary><code>force_adjust_total_issuance(direction, delta)</code></summary> + +Taking 0.0039 % of a block. + +```rust +direction: AdjustmentDirection +delta: T::Balance +``` +</details> + + +Adjust the total issuance in a saturating way. + +Can only be called by root and always needs a positive `delta`. + +# Example ### OneshotAccount - 7 @@ -216,7 +355,7 @@ See [`Pallet::force_set_balance`]. <details><summary><code>create_oneshot_account(dest, value)</code></summary> -Taking 0.0126 % of a block. +Taking 0.0113 % of a block. ```rust dest: <T::Lookup as StaticLookup>::Source @@ -225,13 +364,18 @@ value: <T::Currency as Currency<T::AccountId>>::Balance </details> -See [`Pallet::create_oneshot_account`]. +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. #### consume_oneshot_account - 1 <details><summary><code>consume_oneshot_account(block_height, dest)</code></summary> -Taking 0.0214 % of a block. +Taking 0.0196 % of a block. ```rust block_height: BlockNumberFor<T> @@ -240,13 +384,17 @@ dest: Account<<T::Lookup as StaticLookup>::Source> </details> -See [`Pallet::consume_oneshot_account`]. +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. #### consume_oneshot_account_with_remaining - 2 <details><summary><code>consume_oneshot_account_with_remaining(block_height, dest, remaining_to, balance)</code></summary> -Taking 0.0295 % of a block. +Taking 0.0269 % of a block. ```rust block_height: BlockNumberFor<T> @@ -257,7 +405,16 @@ balance: <T::Currency as Currency<T::AccountId>>::Balance </details> -See [`Pallet::consume_oneshot_account_with_remaining`]. +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`. ### SmithMembers - 10 @@ -265,7 +422,7 @@ See [`Pallet::consume_oneshot_account_with_remaining`]. <details><summary><code>invite_smith(receiver)</code></summary> -Taking 0.0265 % of a block. +Taking 0.0239 % of a block. ```rust receiver: T::IdtyIndex @@ -273,26 +430,26 @@ receiver: T::IdtyIndex </details> -See [`Pallet::invite_smith`]. +Invite a WoT member to try becoming a Smith #### accept_invitation - 1 <details><summary><code>accept_invitation()</code></summary> -Taking 0.0133 % of a block. +Taking 0.0122 % of a block. ```rust ``` </details> -See [`Pallet::accept_invitation`]. +Accept an invitation (must have been invited first) #### certify_smith - 2 <details><summary><code>certify_smith(receiver)</code></summary> -Taking 0.0234 % of a block. +Taking 0.0287 % of a block. ```rust receiver: T::IdtyIndex @@ -300,7 +457,7 @@ receiver: T::IdtyIndex </details> -See [`Pallet::certify_smith`]. +Certify an invited smith which can lead the certified to become a Smith ### AuthorityMembers - 11 @@ -308,33 +465,33 @@ See [`Pallet::certify_smith`]. <details><summary><code>go_offline()</code></summary> -Taking 0.0188 % of a block. +Taking 0.0167 % of a block. ```rust ``` </details> -See [`Pallet::go_offline`]. +ask to leave the set of validators two sessions after #### go_online - 1 <details><summary><code>go_online()</code></summary> -Taking 0.0225 % of a block. +Taking 0.0192 % of a block. ```rust ``` </details> -See [`Pallet::go_online`]. +ask to join the set of validators two sessions after #### set_session_keys - 2 <details><summary><code>set_session_keys(keys)</code></summary> -Taking 0.0296 % of a block. +Taking 0.0254 % of a block. ```rust keys: T::Keys @@ -342,13 +499,13 @@ keys: T::Keys </details> -See [`Pallet::set_session_keys`]. +declare new session keys to replace current ones #### remove_member_from_blacklist - 4 <details><summary><code>remove_member_from_blacklist(member_id)</code></summary> -Taking 0.0125 % of a block. +Taking 0.0109 % of a block. ```rust member_id: T::MemberId @@ -356,7 +513,7 @@ member_id: T::MemberId </details> -See [`Pallet::remove_member_from_blacklist`]. +remove an identity from the blacklist ### Grandpa - 16 @@ -373,7 +530,10 @@ key_owner_proof: T::KeyOwnerProof </details> -See [`Pallet::report_equivocation`]. +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. ### UpgradeOrigin - 21 @@ -390,7 +550,11 @@ weight: Weight </details> -See [`Pallet::dispatch_as_root_unchecked_weight`]. +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. ### Preimage - 22 @@ -398,7 +562,7 @@ See [`Pallet::dispatch_as_root_unchecked_weight`]. <details><summary><code>note_preimage(bytes)</code></summary> -Taking 0.5106 % of a block. +Taking 0.2893 % of a block. ```rust bytes: Vec<u8> @@ -406,13 +570,16 @@ bytes: Vec<u8> </details> -See [`Pallet::note_preimage`]. +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. #### unnote_preimage - 1 <details><summary><code>unnote_preimage(hash)</code></summary> -Taking 0.0211 % of a block. +Taking 0.0186 % of a block. ```rust hash: T::Hash @@ -420,13 +587,18 @@ hash: T::Hash </details> -See [`Pallet::unnote_preimage`]. +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`. #### request_preimage - 2 <details><summary><code>request_preimage(hash)</code></summary> -Taking 0.0136 % of a block. +Taking 0.0127 % of a block. ```rust hash: T::Hash @@ -434,13 +606,16 @@ hash: T::Hash </details> -See [`Pallet::request_preimage`]. +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. #### unrequest_preimage - 3 <details><summary><code>unrequest_preimage(hash)</code></summary> -Taking 0.0195 % of a block. +Taking 0.0185 % of a block. ```rust hash: T::Hash @@ -448,13 +623,15 @@ hash: T::Hash </details> -See [`Pallet::unrequest_preimage`]. +Clear a previously made request for a preimage. + +NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. #### ensure_updated - 4 <details><summary><code>ensure_updated(hashes)</code></summary> -Taking 21.0381 % of a block. +Taking 20.7987 % of a block. ```rust hashes: Vec<T::Hash> @@ -462,7 +639,9 @@ hashes: Vec<T::Hash> </details> -See [`Pallet::ensure_updated`]. +Ensure that the a bulk of pre-images is upgraded. + +The caller pays no fee if at least 90% of pre-images were successfully updated. ### TechnicalCommittee - 23 @@ -470,7 +649,7 @@ See [`Pallet::ensure_updated`]. <details><summary><code>execute(proposal, length_bound)</code></summary> -Taking 0.006 % of a block. +Taking 0.0052 % of a block. ```rust proposal: Box<<T as Config<I>>::Proposal> @@ -479,7 +658,15 @@ length_bound: u32 </details> -See [`Pallet::execute`]. +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` #### propose - 2 @@ -495,13 +682,26 @@ length_bound: u32 </details> -See [`Pallet::propose`]. +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`) #### vote - 3 <details><summary><code>vote(proposal, index, approve)</code></summary> -Taking 0.0144 % of a block. +Taking 0.0125 % of a block. ```rust proposal: T::Hash @@ -511,7 +711,15 @@ approve: bool </details> -See [`Pallet::vote`]. +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) #### close - 6 @@ -528,7 +736,30 @@ length_bound: u32 </details> -See [`Pallet::close`]. +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. + +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 @@ -536,20 +767,20 @@ See [`Pallet::close`]. <details><summary><code>claim_uds()</code></summary> -Taking 0.0224 % of a block. +Taking 0.022 % of a block. ```rust ``` </details> -See [`Pallet::claim_uds`]. +Claim Universal Dividends #### transfer_ud - 1 <details><summary><code>transfer_ud(dest, value)</code></summary> -Taking 0.027 % of a block. +Taking 0.0208 % of a block. ```rust dest: <T::Lookup as StaticLookup>::Source @@ -558,13 +789,13 @@ value: BalanceOf<T> </details> -See [`Pallet::transfer_ud`]. +Transfer some liquid free balance to another account, in milliUD. #### transfer_ud_keep_alive - 2 <details><summary><code>transfer_ud_keep_alive(dest, value)</code></summary> -Taking 0.0193 % of a block. +Taking 0.0131 % of a block. ```rust dest: <T::Lookup as StaticLookup>::Source @@ -573,7 +804,7 @@ value: BalanceOf<T> </details> -See [`Pallet::transfer_ud_keep_alive`]. +Transfer some liquid free balance to another account, in milliUD. ### Identity - 41 @@ -581,7 +812,7 @@ See [`Pallet::transfer_ud_keep_alive`]. <details><summary><code>create_identity(owner_key)</code></summary> -Taking 0.0969 % of a block. +Taking 0.0906 % of a block. ```rust owner_key: T::AccountId @@ -589,13 +820,17 @@ owner_key: T::AccountId </details> -See [`Pallet::create_identity`]. +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. #### confirm_identity - 1 <details><summary><code>confirm_identity(idty_name)</code></summary> -Taking 0.0365 % of a block. +Taking 0.0337 % of a block. ```rust idty_name: IdtyName @@ -603,13 +838,17 @@ idty_name: IdtyName </details> -See [`Pallet::confirm_identity`]. +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. #### change_owner_key - 3 <details><summary><code>change_owner_key(new_key, new_key_sig)</code></summary> -Taking 0.0507 % of a block. +Taking 0.0429 % of a block. ```rust new_key: T::AccountId @@ -618,13 +857,19 @@ new_key_sig: T::Signature </details> -See [`Pallet::change_owner_key`]. +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. #### revoke_identity - 4 <details><summary><code>revoke_identity(idty_index, revocation_key, revocation_sig)</code></summary> -Taking 0.0487 % of a block. +Taking 0.0413 % of a block. ```rust idty_index: T::IdtyIndex @@ -634,13 +879,20 @@ revocation_sig: T::Signature </details> -See [`Pallet::revoke_identity`]. +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. #### fix_sufficients - 7 <details><summary><code>fix_sufficients(owner_key, inc)</code></summary> -Taking 0.0113 % of a block. +Taking 0.0108 % of a block. ```rust owner_key: T::AccountId @@ -649,13 +901,13 @@ inc: bool </details> -See [`Pallet::fix_sufficients`]. +change sufficient ref count for given key #### link_account - 8 <details><summary><code>link_account(account_id, payload_sig)</code></summary> -Taking 0.0182 % of a block. +Taking 0.0151 % of a block. ```rust account_id: T::AccountId @@ -664,7 +916,7 @@ payload_sig: T::Signature </details> -See [`Pallet::link_account`]. +Link an account to an identity ### Certification - 43 @@ -672,7 +924,7 @@ See [`Pallet::link_account`]. <details><summary><code>add_cert(receiver)</code></summary> -Taking 0.0398 % of a block. +Taking 0.037 % of a block. ```rust receiver: T::IdtyIndex @@ -680,13 +932,13 @@ receiver: T::IdtyIndex </details> -See [`Pallet::add_cert`]. +Add a new certification. #### renew_cert - 3 <details><summary><code>renew_cert(receiver)</code></summary> -Taking 0.0324 % of a block. +Taking 0.03 % of a block. ```rust receiver: T::IdtyIndex @@ -694,13 +946,13 @@ receiver: T::IdtyIndex </details> -See [`Pallet::renew_cert`]. +Renew an existing certification. #### del_cert - 1 <details><summary><code>del_cert(issuer, receiver)</code></summary> -Taking 0.0276 % of a block. +Taking 0.0265 % of a block. ```rust issuer: T::IdtyIndex @@ -709,13 +961,13 @@ receiver: T::IdtyIndex </details> -See [`Pallet::del_cert`]. +remove a certification (only root) #### remove_all_certs_received_by - 2 <details><summary><code>remove_all_certs_received_by(idty_index)</code></summary> -Taking 7.8043 % of a block. +Taking 7.3619 % of a block. ```rust idty_index: T::IdtyIndex @@ -723,7 +975,7 @@ idty_index: T::IdtyIndex </details> -See [`Pallet::remove_all_certs_received_by`]. +remove all certifications received by an identity (only root) ### Distance - 44 @@ -731,20 +983,22 @@ See [`Pallet::remove_all_certs_received_by`]. <details><summary><code>request_distance_evaluation()</code></summary> -Taking 0.0354 % of a block. +Taking 0.0327 % of a block. ```rust ``` </details> -See [`Pallet::request_distance_evaluation`]. +Request caller identity to be evaluated +positive evaluation will result in claim/renew membership +negative evaluation will result in slash for caller #### request_distance_evaluation_for - 4 <details><summary><code>request_distance_evaluation_for(target)</code></summary> -Taking 0.0367 % of a block. +Taking 0.0339 % of a block. ```rust target: T::IdtyIndex @@ -752,13 +1006,14 @@ target: T::IdtyIndex </details> -See [`Pallet::request_distance_evaluation_for`]. +Request target identity to be evaluated +only possible for unvalidated identity #### update_evaluation - 1 <details><summary><code>update_evaluation(computation_result)</code></summary> -Taking 0.0351 % of a block. +Taking 0.0347 % of a block. ```rust computation_result: ComputationResult @@ -766,13 +1021,14 @@ computation_result: ComputationResult </details> -See [`Pallet::update_evaluation`]. +(Inherent) Push an evaluation result to the pool +this is called internally by validators (= inherent) #### force_update_evaluation - 2 <details><summary><code>force_update_evaluation(evaluator, computation_result)</code></summary> -Taking 0.018 % of a block. +Taking 0.0184 % of a block. ```rust evaluator: <T as frame_system::Config>::AccountId @@ -781,13 +1037,13 @@ computation_result: ComputationResult </details> -See [`Pallet::force_update_evaluation`]. +Force push an evaluation result to the pool #### force_valid_distance_status - 3 <details><summary><code>force_valid_distance_status(identity)</code></summary> -Taking 0.0301 % of a block. +Taking 0.0277 % of a block. ```rust identity: <T as pallet_identity::Config>::IdtyIndex @@ -795,7 +1051,7 @@ identity: <T as pallet_identity::Config>::IdtyIndex </details> -See [`Pallet::force_valid_distance_status`]. +Force set the distance evaluation status of an identity ### AtomicSwap - 50 @@ -814,7 +1070,18 @@ duration: BlockNumberFor<T> </details> -See [`Pallet::create_swap`]. +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. #### claim_swap - 1 @@ -829,7 +1096,13 @@ action: T::SwapAction </details> -See [`Pallet::claim_swap`]. +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. #### cancel_swap - 2 @@ -844,7 +1117,12 @@ hashed_proof: HashedProof </details> -See [`Pallet::cancel_swap`]. +Cancel an atomic swap. Only possible after the originally set duration has passed. + +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 @@ -852,7 +1130,7 @@ See [`Pallet::cancel_swap`]. <details><summary><code>as_multi_threshold_1(other_signatories, call)</code></summary> -Taking 0.0045 % of a block. +Taking 0.0041 % of a block. ```rust other_signatories: Vec<T::AccountId> @@ -861,7 +1139,18 @@ call: Box<<T as Config>::RuntimeCall> </details> -See [`Pallet::as_multi_threshold_1`]. +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. #### as_multi - 1 @@ -879,7 +1168,45 @@ max_weight: Weight </details> -See [`Pallet::as_multi`]. +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`. #### approve_as_multi - 2 @@ -897,13 +1224,42 @@ max_weight: Weight </details> -See [`Pallet::approve_as_multi`]. +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`. #### cancel_as_multi - 3 <details><summary><code>cancel_as_multi(threshold, other_signatories, timepoint, call_hash)</code></summary> -Taking 0.0135 % of a block. +Taking 0.0117 % of a block. ```rust threshold: u16 @@ -914,7 +1270,27 @@ call_hash: [u8; 32] </details> -See [`Pallet::cancel_as_multi`]. +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_. + +- `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 @@ -922,7 +1298,7 @@ See [`Pallet::cancel_as_multi`]. <details><summary><code>request(randomness_type, salt)</code></summary> -Taking 0.0393 % of a block. +Taking 0.0418 % of a block. ```rust randomness_type: RandomnessType @@ -931,7 +1307,7 @@ salt: H256 </details> -See [`Pallet::request`]. +Request a randomness ### Proxy - 53 @@ -939,7 +1315,7 @@ See [`Pallet::request`]. <details><summary><code>proxy(real, force_proxy_type, call)</code></summary> -Taking 0.0063 % of a block. +Taking 0.0053 % of a block. ```rust real: AccountIdLookupOf<T> @@ -949,13 +1325,21 @@ call: Box<<T as Config>::RuntimeCall> </details> -See [`Pallet::proxy`]. +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. #### add_proxy - 1 <details><summary><code>add_proxy(delegate, proxy_type, delay)</code></summary> -Taking 0.0129 % of a block. +Taking 0.0114 % of a block. ```rust delegate: AccountIdLookupOf<T> @@ -965,13 +1349,21 @@ delay: BlockNumberFor<T> </details> -See [`Pallet::add_proxy`]. +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. #### remove_proxy - 2 <details><summary><code>remove_proxy(delegate, proxy_type, delay)</code></summary> -Taking 0.0133 % of a block. +Taking 0.0115 % of a block. ```rust delegate: AccountIdLookupOf<T> @@ -981,26 +1373,37 @@ delay: BlockNumberFor<T> </details> -See [`Pallet::remove_proxy`]. +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. #### remove_proxies - 3 <details><summary><code>remove_proxies()</code></summary> -Taking 0.0129 % of a block. +Taking 0.0114 % of a block. ```rust ``` </details> -See [`Pallet::remove_proxies`]. +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.** #### create_pure - 4 <details><summary><code>create_pure(proxy_type, delay, index)</code></summary> -Taking 0.0141 % of a block. +Taking 0.0115 % of a block. ```rust proxy_type: T::ProxyType @@ -1010,13 +1413,30 @@ index: u16 </details> -See [`Pallet::create_pure`]. +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. #### kill_pure - 5 <details><summary><code>kill_pure(spawner, proxy_type, index, height, ext_index)</code></summary> -Taking 0.0125 % of a block. +Taking 0.0114 % of a block. ```rust spawner: AccountIdLookupOf<T> @@ -1028,13 +1448,28 @@ ext_index: u32 </details> -See [`Pallet::kill_pure`]. +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. #### announce - 6 <details><summary><code>announce(real, call_hash)</code></summary> -Taking 0.0218 % of a block. +Taking 0.0199 % of a block. ```rust real: AccountIdLookupOf<T> @@ -1043,13 +1478,27 @@ call_hash: CallHashOf<T> </details> -See [`Pallet::announce`]. +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. #### remove_announcement - 7 <details><summary><code>remove_announcement(real, call_hash)</code></summary> -Taking 0.0198 % of a block. +Taking 0.0185 % of a block. ```rust real: AccountIdLookupOf<T> @@ -1058,13 +1507,22 @@ call_hash: CallHashOf<T> </details> -See [`Pallet::remove_announcement`]. +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. #### reject_announcement - 8 <details><summary><code>reject_announcement(delegate, call_hash)</code></summary> -Taking 0.02 % of a block. +Taking 0.0185 % of a block. ```rust delegate: AccountIdLookupOf<T> @@ -1073,13 +1531,22 @@ call_hash: CallHashOf<T> </details> -See [`Pallet::reject_announcement`]. +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. #### proxy_announced - 9 <details><summary><code>proxy_announced(delegate, real, force_proxy_type, call)</code></summary> -Taking 0.0235 % of a block. +Taking 0.02 % of a block. ```rust delegate: AccountIdLookupOf<T> @@ -1090,7 +1557,17 @@ call: Box<<T as Config>::RuntimeCall> </details> -See [`Pallet::proxy_announced`]. +Dispatch the given `call` from an account that the sender is authorized for through +`add_proxy`. + +Removes any corresponding announcement(s). + +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 @@ -1098,7 +1575,7 @@ See [`Pallet::proxy_announced`]. <details><summary><code>batch(calls)</code></summary> -Taking 0.2728 % of a block. +Taking 0.1077 % of a block. ```rust calls: Vec<<T as Config>::RuntimeCall> @@ -1106,13 +1583,30 @@ calls: Vec<<T as Config>::RuntimeCall> </details> -See [`Pallet::batch`]. +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. #### as_derivative - 1 <details><summary><code>as_derivative(index, call)</code></summary> -Taking 0.004 % of a block. +Taking 0.0038 % of a block. ```rust index: u16 @@ -1121,13 +1615,25 @@ call: Box<<T as Config>::RuntimeCall> </details> -See [`Pallet::as_derivative`]. +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_. #### batch_all - 2 <details><summary><code>batch_all(calls)</code></summary> -Taking 0.2935 % of a block. +Taking 0.1127 % of a block. ```rust calls: Vec<<T as Config>::RuntimeCall> @@ -1135,13 +1641,25 @@ calls: Vec<<T as Config>::RuntimeCall> </details> -See [`Pallet::batch_all`]. +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. #### force_batch - 4 <details><summary><code>force_batch(calls)</code></summary> -Taking 0.3104 % of a block. +Taking 0.1071 % of a block. ```rust calls: Vec<<T as Config>::RuntimeCall> @@ -1149,7 +1667,19 @@ calls: Vec<<T as Config>::RuntimeCall> </details> -See [`Pallet::force_batch`]. +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. #### with_weight - 5 @@ -1164,7 +1694,12 @@ weight: Weight </details> -See [`Pallet::with_weight`]. +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. + +The dispatch origin for this call must be _Root_. ### Treasury - 55 @@ -1172,7 +1707,7 @@ See [`Pallet::with_weight`]. <details><summary><code>propose_spend(value, beneficiary)</code></summary> -Taking 0.0183 % of a block. +Taking 0.0172 % of a block. ```rust value: BalanceOf<T, I> @@ -1181,7 +1716,22 @@ beneficiary: AccountIdLookupOf<T> </details> -See [`Pallet::propose_spend`]. +Put forward a suggestion for spending. + +## Dispatch Origin + +Must be signed. + +## Details +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) + +## Events + +Emits [`Event::Proposed`] if successful. #### spend_local - 3 @@ -1196,13 +1746,29 @@ beneficiary: AccountIdLookupOf<T> </details> -See [`Pallet::spend_local`]. +Propose and approve a spend of treasury funds. + +## Dispatch Origin + +Must be [`Config::SpendOrigin`] with the `Success` value being at least `amount`. + +### Details +NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the +beneficiary. + +### Parameters +- `amount`: The amount to be transferred from the treasury to the `beneficiary`. +- `beneficiary`: The destination account for the transfer. + +## Events + +Emits [`Event::SpendApproved`] if successful. #### remove_approval - 4 <details><summary><code>remove_approval(proposal_id)</code></summary> -Taking 0.0111 % of a block. +Taking 0.0108 % of a block. ```rust proposal_id: ProposalIndex @@ -1210,13 +1776,33 @@ proposal_id: ProposalIndex </details> -See [`Pallet::remove_approval`]. +Force a previously approved proposal to be removed from the approval queue. + +## Dispatch Origin + +Must be [`Config::RejectOrigin`]. + +## Details + +The original deposit will no longer be returned. + +### Parameters +- `proposal_id`: The index of a proposal + +#**Complexity** +- O(A) where `A` is the number of approvals + +### Errors +- [`Error::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. #### spend - 5 <details><summary><code>spend(asset_kind, amount, beneficiary, valid_from)</code></summary> -Taking 0.0035 % of a block. +Taking 0.0036 % of a block. ```rust asset_kind: Box<T::AssetKind> @@ -1227,13 +1813,38 @@ valid_from: Option<BlockNumberFor<T>> </details> -See [`Pallet::spend`]. +Propose and approve a spend of treasury funds. + +## Dispatch Origin + +Must be [`Config::SpendOrigin`] with the `Success` value being at least +`amount` of `asset_kind` in the native asset. The amount of `asset_kind` is converted +for assertion using the [`Config::BalanceConverter`]. + +## Details + +Create an approved spend for transferring a specific `amount` of `asset_kind` to a +designated beneficiary. The spend must be claimed using the `payout` dispatchable within +the [`Config::PayoutPeriod`]. + +### Parameters +- `asset_kind`: An indicator of the specific asset class to be spent. +- `amount`: The amount to be transferred from the treasury to the `beneficiary`. +- `beneficiary`: The beneficiary of the spend. +- `valid_from`: The block number from which the spend can be claimed. It can refer to + the past if the resulting spend has not yet expired according to the + [`Config::PayoutPeriod`]. If `None`, the spend can be claimed immediately after + approval. + +## Events + +Emits [`Event::AssetSpendApproved`] if successful. #### payout - 6 <details><summary><code>payout(index)</code></summary> -Taking 0.0326 % of a block. +Taking 0.0263 % of a block. ```rust index: SpendIndex @@ -1241,7 +1852,25 @@ index: SpendIndex </details> -See [`Pallet::payout`]. +Claim a spend. + +## Dispatch Origin + +Must be signed. + +## Details + +Spends must be claimed within some temporal bounds. A spend may be claimed within one +[`Config::PayoutPeriod`] from the `valid_from` block. +In case of a payout failure, the spend status must be updated with the `check_status` +dispatchable before retrying with the current function. + +### Parameters +- `index`: The spend index. + +## Events + +Emits [`Event::Paid`] if successful. #### check_status - 7 @@ -1255,13 +1884,31 @@ index: SpendIndex </details> -See [`Pallet::check_status`]. +Check the status of the spend and remove it from the storage if processed. + +## Dispatch Origin + +Must be signed. + +## Details + +The status check is a prerequisite for retrying a failed payout. +If a spend has either succeeded or expired, it is removed from the storage by this +function. In such instances, transaction fees are refunded. + +### Parameters +- `index`: The spend index. + +## Events + +Emits [`Event::PaymentFailed`] if the spend payout has failed. +Emits [`Event::SpendProcessed`] if the spend payout has succeed. #### void_spend - 8 <details><summary><code>void_spend(index)</code></summary> -Taking 0.011 % of a block. +Taking 0.0109 % of a block. ```rust index: SpendIndex @@ -1269,7 +1916,22 @@ index: SpendIndex </details> -See [`Pallet::void_spend`]. +Void previously approved spend. + +## Dispatch Origin + +Must be [`Config::RejectOrigin`]. + +## Details + +A spend void is only possible if the payout has not been attempted yet. + +### Parameters +- `index`: The spend index. + +## Events + +Emits [`Event::AssetSpendVoided`] if successful. @@ -1283,7 +1945,7 @@ There are **18** root calls from **8** pallets. <details><summary><code>set_heap_pages(pages)</code></summary> -Taking 0.0169 % of a block. +Taking 0.0165 % of a block. ```rust pages: u64 @@ -1291,13 +1953,13 @@ pages: u64 </details> -See [`Pallet::set_heap_pages`]. +Set the number of pages in the WebAssembly environment's heap. #### set_code - 2 <details><summary><code>set_code(code)</code></summary> -Taking 3.9604 % of a block. +Taking 4.0113 % of a block. ```rust code: Vec<u8> @@ -1305,7 +1967,7 @@ code: Vec<u8> </details> -See [`Pallet::set_code`]. +Set the new runtime code. #### set_code_without_checks - 3 @@ -1319,13 +1981,16 @@ code: Vec<u8> </details> -See [`Pallet::set_code_without_checks`]. +Set the new runtime code without doing any checks of the given `code`. + +Note that runtime upgrades will not run if this is called with a not-increasing spec +version! #### set_storage - 4 <details><summary><code>set_storage(items)</code></summary> -Taking 5.9169 % of a block. +Taking 5.8851 % of a block. ```rust items: Vec<KeyValue> @@ -1333,13 +1998,13 @@ items: Vec<KeyValue> </details> -See [`Pallet::set_storage`]. +Set some items of storage. #### kill_storage - 5 <details><summary><code>kill_storage(keys)</code></summary> -Taking 5.8899 % of a block. +Taking 5.8773 % of a block. ```rust keys: Vec<Key> @@ -1347,13 +2012,13 @@ keys: Vec<Key> </details> -See [`Pallet::kill_storage`]. +Kill some items from storage. #### kill_prefix - 6 <details><summary><code>kill_prefix(prefix, subkeys)</code></summary> -Taking 7.0785 % of a block. +Taking 6.9458 % of a block. ```rust prefix: Key @@ -1362,13 +2027,16 @@ subkeys: u32 </details> -See [`Pallet::kill_prefix`]. +Kill all storage items with a key that starts with the given prefix. + +**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. #### authorize_upgrade - 9 <details><summary><code>authorize_upgrade(code_hash)</code></summary> -Taking 0.0098 % of a block. +Taking 0.0101 % of a block. ```rust code_hash: T::Hash @@ -1376,7 +2044,10 @@ code_hash: T::Hash </details> -See [`Pallet::authorize_upgrade`]. +Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied +later. + +This call requires Root origin. #### authorize_upgrade_without_checks - 10 @@ -1390,13 +2061,20 @@ code_hash: T::Hash </details> -See [`Pallet::authorize_upgrade_without_checks`]. +Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied +later. + +WARNING: This authorizes an upgrade that will take place without any safety checks, for +example that the spec name remains the same and that the version number increases. Not +recommended for normal use. Use `authorize_upgrade` instead. + +This call requires Root origin. #### apply_authorized_upgrade - 11 <details><summary><code>apply_authorized_upgrade(code)</code></summary> -Taking 4.1178 % of a block. +Taking 4.2016 % of a block. ```rust code: Vec<u8> @@ -1404,7 +2082,15 @@ code: Vec<u8> </details> -See [`Pallet::apply_authorized_upgrade`]. +Provide the preimage (runtime binary) `code` for an upgrade that has been authorized. + +If the authorization required a version check, this call will ensure the spec name +remains unchanged and that the spec version has increased. + +Depending on the runtime's `OnSetCode` configuration, this function may directly apply +the new `code` in the same block or attempt to schedule the upgrade. + +All origins are allowed. ### Babe - 3 @@ -1420,7 +2106,10 @@ config: NextConfigDescriptor </details> -See [`Pallet::plan_config_change`]. +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. ### Balances - 6 @@ -1428,7 +2117,7 @@ See [`Pallet::plan_config_change`]. <details><summary><code>force_transfer(source, dest, value)</code></summary> -Taking 0.0347 % of a block. +Taking 0.0265 % of a block. ```rust source: AccountIdLookupOf<T> @@ -1438,13 +2127,14 @@ value: T::Balance </details> -See [`Pallet::force_transfer`]. +Exactly as `transfer_allow_death`, except the origin must be root and the source account +may be specified. #### force_unreserve - 5 <details><summary><code>force_unreserve(who, amount)</code></summary> -Taking 0.0128 % of a block. +Taking 0.0112 % of a block. ```rust who: AccountIdLookupOf<T> @@ -1453,7 +2143,9 @@ amount: T::Balance </details> -See [`Pallet::force_unreserve`]. +Unreserve some balance from a user by force. + +Can only be called by ROOT. ### AuthorityMembers - 11 @@ -1461,7 +2153,7 @@ See [`Pallet::force_unreserve`]. <details><summary><code>remove_member(member_id)</code></summary> -Taking 0.073 % of a block. +Taking 0.0701 % of a block. ```rust member_id: T::MemberId @@ -1469,7 +2161,7 @@ member_id: T::MemberId </details> -See [`Pallet::remove_member`]. +remove an identity from the set of authorities ### Grandpa - 16 @@ -1486,7 +2178,18 @@ best_finalized_block_number: BlockNumberFor<T> </details> -See [`Pallet::note_stalled`]. +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. + +Only callable by root. ### TechnicalCommittee - 23 @@ -1494,7 +2197,7 @@ See [`Pallet::note_stalled`]. <details><summary><code>set_members(new_members, prime, old_count)</code></summary> -Taking 0.175 % of a block. +Taking 0.1657 % of a block. ```rust new_members: Vec<T::AccountId> @@ -1504,13 +2207,36 @@ old_count: MemberCount </details> -See [`Pallet::set_members`]. +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) #### disapprove_proposal - 5 <details><summary><code>disapprove_proposal(proposal_hash)</code></summary> -Taking 0.0236 % of a block. +Taking 0.0229 % of a block. ```rust proposal_hash: T::Hash @@ -1518,7 +2244,16 @@ proposal_hash: T::Hash </details> -See [`Pallet::disapprove_proposal`]. +Disapprove a proposal, close, and remove it from the system, regardless of its current +state. + +Must be called by the Root origin. + +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 @@ -1526,7 +2261,7 @@ See [`Pallet::disapprove_proposal`]. <details><summary><code>prune_item_identities_names(names)</code></summary> -Taking 5.9553 % of a block. +Taking 5.9211 % of a block. ```rust names: Vec<IdtyName> @@ -1534,7 +2269,7 @@ names: Vec<IdtyName> </details> -See [`Pallet::prune_item_identities_names`]. +remove identity names from storage ### Utility - 54 @@ -1542,7 +2277,7 @@ See [`Pallet::prune_item_identities_names`]. <details><summary><code>dispatch_as(as_origin, call)</code></summary> -Taking 0.005 % of a block. +Taking 0.0039 % of a block. ```rust as_origin: Box<T::PalletsOrigin> @@ -1551,7 +2286,12 @@ call: Box<<T as Config>::RuntimeCall> </details> -See [`Pallet::dispatch_as`]. +Dispatches a function call with a provided origin. + +The dispatch origin for this call must be _Root_. + +**Complexity** +- O(1). @@ -1568,7 +2308,7 @@ There are **4** disabled calls from **2** pallets. <details><summary><code>remark(remark)</code></summary> -Taking 0.0946 % of a block. +Taking 0.054 % of a block. ```rust remark: Vec<u8> @@ -1576,13 +2316,15 @@ remark: Vec<u8> </details> -See [`Pallet::remark`]. +Make some on-chain remark. + +Can be executed by every `origin`. #### remark_with_event - 7 <details><summary><code>remark_with_event(remark)</code></summary> -Taking 0.3505 % of a block. +Taking 0.2052 % of a block. ```rust remark: Vec<u8> @@ -1590,7 +2332,7 @@ remark: Vec<u8> </details> -See [`Pallet::remark_with_event`]. +Make some on-chain remark and emit event. ### Session - 15 @@ -1598,7 +2340,7 @@ See [`Pallet::remark_with_event`]. <details><summary><code>set_keys(keys, proof)</code></summary> -Taking 0.0406 % of a block. +Taking 0.0394 % of a block. ```rust keys: T::Keys @@ -1607,18 +2349,37 @@ proof: Vec<u8> </details> -See [`Pallet::set_keys`]. +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. #### purge_keys - 1 <details><summary><code>purge_keys()</code></summary> -Taking 0.0351 % of a block. +Taking 0.0347 % of a block. ```rust ``` </details> -See [`Pallet::purge_keys`]. +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. diff --git a/docs/api/runtime-errors.md b/docs/api/runtime-errors.md index 2821e156c619c5dfc2433cd5fb1e7f0f69b79d54..667342478644643900f109e811a5308e55ecc1e3 100644 --- a/docs/api/runtime-errors.md +++ b/docs/api/runtime-errors.md @@ -1,6 +1,6 @@ # Runtime errors -There are **186** errors from **35** pallets. +There are **189** errors from **35** pallets. <ul> <li>System - 0 @@ -54,14 +54,21 @@ The origin filter prevent the call to be dispatched. <li> <details> <summary> -<code>NothingAuthorized</code> - 6</summary> +<code>MultiBlockMigrationsOngoing</code> - 6</summary> +A multi-block migration is ongoing and prevents the current code from being replaced. +</details> +</li> +<li> +<details> +<summary> +<code>NothingAuthorized</code> - 7</summary> No upgrade authorized. </details> </li> <li> <details> <summary> -<code>Unauthorized</code> - 7</summary> +<code>Unauthorized</code> - 8</summary> The submitted code is not authorized. </details> </li> @@ -212,7 +219,7 @@ Number of named reserves exceed `MaxReserves`. <details> <summary> <code>TooManyHolds</code> - 8</summary> -Number of holds exceed `MaxHolds`. +Number of holds exceed `VariantCountOf<T::RuntimeHoldReason>`. </details> </li> <li> @@ -222,6 +229,20 @@ Number of holds exceed `MaxHolds`. Number of freezes exceed `MaxFreezes`. </details> </li> +<li> +<details> +<summary> +<code>IssuanceDeactivated</code> - 10</summary> +The issuance cannot be modified since it is already deactivated. +</details> +</li> +<li> +<details> +<summary> +<code>DeltaZero</code> - 11</summary> +The delta cannot be zero. +</details> +</li> </ul> </li> <li>TransactionPayment - 32 diff --git a/docs/api/runtime-events.md b/docs/api/runtime-events.md index bc1206827a529f9cb9321f72f0b0568d98155dd4..6b1404aa3c120c6d61fcf3c2d213dc9b5cf91aa8 100644 --- a/docs/api/runtime-events.md +++ b/docs/api/runtime-events.md @@ -1,6 +1,6 @@ # Runtime events -There are **134** events from **35** pallets. +There are **138** events from **35** pallets. <ul> <li>System - 0 @@ -168,7 +168,35 @@ result: DispatchResult <li> <details> <summary> -<code>CallUnavailable(task, id)</code> - 3</summary> +<code>RetrySet(task, id, period, retries)</code> - 3</summary> +Set a retry configuration for some task. + +```rust +task: TaskAddress<BlockNumberFor<T>> +id: Option<TaskName> +period: BlockNumberFor<T> +retries: u8 +``` + +</details> +</li> +<li> +<details> +<summary> +<code>RetryCancelled(task, id)</code> - 4</summary> +Cancel a retry configuration for some task. + +```rust +task: TaskAddress<BlockNumberFor<T>> +id: Option<TaskName> +``` + +</details> +</li> +<li> +<details> +<summary> +<code>CallUnavailable(task, id)</code> - 5</summary> The call for the provided hash was not found so the task has been aborted. ```rust @@ -181,7 +209,7 @@ id: Option<TaskName> <li> <details> <summary> -<code>PeriodicFailed(task, id)</code> - 4</summary> +<code>PeriodicFailed(task, id)</code> - 6</summary> The given task was unable to be renewed since the agenda is full at that block. ```rust @@ -194,7 +222,21 @@ id: Option<TaskName> <li> <details> <summary> -<code>PermanentlyOverweight(task, id)</code> - 5</summary> +<code>RetryFailed(task, id)</code> - 7</summary> +The given task was unable to be retried since the agenda is full at that block or there +was not enough weight to reschedule it. + +```rust +task: TaskAddress<BlockNumberFor<T>> +id: Option<TaskName> +``` + +</details> +</li> +<li> +<details> +<summary> +<code>PermanentlyOverweight(task, id)</code> - 8</summary> The given task can never be executed since it is overweight. ```rust @@ -493,6 +535,19 @@ who: T::AccountId amount: T::Balance ``` +</details> +</li> +<li> +<details> +<summary> +<code>TotalIssuanceForced(old, new)</code> - 21</summary> +The `TotalIssuance` was forcefully changed. + +```rust +old: T::Balance +new: T::Balance +``` + </details> </li> </ul> @@ -636,12 +691,12 @@ no args <li> <details> <summary> -<code>InvitationSent(receiver, issuer)</code> - 0</summary> +<code>InvitationSent(issuer, receiver)</code> - 0</summary> An identity is being inivited to become a smith. ```rust -receiver: T::IdtyIndex issuer: T::IdtyIndex +receiver: T::IdtyIndex ``` </details> @@ -661,12 +716,12 @@ idty_index: T::IdtyIndex <li> <details> <summary> -<code>SmithCertAdded(receiver, issuer)</code> - 2</summary> +<code>SmithCertAdded(issuer, receiver)</code> - 2</summary> Certification received ```rust -receiver: T::IdtyIndex issuer: T::IdtyIndex +receiver: T::IdtyIndex ``` </details> @@ -674,12 +729,12 @@ issuer: T::IdtyIndex <li> <details> <summary> -<code>SmithCertRemoved(receiver, issuer)</code> - 3</summary> +<code>SmithCertRemoved(issuer, receiver)</code> - 3</summary> Certification lost ```rust -receiver: T::IdtyIndex issuer: T::IdtyIndex +receiver: T::IdtyIndex ``` </details> @@ -1386,11 +1441,12 @@ who: T::AccountId <li> <details> <summary> -<code>EvaluatedValid(idty_index)</code> - 1</summary> +<code>EvaluatedValid(idty_index, distance)</code> - 1</summary> Distance rule was found valid. ```rust idty_index: T::IdtyIndex +distance: Perbill ``` </details> @@ -1398,11 +1454,12 @@ idty_index: T::IdtyIndex <li> <details> <summary> -<code>EvaluatedInvalid(idty_index)</code> - 2</summary> +<code>EvaluatedInvalid(idty_index, distance)</code> - 2</summary> Distance rule was found invalid. ```rust idty_index: T::IdtyIndex +distance: Perbill ``` </details> diff --git a/node/src/command.rs b/node/src/command.rs index ed1bab724d786aafead70f62b722f17a76a3a3ea..704eff2b75fe83f422c335775c53320a757686d0 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -41,7 +41,7 @@ lazy_static! { }; }*/ -/// Unwraps a [`crate::client::Client`] into the concrete runtime client. +/// Unwraps a [`crate::service::client::Client`] into the concrete runtime client. #[cfg(feature = "runtime-benchmarks")] macro_rules! unwrap_client { ( diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index 4226040fdcbd1b576f9d3179994e17ca04fb785a..bc4fda8f1e59080dbbedd6567af9116de542027f 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -13,12 +13,12 @@ path = "src/main.rs" name = "xtask" [dependencies] -anyhow = { workspace = true } +anyhow = { workspace = true, features = ["std"] } clap = { workspace = true, features = ["derive"] } codec = { workspace = true, features = ["derive", "full", "bit-vec"] } -frame-metadata = { workspace = true } +frame-metadata = { workspace = true, features = ["current", "std"] } graphql_client = { workspace = true } -hex = { workspace = true } +hex = { workspace = true, features = ["alloc"] } memmap2 = { workspace = true } placeholder = { workspace = true } reqwest = { workspace = true, features = ["json"] } diff --git a/xtask/src/gen_doc.rs b/xtask/src/gen_doc.rs index 90252b01368c31d44408ec7e5307e7a708d241ab..9b94cca95a7edd0b81e8a5cc1e7f115a50a63333 100644 --- a/xtask/src/gen_doc.rs +++ b/xtask/src/gen_doc.rs @@ -21,6 +21,7 @@ use scale_info::form::PortableForm; use serde::Serialize; use std::collections::HashMap; use std::path::Path; +use std::process::Command; use std::{ fs::File, io::{Read, Write}, @@ -55,6 +56,7 @@ type RuntimePallets = Vec<Pallet>; struct Pallet { index: u8, name: String, + type_name: String, calls: Vec<Call>, events: Vec<Event>, errors: Vec<ErroR>, @@ -95,6 +97,7 @@ impl Pallet { fn new( index: u8, name: String, + type_name: String, call_scale_type_def: &Option<scale_info::TypeDef<PortableForm>>, event_scale_type_def: &Option<scale_info::TypeDef<PortableForm>>, error_scale_type_def: &Option<scale_info::TypeDef<PortableForm>>, @@ -129,6 +132,7 @@ impl Pallet { Ok(Self { index, name, + type_name, calls, events, errors, @@ -156,8 +160,8 @@ impl From<&scale_info::Variant<PortableForm>> for Call { impl From<&scale_info::Field<PortableForm>> for CallParam { fn from(field: &scale_info::Field<PortableForm>) -> Self { Self { - name: field.clone().name.unwrap_or_default(), - type_name: field.clone().type_name.unwrap_or_default(), + name: field.clone().name.unwrap_or_default().to_string(), + type_name: field.clone().type_name.unwrap_or_default().to_string(), } } } @@ -175,8 +179,8 @@ impl From<&scale_info::Variant<PortableForm>> for Event { impl From<&scale_info::Field<PortableForm>> for EventParam { fn from(field: &scale_info::Field<PortableForm>) -> Self { Self { - name: field.clone().name.unwrap_or_default(), - type_name: field.clone().type_name.unwrap_or_default(), + name: field.clone().name.unwrap_or_default().to_string(), + type_name: field.clone().type_name.unwrap_or_default().to_string(), } } } @@ -306,6 +310,34 @@ pub(super) fn gen_doc() -> Result<()> { let (call_doc, event_doc, error_doc) = print_runtime(runtime); + // Generate docs from rust code + Command::new("cargo") + .args([ + "doc", + "--package=pallet-*", + "--package=*-runtime", + "--package=*distance*", + "--package=*membership*", + "--no-deps", + "--document-private-items", + "--features=runtime-benchmarks", + "--package=pallet-atomic-swap", + "--package=pallet-authority-discovery", + "--package=pallet-balances", + "--package=pallet-collective", + "--package=pallet-im-online", + "--package=pallet-preimage", + "--package=pallet-proxy", + "--package=pallet-scheduler", + "--package=pallet-session", + "--package=pallet-sudo", + "--package=pallet-timestamp", + "--package=pallet-treasury", + "--package=pallet-utility", + ]) + .status() + .expect("cargo doc failed to execute"); + let mut file = File::create(CALLS_DOC_FILEPATH) .with_context(|| format!("Failed to create file '{}'", CALLS_DOC_FILEPATH))?; file.write_all(call_doc.as_bytes()) @@ -363,10 +395,17 @@ fn get_from_metadata_v15( println!("Number of pallets: {}", metadata_v15.pallets.len()); let mut pallets = Vec::new(); for pallet in metadata_v15.pallets { + let mut type_name: String = Default::default(); let calls_type_def = if let Some(calls) = pallet.calls { let Some(calls_type) = metadata_v15.types.resolve(calls.ty.id) else { bail!("Invalid metadata") }; + type_name = calls_type + .path + .segments + .first() + .expect("cannot decode pallet type") + .to_string(); Some(calls_type.type_def.clone()) } else { println!("{}: {} (0 calls)", pallet.index, pallet.name); @@ -394,6 +433,7 @@ fn get_from_metadata_v15( let pallet = Pallet::new( pallet.index, pallet.name.clone(), + type_name, &calls_type_def, &events_type_def, &errors_type_def,