diff --git a/Cargo.lock b/Cargo.lock index da97d4358d..6f069996f5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -48,9 +48,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", @@ -82,9 +82,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ "getrandom 0.2.12", "once_cell", @@ -93,9 +93,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.7" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "getrandom 0.2.12", @@ -106,13 +106,19 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + [[package]] name = "altair-runtime" version = "0.10.35" @@ -145,7 +151,6 @@ dependencies = [ "hex-literal 0.3.4", "liquidity-pools-gateway-routers", "log", - "moonbeam-relay-encoder", "orml-asset-registry", "orml-tokens", "orml-traits", @@ -212,7 +217,7 @@ dependencies = [ "pallet-xcm-transactor", "parachain-info", "parity-scale-codec 3.6.9", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime-common", "runtime-common", "scale-info", @@ -226,14 +231,15 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", + "sp-staking", "sp-std", "sp-transaction-pool", "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", - "xcm", - "xcm-builder", - "xcm-executor", "xcm-primitives", ] @@ -269,9 +275,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.11" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" dependencies = [ "anstyle", "anstyle-parse", @@ -283,9 +289,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" @@ -317,9 +323,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "approx" @@ -331,10 +337,203 @@ dependencies = [ ] [[package]] -name = "array-bytes" -version = "4.2.0" +name = "aquamarine" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1da02abba9f9063d786eab1509833ebb2fac0f966862ca59439c76b9c566760" +dependencies = [ + "include_dir", + "itertools 0.10.5", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-bls12-381" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" +checksum = "f9cde0f2aa063a2a5c28d39b47761aa102bda7c13c84fc118a61b87c7b2f785c" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-scale" +version = "0.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49b08346a3e38e2be792ef53ee168623c9244d968ff00cd70fb9932f6fe36393" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "parity-scale-codec 3.6.9", +] + +[[package]] +name = "ark-scale" +version = "0.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f69c00b3b529be29528a6f2fd5fa7b1790f8bed81b9cdca17e326538545a179" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "parity-scale-codec 3.6.9", + "scale-info", +] + +[[package]] +name = "ark-secret-scalar" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "ark-transcript", + "digest 0.10.7", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-transcript" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "digest 0.10.7", + "rand_core 0.6.4", + "sha3 0.10.8", +] [[package]] name = "array-bytes" @@ -348,6 +547,15 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +[[package]] +name = "arrayvec" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" +dependencies = [ + "nodrop", +] + [[package]] name = "arrayvec" version = "0.5.2" @@ -416,20 +624,79 @@ dependencies = [ "futures-core", ] +[[package]] +name = "async-channel" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" +dependencies = [ + "concurrent-queue", + "event-listener 5.2.0", + "event-listener-strategy 0.5.1", + "futures-core", + "pin-project-lite 0.2.14", +] + +[[package]] +name = "async-executor" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10b3e585719c2358d2660232671ca8ca4ddb4be4ce8a1842d6c2dc8685303316" +dependencies = [ + "async-lock 3.3.0", + "async-task", + "concurrent-queue", + "fastrand 2.0.2", + "futures-lite 2.3.0", + "slab", +] + +[[package]] +name = "async-fs" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +dependencies = [ + "async-lock 2.8.0", + "autocfg", + "blocking", + "futures-lite 1.13.0", +] + [[package]] name = "async-io" -version = "2.3.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb41eb19024a91746eba0773aa5e16036045bbf45733766661099e182ea6a744" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +dependencies = [ + "async-lock 2.8.0", + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-lite 1.13.0", + "log", + "parking", + "polling 2.8.0", + "rustix 0.37.27", + "slab", + "socket2 0.4.10", + "waker-fn", +] + +[[package]] +name = "async-io" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" dependencies = [ "async-lock 3.3.0", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite", + "futures-lite 2.3.0", "parking", - "polling", - "rustix 0.38.30", + "polling 3.6.0", + "rustix 0.38.32", "slab", "tracing", "windows-sys 0.52.0", @@ -451,30 +718,82 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" dependencies = [ "event-listener 4.0.3", - "event-listener-strategy", - "pin-project-lite 0.2.13", + "event-listener-strategy 0.4.0", + "pin-project-lite 0.2.14", +] + +[[package]] +name = "async-net" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0434b1ed18ce1cf5769b8ac540e33f01fa9471058b5e89da9e06f3c882a8c12f" +dependencies = [ + "async-io 1.13.0", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "async-process" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +dependencies = [ + "async-io 1.13.0", + "async-lock 2.8.0", + "async-signal", + "blocking", + "cfg-if", + "event-listener 3.1.0", + "futures-lite 1.13.0", + "rustix 0.38.32", + "windows-sys 0.48.0", ] [[package]] name = "async-recursion" -version = "1.0.5" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" +checksum = "30c5ef0ede93efbf733c1a727f3b6b5a1060bbedd5600183e66f6e4be4af0ec5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] +[[package]] +name = "async-signal" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +dependencies = [ + "async-io 2.3.2", + "async-lock 2.8.0", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 0.38.32", + "signal-hook-registry", + "slab", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-task" +version = "4.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" + [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -487,9 +806,21 @@ dependencies = [ "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] +[[package]] +name = "atomic-take" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8ab6b55fe97976e46f91ddbed8d147d966475dc29b2032757ba47e02376fbc3" + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "atty" version = "0.2.14" @@ -503,21 +834,20 @@ dependencies = [ [[package]] name = "auto_impl" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ - "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.57", ] [[package]] name = "autocfg" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "axelar-gateway-precompile" @@ -528,7 +858,6 @@ dependencies = [ "cfg-utils", "ethabi", "fp-evm", - "frame-benchmarking", "frame-support", "frame-system", "hex", @@ -545,9 +874,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line 0.21.0", "cc", @@ -558,6 +887,28 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "bandersnatch_vrfs" +version = "0.0.1" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff", + "ark-scale 0.0.12", + "ark-serialize", + "ark-std", + "dleq_vrf", + "fflonk", + "merlin 3.0.0", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "ring 0.1.0", + "sha2 0.10.8", + "zeroize", +] + [[package]] name = "base-x" version = "0.2.11" @@ -600,7 +951,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "hash-db 0.16.0", "log", @@ -627,15 +978,30 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "prettyplease 0.2.16", + "prettyplease 0.2.17", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.48", + "syn 2.0.57", +] + +[[package]] +name = "bip39" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" +dependencies = [ + "bitcoin_hashes", ] +[[package]] +name = "bitcoin_hashes" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" + [[package]] name = "bitflags" version = "1.3.2" @@ -644,9 +1010,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "bitvec" @@ -681,6 +1047,16 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "blake2-rfc" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" +dependencies = [ + "arrayvec 0.4.12", + "constant_time_eq 0.1.5", +] + [[package]] name = "blake2b_simd" version = "1.0.2" @@ -689,7 +1065,7 @@ checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq", + "constant_time_eq 0.3.0", ] [[package]] @@ -700,20 +1076,20 @@ checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq", + "constant_time_eq 0.3.0", ] [[package]] name = "blake3" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" dependencies = [ "arrayref", "arrayvec 0.7.4", "cc", "cfg-if", - "constant_time_eq", + "constant_time_eq 0.3.0", ] [[package]] @@ -760,7 +1136,23 @@ dependencies = [ name = "block-padding" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + +[[package]] +name = "blocking" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" +dependencies = [ + "async-channel 2.2.0", + "async-lock 3.3.0", + "async-task", + "fastrand 2.0.2", + "futures-io", + "futures-lite 2.3.0", + "piper", + "tracing", +] [[package]] name = "bounded-collections" @@ -789,11 +1181,20 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + [[package]] name = "bstr" -version = "1.9.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" +checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" dependencies = [ "memchr", "serde", @@ -810,9 +1211,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" [[package]] name = "byte-slice-cast" @@ -828,9 +1229,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.14.1" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2490600f404f2b94c167e31d3ed1d5f3c225a0f3b80230053b3e0b7b962bd9" +checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" [[package]] name = "byteorder" @@ -840,9 +1241,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "bzip2-sys" @@ -866,9 +1267,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceed8ef69d8518a5dda55c07425450b58a4e1946f4951eab6d7191ee86c2443d" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" dependencies = [ "serde", ] @@ -881,7 +1282,7 @@ checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", - "semver 1.0.21", + "semver 1.0.22", "serde", "serde_json", "thiserror", @@ -895,9 +1296,9 @@ checksum = "fd6c0e7b807d60291f42f33f58480c0bfafe28ed08286446f45e463728cf9c1c" [[package]] name = "cc" -version = "1.0.83" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" dependencies = [ "jobserver", "libc", @@ -915,8 +1316,10 @@ dependencies = [ "cfg-utils", "clap", "cumulus-client-cli", + "cumulus-client-collator", "cumulus-client-consensus-aura", "cumulus-client-consensus-common", + "cumulus-client-consensus-proposer", "cumulus-client-network", "cumulus-client-service", "cumulus-pallet-session-benchmarking", @@ -931,12 +1334,12 @@ dependencies = [ "fc-rpc", "fc-rpc-core", "fp-consensus", + "fp-dynamic-fee", "fp-evm", "fp-rpc", "fp-storage", "frame-benchmarking", "frame-benchmarking-cli", - "frame-system-benchmarking", "futures", "hex-literal 0.3.4", "jsonrpsee", @@ -956,6 +1359,7 @@ dependencies = [ "sc-cli", "sc-client-api", "sc-consensus", + "sc-consensus-aura", "sc-consensus-grandpa", "sc-executor", "sc-network", @@ -975,6 +1379,7 @@ dependencies = [ "sp-consensus", "sp-consensus-aura", "sp-core", + "sp-inherents", "sp-io", "sp-keystore", "sp-offchain", @@ -982,13 +1387,12 @@ dependencies = [ "sp-session", "sp-timestamp", "sp-transaction-pool", + "staging-xcm", "substrate-build-script-utils", "substrate-frame-rpc-system", "substrate-prometheus-endpoint", - "try-runtime-cli", "url", "vergen", - "xcm", ] [[package]] @@ -1023,7 +1427,6 @@ dependencies = [ "hex-literal 0.3.4", "liquidity-pools-gateway-routers", "log", - "moonbeam-relay-encoder", "orml-asset-registry", "orml-tokens", "orml-traits", @@ -1090,7 +1493,7 @@ dependencies = [ "pallet-xcm-transactor", "parachain-info", "parity-scale-codec 3.6.9", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime-common", "runtime-common", "scale-info", @@ -1104,14 +1507,15 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", + "sp-staking", "sp-std", "sp-transaction-pool", "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", - "xcm", - "xcm-builder", - "xcm-executor", "xcm-primitives", ] @@ -1126,9 +1530,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.15.6" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6100bc57b6209840798d95cb2775684849d332f7bd788db2a8c8caf7ef82a41a" +checksum = "fa50868b64a9a6fda9d593ce778849ea8715cd2a3d2cc17ffdb4a2f2f2f1961d" dependencies = [ "smallvec", ] @@ -1156,7 +1560,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", + "staging-xcm", ] [[package]] @@ -1176,8 +1580,8 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", - "xcm-executor", + "staging-xcm", + "staging-xcm-executor", ] [[package]] @@ -1195,6 +1599,7 @@ dependencies = [ "serde", "sp-runtime", "sp-std", + "staging-xcm", ] [[package]] @@ -1203,16 +1608,17 @@ version = "0.1.0" dependencies = [ "cfg-mocks", "cfg-primitives", - "cfg-types", "frame-support", + "frame-system", "impl-trait-for-tuples", "mock-builder", + "orml-traits", "parity-scale-codec 3.6.9", "scale-info", "sp-arithmetic", "sp-runtime", "sp-std", - "strum", + "strum 0.24.1", ] [[package]] @@ -1226,7 +1632,6 @@ dependencies = [ "frame-support", "hex", "hex-literal 0.3.4", - "orml-asset-registry", "orml-traits", "parity-scale-codec 3.6.9", "scale-info", @@ -1235,7 +1640,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-std", - "xcm", + "staging-xcm", ] [[package]] @@ -1288,7 +1693,7 @@ dependencies = [ [[package]] name = "chainbridge" version = "0.0.2" -source = "git+https://github.com/centrifuge/chainbridge-substrate.git?branch=polkadot-v0.9.43#f7abe2f262dd3c7be10596ba4f29246e6abf1163" +source = "git+https://github.com/centrifuge/chainbridge-substrate.git?branch=polkadot-v1.1.0#da6e4f8255e292d32660902e545f16e1824ac5e2" dependencies = [ "frame-benchmarking", "frame-support", @@ -1301,32 +1706,32 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "substrate-wasm-builder-runner", + "substrate-wasm-builder", ] [[package]] name = "chrono" -version = "0.4.32" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41daef31d7a747c5c847246f36de49ced6f7403b4cdabc807a97b5cc184cda7a" +checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.52.0", + "windows-targets 0.52.4", ] [[package]] name = "cid" -version = "0.8.6" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ed9c8b2d17acb8110c46f1da5bf4a696d745e1474a16db0cd2b49cd0249bf2" +checksum = "b9b68e3193982cd54187d71afdb2a271ad4cf8af157858e9cb911b91321de143" dependencies = [ "core2", "multibase", - "multihash 0.16.3", + "multihash", "serde", "unsigned-varint", ] @@ -1364,9 +1769,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.18" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" dependencies = [ "clap_builder", "clap_derive", @@ -1374,9 +1779,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.18" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ "anstream", "anstyle", @@ -1386,31 +1791,30 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "coarsetime" -version = "0.1.33" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71367d3385c716342014ad17e3d19f7788ae514885a1f4c24f500260fb365e1a" +checksum = "13b3839cf01bb7960114be3ccf2340f541b6d0c81f8690b007b2b39f750f7e5d" dependencies = [ "libc", - "once_cell", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasix", "wasm-bindgen", ] @@ -1432,15 +1836,35 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "comfy-table" -version = "6.2.0" +version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e959d788268e3bf9d35ace83e81b124190378e4c91c9067524675e33394b8ba" +checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686" dependencies = [ - "strum", - "strum_macros", + "strum 0.25.0", + "strum_macros 0.25.3", "unicode-width", ] +[[package]] +name = "common" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof?rev=0e948f3#0e948f3c28cbacecdd3020403c4841c0eb339213" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "fflonk", + "merlin 3.0.0", +] + +[[package]] +name = "common-path" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" + [[package]] name = "concurrent-queue" version = "2.4.0" @@ -1469,6 +1893,32 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "const-random" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom 0.2.12", + "once_cell", + "tiny-keccak", +] + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + [[package]] name = "constant_time_eq" version = "0.3.0" @@ -1640,9 +2090,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ "cfg-if", ] @@ -1742,12 +2192,13 @@ dependencies = [ [[package]] name = "cumulus-client-cli" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "clap", "parity-scale-codec 3.6.9", "sc-chain-spec", "sc-cli", + "sc-client-api", "sc-service", "sp-core", "sp-runtime", @@ -1757,7 +2208,7 @@ dependencies = [ [[package]] name = "cumulus-client-collator" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", @@ -1780,25 +2231,29 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-aura" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "cumulus-client-collator", "cumulus-client-consensus-common", "cumulus-client-consensus-proposer", + "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", "cumulus-relay-chain-interface", "futures", "parity-scale-codec 3.6.9", "polkadot-node-primitives", + "polkadot-node-subsystem", "polkadot-overseer", "polkadot-primitives", "sc-client-api", "sc-consensus", "sc-consensus-aura", + "sc-consensus-babe", "sc-consensus-slots", "sc-telemetry", + "schnellru", "sp-api", "sp-application-crypto", "sp-block-builder", @@ -1818,7 +2273,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "cumulus-client-pov-recovery", @@ -1831,11 +2286,14 @@ dependencies = [ "polkadot-primitives", "sc-client-api", "sc-consensus", + "sc-consensus-babe", "schnellru", "sp-blockchain", "sp-consensus", + "sp-consensus-slots", "sp-core", "sp-runtime", + "sp-timestamp", "sp-trie", "substrate-prometheus-endpoint", "tracing", @@ -1844,7 +2302,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-proposer" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "anyhow", "async-trait", @@ -1859,7 +2317,7 @@ dependencies = [ [[package]] name = "cumulus-client-network" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "cumulus-relay-chain-interface", @@ -1868,7 +2326,7 @@ dependencies = [ "parity-scale-codec 3.6.9", "parking_lot 0.12.1", "polkadot-node-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "sc-client-api", "sp-blockchain", @@ -1882,7 +2340,7 @@ dependencies = [ [[package]] name = "cumulus-client-pov-recovery" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1906,7 +2364,7 @@ dependencies = [ [[package]] name = "cumulus-client-service" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", @@ -1941,11 +2399,13 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "cumulus-pallet-parachain-system", "frame-support", "frame-system", "pallet-aura", + "pallet-timestamp", "parity-scale-codec 3.6.9", "scale-info", "sp-application-crypto", @@ -1957,7 +2417,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-dmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1968,13 +2428,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", + "staging-xcm", ] [[package]] name = "cumulus-pallet-parachain-system" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", @@ -1986,7 +2446,7 @@ dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec 3.6.9", - "polkadot-parachain", + "polkadot-parachain-primitives", "scale-info", "sp-core", "sp-externalities", @@ -1997,24 +2457,25 @@ dependencies = [ "sp-std", "sp-trie", "sp-version", - "xcm", + "staging-xcm", + "trie-db", ] [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "cumulus-pallet-session-benchmarking" version = "3.0.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -2028,7 +2489,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcm" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2038,13 +2499,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", + "staging-xcm", ] [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "cumulus-primitives-core", "frame-benchmarking", @@ -2058,31 +2519,45 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", - "xcm-executor", + "staging-xcm", + "staging-xcm-executor", +] + +[[package]] +name = "cumulus-primitives-aura" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "parity-scale-codec 3.6.9", + "polkadot-core-primitives", + "polkadot-primitives", + "sp-api", + "sp-consensus-aura", + "sp-runtime", + "sp-std", ] [[package]] name = "cumulus-primitives-core" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec 3.6.9", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "scale-info", "sp-api", "sp-runtime", "sp-std", "sp-trie", - "xcm", + "staging-xcm", ] [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2105,7 +2580,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-timestamp" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "cumulus-primitives-core", "futures", @@ -2118,7 +2593,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2128,15 +2603,15 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", - "xcm-builder", - "xcm-executor", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] name = "cumulus-relay-chain-inprocess-interface" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2144,7 +2619,6 @@ dependencies = [ "futures", "futures-timer", "polkadot-cli", - "polkadot-client", "polkadot-service", "sc-cli", "sc-client-api", @@ -2161,7 +2635,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-interface" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2179,15 +2653,14 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-minimal-node" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 6.2.2", + "array-bytes", "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", "cumulus-relay-chain-rpc-interface", "futures", - "lru 0.9.0", "polkadot-availability-recovery", "polkadot-collator-protocol", "polkadot-core-primitives", @@ -2199,47 +2672,53 @@ dependencies = [ "polkadot-overseer", "polkadot-primitives", "sc-authority-discovery", - "sc-client-api", "sc-network", "sc-network-common", "sc-service", "sc-tracing", "sc-utils", + "schnellru", "sp-api", - "sp-blockchain", "sp-consensus", "sp-consensus-babe", "sp-runtime", - "tokio", "tracing", ] [[package]] name = "cumulus-relay-chain-rpc-interface" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", + "either", "futures", "futures-timer", "jsonrpsee", - "lru 0.9.0", "parity-scale-codec 3.6.9", + "pin-project", "polkadot-overseer", + "rand 0.8.5", "sc-client-api", "sc-rpc-api", "sc-service", + "schnellru", "serde", "serde_json", + "smoldot", + "smoldot-light", "sp-api", "sp-authority-discovery", "sp-consensus-babe", "sp-core", + "sp-runtime", "sp-state-machine", "sp-storage", + "thiserror", "tokio", + "tokio-util", "tracing", "url", ] @@ -2247,7 +2726,7 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "cumulus-primitives-core", "parity-scale-codec 3.6.9", @@ -2255,6 +2734,7 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-std", + "sp-trie", ] [[package]] @@ -2285,16 +2765,16 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.1.1" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" +checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", - "platforms 3.3.0", + "platforms", "rustc_version", "subtle", "zeroize", @@ -2308,14 +2788,27 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", +] + +[[package]] +name = "curve25519-dalek-ng" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.6.4", + "subtle-ng", + "zeroize", ] [[package]] name = "cxx" -version = "1.0.115" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de00f15a6fa069c99b88c5c78c4541d0e7899a33b86f7480e23df2431fce0bc" +checksum = "ff4dc7287237dd438b926a81a1a5605dad33d286870e5eee2db17bf2bcd9e92a" dependencies = [ "cc", "cxxbridge-flags", @@ -2325,9 +2818,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.115" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a71e1e631fa2f2f5f92e8b0d860a00c198c6771623a6cefcc863e3554f0d8d6" +checksum = "f47c6c8ad7c1a10d3ef0fe3ff6733f4db0d78f08ef0b13121543163ef327058b" dependencies = [ "cc", "codespan-reporting", @@ -2335,24 +2828,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "cxxbridge-flags" -version = "1.0.115" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f3fed61d56ba497c4efef9144dfdbaa25aa58f2f6b3a7cf441d4591c583745c" +checksum = "701a1ac7a697e249cdd8dc026d7a7dafbfd0dbcd8bd24ec55889f2bc13dd6287" [[package]] name = "cxxbridge-macro" -version = "1.0.115" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8908e380a8efd42150c017b0cfa31509fc49b6d47f7cb6b33e93ffb8f4e3661e" +checksum = "b404f596046b0bb2d903a9c786b875a126261b52b7c3a64bbb66382c41c771df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -2383,9 +2876,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", @@ -2436,6 +2929,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.57", +] + [[package]] name = "derive_more" version = "0.99.17" @@ -2480,7 +2984,6 @@ dependencies = [ "hex", "hex-literal 0.3.4", "liquidity-pools-gateway-routers", - "moonbeam-relay-encoder", "orml-asset-registry", "orml-tokens", "orml-traits", @@ -2547,7 +3050,7 @@ dependencies = [ "pallet-xcm-transactor", "parachain-info", "parity-scale-codec 3.6.9", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime-common", "runtime-common", "scale-info", @@ -2561,14 +3064,15 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", + "sp-staking", "sp-std", "sp-transaction-pool", "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", - "xcm", - "xcm-builder", - "xcm-executor", "xcm-primitives", ] @@ -2657,7 +3161,51 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", +] + +[[package]] +name = "dleq_vrf" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-scale 0.0.10", + "ark-secret-scalar", + "ark-serialize", + "ark-std", + "ark-transcript", + "arrayvec 0.7.4", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "docify" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a2f138ad521dc4a2ced1a4576148a6a610b4c5923933b062a263130a6802ce" +dependencies = [ + "docify_macros", +] + +[[package]] +name = "docify_macros" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a081e51fb188742f5a7a1164ad752121abcb22874b21e2c3b0dd040c515fdad" +dependencies = [ + "common-path", + "derive-syn-parse 0.2.0", + "once_cell", + "proc-macro2", + "quote", + "regex", + "syn 2.0.57", + "termcolor", + "toml 0.8.2", + "walkdir", ] [[package]] @@ -2701,9 +3249,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "ecdsa" @@ -2715,19 +3263,10 @@ dependencies = [ "digest 0.10.7", "elliptic-curve", "rfc6979", - "signature 2.2.0", + "signature", "spki", ] -[[package]] -name = "ed25519" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" -dependencies = [ - "signature 1.6.4", -] - [[package]] name = "ed25519" version = "2.2.3" @@ -2735,29 +3274,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ "pkcs8", - "signature 2.2.0", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek 3.2.0", - "ed25519 1.5.3", - "sha2 0.9.9", - "zeroize", + "signature", ] [[package]] name = "ed25519-dalek" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ - "curve25519-dalek 4.1.1", - "ed25519 2.2.3", + "curve25519-dalek 4.1.2", + "ed25519", "rand_core 0.6.4", "serde", "sha2 0.10.8", @@ -2779,11 +3306,26 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ed25519-zebra" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" +dependencies = [ + "curve25519-dalek 4.1.2", + "ed25519", + "hashbrown 0.14.3", + "hex", + "rand_core 0.6.4", + "sha2 0.10.8", + "zeroize", +] + [[package]] name = "either" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" [[package]] name = "elliptic-curve" @@ -2816,7 +3358,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "syn 1.0.109", @@ -2824,22 +3366,22 @@ dependencies = [ [[package]] name = "enumflags2" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5998b4f30320c9d93aed72f63af821bfdac50465b75428fce77b48ec482c3939" +checksum = "3278c9d5fb675e0a51dabcf4c0d355f692b064171535ba72361be1528a9d8e8d" dependencies = [ "enumflags2_derive", ] [[package]] name = "enumflags2_derive" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" +checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -2850,7 +3392,7 @@ checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -2992,6 +3534,17 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "event-listener" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite 0.2.14", +] + [[package]] name = "event-listener" version = "4.0.3" @@ -3000,7 +3553,18 @@ checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" dependencies = [ "concurrent-queue", "parking", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", +] + +[[package]] +name = "event-listener" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite 0.2.14", ] [[package]] @@ -3010,7 +3574,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.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "332f51cb23d20b0de8458b86580878211da09bcd4503cb579c225b3d124cabb3" +dependencies = [ + "event-listener 5.2.0", + "pin-project-lite 0.2.14", ] [[package]] @@ -3036,7 +3610,7 @@ dependencies = [ [[package]] name = "evm-core" version = "0.39.0" -source = "git+https://github.com/moonbeam-foundation//evm?rev=a33ac87ad7462b7e7029d12c385492b2a8311d1c#a33ac87ad7462b7e7029d12c385492b2a8311d1c" +source = "git+https://github.com/moonbeam-foundation/evm?rev=a33ac87ad7462b7e7029d12c385492b2a8311d1c#a33ac87ad7462b7e7029d12c385492b2a8311d1c" dependencies = [ "parity-scale-codec 3.6.9", "primitive-types 0.12.2", @@ -3100,19 +3674,6 @@ dependencies = [ "quote", ] -[[package]] -name = "expander" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f360349150728553f92e4c997a16af8915f418d3a0f21b440d34c5632f16ed84" -dependencies = [ - "blake2", - "fs-err", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "expander" version = "2.0.0" @@ -3123,7 +3684,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -3146,9 +3707,18 @@ checksum = "51e2ce894d53b295cf97b05685aa077950ff3e8541af83217fc720a6437169f8" [[package]] name = "fastrand" -version = "2.0.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + +[[package]] +name = "fastrand" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" [[package]] name = "fatality" @@ -3178,7 +3748,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "async-trait", "fp-consensus", @@ -3194,7 +3764,7 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "async-trait", "fp-storage", @@ -3214,7 +3784,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "fc-db", "fc-storage", @@ -3235,7 +3805,7 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "ethereum", "ethereum-types 0.14.1", @@ -3253,13 +3823,13 @@ dependencies = [ "jsonrpsee", "libsecp256k1", "log", - "lru 0.8.1", "pallet-evm", "parity-scale-codec 3.6.9", "prometheus", "rand 0.8.5", "rlp", "sc-client-api", + "sc-consensus-aura", "sc-network", "sc-network-common", "sc-network-sync", @@ -3268,24 +3838,29 @@ dependencies = [ "sc-transaction-pool", "sc-transaction-pool-api", "sc-utils", + "schnellru", "serde", "sp-api", "sp-block-builder", "sp-blockchain", "sp-consensus", + "sp-consensus-aura", "sp-core", + "sp-inherents", "sp-io", "sp-runtime", "sp-state-machine", "sp-storage", + "sp-timestamp", "substrate-prometheus-endpoint", + "thiserror", "tokio", ] [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "ethereum", "ethereum-types 0.14.1", @@ -3298,7 +3873,7 @@ dependencies = [ [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "ethereum", "ethereum-types 0.14.1", @@ -3332,11 +3907,24 @@ dependencies = [ "subtle", ] +[[package]] +name = "fflonk" +version = "0.1.0" +source = "git+https://github.com/w3f/fflonk#1e854f35e9a65d08b11a86291405cdc95baa0a35" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "merlin 3.0.0", +] + [[package]] name = "fiat-crypto" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" +checksum = "c007b1ae3abe1cb6f85a16305acd418b7ca6343b953633fee2b76d8f108b830f" [[package]] name = "file-per-thread-logger" @@ -3435,7 +4023,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec 3.6.9", ] @@ -3452,7 +4040,7 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "hex", "impl-serde", @@ -3471,7 +4059,7 @@ dependencies = [ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "ethereum", "parity-scale-codec 3.6.9", @@ -3480,10 +4068,20 @@ dependencies = [ "sp-std", ] +[[package]] +name = "fp-dynamic-fee" +version = "1.0.0" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +dependencies = [ + "async-trait", + "sp-core", + "sp-inherents", +] + [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "ethereum", "ethereum-types 0.14.1", @@ -3497,7 +4095,7 @@ dependencies = [ [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "evm", "frame-support", @@ -3512,7 +4110,7 @@ dependencies = [ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "ethereum", "ethereum-types 0.14.1", @@ -3529,7 +4127,7 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "frame-support", "parity-scale-codec 3.6.9", @@ -3541,7 +4139,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "parity-scale-codec 3.6.9", "serde", @@ -3556,7 +4154,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "frame-support-procedural", @@ -3581,10 +4179,10 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "Inflector", - "array-bytes 4.2.0", + "array-bytes", "chrono", "clap", "comfy-table", @@ -3615,12 +4213,13 @@ dependencies = [ "sp-database", "sp-externalities", "sp-inherents", + "sp-io", "sp-keystore", "sp-runtime", "sp-state-machine", - "sp-std", "sp-storage", "sp-trie", + "sp-wasm-interface", "thiserror", "thousands", ] @@ -3628,18 +4227,18 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -3656,11 +4255,12 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "frame-system", "frame-try-runtime", + "log", "parity-scale-codec 3.6.9", "scale-info", "sp-core", @@ -3672,9 +4272,9 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "15.1.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" +checksum = "87cf1549fba25a6fcac22785b61698317d958e96cac72a59102ea45b9ae64692" dependencies = [ "cfg-if", "parity-scale-codec 3.6.9", @@ -3685,7 +4285,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-recursion", "futures", @@ -3697,6 +4297,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", + "sp-state-machine", "spinners", "substrate-rpc-client", "tokio", @@ -3706,79 +4307,87 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "aquamarine", "bitflags 1.3.2", + "docify", "environmental", "frame-metadata", "frame-support-procedural", "impl-trait-for-tuples", "k256", "log", - "once_cell", + "macro_magic", "parity-scale-codec 3.6.9", "paste", "scale-info", "serde", + "serde_json", "smallvec", "sp-api", "sp-arithmetic", "sp-core", "sp-core-hashing-proc-macro", "sp-debug-derive", + "sp-genesis-builder", "sp-inherents", "sp-io", + "sp-metadata-ir", "sp-runtime", "sp-staking", "sp-state-machine", "sp-std", "sp-tracing", "sp-weights", + "static_assertions", "tt-call", ] [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "Inflector", "cfg-expr", - "derive-syn-parse", + "derive-syn-parse 0.1.5", + "expander 2.0.0", "frame-support-procedural-tools", "itertools 0.10.5", + "macro_magic", "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "cfg-if", "frame-support", @@ -3797,7 +4406,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -3812,7 +4421,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec 3.6.9", "sp-api", @@ -3821,7 +4430,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "parity-scale-codec 3.6.9", @@ -3855,18 +4464,18 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" dependencies = [ - "rustix 0.38.30", + "rustix 0.38.32", "windows-sys 0.48.0", ] [[package]] name = "fudge" version = "0.0.10" -source = "git+https://github.com/centrifuge/fudge?branch=polkadot-v0.9.43#a7162cac11809579ff23f74628a70700075e6a14" +source = "git+https://github.com/centrifuge/fudge?branch=polkadot-v1.1.0#043a7f77ab336acdf4208a7550b486947fb4c627" dependencies = [ "fudge-companion", "fudge-core", - "polkadot-parachain", + "polkadot-parachain-primitives", "sc-executor", "sc-service", "sp-io", @@ -3875,7 +4484,7 @@ dependencies = [ [[package]] name = "fudge-companion" version = "0.0.7" -source = "git+https://github.com/centrifuge/fudge?branch=polkadot-v0.9.43#a7162cac11809579ff23f74628a70700075e6a14" +source = "git+https://github.com/centrifuge/fudge?branch=polkadot-v1.1.0#043a7f77ab336acdf4208a7550b486947fb4c627" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", @@ -3886,17 +4495,18 @@ dependencies = [ [[package]] name = "fudge-core" version = "0.0.10" -source = "git+https://github.com/centrifuge/fudge?branch=polkadot-v0.9.43#a7162cac11809579ff23f74628a70700075e6a14" +source = "git+https://github.com/centrifuge/fudge?branch=polkadot-v1.1.0#043a7f77ab336acdf4208a7550b486947fb4c627" dependencies = [ "async-trait", "bitvec 1.0.1", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", - "cumulus-relay-chain-inprocess-interface", + "cumulus-relay-chain-interface", "frame-support", "frame-system", "fudge-companion", "futures", + "futures-timer", "lazy_static", "node-primitives", "pallet-babe", @@ -3905,7 +4515,7 @@ dependencies = [ "polkadot-cli", "polkadot-core-primitives", "polkadot-node-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-parachains", "polkadot-service", @@ -4009,12 +4619,30 @@ checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" -version = "2.2.0" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +dependencies = [ + "fastrand 1.9.0", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite 0.2.14", + "waker-fn", +] + +[[package]] +name = "futures-lite" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" +checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ + "fastrand 2.0.2", "futures-core", - "pin-project-lite 0.2.13", + "futures-io", + "parking", + "pin-project-lite 0.2.14", ] [[package]] @@ -4025,7 +4653,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -4053,9 +4681,9 @@ checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" @@ -4070,7 +4698,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "pin-utils", "slab", ] @@ -4138,13 +4766,22 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "getrandom_or_panic" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "ghash" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" dependencies = [ - "opaque-debug 0.3.0", + "opaque-debug 0.3.1", "polyval", ] @@ -4180,8 +4817,8 @@ dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.4", - "regex-syntax 0.8.2", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", ] [[package]] @@ -4197,9 +4834,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" dependencies = [ "bytes", "fnv", @@ -4207,7 +4844,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.1.0", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -4255,7 +4892,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.7", + "ahash 0.7.8", ] [[package]] @@ -4264,7 +4901,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.7", + "ahash 0.8.11", ] [[package]] @@ -4272,6 +4909,11 @@ name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +dependencies = [ + "ahash 0.8.11", + "allocator-api2", + "serde", +] [[package]] name = "heck" @@ -4279,6 +4921,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -4290,9 +4938,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.4" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hex" @@ -4312,6 +4960,15 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac 0.12.1", +] + [[package]] name = "hmac" version = "0.8.1" @@ -4374,9 +5031,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -4391,7 +5048,7 @@ checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] @@ -4434,29 +5091,14 @@ dependencies = [ "httparse", "httpdate", "itoa", - "pin-project-lite 0.2.13", - "socket2 0.5.5", + "pin-project-lite 0.2.14", + "socket2 0.5.6", "tokio", "tower-service", "tracing", "want", ] -[[package]] -name = "hyper-rustls" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" -dependencies = [ - "http", - "hyper", - "log", - "rustls 0.20.9", - "rustls-native-certs", - "tokio", - "tokio-rustls 0.23.4", -] - [[package]] name = "hyper-rustls" version = "0.24.2" @@ -4470,22 +5112,22 @@ dependencies = [ "rustls 0.21.10", "rustls-native-certs", "tokio", - "tokio-rustls 0.24.1", - "webpki-roots 0.25.3", + "tokio-rustls", + "webpki-roots 0.25.4", ] [[package]] name = "iana-time-zone" -version = "0.1.59" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core", + "windows-core 0.52.0", ] [[package]] @@ -4534,7 +5176,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" dependencies = [ - "async-io", + "async-io 2.3.2", "core-foundation", "fnv", "futures", @@ -4594,6 +5236,25 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "include_dir" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" +dependencies = [ + "proc-macro2", + "quote", +] + [[package]] name = "indexmap" version = "1.9.3" @@ -4607,19 +5268,25 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown 0.14.3", ] +[[package]] +name = "indexmap-nostd" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" + [[package]] name = "indicatif" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" +checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" dependencies = [ "console", "instant", @@ -4667,7 +5334,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.4", + "hermit-abi 0.3.9", "libc", "windows-sys 0.48.0", ] @@ -4684,7 +5351,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.5", + "socket2 0.5.6", "widestring", "windows-sys 0.48.0", "winreg", @@ -4698,15 +5365,24 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ - "hermit-abi 0.3.4", - "rustix 0.38.30", + "hermit-abi 0.3.9", + "libc", "windows-sys 0.52.0", ] +[[package]] +name = "is_executable" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa9acdc6d67b75e626ad644734e8bc6df893d9cd2a834129065d3dd6158ea9c8" +dependencies = [ + "winapi", +] + [[package]] name = "itertools" version = "0.10.5" @@ -4727,24 +5403,24 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -4779,10 +5455,10 @@ dependencies = [ "soketto", "thiserror", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", "tokio-util", "tracing", - "webpki-roots 0.25.3", + "webpki-roots 0.25.4", ] [[package]] @@ -4821,7 +5497,7 @@ checksum = "7e5f9fabdd5d79344728521bb65e3106b49ec405a78b66fbff073b72b389fa43" dependencies = [ "async-trait", "hyper", - "hyper-rustls 0.24.2", + "hyper-rustls", "jsonrpsee-core", "jsonrpsee-types", "rustc-hash", @@ -4838,7 +5514,7 @@ version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro-crate 1.3.1", "proc-macro2", "quote", @@ -4915,109 +5591,10 @@ dependencies = [ "cpufeatures", ] -[[package]] -name = "kusama-runtime" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" -dependencies = [ - "bitvec 1.0.1", - "frame-benchmarking", - "frame-election-provider-support", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", - "hex-literal 0.4.1", - "kusama-runtime-constants", - "log", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", - "pallet-bags-list", - "pallet-balances", - "pallet-bounties", - "pallet-child-bounties", - "pallet-collective", - "pallet-conviction-voting", - "pallet-democracy", - "pallet-election-provider-multi-phase", - "pallet-election-provider-support-benchmarking", - "pallet-elections-phragmen", - "pallet-fast-unstake", - "pallet-grandpa", - "pallet-identity", - "pallet-im-online", - "pallet-indices", - "pallet-membership", - "pallet-message-queue", - "pallet-multisig", - "pallet-nis", - "pallet-nomination-pools", - "pallet-nomination-pools-benchmarking", - "pallet-nomination-pools-runtime-api", - "pallet-offences", - "pallet-offences-benchmarking", - "pallet-preimage", - "pallet-proxy", - "pallet-ranked-collective", - "pallet-recovery", - "pallet-referenda", - "pallet-scheduler", - "pallet-session", - "pallet-session-benchmarking", - "pallet-society", - "pallet-staking", - "pallet-staking-runtime-api", - "pallet-timestamp", - "pallet-tips", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", - "pallet-utility", - "pallet-vesting", - "pallet-whitelist", - "pallet-xcm", - "pallet-xcm-benchmarks", - "parity-scale-codec 3.6.9", - "polkadot-primitives", - "polkadot-runtime-common", - "polkadot-runtime-parachains", - "rustc-hex", - "scale-info", - "serde", - "serde_derive", - "smallvec", - "sp-api", - "sp-arithmetic", - "sp-authority-discovery", - "sp-block-builder", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-core", - "sp-inherents", - "sp-io", - "sp-mmr-primitives", - "sp-npos-elections", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", - "sp-transaction-pool", - "sp-version", - "static_assertions", - "substrate-wasm-builder", - "xcm", - "xcm-builder", - "xcm-executor", -] - [[package]] name = "kusama-runtime-constants" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "polkadot-primitives", @@ -5061,6 +5638,17 @@ dependencies = [ "smallvec", ] +[[package]] +name = "landlock" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520baa32708c4e957d2fc3a186bc5bd8d26637c33137f399ddfc202adb240068" +dependencies = [ + "enumflags2", + "libc", + "thiserror", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -5078,18 +5666,18 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.152" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libloading" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "windows-sys 0.48.0", + "windows-targets 0.52.4", ] [[package]] @@ -5169,7 +5757,7 @@ dependencies = [ "libp2p-identity", "log", "multiaddr", - "multihash 0.17.0", + "multihash", "multistream-select", "once_cell", "parking_lot 0.12.1", @@ -5225,11 +5813,11 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" dependencies = [ - "bs58", - "ed25519-dalek 2.1.0", + "bs58 0.4.0", + "ed25519-dalek", "log", "multiaddr", - "multihash 0.17.0", + "multihash", "quick-protobuf", "rand 0.8.5", "sha2 0.10.8", @@ -5319,7 +5907,7 @@ dependencies = [ "snow", "static_assertions", "thiserror", - "x25519-dalek", + "x25519-dalek 1.1.1", "zeroize", ] @@ -5405,7 +5993,7 @@ version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fba456131824ab6acd4c7bf61e9c0f0a3014b5fc9868ccb8e10d344594cdc4f" dependencies = [ - "heck", + "heck 0.4.1", "quote", "syn 1.0.109", ] @@ -5493,13 +6081,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.4.2", + "bitflags 2.5.0", "libc", - "redox_syscall 0.4.1", ] [[package]] @@ -5567,9 +6154,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.14" +version = "1.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "295c17e837573c8c821dbaeb3cceb3d745ad082f7572191409e69cbc1b3fd050" +checksum = "5e143b5e666b2695d28f6bca6497720813f699c9602dd7f5cac91008b8ada7f9" dependencies = [ "cc", "pkg-config", @@ -5615,6 +6202,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +[[package]] +name = "linux-raw-sys" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + [[package]] name = "linux-raw-sys" version = "0.4.13" @@ -5651,9 +6244,9 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", - "xcm-builder", - "xcm-executor", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "xcm-primitives", ] @@ -5669,36 +6262,24 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "lru" -version = "0.8.1" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909" -dependencies = [ - "hashbrown 0.12.3", -] +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "lru" -version = "0.9.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e7d46de488603ffdd5f30afbc64fbba2378214a2c3a2fb83abf3d33126df17" +checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" dependencies = [ "hashbrown 0.13.2", ] [[package]] name = "lru" -version = "0.10.1" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" -dependencies = [ - "hashbrown 0.13.2", -] +checksum = "a4a83fb7698b3643a0e34f9ae6f2e8f0178c0fd42f8b59d493aa271ff3a5bf21" [[package]] name = "lru-cache" @@ -5735,7 +6316,55 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" dependencies = [ - "libc", + "libc", +] + +[[package]] +name = "macro_magic" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aee866bfee30d2d7e83835a4574aad5b45adba4cc807f2a3bbba974e5d4383c9" +dependencies = [ + "macro_magic_core", + "macro_magic_macros", + "quote", + "syn 2.0.57", +] + +[[package]] +name = "macro_magic_core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e766a20fd9c72bab3e1e64ed63f36bd08410e75803813df210d1ce297d7ad00" +dependencies = [ + "const-random", + "derive-syn-parse 0.1.5", + "macro_magic_core_macros", + "proc-macro2", + "quote", + "syn 2.0.57", +] + +[[package]] +name = "macro_magic_core_macros" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d710e1214dffbab3b5dacb21475dde7d6ed84c69ff722b3a47a782668d44fbac" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.57", +] + +[[package]] +name = "macro_magic_macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" +dependencies = [ + "macro_magic_core", + "quote", + "syn 2.0.57", ] [[package]] @@ -5777,9 +6406,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" @@ -5787,7 +6416,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.30", + "rustix 0.38.32", ] [[package]] @@ -5817,12 +6446,6 @@ dependencies = [ "hash-db 0.16.0", ] -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "merlin" version = "2.0.1" @@ -5835,6 +6458,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + [[package]] name = "mick-jaeger" version = "0.1.8" @@ -5854,18 +6489,18 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -5875,7 +6510,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "futures", "log", @@ -5894,7 +6529,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "anyhow", "jsonrpsee", @@ -5909,8 +6544,8 @@ dependencies = [ [[package]] name = "mock-builder" -version = "0.1.1" -source = "git+https://github.com/foss3/runtime-pallet-library?branch=polkadot-v0.9.43#4c6aa68ce21729b835e56b8aaf1b76040a4cf189" +version = "0.2.0" +source = "git+https://github.com/foss3/runtime-pallet-library?branch=polkadot-v1.1.0#042820a379e12687572bebfb1d05406a649804b1" dependencies = [ "frame-support", ] @@ -5942,22 +6577,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "moonbeam-relay-encoder" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/moonbeam?rev=96ac7576f93bb6828415bf3edeef9e8c4b5b4adf#96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" -dependencies = [ - "cumulus-primitives-core", - "frame-system", - "pallet-evm-precompile-relay-encoder", - "pallet-staking", - "parity-scale-codec 3.6.9", - "sp-runtime", - "sp-std", - "xcm", - "xcm-primitives", -] - [[package]] name = "multiaddr" version = "0.17.1" @@ -5969,7 +6588,7 @@ dependencies = [ "data-encoding", "log", "multibase", - "multihash 0.17.0", + "multihash", "percent-encoding", "serde", "static_assertions", @@ -5990,9 +6609,9 @@ dependencies = [ [[package]] name = "multihash" -version = "0.16.3" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c346cf9999c631f002d8f977c4eaeaa0e6386f16007202308d0b3757522c2cc" +checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" dependencies = [ "blake2b_simd", "blake2s_simd", @@ -6005,19 +6624,6 @@ dependencies = [ "unsigned-varint", ] -[[package]] -name = "multihash" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" -dependencies = [ - "core2", - "digest 0.10.7", - "multihash-derive", - "sha2 0.10.8", - "unsigned-varint", -] - [[package]] name = "multihash-derive" version = "0.8.0" @@ -6054,9 +6660,9 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.32.3" +version = "0.32.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" +checksum = "3ea4908d4f23254adda3daa60ffef0f1ac7b8c3e9a864cf3cc154b251908a2ef" dependencies = [ "approx", "matrixmultiply", @@ -6171,19 +6777,27 @@ dependencies = [ "libc", ] +[[package]] +name = "no-std-net" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" + [[package]] name = "node-primitives" version = "2.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "frame-system", - "parity-scale-codec 3.6.9", - "scale-info", - "sp-application-crypto", "sp-core", "sp-runtime", ] +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + [[package]] name = "nohash-hasher" version = "0.2.0" @@ -6233,13 +6847,19 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" +checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" dependencies = [ "num-traits", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-format" version = "0.4.4" @@ -6252,19 +6872,18 @@ dependencies = [ [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] [[package]] name = "num-iter" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" dependencies = [ "autocfg", "num-integer", @@ -6285,9 +6904,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", ] @@ -6298,7 +6917,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.4", + "hermit-abi 0.3.9", "libc", ] @@ -6340,7 +6959,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -6393,9 +7012,9 @@ checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl-probe" @@ -6447,29 +7066,32 @@ dependencies = [ [[package]] name = "orml-asset-registry" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.43#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" dependencies = [ "frame-support", "frame-system", + "log", "orml-traits", "pallet-xcm", "parity-scale-codec 3.6.9", "scale-info", "serde", + "sp-io", "sp-runtime", "sp-std", - "xcm", - "xcm-builder", - "xcm-executor", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] name = "orml-tokens" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.43#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" dependencies = [ "frame-support", "frame-system", + "log", "orml-traits", "parity-scale-codec 3.6.9", "scale-info", @@ -6482,31 +7104,33 @@ dependencies = [ [[package]] name = "orml-traits" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.43#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" dependencies = [ "frame-support", "impl-trait-for-tuples", "num-traits", "orml-utilities", "parity-scale-codec 3.6.9", + "paste", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", "sp-std", - "xcm", + "staging-xcm", ] [[package]] name = "orml-utilities" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.43#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" dependencies = [ "frame-support", "parity-scale-codec 3.6.9", "scale-info", "serde", + "sp-core", "sp-io", "sp-runtime", "sp-std", @@ -6515,7 +7139,7 @@ dependencies = [ [[package]] name = "orml-xcm" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.43#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" dependencies = [ "frame-support", "frame-system", @@ -6523,31 +7147,32 @@ dependencies = [ "parity-scale-codec 3.6.9", "scale-info", "sp-std", - "xcm", + "staging-xcm", ] [[package]] name = "orml-xcm-support" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.43#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" dependencies = [ "frame-support", "orml-traits", "parity-scale-codec 3.6.9", "sp-runtime", "sp-std", - "xcm", - "xcm-executor", + "staging-xcm", + "staging-xcm-executor", ] [[package]] name = "orml-xtokens" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.43#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", + "log", "orml-traits", "orml-xcm-support", "pallet-xcm", @@ -6557,8 +7182,8 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", - "xcm-executor", + "staging-xcm", + "staging-xcm-executor", ] [[package]] @@ -6589,10 +7214,11 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "frame-system", + "log", "pallet-timestamp", "parity-scale-codec 3.6.9", "scale-info", @@ -6605,7 +7231,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "frame-system", @@ -6621,7 +7247,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "frame-system", @@ -6635,7 +7261,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6659,8 +7285,10 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "aquamarine", + "docify", "frame-benchmarking", "frame-election-provider-support", "frame-support", @@ -6679,7 +7307,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6694,7 +7322,7 @@ dependencies = [ [[package]] name = "pallet-base-fee" version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "fp-evm", "frame-support", @@ -6708,10 +7336,11 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "frame-system", + "log", "pallet-authorship", "pallet-session", "parity-scale-codec 3.6.9", @@ -6727,9 +7356,9 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "binary-merkle-tree", "frame-support", "frame-system", @@ -6745,6 +7374,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", + "sp-state-machine", "sp-std", ] @@ -6780,7 +7410,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6820,7 +7450,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6855,7 +7485,7 @@ dependencies = [ [[package]] name = "pallet-collator-selection" version = "3.0.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6874,7 +7504,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6891,7 +7521,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6942,7 +7572,6 @@ dependencies = [ "pallet-vesting", "parity-scale-codec 3.6.9", "scale-info", - "serde", "sp-core", "sp-io", "sp-runtime", @@ -6952,7 +7581,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6970,7 +7599,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6987,13 +7616,13 @@ dependencies = [ "sp-npos-elections", "sp-runtime", "sp-std", - "strum", + "strum 0.24.1", ] [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7001,12 +7630,13 @@ dependencies = [ "parity-scale-codec 3.6.9", "sp-npos-elections", "sp-runtime", + "sp-std", ] [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -7018,13 +7648,14 @@ dependencies = [ "sp-io", "sp-npos-elections", "sp-runtime", + "sp-staking", "sp-std", ] [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "environmental", "ethereum", @@ -7072,7 +7703,7 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "environmental", "evm", @@ -7097,18 +7728,19 @@ dependencies = [ [[package]] name = "pallet-evm-chain-id" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "frame-support", "frame-system", "parity-scale-codec 3.6.9", "scale-info", + "sp-runtime", ] [[package]] name = "pallet-evm-precompile-balances-erc20" version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/moonbeam?rev=96ac7576f93bb6828415bf3edeef9e8c4b5b4adf#96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" +source = "git+https://github.com/moonbeam-foundation/moonbeam?tag=v0.34.1#29e8d79f1a7cdb195bd17b1788e9e613055c3575" dependencies = [ "fp-evm", "frame-support", @@ -7130,7 +7762,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-blake2" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "fp-evm", ] @@ -7138,7 +7770,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-bn128" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "fp-evm", "sp-core", @@ -7148,48 +7780,28 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-dispatch" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "fp-evm", "frame-support", "pallet-evm", + "parity-scale-codec 3.6.9", + "sp-runtime", ] [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "fp-evm", "num", ] -[[package]] -name = "pallet-evm-precompile-relay-encoder" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/moonbeam?rev=96ac7576f93bb6828415bf3edeef9e8c4b5b4adf#96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" -dependencies = [ - "cumulus-primitives-core", - "fp-evm", - "frame-support", - "frame-system", - "log", - "num_enum 0.5.11", - "pallet-evm", - "pallet-staking", - "parity-scale-codec 3.6.9", - "precompile-utils", - "rustc-hex", - "sp-core", - "sp-runtime", - "sp-std", - "xcm-primitives", -] - [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "fp-evm", "tiny-keccak", @@ -7198,7 +7810,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" +source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" dependencies = [ "fp-evm", "ripemd", @@ -7208,8 +7820,9 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "docify", "frame-benchmarking", "frame-election-provider-support", "frame-support", @@ -7264,7 +7877,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -7287,7 +7900,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "enumflags2", "frame-benchmarking", @@ -7303,7 +7916,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -7323,7 +7936,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -7421,12 +8034,11 @@ dependencies = [ "pallet-uniques", "parity-scale-codec 3.6.9", "scale-info", - "serde", "sp-core", "sp-io", "sp-runtime", "sp-std", - "xcm", + "staging-xcm", "xcm-primitives", ] @@ -7496,13 +8108,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "strum", + "strum 0.24.1", ] [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -7519,7 +8131,7 @@ dependencies = [ [[package]] name = "pallet-message-queue" version = "7.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -7538,11 +8150,12 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec 3.6.9", "scale-info", "sp-core", @@ -7555,7 +8168,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -7571,7 +8184,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -7587,11 +8200,12 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "frame-system", "log", + "pallet-balances", "parity-scale-codec 3.6.9", "scale-info", "sp-core", @@ -7599,12 +8213,13 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-std", + "sp-tracing", ] [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7624,7 +8239,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "pallet-nomination-pools", "parity-scale-codec 3.6.9", @@ -7635,7 +8250,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "frame-system", @@ -7652,7 +8267,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7684,6 +8299,7 @@ dependencies = [ "frame-system", "parity-scale-codec 3.6.9", "scale-info", + "sp-io", "sp-runtime", "sp-std", ] @@ -7699,6 +8315,7 @@ dependencies = [ "frame-system", "parity-scale-codec 3.6.9", "scale-info", + "sp-io", "sp-runtime", "sp-std", ] @@ -7727,7 +8344,6 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", ] [[package]] @@ -7742,6 +8358,7 @@ dependencies = [ "frame-system", "parity-scale-codec 3.6.9", "scale-info", + "sp-io", "sp-runtime", "sp-std", ] @@ -7770,7 +8387,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "strum", + "strum 0.24.1", ] [[package]] @@ -7802,7 +8419,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", + "staging-xcm", ] [[package]] @@ -7837,14 +8454,14 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "strum", - "xcm", + "staging-xcm", + "strum 0.24.1", ] [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -7861,7 +8478,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -7876,7 +8493,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -7894,7 +8511,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -7909,7 +8526,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "assert_matches", "frame-benchmarking", @@ -7928,7 +8545,7 @@ dependencies = [ [[package]] name = "pallet-remarks" version = "0.0.1" -source = "git+https://github.com/foss3/runtime-pallet-library?branch=polkadot-v0.9.43#4c6aa68ce21729b835e56b8aaf1b76040a4cf189" +source = "git+https://github.com/foss3/runtime-pallet-library?branch=polkadot-v1.1.0#042820a379e12687572bebfb1d05406a649804b1" dependencies = [ "frame-benchmarking", "frame-support", @@ -7973,7 +8590,7 @@ dependencies = [ "parity-scale-codec 3.6.9", "scale-info", "sp-std", - "xcm", + "staging-xcm", ] [[package]] @@ -8001,8 +8618,9 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -8018,7 +8636,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "frame-system", @@ -8032,6 +8650,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", + "sp-state-machine", "sp-std", "sp-trie", ] @@ -8039,13 +8658,14 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "pallet-session", "pallet-staking", + "parity-scale-codec 3.6.9", "rand 0.8.5", "sp-runtime", "sp-session", @@ -8055,13 +8675,17 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec 3.6.9", "rand_chacha 0.2.2", "scale-info", + "sp-arithmetic", + "sp-io", "sp-runtime", "sp-std", ] @@ -8069,7 +8693,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8092,18 +8716,18 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "log", "sp-arithmetic", @@ -8112,7 +8736,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec 3.6.9", "sp-api", @@ -8121,7 +8745,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -8138,7 +8762,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -8168,7 +8792,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -8180,13 +8804,14 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "sp-storage", "sp-timestamp", ] [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -8214,11 +8839,8 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "orml-asset-registry", "orml-tokens", "orml-traits", - "pallet-balances", - "pallet-order-book", "pallet-restricted-tokens", "parity-scale-codec 3.6.9", "scale-info", @@ -8228,13 +8850,12 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", ] [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "frame-system", @@ -8250,7 +8871,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -8266,7 +8887,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "pallet-transaction-payment", "parity-scale-codec 3.6.9", @@ -8297,7 +8918,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -8314,7 +8935,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -8329,7 +8950,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -8345,7 +8966,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -8360,7 +8981,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -8374,8 +8995,8 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bounded-collections", "frame-benchmarking", @@ -8389,14 +9010,14 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", - "xcm-executor", + "staging-xcm", + "staging-xcm-executor", ] [[package]] name = "pallet-xcm-benchmarks" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -8407,15 +9028,15 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", - "xcm-builder", - "xcm-executor", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] name = "pallet-xcm-transactor" version = "0.2.0" -source = "git+https://github.com/moonbeam-foundation/moonbeam?rev=96ac7576f93bb6828415bf3edeef9e8c4b5b4adf#96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" +source = "git+https://github.com/moonbeam-foundation/moonbeam?tag=v0.34.1#29e8d79f1a7cdb195bd17b1788e9e613055c3575" dependencies = [ "cumulus-primitives-core", "frame-benchmarking", @@ -8429,22 +9050,24 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", - "xcm-builder", - "xcm-executor", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "xcm-primitives", ] [[package]] name = "parachain-info" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", "parity-scale-codec 3.6.9", "scale-info", + "sp-runtime", + "sp-std", ] [[package]] @@ -8515,7 +9138,7 @@ version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "proc-macro-crate 2.0.0", + "proc-macro-crate 2.0.2", "proc-macro2", "quote", "syn 1.0.109", @@ -8617,6 +9240,15 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", +] + [[package]] name = "peeking_take_while" version = "0.1.2" @@ -8640,9 +9272,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.6" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f200d8d83c44a45b21764d1916299752ca035d15ecd46faca3e9a2a2bf6ad06" +checksum = "311fb059dee1a7b802f036316d790138c613a4e8b180c822e3925a662e9f0c95" dependencies = [ "memchr", "thiserror", @@ -8651,9 +9283,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.6" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcd6ab1236bbdb3a49027e920e693192ebfe8913f6d60e294de57463a493cfde" +checksum = "f73541b156d32197eecda1a4014d7f868fd2bcb3c550d5386087cfba442bf69c" dependencies = [ "pest", "pest_generator", @@ -8661,22 +9293,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.6" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a31940305ffc96863a735bef7c7994a00b325a7138fdbc5bda0f1a0476d3275" +checksum = "c35eeed0a3fab112f75165fdc026b3913f4183133f19b49be773ac9ea966e8bd" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "pest_meta" -version = "2.7.6" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7ff62f5259e53b78d1af898941cdcdccfae7385cf7d793a6e55de5d05bb4b7d" +checksum = "2adbf29bb9776f28caece835398781ab24435585fe0d4dc1374a61db5accedca" dependencies = [ "once_cell", "pest", @@ -8690,27 +9322,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.1.0", + "indexmap 2.2.6", ] [[package]] name = "pin-project" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -8721,9 +9353,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" @@ -8731,6 +9363,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +dependencies = [ + "atomic-waker", + "fastrand 2.0.2", + "futures-io", +] + [[package]] name = "pkcs8" version = "0.10.2" @@ -8743,33 +9386,29 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" - -[[package]] -name = "platforms" -version = "2.0.0" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[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 = "polkadot-approval-distribution" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "futures", + "futures-timer", "polkadot-node-jaeger", "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", + "polkadot-node-subsystem-util", "polkadot-primitives", "rand 0.8.5", "tracing-gum", @@ -8777,10 +9416,12 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "always-assert", "futures", + "futures-timer", "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -8791,13 +9432,12 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "derive_more", "fatality", "futures", - "lru 0.9.0", "parity-scale-codec 3.6.9", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -8806,6 +9446,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives", "rand 0.8.5", + "schnellru", "sp-core", "sp-keystore", "thiserror", @@ -8814,12 +9455,11 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "fatality", "futures", - "lru 0.9.0", "parity-scale-codec 3.6.9", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -8829,21 +9469,20 @@ dependencies = [ "polkadot-primitives", "rand 0.8.5", "sc-network", + "schnellru", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-cli" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "clap", "frame-benchmarking-cli", "futures", "log", - "polkadot-client", - "polkadot-node-core-pvf-worker", "polkadot-node-metrics", "polkadot-performance-test", "polkadot-service", @@ -8862,54 +9501,11 @@ dependencies = [ "try-runtime-cli", ] -[[package]] -name = "polkadot-client" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" -dependencies = [ - "async-trait", - "frame-benchmarking", - "frame-benchmarking-cli", - "frame-system", - "frame-system-rpc-runtime-api", - "futures", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "polkadot-core-primitives", - "polkadot-node-core-parachains-inherent", - "polkadot-primitives", - "polkadot-runtime", - "polkadot-runtime-common", - "sc-client-api", - "sc-consensus", - "sc-executor", - "sc-service", - "sp-api", - "sp-authority-discovery", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-consensus-grandpa", - "sp-core", - "sp-inherents", - "sp-keyring", - "sp-mmr-primitives", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-storage", - "sp-timestamp", - "sp-transaction-pool", -] - [[package]] name = "polkadot-collator-protocol" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "always-assert", "bitvec 1.0.1", "fatality", "futures", @@ -8923,13 +9519,14 @@ dependencies = [ "sp-keystore", "sp-runtime", "thiserror", + "tokio-util", "tracing-gum", ] [[package]] name = "polkadot-core-primitives" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec 3.6.9", "scale-info", @@ -8940,15 +9537,14 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "derive_more", "fatality", "futures", "futures-timer", "indexmap 1.9.3", - "lru 0.9.0", "parity-scale-codec 3.6.9", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -8957,6 +9553,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives", "sc-network", + "schnellru", "sp-application-crypto", "sp-keystore", "thiserror", @@ -8965,8 +9562,8 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec 3.6.9", "polkadot-node-primitives", @@ -8979,8 +9576,8 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "futures", "futures-timer", @@ -8991,6 +9588,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "sc-network", + "sc-network-common", "sp-application-crypto", "sp-core", "sp-keystore", @@ -8999,8 +9597,8 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "always-assert", "async-trait", @@ -9022,8 +9620,8 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "futures", "parity-scale-codec 3.6.9", @@ -9040,16 +9638,15 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bitvec 1.0.1", "derive_more", "futures", "futures-timer", "kvdb", - "lru 0.9.0", - "merlin", + "merlin 2.0.1", "parity-scale-codec 3.6.9", "polkadot-node-jaeger", "polkadot-node-primitives", @@ -9058,7 +9655,8 @@ dependencies = [ "polkadot-overseer", "polkadot-primitives", "sc-keystore", - "schnorrkel", + "schnellru", + "schnorrkel 0.9.1", "sp-application-crypto", "sp-consensus", "sp-consensus-slots", @@ -9069,8 +9667,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bitvec 1.0.1", "futures", @@ -9078,6 +9676,7 @@ dependencies = [ "kvdb", "parity-scale-codec 3.6.9", "polkadot-erasure-coding", + "polkadot-node-jaeger", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -9090,8 +9689,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bitvec 1.0.1", "fatality", @@ -9109,8 +9708,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "futures", "polkadot-node-subsystem", @@ -9124,8 +9723,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "futures", @@ -9136,7 +9735,8 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-parachain", + "polkadot-overseer", + "polkadot-parachain-primitives", "polkadot-primitives", "sp-maybe-compressed-blob", "tracing-gum", @@ -9144,8 +9744,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "futures", "polkadot-node-metrics", @@ -9159,8 +9759,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "futures", "futures-timer", @@ -9176,27 +9776,27 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "fatality", "futures", "kvdb", - "lru 0.9.0", "parity-scale-codec 3.6.9", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", "sc-keystore", + "schnellru", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-core-parachains-inherent" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "futures", @@ -9210,10 +9810,27 @@ dependencies = [ "tracing-gum", ] +[[package]] +name = "polkadot-node-core-prospective-parachains" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "bitvec 1.0.1", + "fatality", + "futures", + "parity-scale-codec 3.6.9", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "thiserror", + "tracing-gum", +] + [[package]] name = "polkadot-node-core-provisioner" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bitvec 1.0.1", "fatality", @@ -9223,15 +9840,14 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "rand 0.8.5", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "always-assert", "futures", @@ -9240,25 +9856,26 @@ dependencies = [ "parity-scale-codec 3.6.9", "pin-project", "polkadot-core-primitives", + "polkadot-node-core-pvf-common", "polkadot-node-metrics", "polkadot-node-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "rand 0.8.5", "slotmap", "sp-core", "sp-maybe-compressed-blob", - "sp-tracing", "sp-wasm-interface", "substrate-build-script-utils", + "tempfile", "tokio", "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf-checker" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "futures", "polkadot-node-primitives", @@ -9266,35 +9883,52 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", - "sp-keystore", - "thiserror", + "sp-keystore", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-pvf-common" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "cpu-time", + "futures", + "landlock", + "libc", + "parity-scale-codec 3.6.9", + "polkadot-parachain-primitives", + "polkadot-primitives", + "sc-executor", + "sc-executor-common", + "sc-executor-wasmtime", + "sp-core", + "sp-externalities", + "sp-io", + "sp-tracing", + "tokio", "tracing-gum", ] [[package]] -name = "polkadot-node-core-pvf-worker" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +name = "polkadot-node-core-pvf-prepare-worker" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "assert_matches", - "cpu-time", "futures", "libc", "parity-scale-codec 3.6.9", - "polkadot-node-core-pvf", - "polkadot-parachain", + "polkadot-node-core-pvf-common", + "polkadot-parachain-primitives", "polkadot-primitives", "rayon", "sc-executor", "sc-executor-common", "sc-executor-wasmtime", - "sp-core", - "sp-externalities", "sp-io", "sp-maybe-compressed-blob", "sp-tracing", - "substrate-build-script-utils", - "tempfile", "tikv-jemalloc-ctl", "tokio", "tracing-gum", @@ -9302,23 +9936,23 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "futures", - "lru 0.9.0", "polkadot-node-metrics", "polkadot-node-subsystem", "polkadot-node-subsystem-types", "polkadot-primitives", + "schnellru", "sp-consensus-babe", "tracing-gum", ] [[package]] name = "polkadot-node-jaeger" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "lazy_static", "log", @@ -9335,10 +9969,10 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "bs58", + "bs58 0.5.1", "futures", "futures-timer", "log", @@ -9354,11 +9988,12 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "async-channel", + "async-channel 1.9.0", "async-trait", + "bitvec 1.0.1", "derive_more", "fatality", "futures", @@ -9370,22 +10005,22 @@ dependencies = [ "rand 0.8.5", "sc-authority-discovery", "sc-network", - "strum", + "strum 0.24.1", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-primitives" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bounded-vec", "futures", "parity-scale-codec 3.6.9", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", - "schnorrkel", + "schnorrkel 0.9.1", "serde", "sp-application-crypto", "sp-consensus-babe", @@ -9394,13 +10029,13 @@ dependencies = [ "sp-maybe-compressed-blob", "sp-runtime", "thiserror", - "zstd 0.11.2+zstd.1.5.2", + "zstd 0.12.4", ] [[package]] name = "polkadot-node-subsystem" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -9409,8 +10044,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "derive_more", @@ -9422,6 +10057,7 @@ dependencies = [ "polkadot-primitives", "polkadot-statement-table", "sc-network", + "sc-transaction-pool-api", "smallvec", "sp-api", "sp-authority-discovery", @@ -9432,8 +10068,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "derive_more", @@ -9442,7 +10078,6 @@ dependencies = [ "futures-channel", "itertools 0.10.5", "kvdb", - "lru 0.9.0", "parity-db", "parity-scale-codec 3.6.9", "parking_lot 0.11.2", @@ -9456,6 +10091,7 @@ dependencies = [ "polkadot-primitives", "prioritized-metered-channel", "rand 0.8.5", + "schnellru", "sp-application-crypto", "sp-core", "sp-keystore", @@ -9465,13 +10101,12 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "futures", "futures-timer", - "lru 0.9.0", "orchestra", "parking_lot 0.12.1", "polkadot-node-metrics", @@ -9480,6 +10115,7 @@ dependencies = [ "polkadot-node-subsystem-types", "polkadot-primitives", "sc-client-api", + "schnellru", "sp-api", "sp-core", "tikv-jemalloc-ctl", @@ -9487,9 +10123,9 @@ dependencies = [ ] [[package]] -name = "polkadot-parachain" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +name = "polkadot-parachain-primitives" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bounded-collections", "derive_more", @@ -9505,32 +10141,32 @@ dependencies = [ [[package]] name = "polkadot-performance-test" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "env_logger 0.9.3", - "kusama-runtime", "log", "polkadot-erasure-coding", - "polkadot-node-core-pvf-worker", + "polkadot-node-core-pvf-prepare-worker", "polkadot-node-primitives", "polkadot-primitives", "quote", "sc-executor-common", "sp-maybe-compressed-blob", + "staging-kusama-runtime", "thiserror", ] [[package]] name = "polkadot-primitives" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bitvec 1.0.1", "hex-literal 0.4.1", "parity-scale-codec 3.6.9", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "scale-info", "serde", "sp-api", @@ -9549,8 +10185,8 @@ dependencies = [ [[package]] name = "polkadot-rpc" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "jsonrpsee", "mmr-rpc", @@ -9581,8 +10217,8 @@ dependencies = [ [[package]] name = "polkadot-runtime" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bitvec 1.0.1", "frame-benchmarking", @@ -9639,6 +10275,7 @@ dependencies = [ "pallet-vesting", "pallet-whitelist", "pallet-xcm", + "pallet-xcm-benchmarks", "parity-scale-codec 3.6.9", "polkadot-primitives", "polkadot-runtime-common", @@ -9665,19 +10302,20 @@ dependencies = [ "sp-session", "sp-staking", "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", - "xcm", - "xcm-builder", - "xcm-executor", ] [[package]] name = "polkadot-runtime-common" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bitvec 1.0.1", "frame-benchmarking", @@ -9716,14 +10354,14 @@ dependencies = [ "sp-session", "sp-staking", "sp-std", + "staging-xcm", "static_assertions", - "xcm", ] [[package]] name = "polkadot-runtime-constants" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "polkadot-primitives", @@ -9736,10 +10374,11 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "bs58", + "bs58 0.5.1", + "frame-benchmarking", "parity-scale-codec 3.6.9", "polkadot-primitives", "sp-std", @@ -9748,8 +10387,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bitflags 1.3.2", "bitvec 1.0.1", @@ -9757,6 +10396,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "impl-trait-for-tuples", "log", "pallet-authority-discovery", "pallet-authorship", @@ -9768,7 +10408,7 @@ dependencies = [ "pallet-timestamp", "pallet-vesting", "parity-scale-codec 3.6.9", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-metrics", "rand 0.8.5", @@ -9786,39 +10426,42 @@ dependencies = [ "sp-session", "sp-staking", "sp-std", + "staging-xcm", + "staging-xcm-executor", "static_assertions", - "xcm", - "xcm-executor", ] [[package]] name = "polkadot-service" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", + "frame-benchmarking", "frame-benchmarking-cli", "frame-support", + "frame-system", "frame-system-rpc-runtime-api", "futures", "hex-literal 0.4.1", - "kusama-runtime", + "is_executable", "kvdb", "kvdb-rocksdb", "log", - "lru 0.9.0", "mmr-gadget", "pallet-babe", "pallet-im-online", "pallet-staking", + "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "parity-db", + "parity-scale-codec 3.6.9", "polkadot-approval-distribution", "polkadot-availability-bitfield-distribution", "polkadot-availability-distribution", "polkadot-availability-recovery", - "polkadot-client", "polkadot-collator-protocol", + "polkadot-core-primitives", "polkadot-dispute-distribution", "polkadot-gossip-support", "polkadot-network-bridge", @@ -9832,7 +10475,9 @@ dependencies = [ "polkadot-node-core-chain-selection", "polkadot-node-core-dispute-coordinator", "polkadot-node-core-parachains-inherent", + "polkadot-node-core-prospective-parachains", "polkadot-node-core-provisioner", + "polkadot-node-core-pvf", "polkadot-node-core-pvf-checker", "polkadot-node-core-runtime-api", "polkadot-node-network-protocol", @@ -9841,11 +10486,11 @@ dependencies = [ "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-rpc", "polkadot-runtime", - "polkadot-runtime-constants", + "polkadot-runtime-common", "polkadot-runtime-parachains", "polkadot-statement-distribution", "rococo-runtime", @@ -9871,6 +10516,8 @@ dependencies = [ "sc-sysinfo", "sc-telemetry", "sc-transaction-pool", + "sc-transaction-pool-api", + "schnellru", "serde", "serde_json", "sp-api", @@ -9884,6 +10531,7 @@ dependencies = [ "sp-core", "sp-inherents", "sp-io", + "sp-keyring", "sp-keystore", "sp-mmr-primitives", "sp-offchain", @@ -9893,7 +10541,9 @@ dependencies = [ "sp-storage", "sp-timestamp", "sp-transaction-pool", - "sp-trie", + "sp-version", + "sp-weights", + "staging-kusama-runtime", "substrate-prometheus-endpoint", "thiserror", "tracing-gum", @@ -9902,17 +10552,20 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "arrayvec 0.5.2", + "arrayvec 0.7.4", + "bitvec 1.0.1", "fatality", "futures", + "futures-timer", "indexmap 1.9.3", "parity-scale-codec 3.6.9", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", + "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", "polkadot-primitives", "sp-keystore", @@ -9923,8 +10576,8 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec 3.6.9", "polkadot-primitives", @@ -9933,14 +10586,31 @@ dependencies = [ [[package]] name = "polling" -version = "3.3.2" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +dependencies = [ + "autocfg", + "bitflags 1.3.2", + "cfg-if", + "concurrent-queue", + "libc", + "log", + "pin-project-lite 0.2.14", + "windows-sys 0.48.0", +] + +[[package]] +name = "polling" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545c980a3880efd47b2e262f6a4bb6daad6555cf3367aa9c4e52895f69537a41" +checksum = "e0c976a60b2d7e99d6f229e414670a9b85d13ac305cc6d1e9c134de58c5aaaf6" dependencies = [ "cfg-if", "concurrent-queue", - "pin-project-lite 0.2.13", - "rustix 0.38.30", + "hermit-abi 0.3.9", + "pin-project-lite 0.2.14", + "rustix 0.38.32", "tracing", "windows-sys 0.52.0", ] @@ -9952,19 +10622,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" dependencies = [ "cpufeatures", - "opaque-debug 0.3.0", + "opaque-debug 0.3.1", "universal-hash", ] [[package]] name = "polyval" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ "cfg-if", "cpufeatures", - "opaque-debug 0.3.0", + "opaque-debug 0.3.1", "universal-hash", ] @@ -9989,7 +10659,7 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "precompile-utils" version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/moonbeam?rev=96ac7576f93bb6828415bf3edeef9e8c4b5b4adf#96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" +source = "git+https://github.com/moonbeam-foundation/moonbeam?tag=v0.34.1#29e8d79f1a7cdb195bd17b1788e9e613055c3575" dependencies = [ "affix", "environmental", @@ -10010,12 +10680,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "sp-weights", ] [[package]] name = "precompile-utils-macro" version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/moonbeam?rev=96ac7576f93bb6828415bf3edeef9e8c4b5b4adf#96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" +source = "git+https://github.com/moonbeam-foundation/moonbeam?tag=v0.34.1#29e8d79f1a7cdb195bd17b1788e9e613055c3575" dependencies = [ "case", "num_enum 0.5.11", @@ -10068,12 +10739,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +checksum = "8d3928fb5db768cb86f891ff014f0144589297e3c6a1aba6ed7cecfdace270c7" dependencies = [ "proc-macro2", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -10129,11 +10800,12 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.0" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" dependencies = [ - "toml_edit 0.20.7", + "toml_datetime", + "toml_edit 0.20.2", ] [[package]] @@ -10162,20 +10834,20 @@ dependencies = [ [[package]] name = "proc-macro-warning" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e99670bafb56b9a106419397343bdbc8b8742c3cc449fec6345f86173f47cd4" +checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -10214,7 +10886,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -10244,7 +10916,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", - "heck", + "heck 0.4.1", "itertools 0.10.5", "lazy_static", "log", @@ -10456,9 +11128,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.8.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -10506,9 +11178,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", @@ -10545,7 +11217,7 @@ checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -10562,14 +11234,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.3" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.4", - "regex-syntax 0.8.2", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", ] [[package]] @@ -10583,13 +11255,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b7fa1134405e2ec9353fd416b17f8dacd46c473d7d3fd1cf202706a14eb792a" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] @@ -10600,9 +11272,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[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 = "resolv-conf" @@ -10630,6 +11302,21 @@ dependencies = [ "subtle", ] +[[package]] +name = "ring" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof?rev=0e948f3#0e948f3c28cbacecdd3020403c4841c0eb339213" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "common", + "fflonk", + "merlin 3.0.0", +] + [[package]] name = "ring" version = "0.16.20" @@ -10647,16 +11334,17 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", + "cfg-if", "getrandom 0.2.12", "libc", "spin 0.9.8", "untrusted 0.9.0", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -10702,8 +11390,8 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "binary-merkle-tree", "frame-benchmarking", @@ -10755,7 +11443,7 @@ dependencies = [ "pallet-xcm", "pallet-xcm-benchmarks", "parity-scale-codec 3.6.9", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", @@ -10778,19 +11466,20 @@ dependencies = [ "sp-session", "sp-staking", "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", - "xcm", - "xcm-builder", - "xcm-executor", ] [[package]] name = "rococo-runtime-constants" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "polkadot-primitives", @@ -10928,7 +11617,7 @@ dependencies = [ "pallet-xcm-transactor", "parachain-info", "parity-scale-codec 3.6.9", - "polkadot-parachain", + "polkadot-parachain-primitives", "precompile-utils", "scale-info", "serde", @@ -10939,9 +11628,9 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", - "xcm-builder", - "xcm-executor", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "xcm-primitives", ] @@ -10976,10 +11665,8 @@ dependencies = [ "getrandom 0.2.12", "hex", "hex-literal 0.3.4", - "kusama-runtime", "lazy_static", "liquidity-pools-gateway-routers", - "node-primitives", "orml-asset-registry", "orml-tokens", "orml-traits", @@ -11046,7 +11733,8 @@ dependencies = [ "parachain-info", "parity-scale-codec 3.6.9", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-node-primitives", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime", "polkadot-runtime-common", @@ -11072,11 +11760,12 @@ dependencies = [ "sp-timestamp", "sp-tracing", "sp-transaction-pool", + "staging-kusama-runtime", + "staging-xcm", + "staging-xcm-executor", "thiserror", "tokio", "tracing-subscriber", - "xcm", - "xcm-executor", ] [[package]] @@ -11103,7 +11792,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.21", + "semver 1.0.22", ] [[package]] @@ -11131,11 +11820,25 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.30" +version = "0.37.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" +dependencies = [ + "bitflags 1.3.2", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "errno", "libc", "linux-raw-sys 0.4.13", @@ -11161,7 +11864,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", - "ring 0.17.7", + "ring 0.17.8", "rustls-webpki", "sct", ] @@ -11193,7 +11896,7 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.7", + "ring 0.17.8", "untrusted 0.9.0", ] @@ -11203,6 +11906,17 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +[[package]] +name = "ruzstd" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3ffab8f9715a0d455df4bbb9d21e91135aab3cd3ca187af0cd0c3c3f868fdc" +dependencies = [ + "byteorder", + "thiserror-core", + "twox-hash", +] + [[package]] name = "rw-stream-sink" version = "0.3.0" @@ -11216,9 +11930,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "safe_arch" @@ -11241,7 +11955,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "log", "sp-core", @@ -11252,7 +11966,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "futures", @@ -11260,14 +11974,13 @@ dependencies = [ "ip_network", "libp2p", "log", - "multihash 0.17.0", + "multihash", "parity-scale-codec 3.6.9", "prost", "prost-build", "rand 0.8.5", "sc-client-api", "sc-network", - "sc-network-common", "sp-api", "sp-authority-discovery", "sp-blockchain", @@ -11281,7 +11994,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "futures", "futures-timer", @@ -11304,7 +12017,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec 3.6.9", "sc-client-api", @@ -11319,7 +12032,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -11338,20 +12051,20 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "chrono", "clap", "fdlimit", @@ -11367,7 +12080,6 @@ dependencies = [ "sc-client-db", "sc-keystore", "sc-network", - "sc-network-common", "sc-service", "sc-telemetry", "sc-tracing", @@ -11389,7 +12101,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "fnv", "futures", @@ -11405,7 +12117,6 @@ dependencies = [ "sp-core", "sp-database", "sp-externalities", - "sp-keystore", "sp-runtime", "sp-state-machine", "sp-statement-store", @@ -11416,7 +12127,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "hash-db 0.16.0", "kvdb", @@ -11442,7 +12153,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "futures", @@ -11467,7 +12178,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "futures", @@ -11496,7 +12207,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "fork-tree", @@ -11511,8 +12222,8 @@ dependencies = [ "sc-consensus", "sc-consensus-epochs", "sc-consensus-slots", - "sc-keystore", "sc-telemetry", + "sc-transaction-pool-api", "scale-info", "sp-api", "sp-application-crypto", @@ -11532,7 +12243,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "futures", "jsonrpsee", @@ -11554,10 +12265,10 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", - "async-channel", + "array-bytes", + "async-channel 1.9.0", "async-trait", "fnv", "futures", @@ -11566,9 +12277,7 @@ dependencies = [ "parking_lot 0.12.1", "sc-client-api", "sc-consensus", - "sc-keystore", "sc-network", - "sc-network-common", "sc-network-gossip", "sc-network-sync", "sc-utils", @@ -11590,7 +12299,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "futures", "jsonrpsee", @@ -11609,7 +12318,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "fork-tree", "parity-scale-codec 3.6.9", @@ -11622,10 +12331,10 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "ahash 0.8.7", - "array-bytes 4.2.0", + "ahash 0.8.11", + "array-bytes", "async-trait", "dyn-clone", "finality-grandpa", @@ -11644,6 +12353,7 @@ dependencies = [ "sc-network-common", "sc-network-gossip", "sc-telemetry", + "sc-transaction-pool-api", "sc-utils", "serde_json", "sp-api", @@ -11662,7 +12372,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "finality-grandpa", "futures", @@ -11682,7 +12392,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "futures", @@ -11705,13 +12415,13 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "lru 0.8.1", "parity-scale-codec 3.6.9", "parking_lot 0.12.1", "sc-executor-common", "sc-executor-wasmtime", + "schnellru", "sp-api", "sp-core", "sp-externalities", @@ -11727,7 +12437,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -11739,13 +12449,12 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "anyhow", "cfg-if", "libc", "log", - "once_cell", "rustix 0.36.17", "sc-allocator", "sc-executor-common", @@ -11757,7 +12466,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "ansi_term", "futures", @@ -11773,9 +12482,9 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "parking_lot 0.12.1", "serde_json", "sp-application-crypto", @@ -11787,10 +12496,10 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", - "async-channel", + "array-bytes", + "async-channel 1.9.0", "async-trait", "asynchronous-codec", "bytes", @@ -11802,39 +12511,35 @@ dependencies = [ "libp2p", "linked_hash_set", "log", - "lru 0.8.1", "mockall", "parity-scale-codec 3.6.9", "parking_lot 0.12.1", + "partial_sort", "pin-project", "rand 0.8.5", - "sc-block-builder", "sc-client-api", - "sc-consensus", "sc-network-common", - "sc-peerset", "sc-utils", "serde", "serde_json", "smallvec", - "snow", "sp-arithmetic", "sp-blockchain", - "sp-consensus", "sp-core", "sp-runtime", "substrate-prometheus-endpoint", "thiserror", "unsigned-varint", + "wasm-timer", "zeroize", ] [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "async-channel", + "async-channel 1.9.0", "cid", "futures", "libp2p-identity", @@ -11843,7 +12548,6 @@ dependencies = [ "prost-build", "sc-client-api", "sc-network", - "sc-network-common", "sp-blockchain", "sp-runtime", "thiserror", @@ -11853,45 +12557,33 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", "async-trait", "bitflags 1.3.2", - "bytes", "futures", - "futures-timer", "libp2p-identity", "parity-scale-codec 3.6.9", "prost-build", "sc-consensus", - "sc-peerset", - "sc-utils", - "serde", - "smallvec", - "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", - "zeroize", ] [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "ahash 0.8.7", + "ahash 0.8.11", "futures", "futures-timer", "libp2p", "log", - "lru 0.8.1", "sc-network", "sc-network-common", - "sc-peerset", + "schnellru", "sp-runtime", "substrate-prometheus-endpoint", "tracing", @@ -11900,10 +12592,10 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", - "async-channel", + "array-bytes", + "async-channel 1.9.0", "futures", "libp2p-identity", "log", @@ -11912,8 +12604,6 @@ dependencies = [ "prost-build", "sc-client-api", "sc-network", - "sc-network-common", - "sc-peerset", "sp-blockchain", "sp-core", "sp-runtime", @@ -11923,17 +12613,16 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", - "async-channel", + "array-bytes", + "async-channel 1.9.0", "async-trait", "fork-tree", "futures", "futures-timer", "libp2p", "log", - "lru 0.8.1", "mockall", "parity-scale-codec 3.6.9", "prost", @@ -11942,8 +12631,8 @@ dependencies = [ "sc-consensus", "sc-network", "sc-network-common", - "sc-peerset", "sc-utils", + "schnellru", "smallvec", "sp-arithmetic", "sp-blockchain", @@ -11958,17 +12647,15 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "futures", "libp2p", "log", "parity-scale-codec 3.6.9", - "pin-project", "sc-network", "sc-network-common", - "sc-peerset", "sc-utils", "sp-consensus", "sp-runtime", @@ -11978,16 +12665,17 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "bytes", "fnv", "futures", "futures-timer", "hyper", - "hyper-rustls 0.23.2", + "hyper-rustls", "libp2p", + "log", "num_cpus", "once_cell", "parity-scale-codec 3.6.9", @@ -11996,36 +12684,22 @@ dependencies = [ "sc-client-api", "sc-network", "sc-network-common", - "sc-peerset", + "sc-transaction-pool-api", "sc-utils", "sp-api", "sp-core", + "sp-externalities", + "sp-keystore", "sp-offchain", "sp-runtime", "threadpool", "tracing", ] -[[package]] -name = "sc-peerset" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" -dependencies = [ - "futures", - "libp2p-identity", - "log", - "parking_lot 0.12.1", - "partial_sort", - "sc-utils", - "serde_json", - "sp-arithmetic", - "wasm-timer", -] - [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -12034,7 +12708,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "futures", "jsonrpsee", @@ -12065,7 +12739,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "jsonrpsee", "parity-scale-codec 3.6.9", @@ -12084,7 +12758,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "http", "jsonrpsee", @@ -12099,9 +12773,9 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "futures", "futures-util", "hex", @@ -12112,6 +12786,7 @@ dependencies = [ "sc-chain-spec", "sc-client-api", "sc-transaction-pool-api", + "sc-utils", "serde", "sp-api", "sp-blockchain", @@ -12119,13 +12794,14 @@ dependencies = [ "sp-runtime", "sp-version", "thiserror", + "tokio", "tokio-stream", ] [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "directories", @@ -12152,11 +12828,9 @@ dependencies = [ "sc-network-light", "sc-network-sync", "sc-network-transactions", - "sc-offchain", "sc-rpc", "sc-rpc-server", "sc-rpc-spec-v2", - "sc-storage-monitor", "sc-sysinfo", "sc-telemetry", "sc-tracing", @@ -12191,7 +12865,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "log", "parity-scale-codec 3.6.9", @@ -12202,14 +12876,12 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "clap", "fs4", - "futures", "log", "sc-client-db", - "sc-utils", "sp-core", "thiserror", "tokio", @@ -12218,7 +12890,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "jsonrpsee", "parity-scale-codec 3.6.9", @@ -12237,7 +12909,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "futures", "libc", @@ -12256,7 +12928,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "chrono", "futures", @@ -12275,7 +12947,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "ansi_term", "atty", @@ -12283,12 +12955,10 @@ dependencies = [ "lazy_static", "libc", "log", - "once_cell", "parking_lot 0.12.1", "regex", "rustc-hash", "sc-client-api", - "sc-rpc-server", "sc-tracing-proc-macro", "serde", "sp-api", @@ -12306,25 +12976,24 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "futures", "futures-timer", "linked-hash-map", "log", - "num-traits", "parity-scale-codec 3.6.9", "parking_lot 0.12.1", "sc-client-api", @@ -12344,13 +13013,15 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "futures", "log", + "parity-scale-codec 3.6.9", "serde", "sp-blockchain", + "sp-core", "sp-runtime", "thiserror", ] @@ -12358,9 +13029,9 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "async-channel", + "async-channel 1.9.0", "futures", "futures-timer", "lazy_static", @@ -12372,9 +13043,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" +checksum = "788745a868b0e751750388f4e6546eb921ef714a4317fa6954f7cde114eb2eb7" dependencies = [ "bitvec 1.0.1", "cfg-if", @@ -12386,9 +13057,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" +checksum = "7dc2f4e8bc344b9fc3d5f74f72c2e55bfc38d28dc2ebc69c194a3df424e4d9ac" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", @@ -12411,7 +13082,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" dependencies = [ - "ahash 0.8.7", + "ahash 0.8.11", "cfg-if", "hashbrown 0.13.2", ] @@ -12426,7 +13097,7 @@ dependencies = [ "arrayvec 0.5.2", "curve25519-dalek 2.1.3", "getrandom 0.1.16", - "merlin", + "merlin 2.0.1", "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", @@ -12434,6 +13105,39 @@ dependencies = [ "zeroize", ] +[[package]] +name = "schnorrkel" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "844b7645371e6ecdf61ff246ba1958c29e802881a749ae3fb1993675d210d28d" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "curve25519-dalek-ng", + "merlin 3.0.0", + "rand_core 0.6.4", + "sha2 0.9.9", + "subtle-ng", + "zeroize", +] + +[[package]] +name = "schnorrkel" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "curve25519-dalek 4.1.2", + "getrandom_or_panic", + "merlin 3.0.0", + "rand_core 0.6.4", + "sha2 0.10.8", + "subtle", + "zeroize", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -12452,7 +13156,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.7", + "ring 0.17.8", "untrusted 0.9.0", ] @@ -12499,9 +13203,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", @@ -12512,9 +13216,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", @@ -12531,9 +13235,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" dependencies = [ "serde", ] @@ -12546,29 +13250,29 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.195" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.195" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "serde_json" -version = "1.0.111" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" +checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" dependencies = [ "itoa", "ryu", @@ -12594,7 +13298,7 @@ dependencies = [ "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug 0.3.1", ] [[package]] @@ -12619,7 +13323,7 @@ dependencies = [ "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug 0.3.1", ] [[package]] @@ -12642,7 +13346,7 @@ dependencies = [ "block-buffer 0.9.0", "digest 0.9.0", "keccak", - "opaque-debug 0.3.0", + "opaque-debug 0.3.1", ] [[package]] @@ -12679,12 +13383,6 @@ dependencies = [ "libc", ] -[[package]] -name = "signature" -version = "1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" - [[package]] name = "signature" version = "2.2.0" @@ -12743,30 +13441,137 @@ dependencies = [ [[package]] name = "slot-range-helper" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "enumn", + "parity-scale-codec 3.6.9", + "paste", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "slotmap" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" +dependencies = [ + "version_check", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "smol" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1" dependencies = [ - "enumn", - "parity-scale-codec 3.6.9", - "paste", - "sp-runtime", - "sp-std", + "async-channel 1.9.0", + "async-executor", + "async-fs", + "async-io 1.13.0", + "async-lock 2.8.0", + "async-net", + "async-process", + "blocking", + "futures-lite 1.13.0", ] [[package]] -name = "slotmap" -version = "1.0.7" +name = "smoldot" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" +checksum = "c0bb30cf57b7b5f6109ce17c3164445e2d6f270af2cb48f6e4d31c2967c9a9f5" dependencies = [ - "version_check", + "arrayvec 0.7.4", + "async-lock 2.8.0", + "atomic-take", + "base64 0.21.7", + "bip39", + "blake2-rfc", + "bs58 0.5.1", + "chacha20", + "crossbeam-queue", + "derive_more", + "ed25519-zebra 4.0.3", + "either", + "event-listener 2.5.3", + "fnv", + "futures-lite 1.13.0", + "futures-util", + "hashbrown 0.14.3", + "hex", + "hmac 0.12.1", + "itertools 0.11.0", + "libsecp256k1", + "merlin 3.0.0", + "no-std-net", + "nom", + "num-bigint", + "num-rational", + "num-traits", + "pbkdf2 0.12.2", + "pin-project", + "poly1305", + "rand 0.8.5", + "rand_chacha 0.3.1", + "ruzstd", + "schnorrkel 0.10.2", + "serde", + "serde_json", + "sha2 0.10.8", + "sha3 0.10.8", + "siphasher", + "slab", + "smallvec", + "soketto", + "twox-hash", + "wasmi", + "x25519-dalek 2.0.1", + "zeroize", ] [[package]] -name = "smallvec" -version = "1.13.1" +name = "smoldot-light" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "256b5bad1d6b49045e95fe87492ce73d5af81545d8b4d8318a872d2007024c33" +dependencies = [ + "async-channel 1.9.0", + "async-lock 2.8.0", + "base64 0.21.7", + "blake2-rfc", + "derive_more", + "either", + "event-listener 2.5.3", + "fnv", + "futures-channel", + "futures-lite 1.13.0", + "futures-util", + "hashbrown 0.14.3", + "hex", + "itertools 0.11.0", + "log", + "lru 0.11.1", + "no-std-net", + "parking_lot 0.12.1", + "pin-project", + "rand 0.8.5", + "rand_chacha 0.3.1", + "serde", + "serde_json", + "siphasher", + "slab", + "smol", + "smoldot", + "zeroize", +] [[package]] name = "snap" @@ -12776,16 +13581,16 @@ checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" [[package]] name = "snow" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e87c18a6608909007e75a60e04d03eda77b601c94de1c74d9a9dc2c04ab789a" +checksum = "850948bee068e713b8ab860fe1adc4d109676ab4c3b621fd8147f06b261f2f85" dependencies = [ "aes-gcm", "blake2", "chacha20poly1305", - "curve25519-dalek 4.1.1", + "curve25519-dalek 4.1.2", "rand_core 0.6.4", - "ring 0.17.7", + "ring 0.17.8", "rustc_version", "sha2 0.10.8", "subtle", @@ -12803,12 +13608,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -12831,7 +13636,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "hash-db 0.16.0", "log", @@ -12839,6 +13644,7 @@ dependencies = [ "scale-info", "sp-api-proc-macro", "sp-core", + "sp-externalities", "sp-metadata-ir", "sp-runtime", "sp-state-machine", @@ -12851,21 +13657,21 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "Inflector", "blake2", - "expander 1.0.0", + "expander 2.0.0", "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "sp-application-crypto" -version = "7.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec 3.6.9", "scale-info", @@ -12877,8 +13683,8 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "6.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "integer-sqrt", "num-traits", @@ -12892,7 +13698,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec 3.6.9", "scale-info", @@ -12905,9 +13711,8 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "parity-scale-codec 3.6.9", "sp-api", "sp-inherents", "sp-runtime", @@ -12917,13 +13722,13 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "futures", "log", - "lru 0.8.1", "parity-scale-codec 3.6.9", "parking_lot 0.12.1", + "schnellru", "sp-api", "sp-consensus", "sp-database", @@ -12935,7 +13740,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "futures", @@ -12950,14 +13755,13 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "parity-scale-codec 3.6.9", "scale-info", "sp-api", "sp-application-crypto", - "sp-consensus", "sp-consensus-slots", "sp-inherents", "sp-runtime", @@ -12968,7 +13772,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "parity-scale-codec 3.6.9", @@ -12976,11 +13780,9 @@ dependencies = [ "serde", "sp-api", "sp-application-crypto", - "sp-consensus", "sp-consensus-slots", "sp-core", "sp-inherents", - "sp-keystore", "sp-runtime", "sp-std", "sp-timestamp", @@ -12989,7 +13791,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "lazy_static", "parity-scale-codec 3.6.9", @@ -13002,13 +13804,13 @@ dependencies = [ "sp-mmr-primitives", "sp-runtime", "sp-std", - "strum", + "strum 0.24.1", ] [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "finality-grandpa", "log", @@ -13026,7 +13828,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec 3.6.9", "scale-info", @@ -13037,16 +13839,18 @@ dependencies = [ [[package]] name = "sp-core" -version = "7.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "21.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", + "arrayvec 0.7.4", + "bandersnatch_vrfs", "bitflags 1.3.2", "blake2", "bounded-collections", - "bs58", + "bs58 0.5.1", "dyn-clonable", - "ed25519-zebra", + "ed25519-zebra 3.1.0", "futures", "hash-db 0.16.0", "hash256-std-hasher", @@ -13054,7 +13858,7 @@ dependencies = [ "lazy_static", "libsecp256k1", "log", - "merlin", + "merlin 2.0.1", "parity-scale-codec 3.6.9", "parking_lot 0.12.1", "paste", @@ -13062,7 +13866,7 @@ dependencies = [ "rand 0.8.5", "regex", "scale-info", - "schnorrkel", + "schnorrkel 0.9.1", "secp256k1", "secrecy", "serde", @@ -13076,38 +13880,37 @@ dependencies = [ "substrate-bip39", "thiserror", "tiny-bip39", + "tracing", "zeroize", ] [[package]] name = "sp-core-hashing" -version = "5.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "9.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "blake2b_simd", "byteorder", "digest 0.10.7", "sha2 0.10.8", "sha3 0.10.8", - "sp-std", "twox-hash", ] [[package]] name = "sp-core-hashing-proc-macro" -version = "5.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "9.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "proc-macro2", "quote", "sp-core-hashing", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -13115,18 +13918,18 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "5.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "sp-externalities" -version = "0.13.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "0.19.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "environmental", "parity-scale-codec 3.6.9", @@ -13134,16 +13937,26 @@ dependencies = [ "sp-storage", ] +[[package]] +name = "sp-genesis-builder" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "serde_json", + "sp-api", + "sp-runtime", + "sp-std", +] + [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec 3.6.9", "scale-info", - "sp-core", "sp-runtime", "sp-std", "thiserror", @@ -13151,13 +13964,11 @@ dependencies = [ [[package]] name = "sp-io" -version = "7.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bytes", - "ed25519 1.5.3", - "ed25519-dalek 1.0.1", - "futures", + "ed25519-dalek", "libsecp256k1", "log", "parity-scale-codec 3.6.9", @@ -13177,24 +13988,22 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "7.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "lazy_static", "sp-core", "sp-runtime", - "strum", + "strum 0.24.1", ] [[package]] name = "sp-keystore" -version = "0.13.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "0.27.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "futures", "parity-scale-codec 3.6.9", "parking_lot 0.12.1", - "serde", "sp-core", "sp-externalities", "thiserror", @@ -13203,7 +14012,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "thiserror", "zstd 0.12.4", @@ -13212,7 +14021,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-metadata", "parity-scale-codec 3.6.9", @@ -13223,7 +14032,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -13241,7 +14050,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec 3.6.9", "scale-info", @@ -13255,7 +14064,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "sp-api", "sp-core", @@ -13264,8 +14073,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "5.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "backtrace", "lazy_static", @@ -13275,7 +14084,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "rustc-hash", "serde", @@ -13284,8 +14093,8 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "7.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "either", "hash256-std-hasher", @@ -13306,8 +14115,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "7.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -13324,25 +14133,26 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "6.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "Inflector", "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec 3.6.9", "scale-info", "sp-api", "sp-core", + "sp-keystore", "sp-runtime", "sp-staking", "sp-std", @@ -13351,8 +14161,9 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "impl-trait-for-tuples", "parity-scale-codec 3.6.9", "scale-info", "serde", @@ -13363,8 +14174,8 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.13.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "0.28.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "hash-db 0.16.0", "log", @@ -13379,16 +14190,22 @@ dependencies = [ "sp-trie", "thiserror", "tracing", + "trie-db", ] [[package]] name = "sp-statement-store" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "log", + "aes-gcm", + "curve25519-dalek 4.1.2", + "ed25519-dalek", + "hkdf", "parity-scale-codec 3.6.9", + "rand 0.8.5", "scale-info", + "sha2 0.10.8", "sp-api", "sp-application-crypto", "sp-core", @@ -13397,17 +14214,18 @@ dependencies = [ "sp-runtime-interface", "sp-std", "thiserror", + "x25519-dalek 2.0.1", ] [[package]] name = "sp-std" -version = "5.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" [[package]] name = "sp-storage" -version = "7.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "impl-serde", "parity-scale-codec 3.6.9", @@ -13420,11 +14238,9 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", - "futures-timer", - "log", "parity-scale-codec 3.6.9", "sp-inherents", "sp-runtime", @@ -13434,8 +14250,8 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "6.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec 3.6.9", "sp-std", @@ -13447,7 +14263,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "sp-api", "sp-runtime", @@ -13456,10 +14272,9 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", - "log", "parity-scale-codec 3.6.9", "scale-info", "sp-core", @@ -13471,10 +14286,10 @@ dependencies = [ [[package]] name = "sp-trie" -version = "7.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "22.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "ahash 0.8.7", + "ahash 0.8.11", "hash-db 0.16.0", "hashbrown 0.13.2", "lazy_static", @@ -13494,8 +14309,8 @@ dependencies = [ [[package]] name = "sp-version" -version = "5.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "22.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "impl-serde", "parity-scale-codec 3.6.9", @@ -13511,33 +14326,32 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec 3.6.9", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "sp-wasm-interface" -version = "7.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec 3.6.9", "sp-std", - "wasmi", "wasmtime", ] [[package]] name = "sp-weights" -version = "4.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec 3.6.9", "scale-info", @@ -13562,47 +14376,212 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] -name = "spinners" -version = "4.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0ef947f358b9c238923f764c72a4a9d42f2d637c46e059dbd319d6e7cfb4f82" +name = "spinners" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0ef947f358b9c238923f764c72a4a9d42f2d637c46e059dbd319d6e7cfb4f82" +dependencies = [ + "lazy_static", + "maplit", + "strum 0.24.1", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "ss58-registry" +version = "1.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4743ce898933fbff7bbf414f497c459a782d496269644b3d650a398ae6a487ba" +dependencies = [ + "Inflector", + "num-format", + "proc-macro2", + "quote", + "serde", + "serde_json", + "unicode-xid", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "staging-kusama-runtime" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "binary-merkle-tree", + "bitvec 1.0.1", + "frame-benchmarking", + "frame-election-provider-support", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal 0.4.1", + "kusama-runtime-constants", + "log", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", + "pallet-bags-list", + "pallet-balances", + "pallet-beefy", + "pallet-beefy-mmr", + "pallet-bounties", + "pallet-child-bounties", + "pallet-collective", + "pallet-conviction-voting", + "pallet-democracy", + "pallet-election-provider-multi-phase", + "pallet-election-provider-support-benchmarking", + "pallet-elections-phragmen", + "pallet-fast-unstake", + "pallet-grandpa", + "pallet-identity", + "pallet-im-online", + "pallet-indices", + "pallet-membership", + "pallet-message-queue", + "pallet-mmr", + "pallet-multisig", + "pallet-nis", + "pallet-nomination-pools", + "pallet-nomination-pools-benchmarking", + "pallet-nomination-pools-runtime-api", + "pallet-offences", + "pallet-offences-benchmarking", + "pallet-preimage", + "pallet-proxy", + "pallet-ranked-collective", + "pallet-recovery", + "pallet-referenda", + "pallet-scheduler", + "pallet-session", + "pallet-session-benchmarking", + "pallet-society", + "pallet-staking", + "pallet-staking-runtime-api", + "pallet-state-trie-migration", + "pallet-timestamp", + "pallet-tips", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-vesting", + "pallet-whitelist", + "pallet-xcm", + "pallet-xcm-benchmarks", + "parity-scale-codec 3.6.9", + "polkadot-primitives", + "polkadot-runtime-common", + "polkadot-runtime-parachains", + "rustc-hex", + "scale-info", + "serde", + "serde_derive", + "smallvec", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-authority-discovery", + "sp-block-builder", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-core", + "sp-inherents", + "sp-io", + "sp-mmr-primitives", + "sp-npos-elections", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "static_assertions", + "substrate-wasm-builder", +] + +[[package]] +name = "staging-xcm" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "lazy_static", - "maplit", - "strum", + "bounded-collections", + "derivative", + "environmental", + "impl-trait-for-tuples", + "log", + "parity-scale-codec 3.6.9", + "scale-info", + "serde", + "sp-weights", + "xcm-procedural", ] [[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +name = "staging-xcm-builder" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "base64ct", - "der", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "log", + "pallet-transaction-payment", + "parity-scale-codec 3.6.9", + "polkadot-parachain-primitives", + "scale-info", + "sp-arithmetic", + "sp-io", + "sp-runtime", + "sp-std", + "sp-weights", + "staging-xcm", + "staging-xcm-executor", ] [[package]] -name = "ss58-registry" -version = "1.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1114ee5900b8569bbc8b1a014a942f937b752af4b44f4607430b5f86cedaac0" +name = "staging-xcm-executor" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "Inflector", - "num-format", - "proc-macro2", - "quote", - "serde", - "serde_json", - "unicode-xid", + "environmental", + "frame-benchmarking", + "frame-support", + "impl-trait-for-tuples", + "log", + "parity-scale-codec 3.6.9", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-weights", + "staging-xcm", ] -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - [[package]] name = "static_assertions" version = "1.1.0" @@ -13639,9 +14618,9 @@ dependencies = [ [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" [[package]] name = "strum" @@ -13649,31 +14628,50 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" dependencies = [ - "strum_macros", + "strum_macros 0.24.3", ] +[[package]] +name = "strum" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" + [[package]] name = "strum_macros" version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "rustversion", "syn 1.0.109", ] +[[package]] +name = "strum_macros" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.57", +] + [[package]] name = "substrate-bip39" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" +checksum = "6a7590dc041b9bc2825e52ce5af8416c73dbe9d0654402bfd4b4941938b94d8f" dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", - "schnorrkel", + "schnorrkel 0.11.4", "sha2 0.9.9", "zeroize", ] @@ -13694,15 +14692,12 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" -dependencies = [ - "platforms 2.0.0", -] +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -13721,7 +14716,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "hyper", "log", @@ -13733,7 +14728,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "jsonrpsee", @@ -13746,14 +14741,12 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "jsonrpsee", - "log", "parity-scale-codec 3.6.9", "sc-client-api", "sc-rpc-api", - "scale-info", "serde", "sp-core", "sp-runtime", @@ -13765,32 +14758,33 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "ansi_term", "build-helper", "cargo_metadata", "filetime", + "parity-wasm", "sp-maybe-compressed-blob", - "strum", + "strum 0.24.1", "tempfile", "toml 0.7.8", "walkdir", "wasm-opt", ] -[[package]] -name = "substrate-wasm-builder-runner" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "316626afcac0219c95116e6a2518e622484c2814182bd225fbf4da4f67e27e8f" - [[package]] name = "subtle" version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +[[package]] +name = "subtle-ng" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" + [[package]] name = "syn" version = "1.0.109" @@ -13804,9 +14798,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "11a6ae1e52eb25aab8f3fb9fca13be982a373b8f1157ca14b897a825ba4a2d35" dependencies = [ "proc-macro2", "quote", @@ -13854,20 +14848,19 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.13" +version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" +checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "tempfile" -version = "3.9.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", - "fastrand", - "redox_syscall 0.4.1", - "rustix 0.38.30", + "fastrand 2.0.2", + "rustix 0.38.32", "windows-sys 0.52.0", ] @@ -13888,22 +14881,42 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.56" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] +[[package]] +name = "thiserror-core" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c001ee18b7e5e3f62cbf58c7fe220119e68d902bb7443179c0c8aef30090e999" +dependencies = [ + "thiserror-core-impl", +] + +[[package]] +name = "thiserror-core-impl" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4c60d69f36615a077cc7663b9cb8e42275722d23e58a7fa3d2c7f2915d09d04" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.57", +] + [[package]] name = "thiserror-impl" -version = "1.0.56" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -13914,9 +14927,9 @@ checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820" [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", @@ -13967,12 +14980,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", "itoa", + "num-conv", "powerfmt", "serde", "time-core", @@ -13987,10 +15001,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" dependencies = [ + "num-conv", "time-core", ] @@ -14039,9 +15054,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.35.1" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ "backtrace", "bytes", @@ -14049,9 +15064,9 @@ 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.5", + "socket2 0.5.6", "tokio-macros", "windows-sys 0.48.0", ] @@ -14064,7 +15079,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -14078,17 +15093,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-rustls" -version = "0.23.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" -dependencies = [ - "rustls 0.20.9", - "tokio", - "webpki", -] - [[package]] name = "tokio-rustls" version = "0.24.1" @@ -14101,12 +15105,12 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "tokio", "tokio-util", ] @@ -14121,7 +15125,7 @@ dependencies = [ "futures-core", "futures-io", "futures-sink", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "tokio", "tracing", ] @@ -14147,11 +15151,23 @@ dependencies = [ "toml_edit 0.19.15", ] +[[package]] +name = "toml" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.20.2", +] + [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] @@ -14162,7 +15178,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", @@ -14171,11 +15187,13 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.20.7" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.6", + "serde", + "serde_spanned", "toml_datetime", "winnow", ] @@ -14197,14 +15215,14 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "bytes", "futures-core", "futures-util", "http", "http-body", "http-range-header", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "tower-layer", "tower-service", ] @@ -14228,7 +15246,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", ] @@ -14241,7 +15259,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -14266,9 +15284,10 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "coarsetime", "polkadot-node-jaeger", "polkadot-primitives", "tracing", @@ -14277,14 +15296,14 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "expander 2.0.0", "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -14418,7 +15437,7 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "clap", @@ -14429,7 +15448,6 @@ dependencies = [ "parity-scale-codec 3.6.9", "sc-cli", "sc-executor", - "sc-service", "serde", "serde_json", "sp-api", @@ -14508,9 +15526,9 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] @@ -14613,11 +15631,17 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "waker-fn" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" + [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -14644,11 +15668,20 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasix" +version = "0.12.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1fbb4ef9bbca0c1170e0b00dd28abc9e3b68669821600cad1caaed606583c6d" +dependencies = [ + "wasi 0.11.0+wasi-snapshot-preview1", +] + [[package]] name = "wasm-bindgen" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -14656,24 +15689,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.40" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -14683,9 +15716,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -14693,22 +15726,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasm-instrument" @@ -14721,14 +15754,14 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.112.0" +version = "0.114.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87fef6d0d508f08334e0ab0e6877feb4c0ecb3956bcf2cb950699b22fedf3e9c" +checksum = "effbef3bd1dde18acb401f73e740a6f3d4a1bc651e9773bddc512fe4d8d68f67" dependencies = [ "anyhow", "libc", - "strum", - "strum_macros", + "strum 0.24.1", + "strum_macros 0.24.3", "tempfile", "thiserror", "wasm-opt-cxx-sys", @@ -14737,9 +15770,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.112.0" +version = "0.114.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc816bbc1596c8f2e8127e137a760c798023ef3d378f2ae51f0f1840e2dfa445" +checksum = "c09e24eb283919ace2ed5733bda4842a59ce4c8de110ef5c6d98859513d17047" dependencies = [ "anyhow", "cxx", @@ -14749,9 +15782,9 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.112.0" +version = "0.114.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40199e4f68ef1071b3c6d0bd8026a12b481865d4b9e49c156932ea9a6234dd14" +checksum = "36f2f817bed2e8d65eb779fa37317e74de15585751f903c9118342d1970703a4" dependencies = [ "anyhow", "cc", @@ -14776,35 +15809,33 @@ dependencies = [ [[package]] name = "wasmi" -version = "0.13.2" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" +checksum = "77a8281d1d660cdf54c76a3efa9ddd0c270cada1383a995db3ccb43d166456c7" dependencies = [ - "parity-wasm", - "wasmi-validation", + "smallvec", + "spin 0.9.8", + "wasmi_arena", "wasmi_core", + "wasmparser-nostd", ] [[package]] -name = "wasmi-validation" -version = "0.5.0" +name = "wasmi_arena" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" -dependencies = [ - "parity-wasm", -] +checksum = "104a7f73be44570cac297b3035d76b169d6599637631cf37a1703326a0727073" [[package]] name = "wasmi_core" -version = "0.2.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" +checksum = "dcf1a7db34bff95b85c261002720c00c3a6168256dcb93041d3fa2054d19856a" dependencies = [ "downcast-rs", "libm", - "memory_units", - "num-rational", "num-traits", + "paste", ] [[package]] @@ -14817,6 +15848,15 @@ dependencies = [ "url", ] +[[package]] +name = "wasmparser-nostd" +version = "0.100.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9157cab83003221bfd385833ab587a039f5d6fa7304854042ba358a3b09e0724" +dependencies = [ + "indexmap-nostd", +] + [[package]] name = "wasmtime" version = "8.0.1" @@ -15014,9 +16054,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -15028,7 +16068,7 @@ version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring 0.17.7", + "ring 0.17.8", "untrusted 0.9.0", ] @@ -15043,15 +16083,16 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.3" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "westend-runtime" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "binary-merkle-tree", "bitvec 1.0.1", "frame-benchmarking", "frame-election-provider-support", @@ -15068,6 +16109,8 @@ dependencies = [ "pallet-babe", "pallet-bags-list", "pallet-balances", + "pallet-beefy", + "pallet-beefy-mmr", "pallet-collective", "pallet-democracy", "pallet-election-provider-multi-phase", @@ -15080,6 +16123,7 @@ dependencies = [ "pallet-indices", "pallet-membership", "pallet-message-queue", + "pallet-mmr", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -15107,7 +16151,7 @@ dependencies = [ "pallet-xcm", "pallet-xcm-benchmarks", "parity-scale-codec 3.6.9", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", @@ -15117,6 +16161,7 @@ dependencies = [ "serde_derive", "smallvec", "sp-api", + "sp-application-crypto", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", @@ -15131,19 +16176,20 @@ dependencies = [ "sp-session", "sp-staking", "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "substrate-wasm-builder", "westend-runtime-constants", - "xcm", - "xcm-builder", - "xcm-executor", ] [[package]] name = "westend-runtime-constants" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "polkadot-primitives", @@ -15163,14 +16209,14 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.30", + "rustix 0.38.32", ] [[package]] name = "wide" -version = "0.7.14" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b31891d644eba1789fb6715f27fbc322e4bdf2ecdc412ede1993246159271613" +checksum = "89beec544f246e679fc25490e3f8e08003bc4bf612068f325120dad4cea02c1c" dependencies = [ "bytemuck", "safe_arch", @@ -15219,7 +16265,7 @@ version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows-core", + "windows-core 0.51.1", "windows-targets 0.48.5", ] @@ -15232,6 +16278,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.4", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -15256,7 +16311,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.4", ] [[package]] @@ -15291,17 +16346,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", ] [[package]] @@ -15318,9 +16373,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" [[package]] name = "windows_aarch64_msvc" @@ -15336,9 +16391,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" [[package]] name = "windows_i686_gnu" @@ -15354,9 +16409,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" [[package]] name = "windows_i686_msvc" @@ -15372,9 +16427,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" [[package]] name = "windows_x86_64_gnu" @@ -15390,9 +16445,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" [[package]] name = "windows_x86_64_gnullvm" @@ -15408,9 +16463,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" [[package]] name = "windows_x86_64_msvc" @@ -15426,15 +16481,15 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" [[package]] name = "winnow" -version = "0.5.34" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ "memchr", ] @@ -15475,6 +16530,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "x25519-dalek" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" +dependencies = [ + "curve25519-dalek 4.1.2", + "rand_core 0.6.4", + "serde", + "zeroize", +] + [[package]] name = "x509-parser" version = "0.14.0" @@ -15493,68 +16560,10 @@ dependencies = [ "time", ] -[[package]] -name = "xcm" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" -dependencies = [ - "bounded-collections", - "derivative", - "impl-trait-for-tuples", - "log", - "parity-scale-codec 3.6.9", - "scale-info", - "serde", - "sp-weights", - "xcm-procedural", -] - -[[package]] -name = "xcm-builder" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" -dependencies = [ - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "log", - "pallet-transaction-payment", - "parity-scale-codec 3.6.9", - "polkadot-parachain", - "scale-info", - "sp-arithmetic", - "sp-io", - "sp-runtime", - "sp-std", - "sp-weights", - "xcm", - "xcm-executor", -] - -[[package]] -name = "xcm-executor" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" -dependencies = [ - "environmental", - "frame-benchmarking", - "frame-support", - "impl-trait-for-tuples", - "log", - "parity-scale-codec 3.6.9", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-weights", - "xcm", -] - [[package]] name = "xcm-primitives" version = "0.1.1" -source = "git+https://github.com/moonbeam-foundation/moonbeam?rev=96ac7576f93bb6828415bf3edeef9e8c4b5b4adf#96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" +source = "git+https://github.com/moonbeam-foundation/moonbeam?tag=v0.34.1#29e8d79f1a7cdb195bd17b1788e9e613055c3575" dependencies = [ "cumulus-primitives-core", "ethereum", @@ -15566,6 +16575,7 @@ dependencies = [ "impl-trait-for-tuples", "log", "orml-traits", + "pallet-staking", "parity-scale-codec 3.6.9", "scale-info", "serde", @@ -15573,20 +16583,20 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", - "xcm-builder", - "xcm-executor", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] name = "xcm-procedural" -version = "0.9.43" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -15629,7 +16639,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -15649,7 +16659,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -15692,9 +16702,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/Cargo.toml b/Cargo.toml index f610ac938c..b5163df121 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -59,7 +59,7 @@ documentation = "https://reference.centrifuge.io/centrifuge_chain/index.html" hex-literal = { version = "0.3.4" } hex = { version = "0.4.3", default-features = false } smallvec = "1.6.1" -serde = { version = "1.0.119", features = ["derive"] } +serde = { version = "1.0.119", default-features = false, features = ["derive"] } parity-scale-codec = { version = "3.0", default-features = false, features = ["derive"] } scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } log = { version = "0.4", default-features = false } @@ -86,178 +86,147 @@ num-traits = { version = "0.2", default-features = false } num_enum = { version = "0.5.3", default-features = false } # Cumulus -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-client-network = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-client-service = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +cumulus-primitives-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +cumulus-client-network = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -parachain-info = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +parachain-info = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } # Polkadot -pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -rococo-runtime = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -kusama-runtime = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -polkadot-runtime = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -polkadot-cli = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -polkadot-service = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +staging-xcm = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +staging-xcm-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +staging-xcm-executor = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +rococo-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +staging-kusama-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +polkadot-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +polkadot-node-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +polkadot-service = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } # Substrate -node-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sc-service = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sc-block-builder = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sc-client-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sc-executor = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sc-basic-authorship = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sc-chain-spec = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sc-cli = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sc-consensus = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sc-consensus-grandpa = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sc-network = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sc-network-sync = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sc-rpc = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sc-rpc-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sc-sysinfo = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sc-telemetry = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sc-tracing = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sc-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-consensus-beefy = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-consensus-slots = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-inherents = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-offchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-tracing = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-consensus = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-keystore = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-keyring = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-trie = { git = "https://github.com/paritytech/substrate", default-features = true, branch = "polkadot-v0.9.43" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, features = [ +sc-service = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sc-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sc-network = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-arithmetic = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-consensus-beefy = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-consensus-slots = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-core = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-io = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-session = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-std = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-version = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-tracing = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-consensus = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-staking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-trie = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +frame-support = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, features = [ "tuples-96", -], branch = "polkadot-v0.9.43" } # Check when tuples-96 can be removed -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-babe = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-grandpa = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-im-online = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-collective = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-democracy = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-identity = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-multisig = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-preimage = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-proxy = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["historical"], branch = "polkadot-v0.9.43" } -pallet-sudo = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-treasury = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-vesting = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +], branch = "release-polkadot-v1.1.0" } # Check when tuples-96 can be removed +frame-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-babe = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-im-online = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-democracy = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-elections-phragmen = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-identity = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-membership = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, features = ["historical"], branch = "release-polkadot-v1.1.0" } +pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-uniques = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-vesting = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", default-features = false } -try-runtime-cli = { git = "https://github.com/paritytech/substrate", default-features = false } +frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +try-runtime-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } # Orml -orml-asset-registry = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-oracle = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-xcm = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } - -# Frontier -fp-rpc = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-base-fee = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43", features = [ - "forbid-evm-reentrancy", -] } -pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43", features = [ - "forbid-evm-reentrancy", -] } -pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm-precompile-blake2 = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm-precompile-bn128 = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm-precompile-dispatch = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm-precompile-modexp = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm-precompile-sha3fips = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm-precompile-simple = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -fc-consensus = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -fc-db = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43", features = ["rocksdb"] } -fc-mapping-sync = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -fc-rpc = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -fc-rpc-core = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -fp-consensus = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -fp-evm = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -fp-storage = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } - -# Moonbeam -moonbeam-relay-encoder = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } -xcm-primitives = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } -pallet-xcm-transactor = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } -precompile-utils = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } -pallet-evm-precompile-balances-erc20 = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } +orml-asset-registry = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v1.1.0" } +orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v1.1.0" } +orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v1.1.0" } +orml-xcm = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v1.1.0" } +orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v1.1.0" } +orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v1.1.0" } # Centrifuge organization -fudge = { git = "https://github.com/centrifuge/fudge", branch = "polkadot-v0.9.43" } -fudge-core = { git = "https://github.com/centrifuge/fudge", branch = "polkadot-v0.9.43" } -chainbridge = { git = "https://github.com/centrifuge/chainbridge-substrate.git", default-features = false, branch = "polkadot-v0.9.43" } +fudge = { git = "https://github.com/centrifuge/fudge", branch = "polkadot-v1.1.0" } +fudge-core = { git = "https://github.com/centrifuge/fudge", branch = "polkadot-v1.1.0" } +chainbridge = { git = "https://github.com/centrifuge/chainbridge-substrate.git", default-features = false, branch = "polkadot-v1.1.0" } # Foss3 -mock-builder = { git = "https://github.com/foss3/runtime-pallet-library", branch = "polkadot-v0.9.43" } -pallet-remarks = { git = "https://github.com/foss3/runtime-pallet-library", branch = "polkadot-v0.9.43", default-features = false } +mock-builder = { git = "https://github.com/foss3/runtime-pallet-library", branch = "polkadot-v1.1.0" } +pallet-remarks = { git = "https://github.com/foss3/runtime-pallet-library", branch = "polkadot-v1.1.0", default-features = false } # Centrifuge pallets axelar-gateway-precompile = { path = "pallets/liquidity-pools-gateway/axelar-gateway-precompile", default-features = false } @@ -308,425 +277,134 @@ altair-runtime = { path = "runtime/altair", default-features = false } centrifuge-runtime = { path = "runtime/centrifuge", default-features = false } # Build dependencies -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } vergen = "3.0.4" -# -# Cargo patch rules for all the paritytech/ based crates. -# -# With the rules below, we tell cargo that whenever it finds a crate with source in `paritytech/*`, it should use -# the specific revision of the respective repository at hand, avoiding duplicated crates from tainting compilation. -# -[patch."https://github.com/paritytech/substrate"] -binary-merkle-tree = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-benchmarking-cli = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-election-provider-support = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-executive = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-support = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-support-procedural = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-support-procedural-tools = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-support-procedural-tools-derive = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-system = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-system-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-try-runtime = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-aura = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-authorship = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-babe = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-balances = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-bounties = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-child-bounties = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-collective = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-democracy = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-election-provider-multi-phase = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-elections-phragmen = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-grandpa = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-identity = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-im-online = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-indices = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-membership = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-mmr = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-multisig = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-offences = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-proxy = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-recovery = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-scheduler = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-session = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-session-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-staking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-sudo = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-timestamp = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-tips = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-transaction-payment = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-treasury = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-uniques = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-utility = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-vesting = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-beefy = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-beefy-mmr = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-bags-list = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-preimage = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-authority-discovery = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-basic-authorship = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-block-builder = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-chain-spec = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-cli = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-client-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-client-db = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-consensus = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-consensus-aura = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-consensus-babe = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-consensus-babe-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-consensus-grandpa = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-consensus-epochs = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-consensus-slots = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-executor = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-executor-common = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-executor-wasmtime = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-informant = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-keystore = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-network = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-network-common = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-network-gossip = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-network-light = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-network-sync = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-offchain = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-rpc-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-rpc-server = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-service = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-sync-state-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-sysinfo = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-storage-monitor = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-telemetry = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-tracing = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-transaction-pool = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-transaction-pool-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-utils = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-application-crypto = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-arithmetic = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-authority-discovery = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-block-builder = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-blockchain = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-consensus = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-consensus-aura = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-consensus-babe = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-consensus-slots = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-core = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-database = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-weights = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-debug-derive = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-externalities = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-inherents = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-io = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-keyring = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-keystore = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-maybe-compressed-blob = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-mmr-primitives = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-npos-elections = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-offchain = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-runtime = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-runtime-interface = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-runtime-interface-proc-macro = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-session = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-staking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-state-machine = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-std = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-storage = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-timestamp = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-tracing = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-transaction-pool = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-trie = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-version = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-wasm-interface = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -substrate-build-script-utils = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -substrate-wasm-builder = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -try-runtime-cli = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -node-primitives = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-nomination-pools = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-network-transactions = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-consensus-beefy = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-consensus-grandpa = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } - -[patch."https://github.com/paritytech/polkadot"] -kusama-runtime = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -kusama-runtime-constants = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -pallet-xcm = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-availability-recovery = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-cli = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-client = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-core-primitives = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-network-bridge = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-node-core-av-store = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-node-core-pvf = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-node-network-protocol = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-node-primitives = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-node-subsystem = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-node-subsystem-util = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-overseer = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-parachain = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-primitives = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-runtime = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-runtime-common = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-runtime-constants = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-service = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-statement-table = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-rpc = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -rococo-runtime = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -xcm = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -xcm-builder = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -xcm-executor = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-collator-protocol = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-erasure-coding = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-node-collation-generation = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-node-core-runtime-api = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } +# Moonbeam fork of polkadot-evm/frontier +fp-rpc = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } +fp-self-contained = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0", features = ["serde"] } +pallet-base-fee = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } +pallet-ethereum = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0", features = [ + "forbid-evm-reentrancy", +] } +pallet-evm = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0", features = [ + "forbid-evm-reentrancy", +] } +pallet-evm-chain-id = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } +pallet-evm-precompile-blake2 = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } +pallet-evm-precompile-bn128 = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } +pallet-evm-precompile-dispatch = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } +pallet-evm-precompile-modexp = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } +pallet-evm-precompile-sha3fips = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } +pallet-evm-precompile-simple = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } +fc-consensus = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } +fc-db = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0", features = ["rocksdb"] } +fc-mapping-sync = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } +fc-rpc = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } +fc-rpc-core = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } +fp-consensus = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } +fp-evm = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } +fp-storage = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } +fp-dynamic-fee = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } -[patch."https://github.com/paritytech/cumulus"] -cumulus-client-cli = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-client-consensus-aura = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-client-consensus-common = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-client-network = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-client-service = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-primitives-core = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-primitives-utility = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -parachain-info = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-relay-chain-interface = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } +# Moonbeam (tag v0.34.1 => version using a moonbeam fork related to polkadot v1.1.0) +# WARN: Moonbeam dependencies use forks of polkadot, orml and frontier repos. +# We need to patch their dependencies to avoid duplicate same crates. +xcm-primitives = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, tag = "v0.34.1" } +pallet-xcm-transactor = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, tag = "v0.34.1" } +pallet-evm-precompile-balances-erc20 = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, tag = "v0.34.1" } +precompile-utils = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, tag = "v0.34.1" } +# Cargo patch for moonbeam crates # -# Cargo patch for PureStake-based crates -# -# PureStake maintains their own forks of Parity's Substrate, Polkadot, and Cumulus, -# and of open-web3-stack's ORML. By depending on crates from the Moonbeam repository, we are indirectly pulling crates +# Moonbeam maintains its own forks of polkadot-sdk. +# By depending on crates from the Moonbeam repository, we are indirectly pulling crates # from these forked reposities, which lead to multiple cargo issues due to duplication versions of crates being found. # With the rules below, we tell cargo that whenever it finds a crate with source in `moonbeam-foundation/`, that it should use # the specific official revision of the respective repository at hand. # +# How to know if we should add new patches? +# - Do `cargo tree` +# - Search for `moonbeam-foundation/polkadot-sdk` or `moonbeam-foundation-open-runtime-module-library` +# - For any occurence found, add here a patch. +[patch."https://github.com/moonbeam-foundation/polkadot-sdk"] +frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +pallet-staking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-core-hashing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-debug-derive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-externalities = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-storage = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-runtime-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-runtime-interface-proc-macro = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-tracing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-wasm-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-weights = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-arithmetic = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-api-proc-macro = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-state-machine = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-panic-handler = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-trie = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-version = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-core-hashing-proc-macro = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-version-proc-macro = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +staging-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +staging-xcm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +staging-xcm-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-client-db = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-database = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-network-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -# Apply cargo patch to all the moonbeam-foundation/substrate crates -[patch."https://github.com/moonbeam-foundation/substrate"] -binary-merkle-tree = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-benchmarking-cli = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-election-provider-support = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-executive = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-support = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-support-procedural = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-support-procedural-tools = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-support-procedural-tools-derive = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-system = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-system-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -frame-try-runtime = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-aura = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-authorship = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-babe = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-balances = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-bounties = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-child-bounties = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-collective = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-democracy = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-election-provider-multi-phase = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-elections-phragmen = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-grandpa = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-identity = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-im-online = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-indices = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-membership = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-mmr = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-multisig = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-offences = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-proxy = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-recovery = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-scheduler = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-session = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-session-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-staking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-sudo = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-timestamp = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-tips = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-transaction-payment = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-treasury = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-uniques = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-utility = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-vesting = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-beefy = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-beefy-mmr = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-bags-list = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -pallet-preimage = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-authority-discovery = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-basic-authorship = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-block-builder = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-chain-spec = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-cli = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-client-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-client-db = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-consensus = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-consensus-aura = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-consensus-babe = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-consensus-babe-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-consensus-grandpa = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-consensus-epochs = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-consensus-slots = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-executor = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-executor-common = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-executor-wasmtime = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-informant = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-keystore = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-network = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-network-common = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-network-gossip = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-network-light = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-network-sync = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-offchain = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-rpc-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-rpc-server = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-service = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-sync-state-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-sysinfo = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-storage-monitor = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-telemetry = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-tracing = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-transaction-pool = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-transaction-pool-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-utils = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-application-crypto = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-arithmetic = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-authority-discovery = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-block-builder = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-blockchain = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-consensus = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-consensus-aura = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-consensus-babe = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-consensus-slots = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-core = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-database = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-debug-derive = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-externalities = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-weights = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-inherents = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-io = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-keyring = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-keystore = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-maybe-compressed-blob = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-mmr-primitives = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-npos-elections = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-offchain = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-runtime = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-runtime-interface = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-runtime-interface-proc-macro = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-session = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-staking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-state-machine = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-std = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-storage = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-timestamp = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-tracing = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-transaction-pool = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-trie = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-version = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-wasm-interface = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -substrate-build-script-utils = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -substrate-wasm-builder = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -try-runtime-cli = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sc-network-transactions = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-consensus-beefy = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } -sp-consensus-grandpa = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.43" } - -# Cargo patch rules for all the moonbeam-foundation/polkadot crates -[patch."https://github.com/moonbeam-foundation/polkadot"] -kusama-runtime = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -kusama-runtime-constants = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -pallet-xcm = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-availability-recovery = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-cli = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-client = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-core-primitives = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-network-bridge = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-node-core-av-store = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-node-core-pvf = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-node-network-protocol = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-node-primitives = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-node-subsystem = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-node-subsystem-util = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-overseer = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-parachain = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-primitives = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-runtime = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-runtime-common = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-runtime-constants = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-service = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-statement-table = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-rpc = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -rococo-runtime = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -xcm = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -xcm-builder = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -xcm-executor = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-collator-protocol = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-erasure-coding = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-node-collation-generation = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } -polkadot-node-core-runtime-api = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.43" } - -# Cargo patch rules for all the moonbeam-foundation/cumulus crates -[patch."https://github.com/moonbeam-foundation/cumulus"] -cumulus-client-cli = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-client-consensus-aura = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-client-consensus-common = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-client-network = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-client-service = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-primitives-core = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-primitives-utility = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -parachain-info = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-relay-chain-interface = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } -cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.43" } - -# Cargo patch rules for all the moonbeam-foundation/open-runtime-module-library crates [patch."https://github.com/moonbeam-foundation/open-runtime-module-library"] -orml-asset-registry = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } -orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } -orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } -orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } -orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } +orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v1.1.0" } -[patch."https://github.com/moonbeam-foundation/evm"] -evm-core = { git = "https://github.com/moonbeam-foundation//evm", rev = "a33ac87ad7462b7e7029d12c385492b2a8311d1c" } +# TODO: This patches can be removed when we get rid off `lemunozm` fork. +# We need to do this to avoid lemunozm/frontier dependencies to point to the original fork moonbeam-foundation/frontier which will fetch `evm-private` that we do not have git access. +[patch."https://github.com/moonbeam-foundation/frontier"] +fp-rpc = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } +fp-self-contained = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } +pallet-base-fee = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } +pallet-ethereum = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } +pallet-evm = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } +pallet-evm-chain-id = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } +pallet-evm-precompile-blake2 = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } +pallet-evm-precompile-bn128 = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } +pallet-evm-precompile-dispatch = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } +pallet-evm-precompile-modexp = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } +pallet-evm-precompile-sha3fips = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } +pallet-evm-precompile-simple = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } +fc-consensus = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } +fc-db = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } +fc-mapping-sync = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } +fc-rpc = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } +fc-rpc-core = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } +fp-consensus = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } +fp-evm = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } +fp-storage = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } diff --git a/ci/run-check.sh b/ci/run-check.sh index a44a0eb3d0..d9e866ef07 100755 --- a/ci/run-check.sh +++ b/ci/run-check.sh @@ -26,7 +26,7 @@ case $TARGET in ;; lint-taplo) - cargo install taplo-cli --locked + cargo install taplo-cli taplo fmt --check ;; @@ -41,26 +41,26 @@ case $TARGET in docs-build) RUSTDOCFLAGS="-D warnings" cargo doc --all --no-deps ;; - + try-runtime) - if [ "$1" == "altair" ]; then - echo "Running try-runtime for altair" + cargo build -p centrifuge-chain --release --features try-runtime + if [ "$1" == "altair" ]; then + echo "Running try-runtime for altair" RUST_LOG=runtime=trace,try-runtime::cli=trace,executor=trace \ - cargo run --release --features try-runtime try-runtime \ + try-runtime \ --runtime target/release/wbuild/altair-runtime/altair_runtime.wasm \ - --chain altair on-runtime-upgrade live \ - --uri wss://fullnode.altair.centrifuge.io:443 - elif [ "$1" == "centrifuge" ]; then - echo "Running try-runtime for centrifuge" + on-runtime-upgrade live --uri wss://fullnode.altair.centrifuge.io:443 + elif [ "$1" == "centrifuge" ]; then + echo "Running try-runtime for centrifuge" RUST_LOG=runtime=trace,try-runtime::cli=trace,executor=trace \ - cargo run --release --features try-runtime try-runtime \ + try-runtime \ --runtime target/release/wbuild/centrifuge-runtime/centrifuge_runtime.wasm \ - --chain centrifuge on-runtime-upgrade live --uri wss://fullnode.centrifuge.io:443 - else - echo "Invalid argument. Please specify 'altair' or 'centrifuge'." - exit 1 - fi - ;; + on-runtime-upgrade live --uri wss://fullnode.centrifuge.io:443 + else + echo "Invalid argument. Please specify 'altair' or 'centrifuge'." + exit 1 + fi + ;; subalfred) # Find all child directories containing Cargo.toml files # TODO: Filter by crates found in the workspace diff --git a/docker/docker-compose-local-chain.yml b/docker/docker-compose-local-chain.yml index 2719fcc8ce..e33e59b510 100644 --- a/docker/docker-compose-local-chain.yml +++ b/docker/docker-compose-local-chain.yml @@ -20,7 +20,6 @@ services: --alice --parachain-id="2000" --wasm-execution=compiled - --execution=wasm --port=30333 --rpc-port=9933 --rpc-external @@ -30,7 +29,6 @@ services: --database=rocksdb -- --wasm-execution=compiled - --execution=wasm --chain=/chainspec.json --bootnodes="/ip4/127.0.0.1/tcp/30333/p2p/12D3KooWDLpRT9KFo6pKdkmdQQt599tmqVYpoeiHemY32Gf4RUpp" --bootnodes="/ip4/127.0.0.1/tcp/30344/p2p/12D3KooWKpaJZbNymrZmKG6BNNDC58z8p9YKDXfZtyhEjktgtph4" @@ -54,7 +52,6 @@ services: --alice --parachain-id="2000" --wasm-execution=compiled - --execution=wasm --rpc-external --rpc-cors all --ws-external @@ -63,7 +60,6 @@ services: --log="main,info,xcm=trace,xcm-executor=trace" -- --wasm-execution=compiled - --execution=wasm --chain=/chainspec.json --bootnodes="/ip4/127.0.0.1/tcp/30333/p2p/12D3KooWDLpRT9KFo6pKdkmdQQt599tmqVYpoeiHemY32Gf4RUpp" --bootnodes="/ip4/127.0.0.1/tcp/30344/p2p/12D3KooWKpaJZbNymrZmKG6BNNDC58z8p9YKDXfZtyhEjktgtph4" diff --git a/docs/DEVELOPING.md b/docs/DEVELOPING.md index 0dbf040057..1ef17edca2 100644 --- a/docs/DEVELOPING.md +++ b/docs/DEVELOPING.md @@ -61,13 +61,16 @@ It runs a [collator](https://wiki.polkadot.network/docs/learn-collator) node: Similar to the relay chain, you can explore the parachain using the [polkadot.js (on localhost:11936)](https://polkadot.js.org/apps/?rpc=ws%3A%2F%2Flocalhost%3A11936#/explorer) client. You will see the block production frozen until you connect it to the relay chain. - By default, the initialized parachain will have the id `2000`. - If you need more than one parachain or choose other chain specifications, - you can set `PARA_ID` or `PARA_CHAIN_SPEC`, example: + By default, the initialized parachain will have the id `2000`. + Please note that for ephemeral chains specs such as `development`, `centrifuge-local` or `altair-local`, the + parachain ID is currently hardcoded. + If you need to customize it, please open an issue and we will add such a feature. + If choose other chain specifications, you can set the `PARA_CHAIN_SPEC` env var, e.g.: ```bash - PARA_ID=2001 ./scripts/init.sh start-parachain + PARA_CHAIN_SPEC=development ./scripts/init.sh start-parachain ``` - The different `PARA_CHAIN_SPEC` values can be found at [`src/command.rs`](src/command.rs) under the `load_spec()` function. + The different `PARA_CHAIN_SPEC` values can be found at [`src/command.rs`](src/command.rs) under the `load_spec()` + function. 3. Onboard the parachain This step will have the targeted parachain onboarded in the relay chain. The parachain will NOT produce blocks until this step is completed successfully. @@ -109,9 +112,12 @@ Lint the source code with `cargo fmt --all`. This excludes certain paths (define See more [here](docs/runtime-upgrade.md). ## Generate new Spec and Parachain files -This script will take a valid chain-spec chain_id, a parachain_id and a flag to build new spec or not, and will output genesis spec (raw and plain), wasm and state files. + +This script will take a valid chain-spec chain_id and a flag to build new spec or not, and will output genesis spec (raw +and plain), wasm and state files. + ```shell -./scripts/export_parachain_files.sh charcoal-staging 10001 true +./scripts/export_parachain_files.sh demo true ``` Adapt parameters accordingly. diff --git a/libs/mocks/Cargo.toml b/libs/mocks/Cargo.toml index 9c1b443ada..e4ce69f4d5 100644 --- a/libs/mocks/Cargo.toml +++ b/libs/mocks/Cargo.toml @@ -27,7 +27,7 @@ cfg-traits = { workspace = true } cfg-types = { workspace = true } orml-traits = { workspace = true } -xcm = { workspace = true } +staging-xcm = { workspace = true } mock-builder = { workspace = true } @@ -46,7 +46,7 @@ std = [ "sp-io/std", "sp-runtime/std", "orml-traits/std", - "xcm/std", + "staging-xcm/std", "mock-builder/std", ] runtime-benchmarks = [ diff --git a/libs/mocks/src/asset_registry.rs b/libs/mocks/src/asset_registry.rs index 6cf34b6644..195cba6a63 100644 --- a/libs/mocks/src/asset_registry.rs +++ b/libs/mocks/src/asset_registry.rs @@ -1,27 +1,24 @@ -#[frame_support::pallet] +#[frame_support::pallet(dev_mode)] pub mod pallet { use frame_support::pallet_prelude::*; use mock_builder::{execute_call, register_call}; use orml_traits::asset_registry::{AssetMetadata, Inspect, Mutate}; - use xcm::{v3::prelude::MultiLocation, VersionedMultiLocation}; + use sp_std::fmt::Debug; + use staging_xcm::{v3::prelude::MultiLocation, VersionedMultiLocation}; #[pallet::config] pub trait Config: frame_system::Config { type AssetId; - type Balance; + type Balance: Clone + Debug + Eq + PartialEq; type CustomMetadata: Parameter + Member + TypeInfo; + type StringLimit: Get; } #[pallet::pallet] pub struct Pallet(_); #[pallet::storage] - pub(super) type CallIds = StorageMap< - _, - Blake2_128Concat, - ::Output, - mock_builder::CallId, - >; + type CallIds = StorageMap<_, _, String, mock_builder::CallId>; impl Pallet { pub fn mock_asset_id(f: impl Fn(&MultiLocation) -> Option + 'static) { @@ -29,13 +26,19 @@ pub mod pallet { } pub fn mock_metadata( - f: impl Fn(&T::AssetId) -> Option> + 'static, + f: impl Fn( + &T::AssetId, + ) -> Option> + + 'static, ) { register_call!(f); } pub fn mock_metadata_by_location( - f: impl Fn(&MultiLocation) -> Option> + 'static, + f: impl Fn( + &MultiLocation, + ) -> Option> + + 'static, ) { register_call!(f); } @@ -49,7 +52,7 @@ pub mod pallet { pub fn mock_register_asset( f: impl Fn( Option, - AssetMetadata, + AssetMetadata, ) -> DispatchResult + 'static, ) { @@ -60,8 +63,8 @@ pub mod pallet { f: impl Fn( T::AssetId, Option, - Option>, - Option>, + Option>, + Option>, Option, Option>, Option, @@ -76,6 +79,7 @@ pub mod pallet { type AssetId = T::AssetId; type Balance = T::Balance; type CustomMetadata = T::CustomMetadata; + type StringLimit = T::StringLimit; fn asset_id(a: &MultiLocation) -> Option { execute_call!(a) @@ -83,13 +87,13 @@ pub mod pallet { fn metadata( a: &Self::AssetId, - ) -> Option> { + ) -> Option> { execute_call!(a) } fn metadata_by_location( a: &MultiLocation, - ) -> Option> { + ) -> Option> { execute_call!(a) } @@ -101,7 +105,7 @@ pub mod pallet { impl Mutate for Pallet { fn register_asset( a: Option, - b: AssetMetadata, + b: AssetMetadata, ) -> DispatchResult { execute_call!((a, b)) } @@ -109,8 +113,8 @@ pub mod pallet { fn update_asset( a: Self::AssetId, b: Option, - c: Option>, - d: Option>, + c: Option>, + d: Option>, e: Option, g: Option>, h: Option, diff --git a/libs/mocks/src/change_guard.rs b/libs/mocks/src/change_guard.rs index f913c03cc1..219f8e5418 100644 --- a/libs/mocks/src/change_guard.rs +++ b/libs/mocks/src/change_guard.rs @@ -1,4 +1,4 @@ -#[frame_support::pallet] +#[frame_support::pallet(dev_mode)] pub mod pallet { use cfg_traits::changes::ChangeGuard; use frame_support::pallet_prelude::*; @@ -15,12 +15,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::storage] - pub(super) type CallIds = StorageMap< - _, - Blake2_128Concat, - ::Output, - mock_builder::CallId, - >; + type CallIds = StorageMap<_, _, String, mock_builder::CallId>; impl Pallet { pub fn mock_note( diff --git a/libs/mocks/src/currency_conversion.rs b/libs/mocks/src/currency_conversion.rs index 0ac87b8476..92a0772de3 100644 --- a/libs/mocks/src/currency_conversion.rs +++ b/libs/mocks/src/currency_conversion.rs @@ -1,4 +1,4 @@ -#[frame_support::pallet] +#[frame_support::pallet(dev_mode)] pub mod pallet { use cfg_traits::IdentityCurrencyConversion; use frame_support::pallet_prelude::*; @@ -14,12 +14,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::storage] - pub(super) type CallIds = StorageMap< - _, - Blake2_128Concat, - ::Output, - mock_builder::CallId, - >; + type CallIds = StorageMap<_, _, String, mock_builder::CallId>; impl Pallet { pub fn mock_stable_to_stable( diff --git a/libs/mocks/src/data.rs b/libs/mocks/src/data.rs index 8fbcb7d65e..367f7ab9fb 100644 --- a/libs/mocks/src/data.rs +++ b/libs/mocks/src/data.rs @@ -1,4 +1,4 @@ -#[frame_support::pallet] +#[frame_support::pallet(dev_mode)] pub mod pallet { use cfg_traits::data::{DataCollection, DataRegistry}; use frame_support::pallet_prelude::*; @@ -17,12 +17,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::storage] - pub(super) type CallIds = StorageMap< - _, - Blake2_128Concat, - ::Output, - mock_builder::CallId, - >; + type CallIds = StorageMap<_, _, String, mock_builder::CallId>; impl Pallet { pub fn mock_get( diff --git a/libs/mocks/src/fees.rs b/libs/mocks/src/fees.rs index dc67d8de6a..667356a7f3 100644 --- a/libs/mocks/src/fees.rs +++ b/libs/mocks/src/fees.rs @@ -1,25 +1,20 @@ -#[frame_support::pallet] +#[frame_support::pallet(dev_mode)] pub mod pallet { - use cfg_traits::fees::{Fee, FeeKey, Fees}; + use cfg_traits::fees::{Fee, Fees}; use frame_support::{pallet_prelude::*, traits::tokens::Balance}; use mock_builder::{execute_call, register_call}; #[pallet::config] pub trait Config: frame_system::Config { type Balance: Balance; - type FeeKey: FeeKey; + type FeeKey; } #[pallet::pallet] pub struct Pallet(_); #[pallet::storage] - pub(super) type CallIds = StorageMap< - _, - Blake2_128Concat, - ::Output, - mock_builder::CallId, - >; + type CallIds = StorageMap<_, _, String, mock_builder::CallId>; impl Pallet { pub fn mock_fee_value(f: impl Fn(T::FeeKey) -> T::Balance + 'static) { diff --git a/libs/mocks/src/investment.rs b/libs/mocks/src/investment.rs index 546e8a79d6..ac903527a6 100644 --- a/libs/mocks/src/investment.rs +++ b/libs/mocks/src/investment.rs @@ -1,4 +1,4 @@ -#[frame_support::pallet] +#[frame_support::pallet(dev_mode)] pub mod pallet { use cfg_traits::investments::{Investment, InvestmentCollector}; use frame_support::pallet_prelude::*; @@ -16,12 +16,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::storage] - pub(super) type CallIds = StorageMap< - _, - Blake2_128Concat, - ::Output, - mock_builder::CallId, - >; + type CallIds = StorageMap<_, _, String, mock_builder::CallId>; impl Pallet { pub fn mock_update_investment( diff --git a/libs/mocks/src/lib.rs b/libs/mocks/src/lib.rs index 7a90e59638..af80943db1 100644 --- a/libs/mocks/src/lib.rs +++ b/libs/mocks/src/lib.rs @@ -55,61 +55,51 @@ pub mod reexport { #[macro_export] macro_rules! make_runtime_for_mock { ($runtime_name:ident, $mock_name:ident, $pallet:ident, $externalities:ident) => { - use $crate::reexport::frame_support::traits::{ConstU16, ConstU32, ConstU64, Everything}; - use $crate::reexport::sp_core::H256; - use $crate::reexport::sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, - }; - use $crate::reexport::frame_system; + use $crate::reexport::{ + frame_support, + frame_support::traits::{ConstU16, ConstU32, ConstU64, Everything}, + frame_system, + sp_core::H256, + sp_io, + sp_runtime::traits::{BlakeTwo256, IdentityLookup}, + }; - type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; - type Block = frame_system::mocking::MockBlock; + frame_support::construct_runtime!( + pub enum $runtime_name { + System: frame_system, + $mock_name: $pallet, + } + ); - $crate::reexport::frame_support::construct_runtime!( - pub enum $runtime_name where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - System: frame_system, - $mock_name: $pallet, - } - ); + impl frame_system::Config for Runtime { + type AccountData = (); + type AccountId = u64; + type BaseCallFilter = Everything; + type Block = frame_system::mocking::MockBlock; + type BlockHashCount = ConstU64<250>; + type BlockLength = (); + type BlockWeights = (); + type DbWeight = (); + type Hash = H256; + type Hashing = BlakeTwo256; + type Lookup = IdentityLookup; + type MaxConsumers = ConstU32<16>; + type Nonce = u64; + type OnKilledAccount = (); + type OnNewAccount = (); + type OnSetCode = (); + type PalletInfo = PalletInfo; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type SS58Prefix = ConstU16<42>; + type SystemWeightInfo = (); + type Version = (); + } - impl frame_system::Config for Runtime { - type AccountData = (); - type AccountId = u64; - type BaseCallFilter = Everything; - type BlockHashCount = ConstU64<250>; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = ConstU16<42>; - type SystemWeightInfo = (); - type Version = (); - } - - pub fn $externalities() -> $crate::reexport::sp_io::TestExternalities { - frame_system::GenesisConfig::default() - .build_storage::() - .unwrap() - .into() - } + pub fn $externalities() -> sp_io::TestExternalities { + sp_io::TestExternalities::default() + } }; } diff --git a/libs/mocks/src/liquidity_pools.rs b/libs/mocks/src/liquidity_pools.rs index 208c2aee4f..0b94debc7a 100644 --- a/libs/mocks/src/liquidity_pools.rs +++ b/libs/mocks/src/liquidity_pools.rs @@ -33,10 +33,9 @@ impl Codec for MessageMock { } } -#[frame_support::pallet] +#[frame_support::pallet(dev_mode)] pub mod pallet { use cfg_traits::liquidity_pools::InboundQueue; - use cfg_types::domain_address::DomainAddress; use frame_support::pallet_prelude::*; use mock_builder::{execute_call, register_call}; @@ -52,15 +51,10 @@ pub mod pallet { pub struct Pallet(_); #[pallet::storage] - pub(super) type CallIds = StorageMap< - _, - Blake2_128Concat, - ::Output, - mock_builder::CallId, - >; + type CallIds = StorageMap<_, _, String, mock_builder::CallId>; impl Pallet { - pub fn mock_submit(f: impl Fn(DomainAddress, MessageMock) -> DispatchResult + 'static) { + pub fn mock_submit(f: impl Fn(T::DomainAddress, MessageMock) -> DispatchResult + 'static) { register_call!(move |(sender, msg)| f(sender, msg)); } } diff --git a/libs/mocks/src/liquidity_pools_gateway_routers.rs b/libs/mocks/src/liquidity_pools_gateway_routers.rs index b50ff55621..af00e0adc3 100644 --- a/libs/mocks/src/liquidity_pools_gateway_routers.rs +++ b/libs/mocks/src/liquidity_pools_gateway_routers.rs @@ -5,7 +5,7 @@ use sp_std::default::Default; use crate::MessageMock; -#[frame_support::pallet] +#[frame_support::pallet(dev_mode)] pub mod pallet { use super::*; @@ -16,12 +16,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::storage] - pub(super) type CallIds = StorageMap< - _, - Blake2_128Concat, - ::Output, - mock_builder::CallId, - >; + type CallIds = StorageMap<_, _, String, mock_builder::CallId>; impl Pallet { pub fn mock_init(f: impl Fn() -> DispatchResult + 'static) { diff --git a/libs/mocks/src/pay_fee.rs b/libs/mocks/src/pay_fee.rs index b8215a4ef2..66f839f437 100644 --- a/libs/mocks/src/pay_fee.rs +++ b/libs/mocks/src/pay_fee.rs @@ -1,4 +1,4 @@ -#[frame_support::pallet] +#[frame_support::pallet(dev_mode)] pub mod pallet { use cfg_traits::fees::PayFee; use frame_support::pallet_prelude::*; @@ -11,12 +11,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::storage] - pub(super) type CallIds = StorageMap< - _, - Blake2_128Concat, - ::Output, - mock_builder::CallId, - >; + type CallIds = StorageMap<_, _, String, mock_builder::CallId>; impl Pallet { pub fn mock_pay(f: impl Fn(&T::AccountId) -> DispatchResult + 'static) { diff --git a/libs/mocks/src/permissions.rs b/libs/mocks/src/permissions.rs index f35d74407f..3b38af5a85 100644 --- a/libs/mocks/src/permissions.rs +++ b/libs/mocks/src/permissions.rs @@ -1,4 +1,4 @@ -#[frame_support::pallet] +#[frame_support::pallet(dev_mode)] pub mod pallet { use cfg_traits::Permissions; use cfg_types::permissions::Role; @@ -14,12 +14,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::storage] - pub(super) type CallIds = StorageMap< - _, - Blake2_128Concat, - ::Output, - mock_builder::CallId, - >; + type CallIds = StorageMap<_, _, String, mock_builder::CallId>; impl Pallet { pub fn mock_has(f: impl Fn(T::Scope, T::AccountId, Role) -> bool + 'static) { diff --git a/libs/mocks/src/pools.rs b/libs/mocks/src/pools.rs index 790e53bdc2..23f6da4fa7 100644 --- a/libs/mocks/src/pools.rs +++ b/libs/mocks/src/pools.rs @@ -1,4 +1,4 @@ -#[frame_support::pallet] +#[frame_support::pallet(dev_mode)] pub mod pallet { use cfg_traits::{ investments::InvestmentAccountant, PoolInspect, PoolReserve, PriceValue, Seconds, @@ -33,12 +33,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::storage] - pub(super) type CallIds = StorageMap< - _, - Blake2_128Concat, - ::Output, - mock_builder::CallId, - >; + type CallIds = StorageMap<_, _, String, mock_builder::CallId>; impl Pallet { pub fn mock_pool_exists(f: impl Fn(T::PoolId) -> bool + 'static) { diff --git a/libs/mocks/src/pre_conditions.rs b/libs/mocks/src/pre_conditions.rs index b1a7925e4e..e4ff1e1078 100644 --- a/libs/mocks/src/pre_conditions.rs +++ b/libs/mocks/src/pre_conditions.rs @@ -1,4 +1,4 @@ -#[frame_support::pallet] +#[frame_support::pallet(dev_mode)] pub mod pallet { use cfg_traits::PreConditions; use frame_support::pallet_prelude::*; @@ -14,12 +14,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::storage] - pub(super) type CallIds, I: 'static = ()> = StorageMap< - _, - Blake2_128Concat, - ::Output, - mock_builder::CallId, - >; + type CallIds, I: 'static = ()> = StorageMap<_, _, String, mock_builder::CallId>; impl, I: 'static> Pallet { pub fn mock_check(f: impl Fn(T::Conditions) -> T::Result + 'static) { diff --git a/libs/mocks/src/rewards.rs b/libs/mocks/src/rewards.rs index 33c4e2ff13..f6a5131f66 100644 --- a/libs/mocks/src/rewards.rs +++ b/libs/mocks/src/rewards.rs @@ -1,4 +1,4 @@ -#[frame_support::pallet] +#[frame_support::pallet(dev_mode)] pub mod pallet { use cfg_traits::rewards::{AccountRewards, CurrencyGroupChange, GroupRewards}; use frame_support::pallet_prelude::*; @@ -15,12 +15,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::storage] - pub(super) type CallIds = StorageMap< - _, - Blake2_128Concat, - ::Output, - mock_builder::CallId, - >; + type CallIds = StorageMap<_, _, String, mock_builder::CallId>; impl Pallet { pub fn mock_is_ready(f: impl Fn(T::GroupId) -> bool + 'static) { diff --git a/libs/mocks/src/status_notification.rs b/libs/mocks/src/status_notification.rs index 3b55ed90dc..8b9f071518 100644 --- a/libs/mocks/src/status_notification.rs +++ b/libs/mocks/src/status_notification.rs @@ -1,4 +1,4 @@ -#[frame_support::pallet] +#[frame_support::pallet(dev_mode)] pub mod pallet { use cfg_traits::StatusNotificationHook; use frame_support::pallet_prelude::*; @@ -14,12 +14,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::storage] - pub(super) type CallIds, I: 'static = ()> = StorageMap< - _, - Blake2_128Concat, - ::Output, - mock_builder::CallId, - >; + type CallIds, I: 'static = ()> = StorageMap<_, _, String, mock_builder::CallId>; impl, I: 'static> Pallet { pub fn mock_notify_status_change(f: impl Fn(T::Id, T::Status) -> DispatchResult + 'static) { diff --git a/libs/mocks/src/time.rs b/libs/mocks/src/time.rs index ea20565125..15624bf654 100644 --- a/libs/mocks/src/time.rs +++ b/libs/mocks/src/time.rs @@ -1,4 +1,4 @@ -#[frame_support::pallet] +#[frame_support::pallet(dev_mode)] pub mod pallet { use frame_support::{pallet_prelude::*, traits::Time}; use mock_builder::{execute_call, register_call}; @@ -13,12 +13,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::storage] - pub(super) type CallIds = StorageMap< - _, - Blake2_128Concat, - ::Output, - mock_builder::CallId, - >; + type CallIds = StorageMap<_, _, String, mock_builder::CallId>; impl Pallet { pub fn mock_now(f: impl Fn() -> T::Moment + 'static) { diff --git a/libs/mocks/src/token_swaps.rs b/libs/mocks/src/token_swaps.rs index 61dccf0b30..53177226df 100644 --- a/libs/mocks/src/token_swaps.rs +++ b/libs/mocks/src/token_swaps.rs @@ -1,4 +1,4 @@ -#[frame_support::pallet] +#[frame_support::pallet(dev_mode)] pub mod pallet { use cfg_traits::swaps::{OrderInfo, OrderRatio, TokenSwaps}; use frame_support::pallet_prelude::*; @@ -17,12 +17,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::storage] - pub(super) type CallIds = StorageMap< - _, - Blake2_128Concat, - ::Output, - mock_builder::CallId, - >; + type CallIds = StorageMap<_, _, String, mock_builder::CallId>; impl Pallet { pub fn mock_place_order( diff --git a/libs/mocks/src/try_convert.rs b/libs/mocks/src/try_convert.rs index 11fe3771b3..99fc901812 100644 --- a/libs/mocks/src/try_convert.rs +++ b/libs/mocks/src/try_convert.rs @@ -1,4 +1,4 @@ -#[frame_support::pallet] +#[frame_support::pallet(dev_mode)] pub mod pallet { use cfg_traits::TryConvert; use frame_support::pallet_prelude::*; @@ -17,12 +17,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::storage] - pub(super) type CallIds, I: 'static = ()> = StorageMap< - _, - Blake2_128Concat, - ::Output, - mock_builder::CallId, - >; + type CallIds, I: 'static = ()> = StorageMap<_, _, String, mock_builder::CallId>; impl, I: 'static> Pallet { pub fn mock_try_convert(f: impl Fn(T::From) -> Result + 'static) { diff --git a/libs/mocks/src/value_provider.rs b/libs/mocks/src/value_provider.rs index 9d9a574d49..6dbc7934dc 100644 --- a/libs/mocks/src/value_provider.rs +++ b/libs/mocks/src/value_provider.rs @@ -1,4 +1,4 @@ -#[frame_support::pallet] +#[frame_support::pallet(dev_mode)] pub mod pallet { use cfg_traits::ValueProvider; use frame_support::pallet_prelude::*; @@ -15,12 +15,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::storage] - pub(super) type CallIds = StorageMap< - _, - Blake2_128Concat, - ::Output, - mock_builder::CallId, - >; + type CallIds = StorageMap<_, _, String, mock_builder::CallId>; impl Pallet { pub fn mock_get( diff --git a/libs/mocks/src/write_off_policy.rs b/libs/mocks/src/write_off_policy.rs index 38f8612ddd..ed2761ca97 100644 --- a/libs/mocks/src/write_off_policy.rs +++ b/libs/mocks/src/write_off_policy.rs @@ -1,4 +1,4 @@ -#[frame_support::pallet] +#[frame_support::pallet(dev_mode)] pub mod pallet { use cfg_traits::PoolWriteOffPolicyMutate; use frame_support::pallet_prelude::*; @@ -14,12 +14,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::storage] - pub(super) type CallIds = StorageMap< - _, - Blake2_128Concat, - ::Output, - mock_builder::CallId, - >; + type CallIds = StorageMap<_, _, String, mock_builder::CallId>; impl Pallet { pub fn mock_update(f: impl Fn(T::PoolId, T::Policy) -> DispatchResult + 'static) { diff --git a/libs/primitives/Cargo.toml b/libs/primitives/Cargo.toml index 4577236191..bbd0a006f2 100644 --- a/libs/primitives/Cargo.toml +++ b/libs/primitives/Cargo.toml @@ -34,8 +34,8 @@ pallet-collective = { workspace = true } cumulus-primitives-core = { workspace = true } # XCM primitives dependencies -xcm = { workspace = true } -xcm-executor = { workspace = true } +staging-xcm = { workspace = true } +staging-xcm-executor = { workspace = true } [features] default = ["std"] @@ -53,15 +53,15 @@ std = [ "sp-io/std", "sp-runtime/std", "sp-std/std", - "xcm-executor/std", - "xcm/std", + "staging-xcm-executor/std", + "staging-xcm/std", ] runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-collective/runtime-benchmarks", "sp-runtime/runtime-benchmarks", - "xcm-executor/runtime-benchmarks", + "staging-xcm-executor/runtime-benchmarks", ] try-runtime = [ "frame-support/try-runtime", diff --git a/libs/primitives/src/lib.rs b/libs/primitives/src/lib.rs index b0a82a2ce8..4bc2b25e6d 100644 --- a/libs/primitives/src/lib.rs +++ b/libs/primitives/src/lib.rs @@ -84,8 +84,8 @@ pub mod types { /// IBalance is the signed version of the Balance for orml tokens pub type IBalance = i128; - /// Index of a transaction in the chain. - pub type Index = u32; + /// Nonce of a transaction in the chain. + pub type Nonce = u32; /// A hash of some data used by the chain. pub type Hash = ::Output; @@ -270,7 +270,7 @@ pub mod constants { pub const TRANSACTION_RECOVERY_ID: u64 = 42; /// The safe XCM version of pallet-xcm, same as on relay chain - pub const SAFE_XCM_VERSION: u32 = xcm::opaque::v2::VERSION; + pub const SAFE_XCM_VERSION: u32 = staging_xcm::opaque::v2::VERSION; pub const MAX_POV_SIZE: u64 = cumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64; /// Block storage limit in bytes. Set to 40 KB. @@ -339,9 +339,8 @@ pub mod liquidity_pools { impl sp_core::Get<[u8; 12]> for GeneralCurrencyPrefix { fn get() -> [u8; 12] { - let hash: [u8; 16] = frame_support::sp_io::hashing::blake2_128( - &crate::constants::GENERAL_CURRENCY_INDEX_PREFIX, - ); + let hash: [u8; 16] = + sp_io::hashing::blake2_128(&crate::constants::GENERAL_CURRENCY_INDEX_PREFIX); let (trimmed, _) = hash.split_at(12); trimmed @@ -350,161 +349,3 @@ pub mod liquidity_pools { } } } - -pub mod xcm { - use parity_scale_codec::{Compact, Encode}; - use sp_io::hashing::blake2_256; - use sp_std::{borrow::Borrow, marker::PhantomData, vec::Vec}; - use xcm::prelude::{ - AccountId32, AccountKey20, Here, MultiLocation, PalletInstance, Parachain, X1, - }; - use xcm_executor::traits::Convert; - - /// NOTE: Copied from - /// - /// temporary struct that mimics the behavior of the upstream type that we - /// will move to once we update this repository to Polkadot 0.9.43+. - pub struct HashedDescriptionDescribeFamilyAllTerminal(PhantomData); - impl + Clone> HashedDescriptionDescribeFamilyAllTerminal { - fn describe_location_suffix(l: &MultiLocation) -> Result, ()> { - match (l.parents, &l.interior) { - (0, Here) => Ok(Vec::new()), - (0, X1(PalletInstance(i))) => { - Ok((b"Pallet", Compact::::from(*i as u32)).encode()) - } - (0, X1(AccountId32 { id, .. })) => Ok((b"AccountId32", id).encode()), - (0, X1(AccountKey20 { key, .. })) => Ok((b"AccountKey20", key).encode()), - _ => Err(()), - } - } - } - - impl + Clone> Convert - for HashedDescriptionDescribeFamilyAllTerminal - { - fn convert_ref(location: impl Borrow) -> Result { - let l = location.borrow(); - let to_hash = match (l.parents, l.interior.first()) { - (0, Some(Parachain(index))) => { - let tail = l.interior.split_first().0; - let interior = Self::describe_location_suffix(&tail.into())?; - (b"ChildChain", Compact::::from(*index), interior).encode() - } - (1, Some(Parachain(index))) => { - let tail = l.interior.split_first().0; - let interior = Self::describe_location_suffix(&tail.into())?; - (b"SiblingChain", Compact::::from(*index), interior).encode() - } - (1, _) => { - let tail = l.interior.into(); - let interior = Self::describe_location_suffix(&tail)?; - (b"ParentChain", interior).encode() - } - _ => return Err(()), - }; - Ok(blake2_256(&to_hash).into()) - } - - fn reverse_ref(_: impl Borrow) -> Result { - Err(()) - } - } - - #[test] - fn test_hashed_family_all_terminal_converter() { - use xcm::prelude::X2; - - type Converter = HashedDescriptionDescribeFamilyAllTerminal; - - assert_eq!( - [ - 129, 211, 14, 6, 146, 54, 225, 200, 135, 103, 248, 244, 125, 112, 53, 133, 91, 42, - 215, 236, 154, 199, 191, 208, 110, 148, 223, 55, 92, 216, 250, 34 - ], - Converter::<[u8; 32]>::convert(MultiLocation { - parents: 0, - interior: X2( - Parachain(1), - AccountId32 { - network: None, - id: [0u8; 32] - } - ), - }) - .unwrap() - ); - assert_eq!( - [ - 17, 142, 105, 253, 199, 34, 43, 136, 155, 48, 12, 137, 155, 219, 155, 110, 93, 181, - 93, 252, 124, 60, 250, 195, 229, 86, 31, 220, 121, 111, 254, 252 - ], - Converter::<[u8; 32]>::convert(MultiLocation { - parents: 1, - interior: X2( - Parachain(1), - AccountId32 { - network: None, - id: [0u8; 32] - } - ), - }) - .unwrap() - ); - assert_eq!( - [ - 237, 65, 190, 49, 53, 182, 196, 183, 151, 24, 214, 23, 72, 244, 235, 87, 187, 67, - 52, 122, 195, 192, 10, 58, 253, 49, 0, 112, 175, 224, 125, 66 - ], - Converter::<[u8; 32]>::convert(MultiLocation { - parents: 0, - interior: X2( - Parachain(1), - AccountKey20 { - network: None, - key: [0u8; 20] - } - ), - }) - .unwrap() - ); - assert_eq!( - [ - 226, 225, 225, 162, 254, 156, 113, 95, 68, 155, 160, 118, 126, 18, 166, 132, 144, - 19, 8, 204, 228, 112, 164, 189, 179, 124, 249, 1, 168, 110, 151, 50 - ], - Converter::<[u8; 32]>::convert(MultiLocation { - parents: 1, - interior: X2( - Parachain(1), - AccountKey20 { - network: None, - key: [0u8; 20] - } - ), - }) - .unwrap() - ); - assert_eq!( - [ - 254, 186, 179, 229, 13, 24, 84, 36, 84, 35, 64, 95, 114, 136, 62, 69, 247, 74, 215, - 104, 121, 114, 53, 6, 124, 46, 42, 245, 121, 197, 12, 208 - ], - Converter::<[u8; 32]>::convert(MultiLocation { - parents: 1, - interior: X2(Parachain(2), PalletInstance(3)), - }) - .unwrap() - ); - assert_eq!( - [ - 217, 56, 0, 36, 228, 154, 250, 26, 200, 156, 1, 39, 254, 162, 16, 187, 107, 67, 27, - 16, 218, 254, 250, 184, 6, 27, 216, 138, 194, 93, 23, 165 - ], - Converter::<[u8; 32]>::convert(MultiLocation { - parents: 1, - interior: Here, - }) - .unwrap() - ); - } -} diff --git a/libs/test-utils/Cargo.toml b/libs/test-utils/Cargo.toml index 3ca61873e0..6d9282997f 100644 --- a/libs/test-utils/Cargo.toml +++ b/libs/test-utils/Cargo.toml @@ -29,6 +29,9 @@ sp-std = { workspace = true } # Optional dependencies frame-benchmarking = { workspace = true, optional = true } +# Used by impl_mock_registry macro internally +staging-xcm = { workspace = true } + [features] default = ["std"] std = [ @@ -43,6 +46,7 @@ std = [ "sp-runtime/std", "sp-std/std", "frame-benchmarking/std", + "staging-xcm/std", ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", diff --git a/libs/test-utils/src/lib.rs b/libs/test-utils/src/lib.rs index 8363d72ff0..92a023857d 100644 --- a/libs/test-utils/src/lib.rs +++ b/libs/test-utils/src/lib.rs @@ -16,10 +16,4 @@ #![cfg_attr(not(feature = "std"), no_std)] -use frame_support::PalletId; - pub mod mocks; - -/// A pallet id for testing. -/// Can be used for a single point of storage for tokens in testing for example -pub const TEST_PALLET_ID: PalletId = PalletId(*b"TestTest"); diff --git a/libs/test-utils/src/mocks/orml_asset_registry.rs b/libs/test-utils/src/mocks/orml_asset_registry.rs index f456c0018a..84a150239d 100644 --- a/libs/test-utils/src/mocks/orml_asset_registry.rs +++ b/libs/test-utils/src/mocks/orml_asset_registry.rs @@ -10,26 +10,33 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. +pub mod reexport { + pub use staging_xcm::{ + v3::prelude::MultiLocation as __private_MultiLocation, + VersionedMultiLocation as __private_VersionedMultiLocation, + }; +} + #[macro_export] macro_rules! impl_mock_registry { - ($name:ident, $asset_id:ty, $balance:ty, $custom_metadata:ty) => { + ($name:ident, $asset_id:ty, $balance:ty, $custom_metadata:ty, $string_limit:ty) => { pub use orml_asset_registry_mock::$name; mod orml_asset_registry_mock { use frame_support::{ - dispatch::{ + pallet_prelude::{ DispatchError as __private_DispatchError, DispatchResult as __private_DispatchResult, }, - traits::GenesisBuild as __private_GenesisBuild, + traits::BuildGenesisConfig as __private_BuildGenesisConfig, }; use orml_traits::asset_registry::{ AssetMetadata as __private_AssetMetadata, Inspect as __private_Inspect, Mutate as __private_Mutate, }; - use xcm::{ - latest::prelude::MultiLocation as __private_MultiLocation, - VersionedMultiLocation as __private_VersionedMultiLocation, + use sp_runtime::{BoundedVec, BuildStorage}; + use $crate::mocks::orml_asset_registry::reexport::{ + __private_MultiLocation, __private_VersionedMultiLocation, }; use super::*; @@ -40,6 +47,7 @@ macro_rules! impl_mock_registry { type AssetId = $asset_id; type Balance = $balance; type CustomMetadata = $custom_metadata; + type StringLimit = $string_limit; fn asset_id(location: &__private_MultiLocation) -> Option { __private::STATE.with(|s| s.borrow().get_asset_from_location(location)) @@ -47,13 +55,17 @@ macro_rules! impl_mock_registry { fn metadata( asset_id: &Self::AssetId, - ) -> Option<__private_AssetMetadata> { + ) -> Option< + __private_AssetMetadata, + > { __private::STATE.with(|s| s.borrow().get_meta(asset_id)) } fn metadata_by_location( location: &__private_MultiLocation, - ) -> Option<__private_AssetMetadata> { + ) -> Option< + __private_AssetMetadata, + > { __private::STATE.with(|s| s.borrow().get_meta_from_location(location)) } @@ -70,7 +82,11 @@ macro_rules! impl_mock_registry { impl __private_Mutate for $name { fn register_asset( asset_id: Option, - metadata: __private_AssetMetadata, + metadata: __private_AssetMetadata< + Self::Balance, + Self::CustomMetadata, + Self::StringLimit, + >, ) -> __private_DispatchResult { if let Some(asset_id) = asset_id { __private::STATE.with(|s| s.borrow_mut().insert_meta(&asset_id, metadata)) @@ -84,8 +100,8 @@ macro_rules! impl_mock_registry { fn update_asset( asset_id: Self::AssetId, decimals: Option, - name: Option>, - symbol: Option>, + name: Option>, + symbol: Option>, existential_deposit: Option, location: Option>, additional: Option, @@ -108,10 +124,35 @@ macro_rules! impl_mock_registry { pub struct GenesisConfig { pub metadata: Vec<( $asset_id, - __private_AssetMetadata<$balance, $custom_metadata>, + __private_AssetMetadata<$balance, $custom_metadata, $string_limit>, )>, } + impl __private_BuildGenesisConfig for GenesisConfig { + fn build(&self) { + for (asset, metadata) in &self.metadata { + __private::STATE + .with(|s| s.borrow_mut().insert_meta(asset, metadata.clone())) + .expect("Genesis must not fail") + } + } + } + + impl BuildStorage for GenesisConfig { + fn assimilate_storage( + &self, + storage: &mut sp_runtime::Storage, + ) -> Result<(), String> { + frame_support::__private::BasicExternalities::execute_with_storage( + storage, + || { + self.build(); + Ok(()) + }, + ) + } + } + use serde::{ de::{ Deserialize as __private_Deserialize, Deserializer as __private_Deserializer, @@ -122,16 +163,6 @@ macro_rules! impl_mock_registry { }, }; - impl __private_GenesisBuild<()> for GenesisConfig { - fn build(&self) { - for (asset, metadata) in &self.metadata { - __private::STATE - .with(|s| s.borrow_mut().insert_meta(asset, metadata.clone())) - .expect("Genesis must not fail") - } - } - } - // NOTE: We need this dummy impl as `AssetMetadata` does NOT derive // serialize in std impl __private_Serialize for GenesisConfig { @@ -164,7 +195,7 @@ macro_rules! impl_mock_registry { pub location_to_asset: Vec<(__private_MultiLocation, $asset_id)>, pub metadata: Vec<( $asset_id, - __private_AssetMetadata<$balance, $custom_metadata>, + __private_AssetMetadata<$balance, $custom_metadata, $string_limit>, )>, } @@ -172,7 +203,8 @@ macro_rules! impl_mock_registry { pub fn get_meta( &self, asset_id: &$asset_id, - ) -> Option<__private_AssetMetadata<$balance, $custom_metadata>> { + ) -> Option<__private_AssetMetadata<$balance, $custom_metadata, $string_limit>> + { for (curr_id, meta) in &self.metadata { if curr_id == asset_id { return Some(meta.clone()); @@ -185,7 +217,7 @@ macro_rules! impl_mock_registry { pub fn insert_meta( &mut self, asset_id: &$asset_id, - meta: __private_AssetMetadata<$balance, $custom_metadata>, + meta: __private_AssetMetadata<$balance, $custom_metadata, $string_limit>, ) -> __private_DispatchResult { for (curr_id, curr_meta) in &mut self.metadata { if curr_id == asset_id { @@ -231,7 +263,8 @@ macro_rules! impl_mock_registry { pub fn get_meta_from_location( &self, location: &__private_MultiLocation, - ) -> Option<__private_AssetMetadata<$balance, $custom_metadata>> { + ) -> Option<__private_AssetMetadata<$balance, $custom_metadata, $string_limit>> + { let asset_id = self.get_asset_from_location(location)?; self.get_meta(&asset_id) } @@ -240,8 +273,8 @@ macro_rules! impl_mock_registry { &mut self, asset_id: $asset_id, decimals: Option, - name: Option>, - symbol: Option>, + name: Option>, + symbol: Option>, existential_deposit: Option<$balance>, location: Option>, additional: Option<$custom_metadata>, diff --git a/libs/traits/Cargo.toml b/libs/traits/Cargo.toml index a788b0e1d8..e8592f6295 100644 --- a/libs/traits/Cargo.toml +++ b/libs/traits/Cargo.toml @@ -16,6 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] cfg-primitives = { workspace = true } frame-support = { workspace = true } impl-trait-for-tuples = { workspace = true } +orml-traits = { workspace = true } parity-scale-codec = { workspace = true } scale-info = { workspace = true } sp-arithmetic = { workspace = true } @@ -25,7 +26,7 @@ strum = { workspace = true } [dev-dependencies] cfg-mocks = { workspace = true, default_features = true } -cfg-types = { workspace = true, default_features = true } +frame-system = { workspace = true, default_features = true } mock-builder = { workspace = true, default_features = true } [features] @@ -39,13 +40,13 @@ std = [ "cfg-primitives/std", "scale-info/std", "strum/std", + "orml-traits/std", ] runtime-benchmarks = [ "cfg-primitives/runtime-benchmarks", "frame-support/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "cfg-mocks/runtime-benchmarks", - "cfg-types/runtime-benchmarks", ] try-runtime = [ "frame-support/try-runtime", diff --git a/libs/traits/src/fee.rs b/libs/traits/src/fee.rs index da2ebae8c7..1ebac91928 100644 --- a/libs/traits/src/fee.rs +++ b/libs/traits/src/fee.rs @@ -10,7 +10,8 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -use frame_support::dispatch::{Decode, Encode, MaxEncodedLen, TypeInfo}; +use frame_support::pallet_prelude::TypeInfo; +use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use sp_runtime::DispatchResult; use strum::{EnumCount, EnumIter}; diff --git a/libs/traits/src/fees.rs b/libs/traits/src/fees.rs index b0d52267b2..6b56e31d95 100644 --- a/libs/traits/src/fees.rs +++ b/libs/traits/src/fees.rs @@ -1,19 +1,4 @@ use frame_support::{dispatch::DispatchResult, traits::tokens::Balance}; -use parity_scale_codec::FullCodec; -use scale_info::TypeInfo; -use sp_runtime::traits::MaybeSerializeDeserialize; - -/// Type used for identity the key used to retrieve the fees. -pub trait FeeKey: - FullCodec + TypeInfo + MaybeSerializeDeserialize + sp_std::fmt::Debug + Clone + PartialEq -{ -} - -impl< - T: FullCodec + TypeInfo + MaybeSerializeDeserialize + sp_std::fmt::Debug + Clone + PartialEq, - > FeeKey for T -{ -} /// A way to identify a fee value. pub enum Fee { @@ -37,7 +22,7 @@ impl Fee { pub trait Fees { type AccountId; type Balance: Balance; - type FeeKey: FeeKey; + type FeeKey; /// Get the fee balance for a fee key fn fee_value(key: Self::FeeKey) -> Self::Balance; @@ -62,8 +47,8 @@ pub trait Fees { fee: Fee, ) -> DispatchResult; - /// Allows to initialize an initial state required for a pallet that - /// calls pay a fee + /// Allows to initialize an initial state required for a pallet that pay a + /// fee #[cfg(feature = "runtime-benchmarks")] fn add_fee_requirements(_from: &Self::AccountId, _fee: Fee) {} } diff --git a/libs/traits/src/interest.rs b/libs/traits/src/interest.rs index aa9fd8dc39..5502263f61 100644 --- a/libs/traits/src/interest.rs +++ b/libs/traits/src/interest.rs @@ -1,5 +1,9 @@ use cfg_primitives::SECONDS_PER_YEAR; -use frame_support::{dispatch::DispatchResult, scale_info::TypeInfo, Parameter, RuntimeDebug}; +use frame_support::{ + dispatch::DispatchResult, + pallet_prelude::{RuntimeDebug, TypeInfo}, + Parameter, +}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use sp_arithmetic::{ traits::{EnsureAdd, EnsureDiv, EnsureSub}, diff --git a/libs/traits/src/lib.rs b/libs/traits/src/lib.rs index a014d61d05..be11870b37 100644 --- a/libs/traits/src/lib.rs +++ b/libs/traits/src/lib.rs @@ -19,21 +19,22 @@ #![cfg_attr(not(feature = "std"), no_std)] use frame_support::{ - dispatch::{Codec, DispatchResult, DispatchResultWithPostInfo}, - scale_info::TypeInfo, + dispatch::{DispatchResult, DispatchResultWithPostInfo}, + pallet_prelude::{RuntimeDebug, TypeInfo}, traits::UnixTime, - Parameter, RuntimeDebug, + Parameter, }; use impl_trait_for_tuples::impl_for_tuples; -use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; +use orml_traits::asset_registry; +use parity_scale_codec::{Codec, Decode, Encode, MaxEncodedLen}; use sp_runtime::{ traits::{ - AtLeast32BitUnsigned, Bounded, Get, MaybeDisplay, MaybeSerialize, - MaybeSerializeDeserialize, Member, Zero, + AtLeast32BitUnsigned, Bounded, MaybeDisplay, MaybeSerialize, MaybeSerializeDeserialize, + Member, Zero, }, DispatchError, }; -use sp_std::{fmt::Debug, hash::Hash, marker::PhantomData, str::FromStr, vec::Vec}; +use sp_std::{fmt::Debug, hash::Hash, marker::PhantomData, vec::Vec}; /// Traits related to checked changes. pub mod changes; @@ -100,7 +101,6 @@ pub trait Reward { + Copy + Debug + Default - + FromStr + Hash + MaybeDisplay + MaybeSerializeDeserialize @@ -177,9 +177,6 @@ pub enum UpdateState { pub trait PoolMutate { type Balance; type CurrencyId; - type MaxTokenNameLength: Get; - type MaxTokenSymbolLength: Get; - type MaxTranches: Get; type TrancheInput: Encode + Decode + Clone + TypeInfo + Debug + PartialEq; type PoolChanges: Encode + Decode + Clone + TypeInfo + Debug + PartialEq + MaxEncodedLen; type PoolFeeInput: Encode + Decode + Clone + TypeInfo + Debug; @@ -523,3 +520,12 @@ impl ValueProvider for NoProvider { pub trait HasLocalAssetRepresentation { fn is_local_representation_of(&self, variant_currency: &Self) -> Result; } + +/// The asset metadata configured using the trait types +pub type AssetMetadataOf = asset_registry::AssetMetadata< + ::Balance, + ::CustomMetadata, + StringLimitOf, +>; + +pub type StringLimitOf = ::StringLimit; diff --git a/libs/traits/src/swaps.rs b/libs/traits/src/swaps.rs index 217069b87a..05d77e54c5 100644 --- a/libs/traits/src/swaps.rs +++ b/libs/traits/src/swaps.rs @@ -1,4 +1,4 @@ -use frame_support::{scale_info::TypeInfo, RuntimeDebug}; +use frame_support::pallet_prelude::{RuntimeDebug, TypeInfo}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use sp_runtime::{DispatchError, DispatchResult}; use sp_std::fmt::Debug; diff --git a/libs/types/Cargo.toml b/libs/types/Cargo.toml index 0f01710451..d12e3b734c 100644 --- a/libs/types/Cargo.toml +++ b/libs/types/Cargo.toml @@ -26,9 +26,8 @@ sp-core = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } -orml-asset-registry = { workspace = true } orml-traits = { workspace = true } -xcm = { workspace = true } +staging-xcm = { workspace = true } # local dependencies cfg-primitives = { workspace = true } @@ -47,7 +46,6 @@ std = [ "cfg-utils/std", "parity-scale-codec/std", "frame-support/std", - "orml-asset-registry/std", "orml-traits/std", "scale-info/std", "serde/std", @@ -56,14 +54,13 @@ std = [ "sp-runtime/std", "sp-runtime/std", "sp-std/std", - "xcm/std", + "staging-xcm/std", ] runtime-benchmarks = [ "cfg-primitives/runtime-benchmarks", "cfg-traits/runtime-benchmarks", "cfg-utils/runtime-benchmarks", "frame-support/runtime-benchmarks", - "orml-asset-registry/runtime-benchmarks", "sp-runtime/runtime-benchmarks", ] try-runtime = [ @@ -71,6 +68,5 @@ try-runtime = [ "cfg-traits/try-runtime", "cfg-utils/try-runtime", "frame-support/try-runtime", - "orml-asset-registry/try-runtime", "sp-runtime/try-runtime", ] diff --git a/libs/types/src/consts.rs b/libs/types/src/consts.rs index 66ed21800c..a3c531bb5b 100644 --- a/libs/types/src/consts.rs +++ b/libs/types/src/consts.rs @@ -10,22 +10,6 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// Pools-related constants -pub mod pools { - use frame_support::parameter_types; - use scale_info::TypeInfo; - - parameter_types! { - /// The max length in bytes allowed for a tranche token name - #[derive(TypeInfo, Eq, PartialEq, Debug, Clone, Copy )] - pub const MaxTrancheNameLengthBytes: u32 = 128; - - /// The max length in bytes allowed for a tranche token symbol - #[derive(TypeInfo, Eq, PartialEq, Debug, Clone, Copy )] - pub const MaxTrancheSymbolLengthBytes: u32 = 32; - } -} - // Rewards-related constants pub mod rewards { use cfg_primitives::{Balance, CFG}; diff --git a/libs/types/src/domain_address.rs b/libs/types/src/domain_address.rs index 8cdb48de79..d04cb34ffa 100644 --- a/libs/types/src/domain_address.rs +++ b/libs/types/src/domain_address.rs @@ -12,7 +12,7 @@ use cfg_traits::liquidity_pools::Codec; use cfg_utils::{decode_be_bytes, vec_to_fixed_array}; -use frame_support::RuntimeDebug; +use frame_support::pallet_prelude::RuntimeDebug; use parity_scale_codec::{Decode, Encode, Input, MaxEncodedLen}; use scale_info::TypeInfo; use sp_runtime::traits::{AccountIdConversion, Convert}; diff --git a/libs/types/src/epoch.rs b/libs/types/src/epoch.rs index 53f69b6388..97b2f085aa 100644 --- a/libs/types/src/epoch.rs +++ b/libs/types/src/epoch.rs @@ -11,7 +11,7 @@ // GNU General Public License for more details. use cfg_traits::Seconds; -use frame_support::RuntimeDebug; +use frame_support::pallet_prelude::RuntimeDebug; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_runtime::traits::{One, Saturating}; diff --git a/libs/types/src/fee_keys.rs b/libs/types/src/fee_keys.rs index 32cea62d1f..924211a5f7 100644 --- a/libs/types/src/fee_keys.rs +++ b/libs/types/src/fee_keys.rs @@ -10,17 +10,27 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -use frame_support::RuntimeDebug; +use frame_support::pallet_prelude::RuntimeDebug; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; -#[cfg(feature = "std")] use serde::{Deserialize, Serialize}; use sp_std::cmp::PartialEq; /// Different fees keys available. /// Each variant represents a balance previously determined and configured. -#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] +#[derive( + Encode, + Decode, + Clone, + Copy, + PartialEq, + Eq, + RuntimeDebug, + TypeInfo, + MaxEncodedLen, + Serialize, + Deserialize, +)] pub enum FeeKey { /// Key to identify the balance reserved for the author. /// See more at `pallet-anchors` diff --git a/libs/types/src/fixed_point.rs b/libs/types/src/fixed_point.rs index f47d7ff100..8f28a8de7e 100644 --- a/libs/types/src/fixed_point.rs +++ b/libs/types/src/fixed_point.rs @@ -13,8 +13,8 @@ //! Decimal Fixed Point implementations for Substrate runtime. //! Copied over from sp_arithmetic -use parity_scale_codec::{CompactAs, Decode, Encode, MaxEncodedLen}; -#[cfg(feature = "std")] +use parity_scale_codec::{alloc::string::ToString, CompactAs, Decode, Encode, MaxEncodedLen}; +use scale_info::prelude::string::String; use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; use sp_arithmetic::{ helpers_128bit::multiply_by_rational_with_rounding, @@ -770,14 +770,12 @@ impl sp_std::fmt::Debug for FixedU128
{ } } -#[cfg(feature = "std")] impl sp_std::fmt::Display for FixedU128
{ fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { write!(f, "{}", self.0) } } -#[cfg(feature = "std")] impl sp_std::str::FromStr for FixedU128
{ type Err = &'static str; @@ -789,9 +787,7 @@ impl sp_std::str::FromStr for FixedU128
{ } } -// Manual impl `Serialize` as serde_json does not support i128. -// TODO: remove impl if issue https://github.com/serde-rs/json/issues/548 fixed. -#[cfg(feature = "std")] +// See: https://github.com/paritytech/substrate/pull/9708 impl Serialize for FixedU128
{ fn serialize(&self, serializer: S) -> Result where @@ -801,9 +797,7 @@ impl Serialize for FixedU128
{ } } -// Manual impl `Deserialize` as serde_json does not support i128. -// TODO: remove impl if issue https://github.com/serde-rs/json/issues/548 fixed. -#[cfg(feature = "std")] +// See: https://github.com/paritytech/substrate/pull/9708 impl<'de, const DIV: u128> Deserialize<'de> for FixedU128
{ fn deserialize(deserializer: D) -> Result where diff --git a/libs/types/src/investments.rs b/libs/types/src/investments.rs index addd573378..87bec720ad 100644 --- a/libs/types/src/investments.rs +++ b/libs/types/src/investments.rs @@ -11,7 +11,7 @@ // GNU General Public License for more details. use cfg_primitives::OrderId; -use frame_support::RuntimeDebug; +use frame_support::pallet_prelude::RuntimeDebug; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_runtime::{ diff --git a/libs/types/src/locations.rs b/libs/types/src/locations.rs index 4055b1c5be..cf8009965e 100644 --- a/libs/types/src/locations.rs +++ b/libs/types/src/locations.rs @@ -16,7 +16,7 @@ use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_core::{crypto::AccountId32, H256}; use sp_runtime::traits::{BlakeTwo256, Hash}; -use xcm::{v3::MultiLocation, VersionedMultiLocation}; +use staging_xcm::VersionedMultiLocation; use crate::domain_address::DomainAddress; /// Location types for destinations that can receive restricted transfers @@ -39,22 +39,6 @@ impl From for Location { } } -impl From for Location { - fn from(ml: MultiLocation) -> Self { - // using hash here as multilocation is significantly larger than any other enum - // type here -- 592 bytes, vs 40 bytes for domain address (next largest) - Self::XCM(BlakeTwo256::hash(&ml.encode())) - } -} - -impl From for Location { - fn from(ml: xcm::v2::MultiLocation) -> Self { - // using hash here as multilocation is significantly larger than any other enum - // type here -- 592 bytes, vs 40 bytes for domain address (next largest) - Self::XCM(BlakeTwo256::hash(&ml.encode())) - } -} - impl From for Location { fn from(vml: VersionedMultiLocation) -> Self { // using hash here as multilocation is significantly larger than any other enum @@ -73,24 +57,10 @@ impl From for Location { mod test { use hex::FromHex; + use staging_xcm::v3::MultiLocation; use super::*; - #[test] - fn from_xcm_v1_address_works() { - let xa = MultiLocation::default(); - let l = Location::from(xa.clone()); - assert_eq!( - l, - Location::XCM(sp_core::H256( - <[u8; 32]>::from_hex( - "9ee6dfb61a2fb903df487c401663825643bb825d41695e63df8af6162ab145a6" - ) - .unwrap() - )) - ); - } - #[test] fn from_xcm_versioned_address_works() { let xa = VersionedMultiLocation::V3(MultiLocation::default()); @@ -106,15 +76,6 @@ mod test { ); } - #[test] - fn from_xcm_versioned_address_doesnt_change_if_content_stays_same() { - let xa = xcm::v2::MultiLocation::default(); - let xb = xcm::v3::MultiLocation::default(); - let l0 = Location::from(xa.clone()); - let l1 = Location::from(xb.clone()); - assert_eq!(l0, l1); - } - #[test] fn from_domain_address_works() { let da = DomainAddress::EVM( diff --git a/libs/types/src/oracles.rs b/libs/types/src/oracles.rs index ef9d98550f..7e6252591c 100644 --- a/libs/types/src/oracles.rs +++ b/libs/types/src/oracles.rs @@ -1,4 +1,4 @@ -use frame_support::RuntimeDebug; +use frame_support::pallet_prelude::RuntimeDebug; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; #[cfg(feature = "std")] diff --git a/libs/types/src/orders.rs b/libs/types/src/orders.rs index 626949f423..3dfea5de81 100644 --- a/libs/types/src/orders.rs +++ b/libs/types/src/orders.rs @@ -10,7 +10,7 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -use frame_support::RuntimeDebug; +use frame_support::pallet_prelude::RuntimeDebug; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; #[cfg(feature = "std")] diff --git a/libs/types/src/permissions.rs b/libs/types/src/permissions.rs index d61570a424..57eee60d24 100644 --- a/libs/types/src/permissions.rs +++ b/libs/types/src/permissions.rs @@ -463,7 +463,7 @@ mod tests { pub const MaxTranches: u32 = 5; } - struct Now(core::time::Duration); + struct Now; impl Now { fn pass(delta: u64) { unsafe { diff --git a/libs/types/src/pools.rs b/libs/types/src/pools.rs index 239b5df3f2..767c3cdff7 100644 --- a/libs/types/src/pools.rs +++ b/libs/types/src/pools.rs @@ -23,13 +23,9 @@ use sp_std::vec::Vec; use crate::fixed_point::FixedPointNumberExtension; #[derive(Debug, Encode, PartialEq, Eq, Decode, Clone, TypeInfo, MaxEncodedLen)] -pub struct TrancheMetadata -where - MaxTokenNameLength: Get, - MaxTokenSymbolLength: Get, -{ - pub token_name: BoundedVec, - pub token_symbol: BoundedVec, +pub struct TrancheMetadata> { + pub token_name: BoundedVec, + pub token_symbol: BoundedVec, } #[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] diff --git a/libs/types/src/portfolio.rs b/libs/types/src/portfolio.rs index ad97a05b3e..a8a831598b 100644 --- a/libs/types/src/portfolio.rs +++ b/libs/types/src/portfolio.rs @@ -11,7 +11,7 @@ // GNU General Public License for more details. use cfg_traits::{Seconds, TimeAsSecs}; -use frame_support::{traits::Get, BoundedVec, RuntimeDebug}; +use frame_support::{pallet_prelude::RuntimeDebug, traits::Get, BoundedVec}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_runtime::{ diff --git a/libs/types/src/tokens.rs b/libs/types/src/tokens.rs index 9feb7b9510..b365bf72f0 100644 --- a/libs/types/src/tokens.rs +++ b/libs/types/src/tokens.rs @@ -14,23 +14,26 @@ use core::marker::PhantomData; use cfg_primitives::{ types::{PoolId, TrancheId}, - Balance, PalletIndex, + Balance, }; use cfg_traits::{investments::TrancheCurrency as TrancheCurrencyT, HasLocalAssetRepresentation}; -pub use orml_asset_registry::AssetMetadata; +use orml_traits::asset_registry; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; -#[cfg(feature = "std")] use serde::{Deserialize, Serialize}; use sp_runtime::{traits::Get, DispatchError, TokenError}; -use xcm::{ - prelude::{AccountKey20, GlobalConsensus, PalletInstance}, - v3::{MultiLocation, NetworkId}, - VersionedMultiLocation, -}; use crate::{domain_address::DomainAddress, xcm::XcmMetadata, EVMChainId}; +pub const MAX_ASSET_STRING_LIMIT: u32 = 128; + +frame_support::parameter_types! { + #[derive(TypeInfo, Eq, PartialEq, Debug, Clone, Copy )] + pub const AssetStringLimit: u32 = MAX_ASSET_STRING_LIMIT; +} + +pub type AssetMetadata = asset_registry::AssetMetadata; + /// The type for all Currency ids that our chains handles. /// Foreign assets gather all the tokens that are native to other chains, such /// as DOT, AUSD, UDST, etc. @@ -52,8 +55,9 @@ use crate::{domain_address::DomainAddress, xcm::XcmMetadata, EVMChainId}; Decode, TypeInfo, MaxEncodedLen, + Serialize, + Deserialize, )] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub enum CurrencyId { // The Native token, representing AIR in Altair and CFG in Centrifuge. #[default] @@ -83,9 +87,20 @@ pub enum CurrencyId { } #[derive( - Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Debug, Encode, Decode, TypeInfo, MaxEncodedLen, + Clone, + Copy, + PartialOrd, + Ord, + PartialEq, + Eq, + Debug, + Encode, + Decode, + TypeInfo, + MaxEncodedLen, + Serialize, + Deserialize, )] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub struct LocalAssetId(pub u32); impl From for CurrencyId { @@ -107,9 +122,20 @@ impl TryFrom for LocalAssetId { } #[derive( - Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Debug, Encode, Decode, TypeInfo, MaxEncodedLen, + Clone, + Copy, + PartialOrd, + Ord, + PartialEq, + Eq, + Debug, + Encode, + Decode, + TypeInfo, + MaxEncodedLen, + Serialize, + Deserialize, )] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub enum StakingCurrency { /// An emulated internal, non-transferable currency /// Its issuance and holding is handled inherently @@ -211,9 +237,20 @@ where /// enables us to use the `TrancheCurrency` type separately where solely this /// enum variant would be relevant. Most notably, in the `struct Tranche`. #[derive( - Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Debug, Encode, Decode, TypeInfo, MaxEncodedLen, + Clone, + Copy, + PartialOrd, + Ord, + PartialEq, + Eq, + Debug, + Encode, + Decode, + TypeInfo, + MaxEncodedLen, + Serialize, + Deserialize, )] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub struct TrancheCurrency { pub pool_id: PoolId, pub tranche_id: TrancheId, @@ -244,8 +281,9 @@ impl TrancheCurrencyT for TrancheCurrency { /// A type describing our custom additional metadata stored in the /// OrmlAssetRegistry. -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] #[derive( + Serialize, + Deserialize, Clone, Copy, Default, @@ -303,8 +341,9 @@ pub struct CustomMetadata { Decode, TypeInfo, MaxEncodedLen, + Serialize, + Deserialize, )] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub enum CrossChainTransferability { /// The asset is not transferable cross-chain #[default] @@ -333,9 +372,20 @@ impl CrossChainTransferability { /// therefore we only support EVM tokens. In the far future, we might support /// wrapped tokens from other chains such as Cosmos based ones. #[derive( - Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Debug, Encode, Decode, TypeInfo, MaxEncodedLen, + Clone, + Copy, + PartialOrd, + Ord, + PartialEq, + Eq, + Debug, + Encode, + Decode, + TypeInfo, + MaxEncodedLen, + Serialize, + Deserialize, )] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub enum LiquidityPoolsWrappedToken { /// An EVM-native token EVM { @@ -438,8 +488,6 @@ pub mod before { } pub mod usdc { - use sp_std::vec::Vec; - use super::*; pub const MIN_SWAP_ORDER_AMOUNT: Balance = 10_000_000; @@ -475,43 +523,6 @@ pub mod usdc { hex_literal::hex!("af88d065e77c8cC2239327C5EDb3A432268e5831"); pub const CONTRACT_CELO: [u8; 20] = hex_literal::hex!("37f750B7cC259A2f741AF45294f6a16572CF5cAd"); - - /// The metadata generator for the LP wrapped USDC currencies - // TODO(future): If no further LP wrapped USDC variants are expected, move this - // to `chain_spec.rs`. - pub fn lp_wrapped_usdc_metadata( - name: Vec, - symbol: Vec, - pallet_index: PalletIndex, - chain_id: EVMChainId, - contract_address_usdc: [u8; 20], - pool_currency: bool, - ) -> AssetMetadata { - AssetMetadata { - decimals: DECIMALS, - name, - symbol, - existential_deposit: EXISTENTIAL_DEPOSIT, - location: Some(VersionedMultiLocation::V3(MultiLocation { - parents: 0, - interior: xcm::v3::Junctions::X3( - PalletInstance(pallet_index), - GlobalConsensus(NetworkId::Ethereum { chain_id }), - AccountKey20 { - network: None, - key: contract_address_usdc, - }, - ), - })), - additional: CustomMetadata { - transferability: CrossChainTransferability::LiquidityPools, - mintable: false, - permissioned: false, - pool_currency, - local_representation: Some(LOCAL_ASSET_ID), - }, - } - } } #[cfg(test)] diff --git a/libs/types/src/xcm.rs b/libs/types/src/xcm.rs index 9c425073c7..168419c547 100644 --- a/libs/types/src/xcm.rs +++ b/libs/types/src/xcm.rs @@ -13,11 +13,11 @@ use cfg_primitives::Balance; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; -#[cfg(feature = "std")] use serde::{Deserialize, Serialize}; -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] #[derive( + Serialize, + Deserialize, Clone, Copy, Default, @@ -36,24 +36,3 @@ pub struct XcmMetadata { /// When `None`, the `default_per_second` will be used instead. pub fee_per_second: Option, } - -pub mod consts { - use frame_support::parameter_types; - - use super::*; - - // Pools-related constants - pub mod pools { - use super::*; - - parameter_types! { - /// The max length in bytes allowed for a tranche token name - #[derive(TypeInfo, Eq, PartialEq, Debug, Clone, Copy )] - pub const MaxTrancheNameLengthBytes: u32 = 128; - - /// The max length in bytes allowed for a tranche token symbol - #[derive(TypeInfo, Eq, PartialEq, Debug, Clone, Copy )] - pub const MaxTrancheSymbolLengthBytes: u32 = 32; - } - } -} diff --git a/libs/utils/src/lib.rs b/libs/utils/src/lib.rs index 6986b37723..fc57032ca1 100644 --- a/libs/utils/src/lib.rs +++ b/libs/utils/src/lib.rs @@ -58,8 +58,10 @@ pub fn decode(input: &mut I) -> Result(block_number: T::BlockNumber, timestamp: T::Moment) -where +pub fn set_block_number_timestamp( + block_number: frame_system::pallet_prelude::BlockNumberFor, + timestamp: T::Moment, +) where T: pallet_aura::Config + frame_system::Config + pallet_timestamp::Config, { use frame_support::traits::Hooks; diff --git a/node/Cargo.toml b/node/Cargo.toml index e5556e797f..4a7166951d 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -40,6 +40,7 @@ sc-chain-spec = { workspace = true, default-features = true } sc-cli = { workspace = true, default-features = true, features = ["rocksdb"] } sc-client-api = { workspace = true, default-features = true } sc-consensus = { workspace = true, default-features = true } +sc-consensus-aura = { workspace = true, default-features = true } sc-consensus-grandpa = { workspace = true, default-features = true } sc-executor = { workspace = true, default-features = true } sc-network = { workspace = true, default-features = true } @@ -58,6 +59,7 @@ sp-blockchain = { workspace = true, default-features = true } sp-consensus = { workspace = true, default-features = true } sp-consensus-aura = { workspace = true, default-features = true } sp-core = { workspace = true, default-features = true } +sp-inherents = { workspace = true, default-features = true } sp-io = { workspace = true, default-features = true } sp-keystore = { workspace = true, default-features = true } sp-offchain = { workspace = true, default-features = true } @@ -69,13 +71,15 @@ substrate-frame-rpc-system = { workspace = true, default-features = true } substrate-prometheus-endpoint = { workspace = true, default-features = true } # Cli specific +frame-benchmarking = { workspace = true, default-features = true } frame-benchmarking-cli = { workspace = true, default-features = true, features = ["rocksdb"] } -try-runtime-cli = { workspace = true, default-features = true, optional = true } # Cumulus cumulus-client-cli = { workspace = true, default-features = true } +cumulus-client-collator = { workspace = true, default-features = true } cumulus-client-consensus-aura = { workspace = true, default-features = true } cumulus-client-consensus-common = { workspace = true, default-features = true } +cumulus-client-consensus-proposer = { workspace = true, default-features = true } cumulus-client-network = { workspace = true, default-features = true } cumulus-client-service = { workspace = true, default-features = true } cumulus-pallet-session-benchmarking = { workspace = true, default-features = true } @@ -88,7 +92,7 @@ cumulus-relay-chain-interface = { workspace = true, default-features = true } polkadot-cli = { workspace = true, default-features = true } polkadot-primitives = { workspace = true, default-features = true } polkadot-service = { workspace = true, default-features = true } -xcm = { workspace = true, default-features = true } +staging-xcm = { workspace = true, default-features = true } # Local altair-runtime = { workspace = true, default-features = true } @@ -101,10 +105,6 @@ pallet-anchors = { workspace = true, default-features = true } pallet-pool-system = { workspace = true, default-features = true } runtime-common = { workspace = true, default-features = true } -# benchmarking -frame-benchmarking = { workspace = true, default-features = true, optional = true } -frame-system-benchmarking = { workspace = true, default-features = true, optional = true } - # frontier fc-consensus = { workspace = true, default-features = true } fc-db = { workspace = true, default-features = true, features = ["rocksdb"] } @@ -112,6 +112,7 @@ fc-mapping-sync = { workspace = true, default-features = true } fc-rpc = { workspace = true, default-features = true } fc-rpc-core = { workspace = true, default-features = true } fp-consensus = { workspace = true, default-features = true } +fp-dynamic-fee = { workspace = true, default-features = true } fp-evm = { workspace = true, default-features = true } fp-rpc = { workspace = true, default-features = true } fp-storage = { workspace = true, default-features = true } @@ -123,7 +124,7 @@ substrate-build-script-utils = { workspace = true, default-features = true } vergen = { workspace = true, default-features = true } [features] -default = ["cli"] +default = [] runtime-benchmarks = [ "altair-runtime/runtime-benchmarks", "centrifuge-runtime/runtime-benchmarks", @@ -134,7 +135,6 @@ runtime-benchmarks = [ "development-runtime/runtime-benchmarks", "frame-benchmarking-cli/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", - "frame-system-benchmarking/runtime-benchmarks", "pallet-anchors/runtime-benchmarks", "pallet-ethereum/runtime-benchmarks", "pallet-evm/runtime-benchmarks", @@ -161,10 +161,6 @@ try-runtime = [ "polkadot-service/try-runtime", "runtime-common/try-runtime", "sp-runtime/try-runtime", - "try-runtime-cli", -] -cli = [ - "try-runtime-cli", ] fast-runtime = [ "altair-runtime/fast-runtime", diff --git a/node/src/chain_spec.rs b/node/src/chain_spec.rs index b5e46ea2b5..edcf584c96 100644 --- a/node/src/chain_spec.rs +++ b/node/src/chain_spec.rs @@ -31,13 +31,7 @@ use cfg_primitives::{ }; use cfg_types::{ fee_keys::FeeKey, - tokens::{ - usdc::{ - lp_wrapped_usdc_metadata, CHAIN_ID_ETH_GOERLI_TESTNET, CONTRACT_ETH_GOERLI, - CURRENCY_ID_LOCAL, CURRENCY_ID_LP_ETH_GOERLI, - }, - AssetMetadata, CrossChainTransferability, CurrencyId, CustomMetadata, - }, + tokens::{usdc, AssetMetadata, CrossChainTransferability, CurrencyId, CustomMetadata}, }; use cfg_utils::vec_to_fixed_array; use cumulus_primitives_core::ParaId; @@ -51,17 +45,20 @@ use sp_runtime::{ traits::{IdentifyAccount, Verify}, FixedPointNumber, }; -use xcm::{ - latest::MultiLocation, - prelude::{GeneralIndex, GeneralKey, PalletInstance, Parachain, X2, X3}, +use staging_xcm::{ + latest::{MultiLocation, NetworkId}, + prelude::{ + AccountKey20, GeneralIndex, GeneralKey, GlobalConsensus, PalletInstance, Parachain, X2, X3, + }, }; /// Specialized `ChainSpec` instances for our runtimes. -pub type AltairChainSpec = sc_service::GenericChainSpec; +pub type AltairChainSpec = + sc_service::GenericChainSpec; pub type CentrifugeChainSpec = - sc_service::GenericChainSpec; + sc_service::GenericChainSpec; pub type DevelopmentChainSpec = - sc_service::GenericChainSpec; + sc_service::GenericChainSpec; use altair_runtime::AltairPrecompiles; use centrifuge_runtime::CentrifugePrecompiles; @@ -144,47 +141,6 @@ pub fn centrifuge_config() -> CentrifugeChainSpec { .unwrap() } -pub fn centrifuge_dev(para_id: ParaId) -> CentrifugeChainSpec { - let mut properties = Properties::new(); - properties.insert("tokenSymbol".into(), "DCFG".into()); - properties.insert("tokenDecimals".into(), currency_decimals::NATIVE.into()); - - CentrifugeChainSpec::from_genesis( - "Centrifuge Dev", - "centrifuge_dev", - ChainType::Live, - move || { - centrifuge_genesis( - vec![ - ( - get_account_id_from_seed::("Alice"), - get_from_seed::("Alice"), - ), - ( - get_account_id_from_seed::("Bob"), - get_from_seed::("Bob"), - ), - ( - get_account_id_from_seed::("Charlie"), - get_from_seed::("Charlie"), - ), - ], - endowed_accounts(), - endowed_evm_accounts(), - Some(100000000 * CFG), - para_id, - council_members_bootstrap(), - ) - }, - vec![], - None, - None, - None, - Some(properties), - development_extensions(para_id.into()), - ) -} - pub fn centrifuge_local(para_id: ParaId) -> CentrifugeChainSpec { let mut properties = Properties::new(); properties.insert("tokenSymbol".into(), "DCFG".into()); @@ -221,37 +177,6 @@ pub fn catalyst_config() -> CentrifugeChainSpec { .unwrap() } -pub fn catalyst_local(para_id: ParaId) -> CentrifugeChainSpec { - let mut properties = Properties::new(); - properties.insert("tokenSymbol".into(), "NCFG".into()); - properties.insert("tokenDecimals".into(), currency_decimals::NATIVE.into()); - - CentrifugeChainSpec::from_genesis( - "Catalyst Local", - "catalyst_local", - ChainType::Local, - move || { - centrifuge_genesis( - vec![( - get_account_id_from_seed::("Alice"), - get_from_seed::("Alice"), - )], - endowed_accounts(), - endowed_evm_accounts(), - Some(10000000 * CFG), - para_id, - Default::default(), - ) - }, - vec![], - None, - None, - None, - Some(properties), - development_extensions(para_id.into()), - ) -} - pub fn altair_config() -> AltairChainSpec { AltairChainSpec::from_json_bytes( &include_bytes!("../res/genesis/altair-genesis-spec-raw.json")[..], @@ -259,47 +184,6 @@ pub fn altair_config() -> AltairChainSpec { .unwrap() } -pub fn altair_dev(para_id: ParaId) -> AltairChainSpec { - let mut properties = Properties::new(); - properties.insert("tokenSymbol".into(), "DAIR".into()); - properties.insert("tokenDecimals".into(), currency_decimals::NATIVE.into()); - - AltairChainSpec::from_genesis( - "Altair Dev", - "altair_dev", - ChainType::Live, - move || { - altair_genesis( - vec![ - ( - get_account_id_from_seed::("Alice"), - get_from_seed::("Alice"), - ), - ( - get_account_id_from_seed::("Bob"), - get_from_seed::("Bob"), - ), - ( - get_account_id_from_seed::("Charlie"), - get_from_seed::("Charlie"), - ), - ], - endowed_accounts(), - endowed_evm_accounts(), - Some(100000000 * AIR), - para_id, - council_members_bootstrap(), - ) - }, - vec![], - None, - None, - None, - Some(properties), - development_extensions(para_id.into()), - ) -} - pub fn altair_local(para_id: ParaId) -> AltairChainSpec { let mut properties = Properties::new(); properties.insert("tokenSymbol".into(), "DAIR".into()); @@ -331,76 +215,6 @@ pub fn altair_local(para_id: ParaId) -> AltairChainSpec { ) } -pub fn antares_config() -> AltairChainSpec { - AltairChainSpec::from_json_bytes(&include_bytes!("../res/antares-spec-raw.json")[..]).unwrap() -} - -pub fn antares_local(para_id: ParaId) -> AltairChainSpec { - let mut properties = Properties::new(); - properties.insert("tokenSymbol".into(), "NAIR".into()); - properties.insert("tokenDecimals".into(), currency_decimals::NATIVE.into()); - - AltairChainSpec::from_genesis( - "Antares Local", - "antares_local", - ChainType::Local, - move || { - altair_genesis( - vec![( - get_account_id_from_seed::("Alice"), - get_from_seed::("Alice"), - )], - endowed_accounts(), - endowed_evm_accounts(), - Some(10000000 * AIR), - para_id, - Default::default(), - ) - }, - vec![], - None, - None, - None, - Some(properties), - development_extensions(para_id.into()), - ) -} - -pub fn charcoal_config() -> AltairChainSpec { - AltairChainSpec::from_json_bytes(&include_bytes!("../res/charcoal-spec-raw.json")[..]).unwrap() -} - -pub fn charcoal_local(para_id: ParaId) -> AltairChainSpec { - let mut properties = Properties::new(); - properties.insert("tokenSymbol".into(), "CAIR".into()); - properties.insert("tokenDecimals".into(), currency_decimals::NATIVE.into()); - - AltairChainSpec::from_genesis( - "Charcoal Local", - "charcoal_local", - ChainType::Local, - move || { - altair_genesis( - vec![( - get_account_id_from_seed::("Alice"), - get_from_seed::("Alice"), - )], - endowed_accounts(), - endowed_evm_accounts(), - Some(10000000 * AIR), - para_id, - Default::default(), - ) - }, - vec![], - None, - None, - None, - Some(properties), - development_extensions(para_id.into()), - ) -} - pub fn demo(para_id: ParaId) -> DevelopmentChainSpec { let mut properties = Properties::new(); properties.insert("tokenSymbol".into(), "DEMO".into()); @@ -467,37 +281,6 @@ pub fn development(para_id: ParaId) -> DevelopmentChainSpec { ) } -pub fn development_local(para_id: ParaId) -> DevelopmentChainSpec { - let mut properties = Properties::new(); - properties.insert("tokenSymbol".into(), "DEVEL".into()); - properties.insert("tokenDecimals".into(), currency_decimals::NATIVE.into()); - - DevelopmentChainSpec::from_genesis( - "Dev Local", - "devel_local", - ChainType::Local, - move || { - development_genesis( - get_account_id_from_seed::("Alice"), - vec![( - get_account_id_from_seed::("Alice"), - get_from_seed::("Alice"), - )], - endowed_accounts(), - endowed_evm_accounts(), - Some(10000000 * CFG), - para_id, - ) - }, - vec![], - None, - None, - None, - Some(properties), - development_extensions(para_id.into()), - ) -} - fn demo_endowed_accounts() -> Vec { vec![ //kANEUrMbi9xC16AfL5vSGwfvBVRoRdfWoQ8abPiXi5etFxpdP @@ -555,15 +338,12 @@ fn centrifuge_genesis( total_issuance: Option, id: ParaId, council_members: Vec, -) -> centrifuge_runtime::GenesisConfig { +) -> centrifuge_runtime::RuntimeGenesisConfig { let chain_id: u32 = id.into(); endowed_accounts.extend(endowed_evm_accounts.into_iter().map(|(addr, id)| { let chain_id = id.unwrap_or_else(|| chain_id.into()); - AccountConverter::< - centrifuge_runtime::Runtime, - centrifuge_runtime::xcm::LocationToAccountId, - >::convert_evm_address(chain_id, addr) + AccountConverter::convert_evm_address(chain_id, addr) })); let num_endowed_accounts = endowed_accounts.len(); @@ -581,11 +361,12 @@ fn centrifuge_genesis( None => vec![], }; - centrifuge_runtime::GenesisConfig { + centrifuge_runtime::RuntimeGenesisConfig { system: centrifuge_runtime::SystemConfig { code: centrifuge_runtime::WASM_BINARY .expect("WASM binary was not build, please build it!") .to_vec(), + ..Default::default() }, balances: centrifuge_runtime::BalancesConfig { balances }, orml_asset_registry: Default::default(), @@ -610,7 +391,10 @@ fn centrifuge_genesis( )], }, vesting: Default::default(), - parachain_info: centrifuge_runtime::ParachainInfoConfig { parachain_id: id }, + parachain_info: centrifuge_runtime::ParachainInfoConfig { + parachain_id: id, + ..Default::default() + }, collator_selection: centrifuge_runtime::CollatorSelectionConfig { invulnerables: initial_authorities .iter() @@ -672,14 +456,17 @@ fn centrifuge_genesis( base_fee: Default::default(), evm_chain_id: centrifuge_runtime::EVMChainIdConfig { chain_id: chain_id.into(), + ..Default::default() }, ethereum: Default::default(), evm: centrifuge_runtime::EVMConfig { accounts: precompile_account_genesis::(), + ..Default::default() }, liquidity_rewards_base: Default::default(), polkadot_xcm: centrifuge_runtime::PolkadotXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() }, } } @@ -691,15 +478,12 @@ fn altair_genesis( total_issuance: Option, id: ParaId, council_members: Vec, -) -> altair_runtime::GenesisConfig { +) -> altair_runtime::RuntimeGenesisConfig { let chain_id: u32 = id.into(); endowed_accounts.extend(endowed_evm_accounts.into_iter().map(|(addr, id)| { let chain_id = id.unwrap_or_else(|| chain_id.into()); - AccountConverter::< - altair_runtime::Runtime, - altair_runtime::xcm::LocationToAccountId, - >::convert_evm_address(chain_id, addr) + AccountConverter::convert_evm_address(chain_id, addr) })); let num_endowed_accounts = endowed_accounts.len(); @@ -717,11 +501,12 @@ fn altair_genesis( None => vec![], }; - altair_runtime::GenesisConfig { + altair_runtime::RuntimeGenesisConfig { system: altair_runtime::SystemConfig { code: altair_runtime::WASM_BINARY .expect("WASM binary was not build, please build it!") .to_vec(), + ..Default::default() }, balances: altair_runtime::BalancesConfig { balances }, orml_asset_registry: Default::default(), @@ -747,7 +532,10 @@ fn altair_genesis( )], }, vesting: Default::default(), - parachain_info: altair_runtime::ParachainInfoConfig { parachain_id: id }, + parachain_info: altair_runtime::ParachainInfoConfig { + parachain_id: id, + ..Default::default() + }, collator_selection: altair_runtime::CollatorSelectionConfig { invulnerables: initial_authorities .iter() @@ -790,14 +578,17 @@ fn altair_genesis( base_fee: Default::default(), evm_chain_id: altair_runtime::EVMChainIdConfig { chain_id: chain_id.into(), + ..Default::default() }, ethereum: Default::default(), - evm: centrifuge_runtime::EVMConfig { + evm: altair_runtime::EVMConfig { accounts: precompile_account_genesis::(), + ..Default::default() }, liquidity_rewards_base: Default::default(), polkadot_xcm: altair_runtime::PolkadotXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() }, } } @@ -813,15 +604,12 @@ fn development_genesis( endowed_evm_accounts: Vec<([u8; 20], Option)>, total_issuance: Option, id: ParaId, -) -> development_runtime::GenesisConfig { +) -> development_runtime::RuntimeGenesisConfig { let chain_id: u32 = id.into(); endowed_accounts.extend(endowed_evm_accounts.into_iter().map(|(addr, id)| { let chain_id = id.unwrap_or_else(|| chain_id.into()); - AccountConverter::< - development_runtime::Runtime, - development_runtime::xcm::LocationToAccountId, - >::convert_evm_address(chain_id, addr) + AccountConverter::convert_evm_address(chain_id, addr) })); let num_endowed_accounts = endowed_accounts.len(); @@ -859,11 +647,12 @@ fn development_genesis( }; let chain_id: u32 = id.into(); - development_runtime::GenesisConfig { + development_runtime::RuntimeGenesisConfig { system: development_runtime::SystemConfig { code: development_runtime::WASM_BINARY .expect("WASM binary was not build, please build it!") .to_vec(), + ..Default::default() }, balances: development_runtime::BalancesConfig { balances }, orml_asset_registry: development_runtime::OrmlAssetRegistryConfig { @@ -896,7 +685,10 @@ fn development_genesis( sudo: development_runtime::SudoConfig { key: Some(root_key), }, - parachain_info: development_runtime::ParachainInfoConfig { parachain_id: id }, + parachain_info: development_runtime::ParachainInfoConfig { + parachain_id: id, + ..Default::default() + }, collator_selection: development_runtime::CollatorSelectionConfig { invulnerables: initial_authorities .iter() @@ -957,15 +749,18 @@ fn development_genesis( base_fee: Default::default(), evm_chain_id: development_runtime::EVMChainIdConfig { chain_id: chain_id.into(), + ..Default::default() }, ethereum: Default::default(), - evm: centrifuge_runtime::EVMConfig { + evm: development_runtime::EVMConfig { accounts: precompile_account_genesis::(), + ..Default::default() }, block_rewards_base: Default::default(), liquidity_rewards_base: Default::default(), polkadot_xcm: development_runtime::PolkadotXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() }, } } @@ -974,12 +769,15 @@ fn asset_registry_assets() -> Vec<(CurrencyId, Vec)> { vec![ ( DEV_USDT_CURRENCY_ID, - AssetMetadata:: { + AssetMetadata { decimals: 6, - name: b"Tether USD".to_vec(), - symbol: b"USDT".to_vec(), + name: b"Tether USD" + .to_vec() + .try_into() + .expect("fit in the BoundedVec"), + symbol: b"USDT".to_vec().try_into().expect("fit in the BoundedVec"), existential_deposit: 0u128, - location: Some(xcm::VersionedMultiLocation::V3(MultiLocation { + location: Some(staging_xcm::VersionedMultiLocation::V3(MultiLocation { parents: 1, interior: X3( Parachain(parachains::rococo::rocksmine::ID), @@ -999,12 +797,15 @@ fn asset_registry_assets() -> Vec<(CurrencyId, Vec)> { ), ( DEV_AUSD_CURRENCY_ID, - AssetMetadata:: { + AssetMetadata { decimals: 12, - name: b"Acala USD".to_vec(), - symbol: b"AUSD".to_vec(), + name: b"Acala USD" + .to_vec() + .try_into() + .expect("fit in the BoundedVec"), + symbol: b"AUSD".to_vec().try_into().expect("fit in the BoundedVec"), existential_deposit: 0u128, - location: Some(xcm::VersionedMultiLocation::V3(MultiLocation { + location: Some(staging_xcm::VersionedMultiLocation::V3(MultiLocation { parents: 1, interior: X2( Parachain(parachains::rococo::acala::ID), @@ -1025,11 +826,17 @@ fn asset_registry_assets() -> Vec<(CurrencyId, Vec)> { .encode(), ), ( - CURRENCY_ID_LOCAL, - AssetMetadata:: { + usdc::CURRENCY_ID_LOCAL, + AssetMetadata { decimals: 6, - name: b"Local USDC".to_vec(), - symbol: b"localUSDC".to_vec(), + name: b"Local USDC" + .to_vec() + .try_into() + .expect("fit in the BoundedVec"), + symbol: b"localUSDC" + .to_vec() + .try_into() + .expect("fit in the BoundedVec"), existential_deposit: 0u128, location: None, additional: CustomMetadata { @@ -1043,15 +850,39 @@ fn asset_registry_assets() -> Vec<(CurrencyId, Vec)> { .encode(), ), ( - CURRENCY_ID_LP_ETH_GOERLI, - lp_wrapped_usdc_metadata( - "LP Ethereum Wrapped USDC".as_bytes().to_vec(), - "LpEthUSDC".as_bytes().to_vec(), - development_runtime::LiquidityPoolsPalletIndex::get(), - CHAIN_ID_ETH_GOERLI_TESTNET, - CONTRACT_ETH_GOERLI, - true, - ) + usdc::CURRENCY_ID_LP_ETH_GOERLI, + AssetMetadata { + decimals: usdc::DECIMALS, + name: b"LP Ethereum Wrapped USDC" + .to_vec() + .try_into() + .expect("fit in the BoundedVec"), + symbol: b"LpEthUSDC" + .to_vec() + .try_into() + .expect("fit in the BoundedVec"), + existential_deposit: usdc::EXISTENTIAL_DEPOSIT, + location: Some(staging_xcm::VersionedMultiLocation::V3(MultiLocation { + parents: 0, + interior: staging_xcm::v3::Junctions::X3( + PalletInstance(development_runtime::LiquidityPoolsPalletIndex::get()), + GlobalConsensus(NetworkId::Ethereum { + chain_id: usdc::CHAIN_ID_ETH_GOERLI_TESTNET, + }), + AccountKey20 { + network: None, + key: usdc::CONTRACT_ETH_GOERLI, + }, + ), + })), + additional: CustomMetadata { + transferability: CrossChainTransferability::LiquidityPools, + mintable: false, + permissioned: false, + pool_currency: true, + local_representation: Some(usdc::LOCAL_ASSET_ID), + }, + } .encode(), ), ] diff --git a/node/src/cli.rs b/node/src/cli.rs index ff55c53b3f..2e8249072e 100644 --- a/node/src/cli.rs +++ b/node/src/cli.rs @@ -24,12 +24,10 @@ use crate::{chain_spec, service::evm::EthConfiguration}; #[allow(clippy::large_enum_variant)] pub enum Subcommand { /// Export the genesis state of the parachain. - #[clap(name = "export-genesis-state")] - ExportGenesisState(ExportGenesisStateCommand), + ExportGenesisState(cumulus_client_cli::ExportGenesisStateCommand), /// Export the genesis wasm of the parachain. - #[clap(name = "export-genesis-wasm")] - ExportGenesisWasm(ExportGenesisWasmCommand), + ExportGenesisWasm(cumulus_client_cli::ExportGenesisWasmCommand), /// Build a chain specification. BuildSpec(sc_cli::BuildSpecCmd), @@ -56,47 +54,6 @@ pub enum Subcommand { /// The pallet benchmarking moved to the `pallet` sub-command. #[command(subcommand)] Benchmark(frame_benchmarking_cli::BenchmarkCmd), - - /// Try some experimental command on the runtime. This includes migration - /// and runtime-upgrade testing. - #[cfg(feature = "try-runtime")] - TryRuntime(try_runtime_cli::TryRuntimeCmd), -} - -/// Command for exporting the genesis state of the parachain -#[derive(Debug, Parser)] -pub struct ExportGenesisStateCommand { - /// Output file name or stdout if unspecified. - #[clap(value_parser)] - pub output: Option, - - /// Write output in binary. Default is to write in hex. - #[clap(short, long)] - pub raw: bool, - - /// Id of the parachain this state is for. - #[clap(long)] - pub parachain_id: Option, - - /// The name of the chain for that the genesis state should be exported. - #[clap(long)] - pub chain: Option, -} - -/// Command for exporting the genesis wasm file. -#[derive(Debug, Parser)] -pub struct ExportGenesisWasmCommand { - /// Output file name or stdout if unspecified. - #[clap(value_parser)] - pub output: Option, - - /// Write output in binary. Default is to write in hex. - #[clap(short, long)] - pub raw: bool, - - /// The name of the chain for that the genesis wasm file should be exported. - #[clap(long)] - pub chain: Option, } #[derive(Debug, Parser)] diff --git a/node/src/command.rs b/node/src/command.rs index 6f87c9887a..2e114a9f5d 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -14,31 +14,24 @@ // You should have received a copy of the GNU General Public License // along with Cumulus. If not, see . -use std::io::Write; - -use cfg_primitives::Block; -use cumulus_client_cli::generate_genesis_block; use cumulus_primitives_core::ParaId; use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE}; -use log::{info, warn}; -use parity_scale_codec::Encode; +use log::info; use sc_cli::{ ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams, - NetworkParams, Result, RuntimeVersion, SharedParams, SubstrateCli, + NetworkParams, Result, SharedParams, SubstrateCli, }; use sc_service::config::{BasePath, PrometheusConfig}; -use sp_core::hexdisplay::HexDisplay; -use sp_runtime::traits::{AccountIdConversion, Block as BlockT}; +use sp_runtime::traits::AccountIdConversion; use crate::{ chain_spec, cli::{Cli, RelayChainCli, Subcommand}, - service::{ - evm::new_partial, AltairRuntimeExecutor, CentrifugeRuntimeExecutor, - DevelopmentRuntimeExecutor, - }, + service::{evm, AltairRuntimeExecutor, CentrifugeRuntimeExecutor, DevelopmentRuntimeExecutor}, }; +pub const LOCAL_PARA_ID: ParaId = ParaId::new(2000u32); + enum ChainIdentity { Altair, Centrifuge, @@ -53,11 +46,7 @@ impl IdentifyChain for dyn sc_service::ChainSpec { fn identify(&self) -> ChainIdentity { if self.id().starts_with("centrifuge") || self.id().starts_with("catalyst") { ChainIdentity::Centrifuge - } else if self.id().starts_with("altair") - || self.id().starts_with("charcoal") - || self.id().starts_with("antares") - || self.id().starts_with("algol") - { + } else if self.id().starts_with("altair") { ChainIdentity::Altair } else { ChainIdentity::Development @@ -71,33 +60,15 @@ impl IdentifyChain for T { } } -#[cfg(feature = "try-runtime")] -use try_runtime_cli::block_building_info::substrate_info; -#[cfg(feature = "try-runtime")] -/// The time internavel for block production on our chain in milliseconds (12 -/// seconds to millis) -const BLOCK_TIME_MILLIS: u64 = 12 * 1_000; - -fn load_spec( - id: &str, - para_id: ParaId, -) -> std::result::Result, String> { +fn load_spec(id: &str) -> std::result::Result, String> { match id { "centrifuge" => Ok(Box::new(chain_spec::centrifuge_config())), - "centrifuge-dev" => Ok(Box::new(chain_spec::centrifuge_dev(para_id))), - "centrifuge-local" => Ok(Box::new(chain_spec::centrifuge_local(para_id))), + "centrifuge-local" => Ok(Box::new(chain_spec::centrifuge_local(LOCAL_PARA_ID))), "altair" => Ok(Box::new(chain_spec::altair_config())), - "altair-dev" => Ok(Box::new(chain_spec::altair_dev(para_id))), - "altair-local" => Ok(Box::new(chain_spec::altair_local(para_id))), + "altair-local" => Ok(Box::new(chain_spec::altair_local(LOCAL_PARA_ID))), "catalyst" => Ok(Box::new(chain_spec::catalyst_config())), - "catalyst-local" => Ok(Box::new(chain_spec::catalyst_local(para_id))), - "antares" => Ok(Box::new(chain_spec::antares_config())), - "antares-local" => Ok(Box::new(chain_spec::antares_local(para_id))), - "charcoal" => Ok(Box::new(chain_spec::charcoal_config())), - "charcoal-local" => Ok(Box::new(chain_spec::charcoal_local(para_id))), - "demo" => Ok(Box::new(chain_spec::demo(para_id))), - "development" => Ok(Box::new(chain_spec::development(para_id))), - "development-local" => Ok(Box::new(chain_spec::development_local(para_id))), + "demo" => Ok(Box::new(chain_spec::demo(LOCAL_PARA_ID))), + "development" => Ok(Box::new(chain_spec::development(LOCAL_PARA_ID))), "" => Err(String::from("No Chain-id provided")), path => { @@ -149,15 +120,7 @@ impl SubstrateCli for Cli { } fn load_spec(&self, id: &str) -> std::result::Result, String> { - load_spec(id, self.parachain_id.unwrap_or(10001).into()) - } - - fn native_runtime_version(spec: &Box) -> &'static RuntimeVersion { - match spec.identify() { - ChainIdentity::Altair => &altair_runtime::VERSION, - ChainIdentity::Centrifuge => ¢rifuge_runtime::VERSION, - ChainIdentity::Development => &development_runtime::VERSION, - } + load_spec(id) } } @@ -193,39 +156,6 @@ impl SubstrateCli for RelayChainCli { fn load_spec(&self, id: &str) -> std::result::Result, String> { polkadot_cli::Cli::from_iter([RelayChainCli::executable_name()].iter()).load_spec(id) } - - fn native_runtime_version(chain_spec: &Box) -> &'static RuntimeVersion { - polkadot_cli::Cli::native_runtime_version(chain_spec) - } -} - -fn extract_genesis_wasm(chain_spec: &dyn sc_service::ChainSpec) -> Result> { - let mut storage = chain_spec.build_storage()?; - - storage - .top - .remove(sp_core::storage::well_known_keys::CODE) - .ok_or_else(|| "Could not find wasm file in genesis state!".into()) -} - -#[cfg(feature = "try-runtime")] -macro_rules! with_runtime { - ($chain_spec:expr, { $( $code:tt )* }) => { - match $chain_spec.identify() { - ChainIdentity::Altair => { - use AltairRuntimeExecutor as Executor; - $( $code )* - } - ChainIdentity::Centrifuge => { - use CentrifugeRuntimeExecutor as Executor; - $( $code )* - } - ChainIdentity::Development => { - use DevelopmentRuntimeExecutor as Executor; - $( $code )* - } - } - } } macro_rules! construct_async_run { @@ -233,41 +163,36 @@ macro_rules! construct_async_run { let runner = $cli.create_runner($cmd)?; let first_evm_block = chain_spec::Extensions::try_get(&*runner.config().chain_spec) .map(|e| e.first_evm_block).unwrap_or(1); - match runner.config().chain_spec.identify() { - ChainIdentity::Altair => { - runner.async_run(|$config| { - let $components = new_partial::( - &$config, - first_evm_block, - crate::service::build_altair_import_queue, - )?; - let task_manager = $components.task_manager; - { $( $code )* }.map(|v| (v, task_manager)) - }) - } - ChainIdentity::Centrifuge => { - runner.async_run(|$config| { - let $components = new_partial::( - &$config, - first_evm_block, - crate::service::build_centrifuge_import_queue, - )?; - let task_manager = $components.task_manager; - { $( $code )* }.map(|v| (v, task_manager)) - }) - } - ChainIdentity::Development => { - runner.async_run(|$config| { - let $components = new_partial::( - &$config, - first_evm_block, - crate::service::build_development_import_queue, - )?; - let task_manager = $components.task_manager; - { $( $code )* }.map(|v| (v, task_manager)) - }) - } - } + + match runner.config().chain_spec.identify() { + ChainIdentity::Altair => runner.async_run(|$config| { + let $components = evm::new_partial::( + &$config, + first_evm_block, + crate::service::build_altair_import_queue, + )?; + let task_manager = $components.task_manager; + { $( $code )* }.map(|v| (v, task_manager)) + }), + ChainIdentity::Centrifuge => runner.async_run(|$config| { + let $components = evm::new_partial::( + &$config, + first_evm_block, + crate::service::build_centrifuge_import_queue, + )?; + let task_manager = $components.task_manager; + { $( $code )* }.map(|v| (v, task_manager)) + }), + ChainIdentity::Development => runner.async_run(|$config| { + let $components = evm::new_partial::( + &$config, + first_evm_block, + crate::service::build_development_import_queue, + )?; + let task_manager = $components.task_manager; + { $( $code )* }.map(|v| (v, task_manager)) + }) + } }} } @@ -328,84 +253,18 @@ pub fn run() -> Result<()> { }); Ok(cmd.run(components.client, components.backend, Some(aux_revert))) }), - Some(Subcommand::ExportGenesisState(params)) => { - let mut builder = sc_cli::LoggerBuilder::new(""); - builder.with_profiling(sc_tracing::TracingReceiver::Log, ""); - let _ = builder.init(); - - let chain_spec = &load_spec( - ¶ms.chain.clone().unwrap_or_default(), - params.parachain_id.unwrap_or(10001).into(), - )?; - - let state_version = Cli::native_runtime_version(chain_spec).state_version(); - let block: Block = generate_genesis_block(&**chain_spec, state_version)?; - - let raw_header = block.header().encode(); - let output_buf = if params.raw { - raw_header - } else { - format!("0x{:?}", HexDisplay::from(&block.header().encode())).into_bytes() - }; - - if let Some(output) = ¶ms.output { - std::fs::write(output, output_buf)?; - } else { - std::io::stdout().write_all(&output_buf)?; - } - - Ok(()) - } - Some(Subcommand::ExportGenesisWasm(params)) => { - let mut builder = sc_cli::LoggerBuilder::new(""); - builder.with_profiling(sc_tracing::TracingReceiver::Log, ""); - let _ = builder.init(); - - let raw_wasm_blob = extract_genesis_wasm( - cli.load_spec(¶ms.chain.clone().unwrap_or_default())? - .as_ref(), - )?; - let output_buf = if params.raw { - raw_wasm_blob - } else { - format!("0x{:?}", HexDisplay::from(&raw_wasm_blob)).into_bytes() - }; - - if let Some(output) = ¶ms.output { - std::fs::write(output, output_buf)?; - } else { - std::io::stdout().write_all(&output_buf)?; - } - - Ok(()) + Some(Subcommand::ExportGenesisState(cmd)) => { + construct_async_run!(|components, cli, cmd, config| { + Ok(async move { cmd.run(&*config.chain_spec, &*components.client) }) + }) } - - #[cfg(feature = "try-runtime")] - Some(Subcommand::TryRuntime(cmd)) => { - use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch}; - + Some(Subcommand::ExportGenesisWasm(cmd)) => { let runner = cli.create_runner(cmd)?; - let chain_spec = &runner.config().chain_spec; - - with_runtime!(chain_spec, { - runner.async_run(|config| { - let registry = config.prometheus_config.as_ref().map(|cfg| &cfg.registry); - let task_manager = - sc_service::TaskManager::new(config.tokio_handle.clone(), registry) - .map_err(|e| { - sc_cli::Error::Service(sc_service::Error::Prometheus(e)) - })?; - Ok(( - cmd.run::::ExtendHostFunctions, - >, _>(Some(substrate_info(BLOCK_TIME_MILLIS))), - task_manager, - )) - }) + runner.sync_run(|_config| { + let spec = cli.load_spec(&cmd.shared_params.chain.clone().unwrap_or_default())?; + cmd.run(&*spec) }) } - Some(Subcommand::Benchmark(cmd)) => { if cfg!(feature = "runtime-benchmarks") { let runner = cli.create_runner(cmd)?; @@ -413,17 +272,13 @@ pub fn run() -> Result<()> { // Handle the exact benchmark sub-command accordingly match cmd { BenchmarkCmd::Pallet(cmd) => match runner.config().chain_spec.identify() { - ChainIdentity::Altair => runner.sync_run(|config| { - cmd.run::(config) - }), - ChainIdentity::Centrifuge => runner.sync_run(|config| { - cmd.run::(config) - }), - ChainIdentity::Development => runner.sync_run(|config| { - cmd.run::( - config, - ) - }), + ChainIdentity::Altair => { + runner.sync_run(|config| cmd.run::(config)) + } + ChainIdentity::Centrifuge => runner + .sync_run(|config| cmd.run::(config)), + ChainIdentity::Development => runner + .sync_run(|config| cmd.run::(config)), }, BenchmarkCmd::Block(_) | BenchmarkCmd::Storage(_) @@ -443,11 +298,12 @@ pub fn run() -> Result<()> { let collator_options = cli.run.collator_options(); runner.run_node_until_exit(|config| async move { - let hwbench = (!cli.no_hardware_benchmarks).then_some( - config.database.path().map(|database_path| { + let hwbench = (!cli.no_hardware_benchmarks) + .then_some(config.database.path().map(|database_path| { let _ = std::fs::create_dir_all(database_path); sc_sysinfo::gather_hwbench(Some(database_path)) - })).flatten(); + })) + .flatten(); let polkadot_cli = RelayChainCli::new( &config, [RelayChainCli::executable_name()] @@ -456,19 +312,21 @@ pub fn run() -> Result<()> { ); let para_id = chain_spec::Extensions::try_get(&*config.chain_spec) - .map(|e| e.para_id).unwrap_or_else(|| cli.parachain_id.expect("Could not find parachain ID in chain spec or CLI.")); + .map(|e| e.para_id) + .unwrap_or_else(|| { + cli.parachain_id + .expect("Could not find parachain ID in chain spec or CLI.") + }); let first_evm_block = chain_spec::Extensions::try_get(&*config.chain_spec) - .map(|e| e.first_evm_block).unwrap_or(1); + .map(|e| e.first_evm_block) + .unwrap_or(1); let id = ParaId::from(para_id); let parachain_account = - AccountIdConversion::::into_account_truncating(&id); - - let state_version = Cli::native_runtime_version(&config.chain_spec).state_version(); - let block: Block = generate_genesis_block(&*config.chain_spec, state_version) - .map_err(|e| format!("{e:?}"))?; - let genesis_state = format!("0x{:?}", HexDisplay::from(&block.header().encode())); + AccountIdConversion::::into_account_truncating( + &id, + ); let task_executor = config.tokio_handle.clone(); let polkadot_config = @@ -484,7 +342,6 @@ pub fn run() -> Result<()> { info!("Parachain spec: {:?}", cli.run.base.shared_params.chain); info!("Parachain id: {:?}", id); info!("Parachain Account: {}", parachain_account); - info!("Parachain genesis state: {}", genesis_state); info!( "Is collating: {}", if config.role.is_authority() { @@ -494,15 +351,11 @@ pub fn run() -> Result<()> { } ); - if !collator_options.relay_chain_rpc_urls.is_empty() && !cli.relaychain_args.is_empty() { - warn!("Detected relay chain node arguments together with --relay-chain-rpc-urls. This command starts a minimal Polkadot node that only uses a network-related subset of all relay chain CLI options."); - } - match config.chain_spec.identify() { ChainIdentity::Altair => crate::service::start_altair_node( config, polkadot_config, - cli.eth, + cli.eth, collator_options, id, hwbench, @@ -514,7 +367,7 @@ pub fn run() -> Result<()> { ChainIdentity::Centrifuge => crate::service::start_centrifuge_node( config, polkadot_config, - cli.eth, + cli.eth, collator_options, id, hwbench, @@ -526,7 +379,7 @@ pub fn run() -> Result<()> { ChainIdentity::Development => crate::service::start_development_node( config, polkadot_config, - cli.eth, + cli.eth, collator_options, id, hwbench, diff --git a/node/src/rpc/evm.rs b/node/src/rpc/evm.rs index 77927dcf05..e95886d3c1 100644 --- a/node/src/rpc/evm.rs +++ b/node/src/rpc/evm.rs @@ -12,6 +12,7 @@ use std::{collections::BTreeMap, sync::Arc}; +use fc_rpc::pending::AuraConsensusDataProvider; pub use fc_rpc::{ EthBlockDataCacheTask, OverrideHandle, RuntimeApiStorageOverride, SchemaV1Override, SchemaV2Override, SchemaV3Override, StorageOverride, @@ -23,6 +24,7 @@ use jsonrpsee::RpcModule; use sc_client_api::{ backend::{AuxStore, Backend, StateBackend, StorageProvider}, client::BlockchainEvents, + UsageProvider, }; use sc_network::NetworkService; use sc_network_sync::SyncingService; @@ -32,11 +34,13 @@ use sc_transaction_pool_api::TransactionPool; use sp_api::{CallApiAt, ProvideRuntimeApi}; use sp_block_builder::BlockBuilder as BlockBuilderApi; use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; +use sp_consensus_aura::{sr25519::AuthorityId as AuraId, AuraApi}; use sp_core::H256; +use sp_inherents::CreateInherentDataProviders; use sp_runtime::traits::{BlakeTwo256, Block as BlockT}; /// Extra dependencies for Ethereum compatibility. -pub struct Deps { +pub struct Deps { /// The client instance to use. pub client: Arc, /// Transaction pool instance. @@ -60,7 +64,7 @@ pub struct Deps { /// Cache for Ethereum block data. pub block_data_cache: Arc>, /// EthFilterApi pool. - pub filter_pool: FilterPool, + pub filter_pool: Option, /// Maximum number of logs in a query. pub max_past_logs: u32, /// Fee history cache. @@ -72,30 +76,8 @@ pub struct Deps { pub execute_gas_limit_multiplier: u64, /// Mandated parent hashes for a given block hash. pub forced_parent_hashes: Option>, -} - -impl Clone for Deps { - fn clone(&self) -> Self { - Self { - client: self.client.clone(), - pool: self.pool.clone(), - graph: self.graph.clone(), - converter: self.converter.clone(), - is_authority: self.is_authority, - enable_dev_signer: self.enable_dev_signer, - network: self.network.clone(), - sync: self.sync.clone(), - frontier_backend: self.frontier_backend.clone(), - overrides: self.overrides.clone(), - block_data_cache: self.block_data_cache.clone(), - filter_pool: self.filter_pool.clone(), - max_past_logs: self.max_past_logs, - fee_history_cache: self.fee_history_cache.clone(), - fee_history_cache_limit: self.fee_history_cache_limit, - execute_gas_limit_multiplier: self.execute_gas_limit_multiplier, - forced_parent_hashes: self.forced_parent_hashes.clone(), - } - } + /// Something that can create the inherent data providers for pending state + pub pending_create_inherent_data_providers: CIDP, } pub fn overrides_handle, C, BE>(client: Arc) -> Arc> @@ -129,9 +111,9 @@ where }) } -pub fn create( +pub fn create( mut io: RpcModule<()>, - deps: Deps, + deps: Deps, subscription_task_executor: SubscriptionTaskExecutor, pubsub_notification_sinks: Arc< fc_mapping_sync::EthereumBlockNotificationSinks< @@ -141,16 +123,26 @@ pub fn create( ) -> Result, Box> where B: BlockT, - C: ProvideRuntimeApi, - C::Api: BlockBuilderApi + EthereumRuntimeRPCApi + ConvertTransactionRuntimeApi, - C: BlockchainEvents + 'static, - C: HeaderBackend + HeaderMetadata + StorageProvider, - C: CallApiAt, + C: ProvideRuntimeApi + + BlockchainEvents + + 'static + + HeaderBackend + + HeaderMetadata + + StorageProvider + + CallApiAt + + AuxStore + + UsageProvider + + StorageProvider, + C::Api: BlockBuilderApi + + EthereumRuntimeRPCApi + + ConvertTransactionRuntimeApi + + AuraApi, BE: Backend + 'static, BE::State: StateBackend, P: TransactionPool + 'static, A: ChainApi + 'static, CT: ConvertTransaction<::Extrinsic> + Send + Sync + 'static, + CIDP: CreateInherentDataProviders + Send + 'static, { use fc_rpc::{ Eth, EthApiServer, EthDevSigner, EthFilter, EthFilterApiServer, EthPubSub, @@ -175,6 +167,7 @@ where fee_history_cache_limit, execute_gas_limit_multiplier, forced_parent_hashes, + pending_create_inherent_data_providers, } = deps; let mut signers = Vec::new(); @@ -209,31 +202,35 @@ where fee_history_cache_limit, execute_gas_limit_multiplier, forced_parent_hashes, + pending_create_inherent_data_providers, + Some(Box::new(AuraConsensusDataProvider::new(client.clone()))), ) .into_rpc(), )?; - io.merge( - EthFilter::new( - client.clone(), - frontier_backend.clone(), - fc_rpc::TxPool::new(client.clone(), graph.clone()), - filter_pool, - 500_usize, - max_past_logs, - block_data_cache, - ) - .into_rpc(), - )?; + if let Some(filter_pool) = filter_pool { + io.merge( + EthFilter::new( + client.clone(), + frontier_backend.clone(), + graph.clone(), + filter_pool, + 500_usize, + max_past_logs, + block_data_cache, + ) + .into_rpc(), + )?; + } io.merge( EthPubSub::new( pool, - Arc::clone(&client), - Arc::clone(&sync), + client.clone(), + sync, subscription_task_executor, overrides, - pubsub_notification_sinks.clone(), + pubsub_notification_sinks, ) .into_rpc(), )?; diff --git a/node/src/rpc/mod.rs b/node/src/rpc/mod.rs index cf7f5f2210..9c05615cce 100644 --- a/node/src/rpc/mod.rs +++ b/node/src/rpc/mod.rs @@ -14,7 +14,7 @@ use std::{fmt::Debug, sync::Arc}; -use cfg_primitives::{AccountId, Balance, Index}; +use cfg_primitives::{AccountId, Balance, Nonce}; use jsonrpsee::{ core::Error as JsonRpseeError, types::error::{CallError, ErrorCode, ErrorObject}, @@ -46,7 +46,7 @@ where C: ProvideRuntimeApi, C: HeaderBackend + HeaderMetadata, C: Send + Sync + 'static, - C::Api: substrate_frame_rpc_system::AccountNonceApi, + C::Api: substrate_frame_rpc_system::AccountNonceApi, C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, C::Api: BlockBuilder, P: TransactionPool + Sync + Send + 'static, diff --git a/node/src/service.rs b/node/src/service.rs index ffe5190810..21e89f2c88 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -14,6 +14,9 @@ // You should have received a copy of the GNU General Public License // along with Cumulus. If not, see . +// TODO: Please fix deprecated issues before/during polkadot-v1.3.0 upgrade +#![allow(deprecated)] + use std::sync::Arc; use cfg_primitives::{Block, BlockNumber}; @@ -25,6 +28,7 @@ use fc_db::Backend as FrontierBackend; use sc_executor::NativeElseWasmExecutor; use sc_service::{Configuration, TFullBackend, TFullClient, TaskManager}; use sc_telemetry::TelemetryHandle; +use sp_core::U256; use crate::rpc::{ self, @@ -117,13 +121,7 @@ pub fn build_altair_import_queue( task_manager: &TaskManager, frontier_backend: FrontierBackend, first_evm_block: BlockNumber, -) -> Result< - sc_consensus::DefaultImportQueue< - Block, - FullClient, - >, - sc_service::Error, -> { +) -> Result, sc_service::Error> { let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; let block_import = evm::BlockImport::new( block_import, @@ -174,6 +172,7 @@ pub async fn start_altair_node( Arc>, )> { let is_authority = parachain_config.role.is_authority(); + evm::start_node_impl::( parachain_config, polkadot_config, @@ -193,6 +192,22 @@ pub async fn start_altair_node( fee_history_cache, overrides, block_data_cache| { + + let slot_duration = sc_consensus_aura::slot_duration(&*client)?; + let target_gas_price = eth_config.target_gas_price; + let pending_create_inherent_data_providers = move |_, ()| async move { + let current = sp_timestamp::InherentDataProvider::from_system_time(); + let next_slot = current.timestamp().as_millis() + slot_duration.as_millis(); + let timestamp = sp_timestamp::InherentDataProvider::new(next_slot.into()); + let slot = + sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( + *timestamp, + slot_duration, + ); + let dynamic_fee = fp_dynamic_fee::InherentDataProvider(U256::from(target_gas_price)); + Ok((slot, timestamp, dynamic_fee)) + }; + let mut module = rpc::create_full(client.clone(), pool.clone(), deny_unsafe)?; module .merge(Anchors::new(client.clone()).into_rpc()) @@ -216,12 +231,13 @@ pub async fn start_altair_node( }, overrides, block_data_cache, - filter_pool, + filter_pool: Some(filter_pool), max_past_logs: eth_config.max_past_logs, fee_history_cache, fee_history_cache_limit: eth_config.fee_history_limit, execute_gas_limit_multiplier: eth_config.execute_gas_limit_multiplier, forced_parent_hashes: None, + pending_create_inherent_data_providers, }; let module = rpc::evm::create( module, @@ -252,6 +268,17 @@ pub async fn start_altair_node( telemetry.clone(), ); + /* // TODO in v1.3.0 + let proposer = Proposer::new(proposer_factory); + + let collator_service = CollatorService::new( + client.clone(), + Arc::new(task_manager.spawn_handle()), + announce_block, + client.clone() + ); + */ + Ok(AuraConsensus::build::< sp_consensus_aura::sr25519::AuthorityPair, _, @@ -317,13 +344,7 @@ pub fn build_centrifuge_import_queue( task_manager: &TaskManager, frontier_backend: FrontierBackend, first_evm_block: BlockNumber, -) -> Result< - sc_consensus::DefaultImportQueue< - Block, - FullClient, - >, - sc_service::Error, -> { +) -> Result, sc_service::Error> { let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; let block_import = evm::BlockImport::new( block_import, @@ -374,6 +395,7 @@ pub async fn start_centrifuge_node( Arc>, )> { let is_authority = parachain_config.role.is_authority(); + evm::start_node_impl::( parachain_config, polkadot_config, @@ -393,6 +415,22 @@ pub async fn start_centrifuge_node( fee_history_cache, overrides, block_data_cache| { + + let slot_duration = sc_consensus_aura::slot_duration(&*client)?; + let target_gas_price = eth_config.target_gas_price; + let pending_create_inherent_data_providers = move |_, ()| async move { + let current = sp_timestamp::InherentDataProvider::from_system_time(); + let next_slot = current.timestamp().as_millis() + slot_duration.as_millis(); + let timestamp = sp_timestamp::InherentDataProvider::new(next_slot.into()); + let slot = + sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( + *timestamp, + slot_duration, + ); + let dynamic_fee = fp_dynamic_fee::InherentDataProvider(U256::from(target_gas_price)); + Ok((slot, timestamp, dynamic_fee)) + }; + let mut module = rpc::create_full(client.clone(), pool.clone(), deny_unsafe)?; module .merge(Anchors::new(client.clone()).into_rpc()) @@ -416,12 +454,13 @@ pub async fn start_centrifuge_node( }, overrides, block_data_cache, - filter_pool, + filter_pool: Some(filter_pool), max_past_logs: eth_config.max_past_logs, fee_history_cache, fee_history_cache_limit: eth_config.fee_history_limit, execute_gas_limit_multiplier: eth_config.execute_gas_limit_multiplier, forced_parent_hashes: None, + pending_create_inherent_data_providers, }; let module = rpc::evm::create( module, @@ -517,13 +556,7 @@ pub fn build_development_import_queue( task_manager: &TaskManager, frontier_backend: FrontierBackend, first_evm_block: BlockNumber, -) -> Result< - sc_consensus::DefaultImportQueue< - Block, - FullClient, - >, - sc_service::Error, -> { +) -> Result, sc_service::Error> { let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; let block_import = evm::BlockImport::new( block_import, @@ -594,6 +627,22 @@ pub async fn start_development_node( fee_history_cache, overrides, block_data_cache| { + + let slot_duration = sc_consensus_aura::slot_duration(&*client)?; + let target_gas_price = eth_config.target_gas_price; + let pending_create_inherent_data_providers = move |_, ()| async move { + let current = sp_timestamp::InherentDataProvider::from_system_time(); + let next_slot = current.timestamp().as_millis() + slot_duration.as_millis(); + let timestamp = sp_timestamp::InherentDataProvider::new(next_slot.into()); + let slot = + sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( + *timestamp, + slot_duration, + ); + let dynamic_fee = fp_dynamic_fee::InherentDataProvider(U256::from(target_gas_price)); + Ok((slot, timestamp, dynamic_fee)) + }; + let mut module = rpc::create_full(client.clone(), pool.clone(), deny_unsafe)?; module .merge(Anchors::new(client.clone()).into_rpc()) @@ -620,12 +669,13 @@ pub async fn start_development_node( }, overrides, block_data_cache, - filter_pool, + filter_pool: Some(filter_pool), max_past_logs: eth_config.max_past_logs, fee_history_cache, fee_history_cache_limit: eth_config.fee_history_limit, execute_gas_limit_multiplier: eth_config.execute_gas_limit_multiplier, forced_parent_hashes: None, + pending_create_inherent_data_providers, }; let module = rpc::evm::create( module, diff --git a/node/src/service/evm.rs b/node/src/service/evm.rs index ee84225caa..319e9a01a2 100644 --- a/node/src/service/evm.rs +++ b/node/src/service/evm.rs @@ -23,7 +23,8 @@ use cumulus_client_cli::CollatorOptions; use cumulus_client_consensus_common::{ParachainBlockImportMarker, ParachainConsensus}; use cumulus_client_service::{ build_network, build_relay_chain_interface, prepare_node_config, start_collator, - start_full_node, BuildNetworkParams, StartCollatorParams, StartFullNodeParams, + start_full_node, BuildNetworkParams, CollatorSybilResistance, StartCollatorParams, + StartFullNodeParams, }; use cumulus_primitives_core::ParaId; use cumulus_relay_chain_interface::RelayChainInterface; @@ -70,6 +71,10 @@ pub struct EthConfiguration { #[clap(long)] pub enable_dev_signer: bool, + /// The dynamic-fee pallet target gas price set by block author + #[arg(long, default_value = "1")] + pub target_gas_price: u64, + /// Maximum allowed gas limit will be `block.gas_limit * /// execute_gas_limit_multiplier` when using eth_call/eth_estimateGas. #[clap(long, default_value = "10")] @@ -101,7 +106,7 @@ pub struct BlockImport { impl BlockImport where B: BlockT, - I: BlockImportT> + Send + Sync, + I: BlockImportT + Send + Sync, I::Error: Into, C: ProvideRuntimeApi + Send + Sync + HeaderBackend + AuxStore + BlockOf, { @@ -126,14 +131,13 @@ impl BlockImportT for BlockImport where B: BlockT, ::Number: PartialOrd, - I: BlockImportT> + Send + Sync, + I: BlockImportT + Send + Sync, I::Error: Into, C: ProvideRuntimeApi + Send + Sync + HeaderBackend + AuxStore + BlockOf, C::Api: EthereumRuntimeRPCApi, C::Api: BlockBuilderApi, { type Error = ConsensusError; - type Transaction = sp_api::TransactionFor; async fn check_block( &mut self, @@ -144,7 +148,7 @@ where async fn import_block( &mut self, - block: BlockImportParams, + block: BlockImportParams, ) -> Result { // Validate that there is one and exactly one frontier log, // but only on blocks created after frontier was enabled. @@ -175,7 +179,7 @@ pub fn new_partial( FullClient, FullBackend, (), - sc_consensus::DefaultImportQueue>, + sc_consensus::DefaultImportQueue, sc_transaction_pool::FullPool>, ( ParachainBlockImport, @@ -195,7 +199,7 @@ where RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue + sp_api::Metadata + sp_session::SessionKeys - + sp_api::ApiExt> + + sp_api::ApiExt + sp_offchain::OffchainWorkerApi + sp_block_builder::BlockBuilder, sc_client_api::StateBackendFor: sp_api::StateBackend, @@ -207,10 +211,7 @@ where &TaskManager, FrontierBackend, BlockNumber, - ) -> Result< - sc_consensus::DefaultImportQueue>, - sc_service::Error, - >, + ) -> Result, sc_service::Error>, { let telemetry = config .telemetry_endpoints @@ -334,7 +335,7 @@ where RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue + sp_api::Metadata + sp_session::SessionKeys - + sp_api::ApiExt> + + sp_api::ApiExt + sp_offchain::OffchainWorkerApi + sp_block_builder::BlockBuilder + cumulus_primitives_core::CollectCollationInfo @@ -364,10 +365,7 @@ where &TaskManager, FrontierBackend, BlockNumber, - ) -> Result< - sc_consensus::DefaultImportQueue>, - sc_service::Error, - >, + ) -> Result, sc_service::Error>, BIC: FnOnce( Arc>, ParachainBlockImport, @@ -429,6 +427,7 @@ where spawn_handle: task_manager.spawn_handle(), relay_chain_interface: relay_chain_interface.clone(), import_queue: params.import_queue, + sybil_resistance_level: CollatorSybilResistance::Resistant, // because of Aura }) .await?; @@ -524,11 +523,11 @@ where Arc::new(move |hash, data| sync_service.announce_block(hash, data)) }; let relay_chain_slot_duration = Duration::from_secs(6); - let _overseer_handle = relay_chain_interface + let overseer_handle = relay_chain_interface .overseer_handle() .map_err(|e| sc_service::Error::Application(Box::new(e)))?; - let recovery_handle = Box::new(_overseer_handle); + let recovery_handle = Box::new(overseer_handle); if validator { let parachain_consensus = build_consensus( @@ -564,6 +563,7 @@ where sync_service, }; + #[allow(deprecated)] // TODO fix before v1.3.0 start_collator(params).await?; } else { let params = StartFullNodeParams { @@ -578,6 +578,7 @@ where sync_service, }; + #[allow(deprecated)] // TODO fix before v1.3.0 start_full_node(params)?; } @@ -609,10 +610,8 @@ fn spawn_frontier_tasks( RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue + sp_api::Metadata + sp_session::SessionKeys - + sp_api::ApiExt< - Block, - StateBackend = sc_client_api::StateBackendFor, Block>, - > + sp_offchain::OffchainWorkerApi + + sp_api::ApiExt + + sp_offchain::OffchainWorkerApi + sp_block_builder::BlockBuilder + cumulus_primitives_core::CollectCollationInfo + fp_rpc::EthereumRuntimeRPCApi, diff --git a/pallets/anchors/src/benchmarking.rs b/pallets/anchors/src/benchmarking.rs index 56bff2fd98..8049901d61 100644 --- a/pallets/anchors/src/benchmarking.rs +++ b/pallets/anchors/src/benchmarking.rs @@ -9,10 +9,15 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. +use cfg_traits::fees::Fees; use frame_benchmarking::{benchmarks, impl_benchmark_test_suite, whitelisted_caller}; use frame_support::traits::Get; use frame_system::RawOrigin; -use sp_runtime::traits::One; +use sp_runtime::{ + traits::{Hash, One}, + DispatchError, +}; +use sp_std::vec::Vec; use super::*; diff --git a/pallets/anchors/src/lib.rs b/pallets/anchors/src/lib.rs index 35744ed7e7..4902df0ce1 100644 --- a/pallets/anchors/src/lib.rs +++ b/pallets/anchors/src/lib.rs @@ -19,22 +19,14 @@ // This pallet is getting a big refactor soon, so no sense doing clippy cleanups #![allow(clippy::all)] -use cfg_traits::fees::{Fee, Fees}; use frame_support::{ - dispatch::{DispatchError, DispatchResult}, - storage::child, - traits::{Currency, Get, ReservableCurrency}, - BoundedVec, RuntimeDebug, StateVersion, + pallet_prelude::RuntimeDebug, + traits::{Currency, Get}, }; pub use pallet::*; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; -use sp_arithmetic::traits::{CheckedAdd, CheckedMul}; -use sp_runtime::{ - traits::{Hash, Header}, - ArithmeticError, -}; -use sp_std::vec::Vec; +use sp_std::marker::PhantomData; pub use weights::*; pub mod weights; @@ -52,11 +44,11 @@ mod benchmarking; mod common; -pub struct RootHashSize(sp_std::marker::PhantomData); - -impl Get for RootHashSize { +/// Type to get the length of hash +pub struct RootHashSize(PhantomData); +impl Get for RootHashSize { fn get() -> u32 { - ::LENGTH as u32 + ::LENGTH as u32 } } @@ -106,9 +98,14 @@ pub struct AnchorData { #[frame_support::pallet] pub mod pallet { // Import various types used to declare pallet in scope. - use frame_support::{pallet_prelude::*, traits::ReservableCurrency}; + use cfg_traits::fees::{Fee, Fees}; + use frame_support::{pallet_prelude::*, storage::child, traits::ReservableCurrency}; use frame_system::pallet_prelude::*; - use sp_runtime::traits::Hash; + use sp_runtime::{ + traits::{CheckedAdd, CheckedMul, Hash}, + ArithmeticError, StateVersion, + }; + use sp_std::vec::Vec; use super::*; @@ -147,7 +144,7 @@ pub mod pallet { _, Blake2_256, T::Hash, - PreCommitData>, + PreCommitData, BalanceOf>, >; /// Map to find the eviction date given an anchor id @@ -186,7 +183,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn get_evicted_anchor_root_by_day)] pub(super) type EvictedAnchorRoots = - StorageMap<_, Blake2_256, u32, BoundedVec>>; + StorageMap<_, Blake2_256, u32, BoundedVec>>; #[pallet::error] pub enum Error { @@ -254,7 +251,9 @@ pub mod pallet { ); let expiration_block = >::block_number() - .checked_add(&T::BlockNumber::from(PRE_COMMIT_EXPIRATION_DURATION_BLOCKS)) + .checked_add(&BlockNumberFor::::from( + PRE_COMMIT_EXPIRATION_DURATION_BLOCKS, + )) .ok_or(ArithmeticError::Overflow)?; let deposit = T::Fees::fee_value(T::PreCommitDepositFeeKey::get()); @@ -432,147 +431,155 @@ pub mod pallet { Ok(()) } } -} -impl Pallet { - /// Checks if the given `anchor_id` has a valid pre-commit, i.e it has a - /// pre-commit with `expiration_block` < `current_block_number`. - fn get_valid_pre_commit( - anchor_id: T::Hash, - ) -> Option>> { - >::get(anchor_id).filter(|pre_commit| { - pre_commit.expiration_block > >::block_number() - }) - } + impl Pallet { + /// Checks if the given `anchor_id` has a valid pre-commit, i.e it has a + /// pre-commit with `expiration_block` < `current_block_number`. + fn get_valid_pre_commit( + anchor_id: T::Hash, + ) -> Option, BalanceOf>> { + >::get(anchor_id).filter(|pre_commit| { + pre_commit.expiration_block > >::block_number() + }) + } - /// Evict a pre-commit returning the reserved tokens at `pre_commit()`. - /// You can choose if evict it only if it's expired or evict either way. - fn evict_pre_commit(anchor_id: T::Hash, only_if_expired: bool) { - if let Some(pre_commit) = PreCommits::::get(anchor_id) { - if !only_if_expired - || pre_commit.expiration_block <= >::block_number() - { - PreCommits::::remove(anchor_id); - T::Currency::unreserve(&pre_commit.identity, pre_commit.deposit); + /// Evict a pre-commit returning the reserved tokens at `pre_commit()`. + /// You can choose if evict it only if it's expired or evict either way. + fn evict_pre_commit(anchor_id: T::Hash, only_if_expired: bool) { + if let Some(pre_commit) = PreCommits::::get(anchor_id) { + if !only_if_expired + || pre_commit.expiration_block <= >::block_number() + { + PreCommits::::remove(anchor_id); + T::Currency::unreserve(&pre_commit.identity, pre_commit.deposit); + } } } - } - /// Checks if `hash(signing_root, proof) == doc_root` for the given - /// `anchor_id`. Concatenation of `signing_root` and `proof` is done in a - /// fixed order (signing_root + proof). assumes there is a valid pre-commit - /// under PreCommits - fn has_valid_pre_commit_proof(anchor_id: T::Hash, doc_root: T::Hash, proof: T::Hash) -> bool { - let signing_root = match >::get(anchor_id) { - Some(pre_commit) => pre_commit.signing_root, - None => return false, - }; - let mut concatenated_bytes = signing_root.as_ref().to_vec(); - let proof_bytes = proof.as_ref().to_vec(); - - // concat hashes - concatenated_bytes.extend(proof_bytes); - let calculated_root = ::Hashing::hash(&concatenated_bytes); - return doc_root == calculated_root; - } + /// Checks if `hash(signing_root, proof) == doc_root` for the given + /// `anchor_id`. Concatenation of `signing_root` and `proof` is done in + /// a fixed order (signing_root + proof). assumes there is a valid + /// pre-commit under PreCommits + fn has_valid_pre_commit_proof( + anchor_id: T::Hash, + doc_root: T::Hash, + proof: T::Hash, + ) -> bool { + let signing_root = match >::get(anchor_id) { + Some(pre_commit) => pre_commit.signing_root, + None => return false, + }; + let mut concatenated_bytes = signing_root.as_ref().to_vec(); + let proof_bytes = proof.as_ref().to_vec(); - /// Remove child tries starting with `from` day to `until` day returning the - /// count of tries removed. - fn evict_anchor_child_tries(from: u32, until: u32) -> usize { - (from..until) - .map(|day| { - ( - day, - common::generate_child_storage_key(&Self::anchor_storage_key(&day.encode())), - ) - }) - // store the root of child trie for the day on chain before eviction. Checks if it - // exists before hand to ensure that it doesn't overwrite a root. - .map(|(day, key)| { - if !>::contains_key(day) { - let root: BoundedVec<_, _> = child::root(&key, StateVersion::V0) - .try_into() - .expect("The output hash must use the block hasher"); - - >::insert(day, root); - } - key - }) - .map(|key| child::clear_storage(&key, None, None)) - .count() - } + // concat hashes + concatenated_bytes.extend(proof_bytes); + let calculated_root = ::Hashing::hash(&concatenated_bytes); + return doc_root == calculated_root; + } - /// Iterate from the last evicted anchor to latest anchor, while removing - /// indexes that are no longer valid because they belong to an - /// expired/evicted anchor. The loop is only allowed to run MAX_LOOP_IN_TX - /// at a time. - fn remove_anchor_indexes(yesterday: u32) -> Result { - let evicted_index = >::get() - .unwrap_or_default() - .checked_add(1) - .ok_or(ArithmeticError::Overflow)?; - let anchor_index = >::get() - .unwrap_or_default() - .checked_add(1) - .ok_or(ArithmeticError::Overflow)?; - let count = (evicted_index..anchor_index) - // limit to only MAX_LOOP_IN_TX number of anchor indexes to remove - .take(MAX_LOOP_IN_TX as usize) - // get eviction date of the anchor given by index - .filter_map(|idx| { - let anchor_id = >::get(idx)?; - let eviction_date = >::get(anchor_id).unwrap_or_default(); - Some((idx, anchor_id, eviction_date)) - }) - // filter out evictable anchors, anchor_evict_date can be 0 when evicting before any - // anchors are created - .filter(|(_, _, anchor_evict_date)| anchor_evict_date <= &yesterday) - // remove indexes - .map(|(idx, anchor_id, _)| { - >::remove(anchor_id); - >::remove(idx); - >::put(idx); - }) - .count(); - Ok(count) - } + /// Remove child tries starting with `from` day to `until` day returning + /// the count of tries removed. + fn evict_anchor_child_tries(from: u32, until: u32) -> usize { + (from..until) + .map(|day| { + ( + day, + common::generate_child_storage_key(&Self::anchor_storage_key( + &day.encode(), + )), + ) + }) + // store the root of child trie for the day on chain before eviction. Checks if it + // exists before hand to ensure that it doesn't overwrite a root. + .map(|(day, key)| { + if !>::contains_key(day) { + let root: BoundedVec<_, _> = child::root(&key, StateVersion::V0) + .try_into() + .expect("The output hash must use the block hasher"); + + >::insert(day, root); + } + key + }) + .map(|key| child::clear_storage(&key, None, None)) + .count() + } - /// Get an anchor by its id in the child storage - pub fn get_anchor_by_id(anchor_id: T::Hash) -> Option> { - let anchor_evict_date = >::get(anchor_id)?; - let anchor_evict_date_enc: &[u8] = &anchor_evict_date.encode(); - let prefixed_key = Self::anchor_storage_key(anchor_evict_date_enc); - let child_info = common::generate_child_storage_key(&prefixed_key); + /// Iterate from the last evicted anchor to latest anchor, while + /// removing indexes that are no longer valid because they belong to an + /// expired/evicted anchor. The loop is only allowed to run + /// MAX_LOOP_IN_TX at a time. + pub(crate) fn remove_anchor_indexes(yesterday: u32) -> Result { + let evicted_index = >::get() + .unwrap_or_default() + .checked_add(1) + .ok_or(ArithmeticError::Overflow)?; + let anchor_index = >::get() + .unwrap_or_default() + .checked_add(1) + .ok_or(ArithmeticError::Overflow)?; + let count = (evicted_index..anchor_index) + // limit to only MAX_LOOP_IN_TX number of anchor indexes to remove + .take(MAX_LOOP_IN_TX as usize) + // get eviction date of the anchor given by index + .filter_map(|idx| { + let anchor_id = >::get(idx)?; + let eviction_date = >::get(anchor_id).unwrap_or_default(); + Some((idx, anchor_id, eviction_date)) + }) + // filter out evictable anchors, anchor_evict_date can be 0 when evicting before any + // anchors are created + .filter(|(_, _, anchor_evict_date)| anchor_evict_date <= &yesterday) + // remove indexes + .map(|(idx, anchor_id, _)| { + >::remove(anchor_id); + >::remove(idx); + >::put(idx); + }) + .count(); + Ok(count) + } - child::get_raw(&child_info, anchor_id.as_ref()) - .and_then(|data| AnchorData::decode(&mut &*data).ok()) - } + /// Get an anchor by its id in the child storage + pub fn get_anchor_by_id( + anchor_id: T::Hash, + ) -> Option>> { + let anchor_evict_date = >::get(anchor_id)?; + let anchor_evict_date_enc: &[u8] = &anchor_evict_date.encode(); + let prefixed_key = Self::anchor_storage_key(anchor_evict_date_enc); + let child_info = common::generate_child_storage_key(&prefixed_key); + + child::get_raw(&child_info, anchor_id.as_ref()) + .and_then(|data| AnchorData::decode(&mut &*data).ok()) + } - pub fn anchor_storage_key(storage_key: &[u8]) -> Vec { - let mut prefixed_key = Vec::with_capacity(ANCHOR_PREFIX.len() + storage_key.len()); - prefixed_key.extend_from_slice(ANCHOR_PREFIX); - prefixed_key.extend_from_slice(storage_key); - prefixed_key - } + pub fn anchor_storage_key(storage_key: &[u8]) -> Vec { + let mut prefixed_key = Vec::with_capacity(ANCHOR_PREFIX.len() + storage_key.len()); + prefixed_key.extend_from_slice(ANCHOR_PREFIX); + prefixed_key.extend_from_slice(storage_key); + prefixed_key + } - fn store_anchor( - anchor_id: T::Hash, - prefixed_key: &Vec, - stored_until_date_from_epoch: u32, - anchor_data_encoded: &[u8], - ) -> DispatchResult { - let idx = >::get() - .unwrap_or_default() - .checked_add(1) - .ok_or(ArithmeticError::Overflow)?; - - let child_info = common::generate_child_storage_key(prefixed_key); - child::put_raw(&child_info, anchor_id.as_ref(), &anchor_data_encoded); - - // update indexes - >::insert(&anchor_id, &stored_until_date_from_epoch); - >::insert(idx, &anchor_id); - >::put(idx); - Ok(()) + fn store_anchor( + anchor_id: T::Hash, + prefixed_key: &Vec, + stored_until_date_from_epoch: u32, + anchor_data_encoded: &[u8], + ) -> DispatchResult { + let idx = >::get() + .unwrap_or_default() + .checked_add(1) + .ok_or(ArithmeticError::Overflow)?; + + let child_info = common::generate_child_storage_key(prefixed_key); + child::put_raw(&child_info, anchor_id.as_ref(), &anchor_data_encoded); + + // update indexes + >::insert(&anchor_id, &stored_until_date_from_epoch); + >::insert(idx, &anchor_id); + >::put(idx); + Ok(()) + } } } diff --git a/pallets/anchors/src/mock.rs b/pallets/anchors/src/mock.rs index ecfd24a901..6d8e1daab1 100644 --- a/pallets/anchors/src/mock.rs +++ b/pallets/anchors/src/mock.rs @@ -13,14 +13,12 @@ use cfg_mocks::pallet_mock_fees; use frame_support::{ - parameter_types, - traits::{ConstU8, Everything, FindAuthor}, - ConsensusEngineId, + derive_impl, + traits::{ConstU64, ConstU8}, }; -use sp_core::H256; use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, + traits::{ConstBool, ConstU32}, + BuildStorage, }; use crate::{self as pallet_anchors, Config}; @@ -31,20 +29,12 @@ pub const COMMIT_FEE_VALUE: Balance = 23; pub const PRE_COMMIT_FEE_KEY: u8 = 2; pub const PRE_COMMIT_FEE_VALUE: Balance = 42; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; type Balance = u64; -// For testing the pallet, we construct a mock runtime. frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Runtime { System: frame_system, Timestamp: pallet_timestamp, - Authorship: pallet_authorship, Balances: pallet_balances, Aura: pallet_aura, MockFees: pallet_mock_fees, @@ -52,79 +42,31 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub const BlockHashCount: u64 = 250; -} - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; - type AccountId = u64; - type BaseCallFilter = Everything; - type BlockHashCount = BlockHashCount; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = frame_support::traits::ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; + type Block = frame_system::mocking::MockBlock; type RuntimeEvent = (); - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = (); - type SystemWeightInfo = (); - type Version = (); -} - -parameter_types! { - pub const ExistentialDeposit: u64 = 1; } impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; + type ExistentialDeposit = ConstU64<1>; type FreezeIdentifier = (); - type HoldIdentifier = (); type MaxFreezes = (); - type MaxHolds = frame_support::traits::ConstU32<1>; + type MaxHolds = ConstU32<1>; type MaxLocks = (); type MaxReserves = (); type ReserveIdentifier = (); type RuntimeEvent = (); + type RuntimeHoldReason = (); type WeightInfo = (); } -pub struct AuthorGiven; - -impl FindAuthor for AuthorGiven { - fn find_author<'a, I>(_digests: I) -> Option - where - I: 'a + IntoIterator, - { - Some(100) - } -} - -impl pallet_authorship::Config for Runtime { - type EventHandler = (); - type FindAuthor = AuthorGiven; -} - -parameter_types! { - pub const MinimumPeriod: u64 = 6000; -} - impl pallet_timestamp::Config for Runtime { - type MinimumPeriod = MinimumPeriod; + type MinimumPeriod = ConstU64<6000>; type Moment = u64; type OnTimestampSet = (); type WeightInfo = (); @@ -135,14 +77,11 @@ impl pallet_mock_fees::Config for Runtime { type FeeKey = u8; } -parameter_types! { - pub const MaxAuthorities: u32 = 32; -} - impl pallet_aura::Config for Runtime { + type AllowMultipleBlocksPerSlot = ConstBool; type AuthorityId = sp_consensus_aura::sr25519::AuthorityId; type DisabledValidators = (); - type MaxAuthorities = MaxAuthorities; + type MaxAuthorities = ConstU32<32>; } impl Config for Runtime { @@ -185,8 +124,8 @@ impl Runtime { // Build genesis storage according to the mock runtime. pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); // pre-fill balances diff --git a/pallets/anchors/src/tests.rs b/pallets/anchors/src/tests.rs index 88278db37d..6d356c6ae3 100644 --- a/pallets/anchors/src/tests.rs +++ b/pallets/anchors/src/tests.rs @@ -17,7 +17,10 @@ use frame_support::{assert_noop, assert_ok}; use frame_system::ensure_signed; use parity_scale_codec::Encode; use sp_core::H256; -use sp_runtime::traits::{BadOrigin, Hash, Header}; +use sp_runtime::{ + traits::{BadOrigin, Hash, Header}, + ArithmeticError, +}; use super::*; use crate::{ diff --git a/pallets/block-rewards/Cargo.toml b/pallets/block-rewards/Cargo.toml index 769c531ce8..65e965abd3 100644 --- a/pallets/block-rewards/Cargo.toml +++ b/pallets/block-rewards/Cargo.toml @@ -71,6 +71,7 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", "sp-staking/runtime-benchmarks", "cfg-primitives/runtime-benchmarks", + "cfg-mocks/runtime-benchmarks", ] try-runtime = [ "cfg-primitives/try-runtime", diff --git a/pallets/block-rewards/src/benchmarking.rs b/pallets/block-rewards/src/benchmarking.rs index b846749d3d..a4c0c337fc 100644 --- a/pallets/block-rewards/src/benchmarking.rs +++ b/pallets/block-rewards/src/benchmarking.rs @@ -6,7 +6,8 @@ use frame_support::{ traits::{fungibles::Inspect, Currency as CurrencyT}, }; use frame_system::RawOrigin; -use sp_runtime::traits::{One, Zero}; +use sp_runtime::traits::Zero; +use sp_std::vec; // required for #[benchmarks] use super::*; use crate::{pallet::Config, Pallet as BlockRewards}; @@ -17,7 +18,6 @@ const SEED: u32 = 0; #[benchmarks( where T::Balance: From, - T::BlockNumber: From + One, T::Weight: From, ::Tokens: Inspect + CurrencyT, ::CurrencyId: From, diff --git a/pallets/block-rewards/src/lib.rs b/pallets/block-rewards/src/lib.rs index 8f846e4356..ca63a06e08 100644 --- a/pallets/block-rewards/src/lib.rs +++ b/pallets/block-rewards/src/lib.rs @@ -152,7 +152,7 @@ pub mod pallet { + FungibleInspect; /// The currency type of the artificial block rewards currency. - type CurrencyId: Parameter + Member + Copy + MaybeSerializeDeserialize + Ord + MaxEncodedLen; + type CurrencyId: Parameter + Member + Copy + Ord + MaxEncodedLen; /// The identifier of the artificial block rewards currency which is /// minted and burned for collators. @@ -227,6 +227,7 @@ pub mod pallet { pub enum Error {} #[pallet::genesis_config] + #[derive(DefaultNoBound)] pub struct GenesisConfig { pub collators: Vec, pub collator_reward: T::Balance, @@ -234,20 +235,8 @@ pub mod pallet { pub last_update: Seconds, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - GenesisConfig { - collators: Default::default(), - collator_reward: Default::default(), - treasury_inflation_rate: Default::default(), - last_update: Default::default(), - } - } - } - #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { T::Rewards::attach_currency(T::StakeCurrencyId::get(), T::StakeGroupId::get()).expect( "Should be able to attach default block rewards staking currency to collator group", diff --git a/pallets/block-rewards/src/migrations.rs b/pallets/block-rewards/src/migrations.rs index 3af4a8a66b..3306e98cbf 100644 --- a/pallets/block-rewards/src/migrations.rs +++ b/pallets/block-rewards/src/migrations.rs @@ -12,10 +12,8 @@ use cfg_traits::TimeAsSecs; use frame_support::{ - dispatch::GetStorageVersion, - inherent::Vec, pallet_prelude::{StorageVersion, Weight}, - traits::{Get, OnRuntimeUpgrade}, + traits::{Get, GetStorageVersion, OnRuntimeUpgrade}, }; #[cfg(feature = "try-runtime")] use num_traits::Zero; @@ -24,7 +22,7 @@ use parity_scale_codec::{Decode, Encode}; use sp_runtime::FixedPointNumber; #[cfg(feature = "try-runtime")] use sp_runtime::TryRuntimeError; -use sp_std::marker::PhantomData; +use sp_std::{marker::PhantomData, vec::Vec}; use crate::{pallet, Config, Pallet, SessionData}; diff --git a/pallets/block-rewards/src/mock.rs b/pallets/block-rewards/src/mock.rs index 36079687fa..90a8dfb4bb 100644 --- a/pallets/block-rewards/src/mock.rs +++ b/pallets/block-rewards/src/mock.rs @@ -4,21 +4,13 @@ use cfg_types::{ tokens::{CurrencyId, StakingCurrency::BlockRewards as BlockRewardsCurrency}, }; use frame_support::{ - parameter_types, - traits::{ - fungibles::Inspect, tokens::WithdrawConsequence, ConstU16, ConstU32, ConstU64, - GenesisBuild, OnFinalize, OnInitialize, - }, + derive_impl, parameter_types, + traits::{fungibles::Inspect, tokens::WithdrawConsequence, ConstU32, OnFinalize, OnInitialize}, PalletId, }; use frame_system::EnsureRoot; use num_traits::{One, Zero}; -use sp_core::H256; -use sp_runtime::{ - impl_opaque_keys, - testing::{Header, UintAuthorityId}, - traits::{BlakeTwo256, ConvertInto, IdentityLookup}, -}; +use sp_runtime::{impl_opaque_keys, testing::UintAuthorityId, traits::ConvertInto, BuildStorage}; use crate::{self as pallet_block_rewards, Config}; @@ -26,18 +18,12 @@ pub(crate) const MAX_COLLATORS: u32 = 10; pub(crate) const SESSION_DURATION: BlockNumber = 5; pub(crate) type AccountId = u64; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; type Balance = u128; type BlockNumber = u64; type SessionIndex = u32; frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Test { System: frame_system, Balances: pallet_balances, Tokens: pallet_restricted_tokens, @@ -49,31 +35,10 @@ frame_support::construct_runtime!( } ); +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Test { type AccountData = pallet_balances::AccountData; - type AccountId = AccountId; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = ConstU64<250>; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = ConstU16<42>; - type SystemWeightInfo = (); - type Version = (); + type Block = frame_system::mocking::MockBlock; } impl_opaque_keys! { @@ -120,26 +85,15 @@ parameter_types! { // the minimum fee for an anchor is 500,000ths of a CFG. // This is set to a value so you can still get some return without getting your account removed. pub const ExistentialDeposit: Balance = 1 * cfg_primitives::MICRO_CFG; - // For weight estimation, we assume that the most locks on an individual account will be 50. - pub const MaxHolds: u32 = 50; - pub const MaxLocks: u32 = 50; - pub const MaxReserves: u32 = 50; } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for Test { type AccountStore = System; type Balance = Balance; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; - type FreezeIdentifier = (); - type HoldIdentifier = (); - type MaxFreezes = (); - type MaxHolds = MaxHolds; - type MaxLocks = MaxLocks; - type MaxReserves = MaxReserves; - type ReserveIdentifier = [u8; 8]; - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); + type RuntimeHoldReason = (); } orml_traits::parameter_type_with_key! { @@ -158,8 +112,8 @@ impl orml_tokens::Config for Test { type CurrencyId = CurrencyId; type DustRemovalWhitelist = frame_support::traits::Nothing; type ExistentialDeposits = ExistentialDeposits; - type MaxLocks = MaxLocks; - type MaxReserves = MaxReserves; + type MaxLocks = ConstU32<100>; + type MaxReserves = ConstU32<50>; type ReserveIdentifier = [u8; 8]; type RuntimeEvent = RuntimeEvent; type WeightInfo = (); @@ -355,8 +309,8 @@ impl ExtBuilder { } pub(crate) fn build(self) -> sp_io::TestExternalities { - let mut storage = frame_system::GenesisConfig::default() - .build_storage::() + let mut storage = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); pallet_block_rewards::GenesisConfig:: { diff --git a/pallets/bridge/Cargo.toml b/pallets/bridge/Cargo.toml index 281b53522c..05fcd58043 100644 --- a/pallets/bridge/Cargo.toml +++ b/pallets/bridge/Cargo.toml @@ -47,6 +47,7 @@ std = [ "cfg-traits/std", ] runtime-benchmarks = [ + "sp-runtime/runtime-benchmarks", "chainbridge/runtime-benchmarks", "frame-support/runtime-benchmarks", "cfg-traits/runtime-benchmarks", @@ -56,6 +57,7 @@ runtime-benchmarks = [ "pallet-balances/runtime-benchmarks", ] try-runtime = [ + "sp-runtime/try-runtime", "cfg-traits/try-runtime", "frame-support/try-runtime", "chainbridge/try-runtime", diff --git a/pallets/bridge/src/lib.rs b/pallets/bridge/src/lib.rs index fa5b93c3cb..1dd612c432 100644 --- a/pallets/bridge/src/lib.rs +++ b/pallets/bridge/src/lib.rs @@ -35,7 +35,7 @@ use chainbridge::types::{ChainId, ResourceId}; // Runtime, system and frame primitives use frame_support::{ traits::{Currency, ExistenceRequirement::AllowDeath}, - transactional, PalletId, + transactional, DefaultNoBound, PalletId, }; // Re-export pallet components in crate namespace (for runtime construction) pub use pallet::*; @@ -88,8 +88,6 @@ pub mod pallet { /// Pallet identifier. /// /// The module identifier may be of the form - /// ```PalletId(*b"c/bridge")``` (a string of eight characters) and set using the [`parameter_types`](https://substrate.dev/docs/en/knowledgebase/runtime/macros#parameter_types) - /// macro in one of the runtimes (see runtime folder). #[pallet::constant] type BridgePalletId: Get; @@ -118,7 +116,6 @@ pub mod pallet { /// Key used to retrieve the fee that are charged when transferring /// native tokens to target chains. - #[pallet::constant] type NativeTokenTransferFeeKey: Get<::FeeKey>; /// Weight information for extrinsics in this pallet @@ -144,6 +141,7 @@ pub mod pallet { // The genesis configuration type. #[pallet::genesis_config] + #[derive(DefaultNoBound)] pub struct GenesisConfig { pub chains: Vec, pub relayers: Vec<::AccountId>, @@ -151,22 +149,9 @@ pub mod pallet { pub threshold: u32, } - // The default value for the genesis config type. - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - Self { - chains: Default::default(), - relayers: Default::default(), - resources: Default::default(), - threshold: Default::default(), - } - } - } - // The build of genesis for the pallet. #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { self.chains.iter().for_each(|c| { >::whitelist(*c).unwrap_or_default(); diff --git a/pallets/bridge/src/mock.rs b/pallets/bridge/src/mock.rs index 2f28d4eec0..36c25b6388 100644 --- a/pallets/bridge/src/mock.rs +++ b/pallets/bridge/src/mock.rs @@ -22,21 +22,11 @@ use cfg_primitives::{constants::CFG, Balance}; use chainbridge::{constants::DEFAULT_RELAYER_VOTE_THRESHOLD, types::ResourceId, EnsureBridge}; -use frame_support::{ - parameter_types, - traits::{Everything, SortedMembers}, - PalletId, -}; -use frame_system::{ - mocking::{MockBlock, MockUncheckedExtrinsic}, - EnsureNever, EnsureSignedBy, -}; +use frame_support::{derive_impl, parameter_types, traits::SortedMembers, PalletId}; +use frame_system::{EnsureNever, EnsureSignedBy}; use sp_core::{blake2_128, H256}; use sp_io::TestExternalities; -use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, -}; +use sp_runtime::BuildStorage; use crate::{self as pallet_bridge, Config as BridgePalletConfig}; @@ -44,10 +34,6 @@ use crate::{self as pallet_bridge, Config as BridgePalletConfig}; // Types and constants declaration // ---------------------------------------------------------------------------- -// Types used to build the mock runtime -type UncheckedExtrinsic = MockUncheckedExtrinsic; -type Block = MockBlock; - pub(crate) const NATIVE_TOKEN_TRANSFER_FEE: Balance = 2000 * CFG; pub(crate) const TEST_CHAIN_ID: u8 = 5; pub(crate) const TEST_USER_ID: u64 = 0x1; @@ -66,17 +52,14 @@ pub(crate) const TEST_RELAYER_VOTE_THRESHOLD: u32 = 2; // Build mock runtime frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Runtime { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Authorship: pallet_authorship::{Pallet, Storage}, - Balances: pallet_balances::{Pallet, Call, Config, Storage, Event}, - ChainBridge: chainbridge::{Pallet, Call, Storage, Event}, - Fees: pallet_fees::{Pallet, Call, Config, Event}, - Bridge: pallet_bridge::{Pallet, Call, Config, Event}, + System: frame_system, + Authorship: pallet_authorship, + Balances: pallet_balances, + ChainBridge: chainbridge, + Fees: pallet_fees, + Bridge: pallet_bridge, } ); @@ -91,37 +74,10 @@ impl SortedMembers for TestUserId { } } -// Parameterize FRAME system pallet -parameter_types! { - pub const BlockHashCount: u64 = 250; -} - -// Implement FRAME system pallet configuration trait for the mock runtime +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; - type AccountId = u64; - type BaseCallFilter = Everything; - type BlockHashCount = BlockHashCount; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = frame_support::traits::ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = (); - type SystemWeightInfo = (); - type Version = (); + type Block = frame_system::mocking::MockBlock; } parameter_types! { @@ -135,13 +91,13 @@ impl pallet_balances::Config for Runtime { type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type FreezeIdentifier = (); - type HoldIdentifier = (); type MaxFreezes = (); type MaxHolds = frame_support::traits::ConstU32<1>; type MaxLocks = (); type MaxReserves = (); type ReserveIdentifier = (); type RuntimeEvent = RuntimeEvent; + type RuntimeHoldReason = (); type WeightInfo = (); } @@ -229,8 +185,8 @@ impl TestExternalitiesBuilder { pub(crate) fn build(self) -> TestExternalities { let bridge_id = ChainBridge::account_id(); - let mut storage = frame_system::GenesisConfig::default() - .build_storage::() + let mut storage = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); // pre-fill balances diff --git a/pallets/collator-allowlist/src/lib.rs b/pallets/collator-allowlist/src/lib.rs index 24c8315e38..cbd8ba7bac 100644 --- a/pallets/collator-allowlist/src/lib.rs +++ b/pallets/collator-allowlist/src/lib.rs @@ -42,7 +42,7 @@ pub use weights::*; #[frame_support::pallet] pub mod pallet { - use frame_support::pallet_prelude::*; + use frame_support::{pallet_prelude::*, DefaultNoBound}; use frame_system::pallet_prelude::*; use sp_std::vec::Vec; @@ -71,23 +71,14 @@ pub mod pallet { // The genesis config type. #[pallet::genesis_config] + #[derive(DefaultNoBound)] pub struct GenesisConfig { pub initial_state: Vec, } - // The default value for the genesis config type. - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - Self { - initial_state: sp_std::vec![], - } - } - } - // The build of genesis for the pallet. #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { self.initial_state .iter() diff --git a/pallets/collator-allowlist/src/mock.rs b/pallets/collator-allowlist/src/mock.rs index 768138cd3a..0b9cb34f96 100644 --- a/pallets/collator-allowlist/src/mock.rs +++ b/pallets/collator-allowlist/src/mock.rs @@ -11,89 +11,26 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -use frame_support::{parameter_types, traits::Everything}; -use sp_core::H256; -use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, -}; +use frame_support::{derive_impl, traits::ValidatorRegistration}; -use crate::{self as collator_allowlist, *}; +use crate::{self as collator_allowlist, Config}; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; -type Balance = u64; - -// For testing the pallet, we construct a mock runtime. frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - CollatorAllowlist: collator_allowlist::{Pallet, Call, Storage}, + pub enum Runtime { + System: frame_system, + CollatorAllowlist: collator_allowlist, } ); -type AccountId = u64; - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { - type AccountData = pallet_balances::AccountData; - type AccountId = AccountId; - type BaseCallFilter = Everything; - type BlockHashCount = (); - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = frame_support::traits::ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = (); - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = (); - type SystemWeightInfo = (); - type Version = (); -} - -parameter_types! { - pub const ExistentialDeposit: u64 = 1; -} - -impl pallet_balances::Config for Runtime { - type AccountStore = System; - type Balance = Balance; - type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type FreezeIdentifier = (); - type HoldIdentifier = (); - type MaxFreezes = (); - type MaxHolds = frame_support::traits::ConstU32<1>; - type MaxLocks = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type RuntimeEvent = (); - type WeightInfo = (); -} - -parameter_types! { - pub const One: u64 = 1; + type Block = frame_system::mocking::MockBlock; } type ValidatorId = u64; impl Config for Runtime { - type RuntimeEvent = (); + type RuntimeEvent = RuntimeEvent; type ValidatorId = ValidatorId; type ValidatorRegistration = MockSession; type WeightInfo = (); @@ -116,16 +53,5 @@ impl ValidatorRegistration for MockSession { // Build the genesis storage according to the mock runtime. pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap(); - - // pre-fill balances - pallet_balances::GenesisConfig:: { - balances: vec![(1, 100000), (2, 100000), (100, 100)], - } - .assimilate_storage(&mut t) - .unwrap(); - - t.into() + sp_io::TestExternalities::default() } diff --git a/pallets/collator-allowlist/src/tests.rs b/pallets/collator-allowlist/src/tests.rs index 11e4c5d131..c3ea9484dd 100644 --- a/pallets/collator-allowlist/src/tests.rs +++ b/pallets/collator-allowlist/src/tests.rs @@ -12,7 +12,7 @@ // GNU General Public License for more details. use frame_support::{ - assert_noop, assert_ok, dispatch::DispatchError, traits::ValidatorRegistration, + assert_noop, assert_ok, pallet_prelude::DispatchError, traits::ValidatorRegistration, }; use sp_runtime::traits::BadOrigin; diff --git a/pallets/crowdloan-claim/src/benchmarking.rs b/pallets/crowdloan-claim/src/benchmarking.rs index 6534cf8010..7e697e2b3f 100644 --- a/pallets/crowdloan-claim/src/benchmarking.rs +++ b/pallets/crowdloan-claim/src/benchmarking.rs @@ -1,7 +1,7 @@ #![cfg(feature = "runtime-benchmarks")] use frame_benchmarking::{account, benchmarks}; use frame_support::{StorageHasher, Twox128}; -use frame_system::RawOrigin; +use frame_system::{pallet_prelude::BlockNumberFor, RawOrigin}; use sp_runtime::Perbill; use super::*; @@ -72,10 +72,10 @@ benchmarks! { get_account_relay_sr25519::(), get_contribution::(CONTRIBUTION) ); - let locked_at: T::BlockNumber = 1u32.into(); + let locked_at = 1u32.into(); let index: TrieIndex = 1u32.into(); - let lease_start: T::BlockNumber = 1u32.into(); - let lease_period: T::BlockNumber = 1u32.into(); + let lease_start = 1u32.into(); + let lease_period = 1u32.into(); }: _(RawOrigin::Root, contributions, locked_at, index, lease_start, lease_period) verify { assert!(Pallet::::contributions().is_some()); @@ -86,14 +86,14 @@ benchmarks! { } set_lease_start{ - let start: T::BlockNumber = 1u32.into(); + let start = 1u32.into(); }: _(RawOrigin::Root, start) verify { assert_eq!(Pallet::::lease_start(), 1u32.into()); } set_lease_period{ - let period: T::BlockNumber = 1u32.into(); + let period = 1u32.into(); }: _(RawOrigin::Root, period) verify { assert_eq!(Pallet::::lease_period(), 1u32.into()); @@ -110,7 +110,7 @@ benchmarks! { } set_locked_at { - let locked: T::BlockNumber = 1u32.into(); + let locked = 1u32.into(); }: _(RawOrigin::Root, locked) verify { assert!(Pallet::::locked_at().is_some()); @@ -392,17 +392,17 @@ fn init_pallets(relay_account: T::RelayChainAccountId) { get_contribution::(CONTRIBUTION), )); >::put(Into::::into(100u32)); - >::put(Into::::into(0u32)); - >::put(Into::::into(0u32)); - >::put(Into::::into(400u32)); + >::put(BlockNumberFor::::from(0u32)); + >::put(BlockNumberFor::::from(0u32)); + >::put(BlockNumberFor::::from(400u32)); >::put(Into::::into(1u32)); let vesting_start_key = create_final_key_crowdloan_reward(b"VestingStart"); - let vesting_start: T::BlockNumber = 100u32.into(); + let vesting_start: BlockNumberFor = 100u32.into(); frame_support::storage::unhashed::put(&vesting_start_key, &vesting_start); let vesting_period_key = create_final_key_crowdloan_reward(b"VestingPeriod"); - let vesting_period: T::BlockNumber = 500u32.into(); + let vesting_period: BlockNumberFor = 500u32.into(); frame_support::storage::unhashed::put(&vesting_period_key, &vesting_period); let direct_payout_ratio_key = create_final_key_crowdloan_reward(b"DirectPayoutRatio"); diff --git a/pallets/crowdloan-claim/src/lib.rs b/pallets/crowdloan-claim/src/lib.rs index 47deb467d8..b88cfe9982 100644 --- a/pallets/crowdloan-claim/src/lib.rs +++ b/pallets/crowdloan-claim/src/lib.rs @@ -58,9 +58,7 @@ use cfg_traits::Reward; // Runtime, system and frame primitives use frame_support::{ - dispatch::{fmt::Debug, DispatchResult}, ensure, - sp_runtime::traits::{MaybeSerialize, Saturating}, traits::{EnsureOrigin, Get}, PalletId, }; @@ -72,9 +70,10 @@ use proofs::{Hasher, Proof, Verifier}; use sp_core::crypto::AccountId32; use sp_runtime::{ sp_std::{vec, vec::Vec}, - traits::{AccountIdConversion, Hash, Verify, Zero}, - MultiSignature, + traits::{AccountIdConversion, Hash, MaybeSerialize, Saturating, Verify, Zero}, + DispatchResult, MultiSignature, }; +use sp_std::fmt::Debug; // Extrinsics weight information pub use crate::weights::WeightInfo; @@ -194,7 +193,7 @@ pub mod pallet { /// the pallet. /// /// The pallet identifier may be of the form - /// ```PalletId(*b"cc/claim")```. + /// `PalletId(*b"cc/claim")`. #[pallet::constant] type PalletId: Get; @@ -220,7 +219,7 @@ pub mod pallet { type RewardMechanism: Reward< ParachainAccountId = Self::AccountId, ContributionAmount = Self::Balance, - BlockNumber = Self::BlockNumber, + BlockNumber = BlockNumberFor, >; /// Entity which is allowed to perform administrative transactions @@ -248,7 +247,7 @@ pub mod pallet { RewardClaimed(T::RelayChainAccountId, ParachainAccountIdOf, T::Balance), /// The block number, where we lock the contributions has been updated - LockedAtUpdated(T::BlockNumber), + LockedAtUpdated(BlockNumberFor), /// Relay-chain Root hash which allows to verify contributions ContributionsRootUpdated(RootHashOf), @@ -259,11 +258,11 @@ pub mod pallet { /// The lease start of the parachain slot. Used to define when we can /// initialize the next time - LeaseStartUpdated(T::BlockNumber), + LeaseStartUpdated(BlockNumberFor), /// The lease period of the parachain slot. Used to define when we can /// initialize the next time - LeasePeriodUpdated(T::BlockNumber), + LeasePeriodUpdated(BlockNumberFor), } // ------------------------------------------------------------------------ @@ -277,7 +276,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn locked_at)] - pub(super) type LockedAt = StorageValue<_, T::BlockNumber, OptionQuery>; + pub(super) type LockedAt = StorageValue<_, BlockNumberFor, OptionQuery>; /// TrieIndex of the crowdloan campaign inside the relay-chain crowdloan /// pallet. @@ -308,17 +307,19 @@ pub mod pallet { pub type PrevIndex = StorageValue<_, Index, ValueQuery, OnIndexEmpty>; #[pallet::type_value] - pub fn OnLeaseEmpty() -> T::BlockNumber { + pub fn OnLeaseEmpty() -> BlockNumberFor { Zero::zero() } #[pallet::storage] #[pallet::getter(fn lease_start)] - pub type LeaseStart = StorageValue<_, T::BlockNumber, ValueQuery, OnLeaseEmpty>; + pub type LeaseStart = + StorageValue<_, BlockNumberFor, ValueQuery, OnLeaseEmpty>; #[pallet::storage] #[pallet::getter(fn lease_period)] - pub type LeasePeriod = StorageValue<_, T::BlockNumber, ValueQuery, OnLeaseEmpty>; + pub type LeasePeriod = + StorageValue<_, BlockNumberFor, ValueQuery, OnLeaseEmpty>; // ---------------------------------------------------------------------------- // Pallet lifecycle hooks @@ -326,7 +327,7 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { - fn on_finalize(n: ::BlockNumber) { + fn on_finalize(n: BlockNumberFor) { // On the first block after the lease is over, we allow a new initialization of // the pallet and forbid further claims for this lease. if n > Self::lease_start().saturating_add(Self::lease_period()) { @@ -489,10 +490,10 @@ pub mod pallet { pub fn initialize( origin: OriginFor, contributions: RootHashOf, - locked_at: T::BlockNumber, + locked_at: BlockNumberFor, index: TrieIndex, - lease_start: T::BlockNumber, - lease_period: T::BlockNumber, + lease_start: BlockNumberFor, + lease_period: BlockNumberFor, ) -> DispatchResultWithPostInfo { // Ensure that only administrator entity can perform this administrative // transaction @@ -539,7 +540,7 @@ pub mod pallet { #[pallet::call_index(2)] pub fn set_lease_start( origin: OriginFor, - start: T::BlockNumber, + start: BlockNumberFor, ) -> DispatchResultWithPostInfo { // Ensure that only an administrator or root entity triggered the transaction ensure!( @@ -559,7 +560,7 @@ pub mod pallet { #[pallet::call_index(3)] pub fn set_lease_period( origin: OriginFor, - period: T::BlockNumber, + period: BlockNumberFor, ) -> DispatchResultWithPostInfo { // Ensure that only an administrator or root entity triggered the transaction ensure!( @@ -609,7 +610,7 @@ pub mod pallet { #[pallet::call_index(5)] pub fn set_locked_at( origin: OriginFor, - locked_at: T::BlockNumber, + locked_at: BlockNumberFor, ) -> DispatchResultWithPostInfo { // Ensure that only an administrator or root entity triggered the transaction ensure!( diff --git a/pallets/crowdloan-claim/src/mock.rs b/pallets/crowdloan-claim/src/mock.rs index 2ee9abecfc..498a9cc79d 100644 --- a/pallets/crowdloan-claim/src/mock.rs +++ b/pallets/crowdloan-claim/src/mock.rs @@ -24,19 +24,13 @@ // ---------------------------------------------------------------------------- use frame_support::{ - parameter_types, - traits::{Everything, GenesisBuild, SortedMembers, WithdrawReasons}, - weights::Weight, + derive_impl, parameter_types, + traits::{SortedMembers, WithdrawReasons}, PalletId, }; use frame_system::EnsureSignedBy; -use sp_core::H256; use sp_io::TestExternalities; -use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, - AccountId32, -}; +use sp_runtime::{traits::ConstU64, AccountId32, BuildStorage}; use crate::{self as pallet_crowdloan_claim, Config}; @@ -46,82 +40,28 @@ use crate::{self as pallet_crowdloan_claim, Config}; type Balance = u64; -// ---------------------------------------------------------------------------- -// Mock runtime -// ---------------------------------------------------------------------------- -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -pub type Block = frame_system::mocking::MockBlock; - -// Build mock runtime frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Config, Storage, Event}, - Vesting: pallet_vesting::{Pallet, Call, Config, Storage, Event}, - CrowdloanReward: pallet_crowdloan_reward::{Pallet, Call, Storage, Event}, - CrowdloanClaim: pallet_crowdloan_claim::{Pallet, Call, Storage, Event}, + pub enum Runtime { + System: frame_system, + Balances: pallet_balances, + Vesting: pallet_vesting, + CrowdloanReward: pallet_crowdloan_reward, + CrowdloanClaim: pallet_crowdloan_claim, } ); -// Parameterize frame system pallet -parameter_types! { - pub const BlockHashCount: u64 = 250; - pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights::simple_max(Weight::from_parts(1024, 0).set_proof_size(u64::MAX).into()); -} - -// Implement frame system configuration for the mock runtime +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; - type AccountId = u64; - type BaseCallFilter = Everything; - type BlockHashCount = BlockHashCount; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = BlockWeights; - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = frame_support::traits::ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = (); - type SystemWeightInfo = (); - type Version = (); -} - -// Parameterize balances pallet -parameter_types! { - pub const MaxLocks: u32 = 10; - pub const ExistentialDeposit: u64 = 1; + type Block = frame_system::mocking::MockBlock; } -// Implement balances pallet configuration for mock runtime +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for Runtime { type AccountStore = System; - type Balance = Balance; type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type FreezeIdentifier = (); - type HoldIdentifier = (); - type MaxFreezes = (); - type MaxHolds = frame_support::traits::ConstU32<1>; - type MaxLocks = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); + type ExistentialDeposit = ConstU64<1>; + type RuntimeHoldReason = (); } parameter_types! { @@ -204,8 +144,8 @@ impl Default for TestExternalitiesBuilder { impl TestExternalitiesBuilder { // Build a genesis storage key/value store pub fn build(self, optional: Option) -> TestExternalities { - let mut storage = frame_system::GenesisConfig::default() - .build_storage::() + let mut storage = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); pallet_balances::GenesisConfig:: { diff --git a/pallets/crowdloan-reward/Cargo.toml b/pallets/crowdloan-reward/Cargo.toml index 6dc42472e9..bc78eabbc3 100644 --- a/pallets/crowdloan-reward/Cargo.toml +++ b/pallets/crowdloan-reward/Cargo.toml @@ -32,7 +32,6 @@ cfg-traits = { workspace = true } [dev-dependencies] cfg-types = { workspace = true, default_features = true } pallet-vesting = { workspace = true, default_features = true } -serde = { workspace = true } sp-core = { workspace = true, default_features = true } sp-io = { workspace = true, default_features = true } diff --git a/pallets/crowdloan-reward/src/benchmarking.rs b/pallets/crowdloan-reward/src/benchmarking.rs index be9a354968..f3321cb978 100644 --- a/pallets/crowdloan-reward/src/benchmarking.rs +++ b/pallets/crowdloan-reward/src/benchmarking.rs @@ -7,8 +7,8 @@ use super::*; benchmarks! { initialize { let ratio = Perbill::from_percent(2u32); - let vesting_period: T::BlockNumber = 3u32.into(); - let vesting_start: T::BlockNumber = 4u32.into(); + let vesting_period = 3u32.into(); + let vesting_start = 4u32.into(); }: _(RawOrigin::Root, ratio, vesting_period, vesting_start ) verify { assert_eq!( @@ -20,14 +20,14 @@ benchmarks! { } set_vesting_start { - let start: T::BlockNumber = 1u32.into(); + let start = 1u32.into(); }: _(RawOrigin::Root, start) verify { assert_eq!(Pallet::::vesting_start().unwrap(), 1u32.into()); } set_vesting_period { - let period: T::BlockNumber = 1u32.into(); + let period = 1u32.into(); }: _(RawOrigin::Root, period) verify { assert_eq!(Pallet::::vesting_period().unwrap(), 1u32.into()); diff --git a/pallets/crowdloan-reward/src/lib.rs b/pallets/crowdloan-reward/src/lib.rs index 97674bcfc1..1d0f38f6dd 100644 --- a/pallets/crowdloan-reward/src/lib.rs +++ b/pallets/crowdloan-reward/src/lib.rs @@ -63,7 +63,7 @@ use frame_support::{ }, PalletId, }; -use frame_system::ensure_root; +use frame_system::{ensure_root, pallet_prelude::BlockNumberFor}; // Re-export in crate namespace (for runtime construction) pub use pallet::*; use sp_runtime::{ @@ -121,26 +121,6 @@ pub mod pallet { pub trait Config: frame_system::Config + pallet_vesting::Config { /// Constant configuration parameter to store the module identifier for /// the pallet. - /// - /// The module identifier may be of the form - /// ```PalletId(*b"cc/rwrd")```. This constant is set when building this - /// config trait for the runtime. - /// - /// # Example - /// ```rust,ignore - /// - /// // Parameterize crowdloan reward pallet configuration - /// parameter_types! { - /// pub const CrowdloanRewardPalletId: PalletId = - /// PalletId(*b"cc/rwrd"); } - /// - /// // Implement crowdloan reward pallet's configuration trait for the - /// runtime impl pallet_crowdloarn_reward::Config for Runtime { - /// type Event = Event; - /// type WeightInfo = (); - /// type PalletId = CrowdloanRewardPalletId; - /// } - /// ``` #[pallet::constant] type PalletId: Get; @@ -172,17 +152,17 @@ pub mod pallet { /// Event triggered when the reward module is ready to reward /// contributors \[vesting_start, vesting_period, direct_payout_ratio\] - RewardPalletInitialized(T::BlockNumber, T::BlockNumber, Perbill), + RewardPalletInitialized(BlockNumberFor, BlockNumberFor, Perbill), /// Direct payout ratio for contributors has been updated /// \[payout_ratio\] DirectPayoutRatioUpdated(Perbill), /// Vesting period has been updated - VestingPeriodUpdated(T::BlockNumber), + VestingPeriodUpdated(BlockNumberFor), /// Start of vesting has been updated - VestingStartUpdated(T::BlockNumber), + VestingStartUpdated(BlockNumberFor), } #[pallet::type_value] @@ -200,12 +180,12 @@ pub mod pallet { /// Over which period are the contributions vested. #[pallet::storage] #[pallet::getter(fn vesting_period)] - pub(super) type VestingPeriod = StorageValue<_, T::BlockNumber>; + pub(super) type VestingPeriod = StorageValue<_, BlockNumberFor>; /// At which block number does the vesting start. #[pallet::storage] #[pallet::getter(fn vesting_start)] - pub(super) type VestingStart = StorageValue<_, T::BlockNumber>; + pub(super) type VestingStart = StorageValue<_, BlockNumberFor>; // ---------------------------------------------------------------------------- // Pallet errors @@ -241,8 +221,8 @@ pub mod pallet { pub fn initialize( origin: OriginFor, direct_payout_ratio: Perbill, - vesting_period: T::BlockNumber, - vesting_start: T::BlockNumber, + vesting_period: BlockNumberFor, + vesting_start: BlockNumberFor, ) -> DispatchResultWithPostInfo { ensure!( Self::is_origin_administrator(origin).is_ok(), @@ -267,7 +247,7 @@ pub mod pallet { #[pallet::call_index(1)] pub fn set_vesting_start( origin: OriginFor, - start: T::BlockNumber, + start: BlockNumberFor, ) -> DispatchResultWithPostInfo { // Ensure that only an administrator or root entity triggered the transaction ensure!( @@ -294,7 +274,7 @@ pub mod pallet { #[pallet::call_index(2)] pub fn set_vesting_period( origin: OriginFor, - period: T::BlockNumber, + period: BlockNumberFor, ) -> DispatchResultWithPostInfo { // Ensure that only an administrator or root entity triggered the transaction ensure!( @@ -364,7 +344,7 @@ impl Reward for Pallet where BalanceOf: Send + Sync, { - type BlockNumber = T::BlockNumber; + type BlockNumber = BlockNumberFor; type ContributionAmount = BalanceOf; type ParachainAccountId = T::AccountId; diff --git a/pallets/crowdloan-reward/src/mock.rs b/pallets/crowdloan-reward/src/mock.rs index afecfdedf8..b62746efb8 100644 --- a/pallets/crowdloan-reward/src/mock.rs +++ b/pallets/crowdloan-reward/src/mock.rs @@ -23,60 +23,38 @@ // ---------------------------------------------------------------------------- use frame_support::{ - parameter_types, - traits::{Everything, SortedMembers, WithdrawReasons}, + derive_impl, parameter_types, + traits::{SortedMembers, WithdrawReasons}, PalletId, }; use frame_system::EnsureSignedBy; -use sp_core::H256; -use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, - Perbill, -}; +use sp_runtime::{traits::ConstU64, BuildStorage, Perbill}; use crate as pallet_crowdloan_reward; type Balance = u64; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; - -// Build mock runtime frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Config, Storage, Event}, - Vesting: pallet_vesting::{Pallet, Call, Config, Storage, Event}, - CrowdloanReward: pallet_crowdloan_reward::{Pallet, Call, Storage, Event}, + pub enum Runtime { + System: frame_system, + Balances: pallet_balances, + Vesting: pallet_vesting, + CrowdloanReward: pallet_crowdloan_reward, } ); -// Parameterize balances pallet -parameter_types! { - pub const MaxLocks: u32 = 10; - pub const ExistentialDeposit: u64 = 1; +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] +impl frame_system::Config for Runtime { + type AccountData = pallet_balances::AccountData; + type Block = frame_system::mocking::MockBlock; } -// Implement balances pallet configuration for mock runtime +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for Runtime { type AccountStore = System; - type Balance = Balance; type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type FreezeIdentifier = (); - type HoldIdentifier = (); - type MaxFreezes = (); - type MaxHolds = frame_support::traits::ConstU32<1>; - type MaxLocks = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); + type ExistentialDeposit = ConstU64<1>; + type RuntimeHoldReason = (); } // Parameterize vesting pallet @@ -127,34 +105,6 @@ parameter_types! { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } -// Implement frame system pallet configuration for mock runtime -impl frame_system::Config for Runtime { - type AccountData = pallet_balances::AccountData; - type AccountId = u64; - type BaseCallFilter = Everything; - type BlockHashCount = BlockHashCount; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = frame_support::traits::ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = (); - type SystemWeightInfo = (); - type Version = (); -} - // ---------------------------------------------------------------------------- // Runtime externalities // ---------------------------------------------------------------------------- @@ -185,8 +135,8 @@ impl TestExternalitiesBuilder { // Build a genesis storage key/value store pub fn build(self, execute: impl FnOnce() -> R) -> sp_io::TestExternalities { - let mut storage = frame_system::GenesisConfig::default() - .build_storage::() + let mut storage = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); pallet_balances::GenesisConfig:: { @@ -201,7 +151,6 @@ impl TestExternalitiesBuilder { .assimilate_storage(&mut storage) .unwrap(); - use frame_support::traits::GenesisBuild; pallet_vesting::GenesisConfig:: { vesting: vec![(1, 1, 10, 0), (2, 10, 20, 0), (12, 10, 20, 0)], } diff --git a/pallets/ethereum-transaction/src/mock.rs b/pallets/ethereum-transaction/src/mock.rs index 39b53f98a0..9c02dfb4eb 100644 --- a/pallets/ethereum-transaction/src/mock.rs +++ b/pallets/ethereum-transaction/src/mock.rs @@ -1,90 +1,46 @@ use std::str::FromStr; -use cfg_primitives::{BLOCK_STORAGE_LIMIT, MAX_POV_SIZE}; use fp_evm::{FeeCalculator, Precompile, PrecompileResult}; -use frame_support::{parameter_types, traits::FindAuthor, weights::Weight}; +use frame_support::{derive_impl, parameter_types, traits::FindAuthor, weights::Weight}; use pallet_ethereum::{IntermediateStateRoot, PostLogContent}; use pallet_evm::{ runner::stack::Runner, AddressMapping, EnsureAddressNever, EnsureAddressRoot, FixedGasWeightMapping, IsPrecompileResult, PrecompileHandle, PrecompileSet, SubstrateBlockHashMapping, }; -use sp_core::{ - crypto::AccountId32, ByteArray, ConstU128, ConstU16, ConstU32, ConstU64, H160, H256, U256, -}; -use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, - ConsensusEngineId, -}; +use sp_core::{crypto::AccountId32, ByteArray, ConstU128, ConstU64, H160, U256}; +use sp_runtime::{traits::IdentityLookup, ConsensusEngineId}; use crate::pallet as pallet_ethereum_transaction; pub type Balance = u128; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; - frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Runtime { System: frame_system, Balances: pallet_balances, EVM: pallet_evm, - Timestamp: pallet_timestamp::{Pallet, Call, Storage}, - Ethereum: pallet_ethereum::{Pallet, Call, Storage, Event, Origin}, + Timestamp: pallet_timestamp, + Ethereum: pallet_ethereum, EthereumTransaction: pallet_ethereum_transaction, } ); -frame_support::parameter_types! { - pub const MaxInstancesPerDomain: u32 = 3; -} - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; type AccountId = AccountId32; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = ConstU64<250>; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; + type Block = frame_system::mocking::MockBlock; type Lookup = IdentityLookup; - type MaxConsumers = ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = ConstU16<42>; - type SystemWeightInfo = (); - type Version = (); } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); type ExistentialDeposit = ConstU128<1>; - type FreezeIdentifier = (); - type HoldIdentifier = (); - type MaxFreezes = (); - type MaxHolds = frame_support::traits::ConstU32<1>; - type MaxLocks = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); + type RuntimeHoldReason = (); } parameter_types! { @@ -167,12 +123,6 @@ parameter_types! { pub BlockGasLimit: U256 = U256::max_value(); pub WeightPerGas: Weight = Weight::from_parts(20_000, 0); pub MockPrecompiles: MockPrecompileSet = MockPrecompileSet; - pub GasLimitPovSizeRatio: u64 = { - let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); - block_gas_limit.saturating_div(MAX_POV_SIZE) - }; - pub GasLimitStorageGrowthRatio: u64 = - BlockGasLimit::get().min(u64::MAX.into()).low_u64().saturating_div(BLOCK_STORAGE_LIMIT); } impl pallet_evm::Config for Runtime { @@ -184,8 +134,8 @@ impl pallet_evm::Config for Runtime { type Currency = Balances; type FeeCalculator = FixedGasPrice; type FindAuthor = FindAuthorTruncated; - type GasLimitPovSizeRatio = GasLimitPovSizeRatio; - type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; + type GasLimitPovSizeRatio = ConstU64<1>; + type GasLimitStorageGrowthRatio = ConstU64<1>; type GasWeightMapping = FixedGasWeightMapping; type OnChargeTransaction = (); type OnCreate = (); @@ -214,12 +164,5 @@ impl pallet_ethereum::Config for Runtime { impl pallet_ethereum_transaction::Config for Runtime {} pub fn new_test_ext() -> sp_io::TestExternalities { - let storage = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap(); - - let mut ext = sp_io::TestExternalities::new(storage); - ext.execute_with(|| frame_system::Pallet::::set_block_number(1)); - - ext + System::externalities() } diff --git a/pallets/fees/src/lib.rs b/pallets/fees/src/lib.rs index c5c486e67e..b30aafadf5 100644 --- a/pallets/fees/src/lib.rs +++ b/pallets/fees/src/lib.rs @@ -8,14 +8,13 @@ //! burn it. #![cfg_attr(not(feature = "std"), no_std)] -use cfg_traits::fees::{self, Fee, FeeKey}; +use cfg_traits::fees::{self, Fee}; use frame_support::{ - dispatch::{DispatchError, DispatchResult}, + pallet_prelude::{DispatchError, DispatchResult}, traits::{Currency, ExistenceRequirement, Imbalance, OnUnbalanced, WithdrawReasons}, + DefaultNoBound, }; pub use pallet::*; -use parity_scale_codec::EncodeLike; -use sp_std::vec::Vec; #[cfg(test)] mod mock; @@ -53,7 +52,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config + pallet_authorship::Config { /// Key type used for storing and identifying fees. - type FeeKey: FeeKey + EncodeLike + MaxEncodedLen; + type FeeKey: Parameter + MaybeSerializeDeserialize + MaxEncodedLen; /// The currency mechanism. type Currency: Currency; @@ -82,23 +81,14 @@ pub mod pallet { // The genesis config type. #[pallet::genesis_config] + #[derive(DefaultNoBound)] pub struct GenesisConfig { - pub initial_fees: Vec<(T::FeeKey, BalanceOf)>, - } - - // The default value for the genesis config type. - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - Self { - initial_fees: Default::default(), - } - } + pub initial_fees: sp_std::vec::Vec<(T::FeeKey, BalanceOf)>, } // The build of genesis for the pallet. #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { for (key, fee) in self.initial_fees.iter() { >::insert(key, fee); @@ -199,8 +189,8 @@ impl fees::Fees for Pallet { #[cfg(feature = "runtime-benchmarks")] fn add_fee_requirements(from: &Self::AccountId, fee: Fee) { - T::Currency::deposit_creating(from, T::Currency::minimum_balance()); - T::Currency::deposit_creating(from, fee.value::()); + let _ = T::Currency::deposit_creating(from, T::Currency::minimum_balance()); + let _ = T::Currency::deposit_creating(from, fee.value::()); } } diff --git a/pallets/fees/src/mock.rs b/pallets/fees/src/mock.rs index 3aef16059f..64dae18a96 100644 --- a/pallets/fees/src/mock.rs +++ b/pallets/fees/src/mock.rs @@ -1,65 +1,38 @@ use frame_support::{ - parameter_types, - traits::{EitherOfDiverse, Everything, FindAuthor, SortedMembers}, + derive_impl, parameter_types, + traits::{EitherOfDiverse, FindAuthor, SortedMembers}, ConsensusEngineId, PalletId, }; use frame_system::{EnsureRoot, EnsureSignedBy}; -use sp_core::H256; -use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, -}; +use sp_runtime::{traits::ConstU64, BuildStorage}; use crate::{self as pallet_fees, *}; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; type Balance = u64; // For testing the pallet, we construct a mock runtime. frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Authorship: pallet_authorship::{Pallet, Storage}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Fees: pallet_fees::{Pallet, Call, Config, Storage, Event}, - Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event}, + pub enum Runtime { + System: frame_system, + Authorship: pallet_authorship, + Balances: pallet_balances, + Fees: pallet_fees, + Treasury: pallet_treasury, } ); -parameter_types! { - pub const BlockHashCount: u64 = 250; -} - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; - type AccountId = u64; - type BaseCallFilter = Everything; - type BlockHashCount = BlockHashCount; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = frame_support::traits::ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = (); - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = (); - type SystemWeightInfo = (); - type Version = (); + type Block = frame_system::mocking::MockBlock; +} + +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] +impl pallet_balances::Config for Runtime { + type AccountStore = System; + type DustRemoval = (); + type ExistentialDeposit = ConstU64<1>; + type RuntimeHoldReason = (); } pub struct AuthorGiven; @@ -94,33 +67,13 @@ impl pallet_treasury::Config for Runtime { type ProposalBondMaximum = (); type ProposalBondMinimum = (); type RejectOrigin = EnsureSignedBy; - type RuntimeEvent = (); + type RuntimeEvent = RuntimeEvent; type SpendFunds = (); type SpendOrigin = EnsureSignedBy; type SpendPeriod = (); type WeightInfo = (); } -parameter_types! { - pub const ExistentialDeposit: u64 = 1; -} - -impl pallet_balances::Config for Runtime { - type AccountStore = System; - type Balance = Balance; - type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type FreezeIdentifier = (); - type HoldIdentifier = (); - type MaxFreezes = (); - type MaxHolds = frame_support::traits::ConstU32<1>; - type MaxLocks = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type RuntimeEvent = (); - type WeightInfo = (); -} - parameter_types! { pub const Admin: u64 = 1; pub const DefaultFeeValue: Balance = 1; @@ -137,7 +90,7 @@ impl Config for Runtime { type DefaultFeeValue = DefaultFeeValue; type FeeChangeOrigin = EitherOfDiverse, EnsureSignedBy>; type FeeKey = u8; - type RuntimeEvent = (); + type RuntimeEvent = RuntimeEvent; type Treasury = Treasury; type WeightInfo = (); } @@ -147,8 +100,8 @@ pub const USER_INITIAL_BALANCE: u64 = 50; // Build genesis storage according to the mock runtime. pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); pallet_balances::GenesisConfig:: { diff --git a/pallets/foreign-investments/src/mock.rs b/pallets/foreign-investments/src/mock.rs index 9067ed74d3..f772a2093c 100644 --- a/pallets/foreign-investments/src/mock.rs +++ b/pallets/foreign-investments/src/mock.rs @@ -1,20 +1,12 @@ use cfg_traits::investments::TrancheCurrency; use cfg_types::investments::{ExecutedForeignCollect, ExecutedForeignDecreaseInvest}; -use frame_support::traits::{ConstU16, ConstU32, ConstU64}; +use frame_support::derive_impl; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; -use sp_core::H256; -use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, - FixedU128, -}; +use sp_runtime::FixedU128; use crate::{pallet as pallet_foreign_investments, FulfilledSwapHook, SwapId}; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; - pub type AccountId = u64; pub type Balance = u128; pub type TrancheId = u32; @@ -43,11 +35,7 @@ impl TrancheCurrency for InvestmentId { } frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Runtime { System: frame_system, MockInvestment: cfg_mocks::investment::pallet, MockTokenSwaps: cfg_mocks::token_swaps::pallet, @@ -60,31 +48,9 @@ frame_support::construct_runtime!( } ); +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { - type AccountData = (); - type AccountId = AccountId; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = ConstU64<250>; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = ConstU16<42>; - type SystemWeightInfo = (); - type Version = (); + type Block = frame_system::mocking::MockBlock; } impl cfg_mocks::investment::pallet::Config for Runtime { @@ -156,11 +122,5 @@ impl pallet_foreign_investments::Config for Runtime { } pub fn new_test_ext() -> sp_io::TestExternalities { - let storage = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap(); - - let mut ext = sp_io::TestExternalities::new(storage); - ext.execute_with(|| frame_system::Pallet::::set_block_number(1)); - ext + System::externalities() } diff --git a/pallets/interest-accrual/src/lib.rs b/pallets/interest-accrual/src/lib.rs index e5767e9159..42147bed22 100644 --- a/pallets/interest-accrual/src/lib.rs +++ b/pallets/interest-accrual/src/lib.rs @@ -57,7 +57,7 @@ //! When we want to compute the interest accrued on some value, the //! high-level equation is: //! -//! ```ignore +//! ```text //! rate_per_second.pow(debt_age) * debt_base_value //! ``` //! @@ -67,7 +67,7 @@ //! created at the same time as each other (or the rate), we must //! include a correction factor to the shared interest rate accrual: //! -//! ```ignore +//! ```text //! correction_factor = ???; //! rate_per_second.pow(rate_age) * debt_base_value / correction_factor //! ``` @@ -75,7 +75,7 @@ //! This correction factor is just the accumulated interest at the //! time the debt was created: //! -//! ```ignore +//! ```text //! correction_factor = rate_per_second.pow(rate_age_at_time_of_debt_creation); //! rate_per_second.pow(rate_age) * debt_base_value / correction_factor //! // Equivalent to: @@ -86,7 +86,7 @@ //! precompute the correction factor applied to the base debt as the //! normalized debt //! -//! ```ignore +//! ```text //! normalized_debt = debt_base_value / rate_per_second.pow(rate_age_at_time_of_debt_creation); //! ``` //! @@ -108,7 +108,7 @@ //! over" with a new base debt - our accrued debt from the old rate - //! and a new interest rate. //! -//! ```ignore +//! ```text //! current_debt = normalized_debt * accrued_rate(old_interest_rate); //! normalized_debt = current_debt / accrued_rate(new_interest_rate); //! ``` @@ -128,7 +128,8 @@ use cfg_traits::{ Seconds, TimeAsSecs, }; use cfg_types::adjustments::Adjustment; -use frame_support::{BoundedVec, RuntimeDebug}; +use frame_support::{pallet_prelude::RuntimeDebug, BoundedVec}; +use frame_system::pallet_prelude::BlockNumberFor; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_arithmetic::traits::{checked_pow, One, Zero}; @@ -244,8 +245,8 @@ pub mod pallet { } #[pallet::hooks] - impl Hooks for Pallet { - fn on_initialize(_: T::BlockNumber) -> Weight { + impl Hooks> for Pallet { + fn on_initialize(_: BlockNumberFor) -> Weight { let then = LastUpdated::::get(); let now = T::Time::now(); LastUpdated::::set(now); diff --git a/pallets/interest-accrual/src/mock.rs b/pallets/interest-accrual/src/mock.rs index 970e226f0d..e19324e0bf 100644 --- a/pallets/interest-accrual/src/mock.rs +++ b/pallets/interest-accrual/src/mock.rs @@ -1,50 +1,24 @@ use cfg_traits::Millis; -use frame_support::{parameter_types, traits::Hooks, weights::constants::RocksDbWeight}; -use sp_core::H256; +use frame_support::{derive_impl, parameter_types, traits::Hooks}; use sp_io::TestExternalities; -use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, -}; +use sp_runtime::BuildStorage; use crate::*; pub type Balance = u128; pub type Rate = sp_arithmetic::fixed_point::FixedU128; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; - -parameter_types! { - pub const BlockHashCount: u64 = 250; - pub const SS58Prefix: u8 = 42; -} +frame_support::construct_runtime!( + pub enum Runtime { + System: frame_system, + Timestamp: pallet_timestamp, + InterestAccrual: crate, + } +); +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { - type AccountData = (); - type AccountId = u64; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = BlockHashCount; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = RocksDbWeight; - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = frame_support::traits::ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = SS58Prefix; - type SystemWeightInfo = (); - type Version = (); + type Block = frame_system::mocking::MockBlock; } impl pallet_timestamp::Config for Runtime { @@ -67,26 +41,15 @@ impl Config for Runtime { type Weights = (); } -// Configure a mock runtime to test the pallet. -frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, - InterestAccrual: crate::{Pallet, Storage, Event}, - } -); - +#[allow(unused)] pub fn new_test_ext() -> sp_io::TestExternalities { const SECONDS: u64 = 1000; const START_DATE: u64 = 1640995200; - let storage = frame_system::GenesisConfig::default() - .build_storage::() + let storage = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); + let mut externalities = TestExternalities::new(storage); externalities.execute_with(|| { System::set_block_number(1); diff --git a/pallets/investments/src/benchmarking.rs b/pallets/investments/src/benchmarking.rs index 719b0ac07b..52ad8ac5b3 100644 --- a/pallets/investments/src/benchmarking.rs +++ b/pallets/investments/src/benchmarking.rs @@ -20,6 +20,7 @@ use frame_benchmarking::{account, impl_benchmark_test_suite, v2::*, whitelisted_ use frame_support::traits::fungibles::Mutate; use frame_system::RawOrigin; use sp_runtime::{traits::One, Perquintill}; +use sp_std::vec; // required for #[benchmarks] use crate::{Call, Config, CurrencyOf, Pallet}; @@ -154,6 +155,6 @@ mod benchmarks { impl_benchmark_test_suite!( Pallet, crate::mock::TestExternalitiesBuilder::build(), - crate::mock::MockRuntime + crate::mock::Runtime ); } diff --git a/pallets/investments/src/mock.rs b/pallets/investments/src/mock.rs index 206612635f..e405d63aae 100644 --- a/pallets/investments/src/mock.rs +++ b/pallets/investments/src/mock.rs @@ -23,6 +23,7 @@ use cfg_types::{ tokens::CurrencyId, }; use frame_support::{ + derive_impl, dispatch::DispatchResultWithPostInfo, parameter_types, traits::{ @@ -30,9 +31,8 @@ use frame_support::{ fungibles::{Inspect, Mutate}, Fortitude, Precision, Preservation, }, - GenesisBuild, Nothing, + Nothing, }, - RuntimeDebug, }; use orml_traits::GetByKey; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; @@ -40,10 +40,7 @@ use scale_info::TypeInfo; use serde::{Deserialize, Serialize}; use sp_arithmetic::{FixedPointNumber, Perquintill}; use sp_io::TestExternalities; -use sp_runtime::{ - traits::{AccountIdConversion, BlakeTwo256, IdentityLookup}, - DispatchError, DispatchResult, -}; +use sp_runtime::{traits::AccountIdConversion, BuildStorage, DispatchError, DispatchResult}; use sp_std::{ cell::RefCell, collections::btree_map::BTreeMap, @@ -53,54 +50,22 @@ use sp_std::{ pub use crate as pallet_investments; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; -pub type MockAccountId = u64; +pub type AccountId = u64; frame_support::construct_runtime!( - pub enum MockRuntime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Investments: pallet_investments::{Pallet, Call, Storage, Event}, - OrmlTokens: orml_tokens::{Pallet, Storage, Event, Config}, - Balances: pallet_balances::{Pallet, Storage, Event}, + pub enum Runtime { + System: frame_system, + Investments: pallet_investments, + OrmlTokens: orml_tokens, + Balances: pallet_balances, MockAccountant: cfg_mocks::pallet_mock_pools, } ); -parameter_types! { - pub const BlockHashCount: u32 = 250; - pub const SS58Prefix: u8 = 42; -} - -impl frame_system::Config for MockRuntime { +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] +impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; - type AccountId = MockAccountId; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = BlockHashCount; - type BlockLength = (); - type BlockNumber = BlockNumber; - type BlockWeights = (); - type DbWeight = (); - type Hash = Hash; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = Index; - type Lookup = IdentityLookup; - type MaxConsumers = frame_support::traits::ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = SS58Prefix; - type SystemWeightInfo = (); - type Version = (); + type Block = frame_system::mocking::MockBlock; } parameter_types! { @@ -114,7 +79,7 @@ impl GetByKey for ExistentialDeposit { } } -impl orml_tokens::Config for MockRuntime { +impl orml_tokens::Config for Runtime { type Amount = i64; type Balance = Balance; type CurrencyHooks = (); @@ -132,23 +97,16 @@ parameter_types! { pub const ExistentialDeposit: u128 = 1; } -impl pallet_balances::Config for MockRuntime { +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] +impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; - type FreezeIdentifier = (); - type HoldIdentifier = (); - type MaxFreezes = (); - type MaxHolds = frame_support::traits::ConstU32<1>; - type MaxLocks = MaxLocks; - type MaxReserves = (); - type ReserveIdentifier = (); - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); + type RuntimeHoldReason = (); } -impl cfg_mocks::pallet_mock_pools::Config for MockRuntime { +impl cfg_mocks::pallet_mock_pools::Config for Runtime { type Balance = Balance; type BalanceRatio = Quantity; type CurrencyId = CurrencyId; @@ -160,7 +118,7 @@ impl cfg_mocks::pallet_mock_pools::Config for MockRuntime { pub struct NoopCollectHook; impl cfg_traits::StatusNotificationHook for NoopCollectHook { type Error = sp_runtime::DispatchError; - type Id = (MockAccountId, InvestmentId); + type Id = (AccountId, InvestmentId); type Status = cfg_types::investments::CollectedAmount; fn notify_status_change(_id: Self::Id, _status: Self::Status) -> DispatchResult { @@ -172,8 +130,7 @@ parameter_types! { pub const MaxOutstandingCollect: u32 = 10; } -impl pallet_investments::Config for MockRuntime { - //type Accountant = MockAccountant; +impl pallet_investments::Config for Runtime { type Accountant = MockAccountant; type Amount = Balance; type BalanceRatio = Quantity; @@ -205,7 +162,7 @@ impl PreConditions for Always { Encode, Decode, PartialEq, - RuntimeDebug, + Debug, Ord, PartialOrd, Eq, @@ -248,15 +205,15 @@ impl From for CurrencyId { pub struct TestExternalitiesBuilder; parameter_types! { - pub const InvestorA: MockAccountId = 1; - pub const InvestorB: MockAccountId = 2; - pub const InvestorC: MockAccountId = 3; - pub const InvestorD: MockAccountId = 4; - pub const TrancheHolderA: MockAccountId = 11; - pub const TrancheHolderB: MockAccountId = 12; - pub const TrancheHolderC: MockAccountId = 13; - pub const TrancheHolderD: MockAccountId = 14; - pub const Owner: MockAccountId = 100; + pub const InvestorA: AccountId = 1; + pub const InvestorB: AccountId = 2; + pub const InvestorC: AccountId = 3; + pub const InvestorD: AccountId = 4; + pub const TrancheHolderA: AccountId = 11; + pub const TrancheHolderB: AccountId = 12; + pub const TrancheHolderC: AccountId = 13; + pub const TrancheHolderD: AccountId = 14; + pub const Owner: AccountId = 100; } /// The pool id we use for tests @@ -291,11 +248,11 @@ pub const AUSD_CURRENCY_ID: CurrencyId = CurrencyId::ForeignAsset(1); impl TestExternalitiesBuilder { // Build a genesis storage key/value store pub(crate) fn build() -> TestExternalities { - let mut storage = frame_system::GenesisConfig::default() - .build_storage::() + let mut storage = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); - orml_tokens::GenesisConfig:: { + orml_tokens::GenesisConfig:: { balances: vec![ // Owner holds enough capital to satisfy redemptions ( @@ -404,7 +361,7 @@ pub fn configure_accountant_mock() { let state = state.clone(); move |id, source, dest, amount| { let _ = get(&state, id)?; - >::transfer( + >::transfer( id.into(), source, dest, @@ -419,7 +376,7 @@ pub fn configure_accountant_mock() { let state = state.clone(); move |buyer, id, amount| { let _ = get(&state, id)?; - >::mint_into(id.into(), buyer, amount).map(|_| ()) + >::mint_into(id.into(), buyer, amount).map(|_| ()) } }); @@ -427,7 +384,7 @@ pub fn configure_accountant_mock() { let state = state.clone(); move |seller, id, amount| { let _ = get(&state, id)?; - >::burn_from( + >::burn_from( id.into(), seller, amount, @@ -440,25 +397,25 @@ pub fn configure_accountant_mock() { } pub(crate) fn last_event() -> RuntimeEvent { - let events = frame_system::Pallet::::events(); + let events = frame_system::Pallet::::events(); // compare to the last event record let frame_system::EventRecord { event, .. } = &events[events.len().saturating_sub(1)]; event.clone() } pub(crate) fn n_last_event(n: usize) -> RuntimeEvent { - let events = frame_system::Pallet::::events(); + let events = frame_system::Pallet::::events(); // compare to the last event record let frame_system::EventRecord { event, .. } = &events[events.len().saturating_sub(n + 1)]; event.clone() } -pub(crate) fn investment_account(investment_id: InvestmentId) -> MockAccountId { +pub(crate) fn investment_account(investment_id: InvestmentId) -> AccountId { InvestmentAccount { investment_id }.into_account_truncating() } -pub(crate) fn free_balance_of(who: MockAccountId, currency_id: CurrencyId) -> Balance { - as orml_traits::MultiCurrency>::free_balance( +pub(crate) fn free_balance_of(who: AccountId, currency_id: CurrencyId) -> Balance { + as orml_traits::MultiCurrency>::free_balance( currency_id, &who, ) @@ -575,7 +532,7 @@ pub(crate) fn invest_x_fulfill_x( /// Invest given amount per Investor into INVESTMENT_0_0 and fulfills /// the given fulfillment. pub(crate) fn invest_x_per_fulfill_x( - invest_per_investor: Vec<(MockAccountId, Balance)>, + invest_per_investor: Vec<(AccountId, Balance)>, fulfillment: FulfillmentWithPrice, ) -> DispatchResult { for (who, amount) in invest_per_investor { @@ -625,7 +582,7 @@ pub(crate) fn redeem_x_fulfill_x( /// Invest given amount per Investor into INVESTMENT_0_0 and fulfills /// the given fulfillment. pub(crate) fn redeem_x_per_fulfill_x( - redeem_per_investor: Vec<(MockAccountId, Balance)>, + redeem_per_investor: Vec<(AccountId, Balance)>, fulfillment: FulfillmentWithPrice, ) -> DispatchResult { for (who, amount) in redeem_per_investor { diff --git a/pallets/investments/src/tests.rs b/pallets/investments/src/tests.rs index ebea7701f1..e0f2ca4dc6 100644 --- a/pallets/investments/src/tests.rs +++ b/pallets/investments/src/tests.rs @@ -30,7 +30,7 @@ fn fails_with_unknown_investment() { UNKNOWN_INVESTMENT, 2 * amount, ), - Error::::UnknownInvestment + Error::::UnknownInvestment ); assert_noop!( Investments::update_redeem_order( @@ -38,7 +38,7 @@ fn fails_with_unknown_investment() { UNKNOWN_INVESTMENT, 2 * amount, ), - Error::::UnknownInvestment + Error::::UnknownInvestment ); }) } @@ -52,15 +52,12 @@ fn update_invest_works() { { // assert total order is well formed assert_eq!( - InProcessingInvestOrders::::get(INVESTMENT_0_0,), + InProcessingInvestOrders::::get(INVESTMENT_0_0,), None ); + assert_eq!(ClearedInvestOrders::::get(INVESTMENT_0_0, 0), None); assert_eq!( - ClearedInvestOrders::::get(INVESTMENT_0_0, 0), - None - ); - assert_eq!( - ActiveInvestOrders::::get(INVESTMENT_0_0,), + ActiveInvestOrders::::get(INVESTMENT_0_0,), TotalOrder { amount: 0 } ); } @@ -69,11 +66,11 @@ fn update_invest_works() { { // assert the user orders are empty at start assert_eq!( - InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), None ); assert_eq!( - InvestOrders::::get(InvestorB::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorB::get(), INVESTMENT_0_0), None ); } @@ -113,12 +110,12 @@ fn update_invest_works() { { // assert the user order is well formed assert_eq!( - InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), Some(Order::new(2 * amount, 0)) ); // assert total order is well formed assert_eq!( - ActiveInvestOrders::::get(INVESTMENT_0_0,), + ActiveInvestOrders::::get(INVESTMENT_0_0,), TotalOrder { amount: 2 * amount } ); } @@ -204,7 +201,7 @@ fn update_invest_works() { .into() ); assert_eq!( - InvestOrders::::get(InvestorB::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorB::get(), INVESTMENT_0_0), Some(Order::new(amount, 0)) ); } @@ -214,12 +211,12 @@ fn update_invest_works() { { // assert the user order is well formed assert_eq!( - InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), Some(Order::new(amount, 0)) ); // assert total order is well formed assert_eq!( - ActiveInvestOrders::::get(INVESTMENT_0_0,), + ActiveInvestOrders::::get(INVESTMENT_0_0,), TotalOrder { amount: 2 * amount } ); } @@ -239,7 +236,7 @@ fn update_invest_to_zero_removes_order() { // Storage is set assert_eq!( - InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), Some(Order::new(2 * amount, 0)) ); @@ -251,7 +248,7 @@ fn update_invest_to_zero_removes_order() { // Storage is removed assert_eq!( - InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), None ); }) @@ -282,7 +279,7 @@ fn update_invest_fails_when_collect_needed() { INVESTMENT_0_0, amount, ), - Error::::CollectRequired + Error::::CollectRequired ); assert_noop!( Investments::update_invest_order( @@ -290,7 +287,7 @@ fn update_invest_fails_when_collect_needed() { INVESTMENT_0_0, amount, ), - Error::::CollectRequired + Error::::CollectRequired ); assert_noop!( Investments::update_invest_order( @@ -298,13 +295,13 @@ fn update_invest_fails_when_collect_needed() { INVESTMENT_0_0, amount, ), - Error::::CollectRequired + Error::::CollectRequired ); } // Assert that the orderId is increased { - assert_eq!(InvestOrderId::::get(INVESTMENT_0_0), 1); + assert_eq!(InvestOrderId::::get(INVESTMENT_0_0), 1); } // Updating a redeem order is fine, as we have not yet requested @@ -338,15 +335,12 @@ fn update_redeem_works() { { // assert total order is well formed assert_eq!( - InProcessingRedeemOrders::::get(INVESTMENT_0_0,), - None - ); - assert_eq!( - ClearedRedeemOrders::::get(INVESTMENT_0_0, 0), + InProcessingRedeemOrders::::get(INVESTMENT_0_0,), None ); + assert_eq!(ClearedRedeemOrders::::get(INVESTMENT_0_0, 0), None); assert_eq!( - ActiveRedeemOrders::::get(INVESTMENT_0_0,), + ActiveRedeemOrders::::get(INVESTMENT_0_0,), TotalOrder { amount: 0 } ); } @@ -355,11 +349,11 @@ fn update_redeem_works() { { // assert the user orders are empty at start assert_eq!( - RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), None ); assert_eq!( - RedeemOrders::::get(TrancheHolderB::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderB::get(), INVESTMENT_0_0), None ); } @@ -402,12 +396,12 @@ fn update_redeem_works() { { // assert the user order is well formed assert_eq!( - RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), Some(Order::new(2 * amount, 0)) ); // assert total order is well formed assert_eq!( - ActiveRedeemOrders::::get(INVESTMENT_0_0,), + ActiveRedeemOrders::::get(INVESTMENT_0_0,), TotalOrder { amount: 2 * amount } ); } @@ -493,7 +487,7 @@ fn update_redeem_works() { .into() ); assert_eq!( - RedeemOrders::::get(TrancheHolderB::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderB::get(), INVESTMENT_0_0), Some(Order::new(amount, 0)) ); } @@ -503,12 +497,12 @@ fn update_redeem_works() { { // assert the user order is well formed assert_eq!( - RedeemOrders::::get(TrancheHolderB::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderB::get(), INVESTMENT_0_0), Some(Order::new(amount, 0)) ); // assert total order is well formed assert_eq!( - ActiveRedeemOrders::::get(INVESTMENT_0_0,), + ActiveRedeemOrders::::get(INVESTMENT_0_0,), TotalOrder { amount: 2 * amount } ); } @@ -528,7 +522,7 @@ fn update_redeem_to_zero_removes_order() { // Storage is set assert_eq!( - RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), Some(Order::new(2 * amount, 0)) ); @@ -540,7 +534,7 @@ fn update_redeem_to_zero_removes_order() { // Storage is removed assert_eq!( - RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), None ); }) @@ -561,7 +555,7 @@ fn update_redeem_fails_when_collect_needed() { // Assert that the orderId is increased { - assert_eq!(RedeemOrderId::::get(INVESTMENT_0_0), 1); + assert_eq!(RedeemOrderId::::get(INVESTMENT_0_0), 1); } // During the above setup, we fulfill the @@ -576,7 +570,7 @@ fn update_redeem_fails_when_collect_needed() { INVESTMENT_0_0, amount, ), - Error::::CollectRequired + Error::::CollectRequired ); assert_noop!( Investments::update_redeem_order( @@ -584,7 +578,7 @@ fn update_redeem_fails_when_collect_needed() { INVESTMENT_0_0, amount, ), - Error::::CollectRequired + Error::::CollectRequired ); assert_noop!( Investments::update_redeem_order( @@ -592,7 +586,7 @@ fn update_redeem_fails_when_collect_needed() { INVESTMENT_0_0, amount, ), - Error::::CollectRequired + Error::::CollectRequired ); } @@ -645,17 +639,17 @@ fn fulfillment_flow_for_everything_works() { Investments::process_invest_orders(INVESTMENT_0_0).expect("Did not call it twice"); assert_noop!( Investments::process_invest_orders(INVESTMENT_0_0), - Error::::OrderInProcessing + Error::::OrderInProcessing ); - assert_eq!(InvestOrderId::::get(INVESTMENT_0_0), 1); + assert_eq!(InvestOrderId::::get(INVESTMENT_0_0), 1); assert_eq! { invest_orders, TotalOrder{ amount: TOTAL_INVEST_AMOUNT} }; assert_eq! { - InProcessingInvestOrders::::get(INVESTMENT_0_0), + InProcessingInvestOrders::::get(INVESTMENT_0_0), Some(TotalOrder { amount: TOTAL_INVEST_AMOUNT}) }; - assert_eq! {ActiveInvestOrders::::get(INVESTMENT_0_0), TotalOrder{amount: 0}}; + assert_eq! {ActiveInvestOrders::::get(INVESTMENT_0_0), TotalOrder{amount: 0}}; assert_eq! { last_event(), Event::InvestOrdersInProcessing { @@ -676,11 +670,11 @@ fn fulfillment_flow_for_everything_works() { assert_ok!(Investments::invest_fulfillment(INVESTMENT_0_0, fulfillment)); assert_noop!( Investments::invest_fulfillment(INVESTMENT_0_0, fulfillment), - Error::::OrderNotInProcessing + Error::::OrderNotInProcessing ); assert_eq!( last_event(), - Event::::InvestOrdersCleared { + Event::::InvestOrdersCleared { investment_id: INVESTMENT_0_0, order_id: 0, fulfillment @@ -688,15 +682,15 @@ fn fulfillment_flow_for_everything_works() { .into() ); assert_eq!( - InProcessingInvestOrders::::get(INVESTMENT_0_0), + InProcessingInvestOrders::::get(INVESTMENT_0_0), None ); assert_eq!( - ClearedInvestOrders::::get(INVESTMENT_0_0, 0), + ClearedInvestOrders::::get(INVESTMENT_0_0, 0), Some(fulfillment) ); assert_eq!( - ActiveInvestOrders::::get(INVESTMENT_0_0), + ActiveInvestOrders::::get(INVESTMENT_0_0), TotalOrder::default() ); } @@ -732,17 +726,17 @@ fn fulfillment_flow_for_everything_works() { Investments::process_redeem_orders(INVESTMENT_0_0).expect("Did not call it twice"); assert_noop!( Investments::process_redeem_orders(INVESTMENT_0_0), - Error::::OrderInProcessing + Error::::OrderInProcessing ); - assert_eq!(RedeemOrderId::::get(INVESTMENT_0_0), 1); + assert_eq!(RedeemOrderId::::get(INVESTMENT_0_0), 1); assert_eq! { redeem_orders, TotalOrder{ amount: TOTAL_REDEEM_AMOUNT} }; assert_eq! { - InProcessingRedeemOrders::::get(INVESTMENT_0_0), + InProcessingRedeemOrders::::get(INVESTMENT_0_0), Some(TotalOrder { amount: TOTAL_REDEEM_AMOUNT}) }; - assert_eq! {ActiveRedeemOrders::::get(INVESTMENT_0_0), TotalOrder{amount: 0}}; + assert_eq! {ActiveRedeemOrders::::get(INVESTMENT_0_0), TotalOrder{amount: 0}}; assert_eq! { last_event(), Event::RedeemOrdersInProcessing { @@ -763,11 +757,11 @@ fn fulfillment_flow_for_everything_works() { assert_ok!(Investments::redeem_fulfillment(INVESTMENT_0_0, fulfillment)); assert_noop!( Investments::redeem_fulfillment(INVESTMENT_0_0, fulfillment), - Error::::OrderNotInProcessing + Error::::OrderNotInProcessing ); assert_eq!( last_event(), - Event::::RedeemOrdersCleared { + Event::::RedeemOrdersCleared { investment_id: INVESTMENT_0_0, order_id: 0, fulfillment @@ -775,15 +769,15 @@ fn fulfillment_flow_for_everything_works() { .into() ); assert_eq!( - InProcessingRedeemOrders::::get(INVESTMENT_0_0), + InProcessingRedeemOrders::::get(INVESTMENT_0_0), None ); assert_eq!( - ClearedRedeemOrders::::get(INVESTMENT_0_0, 0), + ClearedRedeemOrders::::get(INVESTMENT_0_0, 0), Some(fulfillment) ); assert_eq!( - ActiveRedeemOrders::::get(INVESTMENT_0_0), + ActiveRedeemOrders::::get(INVESTMENT_0_0), TotalOrder::default() ); } @@ -940,7 +934,7 @@ fn fulfillment_partially_works_low_price() { // We check the TotalOrders flow over correctly { assert_eq!( - ActiveInvestOrders::::get(INVESTMENT_0_0), + ActiveInvestOrders::::get(INVESTMENT_0_0), TotalOrder { amount: SINGLE_INVEST_AMOUNT .checked_add(PERC_INVEST_UNFULFILL.mul_floor(TOTAL_INVEST_AMOUNT)) @@ -948,7 +942,7 @@ fn fulfillment_partially_works_low_price() { } ); assert_eq!( - ActiveRedeemOrders::::get(INVESTMENT_0_0), + ActiveRedeemOrders::::get(INVESTMENT_0_0), TotalOrder { amount: SINGLE_REDEEM_AMOUNT .checked_add(PERC_REDEEM_UNFULFILL.mul_floor(TOTAL_REDEEM_AMOUNT)) @@ -969,7 +963,7 @@ fn fulfillment_partially_works_low_price() { T_BALANCE_POST_COLLECT_INVEST ); assert_eq!( - InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), Some(Order::new( SINGLE_INVEST_AMOUNT .checked_sub(PERC_INVEST_FULFILL.mul_floor(SINGLE_INVEST_AMOUNT)) @@ -979,7 +973,7 @@ fn fulfillment_partially_works_low_price() { ); assert_eq!( n_last_event(2), - Event::::InvestOrderUpdated { + Event::::InvestOrderUpdated { investment_id: INVESTMENT_0_0, submitted_at: 1, who: InvestorA::get(), @@ -989,7 +983,7 @@ fn fulfillment_partially_works_low_price() { ); assert_eq!( n_last_event(1), - Event::::InvestOrdersCollected { + Event::::InvestOrdersCollected { investment_id: INVESTMENT_0_0, who: InvestorA::get(), processed_orders: vec![0], @@ -1010,7 +1004,7 @@ fn fulfillment_partially_works_low_price() { ); assert_eq!( last_event(), - Event::::RedeemCollectedWithoutActivePosition { + Event::::RedeemCollectedWithoutActivePosition { investment_id: INVESTMENT_0_0, who: InvestorA::get() } @@ -1028,7 +1022,7 @@ fn fulfillment_partially_works_low_price() { T_BALANCE_POST_COLLECT_INVEST ); assert_eq!( - InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), Some(Order::new( SINGLE_INVEST_AMOUNT .checked_sub(PERC_INVEST_FULFILL.mul_floor(SINGLE_INVEST_AMOUNT)) @@ -1038,7 +1032,7 @@ fn fulfillment_partially_works_low_price() { ); assert_eq!( n_last_event(1), - Event::::InvestCollectedForNonClearedOrderId { + Event::::InvestCollectedForNonClearedOrderId { investment_id: INVESTMENT_0_0, who: InvestorA::get() } @@ -1046,7 +1040,7 @@ fn fulfillment_partially_works_low_price() { ); assert_eq!( last_event(), - Event::::RedeemCollectedWithoutActivePosition { + Event::::RedeemCollectedWithoutActivePosition { investment_id: INVESTMENT_0_0, who: InvestorA::get() } @@ -1066,7 +1060,7 @@ fn fulfillment_partially_works_low_price() { T_BALANCE_POST_COLLECT_INVEST ); assert_eq!( - InvestOrders::::get(InvestorB::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorB::get(), INVESTMENT_0_0), Some(Order::new( SINGLE_INVEST_AMOUNT .checked_sub(PERC_INVEST_FULFILL.mul_floor(SINGLE_INVEST_AMOUNT)) @@ -1076,7 +1070,7 @@ fn fulfillment_partially_works_low_price() { ); assert_eq!( n_last_event(2), - Event::::InvestOrderUpdated { + Event::::InvestOrderUpdated { investment_id: INVESTMENT_0_0, submitted_at: 1, who: InvestorB::get(), @@ -1086,7 +1080,7 @@ fn fulfillment_partially_works_low_price() { ); assert_eq!( n_last_event(1), - Event::::InvestOrdersCollected { + Event::::InvestOrdersCollected { investment_id: INVESTMENT_0_0, who: InvestorB::get(), processed_orders: vec![0], @@ -1107,7 +1101,7 @@ fn fulfillment_partially_works_low_price() { ); assert_eq!( last_event(), - Event::::RedeemCollectedWithoutActivePosition { + Event::::RedeemCollectedWithoutActivePosition { investment_id: INVESTMENT_0_0, who: InvestorB::get() } @@ -1125,7 +1119,7 @@ fn fulfillment_partially_works_low_price() { T_BALANCE_POST_COLLECT_INVEST ); assert_eq!( - InvestOrders::::get(InvestorB::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorB::get(), INVESTMENT_0_0), Some(Order::new( SINGLE_INVEST_AMOUNT .checked_sub(PERC_INVEST_FULFILL.mul_floor(SINGLE_INVEST_AMOUNT)) @@ -1135,7 +1129,7 @@ fn fulfillment_partially_works_low_price() { ); assert_eq!( n_last_event(1), - Event::::InvestCollectedForNonClearedOrderId { + Event::::InvestCollectedForNonClearedOrderId { investment_id: INVESTMENT_0_0, who: InvestorB::get() } @@ -1143,7 +1137,7 @@ fn fulfillment_partially_works_low_price() { ); assert_eq!( last_event(), - Event::::RedeemCollectedWithoutActivePosition { + Event::::RedeemCollectedWithoutActivePosition { investment_id: INVESTMENT_0_0, who: InvestorB::get() } @@ -1159,7 +1153,7 @@ fn fulfillment_partially_works_low_price() { )); assert_eq!( n_last_event(1), - Event::::InvestCollectedForNonClearedOrderId { + Event::::InvestCollectedForNonClearedOrderId { investment_id: INVESTMENT_0_0, who: InvestorD::get() } @@ -1167,7 +1161,7 @@ fn fulfillment_partially_works_low_price() { ); assert_eq!( last_event(), - Event::::RedeemCollectedWithoutActivePosition { + Event::::RedeemCollectedWithoutActivePosition { investment_id: INVESTMENT_0_0, who: InvestorD::get() } @@ -1186,7 +1180,7 @@ fn fulfillment_partially_works_low_price() { AUSD_BALANCE_POST_COLLECT_REDEEM ); assert_eq!( - RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), Some(Order::new( SINGLE_REDEEM_AMOUNT .checked_sub(PERC_REDEEM_FULFILL.mul_floor(SINGLE_REDEEM_AMOUNT)) @@ -1196,7 +1190,7 @@ fn fulfillment_partially_works_low_price() { ); assert_eq!( n_last_event(4), - Event::::InvestCollectedWithoutActivePosition { + Event::::InvestCollectedWithoutActivePosition { investment_id: INVESTMENT_0_0, who: TrancheHolderA::get() } @@ -1204,7 +1198,7 @@ fn fulfillment_partially_works_low_price() { ); assert_eq!( n_last_event(1), - Event::::RedeemOrderUpdated { + Event::::RedeemOrderUpdated { investment_id: INVESTMENT_0_0, submitted_at: 1, who: TrancheHolderA::get(), @@ -1214,7 +1208,7 @@ fn fulfillment_partially_works_low_price() { ); assert_eq!( last_event(), - Event::::RedeemOrdersCollected { + Event::::RedeemOrdersCollected { investment_id: INVESTMENT_0_0, who: TrancheHolderA::get(), processed_orders: vec![0], @@ -1243,7 +1237,7 @@ fn fulfillment_partially_works_low_price() { AUSD_BALANCE_POST_COLLECT_REDEEM ); assert_eq!( - RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), Some(Order::new( SINGLE_REDEEM_AMOUNT .checked_sub(PERC_REDEEM_FULFILL.mul_floor(SINGLE_REDEEM_AMOUNT)) @@ -1253,7 +1247,7 @@ fn fulfillment_partially_works_low_price() { ); assert_eq!( n_last_event(1), - Event::::InvestCollectedWithoutActivePosition { + Event::::InvestCollectedWithoutActivePosition { investment_id: INVESTMENT_0_0, who: TrancheHolderA::get() } @@ -1261,7 +1255,7 @@ fn fulfillment_partially_works_low_price() { ); assert_eq!( last_event(), - Event::::RedeemCollectedForNonClearedOrderId { + Event::::RedeemCollectedForNonClearedOrderId { investment_id: INVESTMENT_0_0, who: TrancheHolderA::get() } @@ -1325,11 +1319,11 @@ fn fulfillment_partially_works_low_price() { // Active Orders MUST be empty right now { assert_eq!( - ActiveInvestOrders::::get(INVESTMENT_0_0), + ActiveInvestOrders::::get(INVESTMENT_0_0), TotalOrder { amount: 0 } ); assert_eq!( - ActiveRedeemOrders::::get(INVESTMENT_0_0), + ActiveRedeemOrders::::get(INVESTMENT_0_0), TotalOrder { amount: 0 } ); } @@ -1433,70 +1427,70 @@ fn fulfillment_partially_works_low_price() { // UserOrders are empty assert_eq!( - InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), None ); assert_eq!( - InvestOrders::::get(InvestorB::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorB::get(), INVESTMENT_0_0), None ); assert_eq!( - InvestOrders::::get(InvestorC::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorC::get(), INVESTMENT_0_0), None ); assert_eq!( - InvestOrders::::get(InvestorD::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorD::get(), INVESTMENT_0_0), None ); assert_eq!( - RedeemOrders::::get(InvestorA::get(), INVESTMENT_0_0), + RedeemOrders::::get(InvestorA::get(), INVESTMENT_0_0), None ); assert_eq!( - RedeemOrders::::get(InvestorB::get(), INVESTMENT_0_0), + RedeemOrders::::get(InvestorB::get(), INVESTMENT_0_0), None ); assert_eq!( - RedeemOrders::::get(InvestorC::get(), INVESTMENT_0_0), + RedeemOrders::::get(InvestorC::get(), INVESTMENT_0_0), None ); assert_eq!( - RedeemOrders::::get(InvestorD::get(), INVESTMENT_0_0), + RedeemOrders::::get(InvestorD::get(), INVESTMENT_0_0), None ); assert_eq!( - RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), None ); assert_eq!( - RedeemOrders::::get(TrancheHolderB::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderB::get(), INVESTMENT_0_0), None ); assert_eq!( - RedeemOrders::::get(TrancheHolderC::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderC::get(), INVESTMENT_0_0), None ); assert_eq!( - RedeemOrders::::get(TrancheHolderD::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderD::get(), INVESTMENT_0_0), None ); assert_eq!( - InvestOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), + InvestOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), None ); assert_eq!( - InvestOrders::::get(TrancheHolderB::get(), INVESTMENT_0_0), + InvestOrders::::get(TrancheHolderB::get(), INVESTMENT_0_0), None ); assert_eq!( - InvestOrders::::get(TrancheHolderC::get(), INVESTMENT_0_0), + InvestOrders::::get(TrancheHolderC::get(), INVESTMENT_0_0), None ); assert_eq!( - InvestOrders::::get(TrancheHolderD::get(), INVESTMENT_0_0), + InvestOrders::::get(TrancheHolderD::get(), INVESTMENT_0_0), None ); } @@ -1628,7 +1622,7 @@ fn fulfillment_partially_works_high_price() { // We check the TotalOrders flow over correctly { assert_eq!( - ActiveInvestOrders::::get(INVESTMENT_0_0), + ActiveInvestOrders::::get(INVESTMENT_0_0), TotalOrder { amount: SINGLE_INVEST_AMOUNT .checked_add(PERC_INVEST_UNFULFILL.mul_floor(TOTAL_INVEST_AMOUNT)) @@ -1636,7 +1630,7 @@ fn fulfillment_partially_works_high_price() { } ); assert_eq!( - ActiveRedeemOrders::::get(INVESTMENT_0_0), + ActiveRedeemOrders::::get(INVESTMENT_0_0), TotalOrder { amount: SINGLE_REDEEM_AMOUNT .checked_add(PERC_REDEEM_UNFULFILL.mul_floor(TOTAL_REDEEM_AMOUNT)) @@ -1657,7 +1651,7 @@ fn fulfillment_partially_works_high_price() { T_BALANCE_POST_COLLECT_INVEST ); assert_eq!( - InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), Some(Order::new( SINGLE_INVEST_AMOUNT .checked_sub(PERC_INVEST_FULFILL.mul_floor(SINGLE_INVEST_AMOUNT)) @@ -1667,7 +1661,7 @@ fn fulfillment_partially_works_high_price() { ); assert_eq!( n_last_event(2), - Event::::InvestOrderUpdated { + Event::::InvestOrderUpdated { investment_id: INVESTMENT_0_0, submitted_at: 1, who: InvestorA::get(), @@ -1677,7 +1671,7 @@ fn fulfillment_partially_works_high_price() { ); assert_eq!( n_last_event(1), - Event::::InvestOrdersCollected { + Event::::InvestOrdersCollected { investment_id: INVESTMENT_0_0, who: InvestorA::get(), processed_orders: vec![0], @@ -1698,7 +1692,7 @@ fn fulfillment_partially_works_high_price() { ); assert_eq!( last_event(), - Event::::RedeemCollectedWithoutActivePosition { + Event::::RedeemCollectedWithoutActivePosition { investment_id: INVESTMENT_0_0, who: InvestorA::get() } @@ -1716,7 +1710,7 @@ fn fulfillment_partially_works_high_price() { T_BALANCE_POST_COLLECT_INVEST ); assert_eq!( - InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), Some(Order::new( SINGLE_INVEST_AMOUNT .checked_sub(PERC_INVEST_FULFILL.mul_floor(SINGLE_INVEST_AMOUNT)) @@ -1726,7 +1720,7 @@ fn fulfillment_partially_works_high_price() { ); assert_eq!( n_last_event(1), - Event::::InvestCollectedForNonClearedOrderId { + Event::::InvestCollectedForNonClearedOrderId { investment_id: INVESTMENT_0_0, who: InvestorA::get() } @@ -1734,7 +1728,7 @@ fn fulfillment_partially_works_high_price() { ); assert_eq!( last_event(), - Event::::RedeemCollectedWithoutActivePosition { + Event::::RedeemCollectedWithoutActivePosition { investment_id: INVESTMENT_0_0, who: InvestorA::get() } @@ -1754,7 +1748,7 @@ fn fulfillment_partially_works_high_price() { T_BALANCE_POST_COLLECT_INVEST ); assert_eq!( - InvestOrders::::get(InvestorB::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorB::get(), INVESTMENT_0_0), Some(Order::new( SINGLE_INVEST_AMOUNT .checked_sub(PERC_INVEST_FULFILL.mul_floor(SINGLE_INVEST_AMOUNT)) @@ -1764,7 +1758,7 @@ fn fulfillment_partially_works_high_price() { ); assert_eq!( n_last_event(2), - Event::::InvestOrderUpdated { + Event::::InvestOrderUpdated { investment_id: INVESTMENT_0_0, submitted_at: 1, who: InvestorB::get(), @@ -1774,7 +1768,7 @@ fn fulfillment_partially_works_high_price() { ); assert_eq!( n_last_event(1), - Event::::InvestOrdersCollected { + Event::::InvestOrdersCollected { investment_id: INVESTMENT_0_0, who: InvestorB::get(), processed_orders: vec![0], @@ -1795,7 +1789,7 @@ fn fulfillment_partially_works_high_price() { ); assert_eq!( last_event(), - Event::::RedeemCollectedWithoutActivePosition { + Event::::RedeemCollectedWithoutActivePosition { investment_id: INVESTMENT_0_0, who: InvestorB::get() } @@ -1813,7 +1807,7 @@ fn fulfillment_partially_works_high_price() { T_BALANCE_POST_COLLECT_INVEST ); assert_eq!( - InvestOrders::::get(InvestorB::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorB::get(), INVESTMENT_0_0), Some(Order::new( SINGLE_INVEST_AMOUNT .checked_sub(PERC_INVEST_FULFILL.mul_floor(SINGLE_INVEST_AMOUNT)) @@ -1823,7 +1817,7 @@ fn fulfillment_partially_works_high_price() { ); assert_eq!( n_last_event(1), - Event::::InvestCollectedForNonClearedOrderId { + Event::::InvestCollectedForNonClearedOrderId { investment_id: INVESTMENT_0_0, who: InvestorB::get() } @@ -1831,7 +1825,7 @@ fn fulfillment_partially_works_high_price() { ); assert_eq!( last_event(), - Event::::RedeemCollectedWithoutActivePosition { + Event::::RedeemCollectedWithoutActivePosition { investment_id: INVESTMENT_0_0, who: InvestorB::get() } @@ -1847,7 +1841,7 @@ fn fulfillment_partially_works_high_price() { )); assert_eq!( n_last_event(1), - Event::::InvestCollectedForNonClearedOrderId { + Event::::InvestCollectedForNonClearedOrderId { investment_id: INVESTMENT_0_0, who: InvestorD::get() } @@ -1855,7 +1849,7 @@ fn fulfillment_partially_works_high_price() { ); assert_eq!( last_event(), - Event::::RedeemCollectedWithoutActivePosition { + Event::::RedeemCollectedWithoutActivePosition { investment_id: INVESTMENT_0_0, who: InvestorD::get() } @@ -1874,7 +1868,7 @@ fn fulfillment_partially_works_high_price() { AUSD_BALANCE_POST_COLLECT_REDEEM ); assert_eq!( - RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), Some(Order::new( SINGLE_REDEEM_AMOUNT .checked_sub(PERC_REDEEM_FULFILL.mul_floor(SINGLE_REDEEM_AMOUNT)) @@ -1884,7 +1878,7 @@ fn fulfillment_partially_works_high_price() { ); assert_eq!( n_last_event(4), - Event::::InvestCollectedWithoutActivePosition { + Event::::InvestCollectedWithoutActivePosition { investment_id: INVESTMENT_0_0, who: TrancheHolderA::get() } @@ -1892,7 +1886,7 @@ fn fulfillment_partially_works_high_price() { ); assert_eq!( n_last_event(1), - Event::::RedeemOrderUpdated { + Event::::RedeemOrderUpdated { investment_id: INVESTMENT_0_0, submitted_at: 1, who: TrancheHolderA::get(), @@ -1902,7 +1896,7 @@ fn fulfillment_partially_works_high_price() { ); assert_eq!( last_event(), - Event::::RedeemOrdersCollected { + Event::::RedeemOrdersCollected { investment_id: INVESTMENT_0_0, who: TrancheHolderA::get(), processed_orders: vec![0], @@ -1931,7 +1925,7 @@ fn fulfillment_partially_works_high_price() { AUSD_BALANCE_POST_COLLECT_REDEEM ); assert_eq!( - RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), Some(Order::new( SINGLE_REDEEM_AMOUNT .checked_sub(PERC_REDEEM_FULFILL.mul_floor(SINGLE_REDEEM_AMOUNT)) @@ -1941,7 +1935,7 @@ fn fulfillment_partially_works_high_price() { ); assert_eq!( n_last_event(1), - Event::::InvestCollectedWithoutActivePosition { + Event::::InvestCollectedWithoutActivePosition { investment_id: INVESTMENT_0_0, who: TrancheHolderA::get() } @@ -1949,7 +1943,7 @@ fn fulfillment_partially_works_high_price() { ); assert_eq!( last_event(), - Event::::RedeemCollectedForNonClearedOrderId { + Event::::RedeemCollectedForNonClearedOrderId { investment_id: INVESTMENT_0_0, who: TrancheHolderA::get() } @@ -2013,11 +2007,11 @@ fn fulfillment_partially_works_high_price() { // Active Orders MUST be empty right now { assert_eq!( - ActiveInvestOrders::::get(INVESTMENT_0_0), + ActiveInvestOrders::::get(INVESTMENT_0_0), TotalOrder { amount: 0 } ); assert_eq!( - ActiveRedeemOrders::::get(INVESTMENT_0_0), + ActiveRedeemOrders::::get(INVESTMENT_0_0), TotalOrder { amount: 0 } ); } @@ -2111,70 +2105,70 @@ fn fulfillment_partially_works_high_price() { // UserOrders are empty assert_eq!( - InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), None ); assert_eq!( - InvestOrders::::get(InvestorB::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorB::get(), INVESTMENT_0_0), None ); assert_eq!( - InvestOrders::::get(InvestorC::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorC::get(), INVESTMENT_0_0), None ); assert_eq!( - InvestOrders::::get(InvestorD::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorD::get(), INVESTMENT_0_0), None ); assert_eq!( - RedeemOrders::::get(InvestorA::get(), INVESTMENT_0_0), + RedeemOrders::::get(InvestorA::get(), INVESTMENT_0_0), None ); assert_eq!( - RedeemOrders::::get(InvestorB::get(), INVESTMENT_0_0), + RedeemOrders::::get(InvestorB::get(), INVESTMENT_0_0), None ); assert_eq!( - RedeemOrders::::get(InvestorC::get(), INVESTMENT_0_0), + RedeemOrders::::get(InvestorC::get(), INVESTMENT_0_0), None ); assert_eq!( - RedeemOrders::::get(InvestorD::get(), INVESTMENT_0_0), + RedeemOrders::::get(InvestorD::get(), INVESTMENT_0_0), None ); assert_eq!( - RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), None ); assert_eq!( - RedeemOrders::::get(TrancheHolderB::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderB::get(), INVESTMENT_0_0), None ); assert_eq!( - RedeemOrders::::get(TrancheHolderC::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderC::get(), INVESTMENT_0_0), None ); assert_eq!( - RedeemOrders::::get(TrancheHolderD::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderD::get(), INVESTMENT_0_0), None ); assert_eq!( - InvestOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), + InvestOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), None ); assert_eq!( - InvestOrders::::get(TrancheHolderB::get(), INVESTMENT_0_0), + InvestOrders::::get(TrancheHolderB::get(), INVESTMENT_0_0), None ); assert_eq!( - InvestOrders::::get(TrancheHolderC::get(), INVESTMENT_0_0), + InvestOrders::::get(TrancheHolderC::get(), INVESTMENT_0_0), None ); assert_eq!( - InvestOrders::::get(TrancheHolderD::get(), INVESTMENT_0_0), + InvestOrders::::get(TrancheHolderD::get(), INVESTMENT_0_0), None ); } @@ -2209,13 +2203,13 @@ fn fulfillment_of_zero_works() { // All accumulated orders are still in place and of right amount { assert_eq!( - ActiveInvestOrders::::get(INVESTMENT_0_0), + ActiveInvestOrders::::get(INVESTMENT_0_0), TotalOrder { amount: TOTAL_INVEST_AMOUNT } ); assert_eq!( - ActiveRedeemOrders::::get(INVESTMENT_0_0), + ActiveRedeemOrders::::get(INVESTMENT_0_0), TotalOrder { amount: TOTAL_REDEEM_AMOUNT } @@ -2271,7 +2265,7 @@ fn fulfillment_of_zero_works() { .into() ); assert_eq!( - InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), Some(Order::new(SINGLE_INVEST_AMOUNT, 1)) ); assert_eq!(free_balance_of(InvestorA::get(), INVESTMENT_0_0.into()), 0); @@ -2316,7 +2310,7 @@ fn fulfillment_of_zero_works() { .into() ); assert_eq!( - InvestOrders::::get(InvestorB::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorB::get(), INVESTMENT_0_0), Some(Order::new(SINGLE_INVEST_AMOUNT, 1)) ); assert_eq!(free_balance_of(InvestorB::get(), INVESTMENT_0_0.into()), 0); @@ -2361,7 +2355,7 @@ fn fulfillment_of_zero_works() { .into() ); assert_eq!( - InvestOrders::::get(InvestorC::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorC::get(), INVESTMENT_0_0), Some(Order::new(SINGLE_INVEST_AMOUNT, 1)) ); assert_eq!(free_balance_of(InvestorC::get(), INVESTMENT_0_0.into()), 0); @@ -2406,7 +2400,7 @@ fn fulfillment_of_zero_works() { .into() ); assert_eq!( - RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), Some(Order::new(SINGLE_REDEEM_AMOUNT, 1)) ); assert_eq!(free_balance_of(TrancheHolderA::get(), AUSD_CURRENCY_ID), 0); @@ -2451,7 +2445,7 @@ fn fulfillment_of_zero_works() { .into() ); assert_eq!( - RedeemOrders::::get(TrancheHolderB::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderB::get(), INVESTMENT_0_0), Some(Order::new(SINGLE_REDEEM_AMOUNT, 1)) ); assert_eq!(free_balance_of(TrancheHolderB::get(), AUSD_CURRENCY_ID), 0); @@ -2496,7 +2490,7 @@ fn fulfillment_of_zero_works() { .into() ); assert_eq!( - RedeemOrders::::get(TrancheHolderC::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderC::get(), INVESTMENT_0_0), Some(Order::new(SINGLE_REDEEM_AMOUNT, 1)) ); assert_eq!(free_balance_of(TrancheHolderC::get(), AUSD_CURRENCY_ID), 0); @@ -2554,11 +2548,11 @@ fn collecting_fully_works() { // All accumulated orders are still in place and of right amount { assert_eq!( - ActiveInvestOrders::::get(INVESTMENT_0_0), + ActiveInvestOrders::::get(INVESTMENT_0_0), TotalOrder { amount: 0 } ); assert_eq!( - ActiveRedeemOrders::::get(INVESTMENT_0_0), + ActiveRedeemOrders::::get(INVESTMENT_0_0), TotalOrder { amount: 0 } ); assert_eq!( @@ -2613,7 +2607,7 @@ fn collecting_fully_works() { .into() ); assert_eq!( - InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), None, ); assert_eq!( @@ -2651,7 +2645,7 @@ fn collecting_fully_works() { .into() ); assert_eq!( - InvestOrders::::get(InvestorB::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorB::get(), INVESTMENT_0_0), None ); assert_eq!( @@ -2689,7 +2683,7 @@ fn collecting_fully_works() { .into() ); assert_eq!( - InvestOrders::::get(InvestorC::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorC::get(), INVESTMENT_0_0), None ); assert_eq!( @@ -2729,7 +2723,7 @@ fn collecting_fully_works() { .into() ); assert_eq!( - RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), None, ); assert_eq!( @@ -2767,7 +2761,7 @@ fn collecting_fully_works() { .into() ); assert_eq!( - RedeemOrders::::get(TrancheHolderB::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderB::get(), INVESTMENT_0_0), None ); assert_eq!( @@ -2805,7 +2799,7 @@ fn collecting_fully_works() { .into() ); assert_eq!( - RedeemOrders::::get(TrancheHolderC::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderC::get(), INVESTMENT_0_0), None, ); assert_eq!( @@ -2869,7 +2863,7 @@ fn collecting_over_max_works() { .into() ); assert_eq!( - InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), Some(Order::new( 5368709120000000000, MaxOutstandingCollect::get().into() @@ -2894,7 +2888,7 @@ fn collecting_over_max_works() { .into() ); assert_eq!( - InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), + InvestOrders::::get(InvestorA::get(), INVESTMENT_0_0), None ); assert_eq!( @@ -2924,7 +2918,7 @@ fn collecting_over_max_works() { .into() ); assert_eq!( - RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), Some(Order::new( 5368709120000000000, MaxOutstandingCollect::get().into() @@ -2949,7 +2943,7 @@ fn collecting_over_max_works() { .into() ); assert_eq!( - RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), + RedeemOrders::::get(TrancheHolderA::get(), INVESTMENT_0_0), None ); assert_eq!( diff --git a/pallets/keystore/src/benchmarking.rs b/pallets/keystore/src/benchmarking.rs index 23e93e22bb..7623dfa76c 100644 --- a/pallets/keystore/src/benchmarking.rs +++ b/pallets/keystore/src/benchmarking.rs @@ -31,7 +31,7 @@ benchmarks! { let n in 1..T::MaxKeys::get(); let caller: T::AccountId = account("acc_0", 0, 0); let test_keys: Vec> = build_test_keys::(n); - T::Currency::deposit_creating(&caller.clone().into(), T::Currency::minimum_balance() + T::DefaultKeyDeposit::get() * n as u128); + let _ = T::Currency::deposit_creating(&caller.clone().into(), T::Currency::minimum_balance() + T::DefaultKeyDeposit::get() * n as u128); let origin = RawOrigin::Signed(caller.clone()); }: add_keys(origin, test_keys) verify { diff --git a/pallets/keystore/src/lib.rs b/pallets/keystore/src/lib.rs index 9d17ef0fc2..0bce88a23e 100644 --- a/pallets/keystore/src/lib.rs +++ b/pallets/keystore/src/lib.rs @@ -109,7 +109,7 @@ pub mod pallet { T::AccountId, Blake2_128Concat, KeyId, - Key, + Key, T::Balance>, >; /// Storage used for retrieving last key by purpose. @@ -138,7 +138,7 @@ pub mod pallet { KeyRevoked { owner: T::AccountId, key: T::Hash, - block_number: T::BlockNumber, + block_number: BlockNumberFor, }, /// A deposit was set. DepositSet { new_deposit: T::Balance }, diff --git a/pallets/keystore/src/mock.rs b/pallets/keystore/src/mock.rs index 7c57ec1898..2c10133bb9 100644 --- a/pallets/keystore/src/mock.rs +++ b/pallets/keystore/src/mock.rs @@ -11,70 +11,38 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -use frame_support::{parameter_types, traits::EitherOfDiverse}; -use frame_system as system; +use frame_support::{derive_impl, parameter_types, traits::EitherOfDiverse}; use frame_system::{EnsureRoot, EnsureSigned}; -use sp_core::H256; -use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, -}; +use sp_runtime::traits::ConstU128; use crate::{self as pallet_keystore, Config}; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; +pub type Balance = u128; + +pub const CURRENCY: Balance = 1_000_000_000_000_000_000; -// Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Keystore: pallet_keystore::{Pallet, Call, Storage, Event}, - Balances: pallet_balances::{Pallet, Storage, Event}, + pub enum Runtime { + System: frame_system, + Keystore: pallet_keystore, + Balances: pallet_balances, } ); -// System config -parameter_types! { - pub const BlockHashCount: u64 = 250; - pub const SS58Prefix: u8 = 42; -} - -impl system::Config for Runtime { +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] +impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; - type AccountId = u64; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = BlockHashCount; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = frame_support::traits::ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = SS58Prefix; - type SystemWeightInfo = (); - type Version = (); + type Block = frame_system::mocking::MockBlock; } -// Proxy keystore pallet. -pub type Balance = u128; - -pub const CURRENCY: Balance = 1_000_000_000_000_000_000; +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] +impl pallet_balances::Config for Runtime { + type AccountStore = System; + type Balance = Balance; + type DustRemoval = (); + type ExistentialDeposit = ConstU128<1>; + type RuntimeHoldReason = (); +} parameter_types! { pub const MaxKeys: u32 = 10; @@ -91,37 +59,6 @@ impl Config for Runtime { type WeightInfo = (); } -// Balances pallet. -parameter_types! { - pub const ExistentialDeposit: u64 = 1; - pub MaxLocks: u32 = 2; -} - -impl pallet_balances::Config for Runtime { - type AccountStore = System; - type Balance = Balance; - type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type FreezeIdentifier = (); - type HoldIdentifier = (); - type MaxFreezes = (); - type MaxHolds = frame_support::traits::ConstU32<1>; - type MaxLocks = MaxLocks; - type MaxReserves = (); - type ReserveIdentifier = (); - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); -} - -// Build genesis storage according to the mock runtime. pub fn new_test_ext() -> sp_io::TestExternalities { - let mut ext: sp_io::TestExternalities = system::GenesisConfig::default() - .build_storage::() - .unwrap() - .into(); - - // Ensure that we set a block number otherwise no events would be deposited. - ext.execute_with(|| frame_system::Pallet::::set_block_number(1)); - - ext + System::externalities() } diff --git a/pallets/liquidity-pools-gateway/Cargo.toml b/pallets/liquidity-pools-gateway/Cargo.toml index 7c56b872cb..bf8bd6c7c4 100644 --- a/pallets/liquidity-pools-gateway/Cargo.toml +++ b/pallets/liquidity-pools-gateway/Cargo.toml @@ -34,10 +34,9 @@ cfg-utils = { workspace = true } cfg-mocks = { workspace = true, default-features = true } cfg-primitives = { workspace = true, default-features = true } hex-literal = { workspace = true } -sp-io = { workspace = true, default-features = true } - -pallet-balances = { workspace = true } +pallet-balances = { workspace = true, default-features = true } rand = { workspace = true, default-features = true } +sp-io = { workspace = true, default-features = true } [features] default = ["std"] diff --git a/pallets/liquidity-pools-gateway/axelar-gateway-precompile/Cargo.toml b/pallets/liquidity-pools-gateway/axelar-gateway-precompile/Cargo.toml index 44e2ca797e..894b9b1a43 100644 --- a/pallets/liquidity-pools-gateway/axelar-gateway-precompile/Cargo.toml +++ b/pallets/liquidity-pools-gateway/axelar-gateway-precompile/Cargo.toml @@ -14,8 +14,6 @@ sp-io = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } -frame-benchmarking = { workspace = true, optional = true } - ethabi = { workspace = true } fp-evm = { workspace = true } pallet-evm = { workspace = true } @@ -46,10 +44,8 @@ std = [ "cfg-traits/std", "cfg-utils/std", "ethabi/std", - "frame-benchmarking/std", ] runtime-benchmarks = [ - "frame-benchmarking/runtime-benchmarks", "cfg-types/runtime-benchmarks", "cfg-traits/runtime-benchmarks", "cfg-utils/runtime-benchmarks", diff --git a/pallets/liquidity-pools-gateway/axelar-gateway-precompile/src/lib.rs b/pallets/liquidity-pools-gateway/axelar-gateway-precompile/src/lib.rs index 140e23109e..7509aefa23 100644 --- a/pallets/liquidity-pools-gateway/axelar-gateway-precompile/src/lib.rs +++ b/pallets/liquidity-pools-gateway/axelar-gateway-precompile/src/lib.rs @@ -96,7 +96,7 @@ impl SourceConverter { #[frame_support::pallet] pub mod pallet { // Import various types used to declare pallet in scope. - use frame_support::pallet_prelude::*; + use frame_support::{pallet_prelude::*, DefaultNoBound}; use frame_system::pallet_prelude::*; use sp_core::{H160, H256}; @@ -131,23 +131,14 @@ pub mod pallet { pub type SourceConversion = StorageMap<_, Twox64Concat, H256, SourceConverter>; #[pallet::genesis_config] + #[derive(DefaultNoBound)] pub struct GenesisConfig { pub gateway: H160, _phantom: core::marker::PhantomData, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - GenesisConfig { - gateway: Default::default(), - _phantom: Default::default(), - } - } - } - #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { GatewayContract::::set(self.gateway) } diff --git a/pallets/liquidity-pools-gateway/routers/Cargo.toml b/pallets/liquidity-pools-gateway/routers/Cargo.toml index 6610495039..91523a7b76 100644 --- a/pallets/liquidity-pools-gateway/routers/Cargo.toml +++ b/pallets/liquidity-pools-gateway/routers/Cargo.toml @@ -24,7 +24,7 @@ sp-runtime = { workspace = true } # XCM pallet-xcm-transactor = { workspace = true } -xcm = { workspace = true } +staging-xcm = { workspace = true } xcm-primitives = { workspace = true } # EVM @@ -45,8 +45,8 @@ lazy_static = { workspace = true } cumulus-primitives-core = { workspace = true, default-features = true } -xcm-builder = { workspace = true, default-features = true } -xcm-executor = { workspace = true, default-features = true } +staging-xcm-builder = { workspace = true, default-features = true } +staging-xcm-executor = { workspace = true, default-features = true } pallet-evm-chain-id = { workspace = true, default-features = true } pallet-evm-precompile-simple = { workspace = true, default-features = true } @@ -73,7 +73,7 @@ std = [ "frame-system/std", "sp-std/std", "sp-core/std", - "xcm/std", + "staging-xcm/std", "pallet-liquidity-pools-gateway/std", "pallet-xcm-transactor/std", "pallet-ethereum/std", @@ -99,6 +99,7 @@ runtime-benchmarks = [ "pallet-evm/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "sp-runtime/runtime-benchmarks", + "staging-xcm-builder/runtime-benchmarks", ] try-runtime = [ "frame-support/try-runtime", diff --git a/pallets/liquidity-pools-gateway/routers/src/lib.rs b/pallets/liquidity-pools-gateway/routers/src/lib.rs index befd30d808..acf465d12b 100644 --- a/pallets/liquidity-pools-gateway/routers/src/lib.rs +++ b/pallets/liquidity-pools-gateway/routers/src/lib.rs @@ -40,11 +40,11 @@ pub const GAS_TO_WEIGHT_MULTIPLIER: u64 = 25_000; use cfg_traits::{ethereum::EthereumTransactor, liquidity_pools::Router}; use frame_support::{ - dispatch::{ - DispatchError, DispatchResult, DispatchResultWithPostInfo, PostDispatchInfo, Weight, - }, + dispatch::PostDispatchInfo, ensure, + pallet_prelude::{DispatchError, DispatchResult, DispatchResultWithPostInfo}, traits::OriginTrait, + weights::Weight, }; use frame_system::pallet_prelude::OriginFor; use pallet_xcm_transactor::{Currency, CurrencyPayment, TransactWeights}; @@ -53,7 +53,7 @@ use scale_info::TypeInfo; use sp_core::{bounded::BoundedVec, ConstU32, H160, H256, U256}; use sp_runtime::traits::{BlakeTwo256, Hash}; use sp_std::{boxed::Box, marker::PhantomData, vec::Vec}; -use xcm::{ +use staging_xcm::{ latest::{MultiLocation, OriginKind}, VersionedMultiLocation, }; diff --git a/pallets/liquidity-pools-gateway/routers/src/mock.rs b/pallets/liquidity-pools-gateway/routers/src/mock.rs index bc3d70fe15..c7f633ccc4 100644 --- a/pallets/liquidity-pools-gateway/routers/src/mock.rs +++ b/pallets/liquidity-pools-gateway/routers/src/mock.rs @@ -8,7 +8,7 @@ use cumulus_primitives_core::{ Instruction, MultiAsset, MultiLocation, PalletInstance, Parachain, SendError, Xcm, XcmHash, }; use frame_support::{ - parameter_types, + derive_impl, parameter_types, traits::{FindAuthor, PalletInfo as PalletInfoTrait}, weights::Weight, }; @@ -21,21 +21,17 @@ use pallet_evm::{ }; use pallet_liquidity_pools_gateway::EnsureLocal; use parity_scale_codec::{Decode, Encode}; -use sp_core::{crypto::AccountId32, ByteArray, ConstU16, ConstU32, ConstU64, H160, H256, U256}; -use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, - ConsensusEngineId, DispatchError, -}; +use sp_core::{crypto::AccountId32, ByteArray, H160, H256, U256}; +use sp_runtime::{traits::IdentityLookup, ConsensusEngineId, DispatchError}; use sp_std::{cell::RefCell, marker::PhantomData}; -use xcm::{ +use staging_xcm::{ latest::{ Error as XcmError, InteriorMultiLocation, NetworkId, Result as XcmResult, SendResult, XcmContext, }, v3::{Junction, Junctions, MultiAssets, SendXcm}, }; -use xcm_executor::{ +use staging_xcm_executor::{ traits::{TransactAsset, WeightBounds}, Assets, }; @@ -45,83 +41,45 @@ use xcm_primitives::{ pub type Balance = u128; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; - frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Runtime { System: frame_system, Balances: pallet_balances, MockLiquidityPools: pallet_mock_liquidity_pools, LiquidityPoolsGateway: pallet_liquidity_pools_gateway, - XcmTransactor: pallet_xcm_transactor::{Pallet, Call, Event}, - EVM: pallet_evm::{Pallet, Call, Storage, Config, Event}, - Timestamp: pallet_timestamp::{Pallet, Call, Storage}, - Ethereum: pallet_ethereum::{Pallet, Call, Storage, Event, Origin}, + XcmTransactor: pallet_xcm_transactor, + EVM: pallet_evm, + Timestamp: pallet_timestamp, + Ethereum: pallet_ethereum, EthereumTransaction: pallet_ethereum_transaction, } ); frame_support::parameter_types! { - pub const MaxInstancesPerDomain: u32 = 3; pub const MaxIncomingMessageSize: u32 = 1024; } +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; type AccountId = AccountId32; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = ConstU64<250>; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; + type Block = frame_system::mocking::MockBlock; type Lookup = IdentityLookup; - type MaxConsumers = ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = ConstU16<42>; - type SystemWeightInfo = (); - type Version = (); } parameter_types! { // the minimum fee for an anchor is 500,000ths of a CFG. // This is set to a value so you can still get some return without getting your account removed. pub const ExistentialDeposit: Balance = 1 * cfg_primitives::MICRO_CFG; - // For weight estimation, we assume that the most locks on an individual account will be 50. - pub const MaxHolds: u32 = 50; - pub const MaxLocks: u32 = 50; - pub const MaxReserves: u32 = 50; } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; - type FreezeIdentifier = (); - type HoldIdentifier = (); - type MaxFreezes = (); - type MaxHolds = MaxHolds; - type MaxLocks = MaxLocks; - type MaxReserves = MaxReserves; - type ReserveIdentifier = [u8; 8]; - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); + type RuntimeHoldReason = (); } impl pallet_mock_liquidity_pools::Config for Runtime { @@ -401,9 +359,9 @@ impl HrmpEncodeCall for MockHrmpEncoder { // Simulates sending a XCM message thread_local! { - pub static SENT_XCM: RefCell> = RefCell::new(Vec::new()); + pub static SENT_XCM: RefCell> = RefCell::new(Vec::new()); } -pub fn sent_xcm() -> Vec<(MultiLocation, xcm::v3::opaque::Xcm)> { +pub fn sent_xcm() -> Vec<(MultiLocation, staging_xcm::v3::opaque::Xcm)> { SENT_XCM.with(|q| (*q.borrow()).clone()) } pub struct TestSendXcm; @@ -412,7 +370,7 @@ impl SendXcm for TestSendXcm { fn validate( destination: &mut Option, - message: &mut Option, + message: &mut Option, ) -> SendResult { SENT_XCM.with(|q| { q.borrow_mut() @@ -452,42 +410,42 @@ pub enum HrmpCall { Close(), } -pub type MaxHrmpRelayFee = xcm_builder::Case; +pub type MaxHrmpRelayFee = staging_xcm_builder::Case; pub struct DummyWeigher(PhantomData); impl WeightBounds for DummyWeigher { - fn weight(_message: &mut Xcm) -> Result { + fn weight(_message: &mut Xcm) -> Result { Ok(Weight::zero()) } - fn instr_weight(_instruction: &Instruction) -> Result { + fn instr_weight(_instruction: &Instruction) -> Result { Ok(Weight::zero()) } } parameter_types! { - pub const RelayNetwork: NetworkId = NetworkId::Polkadot; + pub const RelayNetwork: NetworkId = NetworkId::Polkadot; - pub ParachainId: cumulus_primitives_core::ParaId = 100.into(); + pub ParachainId: cumulus_primitives_core::ParaId = 100.into(); - pub SelfLocation: MultiLocation = - MultiLocation::new(1, Junctions::X1(Parachain(ParachainId::get().into()))); + pub SelfLocation: MultiLocation = + MultiLocation::new(1, Junctions::X1(Parachain(ParachainId::get().into()))); - pub SelfReserve: MultiLocation = MultiLocation::new( - 1, - Junctions::X2( - Parachain(ParachainId::get().into()), - PalletInstance( - ::PalletInfo::index::().unwrap() as u8 - ) - )); + pub SelfReserve: MultiLocation = MultiLocation::new( + 1, + Junctions::X2( + Parachain(ParachainId::get().into()), + PalletInstance( + ::PalletInfo::index::().unwrap() as u8 + ) + )); - pub const BaseXcmWeight: xcm::latest::Weight = xcm::latest::Weight::from_parts(1000, 0); + pub const BaseXcmWeight: staging_xcm::latest::Weight = staging_xcm::latest::Weight::from_parts(1000, 0); - pub MaxFee: MultiAsset = (MultiLocation::parent(), 1_000_000_000_000u128).into(); + pub MaxFee: MultiAsset = (MultiLocation::parent(), 1_000_000_000_000u128).into(); - pub UniversalLocation: InteriorMultiLocation = RelayNetwork::get().into(); + pub UniversalLocation: InteriorMultiLocation = RelayNetwork::get().into(); } impl pallet_xcm_transactor::Config for Runtime { @@ -498,7 +456,6 @@ impl pallet_xcm_transactor::Config for Runtime { type CurrencyId = CurrencyId; type CurrencyIdToMultiLocation = CurrencyIdToMultiLocation; type DerivativeAddressRegistrationOrigin = EnsureRoot; - type HrmpEncoder = MockHrmpEncoder; type HrmpManipulatorOrigin = EnsureRoot; type MaxHrmpFee = MaxHrmpRelayFee; type ReserveProvider = orml_traits::location::RelativeReserveProvider; @@ -513,12 +470,5 @@ impl pallet_xcm_transactor::Config for Runtime { } pub fn new_test_ext() -> sp_io::TestExternalities { - let storage = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap(); - - let mut ext = sp_io::TestExternalities::new(storage); - ext.execute_with(|| frame_system::Pallet::::set_block_number(1)); - - ext + System::externalities() } diff --git a/pallets/liquidity-pools-gateway/routers/src/routers/axelar_evm.rs b/pallets/liquidity-pools-gateway/routers/src/routers/axelar_evm.rs index 1b94f9c5e1..99d6b6c2cc 100644 --- a/pallets/liquidity-pools-gateway/routers/src/routers/axelar_evm.rs +++ b/pallets/liquidity-pools-gateway/routers/src/routers/axelar_evm.rs @@ -11,7 +11,10 @@ // GNU General Public License for more details. use cfg_traits::liquidity_pools::Codec; use ethabi::{Contract, Function, Param, ParamType, Token}; -use frame_support::dispatch::{DispatchError, DispatchResult, DispatchResultWithPostInfo}; +use frame_support::{ + dispatch::{DispatchResult, DispatchResultWithPostInfo}, + pallet_prelude::DispatchError, +}; use frame_system::pallet_prelude::OriginFor; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::{ diff --git a/pallets/liquidity-pools-gateway/routers/src/tests.rs b/pallets/liquidity-pools-gateway/routers/src/tests.rs index 57d1672428..508d85c6a0 100644 --- a/pallets/liquidity-pools-gateway/routers/src/tests.rs +++ b/pallets/liquidity-pools-gateway/routers/src/tests.rs @@ -1,8 +1,3 @@ -use ::xcm::{ - lts::WeightLimit, - v2::OriginKind, - v3::{Instruction::*, MultiAsset}, -}; use cfg_mocks::MessageMock; use cfg_primitives::CFG; use cfg_traits::liquidity_pools::{Codec, Router}; @@ -15,6 +10,11 @@ use sp_runtime::{ traits::{BlakeTwo256, Convert, Hash}, DispatchError, }; +use staging_xcm::{ + lts::WeightLimit, + v2::OriginKind, + v3::{Instruction::*, MultiAsset}, +}; use super::mock::*; use crate::*; @@ -261,16 +261,20 @@ mod xcm_router { let (_, xcm) = sent_messages.first().unwrap(); assert!(xcm.0.contains(&WithdrawAsset( (MultiAsset { - id: ::xcm::v3::AssetId::Concrete(MultiLocation::here()), - fun: ::xcm::v3::Fungibility::Fungible(test_data.xcm_domain.fee_amount), + id: staging_xcm::v3::AssetId::Concrete(MultiLocation::here()), + fun: staging_xcm::v3::Fungibility::Fungible( + test_data.xcm_domain.fee_amount + ), }) .into() ))); assert!(xcm.0.contains(&BuyExecution { fees: MultiAsset { - id: ::xcm::v3::AssetId::Concrete(MultiLocation::here()), - fun: ::xcm::v3::Fungibility::Fungible(test_data.xcm_domain.fee_amount), + id: staging_xcm::v3::AssetId::Concrete(MultiLocation::here()), + fun: staging_xcm::v3::Fungibility::Fungible( + test_data.xcm_domain.fee_amount + ), }, weight_limit: WeightLimit::Limited(test_data.xcm_domain.overall_weight), })); @@ -598,16 +602,20 @@ mod axelar_xcm { let (_, xcm) = sent_messages.first().unwrap(); assert!(xcm.0.contains(&WithdrawAsset( (MultiAsset { - id: ::xcm::v3::AssetId::Concrete(MultiLocation::here()), - fun: ::xcm::v3::Fungibility::Fungible(test_data.xcm_domain.fee_amount), + id: staging_xcm::v3::AssetId::Concrete(MultiLocation::here()), + fun: staging_xcm::v3::Fungibility::Fungible( + test_data.xcm_domain.fee_amount + ), }) .into() ))); assert!(xcm.0.contains(&BuyExecution { fees: MultiAsset { - id: ::xcm::v3::AssetId::Concrete(MultiLocation::here()), - fun: ::xcm::v3::Fungibility::Fungible(test_data.xcm_domain.fee_amount), + id: staging_xcm::v3::AssetId::Concrete(MultiLocation::here()), + fun: staging_xcm::v3::Fungibility::Fungible( + test_data.xcm_domain.fee_amount + ), }, weight_limit: WeightLimit::Limited(test_data.xcm_domain.overall_weight), })); @@ -734,16 +742,20 @@ mod ethereum_xcm { let (_, xcm) = sent_messages.first().unwrap(); assert!(xcm.0.contains(&WithdrawAsset( (MultiAsset { - id: ::xcm::v3::AssetId::Concrete(MultiLocation::here()), - fun: ::xcm::v3::Fungibility::Fungible(test_data.xcm_domain.fee_amount), + id: staging_xcm::v3::AssetId::Concrete(MultiLocation::here()), + fun: staging_xcm::v3::Fungibility::Fungible( + test_data.xcm_domain.fee_amount + ), }) .into() ))); assert!(xcm.0.contains(&BuyExecution { fees: MultiAsset { - id: ::xcm::v3::AssetId::Concrete(MultiLocation::here()), - fun: ::xcm::v3::Fungibility::Fungible(test_data.xcm_domain.fee_amount), + id: staging_xcm::v3::AssetId::Concrete(MultiLocation::here()), + fun: staging_xcm::v3::Fungibility::Fungible( + test_data.xcm_domain.fee_amount + ), }, weight_limit: WeightLimit::Limited(test_data.xcm_domain.overall_weight), })); diff --git a/pallets/liquidity-pools-gateway/src/lib.rs b/pallets/liquidity-pools-gateway/src/lib.rs index eb8ea53a00..c0b0ad13af 100644 --- a/pallets/liquidity-pools-gateway/src/lib.rs +++ b/pallets/liquidity-pools-gateway/src/lib.rs @@ -305,7 +305,7 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { - fn on_idle(_now: T::BlockNumber, max_weight: Weight) -> Weight { + fn on_idle(_now: BlockNumberFor, max_weight: Weight) -> Weight { Self::service_outbound_message_queue(max_weight) } } diff --git a/pallets/liquidity-pools-gateway/src/mock.rs b/pallets/liquidity-pools-gateway/src/mock.rs index 3e79d2ecce..b99959e456 100644 --- a/pallets/liquidity-pools-gateway/src/mock.rs +++ b/pallets/liquidity-pools-gateway/src/mock.rs @@ -4,21 +4,15 @@ use cfg_mocks::{ }; use cfg_primitives::OutboundMessageNonce; use cfg_types::domain_address::DomainAddress; +use frame_support::derive_impl; use frame_system::EnsureRoot; -use sp_core::{crypto::AccountId32, ConstU128, ConstU16, ConstU32, ConstU64, H256}; -use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, - DispatchError, -}; +use sp_core::{crypto::AccountId32, ConstU128, H256}; +use sp_runtime::{traits::IdentityLookup, BuildStorage, DispatchError}; use crate::{pallet as pallet_liquidity_pools_gateway, EnsureLocal}; pub type Balance = u128; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; - pub const LENGTH_SOURCE_CHAIN: usize = 10; pub const SOURCE_CHAIN: [u8; LENGTH_SOURCE_CHAIN] = *b"ethereum-2"; pub const SOURCE_CHAIN_EVM_ID: u64 = 1; @@ -27,11 +21,7 @@ pub const LENGTH_SOURCE_ADDRESS: usize = 20; pub const SOURCE_ADDRESS: [u8; LENGTH_SOURCE_ADDRESS] = [0u8; LENGTH_SOURCE_ADDRESS]; frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Runtime { System: frame_system, Balances: pallet_balances, MockLiquidityPools: pallet_mock_liquidity_pools, @@ -41,51 +31,21 @@ frame_support::construct_runtime!( } ); -frame_support::parameter_types! { - pub const MaxIncomingMessageSize: u32 = 1024; -} - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; type AccountId = AccountId32; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = ConstU64<250>; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; + type Block = frame_system::mocking::MockBlock; type Lookup = IdentityLookup; - type MaxConsumers = ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = ConstU16<42>; - type SystemWeightInfo = (); - type Version = (); } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); type ExistentialDeposit = ConstU128<1>; - type FreezeIdentifier = (); - type HoldIdentifier = (); - type MaxFreezes = (); - type MaxHolds = ConstU32<1>; - type MaxLocks = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); + type RuntimeHoldReason = (); } impl pallet_mock_liquidity_pools::Config for Runtime { @@ -103,6 +63,7 @@ impl pallet_mock_try_convert::Config for Runtime { frame_support::parameter_types! { pub Sender: AccountId32 = AccountId32::from(H256::from_low_u64_be(1).to_fixed_bytes()); + pub const MaxIncomingMessageSize: u32 = 1024; } impl pallet_liquidity_pools_gateway::Config for Runtime { @@ -121,8 +82,8 @@ impl pallet_liquidity_pools_gateway::Config for Runtime { } pub fn new_test_ext() -> sp_io::TestExternalities { - let storage = frame_system::GenesisConfig::default() - .build_storage::() + let storage = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); let mut ext = sp_io::TestExternalities::new(storage); diff --git a/pallets/liquidity-pools-gateway/src/tests.rs b/pallets/liquidity-pools-gateway/src/tests.rs index d1162397d2..60185de92f 100644 --- a/pallets/liquidity-pools-gateway/src/tests.rs +++ b/pallets/liquidity-pools-gateway/src/tests.rs @@ -4,7 +4,8 @@ use cfg_traits::liquidity_pools::{Codec, OutboundQueue}; use cfg_types::domain_address::*; use frame_support::{ assert_noop, assert_ok, - dispatch::{Pays, PostDispatchInfo, Weight}, + dispatch::{Pays, PostDispatchInfo}, + weights::Weight, }; use sp_core::{crypto::AccountId32, ByteArray, H160}; use sp_runtime::{ diff --git a/pallets/liquidity-pools/Cargo.toml b/pallets/liquidity-pools/Cargo.toml index 84b44f3854..1bbbad918b 100644 --- a/pallets/liquidity-pools/Cargo.toml +++ b/pallets/liquidity-pools/Cargo.toml @@ -39,7 +39,7 @@ cfg-types = { workspace = true } cfg-utils = { workspace = true } # Polkadot -xcm = { workspace = true } +staging-xcm = { workspace = true } fp-self-contained = { workspace = true } pallet-ethereum = { workspace = true } @@ -47,7 +47,6 @@ xcm-primitives = { workspace = true } [dev-dependencies] hex = { workspace = true, default-features = true } -serde = { workspace = true } # Substrate crates & pallets pallet-balances = { workspace = true } @@ -70,7 +69,7 @@ std = [ "orml-tokens/std", "orml-traits/std", "pallet-balances/std", - "xcm/std", + "staging-xcm/std", "pallet-ethereum/std", "xcm-primitives/std", "ethabi/std", diff --git a/pallets/liquidity-pools/src/lib.rs b/pallets/liquidity-pools/src/lib.rs index 3bb86a93a8..1041ca87c4 100644 --- a/pallets/liquidity-pools/src/lib.rs +++ b/pallets/liquidity-pools/src/lib.rs @@ -63,7 +63,7 @@ use sp_runtime::{ FixedPointNumber, SaturatedConversion, }; use sp_std::{convert::TryInto, vec}; -use xcm::{ +use staging_xcm::{ latest::NetworkId, prelude::{AccountKey20, GlobalConsensus, PalletInstance, X3}, VersionedMultiLocation, @@ -129,7 +129,7 @@ pub mod pallet { use frame_system::pallet_prelude::*; use parity_scale_codec::HasCompact; use sp_runtime::{traits::Zero, DispatchError}; - use xcm::latest::MultiLocation; + use staging_xcm::latest::MultiLocation; use super::*; use crate::defensive_weights::WeightInfo; @@ -409,8 +409,8 @@ pub mod pallet { let investment_id = Self::derive_invest_id(pool_id, tranche_id)?; let metadata = T::AssetRegistry::metadata(&investment_id.into()) .ok_or(Error::::TrancheMetadataNotFound)?; - let token_name = vec_to_fixed_array(metadata.name); - let token_symbol = vec_to_fixed_array(metadata.symbol); + let token_name = vec_to_fixed_array(metadata.name.into_inner()); + let token_symbol = vec_to_fixed_array(metadata.symbol.into_inner()); // Send the message to the domain T::OutboundQueue::submit( @@ -791,8 +791,8 @@ pub mod pallet { let investment_id = Self::derive_invest_id(pool_id, tranche_id)?; let metadata = T::AssetRegistry::metadata(&investment_id.into()) .ok_or(Error::::TrancheMetadataNotFound)?; - let token_name = vec_to_fixed_array(metadata.name); - let token_symbol = vec_to_fixed_array(metadata.symbol); + let token_name = vec_to_fixed_array(metadata.name.into_inner()); + let token_symbol = vec_to_fixed_array(metadata.symbol.into_inner()); T::OutboundQueue::submit( who, diff --git a/pallets/liquidity-pools/src/message.rs b/pallets/liquidity-pools/src/message.rs index 6c2a7a1476..5accba09b3 100644 --- a/pallets/liquidity-pools/src/message.rs +++ b/pallets/liquidity-pools/src/message.rs @@ -1,6 +1,6 @@ use cfg_traits::{liquidity_pools::Codec, Seconds}; use cfg_utils::{decode, decode_be_bytes, encode_be}; -use frame_support::RuntimeDebug; +use frame_support::pallet_prelude::RuntimeDebug; use parity_scale_codec::{Decode, Encode, Input, MaxEncodedLen}; use scale_info::TypeInfo; use sp_std::{vec, vec::Vec}; diff --git a/pallets/liquidity-pools/src/routers.rs b/pallets/liquidity-pools/src/routers.rs index 15e4245138..15c4006c50 100644 --- a/pallets/liquidity-pools/src/routers.rs +++ b/pallets/liquidity-pools/src/routers.rs @@ -3,7 +3,7 @@ use scale_info::TypeInfo; use sp_core::H160; use sp_runtime::{traits::ConstU32, BoundedVec}; use sp_std::boxed::Box; -use xcm::VersionedMultiLocation; +use staging_xcm::VersionedMultiLocation; #[allow(clippy::derive_partial_eq_without_eq)] // XcmDomain does not impl Eq #[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)] @@ -44,7 +44,7 @@ where { fn max_encoded_len() -> usize { // The domain's `VersionedMultiLocation` (custom bound) - xcm::latest::MultiLocation::max_encoded_len() + staging_xcm::latest::MultiLocation::max_encoded_len() // From the enum wrapping of `VersionedMultiLocation` .saturating_add(1) // The ethereum xcm call index (default bound) diff --git a/pallets/liquidity-rewards/src/benchmarking.rs b/pallets/liquidity-rewards/src/benchmarking.rs index 527b7db807..8d4a7adff9 100644 --- a/pallets/liquidity-rewards/src/benchmarking.rs +++ b/pallets/liquidity-rewards/src/benchmarking.rs @@ -31,7 +31,7 @@ benchmarks! { where T::Balance: From, T::CurrencyId: From + Default, - T::BlockNumber: From + One, + BlockNumberFor: From + One, T::GroupId: From, T::Weight: From, } @@ -54,7 +54,7 @@ benchmarks! { Pallet::::set_currency_group(RawOrigin::Root.into(), i.into(), GROUP_A.into()).unwrap(); } - Pallet::::on_initialize(T::BlockNumber::zero()); + Pallet::::on_initialize(BlockNumberFor::::zero()); for i in 0..y { Pallet::::set_group_weight(RawOrigin::Root.into(), i.into(), WEIGHT.into()).unwrap(); @@ -115,4 +115,4 @@ benchmarks! { } -impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test); +impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Runtime); diff --git a/pallets/liquidity-rewards/src/lib.rs b/pallets/liquidity-rewards/src/lib.rs index c945add28e..e267e17d2d 100644 --- a/pallets/liquidity-rewards/src/lib.rs +++ b/pallets/liquidity-rewards/src/lib.rs @@ -208,8 +208,8 @@ pub mod pallet { } #[pallet::hooks] - impl Hooks for Pallet { - fn on_initialize(_: T::BlockNumber) -> Weight { + impl Hooks> for Pallet { + fn on_initialize(_: BlockNumberFor) -> Weight { let now = T::Timer::now(); if now < EndOfEpoch::::get() { // Not ready yet to change the epoch diff --git a/pallets/liquidity-rewards/src/mock.rs b/pallets/liquidity-rewards/src/mock.rs index bf31cb5106..d3d4cfcfd4 100644 --- a/pallets/liquidity-rewards/src/mock.rs +++ b/pallets/liquidity-rewards/src/mock.rs @@ -1,24 +1,13 @@ -use frame_support::traits::{ConstU16, ConstU32, ConstU64}; +use frame_support::{derive_impl, traits::ConstU64}; use frame_system::EnsureRoot; -use sp_core::H256; -use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, -}; +use sp_runtime::BuildStorage; use crate as pallet_liquidity_rewards; pub const INITIAL_EPOCH_DURATION: u64 = 23; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; - frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Runtime { System: frame_system, Liquidity: pallet_liquidity_rewards, MockTime: cfg_mocks::pallet_mock_time, @@ -34,44 +23,22 @@ frame_support::parameter_types! { pub const MaxChangesPerEpoch: u32 = 50; } -impl frame_system::Config for Test { - type AccountData = (); - type AccountId = u64; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = ConstU64<250>; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = ConstU16<42>; - type SystemWeightInfo = (); - type Version = (); +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] +impl frame_system::Config for Runtime { + type Block = frame_system::mocking::MockBlock; } -impl cfg_mocks::pallet_mock_time::Config for Test { +impl cfg_mocks::pallet_mock_time::Config for Runtime { type Moment = u64; } -impl cfg_mocks::pallet_mock_rewards::Config for Test { +impl cfg_mocks::pallet_mock_rewards::Config for Runtime { type Balance = u64; type CurrencyId = u32; type GroupId = u32; } -impl pallet_liquidity_rewards::Config for Test { +impl pallet_liquidity_rewards::Config for Runtime { type AdminOrigin = EnsureRoot; type Balance = u64; type CurrencyId = u32; @@ -87,8 +54,8 @@ impl pallet_liquidity_rewards::Config for Test { } pub fn new_test_ext() -> sp_io::TestExternalities { - let storage = frame_system::GenesisConfig::default() - .build_storage::() + let storage = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); sp_io::TestExternalities::new(storage) diff --git a/pallets/liquidity-rewards/src/tests.rs b/pallets/liquidity-rewards/src/tests.rs index 0c5cac0f88..2f69263583 100644 --- a/pallets/liquidity-rewards/src/tests.rs +++ b/pallets/liquidity-rewards/src/tests.rs @@ -43,21 +43,21 @@ fn distributed_reward_change() { RuntimeOrigin::root(), REWARD )); - assert_eq!(NextEpochChanges::::get().reward, Some(REWARD)); - assert_eq!(ActiveEpochData::::get().reward, 0); + assert_eq!(NextEpochChanges::::get().reward, Some(REWARD)); + assert_eq!(ActiveEpochData::::get().reward, 0); MockTime::mock_now(|| INITIAL_EPOCH_DURATION); Liquidity::on_initialize(0); // EPOCH 1 - assert_eq!(NextEpochChanges::::get().reward, None); - assert_eq!(ActiveEpochData::::get().reward, REWARD); + assert_eq!(NextEpochChanges::::get().reward, None); + assert_eq!(ActiveEpochData::::get().reward, REWARD); MockTime::mock_now(|| INITIAL_EPOCH_DURATION + INITIAL_EPOCH_DURATION); Liquidity::on_initialize(0); // EPOCH 2 - assert_eq!(ActiveEpochData::::get().reward, REWARD); + assert_eq!(ActiveEpochData::::get().reward, REWARD); }); } @@ -67,13 +67,13 @@ fn epoch_change() { new_test_ext().execute_with(|| { // EPOCH 0 - assert_eq!(EndOfEpoch::::get(), 0); + assert_eq!(EndOfEpoch::::get(), 0); assert_ok!(Liquidity::set_epoch_duration( RuntimeOrigin::root(), EPOCH_DURATION )); assert_eq!( - NextEpochChanges::::get().duration, + NextEpochChanges::::get().duration, Some(EPOCH_DURATION) ); @@ -82,16 +82,16 @@ fn epoch_change() { // EPOCH 1 assert_eq!( - EndOfEpoch::::get(), + EndOfEpoch::::get(), INITIAL_EPOCH_DURATION + EPOCH_DURATION ); - assert_eq!(NextEpochChanges::::get().duration, None); + assert_eq!(NextEpochChanges::::get().duration, None); MockTime::mock_now(|| INITIAL_EPOCH_DURATION + EPOCH_DURATION / 2); Liquidity::on_initialize(0); assert_eq!( - EndOfEpoch::::get(), + EndOfEpoch::::get(), INITIAL_EPOCH_DURATION + EPOCH_DURATION ); @@ -100,7 +100,7 @@ fn epoch_change() { // EPOCH 2 assert_eq!( - EndOfEpoch::::get(), + EndOfEpoch::::get(), INITIAL_EPOCH_DURATION + EPOCH_DURATION + EPOCH_DURATION ); }); @@ -122,13 +122,13 @@ fn epoch_change_from_advanced_state() { Liquidity::on_initialize(0); // EPOCH 1 - assert_eq!(EndOfEpoch::::get(), INITIAL_TIME + EPOCH_DURATION); - assert_eq!(NextEpochChanges::::get().duration, None); + assert_eq!(EndOfEpoch::::get(), INITIAL_TIME + EPOCH_DURATION); + assert_eq!(NextEpochChanges::::get().duration, None); MockTime::mock_now(|| INITIAL_TIME); Liquidity::on_initialize(0); - assert_eq!(EndOfEpoch::::get(), INITIAL_TIME + EPOCH_DURATION); + assert_eq!(EndOfEpoch::::get(), INITIAL_TIME + EPOCH_DURATION); }); } @@ -142,7 +142,7 @@ fn currency_changes() { GROUP_A )); assert_eq!( - NextEpochChanges::::get() + NextEpochChanges::::get() .currencies .get(&CURRENCY_ID_A), Some(&GROUP_A) @@ -159,7 +159,7 @@ fn currency_changes() { // EPOCH 1 assert_eq!( - NextEpochChanges::::get() + NextEpochChanges::::get() .currencies .get(&CURRENCY_ID_A), None, @@ -195,14 +195,14 @@ fn weight_changes() { WEIGHT_2 )); assert_eq!( - NextEpochChanges::::get().weights.get(&GROUP_A), + NextEpochChanges::::get().weights.get(&GROUP_A), Some(&WEIGHT_1) ); assert_eq!( - NextEpochChanges::::get().weights.get(&GROUP_B), + NextEpochChanges::::get().weights.get(&GROUP_B), Some(&WEIGHT_2) ); - assert_eq!(ActiveEpochData::::get().weights.len(), 0); + assert_eq!(ActiveEpochData::::get().weights.len(), 0); MockTime::mock_now(|| INITIAL_EPOCH_DURATION * 2); Liquidity::on_initialize(0); @@ -211,14 +211,20 @@ fn weight_changes() { // We need one epoch more to apply those weights in the distribution. // EPOCH 2 - assert_eq!(NextEpochChanges::::get().weights.get(&GROUP_A), None); - assert_eq!(NextEpochChanges::::get().weights.get(&GROUP_B), None); assert_eq!( - ActiveEpochData::::get().weights.get(&GROUP_A), + NextEpochChanges::::get().weights.get(&GROUP_A), + None + ); + assert_eq!( + NextEpochChanges::::get().weights.get(&GROUP_B), + None + ); + assert_eq!( + ActiveEpochData::::get().weights.get(&GROUP_A), Some(&WEIGHT_1) ); assert_eq!( - ActiveEpochData::::get().weights.get(&GROUP_B), + ActiveEpochData::::get().weights.get(&GROUP_B), Some(&WEIGHT_2) ); @@ -249,7 +255,7 @@ fn max_weight_changes() { assert_noop!( Liquidity::set_group_weight(RuntimeOrigin::root(), MaxChangesPerEpoch::get() + 1, 100), - Error::::MaxChangesPerEpochReached + Error::::MaxChangesPerEpochReached ); }); } @@ -271,7 +277,7 @@ fn max_currency_changes() { MaxChangesPerEpoch::get() + 1, 100 ), - Error::::MaxChangesPerEpochReached + Error::::MaxChangesPerEpochReached ); }); } @@ -294,12 +300,12 @@ fn discard_groups_exceed_max_grups() { // EPOCH 1 assert_eq!( - ActiveEpochData::::get().weights.len() as u32, + ActiveEpochData::::get().weights.len() as u32, MaxGroups::get() ); for i in 0..MaxGroups::get() { assert_eq!( - ActiveEpochData::::get().weights.get(&i), + ActiveEpochData::::get().weights.get(&i), Some(&WEIGHT) ); } diff --git a/pallets/loans/src/entities/changes.rs b/pallets/loans/src/entities/changes.rs index fe0c4cde31..1181f79da4 100644 --- a/pallets/loans/src/entities/changes.rs +++ b/pallets/loans/src/entities/changes.rs @@ -1,5 +1,5 @@ use cfg_traits::{interest::InterestRate, Seconds}; -use frame_support::{storage::bounded_vec::BoundedVec, RuntimeDebug}; +use frame_support::{pallet_prelude::RuntimeDebug, storage::bounded_vec::BoundedVec}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; diff --git a/pallets/loans/src/entities/loans.rs b/pallets/loans/src/entities/loans.rs index 5a32d34473..0489f22cf7 100644 --- a/pallets/loans/src/entities/loans.rs +++ b/pallets/loans/src/entities/loans.rs @@ -5,6 +5,7 @@ use cfg_traits::{ }; use cfg_types::adjustments::Adjustment; use frame_support::{ensure, pallet_prelude::DispatchResult, RuntimeDebugNoBound}; +use frame_system::pallet_prelude::BlockNumberFor; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_runtime::{ @@ -128,7 +129,7 @@ impl CreatedLoan { #[scale_info(skip_type_params(T))] pub struct ClosedLoan { /// Block when the loan was closed - closed_at: T::BlockNumber, + closed_at: BlockNumberFor, /// Loan information info: LoanInfo, diff --git a/pallets/loans/src/entities/pricing/external.rs b/pallets/loans/src/entities/pricing/external.rs index 9718e8b860..d0ecc8e897 100644 --- a/pallets/loans/src/entities/pricing/external.rs +++ b/pallets/loans/src/entities/pricing/external.rs @@ -2,7 +2,7 @@ use cfg_traits::{ self, data::DataRegistry, interest::InterestRate, IntoSeconds, Seconds, TimeAsSecs, }; use cfg_types::adjustments::Adjustment; -use frame_support::{self, ensure, RuntimeDebug, RuntimeDebugNoBound}; +use frame_support::{self, ensure, pallet_prelude::RuntimeDebug, RuntimeDebugNoBound}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_runtime::{ diff --git a/pallets/loans/src/entities/pricing/internal.rs b/pallets/loans/src/entities/pricing/internal.rs index 2e365248e8..1c285ce261 100644 --- a/pallets/loans/src/entities/pricing/internal.rs +++ b/pallets/loans/src/entities/pricing/internal.rs @@ -3,7 +3,11 @@ use cfg_traits::{ Seconds, TimeAsSecs, }; use cfg_types::adjustments::Adjustment; -use frame_support::{ensure, pallet_prelude::DispatchResult, RuntimeDebug, RuntimeDebugNoBound}; +use frame_support::{ + ensure, + pallet_prelude::{DispatchResult, RuntimeDebug}, + RuntimeDebugNoBound, +}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_arithmetic::traits::Saturating; diff --git a/pallets/loans/src/tests/mock.rs b/pallets/loans/src/tests/mock.rs index 83787e3c45..c2cc4e8ce3 100644 --- a/pallets/loans/src/tests/mock.rs +++ b/pallets/loans/src/tests/mock.rs @@ -18,20 +18,19 @@ use cfg_mocks::{ }; use cfg_traits::Millis; use cfg_types::{permissions::PermissionScope, tokens::TrancheCurrency}; -use frame_support::traits::{ - tokens::nonfungibles::{Create, Mutate}, - AsEnsureOriginWithArg, ConstU16, ConstU32, ConstU64, Hooks, UnixTime, +use frame_support::{ + derive_impl, + traits::{ + tokens::nonfungibles::{Create, Mutate}, + AsEnsureOriginWithArg, ConstU64, Hooks, UnixTime, + }, }; use frame_system::{EnsureRoot, EnsureSigned}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_arithmetic::{fixed_point::FixedU64, Perbill}; use sp_core::{ConstU128, H256}; -use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, - DispatchError, FixedU128, -}; +use sp_runtime::{DispatchError, FixedU128}; use crate::{entities::changes::Change, pallet as pallet_loans}; @@ -77,9 +76,6 @@ pub const MAX_PRICE_VARIATION: Rate = Rate::from_rational(1, 100); pub const PRICE_ID_NO_FOUND: DispatchError = DispatchError::Other("Price ID not found"); -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; - pub type CollectionId = u16; pub type ItemId = u16; pub type Asset = (CollectionId, ItemId); @@ -95,11 +91,7 @@ pub type PriceId = u64; pub type ChangeId = H256; frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Runtime { System: frame_system, Timer: pallet_timestamp, Balances: pallet_balances, @@ -119,31 +111,10 @@ frame_support::parameter_types! { pub const MaxWriteOffPolicySize: u32 = 4; } +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; - type AccountId = AccountId; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = ConstU64<250>; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = ConstU16<42>; - type SystemWeightInfo = (); - type Version = (); + type Block = frame_system::mocking::MockBlock; } impl pallet_timestamp::Config for Runtime { @@ -153,20 +124,13 @@ impl pallet_timestamp::Config for Runtime { type WeightInfo = (); } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); type ExistentialDeposit = ConstU128<1>; - type FreezeIdentifier = (); - type HoldIdentifier = (); - type MaxFreezes = (); - type MaxHolds = frame_support::traits::ConstU32<1>; - type MaxLocks = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); + type RuntimeHoldReason = (); } impl pallet_uniques::Config for Runtime { @@ -253,11 +217,7 @@ impl pallet_loans::Config for Runtime { } pub fn new_test_ext() -> sp_io::TestExternalities { - let storage = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap(); - - let mut ext = sp_io::TestExternalities::new(storage); + let mut ext = System::externalities(); ext.execute_with(|| { advance_time(BLOCK_TIME); diff --git a/pallets/loans/src/types/mod.rs b/pallets/loans/src/types/mod.rs index 729f54b0ec..922f3cda39 100644 --- a/pallets/loans/src/types/mod.rs +++ b/pallets/loans/src/types/mod.rs @@ -14,7 +14,7 @@ //! Contains base types without Config references use cfg_traits::Seconds; -use frame_support::{PalletError, RuntimeDebug}; +use frame_support::{pallet_prelude::RuntimeDebug, PalletError}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_runtime::{ diff --git a/pallets/loans/src/types/policy.rs b/pallets/loans/src/types/policy.rs index 9de6f6d144..3cd5501b84 100644 --- a/pallets/loans/src/types/policy.rs +++ b/pallets/loans/src/types/policy.rs @@ -12,7 +12,7 @@ // GNU General Public License for more details. use cfg_traits::Seconds; -use frame_support::{storage::bounded_btree_set::BoundedBTreeSet, RuntimeDebug}; +use frame_support::{pallet_prelude::RuntimeDebug, storage::bounded_btree_set::BoundedBTreeSet}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_runtime::{ diff --git a/pallets/loans/src/types/valuation.rs b/pallets/loans/src/types/valuation.rs index 05c62ed09b..0bd9b7330f 100644 --- a/pallets/loans/src/types/valuation.rs +++ b/pallets/loans/src/types/valuation.rs @@ -14,8 +14,8 @@ use cfg_primitives::SECONDS_PER_YEAR; use cfg_traits::{interest::InterestRate, Seconds}; use frame_support::{ + pallet_prelude::RuntimeDebug, traits::tokens::{self}, - RuntimeDebug, }; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; diff --git a/pallets/oracle-collection/Cargo.toml b/pallets/oracle-collection/Cargo.toml index 439e184592..5949c76b62 100644 --- a/pallets/oracle-collection/Cargo.toml +++ b/pallets/oracle-collection/Cargo.toml @@ -28,6 +28,7 @@ frame-benchmarking = { workspace = true, optional = true } [dev-dependencies] cfg-mocks = { workspace = true, default-features = true } +sp-io = { workspace = true, default-features = true } [features] default = ["std"] diff --git a/pallets/oracle-collection/src/benchmarking.rs b/pallets/oracle-collection/src/benchmarking.rs index 9092fd0e44..d450416c11 100644 --- a/pallets/oracle-collection/src/benchmarking.rs +++ b/pallets/oracle-collection/src/benchmarking.rs @@ -3,6 +3,7 @@ use cfg_traits::{ }; use frame_benchmarking::{v2::*, whitelisted_caller}; use frame_system::RawOrigin; +use sp_std::vec; // required for #[benchmarks] use crate::{ pallet::{Call, Collection, Config, Pallet}, diff --git a/pallets/oracle-collection/src/lib.rs b/pallets/oracle-collection/src/lib.rs index bf42509bbc..d8c663ff6c 100644 --- a/pallets/oracle-collection/src/lib.rs +++ b/pallets/oracle-collection/src/lib.rs @@ -474,8 +474,7 @@ pub mod pallet { pub mod types { use cfg_traits::data::DataCollection; use frame_support::{ - dispatch::DispatchError, - pallet_prelude::{Decode, Encode, MaxEncodedLen, TypeInfo}, + pallet_prelude::{Decode, DispatchError, Encode, MaxEncodedLen, TypeInfo}, storage::{bounded_btree_map::BoundedBTreeMap, bounded_btree_set::BoundedBTreeSet}, traits::Time, RuntimeDebugNoBound, @@ -613,7 +612,7 @@ pub mod util { /// Computes fastly the median of a list of values /// Extracted from orml - pub fn median(items: &mut Vec) -> Option<&T> { + pub fn median(items: &mut [T]) -> Option<&T> { if items.is_empty() { return None; } diff --git a/pallets/oracle-collection/src/mock.rs b/pallets/oracle-collection/src/mock.rs index a749dbaefa..a912bc5c56 100644 --- a/pallets/oracle-collection/src/mock.rs +++ b/pallets/oracle-collection/src/mock.rs @@ -1,18 +1,13 @@ use frame_support::{ + derive_impl, pallet_prelude::{Decode, Encode, MaxEncodedLen, TypeInfo}, - sp_io::TestExternalities, - traits::{ConstU16, ConstU32, ConstU64}, -}; -use sp_runtime::{ - testing::{Header, H256}, - traits::{BlakeTwo256, IdentityLookup}, + traits::ConstU32, }; +use sp_io::TestExternalities; +use sp_runtime::testing::H256; use crate::pallet as pallet_oracle_collection; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; - pub type AccountId = u64; pub type OracleKey = u32; pub type OracleValue = u128; @@ -28,11 +23,7 @@ frame_support::parameter_types! { } frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Runtime { System: frame_system, MockProvider: cfg_mocks::value_provider::pallet, MockIsAdmin: cfg_mocks::pre_conditions::pallet, @@ -42,31 +33,9 @@ frame_support::construct_runtime!( } ); +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { - type AccountData = (); - type AccountId = AccountId; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = ConstU64<250>; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = ConstU16<42>; - type SystemWeightInfo = (); - type Version = (); + type Block = frame_system::mocking::MockBlock; } impl cfg_mocks::value_provider::pallet::Config for Runtime { @@ -109,16 +78,7 @@ impl pallet_oracle_collection::Config for Runtime { } pub fn new_test_ext() -> TestExternalities { - let storage = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap(); - - let mut ext = TestExternalities::new(storage); - - // Bumping to one enables events - ext.execute_with(|| { - System::set_block_number(1); - MockTime::mock_now(|| NOW); - }); + let mut ext = System::externalities(); + ext.execute_with(|| MockTime::mock_now(|| NOW)); ext } diff --git a/pallets/oracle-feed/Cargo.toml b/pallets/oracle-feed/Cargo.toml index 2f66d3d73b..fe644c50b1 100644 --- a/pallets/oracle-feed/Cargo.toml +++ b/pallets/oracle-feed/Cargo.toml @@ -28,6 +28,7 @@ frame-benchmarking = { workspace = true, optional = true } [dev-dependencies] cfg-mocks = { workspace = true, default-features = true } +sp-io = { workspace = true, default-features = true } [features] default = ["std"] diff --git a/pallets/oracle-feed/src/benchmarking.rs b/pallets/oracle-feed/src/benchmarking.rs index a4532f8b06..26b8563eb8 100644 --- a/pallets/oracle-feed/src/benchmarking.rs +++ b/pallets/oracle-feed/src/benchmarking.rs @@ -3,6 +3,7 @@ use frame_benchmarking::{v2::*, whitelisted_caller}; use frame_support::traits::OriginTrait; use frame_system::RawOrigin; use parity_scale_codec::Decode; +use sp_std::vec; // required for #[benchmarks] use crate::pallet::{Call, Config, Pallet}; diff --git a/pallets/oracle-feed/src/lib.rs b/pallets/oracle-feed/src/lib.rs index f4a24c0c8d..522fb163b6 100644 --- a/pallets/oracle-feed/src/lib.rs +++ b/pallets/oracle-feed/src/lib.rs @@ -120,7 +120,7 @@ pub mod pallet { let _ = T::FeederOrigin::ensure_origin(origin.clone())?; let feeder = origin.clone().into_caller(); - let signed_account = origin.as_signed(); + let signed_account = origin.into_signer(); FedValues::::mutate(&feeder, key, |prev_value| { let new_weight = match (&prev_value, signed_account) { diff --git a/pallets/oracle-feed/src/mock.rs b/pallets/oracle-feed/src/mock.rs index c53ee9d568..ffe6c0dc81 100644 --- a/pallets/oracle-feed/src/mock.rs +++ b/pallets/oracle-feed/src/mock.rs @@ -1,29 +1,16 @@ -use frame_support::{ - sp_io::TestExternalities, - traits::{ConstU16, ConstU32, ConstU64, EitherOfDiverse}, -}; +use frame_support::{derive_impl, traits::EitherOfDiverse}; use frame_system::{EnsureRoot, EnsureSigned}; -use sp_runtime::{ - testing::{Header, H256}, - traits::{BlakeTwo256, IdentityLookup}, -}; +use sp_io::TestExternalities; use crate::pallet as pallet_oracle_feed; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; - pub type AccountId = u64; pub type OracleKey = u8; pub type OracleValue = u128; pub type Timestamp = u64; frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Runtime { System: frame_system, MockTime: cfg_mocks::pallet_mock_time, MockPayFee: cfg_mocks::pallet_mock_pay_fee, @@ -31,31 +18,9 @@ frame_support::construct_runtime!( } ); +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { - type AccountData = (); - type AccountId = AccountId; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = ConstU64<250>; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = ConstU16<42>; - type SystemWeightInfo = (); - type Version = (); + type Block = frame_system::mocking::MockBlock; } impl cfg_mocks::pallet_mock_time::Config for Runtime { @@ -75,13 +40,5 @@ impl pallet_oracle_feed::Config for Runtime { } pub fn new_test_ext() -> TestExternalities { - let storage = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap(); - - let mut ext = TestExternalities::new(storage); - - // Bumping to one enables events - ext.execute_with(|| System::set_block_number(1)); - ext + System::externalities() } diff --git a/pallets/order-book/Cargo.toml b/pallets/order-book/Cargo.toml index 5e0424f135..4b29841b7b 100644 --- a/pallets/order-book/Cargo.toml +++ b/pallets/order-book/Cargo.toml @@ -40,9 +40,6 @@ pallet-balances = { workspace = true, default-features = true } pallet-restricted-tokens = { workspace = true, default-features = true } sp-io = { workspace = true, default-features = true } -# Used by impl_mock_registry macro internally -xcm = { workspace = true, default-features = true } - [features] default = ["std"] std = [ diff --git a/pallets/order-book/src/benchmarking.rs b/pallets/order-book/src/benchmarking.rs index e77b239ed7..f3cebd0ea8 100644 --- a/pallets/order-book/src/benchmarking.rs +++ b/pallets/order-book/src/benchmarking.rs @@ -12,14 +12,17 @@ use cfg_traits::{ swaps::{OrderRatio, TokenSwaps}, - ValueProvider, + AssetMetadataOf, ValueProvider, }; -use cfg_types::tokens::{AssetMetadata, CustomMetadata}; use frame_benchmarking::{account, v2::*}; use frame_support::traits::fungibles::Mutate as _; use frame_system::RawOrigin; -use orml_traits::asset_registry::{Inspect as _, Mutate}; -use sp_runtime::{traits::checked_pow, FixedPointNumber}; +use orml_traits::asset_registry::{Inspect, Mutate}; +use sp_runtime::{ + traits::{checked_pow, Zero}, + FixedPointNumber, +}; +use sp_std::vec; // required for #[benchmarks] use super::*; @@ -41,33 +44,33 @@ struct Helper(sp_std::marker::PhantomData); impl Helper where T::CurrencyId: From, - T::AssetRegistry: orml_traits::asset_registry::Mutate, T::FeederId: From, T::AssetRegistry: Mutate, + ::CustomMetadata: Default, { pub fn setup_currencies() { T::AssetRegistry::register_asset( Some(CURRENCY_IN.into()), - AssetMetadata { + AssetMetadataOf:: { decimals: 6, - name: "CURRENCY IN".as_bytes().to_vec(), - symbol: "IN".as_bytes().to_vec(), + name: Default::default(), + symbol: Default::default(), existential_deposit: Zero::zero(), location: None, - additional: CustomMetadata::default(), + additional: Default::default(), }, ) .unwrap(); T::AssetRegistry::register_asset( Some(CURRENCY_OUT.into()), - AssetMetadata { + AssetMetadataOf:: { decimals: 3, - name: "CURRENCY OUT".as_bytes().to_vec(), - symbol: "OUT".as_bytes().to_vec(), + name: Default::default(), + symbol: Default::default(), existential_deposit: Zero::zero(), location: None, - additional: CustomMetadata::default(), + additional: Default::default(), }, ) .unwrap(); @@ -133,8 +136,9 @@ where #[benchmarks( where T::CurrencyId: From, - T::AssetRegistry: orml_traits::asset_registry::Mutate, T::FeederId: From, + T::AssetRegistry: Mutate, + ::CustomMetadata: Default, )] mod benchmarks { use super::*; diff --git a/pallets/order-book/src/lib.rs b/pallets/order-book/src/lib.rs index 5f94bbe567..0900c44aa4 100644 --- a/pallets/order-book/src/lib.rs +++ b/pallets/order-book/src/lib.rs @@ -43,7 +43,6 @@ pub mod pallet { swaps::{OrderInfo, OrderRatio, Swap, SwapInfo, TokenSwaps}, StatusNotificationHook, ValueProvider, }; - use cfg_types::{self, tokens::CustomMetadata}; use frame_support::{ pallet_prelude::{DispatchResult, Member, StorageDoubleMap, StorageValue, *}, traits::{ @@ -86,7 +85,6 @@ pub mod pallet { type AssetRegistry: asset_registry::Inspect< AssetId = Self::CurrencyId, Balance = BalanceOf, - CustomMetadata = CustomMetadata, >; /// CurrencyId that an order can be made for diff --git a/pallets/order-book/src/mock.rs b/pallets/order-book/src/mock.rs index 5e685b27b7..b9e56855ec 100644 --- a/pallets/order-book/src/mock.rs +++ b/pallets/order-book/src/mock.rs @@ -10,21 +10,13 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -use cfg_mocks::pallet_mock_fees; -use cfg_traits::swaps::SwapInfo; -use cfg_types::tokens::{CurrencyId, CustomMetadata}; -use frame_support::{ - parameter_types, - traits::{ConstU32, GenesisBuild}, -}; +use cfg_traits::{swaps::SwapInfo, AssetMetadataOf}; +use cfg_types::tokens::CurrencyId; +use frame_support::{derive_impl, parameter_types}; use frame_system::EnsureRoot; -use orml_traits::{asset_registry::AssetMetadata, parameter_type_with_key}; -use sp_core::{ConstU128, H256}; -use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, - FixedU128, -}; +use orml_traits::parameter_type_with_key; +use sp_core::{ConstU128, ConstU32}; +use sp_runtime::{BuildStorage, FixedU128}; use crate as order_book; @@ -58,17 +50,9 @@ pub type AccountId = u64; pub type OrderId = u32; pub type Ratio = FixedU128; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; - frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Runtime { Balances: pallet_balances, - Fees: pallet_mock_fees, System: frame_system, OrmlTokens: orml_tokens, OrderBook: order_book, @@ -78,43 +62,18 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub const BlockHashCount: u64 = 250; - pub const SS58Prefix: u8 = 42; -} - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; - type AccountId = AccountId; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = BlockHashCount; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = frame_support::traits::ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = SS58Prefix; - type SystemWeightInfo = (); - type Version = (); + type Block = frame_system::mocking::MockBlock; } cfg_test_utils::mocks::orml_asset_registry::impl_mock_registry! { RegistryMock, CurrencyId, Balance, - CustomMetadata + (), + () } impl cfg_mocks::value_provider::pallet::Config for Runtime { @@ -123,34 +82,19 @@ impl cfg_mocks::value_provider::pallet::Config for Runtime { type Value = Ratio; } -impl cfg_mocks::fees::pallet::Config for Runtime { - type Balance = Balance; - type FeeKey = u8; -} - impl cfg_mocks::status_notification::pallet::Config for Runtime { type Id = OrderId; type Status = SwapInfo; } -parameter_types! { - pub const DefaultFeeValue: Balance = 1; -} - +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); type ExistentialDeposit = ConstU128<1>; - type FreezeIdentifier = (); - type HoldIdentifier = (); - type MaxFreezes = (); - type MaxHolds = frame_support::traits::ConstU32<1>; - type MaxLocks = (); - type MaxReserves = ConstU32<50>; - type ReserveIdentifier = [u8; 8]; - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); + type MaxHolds = ConstU32<1>; + type RuntimeHoldReason = (); } parameter_type_with_key! { @@ -224,8 +168,8 @@ impl order_book::Config for Runtime { } pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); // Add foreign currency balances of differing precisions @@ -239,24 +183,24 @@ pub fn new_test_ext() -> sp_io::TestExternalities { metadata: vec![ ( CURRENCY_A, - AssetMetadata { + AssetMetadataOf:: { decimals: CURRENCY_A_DECIMALS, - name: "MOCK TOKEN_A".as_bytes().to_vec(), - symbol: "MOCK_A".as_bytes().to_vec(), + name: Default::default(), + symbol: Default::default(), existential_deposit: 0, location: None, - additional: CustomMetadata::default(), + additional: Default::default(), }, ), ( CURRENCY_B, - AssetMetadata { + AssetMetadataOf:: { decimals: CURRENCY_B_DECIMALS, - name: "MOCK TOKEN_B".as_bytes().to_vec(), - symbol: "MOCK_B".as_bytes().to_vec(), + name: Default::default(), + symbol: Default::default(), existential_deposit: 0, location: None, - additional: CustomMetadata::default(), + additional: Default::default(), }, ), ], diff --git a/pallets/permissions/Cargo.toml b/pallets/permissions/Cargo.toml index e030fac729..ddf8b3ed4a 100644 --- a/pallets/permissions/Cargo.toml +++ b/pallets/permissions/Cargo.toml @@ -28,6 +28,7 @@ frame-benchmarking = { workspace = true, optional = true } [dev-dependencies] bitflags = { workspace = true } +sp-io = { workspace = true, default-features = true } [features] default = ["std"] diff --git a/pallets/permissions/src/mock.rs b/pallets/permissions/src/mock.rs index a9735e06c5..22312c705d 100644 --- a/pallets/permissions/src/mock.rs +++ b/pallets/permissions/src/mock.rs @@ -12,61 +12,33 @@ pub use dummy::pallet as pallet_dummy; use frame_support::{ - parameter_types, - sp_io::TestExternalities, - sp_runtime::{ - testing::{Header, H256}, - traits::{BlakeTwo256, IdentityLookup}, - }, - traits::{Contains, EitherOfDiverse, Everything, SortedMembers}, - weights::Weight, + derive_impl, parameter_types, + traits::{Contains, EitherOfDiverse, SortedMembers}, }; use frame_system::{EnsureRoot, EnsureSignedBy}; use pallet_permissions::Properties; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; -use sp_runtime::traits::AccountIdConversion; +use scale_info::TypeInfo; +use sp_io::TestExternalities; +use sp_runtime::{traits::AccountIdConversion, BuildStorage}; ///! Mock environment setup for testing the pallet-permissions use crate::{self as pallet_permissions}; -#[derive( - parity_scale_codec::Encode, - parity_scale_codec::Decode, - scale_info::TypeInfo, - Debug, - Clone, - Eq, - PartialEq, -)] +#[derive(Encode, Decode, TypeInfo, Debug, Clone, Eq, PartialEq)] pub enum OrganisationRole { SeniorExeutive, HeadOfSaubermaching, Admin, } -#[derive( - parity_scale_codec::Encode, - parity_scale_codec::Decode, - scale_info::TypeInfo, - Debug, - Clone, - Eq, - PartialEq, -)] +#[derive(Encode, Decode, TypeInfo, Debug, Clone, Eq, PartialEq)] pub enum XcmRole { Sender, Receiver, } -#[derive( - parity_scale_codec::Encode, - parity_scale_codec::Decode, - scale_info::TypeInfo, - Debug, - Clone, - Eq, - PartialEq, -)] +#[derive(Encode, Decode, TypeInfo, Debug, Clone, Eq, PartialEq)] pub enum Role { Organisation(OrganisationRole), Xcm(XcmRole), @@ -74,7 +46,7 @@ pub enum Role { bitflags::bitflags! { /// The current admin roles we support - #[derive(parity_scale_codec::Encode, parity_scale_codec::Decode, scale_info::TypeInfo, MaxEncodedLen)] + #[derive(Encode, Decode, TypeInfo, MaxEncodedLen)] pub struct OrgStorage: u32 { const SENIOR_EXEC = 0b00000001; const HEAD_OF_SAUBERMACHING = 0b00000010; @@ -84,23 +56,14 @@ bitflags::bitflags! { bitflags::bitflags! { /// The current admin roles we support - #[derive(parity_scale_codec::Encode, parity_scale_codec::Decode, scale_info::TypeInfo, MaxEncodedLen)] + #[derive(Encode, Decode, TypeInfo, MaxEncodedLen)] pub struct XcmStorage: u32 { const SENDER = 0b00000001; const RECEIVER = 0b00000010; } } -#[derive( - parity_scale_codec::Encode, - parity_scale_codec::Decode, - scale_info::TypeInfo, - Debug, - Clone, - Eq, - PartialEq, - MaxEncodedLen, -)] +#[derive(Encode, Decode, TypeInfo, Debug, Clone, Eq, PartialEq, MaxEncodedLen)] pub struct Storage { org: OrgStorage, xcm: XcmStorage, @@ -115,16 +78,7 @@ impl Default for Storage { } } -#[derive( - parity_scale_codec::Encode, - parity_scale_codec::Decode, - scale_info::TypeInfo, - Debug, - Clone, - Eq, - PartialEq, - MaxEncodedLen, -)] +#[derive(Encode, Decode, TypeInfo, Debug, Clone, Eq, PartialEq, MaxEncodedLen)] pub enum Scope { PalletA, PalletB, @@ -271,55 +225,19 @@ mod dummy { } } -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; pub type AccountId = u64; -// Build mock runtime frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Permissions: pallet_permissions::{Pallet, Call, Storage, Event}, - Dummy: pallet_dummy::{Pallet, Call} + pub enum Runtime { + System: frame_system, + Permissions: pallet_permissions, + Dummy: pallet_dummy } ); -// Parameterize frame system pallet -parameter_types! { - pub const BlockHashCount: u64 = 250; - pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights::simple_max(Weight::from_parts(1024, 0).set_proof_size(u64::MAX).into()); -} - -// Implement frame system configuration for the mock runtime +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { - type AccountData = (); - type AccountId = AccountId; - type BaseCallFilter = Everything; - type BlockHashCount = BlockHashCount; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = BlockWeights; - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = frame_support::traits::ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = (); - type SystemWeightInfo = (); - type Version = (); + type Block = frame_system::mocking::MockBlock; } parameter_types! { @@ -401,8 +319,8 @@ pub struct TestExternalitiesBuilder; impl TestExternalitiesBuilder { // Build a genesis storage key/value store pub fn build(self, optional: impl FnOnce()) -> TestExternalities { - let storage = frame_system::GenesisConfig::default() - .build_storage::() + let storage = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); let mut ext = TestExternalities::from(storage); diff --git a/pallets/pool-fees/Cargo.toml b/pallets/pool-fees/Cargo.toml index d8a3ba54d3..83bb4b4423 100644 --- a/pallets/pool-fees/Cargo.toml +++ b/pallets/pool-fees/Cargo.toml @@ -65,6 +65,7 @@ runtime-benchmarks = [ "cfg-primitives/runtime-benchmarks", "cfg-traits/runtime-benchmarks", "cfg-types/runtime-benchmarks", + "cfg-mocks/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", diff --git a/pallets/pool-fees/src/benchmarking.rs b/pallets/pool-fees/src/benchmarking.rs index 4aef893183..66ac8fb9e3 100644 --- a/pallets/pool-fees/src/benchmarking.rs +++ b/pallets/pool-fees/src/benchmarking.rs @@ -19,6 +19,7 @@ use cfg_traits::{ use cfg_types::pools::PoolFeeEditor; use frame_benchmarking::v2::*; use frame_support::{assert_ok, dispatch::RawOrigin}; +use sp_std::vec; // required for #[benchmarks] use super::*; use crate::{types::Change, Pallet as PoolFees}; diff --git a/pallets/pool-fees/src/lib.rs b/pallets/pool-fees/src/lib.rs index 7ffe3f5f51..0a9a554416 100644 --- a/pallets/pool-fees/src/lib.rs +++ b/pallets/pool-fees/src/lib.rs @@ -113,7 +113,6 @@ pub mod pallet { type Rate: Parameter + Member + cfg_types::fixed_point::FixedPointNumberExtension - + MaybeSerializeDeserialize + TypeInfo + MaxEncodedLen; diff --git a/pallets/pool-fees/src/mock.rs b/pallets/pool-fees/src/mock.rs index ab95b638ef..28da32d9b2 100644 --- a/pallets/pool-fees/src/mock.rs +++ b/pallets/pool-fees/src/mock.rs @@ -24,22 +24,13 @@ use cfg_types::{ tokens::TrancheCurrency, }; use frame_support::{ - assert_ok, - pallet_prelude::ConstU32, - parameter_types, - traits::{ - fungibles::{Inspect, Mutate}, - ConstU128, ConstU16, ConstU64, - }, + assert_ok, derive_impl, parameter_types, + traits::fungibles::{Inspect, Mutate}, PalletId, }; use sp_arithmetic::{traits::Zero, FixedPointNumber}; use sp_core::H256; -use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, - DispatchError, -}; +use sp_runtime::{traits::ConstU128, BuildStorage, DispatchError}; use sp_std::vec::Vec; use crate::{ @@ -69,19 +60,12 @@ pub const NAV: Balance = 1_000_000_000_000_000; pub const ERR_CHANGE_GUARD_RELEASE: DispatchError = DispatchError::Other("ChangeGuard release disabled if not mocked via config_change_mocks"); -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; - -type Block = frame_system::mocking::MockBlock; pub type AccountId = u64; pub type CurrencyId = u32; pub type ChangeId = H256; frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Runtime { System: frame_system, MockTime: cfg_mocks::pallet_mock_time, Balances: pallet_balances, @@ -94,47 +78,19 @@ frame_support::construct_runtime!( } ); +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; - type AccountId = AccountId; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = ConstU64<250>; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = ConstU16<42>; - type SystemWeightInfo = (); - type Version = (); + type Block = frame_system::mocking::MockBlock; } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); type ExistentialDeposit = ConstU128<1>; - type FreezeIdentifier = (); - type HoldIdentifier = (); - type MaxFreezes = (); - type MaxHolds = frame_support::traits::ConstU32<1>; - type MaxLocks = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); + type RuntimeHoldReason = (); } impl pallet_mock_pools::Config for Runtime { @@ -455,8 +411,8 @@ impl ExtBuilder { } pub(crate) fn build(self) -> sp_io::TestExternalities { - let storage = frame_system::GenesisConfig::default() - .build_storage::() + let storage = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); let mut ext = sp_io::TestExternalities::new(storage); diff --git a/pallets/pool-fees/src/types.rs b/pallets/pool-fees/src/types.rs index ef30a43acd..5802a0e6a4 100644 --- a/pallets/pool-fees/src/types.rs +++ b/pallets/pool-fees/src/types.rs @@ -11,8 +11,8 @@ // GNU General Public License for more details. use cfg_traits::fee::PoolFeeBucket; -use frame_support::dispatch::TypeInfo; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; +use scale_info::TypeInfo; use crate::{Config, PoolFeeInfoOf}; diff --git a/pallets/pool-registry/Cargo.toml b/pallets/pool-registry/Cargo.toml index 9c2043ae99..718adf7416 100644 --- a/pallets/pool-registry/Cargo.toml +++ b/pallets/pool-registry/Cargo.toml @@ -23,7 +23,7 @@ orml-asset-registry = { workspace = true } orml-traits = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } -xcm = { workspace = true } +staging-xcm = { workspace = true } cfg-primitives = { workspace = true } cfg-traits = { workspace = true } @@ -42,10 +42,11 @@ cfg-test-utils = { workspace = true, default-features = true } orml-tokens = { workspace = true, default-features = true } pallet-balances = { workspace = true, default-features = true } pallet-permissions = { workspace = true, default-features = true } -pallet-pool-system = { workspace = true } +pallet-pool-fees = { workspace = true, default-features = true } +pallet-pool-system = { workspace = true, default-features = true } pallet-timestamp = { workspace = true, default-features = true } parachain-info = { workspace = true, default-features = true } -serde = { workspace = true } +serde = { workspace = true, default-features = true } sp-core = { workspace = true, default-features = true } sp-io = { workspace = true, default-features = true } @@ -65,7 +66,7 @@ std = [ "frame-benchmarking/std", "pallet-investments/std", "scale-info/std", - "xcm/std", + "staging-xcm/std", "pallet-pool-fees/std", "pallet-pool-system/std", ] diff --git a/pallets/pool-registry/src/benchmarking.rs b/pallets/pool-registry/src/benchmarking.rs index 1f97ea34ee..fe9b1444c6 100644 --- a/pallets/pool-registry/src/benchmarking.rs +++ b/pallets/pool-registry/src/benchmarking.rs @@ -68,8 +68,6 @@ benchmarks! { CurrencyId = CurrencyId, EpochId = PoolEpochId, Rate = ::InterestRate, - MaxTokenNameLength = ::MaxTokenNameLength, - MaxTokenSymbolLength = ::MaxTokenSymbolLength, MaxTranches = ::MaxTranches>, T: pallet_pool_fees::Config, ::PoolFees: PoolFeesBenchmarkHelper< @@ -85,13 +83,13 @@ benchmarks! { ::PoolId, TrancheInput = TrancheInput< ::Rate, - ::MaxTokenNameLength, - ::MaxTokenSymbolLength>, + ::StringLimit + >, PoolChanges = PoolChanges< ::Rate, - ::MaxTokenNameLength, - ::MaxTokenSymbolLength, - ::MaxTranches>, + ::StringLimit, + ::MaxTranches + >, PoolFeeInput = (PoolFeeBucket, <::PoolFees as PoolFeesBenchmarkHelper>::PoolFeeInfo), >, Vec<(PoolFeeBucket, PoolFeeInfo<::AccountId, u128, ::InterestRate>)>: FromIterator<(PoolFeeBucket, PoolFeeInfo<::AccountId, u128, ::Rate>)> @@ -236,8 +234,8 @@ fn get_pool_metadata>() -> PoolMetadataOf { Pallet::::get_pool_metadata(POOL).unwrap() } -fn build_update_tranche_token_metadata( -) -> BoundedVec, T::MaxTranches> { +fn build_update_tranche_token_metadata( +) -> BoundedVec, T::MaxTranches> { vec![TrancheMetadata { token_name: BoundedVec::default(), token_symbol: BoundedVec::default(), diff --git a/pallets/pool-registry/src/lib.rs b/pallets/pool-registry/src/lib.rs index 1feb306862..332296ec75 100644 --- a/pallets/pool-registry/src/lib.rs +++ b/pallets/pool-registry/src/lib.rs @@ -21,25 +21,26 @@ use cfg_traits::{ fee::{PoolFeeBucket, PoolFeesInspect}, investments::TrancheCurrency, - Permissions, PoolMutate, PoolWriteOffPolicyMutate, UpdateState, + AssetMetadataOf, Permissions, PoolMutate, PoolWriteOffPolicyMutate, UpdateState, }; use cfg_types::{ permissions::{PermissionScope, PoolRole, Role}, pools::{PoolFeeInfo, PoolMetadata, PoolRegistrationStatus}, tokens::CustomMetadata, }; -use frame_support::{pallet_prelude::*, scale_info::TypeInfo, transactional, BoundedVec}; +use frame_support::{pallet_prelude::*, transactional, BoundedVec}; use frame_system::pallet_prelude::*; use orml_traits::asset_registry::{Inspect, Mutate}; pub use pallet::*; use parity_scale_codec::{HasCompact, MaxEncodedLen}; +use scale_info::TypeInfo; use sp_runtime::{ traits::{AtLeast32BitUnsigned, BadOrigin}, FixedPointNumber, FixedPointOperand, }; use sp_std::vec::Vec; +use staging_xcm::VersionedMultiLocation; pub use weights::WeightInfo; -use xcm::VersionedMultiLocation; #[cfg(feature = "runtime-benchmarks")] mod benchmarking; @@ -137,14 +138,6 @@ pub mod pallet { /// The origin permitted to create pools type PoolCreateOrigin: EnsureOrigin; - /// Max length for a tranche token name - #[pallet::constant] - type MaxTokenNameLength: Get + Copy + Member + scale_info::TypeInfo; - - /// Max length for a tranche token symbol - #[pallet::constant] - type MaxTokenSymbolLength: Get + Copy + Member + scale_info::TypeInfo; - /// Max number of Tranches #[pallet::constant] type MaxTranches: Get + Member + scale_info::TypeInfo; @@ -216,9 +209,6 @@ pub mod pallet { BadMetadata, /// A Pool with the given ID was already registered in the past PoolAlreadyRegistered, - /// Pre-requirements for a TrancheUpdate are not met - /// for example: Tranche changed but not its metadata or vice versa - InvalidTrancheUpdate, /// No metadata for the given currency found MetadataForCurrencyNotFound, /// No Metadata found for the given PoolId @@ -453,7 +443,7 @@ pub mod pallet { } impl cfg_traits::PoolMetadata for Pallet { - type AssetMetadata = orml_asset_registry::AssetMetadata; + type AssetMetadata = AssetMetadataOf; type CustomMetadata = CustomMetadata; type PoolId = T::PoolId; type PoolMetadata = PoolMetadataOf; @@ -499,8 +489,13 @@ pub mod pallet { T::AssetRegistry::update_asset( currency_id, decimals, - name, - symbol, + name.map(|s| s.try_into()) + .transpose() + .map_err(|_| Error::::TrancheTokenNameTooLong)?, + symbol + .map(|s| s.try_into()) + .transpose() + .map_err(|_| Error::::TrancheSymbolNameTooLong)?, existential_deposit, location, additional, diff --git a/pallets/pool-registry/src/mock.rs b/pallets/pool-registry/src/mock.rs index a17826fe8f..895ff43d84 100644 --- a/pallets/pool-registry/src/mock.rs +++ b/pallets/pool-registry/src/mock.rs @@ -29,9 +29,11 @@ use cfg_types::{ tokens::{CurrencyId, CustomMetadata, TrancheCurrency}, }; use frame_support::{ - dispatch::{DispatchError, DispatchResult}, + derive_impl, + dispatch::DispatchResult, + pallet_prelude::DispatchError, parameter_types, - traits::{Contains, GenesisBuild, Hooks, PalletInfoAccess, SortedMembers}, + traits::{Contains, Hooks, PalletInfoAccess, SortedMembers}, PalletId, }; use frame_system::EnsureSigned; @@ -42,51 +44,22 @@ use pallet_pool_system::{ }; use sp_core::H256; use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup, Zero}, + traits::{ConstU128, Zero}, + BuildStorage, }; use crate::{self as pallet_pool_registry, Config}; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; - pub const AUSD_CURRENCY_ID: CurrencyId = CurrencyId::ForeignAsset(1); const CURRENCY: Balance = 1_000_000_000_000_000_000; pub type Balance = BalanceType; type AccountId = u64; -parameter_types! { - pub const BlockHashCount: u64 = 250; - pub const SS58Prefix: u8 = 42; -} - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Test { type AccountData = pallet_balances::AccountData; - type AccountId = u64; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = BlockHashCount; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = frame_support::traits::ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = SS58Prefix; - type SystemWeightInfo = (); - type Version = (); + type Block = frame_system::mocking::MockBlock; } impl pallet_timestamp::Config for Test { @@ -106,7 +79,8 @@ cfg_test_utils::mocks::orml_asset_registry::impl_mock_registry! { RegistryMock, CurrencyId, Balance, - CustomMetadata + CustomMetadata, + StringLimit } parameter_types! { @@ -130,10 +104,7 @@ parameter_types! { pub const MaxNAVAgeUpperBound: u64 = 24 * 60 * 60; #[derive(scale_info::TypeInfo, Eq, PartialEq, Debug, Clone, Copy )] - pub const MaxTokenNameLength: u32 = 128; - - #[derive(scale_info::TypeInfo, Eq, PartialEq, Debug, Clone, Copy )] - pub const MaxTokenSymbolLength: u32 = 32; + pub const StringLimit: u32 = 128; pub const PoolDeposit: Balance = 1 * CURRENCY; } @@ -157,8 +128,6 @@ impl pallet_pool_system::Config for Test { type EpochId = PoolEpochId; type Investments = Investments; type MaxNAVAgeUpperBound = MaxNAVAgeUpperBound; - type MaxTokenNameLength = MaxTokenNameLength; - type MaxTokenSymbolLength = MaxTokenSymbolLength; type MaxTranches = MaxTranches; type MinEpochTimeLowerBound = MinEpochTimeLowerBound; type MinEpochTimeUpperBound = MinEpochTimeUpperBound; @@ -176,6 +145,7 @@ impl pallet_pool_system::Config for Test { type Rate = Rate; type RuntimeChange = pallet_pool_system::pool_types::changes::PoolChangeProposal; type RuntimeEvent = RuntimeEvent; + type StringLimit = StringLimit; type Time = Timestamp; type Tokens = OrmlTokens; type TrancheCurrency = TrancheCurrency; @@ -242,13 +212,9 @@ where { type Balance = ::Balance; type CurrencyId = ::CurrencyId; - type MaxTokenNameLength = ::MaxTokenNameLength; - type MaxTokenSymbolLength = ::MaxTokenSymbolLength; - type MaxTranches = ::MaxTranches; type PoolChanges = PoolChanges< ::Rate, - ::MaxTokenNameLength, - ::MaxTokenSymbolLength, + ::StringLimit, ::MaxTranches, >; type PoolFeeInput = ( @@ -257,8 +223,7 @@ where ); type TrancheInput = TrancheInput< ::Rate, - ::MaxTokenNameLength, - ::MaxTokenSymbolLength, + ::StringLimit, >; fn create( @@ -327,8 +292,6 @@ impl Config for Test { type CurrencyId = CurrencyId; type InterestRate = Rate; type MaxSizeMetadata = MaxSizeMetadata; - type MaxTokenNameLength = MaxTokenNameLength; - type MaxTokenSymbolLength = MaxTokenSymbolLength; type MaxTranches = MaxTranches; type ModifyPool = ModifyPoolMock; type ModifyWriteOffPolicy = MockWriteOffPolicy; @@ -401,24 +364,19 @@ impl pallet_mock_pre_conditions::Config for Test { // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test - where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - Balances: pallet_balances::{Pallet, Storage, Event}, - FakeNav: cfg_test_utils::mocks::nav::{Pallet, Storage}, - OrmlTokens: orml_tokens::{Pallet, Storage, Event, Config}, - PoolRegistry: pallet_pool_registry::{Pallet, Call, Storage, Event}, - PoolSystem: pallet_pool_system::{Pallet, Call, Storage, Event}, - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, - Investments: pallet_investments::{Pallet, Call, Storage, Event}, + pub enum Test { + Balances: pallet_balances, + FakeNav: cfg_test_utils::mocks::nav, + OrmlTokens: orml_tokens, + PoolRegistry: pallet_pool_registry, + PoolSystem: pallet_pool_system, + System: frame_system, + Timestamp: pallet_timestamp, + Investments: pallet_investments, MockWriteOffPolicy: pallet_mock_write_off_policy, MockChangeGuard: pallet_mock_change_guard, MockIsAdmin: cfg_mocks::pre_conditions::pallet, - PoolFees: pallet_pool_fees::{Pallet, Call, Storage, Event}, + PoolFees: pallet_pool_fees, } ); @@ -446,8 +404,7 @@ impl PoolUpdateGuard for UpdateGuard { u64, MaxTranches, >; - type ScheduledUpdateDetails = - ScheduledUpdateDetails; + type ScheduledUpdateDetails = ScheduledUpdateDetails; fn released( pool: &Self::PoolDetails, @@ -476,27 +433,13 @@ impl PoolUpdateGuard for UpdateGuard { } } -// Parameterize balances pallet -parameter_types! { - pub const ExistentialDeposit: u64 = 1; - pub const FundsAccount: PalletId = cfg_test_utils::TEST_PALLET_ID; -} - -// Implement balances pallet configuration for mock runtime +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for Test { type AccountStore = System; type Balance = Balance; type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type FreezeIdentifier = (); - type HoldIdentifier = (); - type MaxFreezes = (); - type MaxHolds = frame_support::traits::ConstU32<1>; - type MaxLocks = MaxLocks; - type MaxReserves = (); - type ReserveIdentifier = (); - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); + type ExistentialDeposit = ConstU128<1>; + type RuntimeHoldReason = (); } pub struct PermissionsMock {} @@ -547,8 +490,8 @@ pub const START_DATE: u64 = 1640995200; impl TestExternalitiesBuilder { // Build a genesis storage key/value store pub fn build(self) -> sp_io::TestExternalities { - let mut storage = frame_system::GenesisConfig::default() - .build_storage::() + let mut storage = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); orml_tokens::GenesisConfig:: { @@ -574,8 +517,8 @@ impl TestExternalitiesBuilder { AUSD_CURRENCY_ID, AssetMetadata { decimals: 12, - name: "MOCK TOKEN".as_bytes().to_vec(), - symbol: "MOCK".as_bytes().to_vec(), + name: Default::default(), + symbol: Default::default(), existential_deposit: 0, location: None, additional: CustomMetadata::default(), diff --git a/pallets/pool-registry/src/tests.rs b/pallets/pool-registry/src/tests.rs index f50ed4e228..78468b5e68 100644 --- a/pallets/pool-registry/src/tests.rs +++ b/pallets/pool-registry/src/tests.rs @@ -10,15 +10,15 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -use cfg_traits::PoolMetadata; -use cfg_types::{pools::TrancheMetadata, tokens::CustomMetadata}; +use cfg_traits::{AssetMetadataOf, PoolMetadata}; +use cfg_types::pools::TrancheMetadata; use frame_support::{assert_noop, assert_ok, BoundedVec}; use orml_traits::Change; use pallet_pool_system::{ pool_types::PoolChanges, tranches::{TrancheInput, TrancheType}, }; -use xcm::VersionedMultiLocation; +use staging_xcm::VersionedMultiLocation; use crate::{mock::*, pallet, pallet::Error, PoolMetadataOf}; @@ -169,10 +169,10 @@ fn trait_pool_metadata_create_tranche_token_metadata() { .execute_with(|| { let pool_id = 0; let tranche_id: [u8; 16] = [0u8; 16]; - let metadata = orml_asset_registry::AssetMetadata:: { + let metadata = AssetMetadataOf:: { decimals: 12, - name: "Test Token".into(), - symbol: "TEST".into(), + name: Default::default(), + symbol: Default::default(), existential_deposit: 1_000_000_000_000, location: None, additional: Default::default(), @@ -194,10 +194,10 @@ fn trait_pool_metadata_get_tranche_token_metadata() { .execute_with(|| { let pool_id = 0; let tranche_id: [u8; 16] = [0u8; 16]; - let metadata = orml_asset_registry::AssetMetadata:: { + let metadata = AssetMetadataOf:: { decimals: 12, - name: "Test Token".into(), - symbol: "TEST".into(), + name: Default::default(), + symbol: Default::default(), existential_deposit: 1_000_000_000_000, location: None, additional: Default::default(), @@ -234,18 +234,18 @@ fn trait_pool_metadata_update_tranche_token_metadata() { .execute_with(|| { let pool_id = 0; let tranche_id: [u8; 16] = [0u8; 16]; - let old = orml_asset_registry::AssetMetadata:: { + let old = AssetMetadataOf:: { decimals: 12, - name: "Old".into(), - symbol: "OLD".into(), + name: Default::default(), + symbol: Default::default(), existential_deposit: 1_000_000_000_000, location: None, additional: Default::default(), }; - let new = orml_asset_registry::AssetMetadata:: { + let new = AssetMetadataOf:: { decimals: 14, - name: "New".into(), - symbol: "NEW".into(), + name: Vec::from(b"New").try_into().unwrap(), + symbol: Vec::from(b"NEW").try_into().unwrap(), existential_deposit: 2_000_000_000_000, location: None, additional: Default::default(), @@ -263,8 +263,8 @@ fn trait_pool_metadata_update_tranche_token_metadata() { pool_id, tranche_id, Some(new.decimals.clone()), - Some(new.name.clone()), - Some(new.symbol.clone()), + Some(new.name.clone().into_inner()), + Some(new.symbol.clone().into_inner()), Some(new.existential_deposit.clone()), None, None diff --git a/pallets/pool-system/Cargo.toml b/pallets/pool-system/Cargo.toml index cd84763160..c4889953d4 100644 --- a/pallets/pool-system/Cargo.toml +++ b/pallets/pool-system/Cargo.toml @@ -46,12 +46,13 @@ orml-asset-registry = { workspace = true, default-features = true } orml-tokens = { workspace = true, default-features = true } pallet-balances = { workspace = true, default-features = true } pallet-investments = { workspace = true, default-features = true } +pallet-pool-fees = { workspace = true, default-features = true } pallet-restricted-tokens = { workspace = true, default-features = true } parachain-info = { workspace = true, default-features = true } rand = { workspace = true, default-features = true } sp-core = { workspace = true, default-features = true } sp-io = { workspace = true, default-features = true } -xcm = { workspace = true, default-features = true } +staging-xcm = { workspace = true, default-features = true } [features] default = ["std"] @@ -60,12 +61,14 @@ std = [ "cfg-traits/std", "cfg-types/std", "parity-scale-codec/std", - "frame-benchmarking/std", + "frame-benchmarking?/std", "frame-support/std", "frame-system/std", "orml-traits/std", + "orml-asset-registry?/std", "pallet-permissions/std", - "pallet-pool-fees/std", + "pallet-investments?/std", + "pallet-pool-fees?/std", "pallet-timestamp/std", "rev_slice/std", "scale-info/std", diff --git a/pallets/pool-system/src/benchmarking.rs b/pallets/pool-system/src/benchmarking.rs index 8ee8df43a9..96996f3036 100644 --- a/pallets/pool-system/src/benchmarking.rs +++ b/pallets/pool-system/src/benchmarking.rs @@ -215,8 +215,8 @@ where Some(AUSD_CURRENCY_ID), orml_asset_registry::AssetMetadata { decimals: 18, - name: "MOCK AUSD".as_bytes().to_vec(), - symbol: "MOCKAUSD".as_bytes().to_vec(), + name: Default::default(), + symbol: Default::default(), existential_deposit: 0, location: None, additional: CustomMetadata { @@ -268,7 +268,7 @@ where investor.clone(), Role::PoolRole(PoolRole::TrancheInvestor(tranche_id, 0x0FFF_FFFF_FFFF_FFFF)), )?; - T::Currency::deposit_creating(&investor.clone(), ED); + let _ = T::Currency::deposit_creating(&investor.clone(), ED); T::Tokens::mint_into(AUSD_CURRENCY_ID, &investor.clone(), MINT_AMOUNT)?; if let Some(amount) = with_tranche_tokens { T::Tokens::mint_into( @@ -287,7 +287,7 @@ where { let admin: T::AccountId = account("admin", id, 0); let mint_amount = T::PoolDeposit::get() * 2 + ED; - T::Currency::deposit_creating(&admin.clone(), mint_amount); + let _ = T::Currency::deposit_creating(&admin.clone(), mint_amount); admin } @@ -327,20 +327,19 @@ where } pub fn update_pool>( - changes: PoolChanges, + changes: PoolChanges, ) -> Result { Pallet::::update(POOL, changes) } pub fn get_scheduled_update>( -) -> ScheduledUpdateDetails -{ +) -> ScheduledUpdateDetails { Pallet::::scheduled_update(POOL).unwrap() } pub fn assert_input_tranches_match( chain: &[TrancheOf], - target: &[TrancheInput], + target: &[TrancheInput], ) { assert_eq!(chain.len(), target.len()); for (chain, target) in chain.iter().zip(target.iter()) { @@ -360,7 +359,7 @@ pub fn assert_update_tranches_match( pub fn build_bench_input_tranches( num_tranches: u32, -) -> Vec> { +) -> Vec> { let senior_interest_rate = T::Rate::saturating_from_rational(5, 100) / T::Rate::saturating_from_integer(SECS_PER_YEAR); let mut tranches: Vec<_> = (1..num_tranches) diff --git a/pallets/pool-system/src/impls.rs b/pallets/pool-system/src/impls.rs index 5dfce922b3..a0cb34ae6a 100644 --- a/pallets/pool-system/src/impls.rs +++ b/pallets/pool-system/src/impls.rs @@ -105,21 +105,18 @@ impl TrancheTokenPrice for Pallet { impl PoolMutate for Pallet { type Balance = T::Balance; type CurrencyId = T::CurrencyId; - type MaxTokenNameLength = T::MaxTokenNameLength; - type MaxTokenSymbolLength = T::MaxTokenSymbolLength; - type MaxTranches = T::MaxTranches; type PoolChanges = PoolChangesOf; type PoolFeeInput = ( PoolFeeBucket, PoolFeeInfo, ); - type TrancheInput = TrancheInput; + type TrancheInput = TrancheInput; fn create( admin: T::AccountId, depositor: T::AccountId, pool_id: T::PoolId, - tranche_inputs: Vec>, + tranche_inputs: Vec>, currency: T::CurrencyId, max_reserve: T::Balance, pool_fees: Vec, @@ -140,7 +137,7 @@ impl PoolMutate for Pallet { tranche_type: t.tranche_type, seniority: t.seniority, }) - .collect(), + .collect::>(), )?; Self::take_deposit(depositor.clone(), pool_id)?; @@ -155,18 +152,11 @@ impl PoolMutate for Pallet { T::TrancheId, T::PoolId, T::MaxTranches, - >::from_input::( - pool_id, - tranche_inputs.clone(), - now, - )?; + >::from_input::(pool_id, tranche_inputs.clone(), now)?; for (tranche, tranche_input) in tranches.tranches.iter().zip(&tranche_inputs) { - let token_name: BoundedVec = - tranche_input.metadata.token_name.clone(); - - let token_symbol: BoundedVec = - tranche_input.metadata.token_symbol.clone(); + let token_name = tranche_input.metadata.token_name.clone(); + let token_symbol = tranche_input.metadata.token_symbol.clone(); // The decimals of the tranche token need to match the decimals of the pool // currency. Otherwise, we'd always need to convert investments to the decimals @@ -176,8 +166,7 @@ impl PoolMutate for Pallet { None => return Err(Error::::MetadataForCurrencyNotFound.into()), }; - let metadata = - tranche.create_asset_metadata(decimals, token_name.to_vec(), token_symbol.to_vec()); + let metadata = tranche.create_asset_metadata(decimals, token_name, token_symbol); T::AssetRegistry::register_asset(Some(tranche.currency.into()), metadata) .map_err(|_| Error::::FailedToRegisterTrancheMetadata)?; @@ -213,9 +202,7 @@ impl PoolMutate for Pallet { admin: admin.clone(), depositor, pool_id, - essence: pool_details - .essence::( - )?, + essence: pool_details.essence::()?, }); T::Permission::add( @@ -503,8 +490,8 @@ mod benchmarks_utils { Some(POOL_CURRENCY), orml_asset_registry::AssetMetadata { decimals: 12, - name: "MOCK POOL CURRENCY".as_bytes().to_vec(), - symbol: "MOCKPCUR".as_bytes().to_vec(), + name: Default::default(), + symbol: Default::default(), existential_deposit: Zero::zero(), location: None, additional: CustomMetadata { diff --git a/pallets/pool-system/src/lib.rs b/pallets/pool-system/src/lib.rs index 0e3e574465..dca34da1cd 100644 --- a/pallets/pool-system/src/lib.rs +++ b/pallets/pool-system/src/lib.rs @@ -21,13 +21,14 @@ use cfg_types::{ use frame_support::{ dispatch::DispatchResult, ensure, + pallet_prelude::RuntimeDebug, traits::{ fungibles::{Inspect, Mutate}, ReservableCurrency, }, - transactional, BoundedVec, RuntimeDebug, + transactional, BoundedVec, }; -use frame_system::pallet_prelude::*; +use frame_system::pallet_prelude::{BlockNumberFor, *}; use orml_traits::{ asset_registry::{Inspect as OrmlInspect, Mutate as OrmlMutate}, Change, @@ -129,7 +130,7 @@ type EpochExecutionInfoOf = EpochExecutionInfo< ::BalanceRatio, ::EpochId, ::TrancheWeight, - ::BlockNumber, + BlockNumberFor, ::TrancheCurrency, ::MaxTranches, >; @@ -140,25 +141,19 @@ type PoolDepositOf = type ScheduledUpdateDetailsOf = ScheduledUpdateDetails< ::Rate, - ::MaxTokenNameLength, - ::MaxTokenSymbolLength, + ::StringLimit, ::MaxTranches, >; -pub type PoolChangesOf = PoolChanges< - ::Rate, - ::MaxTokenNameLength, - ::MaxTokenSymbolLength, - ::MaxTranches, ->; +pub type PoolChangesOf = + PoolChanges<::Rate, ::StringLimit, ::MaxTranches>; pub type PoolEssenceOf = PoolEssence< ::CurrencyId, ::Balance, ::TrancheCurrency, ::Rate, - ::MaxTokenNameLength, - ::MaxTokenSymbolLength, + ::StringLimit, >; #[derive(Encode, Decode, TypeInfo, PartialEq, Eq, MaxEncodedLen, RuntimeDebug)] @@ -286,6 +281,7 @@ pub mod pallet { AssetId = Self::CurrencyId, Balance = Self::Balance, CustomMetadata = CustomMetadata, + StringLimit = Self::StringLimit, >; type Currency: ReservableCurrency; @@ -343,7 +339,7 @@ pub mod pallet { /// Challenge time #[pallet::constant] - type ChallengeTime: Get<::BlockNumber>; + type ChallengeTime: Get>; /// Pool parameter defaults #[pallet::constant] @@ -366,13 +362,8 @@ pub mod pallet { #[pallet::constant] type MinUpdateDelay: Get; - /// Max length for a tranche token name #[pallet::constant] - type MaxTokenNameLength: Get + Copy + Member + scale_info::TypeInfo; - - /// Max length for a tranche token symbol - #[pallet::constant] - type MaxTokenSymbolLength: Get + Copy + Member + scale_info::TypeInfo; + type StringLimit: Get + Copy + Member + scale_info::TypeInfo; /// Max number of Tranches #[pallet::constant] @@ -953,7 +944,7 @@ pub mod pallet { } impl Pallet { - pub(crate) fn current_block() -> ::BlockNumber { + pub(crate) fn current_block() -> BlockNumberFor { >::block_number() } @@ -1096,9 +1087,7 @@ pub mod pallet { let pool = pool.as_mut().ok_or(Error::::NoSuchPool)?; // Prepare PoolEssence struct for sending out UpdateExecuted event - let old_pool = pool - .essence::( - )?; + let old_pool = pool.essence::()?; if let Change::NewValue(min_epoch_time) = changes.min_epoch_time { pool.parameters.min_epoch_time = min_epoch_time; @@ -1140,8 +1129,8 @@ pub mod pallet { T::AssetRegistry::update_asset( tranche.currency.into(), None, - Some(updated_metadata.clone().token_name.to_vec()), - Some(updated_metadata.clone().token_symbol.to_vec()), + Some(updated_metadata.clone().token_name), + Some(updated_metadata.clone().token_symbol), None, None, None, @@ -1153,9 +1142,7 @@ pub mod pallet { Self::deposit_event(Event::Updated { id: *pool_id, old: old_pool, - new: pool - .essence::( - )?, + new: pool.essence::()?, }); ScheduledUpdate::::remove(pool_id); @@ -1166,7 +1153,7 @@ pub mod pallet { pub fn is_valid_tranche_change( old_tranches: Option<&TranchesOf>, - new_tranches: &Vec>, + new_tranches: &[TrancheUpdate], ) -> DispatchResult { // There is a limit to the number of allowed tranches ensure!( diff --git a/pallets/pool-system/src/mock.rs b/pallets/pool-system/src/mock.rs index 93916bd1a2..c1d18709fc 100644 --- a/pallets/pool-system/src/mock.rs +++ b/pallets/pool-system/src/mock.rs @@ -27,12 +27,10 @@ use cfg_types::{ tokens::{CurrencyId, CustomMetadata, TrancheCurrency}, }; use frame_support::{ - assert_ok, parameter_types, - sp_std::marker::PhantomData, - traits::{Contains, GenesisBuild, Hooks, PalletInfoAccess, SortedMembers}, + assert_ok, derive_impl, parameter_types, + traits::{Contains, Hooks, PalletInfoAccess, SortedMembers}, Blake2_128, PalletId, StorageHasher, }; -use frame_system as system; use frame_system::{EnsureSigned, EnsureSignedBy}; use orml_traits::{asset_registry::AssetMetadata, parameter_type_with_key}; use pallet_pool_fees::PoolFeeInfoOf; @@ -41,9 +39,10 @@ use parity_scale_codec::Encode; use sp_arithmetic::FixedPointNumber; use sp_core::H256; use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup, Zero}, + traits::{ConstU128, Zero}, + BuildStorage, }; +use sp_std::marker::PhantomData; use crate::{ self as pallet_pool_system, @@ -51,10 +50,7 @@ use crate::{ Config, DispatchResult, }; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; - -pub type MockAccountId = u64; +pub type AccountId = u64; pub const AUSD_CURRENCY_ID: CurrencyId = CurrencyId::ForeignAsset(1); @@ -65,11 +61,11 @@ pub const START_DATE: u64 = 1640991600; // 2022.01.01 pub const SECONDS: u64 = 1000; pub const DEFAULT_POOL_ID: PoolId = 0; -pub const DEFAULT_POOL_OWNER: MockAccountId = 10; +pub const DEFAULT_POOL_OWNER: AccountId = 10; pub const DEFAULT_POOL_MAX_RESERVE: Balance = 10_000 * CURRENCY; -pub const DEFAULT_FEE_EDITOR: PoolFeeEditor = PoolFeeEditor::Account(100); -pub const DEFAULT_FEE_DESTINATION: MockAccountId = 101; +pub const DEFAULT_FEE_EDITOR: PoolFeeEditor = PoolFeeEditor::Account(100); +pub const DEFAULT_FEE_DESTINATION: AccountId = 101; pub const POOL_FEE_FIXED_RATE_MULTIPLIER: u64 = SECONDS_PER_YEAR / 12; pub const POOL_FEE_CHARGED_AMOUNT_PER_SECOND: Balance = 1000; @@ -129,26 +125,37 @@ pub fn assert_pending_fees( // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, - Tokens: pallet_restricted_tokens::{Pallet, Call, Event}, - OrmlTokens: orml_tokens::{Pallet, Storage, Event, Config}, - PoolSystem: pallet_pool_system::{Pallet, Call, Storage, Event}, - FakeNav: cfg_test_utils::mocks::nav::{Pallet, Storage}, - Permissions: pallet_permissions::{Pallet, Call, Storage, Event}, - Balances: pallet_balances::{Pallet, Storage, Event}, - Investments: pallet_investments::{Pallet, Call, Storage, Event}, + pub enum Runtime { + System: frame_system, + Timestamp: pallet_timestamp, + Tokens: pallet_restricted_tokens, + OrmlTokens: orml_tokens, + PoolSystem: pallet_pool_system, + FakeNav: cfg_test_utils::mocks::nav, + Permissions: pallet_permissions, + Balances: pallet_balances, + Investments: pallet_investments, MockChangeGuard: pallet_mock_change_guard, MockIsAdmin: cfg_mocks::pre_conditions::pallet, - PoolFees: pallet_pool_fees::{Pallet, Call, Storage, Event}, + PoolFees: pallet_pool_fees, } ); +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] +impl frame_system::Config for Runtime { + type AccountData = pallet_balances::AccountData; + type Block = frame_system::mocking::MockBlock; +} + +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] +impl pallet_balances::Config for Runtime { + type AccountStore = System; + type Balance = Balance; + type DustRemoval = (); + type ExistentialDeposit = ConstU128<1>; + type RuntimeHoldReason = (); +} + parameter_types! { pub const One: u64 = 1; #[derive(Debug, Eq, PartialEq, scale_info::TypeInfo, Clone)] @@ -173,38 +180,6 @@ impl SortedMembers for One { } } -parameter_types! { - pub const BlockHashCount: u64 = 250; - pub const SS58Prefix: u8 = 42; -} - -impl system::Config for Runtime { - type AccountData = pallet_balances::AccountData; - type AccountId = MockAccountId; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = BlockHashCount; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = frame_support::traits::ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = SS58Prefix; - type SystemWeightInfo = (); - type Version = (); -} - impl pallet_timestamp::Config for Runtime { type MinimumPeriod = (); type Moment = Millis; @@ -218,28 +193,6 @@ parameter_type_with_key! { }; } -// Parameterize balances pallet -parameter_types! { - pub const ExistentialDeposit: u64 = 1; -} - -// Implement balances pallet configuration for mock runtime -impl pallet_balances::Config for Runtime { - type AccountStore = System; - type Balance = Balance; - type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type FreezeIdentifier = (); - type HoldIdentifier = (); - type MaxFreezes = (); - type MaxHolds = frame_support::traits::ConstU32<1>; - type MaxLocks = MaxLocks; - type MaxReserves = (); - type ReserveIdentifier = (); - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); -} - parameter_types! { pub MaxLocks: u32 = 2; pub const MaxReserves: u32 = 50; @@ -263,7 +216,8 @@ cfg_test_utils::mocks::orml_asset_registry::impl_mock_registry! { RegistryMock, CurrencyId, Balance, - CustomMetadata + CustomMetadata, + StringLimit } parameter_types! { @@ -335,7 +289,7 @@ where pub struct NoopCollectHook; impl cfg_traits::StatusNotificationHook for NoopCollectHook { type Error = sp_runtime::DispatchError; - type Id = (MockAccountId, TrancheCurrency); + type Id = (AccountId, TrancheCurrency); type Status = cfg_types::investments::CollectedAmount; fn notify_status_change(_id: Self::Id, _status: Self::Status) -> DispatchResult { @@ -375,7 +329,7 @@ impl pallet_mock_change_guard::Config for Runtime { } impl pallet_mock_pre_conditions::Config for Runtime { - type Conditions = (MockAccountId, PoolId); + type Conditions = (AccountId, PoolId); type Result = bool; } @@ -426,10 +380,7 @@ parameter_types! { pub const MaxNAVAgeUpperBound: u64 = 24 * 60 * 60; #[derive(scale_info::TypeInfo, Eq, PartialEq, Debug, Clone, Copy )] - pub const MaxTokenNameLength: u32 = 128; - - #[derive(scale_info::TypeInfo, Eq, PartialEq, Debug, Clone, Copy )] - pub const MaxTokenSymbolLength: u32 = 32; + pub const StringLimit: u32 = 128; pub const PoolDeposit: Balance = 1 * CURRENCY; } @@ -447,8 +398,6 @@ impl Config for Runtime { type EpochId = PoolEpochId; type Investments = Investments; type MaxNAVAgeUpperBound = MaxNAVAgeUpperBound; - type MaxTokenNameLength = MaxTokenNameLength; - type MaxTokenSymbolLength = MaxTokenSymbolLength; type MaxTranches = MaxTranches; type MinEpochTimeLowerBound = MinEpochTimeLowerBound; type MinEpochTimeUpperBound = MinEpochTimeUpperBound; @@ -466,6 +415,7 @@ impl Config for Runtime { type Rate = Rate; type RuntimeChange = PoolChangeProposal; type RuntimeEvent = RuntimeEvent; + type StringLimit = StringLimit; type Time = Timestamp; type Tokens = Tokens; type TrancheCurrency = TrancheCurrency; @@ -499,8 +449,7 @@ impl PoolUpdateGuard for UpdateGuard { u64, MaxTranches, >; - type ScheduledUpdateDetails = - ScheduledUpdateDetails; + type ScheduledUpdateDetails = ScheduledUpdateDetails; fn released( pool: &Self::PoolDetails, @@ -547,8 +496,8 @@ parameter_types! { // Build genesis storage according to the mock runtime. pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); orml_tokens::GenesisConfig:: { @@ -574,8 +523,8 @@ pub fn new_test_ext() -> sp_io::TestExternalities { AUSD_CURRENCY_ID, AssetMetadata { decimals: 12, - name: "MOCK AUSD".as_bytes().to_vec(), - symbol: "MckAUSD".as_bytes().to_vec(), + name: Vec::from(b"MOCK AUSD").try_into().unwrap(), + symbol: Vec::from(b"MckAUSD").try_into().unwrap(), existential_deposit: 0, location: None, additional: CustomMetadata { @@ -659,10 +608,7 @@ pub fn test_nav_update(pool_id: u64, amount: Balance, now: Seconds) { } /// Assumes externalities are available -pub fn invest_close_and_collect( - pool_id: u64, - investments: Vec<(MockAccountId, TrancheId, Balance)>, -) { +pub fn invest_close_and_collect(pool_id: u64, investments: Vec<(AccountId, TrancheId, Balance)>) { for (account, tranche_id, investment) in investments.clone() { assert_ok!(Investments::update_invest_order( RuntimeOrigin::signed(account), diff --git a/pallets/pool-system/src/pool_types.rs b/pallets/pool-system/src/pool_types.rs index cefe5cbdb6..f5b800461d 100644 --- a/pallets/pool-system/src/pool_types.rs +++ b/pallets/pool-system/src/pool_types.rs @@ -13,11 +13,12 @@ use cfg_traits::Seconds; use cfg_types::{epoch::EpochState, pools::TrancheMetadata}; use frame_support::{ - dispatch::{DispatchError, DispatchResult}, + dispatch::DispatchResult, + pallet_prelude::{DispatchError, RuntimeDebug}, traits::Get, - BoundedVec, RuntimeDebug, + BoundedVec, }; -use orml_traits::{asset_registry::AssetMetadata, Change}; +use orml_traits::Change; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_arithmetic::traits::{BaseArithmetic, Unsigned}; @@ -87,13 +88,12 @@ where } #[derive(Encode, Decode, Clone, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] -pub struct ScheduledUpdateDetails +pub struct ScheduledUpdateDetails where - MaxTokenNameLength: Get, - MaxTokenSymbolLength: Get, + StringLimit: Get, MaxTranches: Get, { - pub changes: PoolChanges, + pub changes: PoolChanges, pub submitted_at: Seconds, } @@ -148,41 +148,35 @@ pub struct PoolParameters { } #[derive(Encode, Decode, Clone, Eq, PartialEq, RuntimeDebug, TypeInfo)] -pub struct PoolChanges +pub struct PoolChanges where - MaxTokenNameLength: Get, - MaxTokenSymbolLength: Get, + StringLimit: Get, MaxTranches: Get, { pub tranches: Change, MaxTranches>>, - pub tranche_metadata: - Change, MaxTranches>>, + pub tranche_metadata: Change, MaxTranches>>, pub min_epoch_time: Change, pub max_nav_age: Change, } // NOTE: Can be removed once orml_traits::Change impls MaxEncodedLen // https://github.com/open-web3-stack/open-runtime-module-library/pull/867 -impl MaxEncodedLen - for PoolChanges +impl MaxEncodedLen for PoolChanges where - MaxTokenNameLength: Get, - MaxTokenSymbolLength: Get, + StringLimit: Get, MaxTranches: Get, - PoolChanges: Encode, + PoolChanges: Encode, BoundedVec, MaxTranches>: MaxEncodedLen, - BoundedVec, MaxTranches>: - MaxEncodedLen, + BoundedVec, MaxTranches>: MaxEncodedLen, Seconds: MaxEncodedLen, { fn max_encoded_len() -> usize { // The tranches (default bound) BoundedVec::, MaxTranches>::max_encoded_len() // The tranche metadata (default bound) - .saturating_add(BoundedVec::< - TrancheMetadata, - MaxTranches, - >::max_encoded_len()) + .saturating_add( + BoundedVec::, MaxTranches>::max_encoded_len(), + ) // The min epoc time and max nav age (default bounds) .saturating_add(Seconds::max_encoded_len().saturating_mul(2)) // From the `Change` enum which wraps all four fields of Self @@ -199,17 +193,10 @@ pub struct PoolDepositInfo { /// The core metadata about the pool which we can attach to an event #[derive(Encode, Decode, Clone, Eq, PartialEq, RuntimeDebug, TypeInfo)] -pub struct PoolEssence< - CurrencyId, - Balance, - TrancheCurrency, - Rate, - MaxTokenNameLength, - MaxTokenSymbolLength, -> where +pub struct PoolEssence +where CurrencyId: Copy, - MaxTokenNameLength: Get, - MaxTokenSymbolLength: Get, + StringLimit: Get, { /// Currency that the pool is denominated in (immutable). pub currency: CurrencyId, @@ -220,8 +207,7 @@ pub struct PoolEssence< /// Minimum duration for an epoch. pub min_epoch_time: Seconds, /// Tranches on a pool - pub tranches: - Vec>, + pub tranches: Vec>, } impl< @@ -276,49 +262,27 @@ impl< .map_err(Into::into) } - pub fn essence( + pub fn essence( &self, - ) -> Result< - PoolEssence< - CurrencyId, - Balance, - TrancheCurrency, - Rate, - MaxTokenNameLength, - MaxTokenSymbolLength, - >, - DispatchError, - > + ) -> Result, DispatchError> where - AssetRegistry: orml_traits::asset_registry::Inspect, - ::AssetId: From, - MaxTokenNameLength: Get, - MaxTokenSymbolLength: Get, + AssetRegistry: + orml_traits::asset_registry::Inspect, + StringLimit: Get, { - let mut tranches: Vec< - TrancheEssence, - > = Vec::new(); + let mut tranches: Vec> = Vec::new(); for tranche in self.tranches.residual_top_slice().iter() { - let metadata = AssetRegistry::metadata(&self.currency.into()) - .ok_or(AssetMetadata { - decimals: 0, - name: Vec::new(), - symbol: Vec::new(), - existential_deposit: (), - location: None, - additional: (), - }) - .unwrap(); + let metadata = AssetRegistry::metadata(&self.currency).ok_or(DispatchError::Other( + "Always exists a currency for an existing pool", + ))?; tranches.push(TrancheEssence { currency: tranche.currency, ty: tranche.tranche_type, metadata: TrancheMetadata { - token_name: BoundedVec::try_from(metadata.name) - .unwrap_or(BoundedVec::default()), - token_symbol: BoundedVec::try_from(metadata.symbol) - .unwrap_or(BoundedVec::default()), + token_name: metadata.name, + token_symbol: metadata.symbol, }, }); } @@ -334,7 +298,7 @@ impl< } pub mod changes { - use frame_support::{storage::bounded_btree_set::BoundedBTreeSet, RuntimeDebug}; + use frame_support::storage::bounded_btree_set::BoundedBTreeSet; use sp_std::collections::btree_set::BTreeSet; use strum::EnumCount; diff --git a/pallets/pool-system/src/tests/mod.rs b/pallets/pool-system/src/tests/mod.rs index 582e6b0fb5..2b4e5daeca 100644 --- a/pallets/pool-system/src/tests/mod.rs +++ b/pallets/pool-system/src/tests/mod.rs @@ -24,7 +24,6 @@ use cfg_types::{ use frame_support::{assert_err, assert_noop, assert_ok}; use orml_traits::asset_registry::{AssetMetadata, Inspect}; use rand::Rng; -use sp_core::storage::StateVersion; use sp_runtime::{ traits::{One, Zero}, FixedPointNumber, Perquintill, TokenError, @@ -383,12 +382,10 @@ fn pool_constraints_tranche_violates_risk_buffer() { }) .collect::>(); - let prev_root = frame_support::storage_root(StateVersion::V0); - assert_eq!( + frame_support::assert_storage_noop!(assert_eq!( PoolSystem::inspect_solution(pool, &epoch, &full_solution).unwrap(), PoolState::Unhealthy(vec![UnhealthyState::MinRiskBufferViolated]) - ); - assert_eq!(prev_root, frame_support::storage_root(StateVersion::V0)) + )); }); } @@ -2393,8 +2390,8 @@ fn create_tranche_token_metadata() { tranche_type: TrancheType::Residual, seniority: None, metadata: TrancheMetadata { - token_name, - token_symbol, + token_name: token_name.clone(), + token_symbol: token_symbol.clone(), } }, TrancheInput { @@ -2423,8 +2420,8 @@ fn create_tranche_token_metadata() { // The decimals of the tranche token need to match the decimals for the pool // currency. decimals: 12, - name: "SuperToken".into(), - symbol: "ST".into(), + name: token_name, + symbol: token_symbol, existential_deposit: 0, location: None, additional: CustomMetadata { @@ -2683,7 +2680,7 @@ mod pool_fees { use super::*; use crate::{mock::default_pool_fees, Event}; - const POOL_OWNER: MockAccountId = 2; + const POOL_OWNER: AccountId = 2; const INVESTMENT_AMOUNT: Balance = DEFAULT_POOL_MAX_RESERVE / 10; const NAV_AMOUNT: Balance = INVESTMENT_AMOUNT / 2 + 2_345_000; const FEE_AMOUNT_FIXED: Balance = NAV_AMOUNT / 10; diff --git a/pallets/pool-system/src/tranches.rs b/pallets/pool-system/src/tranches.rs index 05609d4068..ff285ecc02 100644 --- a/pallets/pool-system/src/tranches.rs +++ b/pallets/pool-system/src/tranches.rs @@ -10,14 +10,7 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -#[cfg(test)] -use cfg_primitives::{Balance, PoolId, TrancheId, TrancheWeight}; use cfg_traits::{investments::TrancheCurrency as TrancheCurrencyT, Seconds}; -#[cfg(test)] -use cfg_types::{ - fixed_point::{Quantity, Rate}, - tokens::TrancheCurrency, -}; use cfg_types::{ pools::TrancheMetadata, tokens::{CrossChainTransferability, CustomMetadata}, @@ -25,9 +18,10 @@ use cfg_types::{ use frame_support::{ dispatch::DispatchResult, ensure, + pallet_prelude::RuntimeDebug, sp_runtime::ArithmeticError, traits::{fungibles::Inspect, Get, Len}, - Blake2_128, BoundedVec, Parameter, RuntimeDebug, StorageHasher, + Blake2_128, BoundedVec, Parameter, StorageHasher, }; use orml_traits::asset_registry::AssetMetadata; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; @@ -46,14 +40,10 @@ use sp_std::{marker::PhantomData, ops::Deref, vec::Vec}; pub type Seniority = u32; #[derive(Debug, Encode, PartialEq, Eq, Decode, Clone, TypeInfo, MaxEncodedLen)] -pub struct TrancheInput -where - MaxTokenNameLength: Get, - MaxTokenSymbolLength: Get, -{ +pub struct TrancheInput> { pub tranche_type: TrancheType, pub seniority: Option, - pub metadata: TrancheMetadata, + pub metadata: TrancheMetadata, } #[derive(Encode, Decode, Clone, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] @@ -71,17 +61,13 @@ pub enum TrancheLoc { /// The core metadata about a tranche which we can attach to an event #[derive(Encode, Decode, Clone, Eq, PartialEq, RuntimeDebug, TypeInfo)] -pub struct TrancheEssence -where - MaxTokenNameLength: Get, - MaxTokenSymbolLength: Get, -{ +pub struct TrancheEssence> { /// Currency that the tranche is denominated in pub currency: TrancheCurrency, /// Type of the tranche (Residual or NonResidual) pub ty: TrancheType, /// Metadata of a Tranche - pub metadata: TrancheMetadata, + pub metadata: TrancheMetadata, } #[derive(Copy, Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] @@ -138,23 +124,6 @@ pub struct Tranche { pub _phantom: PhantomData, } -#[cfg(test)] -impl Default for Tranche { - fn default() -> Self { - Self { - tranche_type: TrancheType::Residual, - seniority: 1, - currency: TrancheCurrency::generate(0, [0u8; 16]), - debt: Zero::zero(), - reserve: Zero::zero(), - loss: Zero::zero(), - ratio: Perquintill::one(), - last_updated_interest: 0, - _phantom: PhantomData::default(), - } - } -} - impl Tranche where Balance: Copy @@ -222,14 +191,14 @@ where Ok(self.debt) } - pub fn create_asset_metadata( + pub fn create_asset_metadata>( &self, decimals: u32, - token_name: Vec, - token_symbol: Vec, - ) -> AssetMetadata + token_name: BoundedVec, + token_symbol: BoundedVec, + ) -> AssetMetadata where - Balance: Zero, + Balance: Clone + sp_std::fmt::Debug + Eq + PartialEq, Currency: Encode, CustomMetadata: Parameter + Member + TypeInfo, { @@ -298,41 +267,6 @@ where pub salt: TrancheSalt, } -#[cfg(test)] -impl - Tranches -{ - pub fn new( - pool: PoolId, - tranches: Vec>, - ) -> Result { - let mut ids = Vec::with_capacity(tranches.len()); - let mut salt = (0, pool); - - for (index, _tranche) in tranches.iter().enumerate() { - ids.push(Tranches::< - Balance, - Rate, - TrancheWeight, - TrancheCurrency, - TrancheId, - PoolId, - crate::mock::MaxTranches, - >::id_from_salt(salt)); - salt = (index.ensure_add(1)?.ensure_into()?, pool); - } - - Ok(Self { - tranches: BoundedVec::< - Tranche, - crate::mock::MaxTranches, - >::truncate_from(tranches), - ids: BoundedVec::::truncate_from(ids), - salt, - }) - } -} - // The solution struct for a specific tranche #[derive( Encode, Decode, Copy, Clone, Eq, PartialEq, Default, RuntimeDebug, TypeInfo, MaxEncodedLen, @@ -360,14 +294,13 @@ where PoolId: Copy + Encode, MaxTranches: Get, { - pub fn from_input( + pub fn from_input( pool: PoolId, - tranche_inputs: Vec>, + tranche_inputs: Vec>, now: Seconds, ) -> Result where - MaxTokenNameLength: Get, - MaxTokenSymbolLength: Get, + StringLimit: Get, { let tranches = BoundedVec::with_bounded_capacity(tranche_inputs.len()); let ids = BoundedVec::with_bounded_capacity(tranche_inputs.len()); @@ -379,11 +312,7 @@ where }; for (index, tranche_input) in tranche_inputs.into_iter().enumerate() { - tranches.add::( - index.ensure_into()?, - tranche_input, - now, - )?; + tranches.add::(index.ensure_into()?, tranche_input, now)?; } Ok(tranches) @@ -518,15 +447,14 @@ where Ok(tranche) } - pub fn replace( + pub fn replace( &mut self, at: TrancheIndex, - tranche: TrancheInput, + tranche: TrancheInput, now: Seconds, ) -> DispatchResult where - MaxTokenNameLength: Get, - MaxTokenSymbolLength: Get, + StringLimit: Get, { let at_idx = at; let i_at: usize = at.ensure_into()?; @@ -600,15 +528,14 @@ where Ok(()) } - pub fn add( + pub fn add( &mut self, at: TrancheIndex, - tranche: TrancheInput, + tranche: TrancheInput, now: Seconds, ) -> DispatchResult where - MaxTokenNameLength: Get, - MaxTokenSymbolLength: Get, + StringLimit: Get, { let at_idx = at; let i_at: usize = at.ensure_into()?; @@ -1061,22 +988,6 @@ pub struct EpochExecutionTranche pub _phantom: PhantomData, } -#[cfg(test)] -impl Default for EpochExecutionTranche { - fn default() -> Self { - Self { - currency: TrancheCurrency::generate(0, [0u8; 16]), - supply: 0, - price: Quantity::one(), - invest: 0, - redeem: 0, - min_risk_buffer: Default::default(), - seniority: 0, - _phantom: Default::default(), - } - } -} - #[derive(Encode, Decode, Clone, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] pub struct EpochExecutionTranches where @@ -1555,6 +1466,7 @@ pub mod test { type TTranche = Tranche; type TTranches = Tranches; + type StringLimit = sp_runtime::traits::ConstU32<128>; const DEFAULT_POOL_ID: PoolId = 0; const SECS_PER_YEAR: u64 = 365 * 24 * 60 * 60; @@ -1569,6 +1481,72 @@ pub mod test { #[derive(PartialEq)] struct TrancheWeights(Vec<(TrancheWeight, TrancheWeight)>); + #[cfg(test)] + impl Tranches { + pub fn new( + pool: PoolId, + tranches: Vec>, + ) -> Result { + let mut ids = Vec::with_capacity(tranches.len()); + let mut salt = (0, pool); + + for (index, _tranche) in tranches.iter().enumerate() { + ids.push(Tranches::< + Balance, + Rate, + TrancheWeight, + TrancheCurrency, + TrancheId, + PoolId, + MaxTranches, + >::id_from_salt(salt)); + salt = (index.ensure_add(1)?.ensure_into()?, pool); + } + + Ok(Self { + tranches: BoundedVec::< + Tranche, + MaxTranches, + >::truncate_from(tranches), + ids: BoundedVec::::truncate_from(ids), + salt, + }) + } + } + + #[cfg(test)] + impl Default for Tranche { + fn default() -> Self { + Self { + tranche_type: TrancheType::Residual, + seniority: 1, + currency: TrancheCurrency::generate(0, [0u8; 16]), + debt: Zero::zero(), + reserve: Zero::zero(), + loss: Zero::zero(), + ratio: Perquintill::one(), + last_updated_interest: 0, + _phantom: PhantomData::default(), + } + } + } + + #[cfg(test)] + impl Default for EpochExecutionTranche { + fn default() -> Self { + Self { + currency: TrancheCurrency::generate(0, [0u8; 16]), + supply: 0, + price: Quantity::one(), + invest: 0, + redeem: 0, + min_risk_buffer: Default::default(), + seniority: 0, + _phantom: Default::default(), + } + } + } + fn residual(id: u8) -> TTranche { residual_base(id, 0, 0, 0) } @@ -1839,13 +1817,13 @@ pub mod test { fn create_asset_metadata_works() { let tranche = non_residual(3, Some(10), None); let decimals: u32 = 10; - let name: Vec = "Glimmer".into(); - let symbol: Vec = "GLMR".into(); + let name: BoundedVec = Vec::from(b"Glimmer").try_into().unwrap(); + let symbol: BoundedVec = Vec::from(b"GLMR").try_into().unwrap(); let asset_metadata = tranche.create_asset_metadata(decimals, name, symbol); assert_eq!(asset_metadata.existential_deposit, 0); - assert_eq!(asset_metadata.name[..], [71, 108, 105, 109, 109, 101, 114]); - assert_eq!(asset_metadata.symbol[..], [71, 76, 77, 82]); + assert_eq!(&asset_metadata.name[..], b"Glimmer"); + assert_eq!(&asset_metadata.symbol[..], b"GLMR"); assert_eq!(asset_metadata.decimals, decimals); assert_eq!(asset_metadata.location, None); } @@ -2081,20 +2059,6 @@ pub mod test { assert_ne!(next, next_again) } - struct TokenNameLen; - impl Get for TokenNameLen { - fn get() -> u32 { - 16u32 - } - } - - struct TokenSymLen; - impl Get for TokenSymLen { - fn get() -> u32 { - 8u32 - } - } - // Replace should work if interest is lower than tranche w/ lower index // ("next"). #[test] @@ -2115,8 +2079,8 @@ pub mod test { seniority, tranche_type, metadata: TrancheMetadata { - token_name: BoundedVec::::default(), - token_symbol: BoundedVec::::default(), + token_name: BoundedVec::::default(), + token_symbol: BoundedVec::::default(), }, }; @@ -2158,8 +2122,8 @@ pub mod test { min_risk_buffer: min_risk_buffer, }, metadata: TrancheMetadata { - token_name: BoundedVec::::default(), - token_symbol: BoundedVec::::default(), + token_name: BoundedVec::::default(), + token_symbol: BoundedVec::::default(), }, }; @@ -2195,8 +2159,8 @@ pub mod test { seniority, tranche_type, metadata: TrancheMetadata { - token_name: BoundedVec::::default(), - token_symbol: BoundedVec::::default(), + token_name: BoundedVec::::default(), + token_symbol: BoundedVec::::default(), }, }; @@ -2234,8 +2198,8 @@ pub mod test { min_risk_buffer: min_risk_buffer, }, metadata: TrancheMetadata { - token_name: BoundedVec::::default(), - token_symbol: BoundedVec::::default(), + token_name: BoundedVec::::default(), + token_symbol: BoundedVec::::default(), }, }; @@ -2567,7 +2531,7 @@ pub mod test { /// Implements only `total_issuance` required for /// `calculate_prices`. - struct TTokens(u64); + struct TTokens; impl Inspect for TTokens { type AssetId = TrancheCurrency; type Balance = u128; @@ -2692,7 +2656,7 @@ pub mod test { #[test] fn no_issuance_works() { - struct TTokensEmpty(u64); + struct TTokensEmpty; impl Inspect for TTokensEmpty { type AssetId = TrancheCurrency; type Balance = u128; @@ -3223,8 +3187,8 @@ pub mod test { min_risk_buffer: Perquintill::from_percent(5), }, metadata: TrancheMetadata { - token_name: BoundedVec::::default(), - token_symbol: BoundedVec::::default(), + token_name: BoundedVec::::default(), + token_symbol: BoundedVec::::default(), }, }; assert_ok!(tranches.add(2, input, 0u64)); diff --git a/pallets/restricted-tokens/src/benchmarking.rs b/pallets/restricted-tokens/src/benchmarking.rs index f4b4589b62..05d9b9a17a 100644 --- a/pallets/restricted-tokens/src/benchmarking.rs +++ b/pallets/restricted-tokens/src/benchmarking.rs @@ -15,7 +15,7 @@ use cfg_types::{ permissions::{PermissionScope, PoolRole, Role}, tokens::CurrencyId, }; -use frame_benchmarking::{account, benchmarks, Zero}; +use frame_benchmarking::{account, benchmarks}; use frame_support::traits::{ fungibles, tokens::{Fortitude, Preservation}, @@ -23,7 +23,7 @@ use frame_support::traits::{ }; use frame_system::RawOrigin; use orml_traits::GetByKey; -use sp_runtime::traits::StaticLookup; +use sp_runtime::traits::{StaticLookup, Zero}; use sp_std::default::Default; use super::*; @@ -36,7 +36,7 @@ fn make_free_balance( balance: ::Balance, ) where T: Config - + pallet_balances::Config::Balance, HoldIdentifier = ()> + + pallet_balances::Config::Balance> + orml_tokens::Config< Balance = ::Balance, CurrencyId = ::CurrencyId, @@ -69,7 +69,7 @@ fn reserve_balance( balance: ::Balance, ) where T: Config - + pallet_balances::Config::Balance, HoldIdentifier = ()> + + pallet_balances::Config::Balance, RuntimeHoldReason = ()> + orml_tokens::Config< Balance = ::Balance, CurrencyId = ::CurrencyId, @@ -149,7 +149,7 @@ fn set_up_account( ) -> T::AccountId where T: Config - + pallet_balances::Config::Balance, HoldIdentifier = ()> + + pallet_balances::Config::Balance, RuntimeHoldReason = ()> + orml_tokens::Config< Balance = ::Balance, CurrencyId = ::CurrencyId, @@ -190,7 +190,7 @@ benchmarks! { where_clause { where T: Config - + pallet_balances::Config::Balance, HoldIdentifier = ()> + + pallet_balances::Config::Balance, RuntimeHoldReason = ()> + orml_tokens::Config::Balance, CurrencyId = ::CurrencyId> + pallet_permissions::Config, Role = Role>, ::Balance: From + Zero, diff --git a/pallets/restricted-tokens/src/lib.rs b/pallets/restricted-tokens/src/lib.rs index 3b2bf7e9e5..6c64becd23 100644 --- a/pallets/restricted-tokens/src/lib.rs +++ b/pallets/restricted-tokens/src/lib.rs @@ -65,7 +65,7 @@ impl TransferDetails; -type Block = frame_system::mocking::MockBlock; pub const POOL_PALLET_ID: AccountId = 999u64; type Time = u64; pub const MIN_HOLD_PERIOD: Time = 10; @@ -381,84 +370,41 @@ pub enum CurrencyId { // Build mock runtime frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Runtime { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - OrmlTokens: orml_tokens::{Pallet, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Config, Storage, Event}, - Tokens: pallet_restricted_tokens::{Pallet, Call, Event}, + System: frame_system, + OrmlTokens: orml_tokens, + Balances: pallet_balances, + Tokens: pallet_restricted_tokens, } ); -// Parameterize frame system pallet -parameter_types! { - pub const BlockHashCount: u64 = 250; - pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights::simple_max(Weight::from_parts(1024, 0).set_proof_size(u64::MAX).into()); -} - -// Implement frame system configuration for the mock runtime +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; - type AccountId = AccountId; - type BaseCallFilter = Everything; - type BlockHashCount = BlockHashCount; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = BlockWeights; - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = frame_support::traits::ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = (); - type SystemWeightInfo = (); - type Version = (); -} - -parameter_type_with_key! { - pub ExistentialDeposits: |currency_id: CurrencyId| -> Balance { - // every currency has a zero existential deposit - match currency_id { - _ => 1, - } - }; + type Block = frame_system::mocking::MockBlock; } parameter_types! { - pub const MaxLocks: u32 = 100; - pub const MaxReserves: u32 = 50; pub const ExistentialDeposit: u64 = 1; } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for Runtime { type AccountStore = System; - type Balance = Balance; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; - type FreezeIdentifier = (); - type HoldIdentifier = (); - type MaxFreezes = ConstU32<50>; - type MaxHolds = frame_support::traits::ConstU32<1>; - type MaxLocks = MaxLocks; - type MaxReserves = MaxReserves; - type ReserveIdentifier = [u8; 8]; - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); + type MaxHolds = ConstU32<1>; + type RuntimeHoldReason = (); } -parameter_types! {} +parameter_type_with_key! { + pub ExistentialDeposits: |currency_id: CurrencyId| -> Balance { + match currency_id { + _ => 1, + } + }; +} impl orml_tokens::Config for Runtime { type Amount = i64; @@ -467,8 +413,8 @@ impl orml_tokens::Config for Runtime { type CurrencyId = CurrencyId; type DustRemovalWhitelist = frame_support::traits::Nothing; type ExistentialDeposits = ExistentialDeposits; - type MaxLocks = MaxLocks; - type MaxReserves = MaxReserves; + type MaxLocks = ConstU32<100>; + type MaxReserves = ConstU32<50>; type ReserveIdentifier = [u8; 8]; type RuntimeEvent = RuntimeEvent; type WeightInfo = (); @@ -525,9 +471,9 @@ impl Default for TestExternalitiesBuilder { impl TestExternalitiesBuilder { // Build a genesis storage key/value store - pub fn build(self, optional: Option) -> TestExternalities { - let mut storage = frame_system::GenesisConfig::default() - .build_storage::() + pub fn build(self, optional: Option) -> sp_io::TestExternalities { + let mut storage = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); let ausd = (0..10) .into_iter() @@ -563,7 +509,7 @@ impl TestExternalitiesBuilder { .assimilate_storage(&mut storage) .unwrap(); - let mut ext = TestExternalities::from(storage); + let mut ext = sp_io::TestExternalities::from(storage); if let Some(execute) = optional { ext.execute_with(execute); diff --git a/pallets/restricted-tokens/src/tests.rs b/pallets/restricted-tokens/src/tests.rs index af0a10dc9f..fcad7514b4 100644 --- a/pallets/restricted-tokens/src/tests.rs +++ b/pallets/restricted-tokens/src/tests.rs @@ -1015,7 +1015,7 @@ fn currency_deposit_creating() { .build(Some(|| {})) .execute_with(|| { let issuance = as Currency>::total_issuance(); - {let _imb = as Currency>::deposit_creating(&80, 100);} + {let _imb = as Currency>::deposit_creating(&80, 100);} assert_eq!( as Currency>::free_balance(&80), 100); assert_eq!( as Currency>::total_issuance(), issuance + 100); }) diff --git a/pallets/restricted-xtokens/Cargo.toml b/pallets/restricted-xtokens/Cargo.toml index 0620386c4b..164b902f5a 100644 --- a/pallets/restricted-xtokens/Cargo.toml +++ b/pallets/restricted-xtokens/Cargo.toml @@ -23,7 +23,7 @@ orml-traits = { workspace = true } orml-xtokens = { workspace = true } # polkadot -xcm = { workspace = true } +staging-xcm = { workspace = true } # local cfg-traits = { workspace = true } @@ -39,7 +39,7 @@ std = [ "scale-info/std", "orml-xtokens/std", "orml-traits/std", - "xcm/std", + "staging-xcm/std", ] runtime-benchmarks = [ "cfg-traits/runtime-benchmarks", diff --git a/pallets/restricted-xtokens/src/lib.rs b/pallets/restricted-xtokens/src/lib.rs index 637109432d..525926e20f 100644 --- a/pallets/restricted-xtokens/src/lib.rs +++ b/pallets/restricted-xtokens/src/lib.rs @@ -46,7 +46,9 @@ use frame_system::{ensure_signed, pallet_prelude::*}; use orml_traits::XtokensWeightInfo; pub use pallet::*; use sp_std::{boxed::Box, vec::Vec}; -use xcm::{v3::prelude::*, VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation}; +use staging_xcm::{ + v3::prelude::*, VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, +}; pub enum TransferEffects { Transfer { diff --git a/pallets/rewards/Cargo.toml b/pallets/rewards/Cargo.toml index 76e4f214aa..d4cabd2de6 100644 --- a/pallets/rewards/Cargo.toml +++ b/pallets/rewards/Cargo.toml @@ -28,7 +28,7 @@ sp-std = { workspace = true } lazy_static = { workspace = true } orml-tokens = { workspace = true, default-features = true } orml-traits = { workspace = true, default-features = true } -serde = { workspace = true } +serde = { workspace = true, default-features = true } sp-core = { workspace = true, default-features = true } sp-io = { workspace = true, default-features = true } diff --git a/pallets/rewards/src/lib.rs b/pallets/rewards/src/lib.rs index 74d5572e13..d28fdb2f79 100644 --- a/pallets/rewards/src/lib.rs +++ b/pallets/rewards/src/lib.rs @@ -83,7 +83,7 @@ use frame_support::{ fungibles::{Inspect, InspectHold, Mutate, MutateHold}, tokens::AssetId, }, - PalletId, + DefaultNoBound, PalletId, }; use mechanism::{MoveCurrencyError, RewardMechanism}; pub use pallet::*; @@ -147,17 +147,11 @@ pub mod pallet { pub struct Pallet(_); #[pallet::genesis_config] + #[derive(DefaultNoBound)] pub struct GenesisConfig, I: 'static = ()>(core::marker::PhantomData<(T, I)>); - #[cfg(feature = "std")] - impl, I: 'static> Default for GenesisConfig { - fn default() -> Self { - Self(core::marker::PhantomData) - } - } - #[pallet::genesis_build] - impl, I: 'static> GenesisBuild for GenesisConfig + impl, I: 'static> BuildGenesisConfig for GenesisConfig where BalanceOf: MaybeSerializeDeserialize, { diff --git a/pallets/rewards/src/migrations/new_instance.rs b/pallets/rewards/src/migrations/new_instance.rs index ee5325e6ab..21edb94795 100644 --- a/pallets/rewards/src/migrations/new_instance.rs +++ b/pallets/rewards/src/migrations/new_instance.rs @@ -18,8 +18,6 @@ use sp_runtime::traits::AccountIdConversion; #[cfg(feature = "try-runtime")] use sp_runtime::DispatchError; use sp_std::marker::PhantomData; -#[cfg(feature = "try-runtime")] -use {frame_support::inherent::Vec, sp_std::vec}; use crate::{BalanceOf, Config}; @@ -47,11 +45,11 @@ where ED: Get>, { #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, DispatchError> { + fn pre_upgrade() -> Result, DispatchError> { assert!(!pallet_is_funded::()); log::info!("💶 Rewards: Pre funding ED checks successful"); - Ok(vec![]) + Ok(sp_std::vec![]) } fn on_runtime_upgrade() -> frame_support::weights::Weight { @@ -75,7 +73,7 @@ where } #[cfg(feature = "try-runtime")] - fn post_upgrade(_pre_state: Vec) -> Result<(), DispatchError> { + fn post_upgrade(_pre_state: sp_std::vec::Vec) -> Result<(), DispatchError> { assert!(pallet_is_funded::()); log::info!("💶 Rewards: Post funding ED checks successful"); diff --git a/pallets/rewards/src/mock.rs b/pallets/rewards/src/mock.rs index c2eb53c487..e2cc975727 100644 --- a/pallets/rewards/src/mock.rs +++ b/pallets/rewards/src/mock.rs @@ -1,15 +1,6 @@ -use frame_support::{ - pallet_prelude::*, - traits::{ConstU16, ConstU32, ConstU64}, - PalletId, -}; +use frame_support::{derive_impl, pallet_prelude::*, PalletId}; use serde::{Deserialize, Serialize}; -use sp_core::H256; -use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, - FixedI64, -}; +use sp_runtime::{BuildStorage, FixedI64}; use super::mechanism::{self}; use crate::{ @@ -17,9 +8,6 @@ use crate::{ issuance::{MintReward, TransferReward}, }; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; - pub const USER_A: u64 = 1; pub const USER_B: u64 = 2; pub const REWARD_SOURCE: u64 = 1337; @@ -27,11 +15,7 @@ pub const REWARD_SOURCE: u64 = 1337; pub const USER_INITIAL_BALANCE: u64 = 100000; frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Runtime { System: frame_system, Tokens: orml_tokens, DeferredRewardMechanism: mechanism::deferred, @@ -45,31 +29,9 @@ frame_support::construct_runtime!( } ); +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { - type AccountData = (); - type AccountId = u64; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = ConstU64<250>; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = ConstU16<42>; - type SystemWeightInfo = (); - type Version = (); + type Block = frame_system::mocking::MockBlock; } #[derive( @@ -166,8 +128,8 @@ pallet_rewards_config!(Instance5, mechanism::deferred::Pallet, Transfer pallet_rewards_config!(Instance6, mechanism::gap::Pallet, TransferReward); pub fn new_test_ext() -> sp_io::TestExternalities { - let mut storage = frame_system::GenesisConfig::default() - .build_storage::() + let mut storage = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); let users = [USER_A, USER_B]; diff --git a/pallets/swaps/src/mock.rs b/pallets/swaps/src/mock.rs index 75a99201a3..56f013e2d7 100644 --- a/pallets/swaps/src/mock.rs +++ b/pallets/swaps/src/mock.rs @@ -1,16 +1,9 @@ use cfg_traits::swaps::SwapInfo; -use frame_support::traits::{ConstU16, ConstU32, ConstU64}; -use sp_runtime::{ - testing::{Header, H256}, - traits::{BlakeTwo256, IdentityLookup}, - FixedU128, -}; +use frame_support::derive_impl; +use sp_runtime::FixedU128; use crate::pallet as pallet_swaps; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; - pub type AccountId = u64; pub type Balance = u128; pub type OrderId = u64; @@ -19,11 +12,7 @@ pub type CurrencyId = u8; pub type Ratio = FixedU128; frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Runtime { System: frame_system, MockTokenSwaps: cfg_mocks::token_swaps::pallet, FulfilledSwapHook: cfg_mocks::status_notification::pallet, @@ -31,31 +20,9 @@ frame_support::construct_runtime!( } ); +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { - type AccountData = (); - type AccountId = AccountId; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = ConstU64<250>; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = ConstU16<42>; - type SystemWeightInfo = (); - type Version = (); + type Block = frame_system::mocking::MockBlock; } impl cfg_mocks::token_swaps::pallet::Config for Runtime { @@ -81,9 +48,5 @@ impl pallet_swaps::Config for Runtime { } pub fn new_test_ext() -> sp_io::TestExternalities { - let storage = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap(); - - sp_io::TestExternalities::new(storage) + System::externalities() } diff --git a/pallets/token-mux/Cargo.toml b/pallets/token-mux/Cargo.toml index 478034cc57..f49fdabc74 100644 --- a/pallets/token-mux/Cargo.toml +++ b/pallets/token-mux/Cargo.toml @@ -29,24 +29,14 @@ cfg-types = { workspace = true } orml-traits = { workspace = true } # Benchmark dependencies -## Local -pallet-order-book = { workspace = true, optional = true } -## ORML -orml-asset-registry = { workspace = true, optional = true } -## Polkadot SDK frame-benchmarking = { workspace = true, optional = true } [dev-dependencies] cfg-mocks = { workspace = true, default-features = true } cfg-test-utils = { workspace = true, default-features = true } -pallet-restricted-tokens = { workspace = true, default-features = false } -# ORML -orml-asset-registry = { workspace = true, default-features = true } orml-tokens = { workspace = true, default-features = true } -# Polkadot SDK -pallet-balances = { workspace = true, default-features = true } +pallet-restricted-tokens = { workspace = true, default-features = true } sp-io = { workspace = true, default-features = true } -xcm = { workspace = true, default-features = false } [features] default = ["std"] @@ -59,7 +49,6 @@ std = [ "frame-support/std", "frame-system/std", "orml-traits/std", - "pallet-order-book/std", "scale-info/std", "serde/std", "sp-arithmetic/std", @@ -76,8 +65,6 @@ runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", - "orml-asset-registry/runtime-benchmarks", - "pallet-order-book/runtime-benchmarks", "sp-runtime/runtime-benchmarks", ] try-runtime = [ @@ -86,6 +73,5 @@ try-runtime = [ "cfg-types/try-runtime", "frame-support/try-runtime", "frame-system/try-runtime", - "pallet-order-book/try-runtime", "sp-runtime/try-runtime", ] diff --git a/pallets/token-mux/src/benchmarking.rs b/pallets/token-mux/src/benchmarking.rs index c98f478575..4364d16143 100644 --- a/pallets/token-mux/src/benchmarking.rs +++ b/pallets/token-mux/src/benchmarking.rs @@ -10,7 +10,7 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -use cfg_traits::swaps::OrderRatio; +use cfg_traits::{swaps::OrderRatio, AssetMetadataOf}; use cfg_types::tokens::{ CurrencyId, CurrencyId::{ForeignAsset, LocalAsset}, @@ -20,8 +20,8 @@ use frame_benchmarking::v2::*; use frame_support::traits::fungibles::{Inspect, Mutate}; use frame_system::RawOrigin; use orml_traits::asset_registry::{Inspect as OrmlInspect, Mutate as OrmlMutate}; -use sp_arithmetic::traits::One; -use sp_core::crypto::AccountId32; +use sp_arithmetic::traits::{One, Zero}; +use sp_std::vec; // required for #[benchmarks] use super::*; @@ -30,25 +30,21 @@ const LOCAL_CURRENCY: CurrencyId = LocalAsset(LOCAL_ASSET_ID); const LOCAL_ASSET_ID: LocalAssetId = LocalAssetId(1000); const DECIMALS: u32 = 6; const AMOUNT: u128 = 1_000_000_000; -#[cfg(test)] -const ORDER_ID: u64 = 1; #[cfg(test)] fn init_mocks() { - use crate::{mock::MockTokenSwaps, tests::ORDER_ID}; - - MockTokenSwaps::mock_place_order(|_, _, _, _, _| Ok(ORDER_ID)); - MockTokenSwaps::mock_get_order_details(|_| None); -} -#[cfg(test)] -fn mock_match_swap(who: T::AccountId) -where - AccountId32: From, -{ use cfg_traits::swaps::{OrderInfo, Swap}; use tests::swaps::utils::mock_swap; - use crate::mock::MockTokenSwaps; + use crate::{ + mock::{MockTokenSwaps, TokenMux}, + tests::ORDER_ID, + }; + + let who = account::("account", 0, 0); + + MockTokenSwaps::mock_place_order(|_, _, _, _, _| Ok(ORDER_ID)); + MockTokenSwaps::mock_get_order_details(|_| None); MockTokenSwaps::mock_get_order_details(|order_id| { assert_eq!(order_id, 1); @@ -66,12 +62,7 @@ where assert_eq!(order_id, ORDER_ID); assert_eq!(amount_out, AMOUNT); - mock_swap( - FOREIGN_CURRENCY, - &who.clone().into(), - LOCAL_CURRENCY, - &Pallet::::account().into(), - ); + mock_swap(FOREIGN_CURRENCY, &who, LOCAL_CURRENCY, &TokenMux::account()); Ok(()) }); @@ -87,15 +78,14 @@ where ::Balance: From + Zero, >::Balance: From, T::AssetRegistry: OrmlMutate, - AccountId32: From, { pub fn setup_currencies() { T::AssetRegistry::register_asset( Some(FOREIGN_CURRENCY.into()), - orml_asset_registry::AssetMetadata { + AssetMetadataOf:: { decimals: DECIMALS, - name: "VARIANT CURRENCY".as_bytes().to_vec(), - symbol: "VARIANT".as_bytes().to_vec(), + name: Default::default(), + symbol: Default::default(), existential_deposit: Zero::zero(), location: None, additional: CustomMetadata { @@ -108,10 +98,10 @@ where .unwrap(); T::AssetRegistry::register_asset( Some(LOCAL_CURRENCY.into()), - orml_asset_registry::AssetMetadata { + AssetMetadataOf:: { decimals: DECIMALS, - name: "LOCAL CURRENCY".as_bytes().to_vec(), - symbol: "LOCAL".as_bytes().to_vec(), + name: Default::default(), + symbol: Default::default(), existential_deposit: Zero::zero(), location: None, additional: CustomMetadata { @@ -168,7 +158,6 @@ where ::Balance: From + Zero, >::Balance: From, T::AssetRegistry: OrmlMutate, - AccountId32: From, )] mod benchmarks { use super::*; @@ -195,8 +184,6 @@ mod benchmarks { init_mocks(); let account = Helper::::swap_setup(); - #[cfg(test)] - mock_match_swap::(account.clone()); Helper::::swap_foreign_to_local(account.clone()); @@ -216,8 +203,6 @@ mod benchmarks { init_mocks(); let account = Helper::::swap_setup(); - #[cfg(test)] - mock_match_swap::(account.clone()); let order_id = Helper::::place_order(FOREIGN_CURRENCY, LOCAL_CURRENCY, &account); #[extrinsic_call] diff --git a/pallets/token-mux/src/mock.rs b/pallets/token-mux/src/mock.rs index 2fa87e205b..118cada430 100644 --- a/pallets/token-mux/src/mock.rs +++ b/pallets/token-mux/src/mock.rs @@ -11,27 +11,16 @@ // GNU General Public License for more details. use cfg_mocks::pallet_mock_token_swaps; +use cfg_traits::AssetMetadataOf; use cfg_types::tokens::{CustomMetadata, LocalAssetId}; -use frame_support::{ - parameter_types, - traits::{ConstU16, ConstU32, ConstU64, GenesisBuild}, - PalletId, -}; -use orml_traits::{asset_registry::AssetMetadata, parameter_type_with_key}; -use sp_core::{crypto::AccountId32, H256}; +use frame_support::{derive_impl, parameter_types, PalletId}; +use orml_traits::parameter_type_with_key; use sp_io::TestExternalities; -use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, - FixedU128, -}; +use sp_runtime::{BuildStorage, FixedU128}; use crate::pallet as pallet_token_mux; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; - -pub type AccountId = AccountId32; +pub type AccountId = u64; pub type Balance = u128; pub type SwapId = u64; pub type Ratio = FixedU128; @@ -51,11 +40,11 @@ pub const HAS_UNREGISTERED_LOCAL_ASSET: CurrencyId = CurrencyId::ForeignAsset(6) pub const USDC_WRONG_DECIMALS: CurrencyId = CurrencyId::ForeignAsset(7); pub const UNREGISTERED_LOCAL_ASSET_ID: LocalAssetId = LocalAssetId(2u32); -pub const USER_1: AccountId = AccountId32::new([1u8; 32]); -pub const USER_2: AccountId = AccountId32::new([2u8; 32]); -pub const USER_NON: AccountId = AccountId32::new([4u8; 32]); -pub const USER_UNREGISTERED: AccountId = AccountId32::new([5u8; 32]); -pub const USER_LOCAL: AccountId = AccountId32::new([6u8; 32]); +pub const USER_1: AccountId = 1; +pub const USER_2: AccountId = 2; +pub const USER_NON: AccountId = 4; +pub const USER_UNREGISTERED: AccountId = 5; +pub const USER_LOCAL: AccountId = 6; pub const fn token(amount: Balance) -> Balance { amount * (10 as Balance).pow(USDC_DECIMALS) @@ -64,11 +53,7 @@ pub const fn token(amount: Balance) -> Balance { pub const INITIAL_AMOUNT: Balance = token(1000); frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Runtime { System: frame_system, MockTokenSwaps: pallet_mock_token_swaps, TokenMux: pallet_token_mux, @@ -80,34 +65,13 @@ cfg_test_utils::mocks::orml_asset_registry::impl_mock_registry! { MockRegistry, CurrencyId, Balance, - CustomMetadata + CustomMetadata, + () } +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { - type AccountData = (); - type AccountId = AccountId; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = ConstU64<250>; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = ConstU16<42>; - type SystemWeightInfo = (); - type Version = (); + type Block = frame_system::mocking::MockBlock; } impl pallet_mock_token_swaps::Config for Runtime { @@ -158,14 +122,13 @@ impl pallet_token_mux::Config for Runtime { } fn asset_metadata( - currency_id: CurrencyId, decimals: u32, local_representation: Option, -) -> AssetMetadata { - AssetMetadata { +) -> AssetMetadataOf { + AssetMetadataOf:: { decimals, - name: format!("name_{:?}", currency_id).into_bytes().to_vec(), - symbol: format!("symbol_{:?}", currency_id).into_bytes().to_vec(), + name: Default::default(), + symbol: Default::default(), existential_deposit: 0, location: None, additional: CustomMetadata { @@ -177,8 +140,8 @@ fn asset_metadata( } pub fn new_test_ext() -> sp_io::TestExternalities { - let mut storage = frame_system::GenesisConfig::default() - .build_storage::() + let mut storage = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); // Add foreign currency balances of differing precisions @@ -208,10 +171,7 @@ pub fn new_test_ext() -> sp_io::TestExternalities { }; orml_asset_registry_mock::GenesisConfig { - metadata: vec![( - currency_id, - asset_metadata(currency_id, decimals, local_representation), - )], + metadata: vec![(currency_id, asset_metadata(decimals, local_representation))], } .assimilate_storage(&mut storage) .unwrap(); @@ -223,23 +183,19 @@ pub fn new_test_ext() -> sp_io::TestExternalities { } pub fn new_test_ext_invalid_assets() -> sp_io::TestExternalities { - let mut storage = frame_system::GenesisConfig::default() - .build_storage::() + let mut storage = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); orml_asset_registry_mock::GenesisConfig { metadata: vec![ ( HAS_UNREGISTERED_LOCAL_ASSET, - asset_metadata( - HAS_UNREGISTERED_LOCAL_ASSET, - 6, - Some(UNREGISTERED_LOCAL_ASSET_ID), - ), + asset_metadata(6, Some(UNREGISTERED_LOCAL_ASSET_ID)), ), ( USDC_WRONG_DECIMALS, - asset_metadata(USDC_WRONG_DECIMALS, 5, Some(USDC_LOCAL_ASSET_ID)), + asset_metadata(5, Some(USDC_LOCAL_ASSET_ID)), ), ], } diff --git a/pallets/transfer-allowlist/src/benchmarking.rs b/pallets/transfer-allowlist/src/benchmarking.rs index 7cfa103ea2..724b692198 100644 --- a/pallets/transfer-allowlist/src/benchmarking.rs +++ b/pallets/transfer-allowlist/src/benchmarking.rs @@ -18,11 +18,10 @@ use frame_support::{ pallet_prelude::Get, traits::{fungible::Unbalanced, tokens::Precision, Currency, ReservableCurrency}, }; -use frame_system::RawOrigin; +use frame_system::{pallet_prelude::BlockNumberFor, RawOrigin}; use parity_scale_codec::EncodeLike; -use scale_info::TypeInfo; use sp_runtime::{ - traits::{AtLeast32BitUnsigned, Bounded, CheckedAdd, One}, + traits::{CheckedAdd, One}, Saturating, }; @@ -37,7 +36,7 @@ benchmarks! { ::Location: From<::AccountId> + EncodeLike<::Location>, ::ReserveCurrency: Currency<::AccountId> + ReservableCurrency<::AccountId>, T: pallet::Config, - ::BlockNumber: AtLeast32BitUnsigned + Bounded + TypeInfo, + BlockNumberFor: One, <::ReserveCurrency as frame_support::traits::fungible::Inspect<::AccountId,>>::Balance: From } @@ -101,7 +100,7 @@ benchmarks! { remove_transfer_allowance_delay_present { let (sender, receiver) = set_up_users::(); - let delay = T::BlockNumber::one(); + let delay = BlockNumberFor::::one(); Pallet::::add_allowance_delay(RawOrigin::Signed(sender.clone()).into(), BENCHMARK_CURRENCY_ID, delay.clone())?; Pallet::::add_transfer_allowance(RawOrigin::Signed(sender.clone()).into(), BENCHMARK_CURRENCY_ID, receiver.clone().into())?; @@ -154,4 +153,4 @@ fn set_up_second_receiver() -> T::AccountId { account::("Receiver_1", 3, 0) } -impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Runtime,); +impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Runtime); diff --git a/pallets/transfer-allowlist/src/lib.rs b/pallets/transfer-allowlist/src/lib.rs index 41beabbd4f..32127d411c 100644 --- a/pallets/transfer-allowlist/src/lib.rs +++ b/pallets/transfer-allowlist/src/lib.rs @@ -68,10 +68,10 @@ pub mod pallet { ::AccountId, >>::Balance; - /// AllowanceDetails where `BlockNumber` is of type T::BlockNumber - pub type AllowanceDetailsOf = AllowanceDetails<::BlockNumber>; + /// AllowanceDetails where `BlockNumber` is of type `BlockNumberFor` + pub type AllowanceDetailsOf = AllowanceDetails>; - /// Resons for holding as defined by the fungible::hold::Inspect trait + /// Resons for holding as defined by the `fungible::hold::Inspect` trait pub type ReasonOf = <::ReserveCurrency as fungible::hold::Inspect< ::AccountId, >>::Reason; @@ -182,14 +182,14 @@ pub mod pallet { /// Storage item containing number of allowances set, delay for sending /// account/currency, and block number delay is modifiable at. Contains an /// instance of AllowanceMetadata with allowance count as `u64`, - /// current_delay as `Option`, and modifiable_at as - /// `Option`. If a delay is set, but no allowances have been - /// created, `allowance_count` will be set to `0`. A double map is used here - /// as we need to know whether there is a restriction set for the account - /// and currency in the case where there is no allowance for destination - /// location. Using an StorageNMap would not allow us to look up whether - /// there was a restriction for the sending account and currency, given - /// that: + /// current_delay as `Option>`, and modifiable_at as + /// `Option>`. If a delay is set, but no allowances have + /// been created, `allowance_count` will be set to `0`. A double map is used + /// here as we need to know whether there is a restriction set for the + /// account and currency in the case where there is no allowance for + /// destination location. Using an StorageNMap would not allow us to look up + /// whether there was a restriction for the sending account and currency, + /// given that: /// - we're checking whether there's an allowance specified for the receiver /// location /// - we would only find whether a restriction was set for the account in @@ -209,7 +209,7 @@ pub mod pallet { T::AccountId, Twox64Concat, T::CurrencyId, - AllowanceMetadata, + AllowanceMetadata>, OptionQuery, >; @@ -224,7 +224,7 @@ pub mod pallet { NMapKey, NMapKey, ), - AllowanceDetails, + AllowanceDetails>, OptionQuery, >; @@ -264,16 +264,16 @@ pub mod pallet { sender_account_id: T::AccountId, currency_id: T::CurrencyId, receiver: T::Location, - allowed_at: T::BlockNumber, - blocked_at: T::BlockNumber, + allowed_at: BlockNumberFor, + blocked_at: BlockNumberFor, }, /// Event for successful removal of transfer allowance perms TransferAllowanceRemoved { sender_account_id: T::AccountId, currency_id: T::CurrencyId, receiver: T::Location, - allowed_at: T::BlockNumber, - blocked_at: T::BlockNumber, + allowed_at: BlockNumberFor, + blocked_at: BlockNumberFor, }, /// Event for successful removal of transfer allowance perms TransferAllowancePurged { @@ -285,19 +285,19 @@ pub mod pallet { TransferAllowanceDelayAdd { sender_account_id: T::AccountId, currency_id: T::CurrencyId, - delay: T::BlockNumber, + delay: BlockNumberFor, }, /// Event for Allowance delay update TransferAllowanceDelayUpdate { sender_account_id: T::AccountId, currency_id: T::CurrencyId, - delay: T::BlockNumber, + delay: BlockNumberFor, }, /// Event for Allowance delay future modification allowed ToggleTransferAllowanceDelayFutureModifiable { sender_account_id: T::AccountId, currency_id: T::CurrencyId, - modifiable_once_after: Option, + modifiable_once_after: Option>, }, /// Event for Allowance delay removal TransferAllowanceDelayPurge { @@ -460,7 +460,7 @@ pub mod pallet { pub fn add_allowance_delay( origin: OriginFor, currency_id: T::CurrencyId, - delay: T::BlockNumber, + delay: BlockNumberFor, ) -> DispatchResult { let account_id = ensure_signed(origin)?; let count_delay = match Self::get_account_currency_restriction_count_delay( @@ -504,7 +504,7 @@ pub mod pallet { pub fn update_allowance_delay( origin: OriginFor, currency_id: T::CurrencyId, - delay: T::BlockNumber, + delay: BlockNumberFor, ) -> DispatchResult { let account_id = ensure_signed(origin)?; let current_block = >::block_number(); diff --git a/pallets/transfer-allowlist/src/mock.rs b/pallets/transfer-allowlist/src/mock.rs index 3e08c08ca4..fb372559e7 100644 --- a/pallets/transfer-allowlist/src/mock.rs +++ b/pallets/transfer-allowlist/src/mock.rs @@ -12,17 +12,14 @@ use cfg_types::tokens::FilterCurrency; use frame_support::{ - parameter_types, + derive_impl, parameter_types, traits::{ConstU32, ConstU64}, Deserialize, Serialize, }; +use frame_system::pallet_prelude::BlockNumberFor; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; -use sp_core::H256; -use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, CheckedAdd, IdentityLookup}, -}; +use sp_runtime::{traits::CheckedAdd, BuildStorage}; use crate as transfer_allowlist; @@ -32,52 +29,19 @@ pub(crate) const ACCOUNT_RECEIVER: u64 = 0x2; pub(crate) const FEE_DEFICIENT_SENDER: u64 = 0x3; type Balance = u64; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; -pub type MockAccountId = u64; frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Runtime { Balances: pallet_balances, System: frame_system, TransferAllowList: transfer_allowlist, } ); -parameter_types! { - pub const BlockHashCount: u64 = 250; - pub const SS58Prefix: u8 = 42; -} - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; - type AccountId = MockAccountId; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = BlockHashCount; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = frame_support::traits::ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = SS58Prefix; - type SystemWeightInfo = (); - type Version = (); + type Block = frame_system::mocking::MockBlock; } #[derive( @@ -103,22 +67,14 @@ impl From for Location { Self::TestLocal(a) } } -// Used to handle reserve/unreserve for allowance creation. -// Loosely coupled with transfer_allowlist + +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for Runtime { type AccountStore = System; - type Balance = u64; type DustRemoval = (); type ExistentialDeposit = ConstU64<1>; - type FreezeIdentifier = (); - type HoldIdentifier = (); - type MaxFreezes = (); - type MaxHolds = frame_support::traits::ConstU32<1>; - type MaxLocks = (); - type MaxReserves = ConstU32<50>; - type ReserveIdentifier = [u8; 8]; - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); + type MaxHolds = ConstU32<1>; + type RuntimeHoldReason = (); } parameter_types! { @@ -136,8 +92,8 @@ impl transfer_allowlist::Config for Runtime { } pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); pallet_balances::GenesisConfig:: { @@ -155,7 +111,7 @@ pub fn new_test_ext() -> sp_io::TestExternalities { e } -pub fn advance_n_blocks(n: ::BlockNumber) { +pub fn advance_n_blocks(n: BlockNumberFor) { let b = frame_system::Pallet::::block_number() .checked_add(&n) .expect("Mock block advancement failed."); diff --git a/runtime/altair/Cargo.toml b/runtime/altair/Cargo.toml index 6bb71fc462..c721e9cf83 100644 --- a/runtime/altair/Cargo.toml +++ b/runtime/altair/Cargo.toml @@ -28,6 +28,7 @@ sp-io = { workspace = true } sp-offchain = { workspace = true } sp-runtime = { workspace = true } sp-session = { workspace = true } +sp-staking = { workspace = true } sp-std = { workspace = true } sp-transaction-pool = { workspace = true } sp-version = { workspace = true } @@ -46,12 +47,12 @@ cumulus-primitives-timestamp = { workspace = true } cumulus-primitives-utility = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } -polkadot-parachain = { workspace = true } +polkadot-parachain-primitives = { workspace = true } polkadot-runtime-common = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } +staging-xcm = { workspace = true } +staging-xcm-builder = { workspace = true } +staging-xcm-executor = { workspace = true } xcm-primitives = { workspace = true } orml-traits = { workspace = true } @@ -60,8 +61,6 @@ orml-xcm-support = { workspace = true } fp-rpc = { workspace = true } fp-self-contained = { workspace = true } -moonbeam-relay-encoder = { workspace = true } - # Locals cfg-primitives = { workspace = true } cfg-traits = { workspace = true } @@ -167,6 +166,7 @@ std = [ "sp-std/std", "sp-transaction-pool/std", "sp-version/std", + "sp-staking/std", "frame-support/std", "frame-system/std", "frame-system-rpc-runtime-api/std", @@ -178,18 +178,17 @@ std = [ "cumulus-primitives-timestamp/std", "cumulus-primitives-utility/std", "cumulus-pallet-session-benchmarking?/std", - "xcm/std", - "xcm-builder/std", - "xcm-executor/std", + "staging-xcm/std", + "staging-xcm-builder/std", + "staging-xcm-executor/std", "xcm-primitives/std", "orml-traits/std", "orml-xcm-support/std", "fp-rpc/std", "fp-self-contained/std", - "moonbeam-relay-encoder/std", "pallet-transaction-payment-rpc-runtime-api/std", "polkadot-runtime-common/std", - "polkadot-parachain/std", + "polkadot-parachain-primitives/std", # Locals "cfg-primitives/std", @@ -279,13 +278,14 @@ runtime-benchmarks = [ # Substrate related "sp-runtime/runtime-benchmarks", + "sp-staking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", - "xcm-executor/runtime-benchmarks", + "staging-xcm-builder/runtime-benchmarks", + "staging-xcm-executor/runtime-benchmarks", "xcm-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", - "polkadot-parachain/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", # Locals "cfg-primitives/runtime-benchmarks", diff --git a/runtime/altair/src/lib.rs b/runtime/altair/src/lib.rs index ae518ffe2f..69a540163a 100644 --- a/runtime/altair/src/lib.rs +++ b/runtime/altair/src/lib.rs @@ -14,8 +14,8 @@ //! Wasm. #![cfg_attr(not(feature = "std"), no_std)] -// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. -#![recursion_limit = "256"] +// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 512. +#![recursion_limit = "512"] // Allow things like `1 * CFG` #![allow(clippy::identity_op)] @@ -24,24 +24,23 @@ use cfg_primitives::{ liquidity_pools::GeneralCurrencyPrefix, types::{ AccountId, Address, AllOfCouncil, AuraId, Balance, BlockNumber, CollectionId, - CouncilCollective, EnsureRootOr, HalfOfCouncil, Hash, Hashing, Header, IBalance, Index, - ItemId, LoanId, OrderId, OutboundMessageNonce, PalletIndex, PoolEpochId, PoolFeeId, PoolId, + CouncilCollective, EnsureRootOr, HalfOfCouncil, Hash, Hashing, Header, IBalance, ItemId, + LoanId, Nonce, OrderId, OutboundMessageNonce, PalletIndex, PoolEpochId, PoolFeeId, PoolId, Signature, ThreeFourthOfCouncil, TrancheId, TrancheWeight, TwoThirdOfCouncil, }, }; use cfg_traits::{ investments::{OrderManager, TrancheCurrency as _}, - Millis, Permissions as PermissionsT, PoolUpdateGuard, PreConditions, Seconds, TryConvert, + Millis, Permissions as PermissionsT, PoolUpdateGuard, PreConditions, Seconds, }; use cfg_types::{ - consts::pools::{MaxTrancheNameLengthBytes, MaxTrancheSymbolLengthBytes}, fee_keys::{Fee, FeeKey}, fixed_point::{Quantity, Rate, Ratio}, investments::InvestmentPortfolio, oracles::OracleKey, permissions::{PermissionRoles, PermissionScope, PermissionedCurrencyRole, PoolRole, Role}, time::TimeProvider, - tokens::{CurrencyId, CustomMetadata, StakingCurrency, TrancheCurrency}, + tokens::{AssetStringLimit, CurrencyId, CustomMetadata, StakingCurrency, TrancheCurrency}, }; use constants::currency::*; use cumulus_primitives_core::{MultiAsset, MultiLocation}; @@ -49,17 +48,18 @@ use fp_rpc::TransactionStatus; use frame_support::{ construct_runtime, dispatch::DispatchClass, + pallet_prelude::RuntimeDebug, parameter_types, traits::{ - AsEnsureOriginWithArg, ConstU32, ConstU64, Contains, EitherOfDiverse, EqualPrivilegeOnly, - Get, InstanceFilter, LockIdentifier, OnFinalize, PalletInfoAccess, U128CurrencyToVote, + AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, Contains, EitherOfDiverse, + EqualPrivilegeOnly, Get, InstanceFilter, LockIdentifier, OnFinalize, PalletInfoAccess, UnixTime, WithdrawReasons, }, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}, ConstantMultiplier, Weight, }, - PalletId, RuntimeDebug, + PalletId, }; use frame_system::{ limits::{BlockLength, BlockWeights}, @@ -88,14 +88,14 @@ use pallet_transaction_payment_rpc_runtime_api::{FeeDetails, RuntimeDispatchInfo use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use polkadot_runtime_common::{prod_or_fast, BlockHashCount, SlowAdjustingFeeUpdate}; use runtime_common::{ - account_conversion::AccountConverter, + account_conversion::{AccountConverter, RuntimeAccountConverter}, asset_registry, evm::{ precompile::Precompiles, BaseFeeThreshold, FindAuthorTruncated, GAS_LIMIT_POV_SIZE_RATIO, GAS_LIMIT_STORAGE_GROWTH_RATIO, WEIGHT_PER_GAS, }, fees::{DealWithFees, FeeToTreasury, WeightToFee}, - gateway::GatewayAccountProvider, + gateway, liquidity_pools::LiquidityPoolsMessage, oracle::{ Feeder, OracleConverterBridge, OracleRatioProvider, OracleRatioProviderLocalAssetExtension, @@ -120,10 +120,11 @@ use sp_runtime::{ transaction_validity::{TransactionSource, TransactionValidity, TransactionValidityError}, ApplyExtrinsicResult, DispatchError, DispatchResult, FixedI128, Perbill, Permill, Perquintill, }; +use sp_staking::currency_to_vote::U128CurrencyToVote; use sp_std::{marker::PhantomData, prelude::*}; use sp_version::RuntimeVersion; +use staging_xcm_executor::XcmExecutor; use static_assertions::const_assert; -use xcm_executor::XcmExecutor; use crate::xcm::*; @@ -203,26 +204,24 @@ impl frame_system::Config for Runtime { /// The identifier used to distinguish between accounts. type AccountId = AccountId; type BaseCallFilter = BaseCallFilter; + /// The block type. + type Block = Block; /// Maximum number of block number to block hash mappings to keep (oldest /// pruned first). type BlockHashCount = BlockHashCount; type BlockLength = RuntimeBlockLength; - /// The index type for blocks. - type BlockNumber = BlockNumber; type BlockWeights = RuntimeBlockWeights; type DbWeight = RocksDbWeight; /// The type for hashing blocks and tries. type Hash = Hash; /// The hashing algorithm used. type Hashing = Hashing; - /// The header type. - type Header = Header; - /// The index type for storing how many extrinsics an account has signed. - type Index = Index; /// The lookup mechanism to get account ID from whatever is passed in /// dispatchers. type Lookup = sp_runtime::traits::AccountIdLookup; type MaxConsumers = frame_support::traits::ConstU32<16>; + /// The nonce type for storing how many extrinsics an account has signed. + type Nonce = Nonce; /// A function that is invoked when an account has been determined to be /// dead. All resources should be cleaned up associated with the given /// account. @@ -347,7 +346,6 @@ impl pallet_balances::Config for Runtime { /// The minimum amount required to keep an account open. type ExistentialDeposit = ExistentialDeposit; type FreezeIdentifier = (); - type HoldIdentifier = (); type MaxFreezes = ConstU32<10>; type MaxHolds = ConstU32<10>; type MaxLocks = MaxLocks; @@ -355,6 +353,7 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; /// The overarching event type. type RuntimeEvent = RuntimeEvent; + type RuntimeHoldReason = (); type WeightInfo = weights::pallet_balances::WeightInfo; } @@ -393,6 +392,7 @@ parameter_types! { } impl pallet_aura::Config for Runtime { + type AllowMultipleBlocksPerSlot = ConstBool; type AuthorityId = AuraId; type DisabledValidators = (); type MaxAuthorities = MaxAuthorities; @@ -1018,7 +1018,7 @@ parameter_types! { pub const PotId: PalletId = cfg_types::ids::STAKE_POT_PALLET_ID; #[derive(scale_info::TypeInfo, Debug, PartialEq, Eq, Clone)] pub const MaxCandidates: u32 = 20; - pub const MinCandidates: u32 = 5; + pub const MinEligibleCollators: u32 = 5; pub const MaxVoters: u32 = 100; pub const SessionLength: BlockNumber = 6 * HOURS; pub const MaxInvulnerables: u32 = 100; @@ -1031,7 +1031,7 @@ impl pallet_collator_selection::Config for Runtime { type KickThreshold = Period; type MaxCandidates = MaxCandidates; type MaxInvulnerables = MaxInvulnerables; - type MinCandidates = MinCandidates; + type MinEligibleCollators = MinEligibleCollators; type PotId = PotId; type RuntimeEvent = RuntimeEvent; type UpdateOrigin = EnsureRootOr; @@ -1174,6 +1174,7 @@ impl orml_asset_registry::Config for Runtime { type Balance = Balance; type CustomMetadata = CustomMetadata; type RuntimeEvent = RuntimeEvent; + type StringLimit = AssetStringLimit; type WeightInfo = (); } @@ -1383,19 +1384,19 @@ parameter_types! { } /// Xcm Weigher shared between multiple Xcm-related configs. -pub type XcmWeigher = xcm_builder::FixedWeightBounds; +pub type XcmWeigher = + staging_xcm_builder::FixedWeightBounds; impl pallet_xcm_transactor::Config for Runtime { - type AccountIdToMultiLocation = AccountIdToMultiLocation; + type AccountIdToMultiLocation = AccountIdToMultiLocation; type AssetTransactor = FungiblesTransactor; type Balance = Balance; type BaseXcmWeight = BaseXcmWeight; type CurrencyId = CurrencyId; type CurrencyIdToMultiLocation = CurrencyIdConvert; type DerivativeAddressRegistrationOrigin = EnsureRoot; - type HrmpEncoder = moonbeam_relay_encoder::westend::WestendEncoder; type HrmpManipulatorOrigin = EnsureRootOr; - type MaxHrmpFee = xcm_builder::Case; + type MaxHrmpFee = staging_xcm_builder::Case; type ReserveProvider = xcm_primitives::AbsoluteAndRelativeReserve; type RuntimeEvent = RuntimeEvent; type SelfLocation = SelfLocation; @@ -1466,8 +1467,6 @@ impl pallet_pool_system::Config for Runtime { type EpochId = PoolEpochId; type Investments = Investments; type MaxNAVAgeUpperBound = MaxNAVAgeUpperBound; - type MaxTokenNameLength = MaxTrancheNameLengthBytes; - type MaxTokenSymbolLength = MaxTrancheSymbolLengthBytes; type MaxTranches = MaxTranches; type MinEpochTimeLowerBound = MinEpochTimeLowerBound; type MinEpochTimeUpperBound = MinEpochTimeUpperBound; @@ -1485,6 +1484,7 @@ impl pallet_pool_system::Config for Runtime { type Rate = Rate; type RuntimeChange = runtime_common::changes::RuntimeChange; type RuntimeEvent = RuntimeEvent; + type StringLimit = AssetStringLimit; type Time = Timestamp; type Tokens = Tokens; type TrancheCurrency = TrancheCurrency; @@ -1500,8 +1500,6 @@ impl pallet_pool_registry::Config for Runtime { type CurrencyId = CurrencyId; type InterestRate = Rate; type MaxSizeMetadata = MaxSizeMetadata; - type MaxTokenNameLength = MaxTrancheNameLengthBytes; - type MaxTokenSymbolLength = MaxTrancheSymbolLengthBytes; type MaxTranches = MaxTranches; type ModifyPool = pallet_pool_system::Pallet; type ModifyWriteOffPolicy = pallet_loans::Pallet; @@ -1566,12 +1564,7 @@ impl PoolUpdateGuard for UpdateGuard { PoolId, MaxTranches, >; - type ScheduledUpdateDetails = ScheduledUpdateDetails< - Rate, - MaxTrancheNameLengthBytes, - MaxTrancheSymbolLengthBytes, - MaxTranches, - >; + type ScheduledUpdateDetails = ScheduledUpdateDetails; fn released( pool: &Self::PoolDetails, @@ -1765,8 +1758,8 @@ impl pallet_liquidity_pools::Config for Runtime { type Balance = Balance; type BalanceRatio = Ratio; type CurrencyId = CurrencyId; - type DomainAccountToAccountId = AccountConverter; - type DomainAddressToAccountId = AccountConverter; + type DomainAccountToAccountId = AccountConverter; + type DomainAddressToAccountId = AccountConverter; type ForeignInvestment = ForeignInvestments; type GeneralCurrencyPrefix = GeneralCurrencyPrefix; type OutboundQueue = LiquidityPoolsGateway; @@ -1786,7 +1779,7 @@ impl pallet_liquidity_pools::Config for Runtime { parameter_types! { pub const MaxIncomingMessageSize: u32 = 1024; - pub Sender: AccountId = GatewayAccountProvider::::get_gateway_account(); + pub Sender: AccountId = gateway::get_gateway_account::(); } impl pallet_liquidity_pools_gateway::Config for Runtime { @@ -1856,7 +1849,7 @@ parameter_types! { } impl pallet_evm::Config for Runtime { - type AddressMapping = AccountConverter; + type AddressMapping = RuntimeAccountConverter; type BlockGasLimit = BlockGasLimit; type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping; type CallOrigin = EnsureAddressRoot; @@ -1953,16 +1946,12 @@ pub type Executive = frame_executive::Executive< // Any addition should be done at the bottom // Any deletion affects the following frames during runtime upgrades construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = cfg_primitives::Block, - UncheckedExtrinsic = UncheckedExtrinsic - { + pub enum Runtime { // basic system stuff - System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, - ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event} = 1, + System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, + ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event} = 1, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 4, + ParachainInfo: parachain_info::{Pallet, Storage, Config} = 4, // money stuff Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 20, @@ -1974,7 +1963,7 @@ construct_runtime!( Authorship: pallet_authorship::{Pallet, Storage} = 30, Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 31, Aura: pallet_aura::{Pallet, Storage, Config} = 32, - AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 33, + AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 33, // substrate pallets Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 60, @@ -1986,7 +1975,7 @@ construct_runtime!( Democracy: pallet_democracy::{Pallet, Call, Storage, Config, Event} = 66, Identity: pallet_identity::{Pallet, Call, Storage, Event} = 67, Vesting: pallet_vesting::{Pallet, Call, Storage, Event, Config} = 68, - Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 69, + Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 69, Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 70, Uniques: pallet_uniques::{Pallet, Call, Storage, Event} = 72, @@ -2023,7 +2012,7 @@ construct_runtime!( // XCM XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 120, - PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Config, Event, Origin} = 121, + PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Config, Event, Origin} = 121, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 122, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 123, XTokens: pallet_restricted_xtokens::{Pallet, Call} = 124, @@ -2036,10 +2025,10 @@ construct_runtime!( OrmlXcm: orml_xcm::{Pallet, Storage, Call, Event} = 152, // EVM pallets - EVM: pallet_evm::{Pallet, Config, Call, Storage, Event} = 160, - EVMChainId: pallet_evm_chain_id::{Pallet, Config, Storage} = 161, + EVM: pallet_evm::{Pallet, Config, Call, Storage, Event} = 160, + EVMChainId: pallet_evm_chain_id::{Pallet, Config, Storage} = 161, BaseFee: pallet_base_fee::{Pallet, Call, Config, Storage, Event} = 162, - Ethereum: pallet_ethereum::{Pallet, Config, Call, Storage, Event, Origin} = 163, + Ethereum: pallet_ethereum::{Pallet, Config, Call, Storage, Event, Origin} = 163, EthereumTransaction: pallet_ethereum_transaction::{Pallet, Storage} = 164, LiquidityPoolsAxelarGateway: axelar_gateway_precompile::{Pallet, Call, Storage, Event} = 165, @@ -2240,8 +2229,8 @@ impl_runtime_apis! { } } - impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { - fn account_nonce(account: AccountId) -> Index { + impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { + fn account_nonce(account: AccountId) -> Nonce { System::account_nonce(account) } } @@ -2382,12 +2371,14 @@ impl_runtime_apis! { } } + // AccountConversionApi impl runtime_common::apis::AccountConversionApi for Runtime { fn conversion_of(location: MultiLocation) -> Option { - AccountConverter::::try_convert(location).ok() + AccountConverter::location_to_account::(location) } } + // OrderBookApi impl runtime_common::apis::OrderBookApi for Runtime { fn min_fulfillment_amount(currency_id: CurrencyId) -> Option { OrderBook::min_fulfillment_amount(currency_id).ok() @@ -2609,21 +2600,25 @@ impl_runtime_apis! { fn gas_limit_multiplier_support() {} fn pending_block( - xts: Vec<::Extrinsic> - ) -> ( - Option, Option> - ) { - for ext in xts.into_iter() { - let _ = Executive::apply_extrinsic(ext); - } + xts: Vec<::Extrinsic> + ) -> ( + Option, Option> + ) { + for ext in xts.into_iter() { + let _ = Executive::apply_extrinsic(ext); + } - Ethereum::on_finalize(System::block_number() + 1); + Ethereum::on_finalize(System::block_number() + 1); - ( - pallet_ethereum::CurrentBlock::::get(), - pallet_ethereum::CurrentTransactionStatuses::::get() - ) - } + ( + pallet_ethereum::CurrentBlock::::get(), + pallet_ethereum::CurrentTransactionStatuses::::get() + ) + } + + fn initialize_pending_block(header: &::Header) { + Executive::initialize_block(header) + } } impl fp_rpc::ConvertTransactionRuntimeApi for Runtime { @@ -2698,9 +2693,10 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey, add_benchmark}; + use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark}; use frame_system_benchmarking::Pallet as SystemBench; use cumulus_pallet_session_benchmarking::Pallet as SessionBench; + use frame_support::traits::TrackedStorageKey; impl frame_system_benchmarking::Config for Runtime {} impl cumulus_pallet_session_benchmarking::Config for Runtime {} diff --git a/runtime/altair/src/liquidity_pools.rs b/runtime/altair/src/liquidity_pools.rs index b14cb24642..cd3aea4087 100644 --- a/runtime/altair/src/liquidity_pools.rs +++ b/runtime/altair/src/liquidity_pools.rs @@ -24,8 +24,8 @@ use pallet_liquidity_pools::hooks::{ CollectedForeignInvestmentHook, CollectedForeignRedemptionHook, DecreasedForeignInvestOrderHook, }; use runtime_common::{ - account_conversion::AccountConverter, gateway::GatewayAccountProvider, - liquidity_pools::LiquidityPoolsMessage, transfer_filter::PreLpTransfer, + account_conversion::AccountConverter, gateway, liquidity_pools::LiquidityPoolsMessage, + transfer_filter::PreLpTransfer, }; use crate::{ @@ -80,7 +80,7 @@ impl pallet_liquidity_pools::Config for Runtime { parameter_types! { pub const MaxIncomingMessageSize: u32 = 1024; - pub Sender: AccountId = GatewayAccountProvider::::get_gateway_account(); + pub Sender: AccountId = gateway::get_gateway_account::(); } impl pallet_liquidity_pools_gateway::Config for Runtime { diff --git a/runtime/altair/src/migrations.rs b/runtime/altair/src/migrations.rs index 39f34d3b93..949dd37e10 100644 --- a/runtime/altair/src/migrations.rs +++ b/runtime/altair/src/migrations.rs @@ -19,4 +19,5 @@ pub type UpgradeAltair1035 = ( runtime_common::migrations::increase_storage_version::Migration, runtime_common::migrations::increase_storage_version::Migration, runtime_common::migrations::increase_storage_version::Migration, + pallet_collator_selection::migration::v1::MigrateToV1, ); diff --git a/runtime/altair/src/weights/pallet_collator_selection.rs b/runtime/altair/src/weights/pallet_collator_selection.rs index 06b84419b8..bc518dffbf 100644 --- a/runtime/altair/src/weights/pallet_collator_selection.rs +++ b/runtime/altair/src/weights/pallet_collator_selection.rs @@ -163,4 +163,14 @@ impl pallet_collator_selection::WeightInfo for WeightIn .saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into())) .saturating_add(Weight::from_parts(0, 2259).saturating_mul(r.into())) } + + fn add_invulnerable(_: u32, _: u32) -> Weight { + // Pending to generate + Weight::default() + } + + fn remove_invulnerable(_: u32) -> Weight { + // Pending to generate + Weight::default() + } } diff --git a/runtime/altair/src/xcm.rs b/runtime/altair/src/xcm.rs index fc2325c177..05c7361d06 100644 --- a/runtime/altair/src/xcm.rs +++ b/runtime/altair/src/xcm.rs @@ -33,16 +33,16 @@ use runtime_common::{ xcm_fees::native_per_second, }; use sp_core::ConstU32; -use xcm::{ +use staging_xcm::{ prelude::*, v3::{MultiLocation, Weight as XcmWeight}, }; -use xcm_builder::{ +use staging_xcm_builder::{ ConvertedConcreteId, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, FungiblesAdapter, NoChecking, RelayChainAsNative, SiblingParachainAsNative, SignedAccountId32AsNative, SovereignSignedViaLocation, }; -use xcm_executor::{traits::JustTry, XcmExecutor}; +use staging_xcm_executor::{traits::JustTry, XcmExecutor}; use super::{ AccountId, Balance, OrmlAssetRegistry, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, @@ -85,7 +85,8 @@ impl frame_support::traits::Contains for SafeCallFilter { /// transferred, how fees are calculated, what barriers we impose on incoming /// XCM messages, etc. pub struct XcmConfig; -impl xcm_executor::Config for XcmConfig { +impl staging_xcm_executor::Config for XcmConfig { + type Aliasers = Nothing; type AssetClaims = PolkadotXcm; type AssetExchanger = (); type AssetLocker = (); @@ -257,7 +258,7 @@ parameter_type_with_key! { } impl orml_xtokens::Config for Runtime { - type AccountIdToMultiLocation = AccountIdToMultiLocation; + type AccountIdToMultiLocation = AccountIdToMultiLocation; type Balance = Balance; type BaseXcmWeight = BaseXcmWeight; type CurrencyId = CurrencyId; diff --git a/runtime/centrifuge/Cargo.toml b/runtime/centrifuge/Cargo.toml index dd54f8e4cd..19a8a275c4 100644 --- a/runtime/centrifuge/Cargo.toml +++ b/runtime/centrifuge/Cargo.toml @@ -28,6 +28,7 @@ sp-io = { workspace = true } sp-offchain = { workspace = true } sp-runtime = { workspace = true } sp-session = { workspace = true } +sp-staking = { workspace = true } sp-std = { workspace = true } sp-transaction-pool = { workspace = true } sp-version = { workspace = true } @@ -46,12 +47,12 @@ cumulus-primitives-timestamp = { workspace = true } cumulus-primitives-utility = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } -polkadot-parachain = { workspace = true } +polkadot-parachain-primitives = { workspace = true } polkadot-runtime-common = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } +staging-xcm = { workspace = true } +staging-xcm-builder = { workspace = true } +staging-xcm-executor = { workspace = true } xcm-primitives = { workspace = true } orml-traits = { workspace = true } @@ -60,8 +61,6 @@ orml-xcm-support = { workspace = true } fp-rpc = { workspace = true } fp-self-contained = { workspace = true } -moonbeam-relay-encoder = { workspace = true } - # Locals cfg-primitives = { workspace = true } cfg-traits = { workspace = true } @@ -167,6 +166,7 @@ std = [ "sp-std/std", "sp-transaction-pool/std", "sp-version/std", + "sp-staking/std", "frame-support/std", "frame-system/std", "frame-system-rpc-runtime-api/std", @@ -178,18 +178,17 @@ std = [ "cumulus-primitives-timestamp/std", "cumulus-primitives-utility/std", "cumulus-pallet-session-benchmarking?/std", - "xcm/std", - "xcm-builder/std", - "xcm-executor/std", + "staging-xcm/std", + "staging-xcm-builder/std", + "staging-xcm-executor/std", "xcm-primitives/std", "orml-traits/std", "orml-xcm-support/std", "fp-rpc/std", "fp-self-contained/std", - "moonbeam-relay-encoder/std", "pallet-transaction-payment-rpc-runtime-api/std", "polkadot-runtime-common/std", - "polkadot-parachain/std", + "polkadot-parachain-primitives/std", # Locals "cfg-primitives/std", @@ -278,13 +277,14 @@ runtime-benchmarks = [ # Substrate related "sp-runtime/runtime-benchmarks", + "sp-staking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", - "xcm-executor/runtime-benchmarks", + "staging-xcm-builder/runtime-benchmarks", + "staging-xcm-executor/runtime-benchmarks", "xcm-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", - "polkadot-parachain/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", # Locals "cfg-primitives/runtime-benchmarks", diff --git a/runtime/centrifuge/src/lib.rs b/runtime/centrifuge/src/lib.rs index 97b76da7c7..722a5174be 100644 --- a/runtime/centrifuge/src/lib.rs +++ b/runtime/centrifuge/src/lib.rs @@ -14,8 +14,8 @@ //! Wasm. #![cfg_attr(not(feature = "std"), no_std)] -// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. -#![recursion_limit = "256"] +// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 512. +#![recursion_limit = "512"] // Allow things like `1 * CFG` #![allow(clippy::identity_op)] @@ -24,17 +24,16 @@ use cfg_primitives::{ liquidity_pools::GeneralCurrencyPrefix, types::{ AccountId, Address, AllOfCouncil, AuraId, Balance, BlockNumber, CollectionId, - CouncilCollective, EnsureRootOr, HalfOfCouncil, Hash, Hashing, Header, IBalance, Index, - ItemId, LoanId, OrderId, OutboundMessageNonce, PalletIndex, PoolEpochId, PoolFeeId, PoolId, + CouncilCollective, EnsureRootOr, HalfOfCouncil, Hash, Hashing, Header, IBalance, ItemId, + LoanId, Nonce, OrderId, OutboundMessageNonce, PalletIndex, PoolEpochId, PoolFeeId, PoolId, Signature, ThreeFourthOfCouncil, TrancheId, TrancheWeight, TwoThirdOfCouncil, }, }; use cfg_traits::{ investments::{OrderManager, TrancheCurrency as _}, - Millis, Permissions as PermissionsT, PoolUpdateGuard, PreConditions, Seconds, TryConvert, + Millis, Permissions as PermissionsT, PoolUpdateGuard, PreConditions, Seconds, }; use cfg_types::{ - consts::pools::{MaxTrancheNameLengthBytes, MaxTrancheSymbolLengthBytes}, fee_keys::{Fee, FeeKey}, fixed_point::{Quantity, Rate, Ratio}, investments::InvestmentPortfolio, @@ -43,26 +42,25 @@ use cfg_types::{ PermissionRoles, PermissionScope, PermissionedCurrencyRole, PoolRole, Role, UNION, }, time::TimeProvider, - tokens::{CurrencyId, CustomMetadata, StakingCurrency, TrancheCurrency}, + tokens::{AssetStringLimit, CurrencyId, CustomMetadata, StakingCurrency, TrancheCurrency}, }; use cumulus_primitives_core::{MultiAsset, MultiLocation}; use fp_rpc::TransactionStatus; use frame_support::{ construct_runtime, dispatch::DispatchClass, - pallet_prelude::{DispatchError, DispatchResult}, + pallet_prelude::{DispatchError, DispatchResult, RuntimeDebug}, parameter_types, - sp_std::marker::PhantomData, traits::{ - AsEnsureOriginWithArg, ConstU32, ConstU64, Contains, EitherOfDiverse, EqualPrivilegeOnly, - Get, InstanceFilter, LockIdentifier, OnFinalize, PalletInfoAccess, U128CurrencyToVote, + AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, Contains, EitherOfDiverse, + EqualPrivilegeOnly, Get, InstanceFilter, LockIdentifier, OnFinalize, PalletInfoAccess, UnixTime, WithdrawReasons, }, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}, ConstantMultiplier, Weight, }, - PalletId, RuntimeDebug, + PalletId, }; use frame_system::{ limits::{BlockLength, BlockWeights}, @@ -93,14 +91,14 @@ use pallet_transaction_payment_rpc_runtime_api::{FeeDetails, RuntimeDispatchInfo use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use polkadot_runtime_common::{prod_or_fast, BlockHashCount, SlowAdjustingFeeUpdate}; use runtime_common::{ - account_conversion::AccountConverter, + account_conversion::{AccountConverter, RuntimeAccountConverter}, asset_registry, evm::{ precompile::Precompiles, BaseFeeThreshold, FindAuthorTruncated, GAS_LIMIT_POV_SIZE_RATIO, GAS_LIMIT_STORAGE_GROWTH_RATIO, WEIGHT_PER_GAS, }, fees::{DealWithFees, FeeToTreasury, WeightToFee}, - gateway::GatewayAccountProvider, + gateway, liquidity_pools::LiquidityPoolsMessage, oracle::{ Feeder, OracleConverterBridge, OracleRatioProvider, OracleRatioProviderLocalAssetExtension, @@ -125,10 +123,11 @@ use sp_runtime::{ transaction_validity::{TransactionSource, TransactionValidity, TransactionValidityError}, ApplyExtrinsicResult, FixedI128, Perbill, Permill, Perquintill, }; -use sp_std::prelude::*; +use sp_staking::currency_to_vote::U128CurrencyToVote; +use sp_std::{marker::PhantomData, prelude::*}; use sp_version::RuntimeVersion; +use staging_xcm_executor::XcmExecutor; use static_assertions::const_assert; -use xcm_executor::XcmExecutor; use crate::xcm::*; @@ -206,26 +205,24 @@ impl frame_system::Config for Runtime { /// The identifier used to distinguish between accounts. type AccountId = AccountId; type BaseCallFilter = BaseCallFilter; + /// The block type. + type Block = Block; /// Maximum number of block number to block hash mappings to keep (oldest /// pruned first). type BlockHashCount = BlockHashCount; type BlockLength = RuntimeBlockLength; - /// The index type for blocks. - type BlockNumber = BlockNumber; type BlockWeights = RuntimeBlockWeights; type DbWeight = RocksDbWeight; /// The type for hashing blocks and tries. type Hash = Hash; /// The hashing algorithm used. type Hashing = Hashing; - /// The header type. - type Header = Header; - /// The index type for storing how many extrinsics an account has signed. - type Index = Index; /// The lookup mechanism to get account ID from whatever is passed in /// dispatchers. type Lookup = sp_runtime::traits::AccountIdLookup; type MaxConsumers = frame_support::traits::ConstU32<16>; + /// The nonce type for storing how many extrinsics an account has signed. + type Nonce = Nonce; /// A function that is invoked when an account has been determined to be /// dead. All resources should be cleaned up associated with the given /// account. @@ -426,6 +423,7 @@ impl orml_asset_registry::Config for Runtime { type Balance = Balance; type CustomMetadata = CustomMetadata; type RuntimeEvent = RuntimeEvent; + type StringLimit = AssetStringLimit; // NOTE: Need no weights as spamming is not possible as the // calls are only callable by `AuthorityOrigin`. In our // case, pallet-pools and democracy @@ -481,7 +479,6 @@ impl pallet_balances::Config for Runtime { /// The minimum amount required to keep an account open. type ExistentialDeposit = ExistentialDeposit; type FreezeIdentifier = (); - type HoldIdentifier = (); type MaxFreezes = ConstU32<10>; type MaxHolds = ConstU32<10>; type MaxLocks = MaxLocks; @@ -489,6 +486,7 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; /// The overarching event type. type RuntimeEvent = RuntimeEvent; + type RuntimeHoldReason = (); type WeightInfo = weights::pallet_balances::WeightInfo; } @@ -527,6 +525,7 @@ parameter_types! { } impl pallet_aura::Config for Runtime { + type AllowMultipleBlocksPerSlot = ConstBool; type AuthorityId = AuraId; type DisabledValidators = (); type MaxAuthorities = MaxAuthorities; @@ -1165,7 +1164,7 @@ parameter_types! { pub const PotId: PalletId = cfg_types::ids::STAKE_POT_PALLET_ID; #[derive(scale_info::TypeInfo, Debug, PartialEq, Eq, Clone)] pub const MaxCandidates: u32 = 20; - pub const MinCandidates: u32 = 5; + pub const MinEligibleCollators: u32 = 5; pub const SessionLength: BlockNumber = 6 * HOURS; pub const MaxInvulnerables: u32 = 100; } @@ -1177,7 +1176,7 @@ impl pallet_collator_selection::Config for Runtime { type KickThreshold = Period; type MaxCandidates = MaxCandidates; type MaxInvulnerables = MaxInvulnerables; - type MinCandidates = MinCandidates; + type MinEligibleCollators = MinEligibleCollators; type PotId = PotId; type RuntimeEvent = RuntimeEvent; type UpdateOrigin = EnsureRootOr; @@ -1188,7 +1187,8 @@ impl pallet_collator_selection::Config for Runtime { } /// Xcm Weigher shared between multiple Xcm-related configs. -pub type XcmWeigher = xcm_builder::FixedWeightBounds; +pub type XcmWeigher = + staging_xcm_builder::FixedWeightBounds; parameter_types! { // 1 DOT, which has 10 decimals, should be enough to cover for fees opening/accepting hrmp channels. @@ -1196,16 +1196,15 @@ parameter_types! { } impl pallet_xcm_transactor::Config for Runtime { - type AccountIdToMultiLocation = AccountIdToMultiLocation; + type AccountIdToMultiLocation = AccountIdToMultiLocation; type AssetTransactor = FungiblesTransactor; type Balance = Balance; type BaseXcmWeight = BaseXcmWeight; type CurrencyId = CurrencyId; type CurrencyIdToMultiLocation = CurrencyIdConvert; type DerivativeAddressRegistrationOrigin = EnsureRootOr; - type HrmpEncoder = moonbeam_relay_encoder::polkadot::PolkadotEncoder; type HrmpManipulatorOrigin = EnsureRootOr; - type MaxHrmpFee = xcm_builder::Case; + type MaxHrmpFee = staging_xcm_builder::Case; type ReserveProvider = xcm_primitives::AbsoluteAndRelativeReserve; type RuntimeEvent = RuntimeEvent; type SelfLocation = SelfLocation; @@ -1396,12 +1395,7 @@ impl PoolUpdateGuard for UpdateGuard { PoolId, MaxTranches, >; - type ScheduledUpdateDetails = ScheduledUpdateDetails< - Rate, - MaxTrancheNameLengthBytes, - MaxTrancheSymbolLengthBytes, - MaxTranches, - >; + type ScheduledUpdateDetails = ScheduledUpdateDetails; fn released( pool: &Self::PoolDetails, @@ -1455,8 +1449,6 @@ impl pallet_pool_registry::Config for Runtime { type CurrencyId = CurrencyId; type InterestRate = Rate; type MaxSizeMetadata = MaxSizeMetadata; - type MaxTokenNameLength = MaxTrancheNameLengthBytes; - type MaxTokenSymbolLength = MaxTrancheSymbolLengthBytes; type MaxTranches = MaxTranches; type ModifyPool = pallet_pool_system::Pallet; type ModifyWriteOffPolicy = pallet_loans::Pallet; @@ -1483,8 +1475,6 @@ impl pallet_pool_system::Config for Runtime { type EpochId = PoolEpochId; type Investments = Investments; type MaxNAVAgeUpperBound = MaxNAVAgeUpperBound; - type MaxTokenNameLength = MaxTrancheNameLengthBytes; - type MaxTokenSymbolLength = MaxTrancheSymbolLengthBytes; type MaxTranches = MaxTranches; type MinEpochTimeLowerBound = MinEpochTimeLowerBound; type MinEpochTimeUpperBound = MinEpochTimeUpperBound; @@ -1502,6 +1492,7 @@ impl pallet_pool_system::Config for Runtime { type Rate = Rate; type RuntimeChange = runtime_common::changes::RuntimeChange; type RuntimeEvent = RuntimeEvent; + type StringLimit = AssetStringLimit; type Time = Timestamp; type Tokens = Tokens; type TrancheCurrency = TrancheCurrency; @@ -1865,8 +1856,8 @@ impl pallet_liquidity_pools::Config for Runtime { type Balance = Balance; type BalanceRatio = Ratio; type CurrencyId = CurrencyId; - type DomainAccountToAccountId = AccountConverter; - type DomainAddressToAccountId = AccountConverter; + type DomainAccountToAccountId = AccountConverter; + type DomainAddressToAccountId = AccountConverter; type ForeignInvestment = ForeignInvestments; type GeneralCurrencyPrefix = GeneralCurrencyPrefix; type OutboundQueue = LiquidityPoolsGateway; @@ -1886,7 +1877,7 @@ impl pallet_liquidity_pools::Config for Runtime { parameter_types! { pub const MaxIncomingMessageSize: u32 = 1024; - pub Sender: AccountId = GatewayAccountProvider::::get_gateway_account(); + pub Sender: AccountId = gateway::get_gateway_account::(); } parameter_types! { @@ -1972,7 +1963,7 @@ parameter_types! { } impl pallet_evm::Config for Runtime { - type AddressMapping = AccountConverter; + type AddressMapping = RuntimeAccountConverter; type BlockGasLimit = BlockGasLimit; type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping; type CallOrigin = EnsureAddressRoot; @@ -2068,16 +2059,12 @@ pub type Executive = frame_executive::Executive< // Any addition should be done at the bottom // Any deletion affects the following frames during runtime upgrades construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = cfg_primitives::Block, - UncheckedExtrinsic = UncheckedExtrinsic - { + pub enum Runtime { // basic system stuff - System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, - ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event} = 1, + System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, + ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event} = 1, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 4, + ParachainInfo: parachain_info::{Pallet, Storage, Config} = 4, // money stuff Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 20, @@ -2089,7 +2076,7 @@ construct_runtime!( Authorship: pallet_authorship::{Pallet, Storage} = 30, Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 31, Aura: pallet_aura::{Pallet, Storage, Config} = 32, - AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 33, + AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 33, // substrate pallets Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 60, @@ -2102,7 +2089,7 @@ construct_runtime!( Identity: pallet_identity::{Pallet, Call, Storage, Event} = 67, Vesting: pallet_vesting::{Pallet, Call, Storage, Event, Config} = 68, Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 69, - Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 70, + Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 70, // our pallets Fees: pallet_fees::{Pallet, Call, Storage, Config, Event} = 90, @@ -2132,7 +2119,7 @@ construct_runtime!( // XCM XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 120, - PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Config, Event, Origin} = 121, + PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Config, Event, Origin} = 121, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 122, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 123, XTokens: pallet_restricted_xtokens::{Pallet, Call} = 124, @@ -2146,10 +2133,10 @@ construct_runtime!( OrmlXcm: orml_xcm::{Pallet, Storage, Call, Event} = 153, // EVM pallets - EVM: pallet_evm::{Pallet, Config, Call, Storage, Event} = 160, - EVMChainId: pallet_evm_chain_id::{Pallet, Config, Storage} = 161, + EVM: pallet_evm::{Pallet, Config, Call, Storage, Event} = 160, + EVMChainId: pallet_evm_chain_id::{Pallet, Config, Storage} = 161, BaseFee: pallet_base_fee::{Pallet, Call, Config, Storage, Event} = 162, - Ethereum: pallet_ethereum::{Pallet, Config, Call, Storage, Event, Origin} = 163, + Ethereum: pallet_ethereum::{Pallet, Config, Call, Storage, Event, Origin} = 163, EthereumTransaction: pallet_ethereum_transaction::{Pallet, Storage} = 164, LiquidityPoolsAxelarGateway: axelar_gateway_precompile::{Pallet, Call, Storage, Event} = 165, @@ -2289,8 +2276,8 @@ impl_runtime_apis! { } } - impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { - fn account_nonce(account: AccountId) -> Index { + impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { + fn account_nonce(account: AccountId) -> Nonce { System::account_nonce(account) } } @@ -2433,8 +2420,8 @@ impl_runtime_apis! { // AccountConversionApi impl runtime_common::apis::AccountConversionApi for Runtime { - fn conversion_of(location: ::xcm::v3::MultiLocation) -> Option { - AccountConverter::::try_convert(location).ok() + fn conversion_of(location: MultiLocation) -> Option { + AccountConverter::location_to_account::(location) } } @@ -2662,21 +2649,25 @@ impl_runtime_apis! { fn gas_limit_multiplier_support() {} fn pending_block( - xts: Vec<::Extrinsic> - ) -> ( - Option, Option> - ) { - for ext in xts.into_iter() { - let _ = Executive::apply_extrinsic(ext); - } + xts: Vec<::Extrinsic> + ) -> ( + Option, Option> + ) { + for ext in xts.into_iter() { + let _ = Executive::apply_extrinsic(ext); + } - Ethereum::on_finalize(System::block_number() + 1); + Ethereum::on_finalize(System::block_number() + 1); - ( - pallet_ethereum::CurrentBlock::::get(), - pallet_ethereum::CurrentTransactionStatuses::::get() - ) - } + ( + pallet_ethereum::CurrentBlock::::get(), + pallet_ethereum::CurrentTransactionStatuses::::get() + ) + } + + fn initialize_pending_block(header: &::Header) { + Executive::initialize_block(header) + } } impl fp_rpc::ConvertTransactionRuntimeApi for Runtime { @@ -2752,8 +2743,9 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString>{ - use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey, add_benchmark}; + use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark}; use frame_system_benchmarking::Pallet as SystemBench; + use frame_support::traits::TrackedStorageKey; use cumulus_pallet_session_benchmarking::Pallet as SessionBench; impl frame_system_benchmarking::Config for Runtime {} diff --git a/runtime/centrifuge/src/liquidity_pools.rs b/runtime/centrifuge/src/liquidity_pools.rs index 03b5fbed38..066fd0cd0b 100644 --- a/runtime/centrifuge/src/liquidity_pools.rs +++ b/runtime/centrifuge/src/liquidity_pools.rs @@ -23,9 +23,8 @@ use pallet_liquidity_pools::hooks::{ CollectedForeignInvestmentHook, CollectedForeignRedemptionHook, DecreasedForeignInvestOrderHook, }; use runtime_common::{ - account_conversion::AccountConverter, gateway::GatewayAccountProvider, - liquidity_pools::LiquidityPoolsMessage, origin::EnsureAccountOrRootOr, - transfer_filter::PreLpTransfer, + account_conversion::AccountConverter, gateway, liquidity_pools::LiquidityPoolsMessage, + origin::EnsureAccountOrRootOr, transfer_filter::PreLpTransfer, }; use crate::{ @@ -82,7 +81,7 @@ impl pallet_liquidity_pools::Config for Runtime { parameter_types! { pub const MaxIncomingMessageSize: u32 = 1024; - pub Sender: AccountId = GatewayAccountProvider::::get_gateway_account(); + pub Sender: AccountId = gateway::get_gateway_account::(); } parameter_types! { diff --git a/runtime/centrifuge/src/migrations.rs b/runtime/centrifuge/src/migrations.rs index 162fa93d4d..ae20500a12 100644 --- a/runtime/centrifuge/src/migrations.rs +++ b/runtime/centrifuge/src/migrations.rs @@ -17,4 +17,5 @@ use crate::{OraclePriceCollection, OraclePriceFeed}; pub type UpgradeCentrifuge1029 = ( runtime_common::migrations::increase_storage_version::Migration, runtime_common::migrations::increase_storage_version::Migration, + pallet_collator_selection::migration::v1::MigrateToV1, ); diff --git a/runtime/centrifuge/src/weights/pallet_collator_selection.rs b/runtime/centrifuge/src/weights/pallet_collator_selection.rs index d18b6c3ff6..1cb4a90819 100644 --- a/runtime/centrifuge/src/weights/pallet_collator_selection.rs +++ b/runtime/centrifuge/src/weights/pallet_collator_selection.rs @@ -168,4 +168,14 @@ impl pallet_collator_selection::WeightInfo for WeightIn .saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into())) .saturating_add(Weight::from_parts(0, 2259).saturating_mul(r.into())) } + + fn add_invulnerable(_: u32, _: u32) -> Weight { + // Pending to generate + Weight::default() + } + + fn remove_invulnerable(_: u32) -> Weight { + // Pending to generate + Weight::default() + } } diff --git a/runtime/centrifuge/src/xcm.rs b/runtime/centrifuge/src/xcm.rs index aecb26043b..8935f1c5e1 100644 --- a/runtime/centrifuge/src/xcm.rs +++ b/runtime/centrifuge/src/xcm.rs @@ -34,16 +34,16 @@ use runtime_common::{ xcm_fees::native_per_second, }; use sp_core::ConstU32; -use xcm::{ +use staging_xcm::{ prelude::*, v3::{MultiLocation, Weight as XcmWeight}, }; -use xcm_builder::{ +use staging_xcm_builder::{ ConvertedConcreteId, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, FungiblesAdapter, NoChecking, RelayChainAsNative, SiblingParachainAsNative, SignedAccountId32AsNative, SovereignSignedViaLocation, }; -use xcm_executor::{traits::JustTry, XcmExecutor}; +use staging_xcm_executor::{traits::JustTry, XcmExecutor}; use super::{ AccountId, Balance, OrmlAssetRegistry, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, @@ -86,7 +86,8 @@ impl frame_support::traits::Contains for SafeCallFilter { /// transferred, how fees are calculated, what barriers we impose on incoming /// XCM messages, etc. pub struct XcmConfig; -impl xcm_executor::Config for XcmConfig { +impl staging_xcm_executor::Config for XcmConfig { + type Aliasers = Nothing; type AssetClaims = PolkadotXcm; type AssetExchanger = (); type AssetLocker = (); @@ -278,7 +279,7 @@ parameter_type_with_key! { } impl orml_xtokens::Config for Runtime { - type AccountIdToMultiLocation = AccountIdToMultiLocation; + type AccountIdToMultiLocation = AccountIdToMultiLocation; type Balance = Balance; type BaseXcmWeight = BaseXcmWeight; type CurrencyId = CurrencyId; diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 6fdb117339..471c799026 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -27,10 +27,10 @@ sp-io = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } -polkadot-parachain = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } +polkadot-parachain-primitives = { workspace = true } +staging-xcm = { workspace = true } +staging-xcm-builder = { workspace = true } +staging-xcm-executor = { workspace = true } orml-traits = { workspace = true } @@ -151,6 +151,7 @@ std = [ "pallet-evm-precompile-modexp/std", "pallet-evm-precompile-sha3fips/std", "pallet-evm-precompile-simple/std", + "precompile-utils/std", "pallet-evm/std", "pallet-investments/std", "pallet-liquidity-pools-gateway/std", @@ -160,7 +161,7 @@ std = [ "pallet-restricted-tokens/std", "pallet-treasury/std", "parachain-info/std", - "polkadot-parachain/std", + "polkadot-parachain-primitives/std", "scale-info/std", "serde/std", "sp-api/std", @@ -170,10 +171,10 @@ std = [ "sp-io/std", "sp-runtime/std", "sp-std/std", - "xcm-executor/std", + "staging-xcm-executor/std", "xcm-primitives/std", - "xcm-builder/std", - "xcm/std", + "staging-xcm-builder/std", + "staging-xcm/std", # Locals "cfg-primitives/std", @@ -256,11 +257,11 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", - "frame-benchmarking/runtime-benchmarks", # Optional enabled - "xcm-executor/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", # Optional enabled + "staging-xcm-executor/runtime-benchmarks", "xcm-primitives/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", - "polkadot-parachain/runtime-benchmarks", + "staging-xcm-builder/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", # Locals "cfg-primitives/runtime-benchmarks", @@ -313,6 +314,7 @@ runtime-benchmarks = [ "pallet-preimage/runtime-benchmarks", "pallet-proxy/runtime-benchmarks", "pallet-restricted-tokens/runtime-benchmarks", + "pallet-restricted-xtokens/runtime-benchmarks", "pallet-rewards/runtime-benchmarks", "pallet-remarks/runtime-benchmarks", "pallet-scheduler/runtime-benchmarks", diff --git a/runtime/common/src/account_conversion.rs b/runtime/common/src/account_conversion.rs index 92f560ddcc..99061a6073 100644 --- a/runtime/common/src/account_conversion.rs +++ b/runtime/common/src/account_conversion.rs @@ -11,18 +11,18 @@ // GNU General Public License for more details. use cfg_primitives::AccountId; -use cfg_traits::TryConvert; use cfg_types::domain_address::{Domain, DomainAddress}; use pallet_evm::AddressMapping; use sp_core::{Get, H160}; use sp_runtime::traits::Convert; -use xcm::*; +use staging_xcm::v3; +use staging_xcm_executor::traits::ConvertLocation; /// Common converter code for translating accounts across different /// domains and chains. -pub struct AccountConverter(core::marker::PhantomData<(R, XcmConverter)>); +pub struct AccountConverter; -impl AccountConverter { +impl AccountConverter { /// Converts an EVM address from a given chain into a local AccountId pub fn convert_evm_address(chain_id: u64, address: [u8; 20]) -> AccountId { // We use a custom encoding here rather than relying on @@ -38,21 +38,37 @@ impl AccountConverter { bytes[28..31].copy_from_slice(tag); AccountId::new(bytes) } -} -// Implement EVM account conversion using our shared conversion code -impl AddressMapping for AccountConverter -where - R: pallet_evm_chain_id::Config, -{ - fn into_account_id(address: H160) -> AccountId { + pub fn location_to_account>( + location: v3::MultiLocation, + ) -> Option { + // Try xcm logic first + match XcmConverter::convert_location(&location) { + Some(acc) => Some(acc), + None => { + // match EVM logic + match location { + v3::MultiLocation { + parents: 0, + interior: + v3::Junctions::X1(v3::Junction::AccountKey20 { + network: Some(v3::NetworkId::Ethereum { chain_id }), + key, + }), + } => Some(Self::convert_evm_address(chain_id, key)), + _ => None, + } + } + } + } + + pub fn into_account_id(address: H160) -> AccountId { let chain_id = pallet_evm_chain_id::Pallet::::get(); Self::convert_evm_address(chain_id, address.0) } } -// Implement liquidityPools account conversion using our shared conversion code -impl Convert for AccountConverter { +impl Convert for AccountConverter { fn convert(domain_address: DomainAddress) -> AccountId { match domain_address { DomainAddress::Centrifuge(addr) => AccountId::new(addr), @@ -61,7 +77,7 @@ impl Convert for AccountConverter Convert<(Domain, [u8; 32]), AccountId> for AccountConverter { +impl Convert<(Domain, [u8; 32]), AccountId> for AccountConverter { fn convert((domain, account): (Domain, [u8; 32])) -> AccountId { match domain { Domain::Centrifuge => AccountId::new(account), @@ -75,31 +91,14 @@ impl Convert<(Domain, [u8; 32]), AccountId> for AccountConverte } } -impl TryConvert for AccountConverter -where - XcmConverter: xcm_executor::traits::Convert, -{ - type Error = v3::MultiLocation; +// A type that use AccountConverter to carry along with it the Runtime type and +// offer an `AddressMapping` implementation. +// Required by `pallet_evm` +pub struct RuntimeAccountConverter(sp_std::marker::PhantomData); - fn try_convert(location: v3::MultiLocation) -> Result { - // Try xcm logic first - match XcmConverter::convert_ref(location).ok() { - Some(acc) => Ok(acc), - None => { - // match EVM logic - match location { - v3::MultiLocation { - parents: 0, - interior: - v3::Junctions::X1(v3::Junction::AccountKey20 { - network: Some(v3::NetworkId::Ethereum { chain_id }), - key, - }), - } => Ok(Self::convert_evm_address(chain_id, key)), - _ => Err(location), - } - } - } +impl AddressMapping for RuntimeAccountConverter { + fn into_account_id(address: H160) -> AccountId { + AccountConverter::into_account_id::(address) } } @@ -114,7 +113,7 @@ mod tests { let address = [0x42; 20]; let chain_id = 0xDADB0D; let domain_address = DomainAddress::EVM(chain_id, address); - let account: AccountId = AccountConverter::<(), ()>::convert(domain_address); + let account: AccountId = AccountConverter::convert(domain_address); let expected = AccountId::new(hex![ "42424242424242424242424242424242424242420000000000DADB0D45564d00" ]); @@ -127,7 +126,7 @@ mod tests { let address = [0x42; 32]; let expected = AccountId::new(address); let domain_address = DomainAddress::Centrifuge(address); - let account: AccountId = AccountConverter::<(), ()>::convert(domain_address); + let account: AccountId = AccountConverter::convert(domain_address); assert_eq!(account, expected); } diff --git a/runtime/common/src/apis/account_conversion.rs b/runtime/common/src/apis/account_conversion.rs index 7f075f7555..4f9557f24b 100644 --- a/runtime/common/src/apis/account_conversion.rs +++ b/runtime/common/src/apis/account_conversion.rs @@ -11,7 +11,7 @@ // GNU General Public License for more details. use parity_scale_codec::Codec; use sp_api::decl_runtime_apis; -use xcm::v3::MultiLocation; +use staging_xcm::v3::MultiLocation; decl_runtime_apis! { /// Runtime Api for the pallet-anchors, to be implemented diff --git a/runtime/common/src/changes.rs b/runtime/common/src/changes.rs index 45e4c2f71f..c777e81247 100644 --- a/runtime/common/src/changes.rs +++ b/runtime/common/src/changes.rs @@ -1,4 +1,4 @@ -use frame_support::RuntimeDebug; +use frame_support::pallet_prelude::RuntimeDebug; use pallet_loans::entities::changes::Change as LoansChange; use pallet_oracle_collection::types::Change as OracleCollectionChange; use pallet_pool_fees::types::Change as PoolFeesChange; diff --git a/runtime/common/src/fees.rs b/runtime/common/src/fees.rs index d03ce93d4d..6a951a1087 100644 --- a/runtime/common/src/fees.rs +++ b/runtime/common/src/fees.rs @@ -142,36 +142,24 @@ mod test { use cfg_primitives::{AccountId, TREASURY_FEE_RATIO}; use cfg_types::ids::TREASURY_PALLET_ID; use frame_support::{ - parameter_types, + derive_impl, parameter_types, traits::{Currency, FindAuthor}, PalletId, }; - use sp_core::{ConstU64, H256}; - use sp_io::TestExternalities; - use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, - Perbill, - }; + use sp_core::ConstU64; + use sp_runtime::{traits::IdentityLookup, Perbill}; use sp_std::convert::{TryFrom, TryInto}; use super::*; - type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; - type Block = frame_system::mocking::MockBlock; - const TEST_ACCOUNT: AccountId = AccountId::new([1; 32]); frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Authorship: pallet_authorship::{Pallet, Storage}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event}, + pub enum Runtime { + System: frame_system, + Authorship: pallet_authorship, + Balances: pallet_balances, + Treasury: pallet_treasury, } ); @@ -179,47 +167,20 @@ mod test { pub const BlockHashCount: u64 = 250; } + #[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; type AccountId = AccountId; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = BlockHashCount; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; + type Block = frame_system::mocking::MockBlock; type Lookup = IdentityLookup; - type MaxConsumers = frame_support::traits::ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = (); - type SystemWeightInfo = (); - type Version = (); } + #[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for Runtime { type AccountStore = System; - type Balance = u64; type DustRemoval = (); type ExistentialDeposit = ConstU64<1>; - type FreezeIdentifier = (); - type HoldIdentifier = (); - type MaxFreezes = (); - type MaxHolds = frame_support::traits::ConstU32<1>; - type MaxLocks = (); - type MaxReserves = (); - type ReserveIdentifier = [u8; 8]; - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); + type RuntimeHoldReason = (); } parameter_types! { @@ -260,21 +221,9 @@ mod test { type FindAuthor = OneAuthor; } - fn new_test_ext() -> TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap(); - - pallet_balances::GenesisConfig::::default() - .assimilate_storage(&mut t) - .unwrap(); - - TestExternalities::new(t) - } - #[test] fn test_fees_and_tip_split() { - new_test_ext().execute_with(|| { + System::externalities().execute_with(|| { const FEE: u64 = 10; const TIP: u64 = 20; diff --git a/runtime/common/src/gateway.rs b/runtime/common/src/gateway.rs index b82249b63a..b46a87f27d 100644 --- a/runtime/common/src/gateway.rs +++ b/runtime/common/src/gateway.rs @@ -11,27 +11,18 @@ // GNU General Public License for more details. use cfg_primitives::AccountId; -use pallet_evm::AddressMapping; -use polkadot_parachain::primitives::Sibling; +use polkadot_parachain_primitives::primitives::Sibling; use sp_core::{crypto::AccountId32, Get, H160}; use sp_runtime::traits::AccountIdConversion; use crate::account_conversion::AccountConverter; -pub struct GatewayAccountProvider(core::marker::PhantomData<(T, XcmConverter)>); +pub fn get_gateway_account() -> AccountId { + let sender_account: AccountId = + Sibling::from(parachain_info::Pallet::::get()).into_account_truncating(); -impl GatewayAccountProvider -where - T: pallet_evm_chain_id::Config + parachain_info::Config, - XcmConverter: xcm_executor::traits::Convert, -{ - pub fn get_gateway_account() -> AccountId { - let sender_account: AccountId = - Sibling::from(parachain_info::Pallet::::get()).into_account_truncating(); + let truncated_sender_account = + H160::from_slice(&>::as_ref(&sender_account)[0..20]); - let truncated_sender_account = - H160::from_slice(&>::as_ref(&sender_account)[0..20]); - - AccountConverter::::into_account_id(truncated_sender_account) - } + AccountConverter::into_account_id::(truncated_sender_account) } diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 42fcad4e8d..13b36f9310 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -192,28 +192,28 @@ pub mod xcm_fees { /// AssetRegistry's AssetProcessor pub mod asset_registry { - use cfg_primitives::types::{AccountId, Balance}; - use cfg_types::tokens::{CurrencyId, CustomMetadata}; + use cfg_primitives::types::AccountId; + use cfg_types::tokens::{AssetMetadata, CurrencyId}; use frame_support::{ dispatch::RawOrigin, - sp_std::marker::PhantomData, traits::{EnsureOrigin, EnsureOriginWithArg}, }; - use orml_traits::asset_registry::{AssetMetadata, AssetProcessor}; + use orml_traits::asset_registry::AssetProcessor; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_runtime::DispatchError; + use sp_std::marker::PhantomData; #[derive( Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Debug, Encode, Decode, TypeInfo, MaxEncodedLen, )] pub struct CustomAssetProcessor; - impl AssetProcessor> for CustomAssetProcessor { + impl AssetProcessor for CustomAssetProcessor { fn pre_register( id: Option, - metadata: AssetMetadata, - ) -> Result<(CurrencyId, AssetMetadata), DispatchError> { + metadata: AssetMetadata, + ) -> Result<(CurrencyId, AssetMetadata), DispatchError> { match id { Some(id) => Ok((id, metadata)), None => Err(DispatchError::Other("asset-registry: AssetId is required")), @@ -222,7 +222,7 @@ pub mod asset_registry { fn post_register( _id: CurrencyId, - _asset_metadata: AssetMetadata, + _asset_metadata: AssetMetadata, ) -> Result<(), DispatchError> { Ok(()) } @@ -455,7 +455,7 @@ pub mod xcm_transactor { } impl XcmTransact for NullTransactor { - fn destination(self) -> xcm::latest::MultiLocation { + fn destination(self) -> staging_xcm::latest::MultiLocation { Default::default() } } diff --git a/runtime/common/src/migrations/increase_storage_version.rs b/runtime/common/src/migrations/increase_storage_version.rs index 14e7899ebb..0d28d115d3 100644 --- a/runtime/common/src/migrations/increase_storage_version.rs +++ b/runtime/common/src/migrations/increase_storage_version.rs @@ -43,7 +43,7 @@ where P::current_storage_version().put::

(); RocksDbWeight::get().writes(1) } else { - log::error!( + log::warn!( "{LOG_PREFIX} Mismatching versions. Wanted to upgrade from \ {FROM_VERSION} to {TO_VERSION} but would instead upgrade from {:?} to {:?}", P::on_chain_storage_version(), @@ -55,18 +55,6 @@ where #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, sp_runtime::DispatchError> { - assert_eq!( - P::on_chain_storage_version(), - FROM_VERSION, - "Unexpected onchain version: Expected {FROM_VERSION:?}, received {:?}", - P::on_chain_storage_version(), - ); - assert_eq!( - P::current_storage_version(), - TO_VERSION, - "Unexpected upgrade version: Expected {TO_VERSION:?}, latest {:?}", - P::on_chain_storage_version(), - ); Ok(sp_std::vec![]) } @@ -102,7 +90,7 @@ where RocksDbWeight::get().writes(1) } else { - log::error!( + log::warn!( "{LOG_PREFIX} Mismatching versions. Wanted to upgrade from \ {FROM_VERSION} but on-chain version is {:?}", P::on_chain_storage_version(), @@ -113,12 +101,6 @@ where #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, sp_runtime::DispatchError> { - assert_eq!( - P::on_chain_storage_version(), - FROM_VERSION, - "Unexpected onchain version: Expected {FROM_VERSION:?}, received {:?}", - P::on_chain_storage_version(), - ); Ok(sp_std::vec![]) } diff --git a/runtime/common/src/migrations/nuke.rs b/runtime/common/src/migrations/nuke.rs index 360091a422..c781e2cc89 100644 --- a/runtime/common/src/migrations/nuke.rs +++ b/runtime/common/src/migrations/nuke.rs @@ -14,7 +14,7 @@ #[cfg(feature = "try-runtime")] use frame_support::ensure; use frame_support::{ - dispatch::GetStorageVersion, + pallet_prelude::GetStorageVersion, storage::unhashed, traits::{Get, OnRuntimeUpgrade, PalletInfoAccess, StorageVersion}, weights::{RuntimeDbWeight, Weight}, diff --git a/runtime/common/src/oracle.rs b/runtime/common/src/oracle.rs index 6045f0ceec..03941cef71 100644 --- a/runtime/common/src/oracle.rs +++ b/runtime/common/src/oracle.rs @@ -34,6 +34,9 @@ impl> Feeder { } } +// There is an issue with clippy in rust-1.78 that detect this as an error: +// https://github.com/rust-lang/rust-clippy/issues/12245 +#[allow(clippy::unconditional_recursion)] impl PartialEq for Feeder { fn eq(&self, other: &Self) -> bool { self.0.eq(&other.0) diff --git a/runtime/common/src/remarks.rs b/runtime/common/src/remarks.rs index f72838a52c..2197f627ac 100644 --- a/runtime/common/src/remarks.rs +++ b/runtime/common/src/remarks.rs @@ -11,9 +11,9 @@ // GNU General Public License for more details. use cfg_primitives::{LoanId, PoolId}; -use frame_support::{dispatch::TypeInfo, parameter_types, BoundedVec}; +use frame_support::{parameter_types, BoundedVec}; +use scale_info::TypeInfo; use sp_runtime::codec::{Decode, Encode}; -use sp_std::vec; parameter_types! { pub const IpfsHashLength: u32 = 64; @@ -34,6 +34,6 @@ pub enum Remark { impl Default for Remark { fn default() -> Self { - Remark::Named(BoundedVec::try_from(vec![]).unwrap()) + Remark::Named(BoundedVec::default()) } } diff --git a/runtime/common/src/transfer_filter.rs b/runtime/common/src/transfer_filter.rs index 13b3d1249c..c8a634e867 100644 --- a/runtime/common/src/transfer_filter.rs +++ b/runtime/common/src/transfer_filter.rs @@ -17,10 +17,11 @@ use cfg_types::{ locations::Location, tokens::{CurrencyId, FilterCurrency}, }; -use frame_support::{dispatch::TypeInfo, traits::IsSubType, RuntimeDebugNoBound}; +use frame_support::{traits::IsSubType, RuntimeDebugNoBound}; use pallet_restricted_tokens::TransferDetails; use pallet_restricted_xtokens::TransferEffects; use parity_scale_codec::{Decode, Encode}; +use scale_info::TypeInfo; use sp_core::Hasher; use sp_runtime::{ traits::{BlakeTwo256, Convert, DispatchInfoOf, SignedExtension, StaticLookup}, @@ -28,7 +29,8 @@ use sp_runtime::{ DispatchError, DispatchResult, TokenError, }; use sp_std::vec::Vec; -use xcm::v3::{MultiAsset, MultiLocation}; +use staging_xcm::v3::{MultiAsset, MultiLocation}; + pub struct PreXcmTransfer(sp_std::marker::PhantomData<(T, C)>); impl< diff --git a/runtime/common/src/xcm.rs b/runtime/common/src/xcm.rs index 4699dae850..dd838647b6 100644 --- a/runtime/common/src/xcm.rs +++ b/runtime/common/src/xcm.rs @@ -17,22 +17,22 @@ use cfg_types::{ tokens::{CrossChainTransferability, CurrencyId, CustomMetadata}, EVMChainId, ParaId, }; -use frame_support::{ - sp_std::marker::PhantomData, - traits::{fungibles::Mutate, Everything, Get}, -}; -use polkadot_parachain::primitives::Sibling; -use sp_runtime::traits::{AccountIdConversion, Convert, Zero}; -use xcm::v3::{ +use frame_support::traits::{fungibles::Mutate, Everything, Get}; +use frame_system::pallet_prelude::BlockNumberFor; +use polkadot_parachain_primitives::primitives::Sibling; +use sp_runtime::traits::{AccountIdConversion, Convert, MaybeEquivalence, Zero}; +use sp_std::marker::PhantomData; +use staging_xcm::v3::{ prelude::*, Junction::{AccountId32, AccountKey20, GeneralKey, Parachain}, Junctions::{X1, X2}, MultiAsset, MultiLocation, NetworkId, OriginKind, }; -use xcm_builder::{ +use staging_xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, ParentIsPreset, SiblingParachainConvertsVia, - SignedToAccountId32, TakeRevenue, TakeWeightCredit, + AllowTopLevelPaidExecutionFrom, DescribeAllTerminal, DescribeFamily, HashedDescription, + ParentIsPreset, SiblingParachainConvertsVia, SignedToAccountId32, TakeRevenue, + TakeWeightCredit, }; use crate::xcm_fees::default_per_second; @@ -63,7 +63,7 @@ impl< /// A utils function to un-bloat and simplify the instantiation of /// `GeneralKey` values -pub fn general_key(data: &[u8]) -> xcm::latest::Junction { +pub fn general_key(data: &[u8]) -> staging_xcm::latest::Junction { GeneralKey { length: data.len().min(32) as u8, data: cfg_utils::vec_to_fixed_array(data.to_vec()), @@ -71,11 +71,8 @@ pub fn general_key(data: &[u8]) -> xcm::latest::Junction { } /// How we convert an `[AccountId]` into an XCM MultiLocation -pub struct AccountIdToMultiLocation(PhantomData); -impl Convert for AccountIdToMultiLocation -where - AccountId: Into<[u8; 32]>, -{ +pub struct AccountIdToMultiLocation; +impl> Convert for AccountIdToMultiLocation { fn convert(account: AccountId) -> MultiLocation { X1(AccountId32 { network: None, @@ -87,7 +84,7 @@ where pub struct LpInstanceRelayer(PhantomData<(ParaAsEvmChain, Runtime)>); impl - xcm_executor::traits::ConvertOrigin<::RuntimeOrigin> + staging_xcm_executor::traits::ConvertOrigin<::RuntimeOrigin> for LpInstanceRelayer where ParaAsEvmChain: TryConvert, @@ -145,8 +142,7 @@ where { fn get() -> Option { Some(NetworkId::ByGenesis( - frame_system::BlockHash::::get(::BlockNumber::zero()) - .into(), + frame_system::BlockHash::::get(BlockNumberFor::::zero()).into(), )) } } @@ -158,54 +154,68 @@ where /// `MultiLocation`. pub struct CurrencyIdConvert(PhantomData); +impl MaybeEquivalence for CurrencyIdConvert +where + T: orml_asset_registry::Config + + parachain_info::Config, +{ + fn convert(location: &MultiLocation) -> Option { + let para_id = parachain_info::Pallet::::parachain_id(); + let unanchored_location = match location { + MultiLocation { + parents: 0, + interior, + } => MultiLocation { + parents: 1, + interior: interior + .pushed_front_with(Parachain(u32::from(para_id))) + .ok()?, + }, + x => *x, + }; + + orml_asset_registry::Pallet::::location_to_asset_id(unanchored_location) + } + + fn convert_back(id: &CurrencyId) -> Option { + orml_asset_registry::Pallet::::metadata(id) + .filter(|m| m.additional.transferability.includes_xcm()) + .and_then(|m| m.location) + .and_then(|l| l.try_into().ok()) + } +} + /// Convert our `CurrencyId` type into its `MultiLocation` representation. /// We use the `AssetRegistry` to lookup the associated `MultiLocation` for /// any given `CurrencyId`, while blocking tokens that are not Xcm-transferable. impl Convert> for CurrencyIdConvert where - T: orml_asset_registry::Config, + T: orml_asset_registry::Config + + parachain_info::Config, { fn convert(id: CurrencyId) -> Option { - orml_asset_registry::Pallet::::metadata(&id) - .filter(|m| m.additional.transferability.includes_xcm()) - .and_then(|m| m.location) - .and_then(|l| l.try_into().ok()) + >::convert_back(&id) } } /// Convert an incoming `MultiLocation` into a `CurrencyId` through a /// reverse-lookup using the AssetRegistry. In the registry, we register CFG -/// using its absolute, non-anchored MultliLocation so we need to unanchor the +/// using its absolute, non-anchored MultiLocation so we need to unanchor the /// input location for Centrifuge-native assets for that to work. -impl xcm_executor::traits::Convert for CurrencyIdConvert +impl Convert> for CurrencyIdConvert where T: orml_asset_registry::Config + parachain_info::Config, { - fn convert(location: MultiLocation) -> Result { - let para_id = parachain_info::Pallet::::parachain_id(); - let unanchored_location = match location { - MultiLocation { - parents: 0, - interior, - } => MultiLocation { - parents: 1, - interior: interior - .pushed_front_with(Parachain(u32::from(para_id))) - .map_err(|_| location)?, - }, - x => x, - }; - - orml_asset_registry::Pallet::::location_to_asset_id(unanchored_location).ok_or(location) + fn convert(location: MultiLocation) -> Option { + >::convert(&location) } } impl Convert> for CurrencyIdConvert where T: orml_asset_registry::Config - + parachain_info::Config - + pallet_restricted_tokens::Config, + + parachain_info::Config, { fn convert(asset: MultiAsset) -> Option { if let MultiAsset { @@ -213,7 +223,7 @@ where .. } = asset { - >::convert(location).ok() + >::convert(&location) } else { None } @@ -228,15 +238,13 @@ where + pallet_restricted_tokens::Config, { fn take_revenue(revenue: MultiAsset) { - use xcm_executor::traits::Convert; - if let MultiAsset { id: Concrete(location), fun: Fungible(amount), } = revenue { - if let Ok(currency_id) = - as Convert>::convert(location) + if let Some(currency_id) = + as MaybeEquivalence<_, _>>::convert(&location) { let treasury_account = cfg_types::ids::TREASURY_PALLET_ID.into_account_truncating(); let _ = pallet_restricted_tokens::Pallet::::mint_into( @@ -272,7 +280,7 @@ pub type LocationToAccountId = ( // Straight up local `AccountId32` origins just alias directly to `AccountId`. AccountId32Aliases, // Generate remote accounts according to polkadot standards - cfg_primitives::xcm::HashedDescriptionDescribeFamilyAllTerminal, + HashedDescription>, ); #[cfg(test)] @@ -282,37 +290,24 @@ mod test { RouterMock, }; use cfg_primitives::OutboundMessageNonce; - use frame_support::{assert_ok, traits::EnsureOrigin}; + use frame_support::{assert_ok, derive_impl, traits::EnsureOrigin}; use frame_system::EnsureRoot; use pallet_liquidity_pools_gateway::{EnsureLocal, GatewayOrigin}; - use sp_core::{ConstU16, ConstU32, ConstU64, H256}; - use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, - DispatchError, - }; - use xcm_executor::traits::ConvertOrigin; + use sp_core::{ConstU32, ConstU64}; + use sp_runtime::DispatchError; + use staging_xcm_executor::traits::ConvertOrigin; use super::*; - type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; - type Block = frame_system::mocking::MockBlock; type AccountId = u64; pub fn new_test_ext() -> sp_io::TestExternalities { - frame_system::GenesisConfig::default() - .build_storage::() - .unwrap() - .into() + System::externalities() } // For testing the pallet, we construct a mock runtime. frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Runtime { System: frame_system, Gateway: pallet_liquidity_pools_gateway, MockLP: pallet_mock_liquidity_pools, @@ -321,31 +316,9 @@ mod test { } ); + #[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { - type AccountData = (); - type AccountId = AccountId; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = ConstU64<250>; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = ConstU16<42>; - type SystemWeightInfo = (); - type Version = (); + type Block = frame_system::mocking::MockBlock; } impl pallet_mock_try_convert::Config for Runtime { diff --git a/runtime/development/Cargo.toml b/runtime/development/Cargo.toml index bba22e3318..23313c327c 100644 --- a/runtime/development/Cargo.toml +++ b/runtime/development/Cargo.toml @@ -27,6 +27,7 @@ sp-io = { workspace = true } sp-offchain = { workspace = true } sp-runtime = { workspace = true } sp-session = { workspace = true } +sp-staking = { workspace = true } sp-std = { workspace = true } sp-transaction-pool = { workspace = true } sp-version = { workspace = true } @@ -45,12 +46,12 @@ cumulus-primitives-timestamp = { workspace = true } cumulus-primitives-utility = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } -polkadot-parachain = { workspace = true } +polkadot-parachain-primitives = { workspace = true } polkadot-runtime-common = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } +staging-xcm = { workspace = true } +staging-xcm-builder = { workspace = true } +staging-xcm-executor = { workspace = true } xcm-primitives = { workspace = true } orml-traits = { workspace = true } @@ -59,8 +60,6 @@ orml-xcm-support = { workspace = true } fp-rpc = { workspace = true } fp-self-contained = { workspace = true } -moonbeam-relay-encoder = { workspace = true } - # Locals cfg-primitives = { workspace = true } cfg-traits = { workspace = true } @@ -165,6 +164,7 @@ std = [ "sp-std/std", "sp-transaction-pool/std", "sp-version/std", + "sp-staking/std", "frame-support/std", "frame-system/std", "frame-system-rpc-runtime-api/std", @@ -176,18 +176,17 @@ std = [ "cumulus-primitives-timestamp/std", "cumulus-primitives-utility/std", "cumulus-pallet-session-benchmarking?/std", - "xcm/std", - "xcm-builder/std", - "xcm-executor/std", + "staging-xcm/std", + "staging-xcm-builder/std", + "staging-xcm-executor/std", "xcm-primitives/std", "orml-traits/std", "orml-xcm-support/std", "fp-rpc/std", "fp-self-contained/std", - "moonbeam-relay-encoder/std", "pallet-transaction-payment-rpc-runtime-api/std", "polkadot-runtime-common/std", - "polkadot-parachain/std", + "polkadot-parachain-primitives/std", # Locals "cfg-primitives/std", @@ -277,13 +276,14 @@ runtime-benchmarks = [ # Substrate related "sp-runtime/runtime-benchmarks", + "sp-staking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", - "xcm-executor/runtime-benchmarks", + "staging-xcm-builder/runtime-benchmarks", + "staging-xcm-executor/runtime-benchmarks", "xcm-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", - "polkadot-parachain/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", # Locals "cfg-primitives/runtime-benchmarks", diff --git a/runtime/development/src/lib.rs b/runtime/development/src/lib.rs index 6e1e90cb08..7bb2cde05f 100644 --- a/runtime/development/src/lib.rs +++ b/runtime/development/src/lib.rs @@ -14,8 +14,8 @@ //! Wasm. #![cfg_attr(not(feature = "std"), no_std)] -// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. -#![recursion_limit = "256"] +// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 512. +#![recursion_limit = "512"] // Allow things like `1 * CFG` #![allow(clippy::identity_op)] @@ -24,17 +24,16 @@ use cfg_primitives::{ liquidity_pools::GeneralCurrencyPrefix, types::{ AccountId, Address, AllOfCouncil, AuraId, Balance, BlockNumber, CollectionId, - CouncilCollective, EnsureRootOr, HalfOfCouncil, Hash, Hashing, Header, IBalance, Index, - ItemId, LoanId, OrderId, OutboundMessageNonce, PalletIndex, PoolEpochId, PoolFeeId, PoolId, + CouncilCollective, EnsureRootOr, HalfOfCouncil, Hash, Hashing, Header, IBalance, ItemId, + LoanId, Nonce, OrderId, OutboundMessageNonce, PalletIndex, PoolEpochId, PoolFeeId, PoolId, Signature, TrancheId, TrancheWeight, TwoThirdOfCouncil, }, }; use cfg_traits::{ investments::{OrderManager, TrancheCurrency as _}, - Millis, Permissions as PermissionsT, PoolUpdateGuard, PreConditions, Seconds, TryConvert as _, + Millis, Permissions as PermissionsT, PoolUpdateGuard, PreConditions, Seconds, }; use cfg_types::{ - consts::pools::{MaxTrancheNameLengthBytes, MaxTrancheSymbolLengthBytes}, fee_keys::{Fee, FeeKey}, fixed_point::{Quantity, Rate, Ratio}, investments::InvestmentPortfolio, @@ -45,8 +44,8 @@ use cfg_types::{ }, time::TimeProvider, tokens::{ - CurrencyId, CustomMetadata, StakingCurrency::BlockRewards as BlockRewardsCurrency, - TrancheCurrency, + AssetStringLimit, CurrencyId, CustomMetadata, + StakingCurrency::BlockRewards as BlockRewardsCurrency, TrancheCurrency, }, }; use chainbridge::constants::DEFAULT_RELAYER_VOTE_THRESHOLD; @@ -55,19 +54,18 @@ use fp_rpc::TransactionStatus; use frame_support::{ construct_runtime, dispatch::DispatchClass, - pallet_prelude::{DispatchError, DispatchResult}, + pallet_prelude::{DispatchError, DispatchResult, RuntimeDebug}, parameter_types, - sp_std::marker::PhantomData, traits::{ - AsEnsureOriginWithArg, ConstU32, ConstU64, Contains, EitherOfDiverse, EqualPrivilegeOnly, - Get, InstanceFilter, LockIdentifier, OnFinalize, PalletInfoAccess, U128CurrencyToVote, + AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, Contains, EitherOfDiverse, + EqualPrivilegeOnly, Get, InstanceFilter, LockIdentifier, OnFinalize, PalletInfoAccess, UnixTime, WithdrawReasons, }, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}, ConstantMultiplier, Weight, }, - PalletId, RuntimeDebug, + PalletId, }; use frame_system::{ limits::{BlockLength, BlockWeights}, @@ -97,7 +95,7 @@ use pallet_transaction_payment_rpc_runtime_api::{FeeDetails, RuntimeDispatchInfo use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use runtime_common::{ - account_conversion::AccountConverter, + account_conversion::{AccountConverter, RuntimeAccountConverter}, asset_registry, changes::FastDelay, evm::{ @@ -105,7 +103,7 @@ use runtime_common::{ GAS_LIMIT_STORAGE_GROWTH_RATIO, WEIGHT_PER_GAS, }, fees::{DealWithFees, FeeToTreasury, WeightToFee}, - gateway::GatewayAccountProvider, + gateway, liquidity_pools::LiquidityPoolsMessage, oracle::{ Feeder, OracleConverterBridge, OracleRatioProvider, OracleRatioProviderLocalAssetExtension, @@ -129,10 +127,11 @@ use sp_runtime::{ transaction_validity::{TransactionSource, TransactionValidity, TransactionValidityError}, ApplyExtrinsicResult, FixedI128, Perbill, Permill, Perquintill, }; -use sp_std::prelude::*; +use sp_staking::currency_to_vote::U128CurrencyToVote; +use sp_std::{marker::PhantomData, prelude::*}; use sp_version::RuntimeVersion; +use staging_xcm_executor::XcmExecutor; use static_assertions::const_assert; -use xcm_executor::XcmExecutor; use crate::xcm::*; @@ -211,26 +210,24 @@ impl frame_system::Config for Runtime { /// The identifier used to distinguish between accounts. type AccountId = AccountId; type BaseCallFilter = BaseCallFilter; + /// The block type. + type Block = Block; /// Maximum number of block number to block hash mappings to keep (oldest /// pruned first). type BlockHashCount = BlockHashCount; type BlockLength = RuntimeBlockLength; - /// The index type for blocks. - type BlockNumber = BlockNumber; type BlockWeights = RuntimeBlockWeights; type DbWeight = RocksDbWeight; /// The type for hashing blocks and tries. type Hash = Hash; /// The hashing algorithm used. type Hashing = Hashing; - /// The header type. - type Header = Header; - /// The index type for storing how many extrinsics an account has signed. - type Index = Index; /// The lookup mechanism to get account ID from whatever is passed in /// dispatchers. type Lookup = sp_runtime::traits::AccountIdLookup; type MaxConsumers = frame_support::traits::ConstU32<16>; + /// The nonce type for storing how many extrinsics an account has signed. + type Nonce = Nonce; /// A function that is invoked when an account has been determined to be /// dead. All resources should be cleaned up associated with the given /// account. @@ -355,7 +352,6 @@ impl pallet_balances::Config for Runtime { /// The minimum amount required to keep an account open. type ExistentialDeposit = ExistentialDeposit; type FreezeIdentifier = (); - type HoldIdentifier = (); type MaxFreezes = ConstU32<10>; type MaxHolds = ConstU32<10>; type MaxLocks = MaxLocks; @@ -363,6 +359,7 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; /// The overarching event type. type RuntimeEvent = RuntimeEvent; + type RuntimeHoldReason = (); type WeightInfo = weights::pallet_balances::WeightInfo; } @@ -400,6 +397,7 @@ parameter_types! { } impl pallet_aura::Config for Runtime { + type AllowMultipleBlocksPerSlot = ConstBool; type AuthorityId = AuraId; type DisabledValidators = (); type MaxAuthorities = MaxAuthorities; @@ -1055,8 +1053,6 @@ impl pallet_pool_system::Config for Runtime { type EpochId = PoolEpochId; type Investments = Investments; type MaxNAVAgeUpperBound = MaxNAVAgeUpperBound; - type MaxTokenNameLength = MaxTrancheNameLengthBytes; - type MaxTokenSymbolLength = MaxTrancheSymbolLengthBytes; type MaxTranches = MaxTranches; type MinEpochTimeLowerBound = MinEpochTimeLowerBound; type MinEpochTimeUpperBound = MinEpochTimeUpperBound; @@ -1074,6 +1070,7 @@ impl pallet_pool_system::Config for Runtime { type Rate = Rate; type RuntimeChange = runtime_common::changes::RuntimeChange; type RuntimeEvent = RuntimeEvent; + type StringLimit = AssetStringLimit; type Time = Timestamp; type Tokens = Tokens; type TrancheCurrency = TrancheCurrency; @@ -1089,8 +1086,6 @@ impl pallet_pool_registry::Config for Runtime { type CurrencyId = CurrencyId; type InterestRate = Rate; type MaxSizeMetadata = MaxSizeMetadata; - type MaxTokenNameLength = MaxTrancheNameLengthBytes; - type MaxTokenSymbolLength = MaxTrancheSymbolLengthBytes; type MaxTranches = MaxTranches; type ModifyPool = pallet_pool_system::Pallet; type ModifyWriteOffPolicy = pallet_loans::Pallet; @@ -1155,12 +1150,7 @@ impl PoolUpdateGuard for UpdateGuard { PoolId, MaxTranches, >; - type ScheduledUpdateDetails = ScheduledUpdateDetails< - Rate, - MaxTrancheNameLengthBytes, - MaxTrancheSymbolLengthBytes, - MaxTranches, - >; + type ScheduledUpdateDetails = ScheduledUpdateDetails; fn released( pool: &Self::PoolDetails, @@ -1244,7 +1234,7 @@ parameter_types! { #[derive(scale_info::TypeInfo, Debug, PartialEq, Eq, Clone)] pub const MaxCandidates: u32 = 20; - pub const MinCandidates: u32 = 5; + pub const MinEligibleCollators: u32 = 5; pub const MaxVoters: u32 = 100; pub const SessionLength: BlockNumber = 6 * HOURS; pub const MaxInvulnerables: u32 = 100; @@ -1262,7 +1252,7 @@ impl pallet_collator_selection::Config for Runtime { type KickThreshold = Period; type MaxCandidates = MaxCandidates; type MaxInvulnerables = MaxInvulnerables; - type MinCandidates = MinCandidates; + type MinEligibleCollators = MinEligibleCollators; type PotId = PotId; type RuntimeEvent = RuntimeEvent; type UpdateOrigin = CollatorSelectionUpdateOrigin; @@ -1278,16 +1268,15 @@ parameter_types! { } impl pallet_xcm_transactor::Config for Runtime { - type AccountIdToMultiLocation = AccountIdToMultiLocation; + type AccountIdToMultiLocation = AccountIdToMultiLocation; type AssetTransactor = FungiblesTransactor; type Balance = Balance; type BaseXcmWeight = BaseXcmWeight; type CurrencyId = CurrencyId; type CurrencyIdToMultiLocation = CurrencyIdConvert; type DerivativeAddressRegistrationOrigin = EnsureRoot; - type HrmpEncoder = moonbeam_relay_encoder::westend::WestendEncoder; type HrmpManipulatorOrigin = EnsureRootOr; - type MaxHrmpFee = xcm_builder::Case; + type MaxHrmpFee = staging_xcm_builder::Case; type ReserveProvider = xcm_primitives::AbsoluteAndRelativeReserve; type RuntimeEvent = RuntimeEvent; type SelfLocation = SelfLocation; @@ -1304,7 +1293,7 @@ parameter_types! { pub const MaxRegisteredPricesPerPool: u32 = 100; pub const MaxRateCount: u32 = 1000; // See #1024 pub const FirstValueFee: Fee = Fee::Balance(deposit(1, pallet_oracle_feed::util::size_of_feed::())); - // + #[derive(Clone, PartialEq, Eq, Debug, TypeInfo, Encode, Decode, MaxEncodedLen)] pub const MaxWriteOffPolicySize: u32 = 10; @@ -1544,6 +1533,7 @@ impl orml_asset_registry::Config for Runtime { type Balance = Balance; type CustomMetadata = CustomMetadata; type RuntimeEvent = RuntimeEvent; + type StringLimit = AssetStringLimit; type WeightInfo = (); } @@ -1837,8 +1827,8 @@ impl pallet_liquidity_pools::Config for Runtime { type Balance = Balance; type BalanceRatio = Ratio; type CurrencyId = CurrencyId; - type DomainAccountToAccountId = AccountConverter; - type DomainAddressToAccountId = AccountConverter; + type DomainAccountToAccountId = AccountConverter; + type DomainAddressToAccountId = AccountConverter; type ForeignInvestment = ForeignInvestments; type GeneralCurrencyPrefix = GeneralCurrencyPrefix; type OutboundQueue = LiquidityPoolsGateway; @@ -1858,7 +1848,7 @@ impl pallet_liquidity_pools::Config for Runtime { parameter_types! { pub const MaxIncomingMessageSize: u32 = 1024; - pub Sender: AccountId = GatewayAccountProvider::::get_gateway_account(); + pub Sender: AccountId = gateway::get_gateway_account::(); } impl pallet_liquidity_pools_gateway::Config for Runtime { @@ -1924,7 +1914,8 @@ parameter_types! { } /// Xcm Weigher shared between multiple Xcm-related configs. -pub type XcmWeigher = xcm_builder::FixedWeightBounds; +pub type XcmWeigher = + staging_xcm_builder::FixedWeightBounds; /// XCMP Queue is responsible to handle XCM messages coming directly from /// sibling parachains. @@ -1950,7 +1941,7 @@ parameter_types! { } impl pallet_evm::Config for Runtime { - type AddressMapping = AccountConverter; + type AddressMapping = RuntimeAccountConverter; type BlockGasLimit = BlockGasLimit; type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping; type CallOrigin = EnsureAddressTruncated; @@ -2046,16 +2037,12 @@ pub type Executive = frame_executive::Executive< // Any addition should be done at the bottom // Any deletion affects the following frames during runtime upgrades construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = cfg_primitives::Block, - UncheckedExtrinsic = UncheckedExtrinsic - { + pub enum Runtime { // basic system stuff - System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, - ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event} = 1, + System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, + ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event} = 1, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 4, + ParachainInfo: parachain_info::{Pallet, Storage, Config} = 4, // money stuff Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 20, @@ -2067,7 +2054,7 @@ construct_runtime!( Authorship: pallet_authorship::{Pallet, Storage} = 30, Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 31, Aura: pallet_aura::{Pallet, Storage, Config} = 32, - AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 33, + AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 33, // substrate pallets Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 60, @@ -2079,7 +2066,7 @@ construct_runtime!( Democracy: pallet_democracy::{Pallet, Call, Storage, Config, Event} = 66, Identity: pallet_identity::{Pallet, Call, Storage, Event} = 67, Vesting: pallet_vesting::{Pallet, Call, Storage, Event, Config} = 68, - Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 69, + Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 69, Uniques: pallet_uniques::{Pallet, Call, Storage, Event} = 70, Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 72, @@ -2116,7 +2103,7 @@ construct_runtime!( // XCM XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 120, - PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Config, Event, Origin} = 121, + PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Config, Event, Origin} = 121, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 122, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 123, XTokens: pallet_restricted_xtokens::{Pallet, Call} = 124, @@ -2130,10 +2117,10 @@ construct_runtime!( OrmlXcm: orml_xcm::{Pallet, Storage, Call, Event} = 153, // EVM pallets - EVM: pallet_evm::{Pallet, Config, Call, Storage, Event} = 160, - EVMChainId: pallet_evm_chain_id::{Pallet, Config, Storage} = 161, + EVM: pallet_evm::{Pallet, Config, Call, Storage, Event} = 160, + EVMChainId: pallet_evm_chain_id::{Pallet, Config, Storage} = 161, BaseFee: pallet_base_fee::{Pallet, Call, Config, Storage, Event} = 162, - Ethereum: pallet_ethereum::{Pallet, Config, Call, Storage, Event, Origin} = 163, + Ethereum: pallet_ethereum::{Pallet, Config, Call, Storage, Event, Origin} = 163, EthereumTransaction: pallet_ethereum_transaction::{Pallet, Storage} = 164, LiquidityPoolsAxelarGateway: axelar_gateway_precompile::{Pallet, Call, Storage, Event} = 165, @@ -2325,8 +2312,8 @@ impl_runtime_apis! { } } - impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { - fn account_nonce(account: AccountId) -> Index { + impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { + fn account_nonce(account: AccountId) -> Nonce { System::account_nonce(account) } } @@ -2473,7 +2460,7 @@ impl_runtime_apis! { // AccountConversionApi impl runtime_common::apis::AccountConversionApi for Runtime { fn conversion_of(location: MultiLocation) -> Option { - AccountConverter::::try_convert(location).ok() + AccountConverter::location_to_account::(location) } } @@ -2702,21 +2689,25 @@ impl_runtime_apis! { fn gas_limit_multiplier_support() {} fn pending_block( - xts: Vec<::Extrinsic> - ) -> ( - Option, Option> - ) { - for ext in xts.into_iter() { - let _ = Executive::apply_extrinsic(ext); - } + xts: Vec<::Extrinsic> + ) -> ( + Option, Option> + ) { + for ext in xts.into_iter() { + let _ = Executive::apply_extrinsic(ext); + } + + Ethereum::on_finalize(System::block_number() + 1); - Ethereum::on_finalize(System::block_number() + 1); + ( + pallet_ethereum::CurrentBlock::::get(), + pallet_ethereum::CurrentTransactionStatuses::::get() + ) + } - ( - pallet_ethereum::CurrentBlock::::get(), - pallet_ethereum::CurrentTransactionStatuses::::get() - ) - } + fn initialize_pending_block(header: &::Header) { + Executive::initialize_block(header) + } } impl fp_rpc::ConvertTransactionRuntimeApi for Runtime { @@ -2732,7 +2723,8 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey, add_benchmark}; + use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark}; + use frame_support::traits::TrackedStorageKey; use frame_system_benchmarking::Pallet as SystemBench; use cumulus_pallet_session_benchmarking::Pallet as SessionBench; diff --git a/runtime/development/src/liquidity_pools.rs b/runtime/development/src/liquidity_pools.rs index e2d73fb101..34802614d2 100644 --- a/runtime/development/src/liquidity_pools.rs +++ b/runtime/development/src/liquidity_pools.rs @@ -24,8 +24,8 @@ use pallet_liquidity_pools::hooks::{ CollectedForeignInvestmentHook, CollectedForeignRedemptionHook, DecreasedForeignInvestOrderHook, }; use runtime_common::{ - account_conversion::AccountConverter, gateway::GatewayAccountProvider, - liquidity_pools::LiquidityPoolsMessage, transfer_filter::PreLpTransfer, + account_conversion::AccountConverter, gateway, liquidity_pools::LiquidityPoolsMessage, + transfer_filter::PreLpTransfer, }; use crate::{ @@ -82,7 +82,7 @@ impl pallet_liquidity_pools::Config for Runtime { parameter_types! { pub const MaxIncomingMessageSize: u32 = 1024; - pub Sender: AccountId = GatewayAccountProvider::::get_gateway_account(); + pub Sender: AccountId = gateway::get_gateway_account::(); } impl pallet_liquidity_pools_gateway::Config for Runtime { diff --git a/runtime/development/src/migrations.rs b/runtime/development/src/migrations.rs index 536827866f..90a6f8f6d9 100644 --- a/runtime/development/src/migrations.rs +++ b/runtime/development/src/migrations.rs @@ -12,4 +12,5 @@ /// The migration set for Development & Demo. /// It includes all the migrations that have to be applied on that chain. -pub type UpgradeDevelopment1046 = (); +pub type UpgradeDevelopment1046 = + pallet_collator_selection::migration::v1::MigrateToV1; diff --git a/runtime/development/src/weights/pallet_collator_selection.rs b/runtime/development/src/weights/pallet_collator_selection.rs index e431bc96b6..37f479517f 100644 --- a/runtime/development/src/weights/pallet_collator_selection.rs +++ b/runtime/development/src/weights/pallet_collator_selection.rs @@ -164,4 +164,14 @@ impl pallet_collator_selection::WeightInfo for WeightIn .saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into())) .saturating_add(Weight::from_parts(0, 2259).saturating_mul(r.into())) } + + fn add_invulnerable(_: u32, _: u32) -> Weight { + // Pending to generate + Weight::default() + } + + fn remove_invulnerable(_: u32) -> Weight { + // Pending to generate + Weight::default() + } } diff --git a/runtime/development/src/xcm.rs b/runtime/development/src/xcm.rs index 1e8313b57f..0d386af94c 100644 --- a/runtime/development/src/xcm.rs +++ b/runtime/development/src/xcm.rs @@ -33,13 +33,16 @@ use runtime_common::{ xcm_fees::native_per_second, }; use sp_core::ConstU32; -use xcm::{latest::Weight as XcmWeight, prelude::*, v3::MultiLocation}; -use xcm_builder::{ +use staging_xcm::{ + prelude::*, + v3::{MultiLocation, Weight as XcmWeight}, +}; +use staging_xcm_builder::{ ConvertedConcreteId, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, FungiblesAdapter, NoChecking, RelayChainAsNative, SiblingParachainAsNative, SignedAccountId32AsNative, SovereignSignedViaLocation, }; -use xcm_executor::{traits::JustTry, XcmExecutor}; +use staging_xcm_executor::{traits::JustTry, XcmExecutor}; use super::{ AccountId, Balance, OrmlAssetRegistry, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, @@ -82,7 +85,8 @@ impl frame_support::traits::Contains for SafeCallFilter { /// transferred, how fees are calculated, what barriers we impose on incoming /// XCM messages, etc. pub struct XcmConfig; -impl xcm_executor::Config for XcmConfig { +impl staging_xcm_executor::Config for XcmConfig { + type Aliasers = Nothing; type AssetClaims = PolkadotXcm; type AssetExchanger = (); type AssetLocker = (); @@ -275,7 +279,7 @@ parameter_type_with_key! { } impl orml_xtokens::Config for Runtime { - type AccountIdToMultiLocation = AccountIdToMultiLocation; + type AccountIdToMultiLocation = AccountIdToMultiLocation; type Balance = Balance; type BaseXcmWeight = BaseXcmWeight; type CurrencyId = CurrencyId; diff --git a/runtime/integration-tests/Cargo.toml b/runtime/integration-tests/Cargo.toml index 3650d2d256..c394a86de7 100644 --- a/runtime/integration-tests/Cargo.toml +++ b/runtime/integration-tests/Cargo.toml @@ -23,7 +23,6 @@ thiserror = { workspace = true } tokio = { workspace = true } tracing-subscriber = { workspace = true } -node-primitives = { workspace = true, features = ["std"] } sc-block-builder = { workspace = true } sc-client-api = { workspace = true } sc-executor = { workspace = true, features = ["std"] } @@ -51,21 +50,22 @@ cumulus-primitives-core = { workspace = true, features = ["std"] } cumulus-primitives-parachain-inherent = { workspace = true, features = ["std"] } cumulus-test-relay-sproof-builder = { workspace = true, features = ["std"] } -kusama-runtime = { workspace = true, features = ["std"] } polkadot-core-primitives = { workspace = true, features = ["std"] } -polkadot-parachain = { workspace = true, features = ["std"] } +polkadot-node-primitives = { workspace = true } +polkadot-parachain-primitives = { workspace = true, features = ["std"] } polkadot-primitives = { workspace = true, features = ["std"] } polkadot-runtime = { workspace = true, features = ["std"] } polkadot-runtime-common = { workspace = true, features = ["std"] } polkadot-runtime-parachains = { workspace = true, features = ["std"] } rococo-runtime = { workspace = true, features = ["std"] } +staging-kusama-runtime = { workspace = true, features = ["std"] } pallet-babe = { workspace = true, features = ["std"] } pallet-grandpa = { workspace = true, features = ["std"] } pallet-im-online = { workspace = true, features = ["std"] } -xcm = { workspace = true, features = ["std"] } -xcm-executor = { workspace = true, features = ["std"] } +staging-xcm = { workspace = true, features = ["std"] } +staging-xcm-executor = { workspace = true, features = ["std"] } orml-traits = { workspace = true, features = ["std"] } diff --git a/runtime/integration-tests/src/evm/precompile.rs b/runtime/integration-tests/src/evm/precompile.rs index 835130af9f..6390d474fd 100644 --- a/runtime/integration-tests/src/evm/precompile.rs +++ b/runtime/integration-tests/src/evm/precompile.rs @@ -22,7 +22,7 @@ use cfg_types::{ }; use ethabi::{Contract, Function, Param, ParamType, Token}; use ethereum::{LegacyTransaction, TransactionAction, TransactionSignature, TransactionV2}; -use frame_support::{assert_err, assert_ok, dispatch::RawOrigin}; +use frame_support::{assert_err, assert_ok, dispatch::RawOrigin, BoundedVec}; use fudge::primitives::Chain; use hex::ToHex; use orml_traits::{asset_registry::AssetMetadata, MultiCurrency}; @@ -32,8 +32,8 @@ use parity_scale_codec::Encode; use runtime_common::{account_conversion::AccountConverter, evm::precompile::LP_AXELAR_GATEWAY}; use sp_core::{Get, H160, H256, U256}; use sp_runtime::traits::{BlakeTwo256, Hash}; +use staging_xcm::{v3::MultiLocation, VersionedMultiLocation}; use tokio::runtime::Handle; -use xcm::{v3::MultiLocation, VersionedMultiLocation}; use crate::{ chain::centrifuge::{ @@ -91,8 +91,14 @@ async fn axelar_precompile_execute() { let currency_metadata = AssetMetadata { decimals: 18, - name: "Test".into(), - symbol: "TST".into(), + name: BoundedVec::::StringLimit>::try_from( + "Test".as_bytes().to_vec(), + ) + .expect("Can create BoundedVec for token name"), + symbol: BoundedVec::::StringLimit>::try_from( + "TST".as_bytes().to_vec(), + ) + .expect("Can create BoundedVec for token symbol"), existential_deposit: ED, location: Some(VersionedMultiLocation::V3(MultiLocation::here())), additional: CustomMetadata { diff --git a/runtime/integration-tests/src/generic/cases/account_derivation.rs b/runtime/integration-tests/src/generic/cases/account_derivation.rs index 378c13f209..3ad950f10f 100644 --- a/runtime/integration-tests/src/generic/cases/account_derivation.rs +++ b/runtime/integration-tests/src/generic/cases/account_derivation.rs @@ -14,8 +14,9 @@ use cfg_primitives::AccountId; use runtime_common::apis::runtime_decl_for_account_conversion_api::AccountConversionApi; +use sp_api::{BlockT, HeaderT}; use sp_runtime::traits::{Get, Zero}; -use xcm::v3::{ +use staging_xcm::v3::{ Junction::{AccountId32, AccountKey20, Parachain}, Junctions::{X1, X2}, MultiLocation, NetworkId, @@ -187,7 +188,7 @@ fn remote_account_on_relay() { AccountId32 { id: KEY_32, network: Some(NetworkId::ByGenesis( - frame_system::BlockHash::::get(T::BlockNumber::zero()).0, + frame_system::BlockHash::::get::(Zero::zero()).0, )), }, ), @@ -215,7 +216,10 @@ fn remote_account_on_sibling() { AccountId32 { id: KEY_32, network: Some(NetworkId::ByGenesis( - frame_system::BlockHash::::get(T::BlockNumber::zero()).0, + frame_system::BlockHash::::get( + <::Header as HeaderT>::Number::zero(), + ) + .0, )), }, ), diff --git a/runtime/integration-tests/src/generic/cases/investments.rs b/runtime/integration-tests/src/generic/cases/investments.rs index 83abfb1855..cacd0b53cc 100644 --- a/runtime/integration-tests/src/generic/cases/investments.rs +++ b/runtime/integration-tests/src/generic/cases/investments.rs @@ -39,10 +39,12 @@ mod common { pub fn initialize_state_for_investments, T: Runtime>() -> E { let mut env = E::from_parachain_storage( - Genesis::::default() - .add(genesis::balances(T::ExistentialDeposit::get() + FOR_FEES)) - .add(genesis::assets(vec![Box::new(Usd6)])) - .add(genesis::tokens(vec![(Usd6.id(), Usd6.ed())])) + Genesis::default() + .add(genesis::balances::( + T::ExistentialDeposit::get() + FOR_FEES, + )) + .add(genesis::assets::(vec![Box::new(Usd6)])) + .add(genesis::tokens::(vec![(Usd6.id(), Usd6.ed())])) .storage(), ); diff --git a/runtime/integration-tests/src/generic/cases/liquidity_pools.rs b/runtime/integration-tests/src/generic/cases/liquidity_pools.rs index b6cfc907fa..5174d130fb 100644 --- a/runtime/integration-tests/src/generic/cases/liquidity_pools.rs +++ b/runtime/integration-tests/src/generic/cases/liquidity_pools.rs @@ -15,14 +15,13 @@ use cfg_types::{ orders::FulfillmentWithPrice, permissions::{PermissionScope, PoolRole, Role}, pools::TrancheMetadata, - tokens::{CrossChainTransferability, CurrencyId, CustomMetadata}, + tokens::{AssetMetadata, CrossChainTransferability, CurrencyId, CustomMetadata}, xcm::XcmMetadata, }; use cfg_utils::vec_to_fixed_array; use frame_support::{ assert_noop, assert_ok, - dispatch::{RawOrigin, Weight}, - pallet_prelude::GenesisBuild, + dispatch::RawOrigin, traits::{ fungible::Mutate as FungibleMutate, fungibles::{Inspect, Mutate as FungiblesMutate}, @@ -33,14 +32,14 @@ use liquidity_pools_gateway_routers::{ AxelarEVMRouter, AxelarXCMRouter, DomainRouter, EVMDomain, EVMRouter, EthereumXCMRouter, FeeValues, XCMRouter, XcmDomain, DEFAULT_PROOF_SIZE, MAX_AXELAR_EVM_CHAIN_SIZE, }; -use orml_traits::{asset_registry::AssetMetadata, MultiCurrency}; +use orml_traits::MultiCurrency; use pallet_investments::CollectOutcome; use pallet_liquidity_pools::Message; use pallet_liquidity_pools_gateway::{Call as LiquidityPoolsGatewayCall, GatewayOrigin}; use pallet_pool_system::tranches::{TrancheInput, TrancheLoc, TrancheType}; use parity_scale_codec::Encode; use polkadot_core_primitives::BlakeTwo256; -use polkadot_parachain::primitives::{Id, ValidationCode}; +use polkadot_parachain_primitives::primitives::{Id, ValidationCode}; use polkadot_runtime_parachains::{ paras, paras::{ParaGenesisArgs, ParaKind}, @@ -53,10 +52,14 @@ use runtime_common::{ }; use sp_core::{Get, H160, U256}; use sp_runtime::{ - traits::{AccountIdConversion, BadOrigin, ConstU32, Convert as C2, EnsureAdd, Hash, One, Zero}, - BoundedVec, DispatchError, FixedPointNumber, Perquintill, SaturatedConversion, WeakBoundedVec, + traits::{ + AccountIdConversion, BadOrigin, ConstU32, Convert as C1, Convert as C2, EnsureAdd, Hash, + One, Zero, + }, + BoundedVec, BuildStorage, DispatchError, FixedPointNumber, Perquintill, SaturatedConversion, + WeakBoundedVec, }; -use xcm::{ +use staging_xcm::{ latest::NetworkId, prelude::XCM_VERSION, v3::{ @@ -65,7 +68,6 @@ use xcm::{ }, VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, }; -use xcm_executor::traits::Convert as C1; use crate::{ generic::{ @@ -81,7 +83,7 @@ pub mod utils { use super::*; pub fn parachain_account(id: u32) -> AccountId { - polkadot_parachain::primitives::Sibling::from(id).into_account_truncating() + polkadot_parachain_primitives::primitives::Sibling::from(id).into_account_truncating() } pub fn xcm_metadata(transferability: CrossChainTransferability) -> Option { @@ -184,10 +186,10 @@ pub mod utils { } pub fn register_ausd() { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 12, - name: "Acala Dollar".into(), - symbol: "AUSD".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -263,8 +265,6 @@ type FudgeRelayRuntime = <::FudgeHandle as FudgeHandle> use utils::*; mod development { - use development_runtime::xcm::LocationToAccountId; - use super::*; pub const GLMR_CURRENCY_ID: CurrencyId = CurrencyId::ForeignAsset(4); @@ -285,6 +285,7 @@ mod development { mod utils { use cfg_types::oracles::OracleKey; + use frame_support::weights::Weight; use runtime_common::oracle::Feeder; use super::*; @@ -321,14 +322,14 @@ mod development { // liquidity pools AddTranche message. token_name: BoundedVec::< u8, - ::MaxTokenNameLength, + ::StringLimit, >::try_from("A highly advanced tranche".as_bytes().to_vec()) - .expect(""), + .expect("Can create BoundedVec for token name"), token_symbol: BoundedVec::< u8, - ::MaxTokenSymbolLength, + ::StringLimit, >::try_from("TrNcH".as_bytes().to_vec()) - .expect(""), + .expect("Can create BoundedVec for token symbol"), } }, TrancheInput { @@ -351,10 +352,10 @@ mod development { } pub fn register_glmr() { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Glimmer".into(), - symbol: "GLMR".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: GLMR_ED, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -739,9 +740,7 @@ mod development { assert_eq!( orml_tokens::Pallet::::balance( default_investment_id::().into(), - &AccountConverter::::convert( - DEFAULT_OTHER_DOMAIN_ADDRESS - ) + &AccountConverter::convert(DEFAULT_OTHER_DOMAIN_ADDRESS) ), 0 ); @@ -775,10 +774,10 @@ mod development { /// /// NOTE: Assumes to be executed within an externalities environment. fn register_usdt() { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 6, - name: "Tether USDT".into(), - symbol: "USDT".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: USDT_ED, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -1027,7 +1026,7 @@ mod development { // Whitelist destination as TrancheInvestor of this Pool crate::generic::utils::give_pool_role::( - AccountConverter::::convert(new_member.clone()), + AccountConverter::convert(new_member.clone()), pool_id, PoolRole::TrancheInvestor(default_tranche_id::(pool_id), DEFAULT_VALIDITY), ); @@ -1035,7 +1034,7 @@ mod development { // Verify the Investor role was set as expected in Permissions assert!(pallet_permissions::Pallet::::has( PermissionScope::Pool(pool_id), - AccountConverter::::convert(new_member.clone()), + AccountConverter::convert(new_member.clone()), Role::PoolRole(PoolRole::TrancheInvestor(tranche_id, DEFAULT_VALIDITY)), )); @@ -1218,8 +1217,8 @@ mod development { assert_ok!(orml_asset_registry::Pallet::::register_asset( ::RuntimeOrigin::root(), AssetMetadata { - name: "Test".into(), - symbol: "TEST".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), decimals: 12, location: None, existential_deposit: 1_000_000, @@ -1393,8 +1392,8 @@ mod development { assert_ok!(orml_asset_registry::Pallet::::register_asset( ::RuntimeOrigin::root(), AssetMetadata { - name: "Test".into(), - symbol: "TEST".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), decimals: 12, location: None, existential_deposit: 1_000_000, @@ -1586,8 +1585,8 @@ mod development { assert_ok!(orml_asset_registry::Pallet::::register_asset( ::RuntimeOrigin::root(), AssetMetadata { - name: "Test".into(), - symbol: "TEST".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), decimals: 12, location: None, existential_deposit: 1_000_000, @@ -1846,9 +1845,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; let amount = 10 * decimals(12); - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; @@ -1901,9 +1899,8 @@ mod development { let invest_amount: u128 = 10 * decimals(12); let decrease_amount = invest_amount / 3; let final_amount = invest_amount - decrease_amount; - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id: CurrencyId = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; @@ -1992,9 +1989,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; let invest_amount = 10 * decimals(12); - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; @@ -2092,9 +2088,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; let amount = 10 * decimals(12); - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let sending_domain_locator = @@ -2244,9 +2239,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; let invest_amount = 10 * decimals(12); - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let sending_domain_locator = @@ -2477,9 +2471,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; let amount = 10 * decimals(12); - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; @@ -2537,9 +2530,8 @@ mod development { let redeem_amount = 10 * decimals(12); let decrease_amount = redeem_amount / 3; let final_amount = redeem_amount - decrease_amount; - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let sending_domain_locator = @@ -2655,9 +2647,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; let redeem_amount = 10 * decimals(12); - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let sending_domain_locator = @@ -2753,9 +2744,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; let amount = 10 * decimals(12); - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let pool_account = pallet_pool_system::pool_types::PoolLocator { pool_id } @@ -2908,9 +2898,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; let redeem_amount = 10 * decimals(12); - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let pool_account = pallet_pool_system::pool_types::PoolLocator { pool_id } @@ -3137,10 +3126,7 @@ mod development { let invest_amount: u128 = 10 * decimals(12); let decrease_amount = invest_amount + 1; let investor: AccountId = - AccountConverter::::convert(( - DOMAIN_MOONBEAM, - Keyring::Bob.into(), - )); + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id: CurrencyId = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; create_currency_pool::( @@ -3189,10 +3175,7 @@ mod development { let redeem_amount: u128 = 10 * decimals(12); let decrease_amount = redeem_amount + 1; let investor: AccountId = - AccountConverter::::convert(( - DOMAIN_MOONBEAM, - Keyring::Bob.into(), - )); + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id: CurrencyId = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; create_currency_pool::( @@ -3246,10 +3229,7 @@ mod development { let pool_id = POOL_ID; let amount: u128 = 10 * decimals(12); let investor: AccountId = - AccountConverter::::convert(( - DOMAIN_MOONBEAM, - Keyring::Bob.into(), - )); + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id: CurrencyId = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; create_currency_pool::( @@ -3332,10 +3312,7 @@ mod development { let pool_id = POOL_ID; let amount: u128 = 10 * decimals(12); let investor: AccountId = - AccountConverter::::convert(( - DOMAIN_MOONBEAM, - Keyring::Bob.into(), - )); + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id: CurrencyId = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; create_currency_pool::( @@ -3431,10 +3408,7 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; let investor: AccountId = - AccountConverter::::convert(( - DOMAIN_MOONBEAM, - Keyring::Bob.into(), - )); + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let pool_currency = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let foreign_currency: CurrencyId = USDT_CURRENCY_ID; @@ -3513,10 +3487,7 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; let investor: AccountId = - AccountConverter::::convert(( - DOMAIN_MOONBEAM, - Keyring::Bob.into(), - )); + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let pool_currency = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let foreign_currency: CurrencyId = USDT_CURRENCY_ID; @@ -3599,10 +3570,7 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; let investor: AccountId = - AccountConverter::::convert(( - DOMAIN_MOONBEAM, - Keyring::Bob.into(), - )); + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let pool_currency = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let foreign_currency: CurrencyId = USDT_CURRENCY_ID; @@ -3681,9 +3649,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let pool_currency: CurrencyId = AUSD_CURRENCY_ID; let foreign_currency: CurrencyId = USDT_CURRENCY_ID; let pool_currency_decimals = currency_decimals::AUSD; @@ -3799,9 +3766,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let pool_currency: CurrencyId = AUSD_CURRENCY_ID; let foreign_currency: CurrencyId = USDT_CURRENCY_ID; let pool_currency_decimals = currency_decimals::AUSD; @@ -3942,9 +3908,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let trader: AccountId = Keyring::Alice.into(); let pool_currency: CurrencyId = AUSD_CURRENCY_ID; let foreign_currency: CurrencyId = USDT_CURRENCY_ID; @@ -4061,9 +4026,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let pool_currency: CurrencyId = AUSD_CURRENCY_ID; let foreign_currency: CurrencyId = USDT_CURRENCY_ID; let pool_currency_decimals = currency_decimals::AUSD; @@ -4379,7 +4343,7 @@ mod development { let valid_until = u64::MAX; crate::generic::utils::give_pool_role::( - AccountConverter::::convert(dest_address.clone()), + AccountConverter::convert(dest_address.clone()), pool_id, PoolRole::TrancheInvestor(default_tranche_id::(pool_id), valid_until), ); @@ -4556,12 +4520,12 @@ mod development { // Give Keyring::Bob investor role for (valid_pool_id, invalid_tranche_id) and // (invalid_pool_id, valid_tranche_id) crate::generic::utils::give_pool_role::( - AccountConverter::::convert(dest_address.clone()), + AccountConverter::convert(dest_address.clone()), invalid_pool_id, PoolRole::TrancheInvestor(valid_tranche_id, valid_until), ); crate::generic::utils::give_pool_role::( - AccountConverter::::convert(dest_address.clone()), + AccountConverter::convert(dest_address.clone()), valid_pool_id, PoolRole::TrancheInvestor(invalid_tranche_id, valid_until), ); @@ -4594,10 +4558,10 @@ mod development { let cfg_in_sibling = CurrencyId::ForeignAsset(12); // CFG Metadata - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Development".into(), - symbol: "CFG".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -4690,7 +4654,7 @@ mod development { assert_eq!(current_balance, transfer_amount - fee(18)); // Sanity check for the actual amount Keyring::Bob ends up with - assert_eq!(current_balance, 4992960800000000000); + assert_eq!(current_balance, 4993570400000000000); }); } @@ -4809,10 +4773,8 @@ mod development { ) { let chain_id = env.parachain_state(|| pallet_evm_chain_id::Pallet::::get()); - let derived_account = AccountConverter::::convert_evm_address( - chain_id, - address.to_fixed_bytes(), - ); + let derived_account = + AccountConverter::convert_evm_address(chain_id, address.to_fixed_bytes()); env.parachain_state_mut(|| { pallet_balances::Pallet::::mint_into(&derived_account.into(), balance) @@ -4825,9 +4787,9 @@ mod development { fn test_via_outbound_queue() { let mut env = FudgeEnv::::from_parachain_storage( - Genesis::::default() + Genesis::default() .add(genesis::balances::(cfg(1_000))) - .add::(genesis::council_members::( + .add(genesis::council_members::( get_council_members(), )) .storage(), @@ -5157,9 +5119,9 @@ mod development { fn set_domain_router() { let mut env = FudgeEnv::::from_parachain_storage( - Genesis::::default() + Genesis::default() .add(genesis::balances::(cfg(1_000))) - .add::(genesis::council_members::( + .add(genesis::council_members::( get_council_members(), )) .storage(), @@ -5228,9 +5190,9 @@ mod development { fn add_remove_instances() { let mut env = FudgeEnv::::from_parachain_storage( - Genesis::::default() + Genesis::default() .add(genesis::balances::(cfg(1_000))) - .add::(genesis::council_members::( + .add(genesis::council_members::( get_council_members(), )) .storage(), @@ -5286,9 +5248,9 @@ mod development { fn process_msg() { let mut env = FudgeEnv::::from_parachain_storage( - Genesis::::default() + Genesis::default() .add(genesis::balances::(cfg(1_000))) - .add::(genesis::council_members::( + .add(genesis::council_members::( get_council_members(), )) .storage(), @@ -5358,10 +5320,10 @@ mod altair { use super::*; pub fn register_air() { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Altair".into(), - symbol: "AIR".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -5384,10 +5346,10 @@ mod altair { } pub fn register_ksm() { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 12, - name: "Kusama".into(), - symbol: "KSM".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new(1, Here))), additional: CustomMetadata { @@ -5448,10 +5410,10 @@ mod altair { ); // Register AIR as foreign asset in the sibling parachain - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Altair".into(), - symbol: "AIR".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -5479,10 +5441,10 @@ mod altair { ); // Register AIR as foreign asset in the sibling parachain - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Altair".into(), - symbol: "AIR".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -5551,7 +5513,7 @@ mod altair { assert_eq!(current_balance, transfer_amount - fee(18)); // Sanity check for the actual amount Keyring::Bob ends up with - assert_eq!(current_balance, 4992960800000000000); + assert_eq!(current_balance, 4993570400000000000); }); } @@ -5730,7 +5692,7 @@ mod altair { env: &mut FudgeEnv, transfer_amount: Balance, currency_id: CurrencyId, - meta: AssetMetadata, + meta: AssetMetadata, ) { env.parachain_state_mut(|| { assert_ok!(orml_asset_registry::Pallet::::register_asset( @@ -5787,7 +5749,7 @@ mod altair { env.parachain_state(|| { assert_eq!( orml_tokens::Pallet::::free_balance(currency_id, &Keyring::Bob.into()), - transfer_amount - fee(meta.decimals) + 1991963000000 // Comes from `transfer_amount - fee(meta.decimals)` with noise ); }); } @@ -5797,10 +5759,10 @@ mod altair { let transfer_amount: Balance = ksm(2); let currency_id = CurrencyId::ForeignAsset(3001); - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 12, - name: "Kusama".into(), - symbol: "KSM".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new(1, Here))), additional: CustomMetadata { @@ -5815,11 +5777,6 @@ mod altair { let currency_id = CurrencyId::ForeignAsset(3001); env.parachain_state_mut(|| { - assert_eq!( - orml_tokens::Pallet::::free_balance(currency_id, &Keyring::Bob.into()), - transfer_amount - fee(meta.decimals) - ); - assert_ok!(pallet_xcm::Pallet::::force_xcm_version( ::RuntimeOrigin::root(), Box::new(MultiLocation::new(1, Junctions::Here)), @@ -5851,7 +5808,7 @@ mod altair { pallet_balances::Pallet::>::free_balance( &Keyring::Bob.into() ), - 999907996044 + 999918220455 ); }); } @@ -5870,10 +5827,10 @@ mod altair { 1, X2(Parachain(T::FudgeHandle::SIBLING_ID), general_key(&[0, 1])), ); - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Sibling Native Token".into(), - symbol: "SBLNG".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(asset_location)), additional: CustomMetadata { @@ -5982,10 +5939,10 @@ mod altair { general_key("0x02f3a00dd12f644daec907013b16eb6d14bf1c4cb4".as_bytes()), ), ); - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 6, - name: "Wormhole USDC".into(), - symbol: "WUSDC".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1, location: Some(VersionedMultiLocation::V3(asset_location)), additional: CustomMetadata { @@ -6061,7 +6018,7 @@ mod altair { orml_tokens::Pallet::::free_balance(usdc_asset_id, &Keyring::Bob.into()); // Sanity check to ensure the calculated is what is expected - assert_eq!(bob_balance, 11992961); + assert_eq!(bob_balance, 11993571); }); } @@ -6079,10 +6036,10 @@ mod altair { let mut env = FudgeEnv::::default(); env.parachain_state_mut(|| { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Altair".into(), - symbol: "AIR".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 0, @@ -6106,10 +6063,10 @@ mod altair { let mut env = FudgeEnv::::default(); env.parachain_state_mut(|| { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 12, - name: "Acala Dollar".into(), - symbol: "AUSD".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -6137,10 +6094,10 @@ mod altair { let mut env = FudgeEnv::::default(); env.parachain_state_mut(|| { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 12, - name: "Tranche Token 1".into(), - symbol: "TRNCH".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -6189,7 +6146,7 @@ mod altair { assert_eq!( >::convert(air_location_inner), - Ok(CurrencyId::Native), + Some(CurrencyId::Native), ); // The canonical way AIR is represented out in the wild @@ -6231,7 +6188,7 @@ mod altair { env.parachain_state_mut(|| { assert_eq!( >::convert(tranche_multilocation), - Err(tranche_multilocation), + None, ); }); @@ -6261,7 +6218,7 @@ mod altair { assert_eq!( >::convert(ausd_location.clone()), - Ok(AUSD_CURRENCY_ID), + Some(AUSD_CURRENCY_ID), ); assert_eq!( @@ -6281,7 +6238,7 @@ mod altair { assert_eq!( >::convert(ksm_location), - Ok(KSM_ASSET_ID), + Some(KSM_ASSET_ID), ); assert_eq!( @@ -6300,7 +6257,7 @@ mod altair { ); env.parachain_state_mut(|| { - assert!(>::convert(unknown_location).is_err()); + assert!(>::convert(unknown_location).is_none()); }); } @@ -6333,7 +6290,7 @@ mod centrifuge { use super::*; mod utils { - use xcm::v3::NetworkId; + use staging_xcm::v3::NetworkId; use super::*; @@ -6350,10 +6307,10 @@ mod centrifuge { /// Register DOT in the asset registry. /// It should be executed within an externalities environment. pub fn register_dot() { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 10, - name: "Polkadot".into(), - symbol: "DOT".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 100_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::parent())), additional: CustomMetadata { @@ -6369,10 +6326,10 @@ mod centrifuge { } pub fn register_lp_eth_usdc() { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 6, - name: "LP Ethereum Wrapped USDC".into(), - symbol: "LpEthUSDC".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 0, @@ -6399,10 +6356,10 @@ mod centrifuge { } pub fn register_usdc() { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 6, - name: "USD Circle".into(), - symbol: "USDC".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -6427,10 +6384,10 @@ mod centrifuge { /// Register CFG in the asset registry. /// It should be executed within an externalities environment. pub fn register_cfg(para_id: u32) { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Centrifuge".into(), - symbol: "CFG".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -6456,23 +6413,25 @@ mod centrifuge { /// production. It should be executed within an externalities /// environment. pub fn register_cfg_v2() { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Centrifuge".into(), - symbol: "CFG".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, - location: Some(VersionedMultiLocation::V2(xcm::v2::MultiLocation::new( - 1, - xcm::v2::Junctions::X2( - xcm::v2::Junction::Parachain(T::FudgeHandle::PARA_ID), - xcm::v2::Junction::GeneralKey( - WeakBoundedVec::>::force_from( - parachains::polkadot::centrifuge::CFG_KEY.into(), - None, + location: Some(VersionedMultiLocation::V2( + staging_xcm::v2::MultiLocation::new( + 1, + staging_xcm::v2::Junctions::X2( + staging_xcm::v2::Junction::Parachain(T::FudgeHandle::PARA_ID), + staging_xcm::v2::Junction::GeneralKey( + WeakBoundedVec::>::force_from( + parachains::polkadot::centrifuge::CFG_KEY.into(), + None, + ), ), ), ), - ))), + )), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), ..CustomMetadata::default() @@ -6489,10 +6448,10 @@ mod centrifuge { /// Register a token whose `CrossChainTransferability` does NOT include /// XCM. pub fn register_no_xcm_token() { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "NO XCM".into(), - symbol: "NXCM".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: None, additional: CustomMetadata { @@ -6598,7 +6557,7 @@ mod centrifuge { env.parachain_state(|| { assert_eq!( orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Alice.into()), - transfer_amount - dot_fee() + 29919630000 // Comes from `transfer_amount - dot_fee()` with some noise ); }); } @@ -6613,10 +6572,10 @@ mod centrifuge { let mut env = FudgeEnv::::default(); env.parachain_state_mut(|| { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Centrifuge".into(), - symbol: "CFG".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 0, @@ -6640,10 +6599,10 @@ mod centrifuge { let mut env = FudgeEnv::::default(); env.parachain_state_mut(|| { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 12, - name: "Acala Dollar".into(), - symbol: "AUSD".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -6671,10 +6630,10 @@ mod centrifuge { let mut env = FudgeEnv::::default(); env.parachain_state_mut(|| { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 12, - name: "Tranche Token 1".into(), - symbol: "TRNCH".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -6724,7 +6683,7 @@ mod centrifuge { assert_eq!( >::convert(cfg_location_inner), - Ok(CurrencyId::Native), + Some(CurrencyId::Native), ); // The canonical way CFG is represented out in the wild @@ -6763,7 +6722,7 @@ mod centrifuge { assert_eq!( >::convert(cfg_location_inner), - Ok(CurrencyId::Native), + Some(CurrencyId::Native), ); // The canonical way CFG is represented out in the wild @@ -6807,7 +6766,7 @@ mod centrifuge { assert_eq!( >::convert(dot_location), - Ok(DOT_ASSET_ID), + Some(DOT_ASSET_ID), ); assert_eq!( @@ -6829,7 +6788,7 @@ mod centrifuge { ); env.parachain_state_mut(|| { - assert!(>::convert(unknown_location).is_err()); + assert!(>::convert(unknown_location).is_none()); }); } @@ -7348,18 +7307,18 @@ mod centrifuge { fn restrict_usdc_xcm_transfer() { let mut env = FudgeEnv::::from_storage( - >>::build_storage( - ¶s::GenesisConfig { - paras: vec![( - 1000.into(), - ParaGenesisArgs { - genesis_head: Default::default(), - validation_code: ValidationCode::from(vec![0, 1, 2, 3]), - para_kind: ParaKind::Parachain, - }, - )], - }, - ) + paras::GenesisConfig::> { + _config: Default::default(), + paras: vec![( + 1000.into(), + ParaGenesisArgs { + genesis_head: Default::default(), + validation_code: ValidationCode::from(vec![0, 1, 2, 3]), + para_kind: ParaKind::Parachain, + }, + )], + } + .build_storage() .unwrap(), Genesis::default() .add(genesis::balances::(cfg(10))) @@ -7564,8 +7523,6 @@ mod centrifuge { let alice_initial_dot = orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Alice.into()); - assert_eq!(alice_initial_dot, dot(3) - dot_fee()); - assert_ok!(pallet_xcm::Pallet::::force_xcm_version( ::RuntimeOrigin::root(), Box::new(MultiLocation::new(1, Junctions::Here)), @@ -7630,7 +7587,7 @@ mod centrifuge { pallet_balances::Pallet::>::free_balance( &Keyring::Alice.into() ), - 79628418552 + 79978937205 ); }); } @@ -7653,10 +7610,10 @@ mod centrifuge { let cfg_in_sibling = CurrencyId::ForeignAsset(12); // CFG Metadata - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Centrifuge".into(), - symbol: "CFG".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -7749,7 +7706,7 @@ mod centrifuge { assert_eq!(current_balance, transfer_amount - fee(18)); // Sanity check for the actual amount Keyring::Bob ends up with - assert_eq!(current_balance, 4992960800000000000); + assert_eq!(current_balance, 4993570400000000000); }); } @@ -7934,8 +7891,6 @@ mod centrifuge { let alice_initial_dot = orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Alice.into()); - assert_eq!(alice_initial_dot, dot(3) - dot_fee()); - assert_ok!(pallet_xcm::Pallet::::force_xcm_version( ::RuntimeOrigin::root(), Box::new(MultiLocation::new(1, Junctions::Here)), @@ -7972,7 +7927,7 @@ mod centrifuge { pallet_balances::Pallet::>::free_balance( &Keyring::Alice.into() ), - 79628418552 + 79978937205 ); }); } @@ -7991,10 +7946,10 @@ mod centrifuge { 1, X2(Parachain(T::FudgeHandle::SIBLING_ID), general_key(&[0, 1])), ); - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Sibling Native Token".into(), - symbol: "SBLNG".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(asset_location)), additional: CustomMetadata { @@ -8104,10 +8059,10 @@ mod centrifuge { general_key("0x02f3a00dd12f644daec907013b16eb6d14bf1c4cb4".as_bytes()), ), ); - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 6, - name: "Wormhole USDC".into(), - symbol: "WUSDC".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1, location: Some(VersionedMultiLocation::V3(asset_location)), additional: CustomMetadata { @@ -8181,7 +8136,7 @@ mod centrifuge { orml_tokens::Pallet::::free_balance(usdc_asset_id, &Keyring::Bob.into()); // Sanity check to ensure the calculated is what is expected - assert_eq!(bob_balance, 11992961); + assert_eq!(bob_balance, 11993571); }); } diff --git a/runtime/integration-tests/src/generic/cases/loans.rs b/runtime/integration-tests/src/generic/cases/loans.rs index e28a4224cd..1bc33b5d1b 100644 --- a/runtime/integration-tests/src/generic/cases/loans.rs +++ b/runtime/integration-tests/src/generic/cases/loans.rs @@ -71,10 +71,12 @@ mod common { pub fn initialize_state_for_loans, T: Runtime>() -> E { let mut env = E::from_parachain_storage( - Genesis::::default() - .add(genesis::balances(T::ExistentialDeposit::get() + FOR_FEES)) - .add(genesis::assets(vec![Box::new(Usd6)])) - .add(genesis::tokens(vec![(Usd6.id(), Usd6.ed())])) + Genesis::default() + .add(genesis::balances::( + T::ExistentialDeposit::get() + FOR_FEES, + )) + .add(genesis::assets::(vec![Box::new(Usd6)])) + .add(genesis::tokens::(vec![(Usd6.id(), Usd6.ed())])) .storage(), ); diff --git a/runtime/integration-tests/src/generic/cases/proxy.rs b/runtime/integration-tests/src/generic/cases/proxy.rs index fd0e301c08..a606944618 100644 --- a/runtime/integration-tests/src/generic/cases/proxy.rs +++ b/runtime/integration-tests/src/generic/cases/proxy.rs @@ -3,7 +3,7 @@ use cfg_types::{tokens::CrossChainTransferability, xcm::XcmMetadata}; use frame_support::{assert_err, assert_ok, traits::Get}; use frame_system::RawOrigin; use sp_runtime::{traits::StaticLookup, DispatchResult}; -use xcm::{ +use staging_xcm::{ prelude::Parachain, v3::{Junction, Junctions::*, MultiLocation, WeightLimit}, VersionedMultiLocation, @@ -36,9 +36,11 @@ const TRANSFER_AMOUNT: Balance = usd6(100); fn configure_proxy_and_transfer(proxy_type: T::ProxyType) -> DispatchResult { let env = RuntimeEnv::::from_parachain_storage( - Genesis::::default() - .add(genesis::balances(T::ExistentialDeposit::get() + FOR_FEES)) - .add(genesis::tokens(vec![(Usd6.id(), Usd6.ed())])) + Genesis::default() + .add(genesis::balances::( + T::ExistentialDeposit::get() + FOR_FEES, + )) + .add(genesis::tokens::(vec![(Usd6.id(), Usd6.ed())])) .storage(), ); @@ -60,7 +62,7 @@ fn configure_proxy_and_x_transfer( .add(genesis::balances::( T::ExistentialDeposit::get() + FOR_FEES, )) - .add(genesis::tokens(vec![(Usd6.id(), Usd6.ed())])) + .add(genesis::tokens::(vec![(Usd6.id(), Usd6.ed())])) .storage(), ); diff --git a/runtime/integration-tests/src/generic/config.rs b/runtime/integration-tests/src/generic/config.rs index ff98123c3b..98a1c87cae 100644 --- a/runtime/integration-tests/src/generic/config.rs +++ b/runtime/integration-tests/src/generic/config.rs @@ -1,8 +1,8 @@ use std::fmt::Debug; use cfg_primitives::{ - AccountId, Address, AuraId, Balance, BlockNumber, CollectionId, CouncilCollective, Header, - IBalance, Index, ItemId, LoanId, OrderId, PoolId, Signature, TrancheId, + AccountId, Address, AuraId, Balance, CollectionId, CouncilCollective, Header, IBalance, ItemId, + LoanId, Nonce, OrderId, PoolId, Signature, TrancheId, }; use cfg_traits::Millis; use cfg_types::{ @@ -12,7 +12,7 @@ use cfg_types::{ locations::Location, oracles::OracleKey, permissions::{PermissionScope, Role}, - tokens::{CurrencyId, CustomMetadata, FilterCurrency, TrancheCurrency}, + tokens::{AssetStringLimit, CurrencyId, CustomMetadata, FilterCurrency, TrancheCurrency}, }; use fp_self_contained::{SelfContainedCall, UncheckedExtrinsic}; use frame_support::{ @@ -50,13 +50,13 @@ pub trait Runtime: Send + Sync + frame_system::Config< - Index = Index, + Nonce = Nonce, AccountId = AccountId, RuntimeCall = Self::RuntimeCallExt, RuntimeEvent = Self::RuntimeEventExt, - BlockNumber = BlockNumber, Lookup = AccountIdLookup, RuntimeOrigin = Self::RuntimeOriginExt, + Block = Self::BlockExt, Hash = H256, > + pallet_pool_system::Config< CurrencyId = CurrencyId, @@ -92,6 +92,7 @@ pub trait Runtime: AssetId = CurrencyId, CustomMetadata = CustomMetadata, Balance = Balance, + StringLimit = AssetStringLimit, > + pallet_uniques::Config + pallet_timestamp::Config + pallet_aura::Config @@ -236,7 +237,7 @@ pub trait Runtime: + From; /// Block used by the runtime - type Block: Block< + type BlockExt: Block< Hash = H256, Header = Header, Extrinsic = UncheckedExtrinsic< @@ -258,17 +259,17 @@ pub trait Runtime: >; /// You can extend this bounds to give extra API support - type Api: sp_api::runtime_decl_for_core::CoreV4 - + sp_block_builder::runtime_decl_for_block_builder::BlockBuilderV6 + type Api: sp_api::runtime_decl_for_core::CoreV4 + + sp_block_builder::runtime_decl_for_block_builder::BlockBuilderV6 + apis::runtime_decl_for_loans_api::LoansApiV2< - Self::Block, + Self::BlockExt, PoolId, LoanId, pallet_loans::entities::loans::ActiveLoanInfo, Balance, pallet_loans::entities::input::PriceCollectionInput, > + apis::runtime_decl_for_pools_api::PoolsApiV1< - Self::Block, + Self::BlockExt, PoolId, TrancheId, Balance, @@ -276,12 +277,12 @@ pub trait Runtime: Quantity, Self::MaxTranchesExt, > + apis::runtime_decl_for_investments_api::InvestmentsApiV1< - Self::Block, + Self::BlockExt, AccountId, TrancheCurrency, InvestmentPortfolio, > + apis::runtime_decl_for_account_conversion_api::AccountConversionApiV1< - Self::Block, + Self::BlockExt, AccountId, > + apis::runtime_decl_for_rewards_api::RewardsApiV1< Self::Block, diff --git a/runtime/integration-tests/src/generic/env.rs b/runtime/integration-tests/src/generic/env.rs index cf962fef68..9bc283c084 100644 --- a/runtime/integration-tests/src/generic/env.rs +++ b/runtime/integration-tests/src/generic/env.rs @@ -1,4 +1,4 @@ -use cfg_primitives::{Address, Balance, BlockNumber, Index}; +use cfg_primitives::{Address, Balance, BlockNumber, Nonce}; use cfg_traits::{IntoSeconds, Seconds}; use parity_scale_codec::Encode; use sp_runtime::{ @@ -166,7 +166,7 @@ pub mod utils { pub fn create_extrinsic( who: Keyring, call: impl Into, - nonce: Index, + nonce: Nonce, ) -> ::Extrinsic { let runtime_call = call.into(); let signed_extra = ( diff --git a/runtime/integration-tests/src/generic/envs/fudge_env.rs b/runtime/integration-tests/src/generic/envs/fudge_env.rs index ea0f6663ef..ad7dc3dd60 100644 --- a/runtime/integration-tests/src/generic/envs/fudge_env.rs +++ b/runtime/integration-tests/src/generic/envs/fudge_env.rs @@ -2,7 +2,7 @@ pub mod handle; use std::collections::HashMap; -use cfg_primitives::{Balance, BlockNumber, Index}; +use cfg_primitives::{Balance, BlockNumber, Nonce}; use fudge::primitives::Chain; use handle::{FudgeHandle, ParachainClient}; use sc_client_api::HeaderBackend; @@ -27,7 +27,7 @@ pub trait FudgeSupport: Runtime { /// Evironment that uses fudge to interact with the runtime pub struct FudgeEnv { handle: T::FudgeHandle, - nonce_storage: HashMap, + nonce_storage: HashMap, } impl Default for FudgeEnv { @@ -119,9 +119,9 @@ impl Env for FudgeEnv { type ApiRefOf<'a, T> = ApiRef< 'a, ::Block, + ::BlockExt, <::FudgeHandle as FudgeHandle>::ParachainConstructApi, - > as sp_api::ProvideRuntimeApi<::Block>>::Api, + > as sp_api::ProvideRuntimeApi<::BlockExt>>::Api, >; /// Specialized fudge methods diff --git a/runtime/integration-tests/src/generic/envs/fudge_env/handle.rs b/runtime/integration-tests/src/generic/envs/fudge_env/handle.rs index 9ad667a5da..4fc86e1b28 100644 --- a/runtime/integration-tests/src/generic/envs/fudge_env/handle.rs +++ b/runtime/integration-tests/src/generic/envs/fudge_env/handle.rs @@ -1,8 +1,7 @@ use std::sync::Arc; -use cfg_primitives::{AuraId, Balance, BlockNumber, Header}; +use cfg_primitives::{AuraId, Balance, Header}; use cumulus_primitives_core::CollectCollationInfo; -use frame_support::traits::GenesisBuild; use fudge::{ digest::{DigestCreator as DigestCreatorT, DigestProvider, FudgeAuraDigest, FudgeBabeDigest}, inherent::{ @@ -14,18 +13,17 @@ use fudge::{ TWasmExecutor, }; use polkadot_core_primitives::{Block as RelayBlock, Header as RelayHeader}; -use polkadot_parachain::primitives::Id as ParaId; +use polkadot_parachain_primitives::primitives::Id as ParaId; use polkadot_primitives::runtime_api::ParachainHost; use polkadot_runtime_parachains::configuration::HostConfiguration; use sc_block_builder::BlockBuilderApi; -use sc_client_api::Backend; use sc_service::{TFullBackend, TFullClient}; use sp_api::{ApiExt, ConstructRuntimeApi}; use sp_consensus_aura::{sr25519::AuthorityId, AuraApi}; use sp_consensus_babe::BabeApi; use sp_consensus_slots::SlotDuration; use sp_core::{crypto::AccountId32, ByteArray, H256}; -use sp_runtime::{traits::AccountIdLookup, Storage}; +use sp_runtime::{traits::AccountIdLookup, BuildStorage, Storage}; use sp_transaction_pool::runtime_api::TaggedTransactionQueue; use tokio::runtime::Handle; @@ -76,11 +74,8 @@ pub type RelayClient = TFullClient = TFullClient; pub trait FudgeHandle { - type RelayRuntime: frame_system::Config< - BlockNumber = BlockNumber, - AccountId = AccountId32, - Lookup = AccountIdLookup, - > + polkadot_runtime_parachains::paras::Config + type RelayRuntime: frame_system::Config> + + polkadot_runtime_parachains::paras::Config + polkadot_runtime_parachains::session_info::Config + polkadot_runtime_parachains::initializer::Config + polkadot_runtime_parachains::hrmp::Config @@ -99,7 +94,7 @@ pub trait FudgeHandle { type RelayApi: BlockBuilderApi + BabeApi + ParachainHost - + ApiExt as Backend>::State> + + ApiExt + TaggedTransactionQueue; type ParachainConstructApi: ConstructRuntimeApi< @@ -111,7 +106,7 @@ pub trait FudgeHandle { + 'static; type ParachainApi: BlockBuilderApi - + ApiExt as Backend>::State> + + ApiExt + AuraApi + TaggedTransactionQueue + CollectCollationInfo; @@ -160,7 +155,7 @@ pub trait FudgeHandle { Self::RelayRuntime, >::default(); - let mut host_config = HostConfiguration::::default(); + let mut host_config = HostConfiguration::default(); host_config.max_downward_message_size = 1024; host_config.hrmp_channel_max_capacity = 100; host_config.hrmp_channel_max_message_size = 1024; @@ -185,10 +180,11 @@ pub trait FudgeHandle { state .insert_storage( - frame_system::GenesisConfig { + frame_system::GenesisConfig:: { code: code.to_vec(), + _config: Default::default(), } - .build_storage::() + .build_storage() .expect("ESSENTIAL: GenesisBuild must not fail at this stage."), ) .expect("ESSENTIAL: Storage can be inserted"); @@ -268,10 +264,11 @@ pub trait FudgeHandle { state .insert_storage( - frame_system::GenesisConfig { + frame_system::GenesisConfig:: { code: code.to_vec(), + _config: Default::default(), } - .build_storage::() + .build_storage() .expect("ESSENTIAL: GenesisBuild must not fail at this stage."), ) .expect("ESSENTIAL: Storage can be inserted"); @@ -286,11 +283,11 @@ pub trait FudgeHandle { .expect("ESSENTIAL: Storage can be inserted"); state .insert_storage( - >::build_storage( - ¶chain_info::GenesisConfig { - parachain_id: para_id, - }, - ) + parachain_info::GenesisConfig:: { + _config: Default::default(), + parachain_id: para_id, + } + .build_storage() .expect("ESSENTIAL: Parachain Info GenesisBuild must not fail at this stage."), ) .expect("ESSENTIAL: Storage can be inserted"); diff --git a/runtime/integration-tests/src/generic/envs/runtime_env.rs b/runtime/integration-tests/src/generic/envs/runtime_env.rs index 88495d3205..d8cb7ca0a0 100644 --- a/runtime/integration-tests/src/generic/envs/runtime_env.rs +++ b/runtime/integration-tests/src/generic/envs/runtime_env.rs @@ -9,7 +9,6 @@ use frame_support::{ dispatch::GetDispatchInfo, inherent::{InherentData, ProvideInherent}, storage::{transactional, TransactionOutcome}, - traits::GenesisBuild, }; use frame_system::LastRuntimeUpgradeInfo; use parity_scale_codec::Encode; @@ -20,7 +19,7 @@ use sp_core::{sr25519::Public, Get, H256}; use sp_runtime::{ traits::Extrinsic, transaction_validity::{InvalidTransaction, TransactionValidityError}, - Digest, DigestItem, DispatchError, Storage, + BuildStorage, Digest, DigestItem, DispatchError, Storage, }; use sp_timestamp::Timestamp; @@ -287,6 +286,7 @@ impl RuntimeEnv { } } +#[cfg(test)] mod tests { use cfg_primitives::CFG; diff --git a/runtime/integration-tests/src/generic/impls.rs b/runtime/integration-tests/src/generic/impls.rs index 6b79a21938..274dc95082 100644 --- a/runtime/integration-tests/src/generic/impls.rs +++ b/runtime/integration-tests/src/generic/impls.rs @@ -9,7 +9,7 @@ macro_rules! impl_runtime { impl Runtime for $runtime_path::Runtime { type Api = Self; - type Block = $runtime_path::Block; + type BlockExt = $runtime_path::Block; type MaxTranchesExt = $runtime_path::MaxTranches; type RuntimeCallExt = $runtime_path::RuntimeCall; type RuntimeEventExt = $runtime_path::RuntimeEvent; @@ -28,13 +28,13 @@ impl_runtime!(centrifuge_runtime, Centrifuge); /// Implements fudge support for a runtime macro_rules! impl_fudge_support { ( - $fudge_companion_type:ident, - $relay_path:ident, + $fudge_companion_type:ident, + $relay_path:ident, $relay_session_keys:expr, - $parachain_path:ident, - $parachain_id:literal, - $sibling_id:literal - ) => { + $parachain_path:ident, + $parachain_id:literal, + $sibling_id:literal + ) => { const _: () = { use fudge::primitives::{Chain, ParaId}; use polkadot_core_primitives::Block as RelayBlock; @@ -175,7 +175,7 @@ impl_fudge_support!( impl_fudge_support!( FudgeAltair, - kusama_runtime, + staging_kusama_runtime, default_kusama_session_keys(), altair_runtime, 2088, @@ -200,12 +200,13 @@ pub fn default_rococo_session_keys() -> rococo_runtime::SessionKeys { para_validator: ValidatorId::from_slice([0u8; 32].as_slice()).unwrap(), para_assignment: AssignmentId::from_slice([0u8; 32].as_slice()).unwrap(), authority_discovery: AuthorityDiscoveryId::from_slice([0u8; 32].as_slice()).unwrap(), - beefy: sp_consensus_beefy::crypto::AuthorityId::from_slice([0u8; 33].as_slice()).unwrap(), + beefy: sp_consensus_beefy::ecdsa_crypto::AuthorityId::from_slice([0u8; 33].as_slice()) + .unwrap(), } } -pub fn default_kusama_session_keys() -> kusama_runtime::SessionKeys { - kusama_runtime::SessionKeys { +pub fn default_kusama_session_keys() -> staging_kusama_runtime::SessionKeys { + staging_kusama_runtime::SessionKeys { grandpa: pallet_grandpa::AuthorityId::from_slice([0u8; 32].as_slice()).unwrap(), babe: pallet_babe::AuthorityId::from_slice([0u8; 32].as_slice()).unwrap(), im_online: pallet_im_online::sr25519::AuthorityId::from_slice([0u8; 32].as_slice()) @@ -213,6 +214,8 @@ pub fn default_kusama_session_keys() -> kusama_runtime::SessionKeys { para_validator: ValidatorId::from_slice([0u8; 32].as_slice()).unwrap(), para_assignment: AssignmentId::from_slice([0u8; 32].as_slice()).unwrap(), authority_discovery: AuthorityDiscoveryId::from_slice([0u8; 32].as_slice()).unwrap(), + beefy: sp_consensus_beefy::ecdsa_crypto::AuthorityId::from_slice([0u8; 33].as_slice()) + .unwrap(), } } diff --git a/runtime/integration-tests/src/generic/utils/currency.rs b/runtime/integration-tests/src/generic/utils/currency.rs index 5acd2786fa..4dff21775e 100644 --- a/runtime/integration-tests/src/generic/utils/currency.rs +++ b/runtime/integration-tests/src/generic/utils/currency.rs @@ -31,7 +31,7 @@ pub trait CurrencyInfo { &self.symbol() } - fn location(&self) -> Option { + fn location(&self) -> Option { None } @@ -41,11 +41,11 @@ pub trait CurrencyInfo { 0 } - fn metadata(&self) -> AssetMetadata { + fn metadata(&self) -> AssetMetadata { AssetMetadata { decimals: self.decimals(), - name: self.name().as_bytes().to_vec(), - symbol: self.symbol().as_bytes().to_vec(), + name: self.name().as_bytes().to_vec().try_into().unwrap(), + symbol: self.symbol().as_bytes().to_vec().try_into().unwrap(), existential_deposit: self.ed(), location: self.location(), additional: self.custom(), @@ -149,7 +149,7 @@ pub const fn usd18(amount: Balance) -> Balance { pub fn register_currency( currency: impl CurrencyInfo, - adaptor: impl FnOnce(&mut AssetMetadata), + adaptor: impl FnOnce(&mut AssetMetadata), ) { let mut meta = currency.metadata(); adaptor(&mut meta); diff --git a/runtime/integration-tests/src/generic/utils/democracy.rs b/runtime/integration-tests/src/generic/utils/democracy.rs index 8230f056d6..a5c234ada7 100644 --- a/runtime/integration-tests/src/generic/utils/democracy.rs +++ b/runtime/integration-tests/src/generic/utils/democracy.rs @@ -1,10 +1,7 @@ use std::ops::Add; use cfg_primitives::{Balance, BlockNumber, CouncilCollective}; -use frame_support::{ - dispatch::{GetDispatchInfo, Weight}, - traits::Bounded, -}; +use frame_support::{dispatch::GetDispatchInfo, traits::Bounded, weights::Weight}; use pallet_collective::{Call as CouncilCall, MemberCount, ProposalIndex}; use pallet_democracy::{ AccountVote, Call as DemocracyCall, Conviction, PropIndex, ReferendumIndex, ReferendumInfo, diff --git a/runtime/integration-tests/src/generic/utils/genesis.rs b/runtime/integration-tests/src/generic/utils/genesis.rs index 7792bc92ef..21b912fc16 100644 --- a/runtime/integration-tests/src/generic/utils/genesis.rs +++ b/runtime/integration-tests/src/generic/utils/genesis.rs @@ -1,36 +1,24 @@ //! PLEASE be as much generic as possible because no domain or use cases are //! considered at this level. -use std::marker::PhantomData; - use cfg_primitives::Balance; use cfg_types::tokens::CurrencyId; -use frame_support::traits::GenesisBuild; use parity_scale_codec::Encode; use sp_core::crypto::AccountId32; -use sp_runtime::Storage; +use sp_runtime::{BuildStorage, Storage}; use crate::{ generic::{config::Runtime, utils::currency::CurrencyInfo}, utils::accounts::{default_accounts, Keyring}, }; -pub struct Genesis { +#[derive(Default)] +pub struct Genesis { storage: Storage, - _config: PhantomData, -} - -impl Default for Genesis { - fn default() -> Self { - Self { - storage: Default::default(), - _config: Default::default(), - } - } } -impl Genesis { - pub fn add(mut self, builder: impl GenesisBuild) -> Self { +impl Genesis { + pub fn add(mut self, builder: impl BuildStorage) -> Self { builder.assimilate_storage(&mut self.storage).unwrap(); self } @@ -40,9 +28,9 @@ impl Genesis { } } -// Add GenesisBuild functions for pallet initialization. +// Add BuildStorage functions for pallet initialization. -pub fn balances(balance: Balance) -> impl GenesisBuild { +pub fn balances(balance: Balance) -> impl BuildStorage { pallet_balances::GenesisConfig:: { balances: default_accounts() .into_iter() @@ -51,7 +39,7 @@ pub fn balances(balance: Balance) -> impl GenesisBuild { } } -pub fn tokens(values: Vec<(CurrencyId, Balance)>) -> impl GenesisBuild { +pub fn tokens(values: Vec<(CurrencyId, Balance)>) -> impl BuildStorage { orml_tokens::GenesisConfig:: { balances: default_accounts() .into_iter() @@ -67,7 +55,7 @@ pub fn tokens(values: Vec<(CurrencyId, Balance)>) -> impl GenesisBui } } -pub fn assets(currency_ids: Vec>) -> impl GenesisBuild { +pub fn assets(currency_ids: Vec>) -> impl BuildStorage { orml_asset_registry::GenesisConfig:: { assets: currency_ids .into_iter() @@ -77,7 +65,7 @@ pub fn assets(currency_ids: Vec>) -> impl Gene } } -pub fn council_members(members: Vec) -> impl GenesisBuild +pub fn council_members(members: Vec) -> impl BuildStorage where I: 'static, T: pallet_collective::Config, diff --git a/runtime/integration-tests/src/utils/accounts.rs b/runtime/integration-tests/src/utils/accounts.rs index d4cc842c72..3a0f563486 100644 --- a/runtime/integration-tests/src/utils/accounts.rs +++ b/runtime/integration-tests/src/utils/accounts.rs @@ -14,9 +14,9 @@ use std::collections::HashMap; -use cfg_primitives::Index; +use cfg_primitives::Nonce; use fudge::primitives::Chain; -use node_primitives::{AccountId as RelayAccountId, Index as RelayIndex}; +use polkadot_core_primitives::{AccountId as RelayAccountId, Nonce as RelayNonce}; pub use sp_core::sr25519; use sp_core::{ sr25519::{Pair, Public, Signature}, @@ -31,7 +31,7 @@ use crate::{ /// Struct that takes care of handling nonces for accounts pub struct NonceManager { - nonces: HashMap>, + nonces: HashMap>, } impl NonceManager { @@ -47,7 +47,7 @@ impl NonceManager { /// map. /// /// MUST be executed in an externalites provided env. - pub fn nonce(&mut self, chain: Chain, who: Keyring) -> Index { + pub fn nonce(&mut self, chain: Chain, who: Keyring) -> Nonce { self.nonces .entry(chain) .or_insert(HashMap::new()) @@ -56,13 +56,13 @@ impl NonceManager { .clone() } - fn nonce_from_chain(chain: Chain, who: Keyring) -> Index { + fn nonce_from_chain(chain: Chain, who: Keyring) -> Nonce { match chain { - Chain::Relay => nonce::( + Chain::Relay => nonce::( who.clone().to_account_id().into(), ), Chain::Para(id) => match id { - _ if id == PARA_ID => nonce::( + _ if id == PARA_ID => nonce::( who.clone().to_account_id().into() ), _ => unreachable!("Currently no nonces for chains differing from Relay and centrifuge are supported. Para ID {}", id) @@ -77,7 +77,7 @@ impl NonceManager { /// map. /// /// MUST be executed in an externalites provided env. - pub fn fetch_add(&mut self, chain: Chain, who: Keyring) -> Index { + pub fn fetch_add(&mut self, chain: Chain, who: Keyring) -> Nonce { let curr = self .nonces .entry(chain) @@ -105,10 +105,10 @@ impl NonceManager { /// Retrieves a nonce from the centrifuge state /// /// **NOTE: Usually one should use the TestEnv::nonce() api** -fn nonce_centrifuge(env: &TestEnv, who: Keyring) -> cfg_primitives::Index { +fn nonce_centrifuge(env: &TestEnv, who: Keyring) -> Nonce { env.centrifuge .with_state(|| { - nonce::( + nonce::( who.clone().to_account_id().into(), ) }) @@ -118,19 +118,19 @@ fn nonce_centrifuge(env: &TestEnv, who: Keyring) -> cfg_primitives::Index { /// Retrieves a nonce from the relay state /// /// **NOTE: Usually one should use the TestEnv::nonce() api** -fn nonce_relay(env: &TestEnv, who: Keyring) -> RelayIndex { +fn nonce_relay(env: &TestEnv, who: Keyring) -> RelayNonce { env.relay .with_state(|| { - nonce::(who.clone().to_account_id().into()) + nonce::(who.clone().to_account_id().into()) }) .expect("ESSENTIAL: Nonce must be retrievable.") } -fn nonce(who: AccountId) -> Index +fn nonce(who: AccountId) -> Nonce where Runtime: frame_system::Config, AccountId: Into<::AccountId>, - Index: From<::Index>, + Nonce: From<::Nonce>, { frame_system::Pallet::::account_nonce(who.into()).into() } diff --git a/runtime/integration-tests/src/utils/env.rs b/runtime/integration-tests/src/utils/env.rs index 1159ecc156..59f89635dd 100644 --- a/runtime/integration-tests/src/utils/env.rs +++ b/runtime/integration-tests/src/utils/env.rs @@ -13,8 +13,7 @@ //! Utilities to create a relay-chain-parachain setup use std::collections::HashMap; -use cfg_primitives::{AuraId, BlockNumber, Index}; -use frame_support::traits::GenesisBuild; +use cfg_primitives::{AuraId, BlockNumber, Nonce}; use frame_system::EventRecord; use fudge::{ digest::{DigestCreator, DigestProvider, FudgeAuraDigest, FudgeBabeDigest}, @@ -31,7 +30,7 @@ use lazy_static::lazy_static; pub use macros::*; use parity_scale_codec::{Decode, Encode}; use polkadot_core_primitives::{Block as RelayBlock, Header as RelayHeader}; -use polkadot_parachain::primitives::Id as ParaId; +use polkadot_parachain_primitives::primitives::Id as ParaId; use polkadot_runtime_parachains::{configuration, configuration::HostConfiguration, dmp}; use sc_executor::{WasmExecutionMethod, WasmExecutor}; use sc_service::{TFullBackend, TFullClient, TaskManager}; @@ -41,7 +40,7 @@ use sp_core::H256; use sp_runtime::{ generic::BlockId, traits::{BlakeTwo256, Extrinsic}, - DigestItem, Storage, + BuildStorage, DigestItem, Storage, }; use tokio::runtime::Handle; @@ -548,7 +547,7 @@ impl TestEnv { /// Returns the next nonce to be used /// **WARN: Increases the nonce counter on `NonceManager** - fn fetch_add_nonce(&mut self, chain: Chain, who: Keyring) -> Index { + fn fetch_add_nonce(&mut self, chain: Chain, who: Keyring) -> Nonce { let manager = self.nonce_manager.clone(); self.with_state(chain, || { manager @@ -561,7 +560,7 @@ impl TestEnv { /// Returns the next nonce to be used. Does NOT increase counter in /// `NonceManager` - fn nonce(&mut self, chain: Chain, who: Keyring) -> Index { + fn nonce(&mut self, chain: Chain, who: Keyring) -> Nonce { let manager = self.nonce_manager.clone(); self.with_state(chain, || { manager @@ -803,10 +802,11 @@ fn test_env( ); state.insert_storage( - frame_system::GenesisConfig { + frame_system::GenesisConfig:: { code: RelayCode.expect("ESSENTIAL: Relay WASM is some.").to_vec(), + _config: Default::default(), } - .build_storage::() + .build_storage() .expect("ESSENTIAL: Frame System GenesisBuild must not fail at this stage."), ); @@ -893,8 +893,8 @@ fn test_env( fn get_parachain_builder( handle: Handle, inherent_builder: InherentBuilder< - TFullClient, TFullBackend, + TFullClient, >, para_id: u32, centrifuge_storage: Option, @@ -908,12 +908,13 @@ fn get_parachain_builder( .expect("ESSENTIAL: State provider can be created."); state.insert_storage( - frame_system::GenesisConfig { + frame_system::GenesisConfig:: { code: CentrifugeCode .expect("ESSENTIAL: Centrifuge WASM is some.") .to_vec(), + _config: Default::default(), } - .build_storage::() + .build_storage() .expect("ESSENTIAL: Frame System GenesisBuild must not fail at this stage."), ); state.insert_storage( @@ -924,11 +925,11 @@ fn get_parachain_builder( .expect("ESSENTIAL: Pallet Aura GenesisBuild must not fail at this stage."), ); state.insert_storage( - >::build_storage( - ¶chain_info::GenesisConfig { - parachain_id: ParaId::from(para_id), - }, - ) + parachain_info::GenesisConfig:: { + _config: Default::default(), + parachain_id: ParaId::from(para_id), + } + .build_storage() .expect("ESSENTIAL: Parachain Info GenesisBuild must not fail at this stage."), ); diff --git a/runtime/integration-tests/src/utils/evm.rs b/runtime/integration-tests/src/utils/evm.rs index 57bccefb0d..ec5f7020c5 100644 --- a/runtime/integration-tests/src/utils/evm.rs +++ b/runtime/integration-tests/src/utils/evm.rs @@ -28,8 +28,7 @@ pub fn mint_balance_into_derived_account(env: &mut TestEnv, address: H160, balan }) .unwrap(); - let derived_account = - AccountConverter::::convert_evm_address(chain_id, address.to_fixed_bytes()); + let derived_account = AccountConverter::convert_evm_address(chain_id, address.to_fixed_bytes()); env.with_mut_state(Chain::Para(PARA_ID), || { Balances::mint_into(&derived_account.into(), balance).unwrap() @@ -44,8 +43,7 @@ pub fn deploy_contract(env: &mut TestEnv, address: H160, code: Vec) { }) .unwrap(); - let derived_address = - AccountConverter::::convert_evm_address(chain_id, address.to_fixed_bytes()); + let derived_address = AccountConverter::convert_evm_address(chain_id, address.to_fixed_bytes()); let transaction_create_cost = env .with_state(Chain::Para(PARA_ID), || { diff --git a/runtime/integration-tests/src/utils/extrinsics.rs b/runtime/integration-tests/src/utils/extrinsics.rs index 1c84165317..5cf9c6a311 100644 --- a/runtime/integration-tests/src/utils/extrinsics.rs +++ b/runtime/integration-tests/src/utils/extrinsics.rs @@ -14,11 +14,12 @@ #![allow(unused)] use cfg_primitives::{ - AccountId as CentrifugeAccountId, Address as CentrifugeAddress, Index as CentrifugeIndex, + AccountId as CentrifugeAccountId, Address as CentrifugeAddress, Nonce as CentrifugeNonce, }; -use node_primitives::Index as RelayIndex; use parity_scale_codec::Encode; -use polkadot_core_primitives::{AccountId as RelayAccountId, BlockId as RelayBlockId}; +use polkadot_core_primitives::{ + AccountId as RelayAccountId, BlockId as RelayBlockId, Nonce as RelayNonce, +}; use sc_client_api::client::BlockBackend; use sp_core::H256; use sp_runtime::{ @@ -49,7 +50,7 @@ use crate::{ pub fn xt_centrifuge( env: &TestEnv, who: Keyring, - nonce: cfg_primitives::Index, + nonce: cfg_primitives::Nonce, call: centrifuge::RuntimeCall, ) -> Result> { let client = env.centrifuge.client(); @@ -77,7 +78,7 @@ pub fn xt_centrifuge( pub fn xt_relay( env: &TestEnv, who: Keyring, - nonce: RelayIndex, + nonce: RelayNonce, call: relay::RuntimeCall, ) -> Result> { let client = env.relay.client(); @@ -98,7 +99,7 @@ pub fn xt_relay( .map_err(|e| e.into()) } -fn signed_extra_centrifuge(nonce: cfg_primitives::Index) -> CentrifugeSignedExtra { +fn signed_extra_centrifuge(nonce: cfg_primitives::Nonce) -> CentrifugeSignedExtra { ( frame_system::CheckNonZeroSender::::new(), frame_system::CheckSpecVersion::::new(), @@ -114,7 +115,7 @@ fn signed_extra_centrifuge(nonce: cfg_primitives::Index) -> CentrifugeSignedExtr fn sign_centrifuge( who: Keyring, - nonce: cfg_primitives::Index, + nonce: cfg_primitives::Nonce, call: CentrifugeCall, spec_version: u32, tx_version: u32, @@ -143,7 +144,7 @@ fn sign_centrifuge( ) } -fn signed_extra_relay(nonce: RelayIndex) -> RelaySignedExtra { +fn signed_extra_relay(nonce: RelayNonce) -> RelaySignedExtra { ( frame_system::CheckNonZeroSender::::new(), frame_system::CheckSpecVersion::::new(), @@ -158,7 +159,7 @@ fn signed_extra_relay(nonce: RelayIndex) -> RelaySignedExtra { fn sign_relay( who: Keyring, - nonce: RelayIndex, + nonce: RelayNonce, call: RelayCall, spec_version: u32, tx_version: u32, @@ -190,10 +191,10 @@ fn sign_relay( /// /// **NOTE: Should not be used if the TesteEnv::sign_and_submit() interface is /// also used with the same `who` as the sender** -pub fn nonce_centrifuge(env: &TestEnv, who: Keyring) -> cfg_primitives::Index { +pub fn nonce_centrifuge(env: &TestEnv, who: Keyring) -> cfg_primitives::Nonce { env.centrifuge .with_state(|| { - nonce::( + nonce::( who.clone().to_account_id().into(), ) }) @@ -204,19 +205,19 @@ pub fn nonce_centrifuge(env: &TestEnv, who: Keyring) -> cfg_primitives::Index { /// /// **NOTE: Should not be used if the TesteEnv::sign_and_submit() interface is /// also used with the same `who` as the sender** -pub fn nonce_relay(env: &TestEnv, who: Keyring) -> RelayIndex { +pub fn nonce_relay(env: &TestEnv, who: Keyring) -> RelayNonce { env.relay .with_state(|| { - nonce::(who.clone().to_account_id().into()) + nonce::(who.clone().to_account_id().into()) }) .expect("ESSENTIAL: Nonce must be retrievable.") } -fn nonce(who: AccountId) -> Index +fn nonce(who: AccountId) -> Nonce where Runtime: frame_system::Config, AccountId: Into<::AccountId>, - Index: From<::Index>, + Nonce: From<::Nonce>, { frame_system::Pallet::::account_nonce(who.into()).into() } diff --git a/runtime/integration-tests/src/utils/genesis.rs b/runtime/integration-tests/src/utils/genesis.rs index a2dc3d70fb..123268ceb1 100644 --- a/runtime/integration-tests/src/utils/genesis.rs +++ b/runtime/integration-tests/src/utils/genesis.rs @@ -10,14 +10,18 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -//! Utilitites around populating a genesis storage +// TODO: this file must be removed after +// https://github.com/centrifuge/centrifuge-chain/issues/1790 +#![allow(deprecated)] + +//! Utilities around populating a genesis storage use cfg_types::{ fixed_point::Rate, tokens::{CurrencyId, CustomMetadata}, }; use frame_support::traits::GenesisBuild; use serde::{Deserialize, Serialize}; -use sp_runtime::{AccountId32, FixedPointNumber, Storage}; +use sp_runtime::{AccountId32, BoundedVec, BuildStorage, FixedPointNumber, Storage}; use crate::utils::{ accounts::{default_accounts, Keyring}, @@ -145,8 +149,8 @@ where orml_asset_registry::Pallet::::do_register_asset( orml_asset_registry::AssetMetadata { decimals: 18, - name: b"mock_name".to_vec(), - symbol: b"mock_symbol".to_vec(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 0u128.into(), location: None, additional: CustomMetadata { diff --git a/rust-toolchain.toml b/rust-toolchain.toml index a187069911..669d2c3e87 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "nightly-2023-10-26" # rustc 1.75.0 +channel = "nightly-2024-02-06" # 1.78.0-nightly components = [ "rustfmt", "clippy" ] targets = [ "wasm32-unknown-unknown" ] -profile = "minimal" \ No newline at end of file +profile = "minimal" diff --git a/scripts/check_benchmarks.sh b/scripts/check_benchmarks.sh index b1ff793066..2bd0001d9c 100755 --- a/scripts/check_benchmarks.sh +++ b/scripts/check_benchmarks.sh @@ -12,7 +12,6 @@ run_benchmark() { --repeat=1 \ --pallet="${pallet}" \ --extrinsic=* \ - --execution=wasm \ --wasm-execution=compiled \ --heap-pages=4096" @@ -26,10 +25,10 @@ then chain="development-local" elif [[ $runtime == "centrifuge" ]]; then - chain="centrifuge-dev" + chain="centrifuge-local" elif [[ $runtime == "altair" ]]; then - chain="altair-dev" + chain="altair-local" else echo "Unknown runtime. Aborting!" exit 1; diff --git a/scripts/export_parachain_files.sh b/scripts/export_parachain_files.sh index 615622744a..8fef73db32 100755 --- a/scripts/export_parachain_files.sh +++ b/scripts/export_parachain_files.sh @@ -3,11 +3,10 @@ set -e chain_name=$1 -parachain_id=$2 -should_build=$3 +should_build=$2 -if [[ $chain_name == "" || $parachain_id == "" ]]; then - echo "Chain Name or Parachain ID argument not provided" +if [[ $chain_name == "" ]]; then + echo "Chain Name argument not provided" exit 1 fi @@ -20,11 +19,11 @@ fi if [[ $should_build == "true" ]]; then echo "Building Spec for $chain_name" $PWD/target/release/centrifuge-chain build-spec --chain $chain_name --disable-default-bootnode > node/res/$chain_name-spec.json - sed -i.bu "s/\"parachainId\": 10001/\"parachainId\": $parachain_id/g" node/res/$chain_name-spec.json + sed -i.bu "s/\"parachainId\": 2000/" node/res/$chain_name-spec.json $PWD/target/release/centrifuge-chain build-spec --chain node/res/$chain_name-spec.json --disable-default-bootnode --raw > node/res/$chain_name-spec-raw.json rm node/res/$chain_name-spec.json.bu fi echo "Exporting State & Wasm" -$PWD/target/release/centrifuge-chain export-genesis-state --chain node/res/$chain_name-spec-raw.json --parachain-id $parachain_id > $chain_name-genesis-state +$PWD/target/release/centrifuge-chain export-genesis-state --chain node/res/$chain_name-spec-raw.json > $chain_name-genesis-state $PWD/target/release/centrifuge-chain export-genesis-wasm --chain node/res/$chain_name-spec-raw.json > $chain_name-genesis-wasm diff --git a/scripts/init.sh b/scripts/init.sh index 3109101498..911eca2544 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -57,7 +57,6 @@ start-parachain) --parachain-id="${para_id}" \ --base-path=$parachain_dir/data \ --wasm-execution=compiled \ - --execution=wasm \ --port $((30355 + $para_id)) \ --rpc-port $((9936 + $para_id)) \ --rpc-external \ diff --git a/scripts/runtime_benchmarks.sh b/scripts/runtime_benchmarks.sh index 81982e816f..ba363a395a 100755 --- a/scripts/runtime_benchmarks.sh +++ b/scripts/runtime_benchmarks.sh @@ -26,7 +26,6 @@ run_benchmark() { --repeat=20 \ --pallet="${pallet}" \ --extrinsic=* \ - --execution=wasm \ --wasm-execution=compiled \ --heap-pages=4096 \ --output="${output}"" @@ -46,11 +45,11 @@ then elif [[ $runtime == "centrifuge" ]]; then runtime_path="runtime/centrifuge" - chain="centrifuge-dev" + chain="centrifuge-local" elif [[ $runtime == "altair" ]]; then runtime_path="runtime/altair" - chain="altair-dev" + chain="altair-local" else echo "Unknown runtime. Aborting!" exit 1;