diff --git a/Cargo.lock b/Cargo.lock index 77d5923..7764177 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -68,7 +68,7 @@ dependencies = [ "cipher 0.4.4", "ctr", "ghash", - "subtle 2.5.0", + "subtle 2.4.1", ] [[package]] @@ -215,7 +215,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -669,7 +669,7 @@ dependencies = [ "futures-io", "futures-lite 2.3.0", "parking", - "polling 3.7.1", + "polling 3.7.2", "rustix 0.38.34", "slab", "tracing", @@ -756,7 +756,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -812,7 +812,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -977,7 +977,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -1007,9 +1007,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bitmaps" @@ -1256,9 +1256,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.16.0" +version = "1.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78834c15cb5d5efe3452d58b1e8ba890dd62d21907f867f383358198e56ebca5" +checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" [[package]] name = "byteorder" @@ -1333,9 +1333,9 @@ checksum = "fd6c0e7b807d60291f42f33f58480c0bfafe28ed08286446f45e463728cf9c1c" [[package]] name = "cc" -version = "1.0.99" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" +checksum = "ac367972e516d45567c7eafc73d24e1c193dcf200a8d94e9db7b3d38b349572d" dependencies = [ "jobserver", "libc", @@ -1557,7 +1557,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -1625,7 +1625,7 @@ dependencies = [ "nom", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -1650,7 +1650,7 @@ version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b34115915337defe99b2aff5c2ce6771e5fbc4079f4b506301f5cf394c8452f7" dependencies = [ - "strum 0.26.2", + "strum 0.26.3", "strum_macros 0.26.4", "unicode-width", ] @@ -1972,7 +1972,7 @@ checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle 2.5.0", + "subtle 2.4.1", "zeroize", ] @@ -2004,17 +2004,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ "generic-array 0.14.7", - "subtle 2.5.0", + "subtle 2.4.1", ] [[package]] name = "crypto-mac" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e" +checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ "generic-array 0.14.7", - "subtle 2.5.0", + "subtle 2.4.1", ] [[package]] @@ -2319,7 +2319,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -2612,7 +2612,7 @@ dependencies = [ "byteorder", "digest 0.8.1", "rand_core 0.5.1", - "subtle 2.5.0", + "subtle 2.4.1", "zeroize", ] @@ -2625,24 +2625,23 @@ dependencies = [ "byteorder", "digest 0.9.0", "rand_core 0.5.1", - "subtle 2.5.0", + "subtle 2.4.1", "zeroize", ] [[package]] name = "curve25519-dalek" -version = "4.1.2" +version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", - "platforms", "rustc_version 0.4.0", - "subtle 2.5.0", + "subtle 2.4.1", "zeroize", ] @@ -2654,7 +2653,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -2672,9 +2671,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.123" +version = "1.0.124" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8194f089b6da4751d6c1da1ef37c17255df51f9346cdb160f8b096562ae4a85c" +checksum = "273dcfd3acd4e1e276af13ed2a43eea7001318823e7a726a6b3ed39b4acc0b82" dependencies = [ "cc", "cxxbridge-flags", @@ -2684,9 +2683,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.123" +version = "1.0.124" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e8df9a089caae66634d754672d5f909395f30f38af6ff19366980d8a8b57501" +checksum = "d8b2766fbd92be34e9ed143898fce6c572dc009de39506ed6903e5a05b68914e" dependencies = [ "cc", "codespan-reporting", @@ -2694,24 +2693,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] name = "cxxbridge-flags" -version = "1.0.123" +version = "1.0.124" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25290be4751803672a70b98c68b51c1e7d0a640ab5a4377f240f9d2e70054cd1" +checksum = "839fcd5e43464614ffaa989eaf1c139ef1f0c51672a1ed08023307fa1b909ccd" [[package]] name = "cxxbridge-macro" -version = "1.0.123" +version = "1.0.124" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8cb317cb13604b4752416783bb25070381c36e844743e4146b7f8e55de7d140" +checksum = "4b2c1c1776b986979be68bb2285da855f8d8a35851a769fca8740df7c3d07877" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -2759,7 +2758,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -2781,7 +2780,7 @@ checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" dependencies = [ "darling_core 0.20.9", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -2886,20 +2885,20 @@ checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "convert_case", "proc-macro2", "quote", "rustc_version 0.4.0", - "syn 1.0.109", + "syn 2.0.68", ] [[package]] @@ -2947,7 +2946,7 @@ dependencies = [ "block-buffer 0.10.4", "const-oid", "crypto-common", - "subtle 2.5.0", + "subtle 2.4.1", ] [[package]] @@ -3004,13 +3003,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -3050,7 +3049,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.66", + "syn 2.0.68", "termcolor", "toml 0.8.14", "walkdir", @@ -3137,12 +3136,12 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ - "curve25519-dalek 4.1.2", + "curve25519-dalek 4.1.3", "ed25519", "rand_core 0.6.4", "serde", "sha2 0.10.8", - "subtle 2.5.0", + "subtle 2.4.1", "zeroize", ] @@ -3166,7 +3165,7 @@ version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" dependencies = [ - "curve25519-dalek 4.1.2", + "curve25519-dalek 4.1.3", "ed25519", "hashbrown 0.14.5", "hex", @@ -3177,9 +3176,9 @@ dependencies = [ [[package]] name = "either" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" dependencies = [ "serde", ] @@ -3199,7 +3198,7 @@ dependencies = [ "pkcs8", "rand_core 0.6.4", "sec1", - "subtle 2.5.0", + "subtle 2.4.1", "zeroize", ] @@ -3238,7 +3237,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -3249,7 +3248,7 @@ checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -3478,16 +3477,17 @@ dependencies = [ [[package]] name = "expander" -version = "2.1.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00e83c02035136f1592a47964ea60c05a50e4ed8b5892cfac197063850898d4d" +checksum = "e2c470c71d91ecbd179935b24170459e926382eaaa86b590b78814e180d8a8e2" dependencies = [ "blake2 0.10.6", + "file-guard", "fs-err", - "prettier-please", + "prettyplease 0.2.20", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -3758,7 +3758,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "rand_core 0.6.4", - "subtle 2.5.0", + "subtle 2.4.1", ] [[package]] @@ -3780,6 +3780,16 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" +[[package]] +name = "file-guard" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21ef72acf95ec3d7dbf61275be556299490a245f017cf084bd23b4f68cf9407c" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "file-per-thread-logger" version = "0.1.6" @@ -4106,7 +4116,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -4253,7 +4263,7 @@ dependencies = [ "Inflector", "cfg-expr", "derive-syn-parse 0.1.5", - "expander 2.1.0", + "expander 2.2.1", "frame-support-procedural-tools", "itertools 0.10.5", "macro_magic", @@ -4261,7 +4271,7 @@ dependencies = [ "proc-macro2", "quote", "sp-crypto-hashing", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -4273,7 +4283,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -4283,7 +4293,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -4473,7 +4483,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -4646,7 +4656,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "ignore", "walkdir", ] @@ -4659,7 +4669,7 @@ checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", "rand_core 0.6.4", - "subtle 2.5.0", + "subtle 2.4.1", ] [[package]] @@ -4787,6 +4797,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "hex" version = "0.4.3" @@ -4824,7 +4840,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" dependencies = [ - "crypto-mac 0.11.0", + "crypto-mac 0.11.1", "digest 0.9.0", ] @@ -4898,9 +4914,9 @@ checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" -version = "1.9.3" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0e7a4dd27b9476dc40cb050d3632d3bba3a70ddbff012285f7f8559a1e7e545" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -4986,124 +5002,6 @@ dependencies = [ "cc", ] -[[package]] -name = "icu_collections" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locid" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_locid_transform" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_locid_transform_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" - -[[package]] -name = "icu_normalizer" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "utf16_iter", - "utf8_iter", - "write16", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" - -[[package]] -name = "icu_properties" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f8ac670d7422d7f76b32e17a5db556510825b29ec9154f235977c9caba61036" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_locid_transform", - "icu_properties_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" - -[[package]] -name = "icu_provider" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_provider_macros", - "stable_deref_trait", - "tinystr", - "writeable", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_provider_macros" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - [[package]] name = "ident_case" version = "1.0.1" @@ -5123,14 +5021,12 @@ dependencies = [ [[package]] name = "idna" -version = "1.0.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4716a3a0933a1d01c2f72450e89596eb51dd34ef3c211ccd875acdf1f8fe47ed" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ - "icu_normalizer", - "icu_properties", - "smallvec", - "utf8_iter", + "unicode-bidi", + "unicode-normalization", ] [[package]] @@ -5232,18 +5128,18 @@ dependencies = [ [[package]] name = "include_dir" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" dependencies = [ "include_dir_macros", ] [[package]] name = "include_dir_macros" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" dependencies = [ "proc-macro2", "quote", @@ -5666,11 +5562,11 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" dependencies = [ - "spin 0.5.2", + "spin 0.9.8", ] [[package]] @@ -5687,9 +5583,9 @@ checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libloading" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" dependencies = [ "cfg-if", "windows-targets 0.52.5", @@ -6100,7 +5996,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", ] @@ -6146,7 +6042,7 @@ checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" dependencies = [ "crunchy", "digest 0.9.0", - "subtle 2.5.0", + "subtle 2.4.1", ] [[package]] @@ -6252,12 +6148,6 @@ dependencies = [ "keystream", ] -[[package]] -name = "litemap" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" - [[package]] name = "lock_api" version = "0.4.12" @@ -6348,7 +6238,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -6362,7 +6252,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -6373,7 +6263,7 @@ checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -6384,7 +6274,7 @@ checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -6592,9 +6482,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memfd" @@ -6684,9 +6574,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] @@ -6713,7 +6603,7 @@ dependencies = [ "bitflags 1.3.2", "blake2 0.10.6", "c2-chacha", - "curve25519-dalek 4.1.2", + "curve25519-dalek 4.1.3", "either", "hashlink", "lioness", @@ -6722,7 +6612,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "rand_distr", - "subtle 2.5.0", + "subtle 2.4.1", "thiserror", "zeroize", ] @@ -7502,7 +7392,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", "synstructure 0.13.1", ] @@ -7528,9 +7418,9 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.32.5" +version = "0.32.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ea4908d4f23254adda3daa60ffef0f1ac7b8c3e9a864cf3cc154b251908a2ef" +checksum = "7b5c17de023a86f59ed79891b2e5d5a94c705dbe904a5b5c9c952ea6221b03e4" dependencies = [ "approx", "matrixmultiply", @@ -7544,13 +7434,13 @@ dependencies = [ [[package]] name = "nalgebra-macros" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" +checksum = "254a5372af8fc138e36684761d3c0cdb758a4410e938babcff1c860ce14ddbfc" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.68", ] [[package]] @@ -7668,7 +7558,7 @@ version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg-if", "libc", ] @@ -7835,7 +7725,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -7898,7 +7788,7 @@ version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg-if", "foreign-types", "libc", @@ -7915,7 +7805,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -7965,7 +7855,7 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1344346d5af32c95bbddea91b18a88cc83eac394192d20ef2fc4c40a74332355" dependencies = [ - "expander 2.1.0", + "expander 2.2.1", "indexmap 2.2.6", "itertools 0.11.0", "petgraph 0.6.5", @@ -8460,7 +8350,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -9384,7 +9274,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -9786,11 +9676,13 @@ dependencies = [ "pallet-message-queue", "pallet-move", "pallet-on-demand", + "pallet-multisig", "pallet-pot", "pallet-pot-runtime-api", "pallet-precompile-substrate-utils", "pallet-precompile-transfer-to-magnet", "pallet-preimage", + "pallet-proxy", "pallet-ranked-collective", "pallet-referenda", "pallet-scheduler", @@ -9971,7 +9863,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.1", + "redox_syscall 0.5.2", "smallvec", "windows-targets 0.52.5", ] @@ -10003,7 +9895,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" dependencies = [ - "crypto-mac 0.11.0", + "crypto-mac 0.11.1", ] [[package]] @@ -10067,7 +9959,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -10166,7 +10058,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -10214,12 +10106,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" -[[package]] -name = "platforms" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" - [[package]] name = "polkadot-approval-distribution" version = "7.0.0" @@ -11308,7 +11194,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6380dbe1fb03ecc74ad55d841cfc75480222d153ba69ddcb00977866cbdabdb8" dependencies = [ "polkavm-derive-impl 0.5.0", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -11329,7 +11215,7 @@ dependencies = [ "polkavm-common 0.5.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -11341,7 +11227,7 @@ dependencies = [ "polkavm-common 0.9.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -11351,7 +11237,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ba81f7b5faac81e528eb6158a6f3c9e0bb1008e0ffa19653bc8dea925ecb429" dependencies = [ "polkavm-derive-impl 0.9.0", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -11372,13 +11258,13 @@ dependencies = [ [[package]] name = "polling" -version = "3.7.1" +version = "3.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6a007746f34ed64099e88783b0ae369eaa3da6392868ba262e2af9b8fbaea1" +checksum = "a3ed00ed3fbf728b5816498ecd316d1716eecaced9c0c8d2c5a6740ca214985b" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi 0.3.9", + "hermit-abi 0.4.0", "pin-project-lite 0.2.14", "rustix 0.38.34", "tracing", @@ -11495,16 +11381,6 @@ dependencies = [ "termtree", ] -[[package]] -name = "prettier-please" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22020dfcf177fcc7bf5deaf7440af371400c67c0de14c399938d8ed4fb4645d3" -dependencies = [ - "proc-macro2", - "syn 2.0.66", -] - [[package]] name = "pretty" version = "0.10.0" @@ -11517,9 +11393,9 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.1.11" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28f53e8b192565862cf99343194579a022eb9c7dd3a8d03134734803c7b3125" +checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" dependencies = [ "proc-macro2", "syn 1.0.109", @@ -11532,7 +11408,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -11625,14 +11501,14 @@ checksum = "834da187cfe638ae8abb0203f0b33e5ccdb02a28e7199f2f47b3e2754f50edca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] name = "proc-macro2" -version = "1.0.85" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -11671,7 +11547,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -11707,7 +11583,7 @@ dependencies = [ "log", "multimap", "petgraph 0.6.5", - "prettyplease 0.1.11", + "prettyplease 0.1.25", "prost 0.11.9", "prost-types", "regex", @@ -11739,7 +11615,7 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -11989,11 +11865,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[package]] @@ -12036,7 +11912,7 @@ checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -12112,7 +11988,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ "hmac 0.12.1", - "subtle 2.5.0", + "subtle 2.4.1", ] [[package]] @@ -12436,7 +12312,7 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys 0.4.14", @@ -12554,9 +12430,9 @@ dependencies = [ [[package]] name = "safe_arch" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" +checksum = "c3460605018fdc9612bce72735cba0d27efbcd9904780d44c7e3a9948f96148a" dependencies = [ "bytemuck", ] @@ -12681,7 +12557,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -13690,7 +13566,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -13898,7 +13774,7 @@ dependencies = [ "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", - "subtle 2.5.0", + "subtle 2.4.1", "zeroize", ] @@ -13927,13 +13803,13 @@ dependencies = [ "aead", "arrayref", "arrayvec 0.7.4", - "curve25519-dalek 4.1.2", + "curve25519-dalek 4.1.3", "getrandom_or_panic", "merlin 3.0.0", "rand_core 0.6.4", "serde_bytes", "sha2 0.10.8", - "subtle 2.5.0", + "subtle 2.4.1", "zeroize", ] @@ -13969,7 +13845,7 @@ dependencies = [ "der", "generic-array 0.14.7", "pkcs8", - "subtle 2.5.0", + "subtle 2.4.1", "zeroize", ] @@ -14033,7 +13909,7 @@ version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -14094,9 +13970,9 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.14" +version = "0.11.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" +checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" dependencies = [ "serde", ] @@ -14109,14 +13985,14 @@ checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "d947f6b3163d8857ea16c4fa0dd4840d52f3041039a85decd46867eb1abef2e4" dependencies = [ "itoa", "ryu", @@ -14564,12 +14440,12 @@ dependencies = [ "aes-gcm", "blake2 0.10.6", "chacha20poly1305", - "curve25519-dalek 4.1.2", + "curve25519-dalek 4.1.3", "rand_core 0.6.4", "ring 0.17.8", "rustc_version 0.4.0", "sha2 0.10.8", - "subtle 2.5.0", + "subtle 2.4.1", ] [[package]] @@ -14637,11 +14513,11 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "Inflector", "blake2 0.10.6", - "expander 2.1.0", + "expander 2.2.1", "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -14980,7 +14856,7 @@ dependencies = [ [[package]] name = "sp-crypto-ec-utils" version = "0.10.0" -source = "git+https://github.com/paritytech/polkadot-sdk#ad8620922bd7c0477b25c7dfd6fc233641cb27ae" +source = "git+https://github.com/paritytech/polkadot-sdk#7c6ab07193e60a06de14f90fd3f618ac72ff17b6" dependencies = [ "ark-bls12-377", "ark-bls12-377-ext", @@ -15017,7 +14893,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "quote", "sp-crypto-hashing", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -15037,7 +14913,7 @@ checksum = "50535e1a5708d3ba5c1195b59ebefac61cc8679c2c24716b87a86e8b7ed2e4a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -15047,17 +14923,17 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#ad8620922bd7c0477b25c7dfd6fc233641cb27ae" +source = "git+https://github.com/paritytech/polkadot-sdk#7c6ab07193e60a06de14f90fd3f618ac72ff17b6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -15086,7 +14962,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.25.0" -source = "git+https://github.com/paritytech/polkadot-sdk#ad8620922bd7c0477b25c7dfd6fc233641cb27ae" +source = "git+https://github.com/paritytech/polkadot-sdk#7c6ab07193e60a06de14f90fd3f618ac72ff17b6" dependencies = [ "environmental", "parity-scale-codec", @@ -15395,7 +15271,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#ad8620922bd7c0477b25c7dfd6fc233641cb27ae" +source = "git+https://github.com/paritytech/polkadot-sdk#7c6ab07193e60a06de14f90fd3f618ac72ff17b6" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -15421,7 +15297,7 @@ dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -15430,24 +15306,24 @@ version = "17.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.0#851c824dc7a8e7e6db2d0c9fb29d232f2f45198a" dependencies = [ "Inflector", - "expander 2.1.0", + "expander 2.2.1", "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] name = "sp-runtime-interface-proc-macro" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#ad8620922bd7c0477b25c7dfd6fc233641cb27ae" +source = "git+https://github.com/paritytech/polkadot-sdk#7c6ab07193e60a06de14f90fd3f618ac72ff17b6" dependencies = [ "Inflector", - "expander 2.1.0", + "expander 2.2.1", "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -15528,7 +15404,7 @@ version = "10.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.0#851c824dc7a8e7e6db2d0c9fb29d232f2f45198a" dependencies = [ "aes-gcm", - "curve25519-dalek 4.1.2", + "curve25519-dalek 4.1.3", "ed25519-dalek", "hkdf", "parity-scale-codec", @@ -15561,7 +15437,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#ad8620922bd7c0477b25c7dfd6fc233641cb27ae" +source = "git+https://github.com/paritytech/polkadot-sdk#7c6ab07193e60a06de14f90fd3f618ac72ff17b6" [[package]] name = "sp-storage" @@ -15593,7 +15469,7 @@ dependencies = [ [[package]] name = "sp-storage" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#ad8620922bd7c0477b25c7dfd6fc233641cb27ae" +source = "git+https://github.com/paritytech/polkadot-sdk#7c6ab07193e60a06de14f90fd3f618ac72ff17b6" dependencies = [ "impl-serde", "parity-scale-codec", @@ -15643,7 +15519,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#ad8620922bd7c0477b25c7dfd6fc233641cb27ae" +source = "git+https://github.com/paritytech/polkadot-sdk#7c6ab07193e60a06de14f90fd3f618ac72ff17b6" dependencies = [ "parity-scale-codec", "tracing", @@ -15749,7 +15625,7 @@ dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -15782,7 +15658,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#ad8620922bd7c0477b25c7dfd6fc233641cb27ae" +source = "git+https://github.com/paritytech/polkadot-sdk#7c6ab07193e60a06de14f90fd3f618ac72ff17b6" dependencies = [ "impl-trait-for-tuples", "log", @@ -16115,7 +15991,7 @@ dependencies = [ "bitflags 1.3.2", "byteorder", "keccak", - "subtle 2.5.0", + "subtle 2.4.1", "zeroize", ] @@ -16142,9 +16018,9 @@ dependencies = [ [[package]] name = "strum" -version = "0.26.2" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" [[package]] name = "strum_macros" @@ -16169,7 +16045,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -16277,9 +16153,9 @@ checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" [[package]] name = "subtle" -version = "2.5.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "subtle-ng" @@ -16337,7 +16213,7 @@ dependencies = [ "quote", "scale-info", "subxt-metadata", - "syn 2.0.66", + "syn 2.0.68", "thiserror", "tokio", ] @@ -16369,7 +16245,7 @@ dependencies = [ "parity-scale-codec", "proc-macro-error", "subxt-codegen", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -16420,9 +16296,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.66" +version = "2.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" dependencies = [ "proc-macro2", "quote", @@ -16449,7 +16325,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -16576,7 +16452,7 @@ checksum = "e4c60d69f36615a077cc7663b9cb8e42275722d23e58a7fa3d2c7f2915d09d04" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -16587,7 +16463,7 @@ checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -16689,21 +16565,11 @@ dependencies = [ "crunchy", ] -[[package]] -name = "tinystr" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" -dependencies = [ - "displaydoc", - "zerovec", -] - [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "c55115c6fbe2d2bef26eb09ad74bde02d8255476fc0c7b515ef09fbb35742d82" dependencies = [ "tinyvec_macros", ] @@ -16741,7 +16607,7 @@ checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -16877,7 +16743,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "bytes", "futures-core", "futures-util", @@ -16921,7 +16787,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -16960,11 +16826,11 @@ name = "tracing-gum-proc-macro" version = "5.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.0#851c824dc7a8e7e6db2d0c9fb29d232f2f45198a" dependencies = [ - "expander 2.1.0", + "expander 2.2.1", "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -17300,7 +17166,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", - "subtle 2.5.0", + "subtle 2.4.1", ] [[package]] @@ -17329,12 +17195,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.1" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c25da092f0a868cdf09e8674cd3b7ef3a7d92a24253e663a2fb85e2496de56" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", - "idna 1.0.0", + "idna 0.5.0", "percent-encoding", ] @@ -17344,18 +17210,6 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" -[[package]] -name = "utf16_iter" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" - -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - [[package]] name = "utf8parse" version = "0.2.2" @@ -17487,7 +17341,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", "wasm-bindgen-shared", ] @@ -17521,7 +17375,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -18313,18 +18167,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "write16" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" - -[[package]] -name = "writeable" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" - [[package]] name = "wyz" version = "0.5.1" @@ -18351,7 +18193,7 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" dependencies = [ - "curve25519-dalek 4.1.2", + "curve25519-dalek 4.1.3", "rand_core 0.6.4", "serde", "zeroize", @@ -18383,7 +18225,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -18415,30 +18257,6 @@ dependencies = [ "time", ] -[[package]] -name = "yoke" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" -dependencies = [ - "serde", - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", - "synstructure 0.13.1", -] - [[package]] name = "zerocopy" version = "0.7.34" @@ -18456,28 +18274,7 @@ checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", -] - -[[package]] -name = "zerofrom" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", - "synstructure 0.13.1", + "syn 2.0.68", ] [[package]] @@ -18497,29 +18294,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", -] - -[[package]] -name = "zerovec" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2cc8827d6c0994478a15c53f374f46fbd41bea663d809b14744bc42e6b109c" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97cf56601ee5052b4417d90c8755c6683473c926039908196cf35d99f893ebe7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -18562,9 +18337,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" +version = "2.0.11+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +checksum = "75652c55c0b6f3e6f12eb786fe1bc960396bf05a1eb3bf1f3691c3610ac2e6d4" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index 839c2d0..b4283ce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -150,6 +150,9 @@ pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.0", default-features = false } pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.0", default-features = false } pallet-whitelist = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.0", default-features = false} +pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.0", default-features = false} +pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.0", default-features = false} + # Substrate Utility substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.0" } substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.0" } diff --git a/node/src/chain_spec.rs b/node/src/chain_spec.rs index df8804b..208ce0f 100644 --- a/node/src/chain_spec.rs +++ b/node/src/chain_spec.rs @@ -291,5 +291,14 @@ fn testnet_genesis( "rpcUrl": b"ws://127.0.0.1:8855".to_vec(), "genesisHash": U256::from_str("0x4ea18c8f295ba903acbbed39c70ea0569cf1705fa954a537ffa3b8b7125eaf58").expect("internal U256 is valid; qed") }, + "liquidation":{ + "adminKey": Some(root.clone()), + "systemRatio": 20_000_0000, + "treasuryRatio": 33_000_0000, + "operationRatio": 25_000_0000, + "collatorRatio": 22_000_0000, + "minLiquidationThreshold": 20_000_000_000_000_000u128, + "profitDistributionCycle": 10, + } }) } diff --git a/pallets/liquidation/src/lib.rs b/pallets/liquidation/src/lib.rs index 135ee0e..99ce8a3 100644 --- a/pallets/liquidation/src/lib.rs +++ b/pallets/liquidation/src/lib.rs @@ -13,12 +13,15 @@ use frame_support::{ weights::WeightToFeePolynomial, Twox64Concat, }; -use frame_system::pallet_prelude::{BlockNumberFor, OriginFor}; +use frame_system::{ + ensure_signed_or_root, + pallet_prelude::{BlockNumberFor, OriginFor}, +}; use mp_system::BASE_ACCOUNT; pub use pallet::*; use sp_runtime::{ traits::{StaticLookup, Zero}, - AccountId32, Perbill, Saturating, + AccountId32, Percent, Saturating, }; use sp_std::{prelude::*, sync::Arc, vec}; @@ -35,6 +38,7 @@ type BalanceOf = pub type Balance = u128; pub const PARACHAIN_TO_RELAYCHAIN_UNIT: u128 = 1_000_000; +pub const PERCENT_UNIT: u128 = 1_000_0000; #[frame_support::pallet] pub mod pallet { @@ -86,26 +90,10 @@ pub mod pallet { ///get real weight cost from coreTime placeOrder pallet type OrderGasCost: OrderGasCost; - ///profit distribute ratio to treasury account - #[pallet::constant] - type SystemRatio: Get; - - ///profit distribute ratio to treasury account - #[pallet::constant] - type TreasuryRatio: Get; - - /// profit distribute ratio to operation account - #[pallet::constant] - type OperationRatio: Get; - /// ED necessitate the account to exist #[pallet::constant] type ExistentialDeposit: Get; - ///minimum liquidation threshold - #[pallet::constant] - type MinLiquidationThreshold: Get; - /// system accountId #[pallet::constant] type SystemAccountName: Get<&'static str>; @@ -117,10 +105,6 @@ pub mod pallet { /// operation accountId #[pallet::constant] type OperationAccountName: Get<&'static str>; - - ///how many blocks to distribute a profit distribution - #[pallet::constant] - type ProfitDistributionCycle: Get>; } #[pallet::storage] @@ -144,6 +128,80 @@ pub mod pallet { #[pallet::getter(fn block_count)] pub type DistributionBlockCount = StorageValue<_, BlockNumberFor, ValueQuery>; + #[pallet::storage] + #[pallet::getter(fn system_ratio)] + pub type SystemRatio = StorageValue<_, u32, ValueQuery>; + + #[pallet::storage] + #[pallet::getter(fn treasury_ratio)] + pub type TreasuryRatio = StorageValue<_, u32, ValueQuery>; + + #[pallet::storage] + #[pallet::getter(fn operation_ratio)] + pub type OperationRatio = StorageValue<_, u32, ValueQuery>; + + #[pallet::storage] + #[pallet::getter(fn collator_ratio)] + pub type CollatorRatio = StorageValue<_, u32, ValueQuery>; + + #[pallet::storage] + #[pallet::getter(fn min_liquidation_threshold)] + pub type MinLiquidationThreshold = StorageValue<_, Balance, ValueQuery>; + + #[pallet::storage] + #[pallet::getter(fn profit_distribution_cycle)] + pub type ProfitDistributionCycle = StorageValue<_, BlockNumberFor, ValueQuery>; + + /// The pallet admin key. + #[pallet::storage] + #[pallet::getter(fn admin_key)] + pub type Admin = StorageValue<_, T::AccountId>; + + #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] + pub struct GenesisConfig { + /// The `AccountId` of the admin key. + pub admin_key: Option, + pub system_ratio: u32, + pub treasury_ratio: u32, + pub operation_ratio: u32, + pub collator_ratio: u32, + pub min_liquidation_threshold: Balance, + pub profit_distribution_cycle: BlockNumberFor, + } + + #[pallet::genesis_build] + impl BuildGenesisConfig for GenesisConfig { + fn build(&self) { + assert!( + self.system_ratio + + self.treasury_ratio + + self.operation_ratio + + self.collator_ratio + <= 100 * (PERCENT_UNIT as u32), + "Ratio sum must be <= 100%" + ); + assert!( + self.min_liquidation_threshold > ::ExistentialDeposit::get(), + "MinLiquidationThreshold must be greater than ExistentialDeposit" + ); + assert!( + self.profit_distribution_cycle > 1u32.into(), + "ProfitDistributionCycle must be greater than 1" + ); + + if let Some(key) = &self.admin_key { + >::put(key.clone()); + } + SystemRatio::::put(self.system_ratio); + TreasuryRatio::::put(self.treasury_ratio); + OperationRatio::::put(self.operation_ratio); + CollatorRatio::::put(self.collator_ratio); + MinLiquidationThreshold::::put(self.min_liquidation_threshold); + ProfitDistributionCycle::::put(self.profit_distribution_cycle); + } + } + #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { @@ -166,6 +224,27 @@ pub mod pallet { /// collators compensated CollatorsCompensated(Balance, Balance), + /// set admin(account_id) + SetAdmin(T::AccountId), + + /// Set system ratio + SystemRatioSet(u32), + + /// Set treasury ratio + TreasuryRatioSet(u32), + + /// Set operation ratio + OperationRatioSet(u32), + + ///Set collator ratio + CollatorRatioSet(u32), + + /// Set min liquidation threshold + MinLiquidationThresholdSet(Balance), + + /// Set profit distribution cycle + ProfitDistributionCycleSet(BlockNumberFor), + /// error occurred Error(Error), } @@ -185,6 +264,18 @@ pub mod pallet { ///failed to process liquidation ProcessLiquidationError, + /// Require admin authority + RequireAdmin, + + /// Invalid ratio sum (must be <= 100%) + InvalidRatio, + + /// MinLiquidationThreshold must be greater than ExistentialDeposit + InvalidMinLiquidationThreshold, + + /// ProfitDistributionCycle must be greater than 1 + InvalidProfitDistributionCycle, + ///xcm error XcmError, } @@ -264,13 +355,11 @@ pub mod pallet { }); let min_liquidation_threshold: Balance = - ::MinLiquidationThreshold::get() - .try_into() - .unwrap_or_else(|_| 0); + MinLiquidationThreshold::::get().try_into().unwrap_or_else(|_| 0); let profit = TotalIncome::::get().saturating_sub(TotalCost::::get()); if profit >= min_liquidation_threshold - && count % T::ProfitDistributionCycle::get() == Zero::zero() + && count % ProfitDistributionCycle::::get() == Zero::zero() { DistributionBlockCount::::put(BlockNumberFor::::zero()); match Self::distribute_profit() { @@ -394,13 +483,14 @@ pub mod pallet { Error::::GetPotAccountError })?; - let system_ratio = T::SystemRatio::get(); - let treasury_ratio = T::TreasuryRatio::get(); - let operation_ratio = T::OperationRatio::get(); + let system_ratio = SystemRatio::::get(); + let treasury_ratio = TreasuryRatio::::get(); + let operation_ratio = OperationRatio::::get(); - let treasury_amount = treasury_ratio * total_profit / PARACHAIN_TO_RELAYCHAIN_UNIT; - let operation_amount = operation_ratio * total_profit; - let system_amount = system_ratio * total_profit; + let treasury_amount = (treasury_ratio as u128) / PERCENT_UNIT * total_profit + / PARACHAIN_TO_RELAYCHAIN_UNIT; + let operation_amount = (operation_ratio as u128) / PERCENT_UNIT * total_profit; + let system_amount = (system_ratio as u128) / PERCENT_UNIT * total_profit; let total_collators_profit = total_profit.saturating_sub(treasury_amount + operation_amount + system_amount); @@ -425,7 +515,7 @@ pub mod pallet { transfers.push((operation_account, operation_account_profit)); for (collator, collator_cost) in CollatorRealGasCosts::::iter() { - let collator_ratio = Perbill::from_rational(collator_cost, total_cost); + let collator_ratio = Percent::from_rational(collator_cost, total_cost); let collator_profit = collator_ratio * total_collators_profit; let collator_addr_profit = @@ -490,6 +580,180 @@ pub mod pallet { Ok(()) } } + + #[pallet::call] + impl Pallet { + #[pallet::call_index(0)] + #[pallet::weight(Weight::from_parts(10_000, 0) + T::DbWeight::get().writes(1))] + pub fn set_admin( + origin: OriginFor, + new_admin: ::Source, + ) -> DispatchResultWithPostInfo { + let require = match ensure_signed_or_root(origin) { + Ok(s) if s == Self::admin_key() => true, + Ok(None) => true, + _ => false, + }; + + ensure!(require, Error::::RequireAdmin); + + let new_admin = T::Lookup::lookup(new_admin)?; + + Admin::::mutate(|admin| *admin = Some(new_admin.clone())); + + Self::deposit_event(Event::SetAdmin(new_admin)); + + Ok(Pays::No.into()) + } + + #[pallet::call_index(1)] + #[pallet::weight(Weight::from_parts(10_000, 0) + T::DbWeight::get().writes(1))] + pub fn set_system_ratio(origin: OriginFor, ratio: u32) -> DispatchResultWithPostInfo { + ensure_root_or_admin::(origin)?; + + let treasury_ratio = TreasuryRatio::::get(); + let operation_ratio = OperationRatio::::get(); + let collator_ratio = CollatorRatio::::get(); + + let total_ratio = treasury_ratio + ratio + operation_ratio + collator_ratio; + log::info!("1 +++++++++ set system ratio, total ratio:{:?}, treasury_ratio:{:?}, operation_ratio:{:?}, collator_ratio:{:?}, system_ratio:{:?}", + total_ratio, treasury_ratio, operation_ratio, collator_ratio, ratio); + ensure_total_ratio_not_exceed_one::( + ratio, + treasury_ratio, + operation_ratio, + collator_ratio, + )?; + + SystemRatio::::put(ratio); + Self::deposit_event(Event::SystemRatioSet(ratio)); + Ok(Pays::No.into()) + } + + #[pallet::call_index(2)] + #[pallet::weight(Weight::from_parts(10_000, 0) + T::DbWeight::get().writes(1))] + pub fn set_treasury_ratio(origin: OriginFor, ratio: u32) -> DispatchResultWithPostInfo { + ensure_root_or_admin::(origin)?; + + let system_ratio = SystemRatio::::get(); + let operation_ratio = OperationRatio::::get(); + let collator_ratio = CollatorRatio::::get(); + + let total_ratio = system_ratio + ratio + operation_ratio + collator_ratio; + log::info!("2 =========== set treasury ratio, total ratio:{:?}, system_ratio:{:?}, operation_ratio:{:?}, collator_ratio:{:?}, treasury_ratio:{:?}", + total_ratio, system_ratio, operation_ratio, collator_ratio, ratio); + + ensure_total_ratio_not_exceed_one::( + system_ratio, + ratio, + operation_ratio, + collator_ratio, + )?; + + TreasuryRatio::::put(ratio); + Self::deposit_event(Event::TreasuryRatioSet(ratio)); + Ok(Pays::No.into()) + } + + #[pallet::call_index(3)] + #[pallet::weight(Weight::from_parts(10_000, 0) + T::DbWeight::get().writes(1))] + pub fn set_operation_ratio(origin: OriginFor, ratio: u32) -> DispatchResultWithPostInfo { + ensure_root_or_admin::(origin)?; + + let system_ratio = SystemRatio::::get(); + let treasury_ratio = TreasuryRatio::::get(); + let collator_ratio = CollatorRatio::::get(); + + let total_ratio = system_ratio + treasury_ratio + ratio + collator_ratio; + log::info!("3 -+-+-+-+-+ set operation ratio, total ratio:{:?}, system_ratio:{:?}, treasury_ratio:{:?}, collator_ratio:{:?}, operation_ratio:{:?}", + total_ratio, system_ratio, treasury_ratio, collator_ratio, ratio); + ensure_total_ratio_not_exceed_one::( + system_ratio, + treasury_ratio, + ratio, + collator_ratio, + )?; + + OperationRatio::::put(ratio); + Self::deposit_event(Event::OperationRatioSet(ratio)); + Ok(Pays::No.into()) + } + + #[pallet::call_index(4)] + #[pallet::weight(Weight::from_parts(10_000, 0) + T::DbWeight::get().writes(1))] + pub fn set_collator_ratio(origin: OriginFor, ratio: u32) -> DispatchResultWithPostInfo { + crate::pallet::ensure_root_or_admin::(origin)?; + + let system_ratio = SystemRatio::::get(); + let treasury_ratio = TreasuryRatio::::get(); + let operation_ratio = OperationRatio::::get(); + + let total_ratio = system_ratio + treasury_ratio + ratio + operation_ratio; + log::info!("4. *********** set collator ratio, total ratio:{:?}, system_ratio:{:?}, treasury_ratio:{:?}, operation_ratio:{:?}, collator_ratio:{:?}", + total_ratio, system_ratio, treasury_ratio, operation_ratio, ratio); + ensure_total_ratio_not_exceed_one::( + system_ratio, + treasury_ratio, + operation_ratio, + ratio, + )?; + + CollatorRatio::::put(ratio); + Self::deposit_event(Event::CollatorRatioSet(ratio)); + Ok(Pays::No.into()) + } + + #[pallet::call_index(5)] + #[pallet::weight(Weight::from_parts(10_000, 0) + T::DbWeight::get().writes(1))] + pub fn set_min_liquidation_threshold( + origin: OriginFor, + threshold: Balance, + ) -> DispatchResultWithPostInfo { + ensure_root_or_admin::(origin)?; + + let existential_deposit = ::ExistentialDeposit::get(); + ensure!(threshold > existential_deposit, Error::::InvalidMinLiquidationThreshold); + + MinLiquidationThreshold::::put(threshold); + Self::deposit_event(Event::MinLiquidationThresholdSet(threshold)); + Ok(Pays::No.into()) + } + + #[pallet::call_index(6)] + #[pallet::weight(Weight::from_parts(10_000, 0) + T::DbWeight::get().writes(1))] + pub fn set_profit_distribution_cycle( + origin: OriginFor, + cycle: BlockNumberFor, + ) -> DispatchResultWithPostInfo { + ensure_root_or_admin::(origin)?; + + ensure!(cycle > 1u32.into(), Error::::InvalidProfitDistributionCycle); + + ProfitDistributionCycle::::put(cycle); + Self::deposit_event(Event::ProfitDistributionCycleSet(cycle)); + Ok(Pays::No.into()) + } + } + + /// Ensure the origin is either root or admin. + fn ensure_root_or_admin(origin: OriginFor) -> DispatchResult { + match ensure_signed_or_root(origin) { + Ok(s) if s == Pallet::::admin_key() => Ok(()), + Ok(None) => Ok(()), + _ => Err(Error::::RequireAdmin.into()), + } + } + + fn ensure_total_ratio_not_exceed_one( + system_ratio: u32, + treasury_ratio: u32, + operation_ratio: u32, + collator_ratio: u32, + ) -> DispatchResult { + let total_ratio = system_ratio + treasury_ratio + operation_ratio + collator_ratio; + ensure!((total_ratio as u128) <= 100 * PERCENT_UNIT, Error::::InvalidRatio); + Ok(()) + } } impl OrderGasCost for () diff --git a/pallets/liquidation/src/mock.rs b/pallets/liquidation/src/mock.rs index b9a8a09..3f8dfb1 100644 --- a/pallets/liquidation/src/mock.rs +++ b/pallets/liquidation/src/mock.rs @@ -33,7 +33,6 @@ use xcm_builder::{ use xcm_executor::XcmExecutor; type Balance = u128; -type BlockNumber = u32; type Block = frame_system::mocking::MockBlock; pub const UNIT: Balance = 1_000_000_000_000_000_000; @@ -68,18 +67,6 @@ const SYSTEM_ACCOUNT: AccountId32 = AccountId32::new(SYSTEM_ACCOUNT_BYTES); /// The existential deposit. Set to 1/10 of the Connected Relay Chain. pub const EXISTENTIAL_DEPOSIT: Balance = MILLIUNIT; -parameter_types! { - pub const SystemRatio: Perbill = Perbill::from_percent(20); // 20% for system - pub const TreasuryRatio: Perbill = Perbill::from_percent(33); // 33% for treasury - pub const OperationRatio: Perbill = Perbill::from_percent(25); // 25% for maintenance - pub const ProfitDistributionCycle: BlockNumber = 10; - pub const ExistDeposit: Balance = EXISTENTIAL_DEPOSIT; - pub const MinLiquidationThreshold: Balance = MILLIUNIT * 20; - pub const SystemAccountName: &'static str = "system"; - pub const TreasuryAccountName: &'static str = "treasury"; - pub const OperationAccountName: &'static str = "maintenance"; -} - impl system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); @@ -109,6 +96,9 @@ impl system::Config for Test { parameter_types! { pub const ExistentialDeposit: u128 = EXISTENTIAL_DEPOSIT; + pub const SystemAccountName: &'static str = "system"; + pub const TreasuryAccountName: &'static str = "treasury"; + pub const OperationAccountName: &'static str = "maintenance"; } impl pallet_balances::Config for Test { @@ -281,15 +271,10 @@ impl pallet_liquidation::Config for Test { type XcmSender = XcmRouter; type WeightToFee = WeightToFee; type OrderGasCost = MockOrderGasCostHandler; - type SystemRatio = SystemRatio; - type TreasuryRatio = TreasuryRatio; - type OperationRatio = OperationRatio; - type ExistentialDeposit = ExistDeposit; - type MinLiquidationThreshold = MinLiquidationThreshold; + type ExistentialDeposit = ExistentialDeposit; type SystemAccountName = SystemAccountName; type TreasuryAccountName = TreasuryAccountName; type OperationAccountName = OperationAccountName; - type ProfitDistributionCycle = ProfitDistributionCycle; } pub struct WeightToFee; @@ -323,11 +308,25 @@ where pub struct ExtBuilder { existential_deposit: u128, + system_ratio: u32, + treasury_ratio: u32, + operation_ratio: u32, + collator_ratio: u32, + min_liquidation_threshold: Balance, + profit_distribution_cycle: u64, } impl Default for ExtBuilder { fn default() -> Self { - Self { existential_deposit: 1 } + Self { + existential_deposit: 1, + system_ratio: 20_000_0000, + treasury_ratio: 33_000_0000, + operation_ratio: 25_000_0000, + collator_ratio: 22_000_0000, + min_liquidation_threshold: MILLIUNIT * 20, + profit_distribution_cycle: 10, + } } } @@ -337,6 +336,36 @@ impl ExtBuilder { self } + pub fn system_ratio(mut self, ratio: u32) -> Self { + self.system_ratio = ratio; + self + } + + pub fn treasury_ratio(mut self, ratio: u32) -> Self { + self.treasury_ratio = ratio; + self + } + + pub fn operation_ratio(mut self, ratio: u32) -> Self { + self.operation_ratio = ratio; + self + } + + pub fn collator_ratio(mut self, ratio: u32) -> Self { + self.collator_ratio = ratio; + self + } + + pub fn min_liquidation_threshold(mut self, threshold: Balance) -> Self { + self.min_liquidation_threshold = threshold; + self + } + + pub fn profit_distribution_cycle(mut self, cycle: u64) -> Self { + self.profit_distribution_cycle = cycle; + self + } + pub fn build(self) -> sp_io::TestExternalities { let mut storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); @@ -345,6 +374,17 @@ impl ExtBuilder { }; balances_config.assimilate_storage(&mut storage).unwrap(); + let liquidation_config = pallet_liquidation::GenesisConfig:: { + admin_key: Some(SYSTEM_ACCOUNT), + system_ratio: self.system_ratio, + treasury_ratio: self.treasury_ratio, + operation_ratio: self.operation_ratio, + collator_ratio: self.collator_ratio, + min_liquidation_threshold: self.min_liquidation_threshold, + profit_distribution_cycle: self.profit_distribution_cycle, + }; + liquidation_config.assimilate_storage(&mut storage).unwrap(); + let mut ext = sp_io::TestExternalities::new(storage); ext.execute_with(|| System::set_block_number(1)); ext diff --git a/pallets/liquidation/src/tests.rs b/pallets/liquidation/src/tests.rs index a1d30a0..9e5b1c8 100644 --- a/pallets/liquidation/src/tests.rs +++ b/pallets/liquidation/src/tests.rs @@ -5,27 +5,36 @@ use sp_runtime::traits::Zero; #[test] fn distribute_profit_should_work() { - ExtBuilder::default().existential_deposit(100).build().execute_with(|| { - for n in 1..=::ProfitDistributionCycle::get() { - frame_system::Pallet::::set_block_number(n.into()); - } + ExtBuilder::default() + .existential_deposit(100) + .system_ratio(20_000_0000) + .treasury_ratio(33_000_0000) + .operation_ratio(25_000_0000) + .collator_ratio(22_000_0000) + .min_liquidation_threshold(20_000_000_000) + .profit_distribution_cycle(10) + .build() + .execute_with(|| { + for n in 1..=ProfitDistributionCycle::::get() { + frame_system::Pallet::::set_block_number(n.into()); + } - assert_ok!(Liquidation::test_distribute_profit()); - let events = frame_system::Pallet::::events() - .into_iter() - .map(|record| record.event) - .filter_map(|event| { - if let RuntimeEvent::Liquidation(inner_event) = event { - Some(inner_event) - } else { - None - } - }) - .collect::>(); + assert_ok!(Liquidation::test_distribute_profit()); + let events = frame_system::Pallet::::events() + .into_iter() + .map(|record| record.event) + .filter_map(|event| { + if let RuntimeEvent::Liquidation(inner_event) = event { + Some(inner_event) + } else { + None + } + }) + .collect::>(); - assert!(events.iter().any(expected_event)); - assert_eq!(>::get(), Zero::zero()); - assert_eq!(>::get(), Zero::zero()); - assert!(>::iter().next().is_none()); - }); + assert!(events.iter().any(expected_event)); + assert_eq!(>::get(), Zero::zero()); + assert_eq!(>::get(), Zero::zero()); + assert!(>::iter().next().is_none()); + }); } diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 06b0205..ee28211 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -79,6 +79,8 @@ pallet-scheduler = { workspace = true, default-features = false} pallet-insecure-randomness-collective-flip = { workspace = true, default-features = false} pallet-contracts = { workspace = true, default-features = false} pallet-message-queue = { workspace = true, default-features = false } +pallet-multisig = { workspace = true, default-features = false } +pallet-proxy = { workspace = true, default-features = false } # Polkadot pallet-xcm = { workspace = true, default-features = false} @@ -213,6 +215,8 @@ std = [ "pallet-contracts/std", "cumulus-primitives-aura/std", "pallet-move/std", + "pallet-multisig/std", + "pallet-proxy/std", "pallet-bulk/std", "mp-coretime-bulk/std", "pallet-on-demand/std", @@ -259,6 +263,8 @@ runtime-benchmarks = [ "pallet-scheduler/runtime-benchmarks", "pallet-contracts/runtime-benchmarks", "pallet-move/runtime-benchmarks", + "pallet-multisig/runtime-benchmarks", + "pallet-proxy/runtime-benchmarks", "pallet-bulk/runtime-benchmarks", ] @@ -313,6 +319,8 @@ try-runtime = [ "pallet-insecure-randomness-collective-flip/try-runtime", "pallet-contracts/try-runtime", "pallet-move/try-runtime", + "pallet-multisig/try-runtime", + "pallet-proxy/try-runtime", ] experimental = [ "pallet-aura/experimental" ] diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 62af949..6d66e1c 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -11,10 +11,9 @@ mod weights; pub mod xcm_config; pub mod xcms; +use codec::{Decode, Encode, MaxEncodedLen}; use core::ops::Div; -use codec::{Decode, Encode}; - use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use smallvec::smallvec; @@ -30,7 +29,7 @@ use sp_runtime::{ IdentifyAccount, PostDispatchInfoOf, Saturating, UniqueSaturatedInto, Verify, }, transaction_validity::{TransactionSource, TransactionValidity, TransactionValidityError}, - ApplyExtrinsicResult, ConsensusEngineId, DispatchError, MultiSignature, Percent, + ApplyExtrinsicResult, ConsensusEngineId, DispatchError, MultiSignature, Percent, RuntimeDebug, }; use scale_info::prelude::string::String; @@ -54,7 +53,8 @@ use frame_support::{ traits::{ fungible::HoldConsideration, AsEnsureOriginWithArg, ConstBool, ConstU128, ConstU32, ConstU64, ConstU8, Currency, EitherOf, EitherOfDiverse, Everything, FindAuthor, Imbalance, - LinearStoragePrice, OnFinalize, OnUnbalanced, PrivilegeCmp, TransformOrigin, + InstanceFilter, LinearStoragePrice, OnFinalize, OnUnbalanced, PrivilegeCmp, + TransformOrigin, }, weights::{ constants::WEIGHT_REF_TIME_PER_SECOND, ConstantMultiplier, Weight, WeightToFeeCoefficient, @@ -1022,16 +1022,11 @@ impl pallet_liquidation::Config for Runtime { type Currency = Balances; type XcmSender = xcm_config::XcmRouter; type WeightToFee = WeightToFee; - type OrderGasCost = OrderGasCostHandler; - type SystemRatio = SystemRatio; - type TreasuryRatio = TreasuryRatio; - type OperationRatio = OperationRatio; + type OrderGasCost = (); type ExistentialDeposit = ExistDeposit; - type MinLiquidationThreshold = MinLiquidationThreshold; type SystemAccountName = SystemAccountName; type TreasuryAccountName = TreasuryAccountName; type OperationAccountName = OperationAccountName; - type ProfitDistributionCycle = ProfitDistributionCycle; } parameter_types! { @@ -1174,6 +1169,72 @@ impl pallet_move::Config for Runtime { type WeightInfo = pallet_move::weights::SubstrateWeight; } +impl pallet_multisig::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type Currency = Balances; + type DepositBase = ConstU128<228_000_000_000_000>; + type DepositFactor = ConstU128<32_000_000_000_000>; + type MaxSignatories = ConstU32<20>; + type WeightInfo = pallet_multisig::weights::SubstrateWeight; +} + +#[derive( + Copy, + Clone, + Eq, + PartialEq, + Ord, + PartialOrd, + Encode, + Decode, + RuntimeDebug, + MaxEncodedLen, + scale_info::TypeInfo, +)] +pub enum ProxyType { + Any, + JustTransfer, + JustUtility, +} +impl Default for ProxyType { + fn default() -> Self { + Self::Any + } +} +impl InstanceFilter for ProxyType { + fn filter(&self, c: &RuntimeCall) -> bool { + match self { + ProxyType::Any => true, + ProxyType::JustTransfer => { + matches!( + c, + RuntimeCall::Balances(pallet_balances::Call::transfer_allow_death { .. }) + ) + }, + ProxyType::JustUtility => matches!(c, RuntimeCall::Utility { .. }), + } + } + fn is_superset(&self, o: &Self) -> bool { + self == &ProxyType::Any || self == o + } +} + +impl pallet_proxy::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type Currency = Balances; + type ProxyType = ProxyType; + type ProxyDepositBase = ConstU128<160_000_000_000_000>; + type ProxyDepositFactor = ConstU128<33_000_000_000_000>; + type MaxProxies = ConstU32<100>; + type CallHasher = BlakeTwo256; + type MaxPending = ConstU32<1000>; + type AnnouncementDepositBase = ConstU128<16_000_000_000_000>; + type AnnouncementDepositFactor = ConstU128<64_000_000_000_000>; + type WeightInfo = pallet_proxy::weights::SubstrateWeight; +} + // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime @@ -1238,14 +1299,17 @@ construct_runtime!( Pot: pallet_pot = 61, Assurance: pallet_assurance = 62, Liquidation: pallet_liquidation = 63, - + BulkPallet: pallet_bulk = 64, //Contracts RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip = 70, Contracts: pallet_contracts = 71, //Move-vm MoveModule: pallet_move = 80, - BulkPallet: pallet_bulk = 72, + + //call util + Multisig: pallet_multisig = 90, + Proxy: pallet_proxy = 91, } ); @@ -1262,6 +1326,8 @@ mod benches { [pallet_bulk, BulkPallet] // [pallet_order, OrderPallet] [pallet_move, MoveModule] + [pallet_multisig, Multisig] + [pallet_proxy, Proxy] ); }